Closed Darshcg closed 4 years ago
This is too little information. Please provide the full error log (call trace).
You need to specify "--imgs_dir" and "--annotations" to point to the images and annotations of your own evaluation dataset. Note the annotations should be in "COCO" format.
https://github.com/jkjung-avt/tensorrt_demos/blob/master/eval_yolov3.py#L31
Actually I am using your Evaluation dataset(https://github.com/jkjung-avt/tensorrt_demos/blob/master/README_eval_ssd.md#preparation). Please help me what to change in line 31.
Try sudo pip3 install progressbar2
and run "eval_yolov3.py" again, to see if the error is fixed.
Otherwise, you could remove progressbar()
from the code: https://github.com/jkjung-avt/tensorrt_demos/blob/master/eval_yolov3.py#L53. That is,
Replace that line:
for jpg in progressbar(jpgs):
with:
for jpg in jpgs:
@jkjung-avt, 1st didn't work, and I tried with 2nd, but it is taking so much of time to get the output. Is there any way to speed up(to get the output fast)?
The COCO "val2017" contains 5,000 images. It does take a while to do inference over all these images. If you don't want to evaluate the model with so many images, you could just delete some jpg files from the "val2017" folder.
Otherwise, if you are evaluating your own custom trained model, you should prepare your own images/annotations instead of using COCO data.
After I reduce the number of images and run, i get the error as shown below
I don't have a simple solution. As stated earlier, you should prepare your own dataset for evaluation.
Thank you very much @jkjung-avt. But I used your model itself.
The darknet YOLOv3 COCO model was trained by the original author (not me). If you're verifying mAP of that model, then it's advised to use all 5,000 images in "val2017". It might take a few minutes to do inference over all those images.
Even after running Evaluation on 5000 images, then also getting the same error
This is a known issue of pycocotools. It has been fixed in the latest code. Check out this discussion for more information: https://github.com/cocodataset/cocoapi/issues/356
How to resolve the issue? I am using NumPy version:1.18.2
Install the latest "pycocotools".
Or install from GitHub source:
$ sudo pip3 uninstall pycocotools # remove the old installation
$ cd ${HOME}/src
$ git clone https://github.com/cocodataset/cocoapi.git
$ cd cocoapi/PythonAPI
$ sudo python setup.py build_ext install
Thank you very much, Jung. I successfully completed the evaluation. Btw, what's the different between mAP @ IoU=0.5:0.95 and mAP @ IoU=0.5?
Thank you very much for all your help and support.
If I run: "python3 eval_yolov3.py --model yolov3-288" I am getting TypeError: 'module' object is not callable. Can you please help to resolve the same