Skip to content
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

Bug while trying to train instance segmentation model on custom dataset #1072

Closed
achbogga opened this issue Nov 9, 2022 · 3 comments
Closed

Comments

@achbogga
Copy link

achbogga commented Nov 9, 2022

yolov7-mask/utils/loss.py", line 516, in build_targets
    gain[2:6] = torch.tensor(p[i].shape)[[3, 2, 3, 2]]  # xyxy gain
KeyError: 0

I have converted my coco format polygons to yolo format as explained here

I am using the mask branch from the repo. I tried to train and I am getting this error. Please help.

@achbogga
Copy link
Author

achbogga commented Nov 9, 2022

@WongKinYiu Please take a look.

@WongKinYiu
Copy link
Owner

For training instance segmentation please use https://github.com/WongKinYiu/yolov7/tree/u7/seg.
You could take a look of https://github.com/RizwanMunawar/yolov7-segmentation for training custom dataset.

@achbogga
Copy link
Author

achbogga commented Nov 9, 2022

Thanks for the update.

@achbogga achbogga closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants