IsADirectoryError when loading dataset
See original GitHub issueHi, I’m currently trying to follow this tutorial: https://towardsdatascience.com/custom-instance-segmentation-training-with-7-lines-of-code-ff340851e99b The problem comes when I try to load de dataset in this line of code:
vis_img.load_dataset("Nature")
I get the following error:
IsADirectoryError: [Errno 21] Is a directory: ‘/content/drive/MyDrive/Test_2/Nature/train.json’
I tried making my own dataset with labelme and the error persists. I’m currently running this on a google colab machine with a conda enviroment running. I did some research and it seems this error comes from trying to pass a directory when python expects a file, but I don’t understand what I should do differently, I’m literally copying code from a tutorial. Maybe I should try with older versions of the same libraries? Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9
Top Related StackOverflow Question
Reading other threads it seemed that this problem is caused by an update in the labelme2coco library. So this problem can be fixed by using older libraries.
I copied this code from another issue and it solved it for me:
EDIT: This worked for me on google colab.
I am experiencing this issue myself too and, I would rather not downgrade the version of the libraries. Is this issue being troubleshooted? The issue seems to be pretty much understood. The new labelme2coco is generating a dataset.json file inside a subfolder that on previous version, that same folder name used to be the json file itself. Seems a few lines of code need to be added in PixelLib to set the labelme2coco destination path for the json file. Any date when this issue will be fixed? I will really appreciate! 😃