Cannot eval on COCO test-dev on Google Colab
See original GitHub issueI am trying to use YOLACT++ from Google Colab. Inference on images/videos works fine, but I can’t evaluate on COCO test-dev.
I run this command:
python eval.py --trained_model=weights/yolact_plus_resnet50_54_800000.pth --dataset=coco2017_testdev_dataset
And I get:
Traceback (most recent call last):
File "eval.py", line 1105, in <module>
evaluate(net, dataset)
File "eval.py", line 936, in evaluate
img, gt, gt_masks, h, w, num_crowd = dataset.pull_item(image_idx)
File "/content/yolact/data/coco.py", line 172, in pull_item
if target.shape[0] == 0:
AttributeError: 'NoneType' object has no attribute 'shape'
If I change line 172 in coco.py to check if target
is None
I get another error:
Traceback (most recent call last):
File "eval.py", line 1105, in <module>
evaluate(net, dataset)
File "eval.py", line 956, in evaluate
prep_metrics(ap_data, preds, img, gt, gt_masks, h, w, num_crowd, dataset.ids[image_idx], detections)
File "eval.py", line 390, in prep_metrics
gt_boxes = torch.Tensor(gt[:, :4])
TypeError: 'NoneType' object is not subscriptable
I can get past this error by adding the argument --output_coco_json
, but I don’t think it’s the right way to use the script. I think it’s a bug but could also be a Colab related issue (or some error of mine).
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Importing COCO datasets to google colaboratory
It's around 20GB including the train, test and validation datasets. I want to directly import the dataset from cocodasets.org to my Google colab...
Read more >notebook04660a88f4 | Kaggle
We used two tools to annotate the images: labelimg for labeling the classification dataset and coco-annotator for labelling the keypoint dataset. link code....
Read more >Custom object detection in the browser using TensorFlow.js
Train a custom MobileNetV2 using the TensorFlow 2 Object Detection API and Google Colab for object detection, convert the model to ...
Read more >Train An Object Detection Model using Tensorflow on Colab
Google Colab is used for training on a free GPU. ... new pre-trained weights for COCO (a common dataset to test object detection...
Read more >Object detection with YOLO - Medium
... get mAP, average loss statistics in Google Colab and test trained ... For example if to train model on dataset with all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use
--score_threshold=0.05
to reduce the file size. As for the first bug, that’s an oversight on my part. For now you can comment it out. I’ll try to get a fix out today.For me, I add another condition based on the previous one as below: “if target.shape[0] == 0 and self.has_gt:”