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

Add Weights & Biases Logging support #203

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AyushExel
Copy link

@AyushExel AyushExel commented Dec 10, 2020

This PR adds support for debugging models using W&B, only if the library is already found installed. When using W&B, users of YOLOV5 can debug their models easily inside a customizable dashboard by logging & comparing performance metrics, system usage metrics (like GPU memory), and predictions.

Features:

  • Bounding Box Debugging

Debug your bounding box predictions in real-time.
4d482f8f.gif

  • Automatically log and compare the performance of multiple models

ezgif com-resize

  • Supports Resuming

When training is resumed from a previous checkpoint, the metrics and images will continue to be logged in the same W&B dashboard if it exists, otherwise, a new W&B run will be created

  • Adds no dependencies

The library will work as it is supposed to if wandb is not installed and will only log metrics and media files to W&B if it is installed. To enable W&B logging, you just need to install the library using pip install wandb

  • Adds coco128.yaml

By default, the train.py script uses coco128.yaml for training but that file was missing from the data folder.

@antimo22
Copy link

antimo22 commented Oct 4, 2021

Sorry, I want to know if there is the possibility to save the artifacts during the training, in order to resume the training from the last weights stored in wandb.ai.
I ask this because in the Ultralytics YOLOv5, it can be done by specifying the followings flags:
--upload_dataset
--bbox_interval 1
--save_period 1
that are not expected in this version.

I'm working on Colab, so this is feature is really important to save the weights and don't lose the work.

@AyushExel
Copy link
Author

@antimo22 hi. This version doesn't include the artifacts integration. But I can help you with that. Can't you just use yolov5 repo to train a yolov4 model?
I think the author of this repo isn't interested in adding deeper integration.

@antimo22
Copy link

antimo22 commented Oct 4, 2021

Hi @AyushExel, and thanks for your help. I tried to use a YOLOv4 model with the ultralytics implementation, but there are some differences in terms of formats (cfg vs yaml for the config files, and pt vs weights for the weights). Can I just use some consistent files, contained in other repo? Furthermore, I can't find the pt version of the weights file, there is some utility to convert it?

Sorry if I'm clogging up this pull request with my problems.

@AyushExel
Copy link
Author

@antimo22 Sorry, I'm not sure if you can use .pt and .weights files interchangeably. Can't you just use a YOLOv5 model for training on your task? Or are you required to use yolov4 for some reason?

@WongKinYiu
Copy link
Owner

@antimo22 hi. This version doesn't include the artifacts integration. But I can help you with that. Can't you just use yolov5 repo to train a yolov4 model? I think the author of this repo isn't interested in adding deeper integration.

Hello, the current version of wanddb integration is newer than this commit. But due to some annoying reasons, I think it is not suitable to update those functions in my repos. If you want to use new wandb functions in yolov5, you could integrate them with this repo by using loggers in yolov5 repo in 10 minutes.

@AyushExel
Copy link
Author

@WongKinYiu If you're interested, I can build the same integration for this repo.

@antimo22
Copy link

antimo22 commented Oct 5, 2021

@antimo22 Sorry, I'm not sure if you can use .pt and .weights files interchangeably. Can't you just use a YOLOv5 model for training on your task? Or are you required to use yolov4 for some reason?

Yeah I have already used YOLOv5, but now I want to compare the perfomance with other small models. The problem is that, working with Colab, I can't work without the wandb artifacts.

@AyushExel
Copy link
Author

@antimo22 I see. Let me know if there's any way I can help you.

@antimo22
Copy link

@antimo22 I see. Let me know if there's any way I can help you.

I'll try to integrate the new features of wandb in this repo, even though I don't have experience in this stuff. Thank you for your time!

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.

None yet

3 participants