eg4000 / SKU110K_CVPR19

773 stars 183 forks source link

OpenCV error while testing #57

Closed ayushmaan-IIITD closed 4 years ago

ayushmaan-IIITD commented 4 years ago

The training process was successful but while testing, I am encountering the following OpenCV error which I am unable to resolve. I will post the error here. Any help will be appreciated.

The error is as follows:

Traceback (most recent call last): File "predict.py", line 155, in main() File "predict.py", line 150, in main hard_score_rate=hard_score_rate File "/content/drive/My Drive/Colab Notebooks/SKU110K_CVPR19-master/object_detector_retinanet/keras_retinanet/utils/predict_iou.py", line 81, in predict filtered_data = EmMerger.merge_detections(image_name, results) File "/content/drive/My Drive/Colab Notebooks/SKU110K_CVPR19-master/object_detector_retinanet/keras_retinanet/utils/EmMerger.py", line 389, in merge_detections filtered_data = duplicate_merger.filter_duplicate_candidates(result_df, pixel_data) File "/content/drive/My Drive/Colab Notebooks/SKU110K_CVPR19-master/object_detector_retinanet/keras_retinanet/utils/EmMerger.py", line 71, in filter_duplicate_candidates candidates = self.find_new_candidates(contours, heat_map, data, original_detection_centers, image) File "/content/drive/My Drive/Colab Notebooks/SKU110K_CVPR19-master/object_detector_retinanet/keras_retinanet/utils/EmMerger.py", line 116, in find_new_candidates contour_bounding_rect = cv2.boundingRect(contour) cv2.error: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/shapedescr.cpp:743: error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S) in function 'pointSetBoundingRect'

eg4000 commented 4 years ago

Search the error in closed issues. You'll find the solution.