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

Fix some bug in detect.py #42

Closed
wants to merge 3 commits into from
Closed

Conversation

YMCAlan
Copy link

@YMCAlan YMCAlan commented Feb 23, 2024

  • modify the parameter attempt_download of the function.
  • modify non_max_suppression function.

But I don't know the actual output of the model, so this modify is just a temporary.

@lsutardja
Copy link

lsutardja commented Feb 24, 2024

yolov9/val_dual.py

Lines 190 to 199 in 33fc75e

with dt[1]:
preds, train_out = model(im) if compute_loss else (model(im, augment=augment), None)
# Loss
if compute_loss:
preds = preds[1]
#train_out = train_out[1]
#loss += compute_loss(train_out, targets)[1] # box, obj, cls
else:
preds = preds[0][1]

Here is the validation script. The correct change to NMS should be prediction = prediction[0][1].

Also see #51 (comment)

@cobaner3
Copy link

good bro

@YMCAlan
Copy link
Author

YMCAlan commented Feb 26, 2024

Thank you for your response, I have modify the code, and provide the dual flag for detect.py.
I consider the pt file should provide the some attribute for us to check the model type.
@lsutardja @cobaner3

@YMCAlan YMCAlan closed this Mar 3, 2024
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

Successfully merging this pull request may close these issues.

3 participants