Mask_RCNN icon indicating copy to clipboard operation
Mask_RCNN copied to clipboard

IndexError

Open Ashish-Jr opened this issue 6 years ago • 3 comments

I trained my own model by annotating with VIA tool, but was getting this error: IndexError: index 1000 is out of bounds for axis 1 with size 1000 Is there any solution for this?

Ashish-Jr avatar May 02 '19 07:05 Ashish-Jr

I'm getting something similar after annotating with VIA tool using the circle and making minor changes to the DataSet code.

Epoch 1/1
ERROR:root:Error processing image {'id': 'frame177.jpg', 'source': 'tennisball', 'path': '/content/drive/My Drive/matterport-balltracker/sample2/train/frame177.jpg', 'width': 640, 'height': 360, 'circles': [{'name': 'circle', 'cx': 368, 'cy': 103, 'r': 10}]}
Traceback (most recent call last):
  File "/content/drive/My Drive/matterport-balltracker/mrcnn/model.py", line 1709, in data_generator
    use_mini_mask=config.USE_MINI_MASK)
  File "/content/drive/My Drive/matterport-balltracker/mrcnn/model.py", line 1212, in load_image_gt
    mask, class_ids = dataset.load_mask(image_id)
  File "/content/drive/My Drive/matterport-balltracker/balloon.py", line 193, in load_mask
    mask[rr, cc, i] = 1
IndexError: index 360 is out of bounds for axis 0 with size 360
ERROR:root:Error processing image {'id': 'frame177.jpg', 'source': 'tennisball', 'path': '/content/drive/My Drive/matterport-balltracker/sample2/train/frame177.jpg', 'width': 640, 'height': 360, 'circles': [{'name': 'circle', 'cx': 368, 'cy': 103, 'r': 10}]}
Traceback (most recent call last):
  File "/content/drive/My Drive/matterport-balltracker/mrcnn/model.py", line 1709, in data_generator
    use_mini_mask=config.USE_MINI_MASK)
  File "/content/drive/My Drive/matterport-balltracker/mrcnn/model.py", line 1212, in load_image_gt
    mask, class_ids = dataset.load_mask(image_id)
  File "/content/drive/My Drive/matterport-balltracker/balloon.py", line 193, in load_mask
    mask[rr, cc, i] = 1
IndexError: index 360 is out of bounds for axis 0 with size 360

@Anish-Jr did you find a solution?

nyck33 avatar Jun 03 '19 19:06 nyck33

Solution here: https://github.com/matterport/Mask_RCNN/issues/636

Closes: #1480

nyck33 avatar Jun 03 '19 19:06 nyck33

Did anyone solve this issue

Sarathchandra-Janapati avatar Jan 30 '24 06:01 Sarathchandra-Janapati