sanghoon / pva-faster-rcnn

Demo code for PVANet
https://arxiv.org/abs/1611.08588
Other
651 stars 241 forks source link

How to run the file ./tools/demo.py #38

Open cloudyszz opened 7 years ago

cloudyszz commented 7 years ago

Hi@sanghoon: I can train and test my own net with my own data by the models/example_train384.Now I want to run the demo.py, but it has the error like this: Traceback (most recent call last): File "./tools/demo.py", line 136, in , _= im_detect(net, im) TypeError: im_detect() takes at least 3 arguments (2 given)

I know that the im_detect() is defined in the lib/faste_rcnn/test.py file. How can I modify the code to run the demo.py successfully? Hopeful for your reply! Thank you!

Ning-Ding commented 7 years ago

@cloudyszz I have looked through the source code of im_detect in the lib/fast_rcnn/test.py and found that it is different with the original version in py-faster-rcnn. Maybe you could try the original version or modify the '_t' part of the current version of the function im_detect.

mingde510 commented 7 years ago

Loaded network /home/sti/Downloads/cnn/pva-faster-rcnn/models/pvanet/pva9.1/PVA9.1_ImgNet_COCO_VOC0712.caffemodel F1227 17:58:51.028525 32295 concat_layer.cpp:42] Check failed: top_shape[j] == bottom[i]->shape(j) (38 vs. 37) All inputs must have the same shape, except at concat_axis. Check failure stack trace: Aborted (core dumped)

how to solve this!

sanghoon commented 7 years ago

Hi @mingde510 Did you set the cfg argument?

mingde510 commented 7 years ago

Thanks@sanghoon add cfg_from_file(cfg_file) it work!

cloudyszz commented 7 years ago

@Ning-Ding Thank you for your kind reply! I have resolved it by your hint.

cloudyszz commented 7 years ago

@mingde510 I have also met the problem the same as yours. Could you tell me which file I should modify detailedly?

sanghoon commented 7 years ago

Hi @cloudyszz Have you added an argument '--cfg models/pvanet/cfgs/submit_0716.yml' or '--cfg models/pvanet/cfgs/submit_1019.yml' ?

theuy commented 7 years ago

I try to add the cfg setting to the demo.py as showing in the picture, it worked. You can try it.@cloudyszz 1483776352 1

chl916185 commented 7 years ago

Hi @theuy can you tell me how to run demo.py? I added the picture code, but i don't know how to use the command to run the demo?thanks