RstarCNN icon indicating copy to clipboard operation
RstarCNN copied to clipboard

problem of running the code on Berkeley Attributes of People Dataset

Open yaoliUoA opened this issue 8 years ago • 2 comments

I am trying to run the code on the Berkeley Attributes of People Dataset (BAPD) . After downloading the BAPD dataset and pre-trained models from the provided links, I modified the tools/test_net.py by replacing imdb = datasets.pascal_voc('val','2012') by imdb = datasets.attr_bpad('BAPD'). Then I run the following command: ./tools/test_net.py --gpu 0 --def models/VGG16_RstarCNN_attributes/test.prototxt --net models/VGG16_RstarCNN_attributes/bpad_rstarcnn_train.caffemodel and got the following error: line 216, in im_detect box_deltas = blobs_out['bbox_pred'] KeyError: 'bbox_pred'

The reason is that the VGG16_RstarCNN_attributes/test.prototxt does not have the layer bbox_pred, this is a little weird because bbox_pred layers exists in other .prototxt files, such as VGG16_RstarCNN/test.prototxt and VGG16_RstarCNN_stanford40/test.prototxt.

Can anyone give me a hint on this issue please? Thanks in advance.

yaoliUoA avatar Jun 30 '16 05:06 yaoliUoA

You need to import in tools/test_net.py the following:

from fast_rcnn.test_attributes import test_net

That should solve it. In general, you need to import the right data of course as well as the proper testing module.

gkioxari avatar Jul 01 '16 02:07 gkioxari

I think maybe you need use imdb = datasets.attr_bpad('test') to replace original code.

zx3Leonoardo avatar Mar 14 '17 08:03 zx3Leonoardo