Download SSD source code and compile (follow the SSD README).
Download the pretrained deploy weights from the link above.
Put all the files in SSD_HOME/examples/
Run demo.py to show the detection result.
You can run merge_bn.py to generate a no bn model, it will be much faster.
Create LMDB for your own dataset
Place the Images directory and Labels directory into same directory. (Each image in Images folder should have a unique label file in Labels folder with same name)
cd create_lmdb/code
Modify the labelmap.prototxt file according to your classes.
Modify the paths and directories in create_list.sh and create_data.sh as specified in same file in comments.
run bash create_list.sh, which will create trainval.txt, test.txt and test_name_size.txt
run bash create_data.sh, which will generate the LMDB in Dataset directory.
Delete trainval.txt, test.txt, test_name_size.txt before creation of next LMDB.
For the conv11_mbox_prior layer, the anchors are [(0.2, 1.0), (0.2, 2.0), (0.2, 0.5)] vs tensorflow's [(0.1, 1.0), (0.2, 2.0), (0.2, 0.5)].
Reproduce the result
I trained this model from a MobileNet classifier(caffemodel and prototxt) converted from tensorflow. I first trained the model on MS-COCO and then fine-tuned on VOC0712. Without MS-COCO pretraining, it can only get mAP=0.68.
Mobile Platform
You can run it on Android with my another project rscnn.
请发表评论