mahyarnajibi / SNIPER

SNIPER / AutoFocus is an efficient multi-scale object detection training / inference algorithm
Other
2.69k stars 450 forks source link

inferences: value error #191

Open sajjadafridi opened 3 years ago

sajjadafridi commented 3 years ago

Greeting,

When running main_test for current_job = 1, I got the following output

Tester: 98/105, Detection: 0.2296s, Post Processing: 0.0002099s
Tester: 100/105, Detection: 0.2296s, Post Processing: 0.0002097s
Tester: 102/105, Detection: 0.2296s, Post Processing: 0.0002095s
Tester: 104/105, Detection: 0.2296s, Post Processing: 0.0002095s
Tester: 105/105, Detection: 0.2296s, Post Processing: 0.0002097s
Traceback (most recent call last):
  File "/pychacmprojects/SNIPER/main_test.py", line 63, in <module>
    main()
  File "/pychacmprojects/SNIPER/main_test.py", line 60, in main
    imdb_detection_wrapper(sym_inst, config, imdb, roidb, context, arg_params, aux_params, False)
  File "/pychacmprojects/SNIPER/lib/inference.py", line 532, in imdb_detection_wrapper
    all_boxes = tester.aggregate(detections, vis=vis, cache_name='dets_final')
  File "/pychacmprojects/SNIPER/lib/inference.py", line 186, in aggregate
    agg_dets = np.vstack((agg_dets, cls_dets))
  File "/pychacmprojects/SNIPER/venv1/lib/python2.7/site-packages/numpy/core/shape_base.py", line 283, in vstack
    return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
ValueError: all the input arrays must have same number of dimensions
Aggregating detections from multiple scales and applying NMS...

Process finished with exit code 1


I try to debug line 188 in inferences.py 

 agg_dets = np.vstack((agg_dets, cls_dets))

The shape of the cls_dets is always (0,5) while agg_dets is different and does not match.

Is there something that should be changed to make the code work?

Fenanxhyy commented 3 years ago

have you downloaded the pre-trained model successfully with .sh file? I tried several times,but always failed. Can you share the models, thanks for any help!