Problems in testing SSD under Tensorflow framework

Main reference https://blog.csdn.net/yexiaogu1104/article/details/77415990

Also refer to https://github.com/balancap/SSD-Tensorflow/issues/79

The steps of the original blogger are as follows:

1. Download the model ssd_300_vgg and store it in the directory SSD-Tensorflow-master/checkpoints/ 
2. Open the terminal, in the main directory SSD-Tensorflow-master, run cd notebooks/to the notebook directory, run  jupyter-notebookto http://localhost:8892/tree Server, open the ssd_notebook.ipynb file  3. Configure some paths: change it
in the 4th cell, if the directory structure is not correct, an error will be reported  4. Use your own image and change it to the path where your own image is located from notebooks import visualizationimport notebooks
path = '../demo/'

5. Run all cells from start to finish.

A few points:

1. The model ssd_300_vgg needs fq to download, please bring your own tools

2. From notebook import visualization can be left unchanged, I did not change it, and it runs successfully

3. The most important point, when running cell6, the original image is like this


But when running it appears


That is, there is a * in the upper left corner, which means that the loading is not successful. At this time, we need to decompress the downloaded ssd_300_vgg.zkpt.zip, and put the two files in the ssd_300_vgg directory, mine is like this


Then change the source code in the jupyter notebook to the following form, and there is no * sign when running the cell again.


That's it, the rest of the running cell is just fine,



Another is that someone has encountered this situation NameError: name 'ssd_anchors' is not defined , I also encountered the same situation at the beginning, after changing the code of cell6 above and successfully loading the cpkt file, it will be fine.

The pit I stepped on, I hope it will be useful to others.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324908757&siteId=291194637