Epoch 1/30
E0701 12:48:29.641799 12024 model.py:1810] Error processing image {'id': 'D1DF8BDF-8223-4788-9C47-6720714FD9F2-2.png', 'source': 'receipt', 'path': './data/train\\D1DF8BDF-8223-4788-9C47-6720714FD9F2-2.png', 'width': 2448, 'height': 3264, 'polygons': [{'name': 'polygon', 'all_points_x': [3, 292, 644, 915, 2022, 2277, 2474, 2712, 3115, 3255, 3255, 2752, 2583, 2340, 2068, 1739, 1262, 818, 515, 223, 6], 'all_points_y': [300, 286, 292, 315, 320, 323, 332, 329, 346, 349, 2314, 2314, 2320, 2343, 2349, 2340, 2337, 2340, 2349, 2340, 2323]}]}
Traceback (most recent call last):
File "C:\Users\ldilling\Documents\Mask_RCNN\mrcnn\model.py", line 1709, in data_generator
use_mini_mask=config.USE_MINI_MASK)
File "C:\Users\ldilling\Documents\Mask_RCNN\mrcnn\model.py", line 1212, in load_image_gt
mask, class_ids = dataset.load_mask(image_id)
File "receipt.py", line 166, in load_mask
mask[rr, cc, i] = 1
IndexError: index 2633 is out of bounds for axis 1 with size 2448
I'm using the same region selection program used in the "balloons" tutorial. The region takes up a large proportion of the frame

This happens for a lot of files in the dataset. Why is this happening?
the part that is the most confusing is the presence of the value 2633, which is going out of bounds of some list or something with a size of 2448. Now, per the stdout, the width of the image is 2448, yet there is no point value 2633 which is present in the the list of (x,y) points.
Also fails on the balloon sample
I had the same problem and solved it by using skimage.io.imread(image_path, plugin='pil') in the load function of the dataset and also in the load_image function. The problem is that a width of 2448 and a height of 3264 get stored for your image, but the annotations are for a width of 3264 and a height of 2448.
Different plugins load the image differently depending on the EXIF tags. If it doesn't work with plugin='pil' try it with a different one: https://scikit-image.org/docs/dev/api/skimage.io.html.
if this is a real issue, can we have a it fixed, otherwise I'll close. I haven't done this before thanks
Did that fix it? I wouldn't think it's an issue, that is the reason why you have to provide your own load image function, because labeling tools can be different. But a comment in the code might be nice for other people that encounter the problem.
Did that fix it? I wouldn't think it's an issue, that is the reason why you have to provide your own
load imagefunction, because labeling tools can be different. But a comment in the code might be nice for other people that encounter the problem.
I agree. It did fix my problem, and I guess this is more of a user-configuration problem, so I suppose everything is working as expected on the mask_rcnn side. So do we close it or wait until somebody makes a comment in the code?
I think it is worth doing a pull request that adds comments. If the author doesn't want it they can still rejected it, but it would safe time for others with the same problem. I will do it when I have time, or you could do it too, just reference this issue.
Most helpful comment
I had the same problem and solved it by using
skimage.io.imread(image_path, plugin='pil')in the load function of the dataset and also in theload_imagefunction. The problem is that a width of 2448 and a height of 3264 get stored for your image, but the annotations are for a width of 3264 and a height of 2448.Different plugins load the image differently depending on the EXIF tags. If it doesn't work with plugin='pil' try it with a different one: https://scikit-image.org/docs/dev/api/skimage.io.html.