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

Issue with training yolov9-c-dseg #627

Open
synthdatagit opened this issue Jan 27, 2025 · 0 comments
Open

Issue with training yolov9-c-dseg #627

synthdatagit opened this issue Jan 27, 2025 · 0 comments

Comments

@synthdatagit
Copy link

I am trying to train the yolov9-c-dseg (models/segment/yolov9-c-dseg.yaml) model, but i get an error during calculation of loss.

I run the training script with the following command:

python segment/train.py --workers 4 --device 0 --batch 8 --data data/data.yaml --img 640 --cfg models/segment/yolov9-c-dseg.yaml --weights '' --name yolov9-c-dseg --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10

and I get the following error:

Traceback (most recent call last):
File "/mnt/data/yolov9/segment/train.py", line 646, in
main(opt)
File "/mnt/data/yolov9/segment/train.py", line 542, in main
train(opt.hyp, opt, device, callbacks)
File "/mnt/data/yolov9/segment/train.py", line 297, in train
loss, loss_items = compute_loss(pred, targets.to(device), masks=masks.to(device).float())
File "/mnt/data/yolov9/utils/segment/loss_tal.py", line 173, in call
batch_size, _, mask_h, mask_w = proto.shape
AttributeError: 'list' object has no attribute 'shape'

I have tried to use fix described in #528 but I think that was related to another issue.

I have also tried training the gelan-c-seg model with the same command:

python segment/train.py --workers 8 --device 0 --batch 16 --data data/data.yaml --img 640 --cfg models/segment/gelan-c-seg.yaml --weights '' --name gelan-c-seg --hyp hyp.scratch-high.yaml --no-overlap --epochs 300 --close-mosaic 10

and this seems to work just fine.

So what is the issue with the yolov9-c-dseg training?

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

1 participant