timy90022 / One-Shot-Object-Detection

Implementation of One-Shot Object Detection with Co-Attention and Co-Excitation in Pytorch
MIT License
423 stars 83 forks source link

Params instance has no attribute 'areaRngLbl' #27

Open yustaub opened 3 years ago

yustaub commented 3 years ago

hello,sir. I folllowed the README to compile the project and download the pretrianed model, when I run command python test_net.py --s 2 --g 2 --a 4 --cuda, there are some errors when evaluating detection result: Loading and preparing results...
DONE (t=2.12s) creating index... index created! Running per image evaluation...
DONE (t=20.02s). Accumulating evaluation results...
DONE (t=2.10s). Traceback (most recent call last): File "test_net.py", line 386, in imdb_vu.evaluate_detections(all_boxes, output_dir_vu) File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 383, in evaluate_detections self._do_detection_eval(res_file, output_dir) File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 323, in _do_detection_eval cocoEval.summarize(class_index=tmp) File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 520, in summarize self.stats = summarize() File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 486, in _summarizeDets stats[0] = _summarize(1) File "/home/joseph/project/One-Shot-Object-Detection/lib/datasets/coco.py", line 454, in _summarize aind = [i for i, aRng in enumerate(p.areaRngLbl) if aRng == areaRng] AttributeError: Params instance has no attribute 'areaRngLbl' can you have any suggestion about this? Very appreciate for your reply!!

mnalli commented 3 years ago

I'm having the same problem. Looks like the code is referring to a different API. Here https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py the class Params seems to have all the parameters required (I had this problem also with other parameters). The code in the link is slightly different from the one found in lib/pycocotools/cocoeval.py. Maybe substituting it will fix the problem. I will try.