Training Mask R-CNN on MS COCO (single class): urllib error

The dataset interface runs problem-free for a couple of epochs, then outputs this error:

urllib.error.HTTPError: HTTP Error 503: Service Unavailable

when running the line with scikit-image method for opening a URL:

im = np.array(io.imread(self.img_data[idx][‘coco_url’]))

I’m training a single class (‘toothbrush’), and the model has 2 labels, background+class. Toothbrush has label 80, so I change 80 to 1 when training. None of the errors I could relate to are reported, just this one.

EDIT: another error that pops up (same method):

ConnectionResetError: [Errno 104] Connection reset by peer

I think it is possible that the server that the URLs are pointing have a quota or is overloaded, such that your request gets an HTTP Error 503.

Is it possible for you to download the data in advance and load them from disk?

Yeah, that’s right. After a bit of investigation I discovered that I used this solution a year ago!