mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

Cannot start Fast R-CNN demo (missing prototxt?)

Open luatzori opened this issue 10 years ago • 5 comments

I'm trying to run the Fast R-CNN example, but before doing a training and testing I would like to try the demonstration (last section of the README file). However, the main issue is that the fetch_fast_rcnn_models.sh script downloads only the caffemodel files without the corresponding prototxt file (and therefore the mxnet/tools/caffe_converter can't be used).

I searched in the rbgirshick repository and I found some prototxts but I'm not sure which are the ones corresponding to the caffemodels previously downloaded.

In particular the best promising one seemed https://github.com/rbgirshick/fast-rcnn/blob/master/models/VGG_CNN_M_1024/test.prototxt which I think can correspond to the vgg_cnn_m_1024_fast_rcnn_iter_40000.caffemodel downloaded by the script.

Giving this input to the converter, however, results in a failure with message google.protobuf.text_format.ParseError: 392:3 : Message type "caffe.LayerParameter" has no field named "roi_pooling_param".

Am I using the right prototxt or is it a problem related only to the converter? (If i remember correctly, the ROI Pooling operator was implemented in MXNet recently, so there should be an MXNet representation now).

luatzori avatar May 23 '16 10:05 luatzori

@iluvatar593 I did notice that even if you wanted to download the vgg16/vgg19 models to convert using the run.py, it will complain that there is no module named caffe_pb2. So, that's missing from the caffe_parse folder. But even after I downloaded the missing file (of course I don't know if its the right one), I've got an error of NetParameter object has no attribute 'layer'.

(if anyone is wondering - protobuf is installed)

lasandcris avatar May 23 '16 13:05 lasandcris

Hi all, the rcnn example exists in mxnet is outdated. please refer to authors repository here:

https://github.com/precedenceguo/mx-rcnn

I follow his manual and play demo successfully!

BTW, use tools/caffe_convert.py to convert caffe model to mxnet params.

BR, Haria

hariag avatar May 23 '16 14:05 hariag

@lasandcris That's probably because you need some extra packages. Assuming you're using linux, try: sudo pip install protobuf and sudo apt-get install protobuf-compiler protobuf-c-compiler and then make

Actually, like @haria said, it seems that the converter to be used is the one in the repo [s]he linked. I gave it a try but it seems it requires also to install the fast-rcnn fork of caffe. I'll keep performing tests, but it seems that the prototxt files are still needed for the conversion, and is not clear which ones to use.

luatzori avatar May 23 '16 15:05 luatzori

@iluvatar593 protobuf is installed, caffe_pb2 is independent from it.

lasandcris avatar May 23 '16 16:05 lasandcris

Hi @iluvatar593 @lasandcris

When I try demo, I clone https://github.com/rbgirshick/fast-rcnn to fast-rcnn folder and update fast_rcnn_path in caffe_convert.py.

BR, Haria

hariag avatar May 23 '16 16:05 hariag