WongKinYiu / yolov9

Implementation of paper - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information
GNU General Public License v3.0
8.84k stars 1.38k forks source link

Upload models over to the Hugging Face Hub! 🤗 #45

Closed Vaibhavs10 closed 6 months ago

Vaibhavs10 commented 6 months ago

Hi there,

I'm VB I lead the advocacy efforts for open source at Hugging Face. Congratulations on such a brilliant model. I saw that the model checkpoints are released as part of the GitHub release. It'd be great if you could upload the model checkpoints over the Hugging Face Hub.

Uploading model checkpoints over on Hugging Face Hub comes with a couple of advantages:

  1. It increases the visibility of the model checkpoints on the Hub.
  2. It makes it easier for people to download the different weights.
  3. It makes it surprisingly easy to version control weights as well.

Here's a quick guide explaining how to upload models over on the Hub: https://huggingface.co/docs/hub/en/models-uploading

In addition to this, you can add support for directly loading the model checkpoints via the huggingface_hub library as well: https://huggingface.co/docs/huggingface_hub/v0.16.3/en/guides/download (it's just 2 lines of code).

Do let me or @merveenoyan know if you need any assistance with this.

Cheers, VB

merveenoyan commented 6 months ago

Hello folks 👋

I have uploaded the weights and written a model card here: https://huggingface.co/merve/yolov9 If you have a Hugging Face organization I can transfer this repository to your organization namespace.

Also wanted to let you know that @kadirnar has put up a demo here: https://huggingface.co/spaces/kadirnar/Yolov9

Moreover, we have a Mixin class called PyTorchModelHubMixin which is more of a PyTorch-native way of uploading and downloading models: https://huggingface.co/docs/huggingface_hub/en/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin if you'd like that, I can open a PR.

VellalaVineethKumar commented 6 months ago

Here is a Python file to run the code on your webcam from a single Python file given you have downloaded the the required libraries, weights, and coco.yaml file. https://file.io/vXaO7OAJcS85

WongKinYiu commented 6 months ago

Updated to readme.