IndexError while evaluate on COCO
See original GitHub issueWhen I run ssd300_evaluation_COCO.ipynb, an IndexError came out. I just modified the path and nothing more.
IndexError Traceback (most recent call last)
<ipython-input-11-2145451281d3> in <module>()
11 iou_threshold=0.45,
12 top_k=200,
---> 13 normalize_coords=True)
~/ssd_keras/eval_utils/coco_utils.py in predict_all_to_json(out_file, model, img_height, img_width, classes_to_cats, data_generator, batch_size, data_generator_mode, model_mode, confidence_thresh, iou_threshold, top_k, pred_coords, normalize_coords)
151 for i in tr:
152 # Generate batch.
--> 153 batch_X, batch_image_ids, batch_inverse_transforms = next(generator)
154 # Predict.
155 y_pred = model.predict(batch_X)
~/ssd_keras/data_generator/object_detection_2d_data_generator.py in generate(self, batch_size, shuffle, transformations, label_encoder, returns, keep_images_without_gt, degenerate_box_handling)
743
744 # Check for degenerate ground truth bounding boxes before attempting any computations.
--> 745 if np.any(batch_y[i][:,xmax] - batch_y[i][:,xmin] <= 0) or np.any(batch_y[i][:,ymax] - batch_y[i][:,ymin] <= 0):
746 if degenerate_box_handling == 'warn':
747 warnings.warn("Detected degenerate ground truth bounding boxes for batch item {} with bounding boxes {}, ".format(i, batch_y[i]) +
IndexError: list index out of range
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Index Error in Evaluation on COCO test set · Issue #100 · ruotianluo ...
Hi Ruotian, I tried to run the evaluation on COCO test set and encountered the following problem: python tools/eval.py --input_json cocotest.json ...
Read more >COCO Keypoint Challenge Forum - CodaLab
I zip sucessfully uploaded and finishing evaluation. two things i changed. 1. problem at image ids. i saved them as string.(it's my bad)...
Read more >Index out of range error while training dataset - Stack Overflow
Error is telling every thing you are trying to access an index from list self.masks which does not exist issue is in this...
Read more >How to Train an Object Detection Model with Keras
How to use transfer learning to train an object detection model on a new dataset. How to evaluate a fit Mask R-CNN model...
Read more >List Index Out of Range – Python Error Message Solved
In this article you'll see a few of the reasons that cause the list index out of range Python error. Besides knowing why...
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
For inference we don’t want the uncertain predictions, but for the evaluation we do.
In order to reach high recall values in the computation of the precision-recall-curve you need predictions at various confidence levels well below 0.5.
Thank you for reporting this, that’s indeed a bug. The generator tries to check for degenerate ground truth boxes even though there are no ground truth boxes.
I will push a fix later today. In the meantime you could fix this locally by adding the line
if not (self.labels is None):
just before the code block that checks for degenerate boxes.