Yolov5: Adding viewable images for each batch

Created on 21 Sep 2020  ·  3Comments  ·  Source: ultralytics/yolov5

I have noticed that at runtime, the first 3 training batches are viewable in runs/expXX/train_batch0.jpg.

It would be useful to see each at each batch what images are used.

Is this something you would be able to add?

Most helpful comment

https://github.com/ultralytics/yolov5/blob/4fce0096fa2f2dc7db12b422200009362de9a056/train.py#L292-L300

Line 292 in train.py allows you to change this, simply remove the if ni < 3:, or change the 3 to a number larger than the total batches in an epoch, and you will generate an image for each batch :)

All 3 comments

Hello @nanometer34688, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

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 model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

https://github.com/ultralytics/yolov5/blob/4fce0096fa2f2dc7db12b422200009362de9a056/train.py#L292-L300

Line 292 in train.py allows you to change this, simply remove the if ni < 3:, or change the 3 to a number larger than the total batches in an epoch, and you will generate an image for each batch :)

Thank you very much! Worked a charm

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amusi picture amusi  ·  25Comments

ChristopherSTAN picture ChristopherSTAN  ·  50Comments

NanoCode012 picture NanoCode012  ·  56Comments

NanoCode012 picture NanoCode012  ·  104Comments

glenn-jocher picture glenn-jocher  ·  124Comments