hustvl / YOLOS

[NeurIPS 2021] You Only Look at One Sequence
https://arxiv.org/abs/2106.00666
MIT License
817 stars 119 forks source link

Adding YOLOS to HuggingFace Transformers #24

Open NielsRogge opened 2 years ago

NielsRogge commented 2 years ago

Hi YOLOS team :)

I've implemented YOLOS as a fork of 🤗 HuggingFace Transformers, and I'm going to add it soon to the library (see https://github.com/huggingface/transformers/pull/16848). Here's a notebook that illustrates inference with it: https://colab.research.google.com/drive/18ti9HrRoVE6d0vGBtnaeq93Tau3EYqOK?usp=sharing

The reason I'm adding YOLOS is because I really like the simplicity of it, compared to very complex frameworks such as Faster R-CNN and Mask R-CNN. I've added DETR previously also because it simplifies the task of object detection a lot.

As you may or may not know, any model on the HuggingFace hub has its own Github repository. E.g. the YOLOS-small checkpoint can be found here: https://huggingface.co/nielsr/yolos-s. If you check the "files and versions" tab, it includes the weights. The model hub uses git-LFS (large file storage) to use Git with large files such as model weights. This means that any model has its own Git commit history!

A model card can also be added to the repo, which is just a README.

Are you interested in creating an organization on the hub, such that we can store all model checkpoints there (rather than under my user name)?

Let me know!

Kind regards,

Niels ML Engineer @ HuggingFace

Yuxin-CV commented 2 years ago

Hi @NielsRogge, thanks for your and your team's interest in our work!

We are very glad to create an organization on the hub.

xinggangw commented 2 years ago

huggingface/transformers#16848

Hey Niels,

Thank you so much for implementing YOLOS in HuggingFace Transformer.

I am the university professor/supervisor of github/hustvl. As you can see, in our group, we have many many awesome transformer-based computer vision methods, such as YOLOS, MIMDet, TeViT, and TopFormer. Besides, we have other SoTA vision methods, such as QueryInst, ByteTrack, SparseInst, and FairMOT.

We would like to create an organization on HuggingFace. The name of the organization could be "hustvl". Definitely, HuggingFace and hustvl will have a win-win cooperation.

Thanks a lot! Xinggang

NielsRogge commented 2 years ago

Awesome :) feel free to create an organization on hf.co. I can then put all YOLOS checkpoints there, such that people will be able to do (for instance):

from transformers import YolosForObjectDetection

model = YolosForObjectDetection.from_pretrained("hustvl/yolos-s")

It seems that you have many exciting models! We can definitely add more in the future.

xinggangw commented 2 years ago

Awesome :) feel free to create an organization on hf.co. I can then put all YOLOS checkpoints there, such that people will be able to do (for instance):

from transformers import YolosForObjectDetection

model = YolosForObjectDetection.from_pretrained("hustvl/yolos-s")

It seems that you have many exciting models! We can definitely add more in the future.

@NielsRogge Done. The org URL is https://huggingface.co/hustvl. Thanks a lot.

NielsRogge commented 2 years ago

🥳 YOLOS is now available in HuggingFace Transformers: https://huggingface.co/docs/transformers/main/en/model_doc/yolos

All checkpoints can be found on the hub: https://huggingface.co/models?other=yolos. They come with inference widgets, meaning you can directly try out all YOLOS checkpoints in the browser on images that you upload (or click one of the "examples")

Yuxin-CV commented 2 years ago

🥳 YOLOS is now available in HuggingFace Transformers: https://huggingface.co/docs/transformers/main/en/model_doc/yolos

All checkpoints can be found on the hub: https://huggingface.co/models?other=yolos. They come with inference widgets, meaning you can directly try out all YOLOS checkpoints in the browser on images that you upload (or click one of the "examples")

Thank you for your great efforts! @NielsRogge