unsky / FPN

Feature Pyramid Networks for Object Detection
524 stars 263 forks source link

label and rois->num() not equal. #4

Closed Aveirof7 closed 6 years ago

Aveirof7 commented 7 years ago

I1103 18:47:46.824345 300 layer_factory.hpp:77] Creating layer loss_cls F1103 18:47:46.824635 300 loss_layer.cpp:19] Check failed: bottom[0]->num() == bottom[1]->num() (4 vs. 1) The data and label should have the same number.

In your train.prototxt, after roi-data layer, you concat(axis=0) 4 roi_pool, then the num is 4, but the label num is 1, how to solve it? I run it on my caffe, with your whole rpn files. THANKS!!

Aveirof7 commented 7 years ago

@unsky

unsky commented 7 years ago

@Aveirof7 i have revised the source of caffe, you must compile the FPN-CAFFE

Aveirof7 commented 7 years ago

@unsky ok..but i canot compile it,the error is 'undefined sumbol:PyFPE_jbuf' i creat it an conda env to compile it, but i cant solve the problem. so, do you konw how to fix it? and if not, can I concat 4labels,and make it num equal? THANKS!

unsky commented 7 years ago

@Aveirof7 use cmake

mkdir build cd build cmake .. make -j16 all

Aveirof7 commented 7 years ago

@unsky I just used cmake, it compiled completed but the error still exit,

FPN-caffe/tools/../lib/pycocotools/_mask.so: undefined symbol: PyFPE_jbuf

unsky commented 7 years ago

what your mean? the files lib/pycocotools/ lib is not contain caffe, they are the dependent of the boxes program,

  1. compile FPN-CAFFE
  2. compile lib if you have the error in 2. delete all *.so files in the lib files and recompile it
Aveirof7 commented 7 years ago

@unsky I fixed it, THX!!! and it runs, using about 11G memery, with min_size800,max1000,a little too big

Aveirof7 commented 7 years ago

@unsky I used your compiled caffe to replace my caffe, then it runs. but it has some warning, RuntimeWarning: overflow encountered in multiply Does it matter? and it trains so slow

unsky commented 7 years ago

@Aveirof7 the reason of RuntimeWarning is occurred in the early stage because of the random state of the network , in generally it will disapper in two iter..

unsky commented 7 years ago

@Aveirof7 about the speed, there have many param you can have a try,like : batch size, image_size etc..

Aveirof7 commented 7 years ago

@unsky THX! I'll try it tomorrow thank you!