AarohiSingla / Mask-R-CNN-on-Custom-Dataset

27 stars 20 forks source link

FileNotFoundError: No such file: '/content/Mask_RCNN/dataset/val/download.jpg' #6

Open gaurav1030332018 opened 3 years ago

gaurav1030332018 commented 3 years ago

I am trying it on google colab but I am getting this kind of error

objects: ['laptop', 'tab', 'phone'] numids [1, 2, 3] objects: ['laptop', 'tab', 'phone'] numids [1, 2, 3] objects: ['laptop', 'tab', 'phone'] numids [1, 2, 3] objects: ['laptop', 'tab', 'phone'] numids [1, 2, 3] objects: ['tab', 'phone', 'laptop'] numids [2, 3, 1] objects: ['laptop', 'phone', 'tab'] numids [1, 3, 2] objects: ['laptop', 'tab', 'phone'] numids [1, 2, 3]

FileNotFoundError Traceback (most recent call last)

in () 12 "mrcnn_bbox", "mrcnn_mask"]) 13 ---> 14 train(model) 8 frames /usr/local/lib/python3.7/dist-packages/imageio/core/request.py in _parse_uri(self, uri) 271 # Reading: check that the file exists (but is allowed a dir) 272 if not os.path.exists(fn): --> 273 raise FileNotFoundError("No such file: '%s'" % fn) 274 else: 275 # Writing: check that the directory to write to does exist FileNotFoundError: No such file: '/content/Mask_RCNN/dataset/val/download.jpg'
ridvanozdemir commented 2 years ago

create a path for val_json file separetly, i will give you an example

    if subset == "train":
        annotations1 = json.load(open('D:\\mask_r_cnn\\Dataset\\train\\data_json.json'))
    elif subset == "val":
        annotations1 = json.load(open('D:\\mask_r_cnn\\Dataset\\val\\data_json.json'))