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

Validate best.pt on train end #4889

Merged
merged 7 commits into from
Sep 26, 2021
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 22, 2021

Implements a final validation run (with plots) on best.pt after training completes. Resolves issues raised in #4858.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Simplification of validation logic and cleanup in training end routines.

📊 Key Changes

  • Removed verbosity and JSON saving conditions tied to the COCO dataset and final epoch in train.py.
  • Validation now always runs without plots unless the best model is being validated.
  • Consolidated the optimizer stripping code for the last and best model files.
  • In 'val.py', streamlined conditional model precision setting with a single line.

🎯 Purpose & Impact

  • The update aims to reduce complexity within the training code by eliminating conditional statements related to verbose flags and JSON outputs.
  • This change may lead to a slight performance improvement and better understandability of the code for developers.
  • For users, these changes ensure a more consistent behavior at the end of training, regardless of dataset and epoch count.
  • Streamlining the precision setting in val.py impacts how the model is run during validation, potentially affecting the speed and resource usage for this step.

@glenn-jocher glenn-jocher self-assigned this Sep 26, 2021
@glenn-jocher glenn-jocher merged commit d856c48 into master Sep 26, 2021
@glenn-jocher glenn-jocher deleted the update/val_plots_on_best.pt branch September 26, 2021 18:54
@glenn-jocher glenn-jocher changed the title Validate best.pt on train end Validate best.pt on train end Sep 26, 2021
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
* Validate best.pt on train end

* 0.7 iou for COCO only

* pass callbacks

* active model.float() if not half

* print Validating best.pt...

* add newline
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Validate best.pt on train end

* 0.7 iou for COCO only

* pass callbacks

* active model.float() if not half

* print Validating best.pt...

* add newline
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.

Logged results represent the last, not the best epoch
1 participant