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

faster and more informative training plots #1114

Merged
merged 4 commits into from
Apr 30, 2020

Conversation

jveitchmichaelis
Copy link
Contributor

@jveitchmichaelis jveitchmichaelis commented Apr 29, 2020

Per the discussion here: #1096

  • plots generated using OpenCV rather than Matplotlib for speed
  • display object confidence and name if available
  • class colours are consistent

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refined image plotting during model testing and training in YOLOv3.

📊 Key Changes

  • 🎨 Removed initial image plotting with bounding boxes during the test phase.
  • ✨ Added separate image plotting for ground truth and predictions after model output processing during testing.
  • 📈 Updated training image plotting to send the image result directly to the TensorBoard writer.
  • 🧠 Created a new utility function output_to_target for converting model output to a target format.
  • 👁️ Overhauled plot_images function to handle image resizing, improved labeling, and plotting enhancements.

🎯 Purpose & Impact

  • 🚀 Enhances the visualization of object detection results by clearly delineating between ground truth and predicted bounding boxes.
  • 🛠️ Simplifies the TensorBoard logging code, making integration smoother and more efficient.
  • 📏 Helps with interpretation of model performance by introducing a consistent target format, aiding both debugging and analytics.
  • 🖼️ Improves the image plotting functionality making it more flexible for various image sizes and richer for analysis with better labeling options.

jveitchmichaelis and others added 4 commits April 29, 2020 15:13
Looks good. Needs pep8 linting, I'll do that in PyCharm later once PR is in.
f for the tb descriptor lets us plot several batches, i.e. to allow us to change L292 to 'if ni < 3' for 3 examples.
@glenn-jocher glenn-jocher merged commit fb1b5e0 into ultralytics:master Apr 30, 2020
@glenn-jocher
Copy link
Member

@jveitchmichaelis thanks a lot for your contribution, I think this will help everyone tremendously!

glenn-jocher added a commit that referenced this pull request Apr 30, 2020
@glenn-jocher
Copy link
Member

@jveitchmichaelis I did a bit of cleanup in 0ffbf55. Most of the cv2 box plotting can be handled by the existing function used in detect.py:

def plot_one_box(x, img, color=None, label=None, line_thickness=None):

glenn-jocher added a commit that referenced this pull request Apr 30, 2020
@glenn-jocher
Copy link
Member

Uploading images here to use urls in README:

train_batch0

train_batch0

@glenn-jocher
Copy link
Member

train_batch2

test_batch0_gt

glenn-jocher added a commit that referenced this pull request Apr 30, 2020
@glenn-jocher
Copy link
Member

test_batch0_gt

This was referenced May 1, 2020
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.

2 participants