Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Params instance has no attribute 'areaRngLbl' #27

Open
yustaub opened this issue Jan 28, 2021 · 1 comment
Open

Params instance has no attribute 'areaRngLbl' #27

yustaub opened this issue Jan 28, 2021 · 1 comment

Comments

@yustaub
Copy link

yustaub commented Jan 28, 2021

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
Copy link

mnalli commented Apr 14, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants