-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom MaskRCNN error #143
Comments
Hi @kavi0786, I managed to isolate what's causing this issue and it turns out to be a series of problems. **Issue 1: Data **
The code below will resolve these data issues: import json
import os
from tqdm import tqdm
DATA_DIR = "Datasets/Nature"
for _dir in os.listdir(f"{DATA_DIR}"):
DATA_SET = f"{DATA_DIR}/{_dir}"
for file in tqdm(os.listdir(DATA_SET)):
if file.endswith(".json"):
with open(os.path.join(DATA_SET, file), 'r') as f:
data = json.load(f)
data['imagePath'] = data['imagePath'].replace(
'..\\', '').replace("images\\", "")
with open(os.path.join(DATA_SET, file), 'w') as f:
json.dump(data, f) Issue 2: Compatibility with However, solving these data issues actually raises new problems. See the below for the before and after of how to fix *Issue 3: A quick fix is a bit hacky, but it works logically! ** SUCCESS! ** I got it working by following the above step. I'll create a PR and you can checkout to branch and use this fix while the PR is in review and hopefully gets some improvements. |
I am having the same issues while loading a custom dataset. 1 frames IsADirectoryError: [Errno 21] Is a directory: '/content/drive/MyDrive/cassava/train.json'` that's the error message |
I tried the solution you proposed but got a keyError: imagePath |
Looking at your error, you're missing the fix in Issue 2: Compatibility with |
Hi @mabu-dev and thanks for your efforts; checking out your git repo and its branch of Any chance for also fixing the custom training?
|
Hi @kurattila, I'm glad you found the hacky fix useful. Can you describe what you're trying to do with custom training so I can reproduce the error? I'm happy to look into it. |
Sure @mabu-dev, I simply follow the steps in the tutorial for custom training, but the code seems to have an issue. Running this training code:
Gives this output on Google Colab:
Later I plan to use my own labeled images for custom segmentation, but so far this seems to be a blocking issue even for training the sample |
I've found that this value error in scikit-image is only a warning in version 0.18.3 and is a value error in 0.19. I don't have a solution for the bool error as input but downgrading to 0.18.3 at least allows you to train a custom dataset.
|
Madam,
while i am executing the custom instance segmentation- MaskRCNN in googlecolab, i am getting the error. please see and let me know where i can modify....i am waiting for your reply..thanks in advance.
Kavitha
The text was updated successfully, but these errors were encountered: