weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.68k forks source link

The issue of applying pretrained model to ssd_detection.ipynb #359

Open zhby99 opened 7 years ago

zhby99 commented 7 years ago
model_def = 'models/VGGNet/coco/SSD_512x512/deploy.prototxt'
model_weights = 'models/VGGNet/coco/SSD_512x512/VGG_coco_SSD_512x512_iter_360000.caffemodel'
# model_def = 'models/VGGNet/VOC0712/SSD_300x300/deploy.prototxt'
# model_weights = 'models/VGGNet/VOC0712/SSD_300x300/VGG_VOC0712_SSD_300x300_iter_60000.caffemodel'
net = caffe.Net(model_def,      # defines the structure of the model
                model_weights,  # contains the trained weights
                caffe.TEST)     # use test mode (e.g., don't perform dropout)

I tried to use the pretrained model for MSCOCO in ssd_detection.ipynb but it failed and the kernel down, what should I do to make it work?

aum12 commented 7 years ago

I suggest examining the terminal output from the IPython notebook. It'll provide insights into what exactly failed.

zhby99 commented 7 years ago
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0103 18:24:20.930292 15741 _caffe.cpp:122] DEPRECATION WARNING - deprecated use of Python interface
W0103 18:24:20.930340 15741 _caffe.cpp:123] Use this instead (with the named "weights" parameter):
W0103 18:24:20.930351 15741 _caffe.cpp:125] Net('models/VGGNet/coco/SSD_512x512/deploy.prototxt', 1, weights='models/VGGNet/coco/SSD_512x512/VGG_coco_SSD_512x512_iter_360000.caffemodel')
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 1004:9: Message type "caffe.PriorBoxParameter" has no field named "step".
F0103 18:24:20.934159 15741 upgrade_proto.cpp:79] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: models/VGGNet/coco/SSD_512x512/deploy.prototxt
*** Check failure stack trace: ***

This was what I got from the terminal. Is there something wrong with "deploy.prototxt" for MSCOCO?

weiliu89 commented 7 years ago

Have you make py again after pull the latest code?

zhby99 commented 7 years ago

Thanks! I forgot it, it works now.