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

utils/general.py print_mutation variable keys does not correspond to output of seg train/val #9730

Closed
1 of 2 tasks
AdrianStkr opened this issue Oct 7, 2022 · 2 comments · Fixed by #9742 or #11109
Closed
1 of 2 tasks
Labels
bug Something isn't working

Comments

@AdrianStkr
Copy link

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Other

Bug

File ".../yolov5-master/segment/train.py", line 674, in
main(opt)
File ".../yolov5-master/segment/train.py", line 654, in main
print_mutation(results, hyp.copy(), save_dir, opt.bucket)
File ".../yolov5-master/utils/general.py", line 979, in print_mutation
f.write(s + ('%s,' * n % vals).rstrip(',') + '\n')
TypeError: not all arguments converted during string formatting

Environment

  • yolov5 v6.2
  • torchvision 0.13.1
  • torch 1.12.1
  • Python 3.10.6
  • Ubuntu 20.04.4 LTS

Minimal Reproducible Example

python .../segment/train.py --data coco128-seg.yaml --weights '' --cfg yolov5s-seg.yaml --img 640 --evolve --epochs 2 --batch-size 3

Additional

Hi,

variable keys (see below) in print_mutation needs to be updated to correspond to the output of train in .../segment/train.py when --evolve is used.

keys = ('metrics/precision', 'metrics/recall', 'metrics/mAP_0.5', 'metrics/mAP_0.5:0.95', 'val/box_loss',
'val/obj_loss', 'val/cls_loss') + tuple(hyp.keys()) # [results + hyps]

thank you!

cheers,
Adrian

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@AdrianStkr AdrianStkr added the bug Something isn't working label Oct 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2022

👋 Hello @AdrianStkr, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://ultralytics.com or email support@ultralytics.com.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

YOLOv5 CI

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher glenn-jocher linked a pull request Oct 9, 2022 that will close this issue
iker-lluvia added a commit to iker-lluvia/yolov5 that referenced this issue Mar 3, 2023
Correct mutation considering the higher number of segmentation parameters compared to object detection.

Fixes ultralytics#9730

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>
glenn-jocher added a commit that referenced this issue Mar 9, 2023
* Correct mutation adding the missing parameters

Correct mutation considering the higher number of segmentation parameters compared to object detection.

Fixes #9730

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>

* Use already defined segmentation keys from segment/metrics.py

---------

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Smfun12 pushed a commit to Smfun12/yolov5 that referenced this issue Mar 24, 2023
* Correct mutation adding the missing parameters

Correct mutation considering the higher number of segmentation parameters compared to object detection.

Fixes ultralytics#9730

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>

* Use already defined segmentation keys from segment/metrics.py

---------

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
bandakopi pushed a commit to irajcode/yolov5 that referenced this issue Jul 20, 2023
* Correct mutation adding the missing parameters

Correct mutation considering the higher number of segmentation parameters compared to object detection.

Fixes ultralytics#9730

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>

* Use already defined segmentation keys from segment/metrics.py

---------

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher
Copy link
Member

@AdrianStkr hi Adrian 👋,

Thanks for reporting this issue and providing the context! We value your input and I'll make sure to look into updating the variable keys in print_mutation to correspond to the output of train in .../segment/train.py when --evolve is used.

I appreciate your willingness to contribute and will keep you in the loop as we work on resolving this. Your support means a lot to the YOLOv5 community and the Ultralytics team.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants