matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.59k stars 11.69k forks source link

Error while training with own dataset #1864

Open NarendraBabuVL opened 4 years ago

NarendraBabuVL commented 4 years ago

I am training with my own dataset of multiple classes annotated on VGG editor and encountered with the below error. Please help me if anyone know.

Epoch 1/30 ERROR:root:Error processing image {'id': 'IMG_20191112_104147.jpg', 'source': 'traffic', 'path': '../../datasets/traffic/val/IMG_20191112_104147.jpg', 'width': 4000, 'height': 3000, 'polygons': [{'name': 'polygon', 'all_points_x': [1024, 1019, 1714, 1689, 1575, 1472, 1189, 1081, 911, 1024], 'all_points_y': [2636, 2646, 2456, 2090, 2008, 1822, 1956, 2106, 2564, 2636]}, {'name': 'polygon', 'all_points_x': [2734, 3017, 3161, 3135, 3027, 2785, 2692, 2764, 2734], 'all_points_y': [2095, 2121, 2075, 1915, 1833, 1838, 1987, 2100, 2095]}, {'name': 'polygon', 'all_points_x': [2270, 2394, 2394, 2270, 2250, 2270], 'all_points_y': [1997, 1997, 1874, 1869, 1956, 1997]}], 'class_ids': [4, 3, 4]} Traceback (most recent call last): File "/content/drive/My Drive/Colab Notebooks/mj_pro_mid/mrcnn/model.py", line 1705, in data_generator use_mini_mask=config.USE_MINI_MASK) File "/content/drive/My Drive/Colab Notebooks/mj_pro_mid/mrcnn/model.py", line 1261, in load_image_gt class_ids = class_ids[_idx] TypeError: only integer scalar arrays can be converted to a scalar index ERROR:root:Error processing image {'id': 'IMG_20191112_104159.jpg', 'source': 'traffic', 'path': '../../datasets/traffic/train/IMG_20191112_104159.jpg'

basirsedighi commented 4 years ago

I don't know what your resolution on your picture is, assuming it not too high mgpixel, i think your points are outside of the picture. I trained with my own dataset and it worked