yolov5
yolov5 copied to clipboard
Yolov5 with attention model
Search before asking
- [X] I have searched the YOLOv5 issues and found no similar feature requests.
Description
I have not found any repo or implementation about transformer and yolov5. Can anyone suggest me the repo and trained weights if any. Most of the information I found were partial not a running or complete repo. Thanks
Use case
No response
Additional
No response
Are you willing to submit a PR?
- [ ] Yes I'd like to help by submitting a PR!
👋 Hello @ratom, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.
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 training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
For business inquiries or professional support requests please visit https://ultralytics.com or email [email protected].
Requirements
Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install
Environments
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
-
Google Colab and Kaggle notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
-
Docker Image. See Docker Quickstart Guide
Status
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on macOS, Windows, and Ubuntu every 24 hours and on every commit.
@ratom we have a YOLOv5 transformer model here you can use. It's not very popular because the CUDA requirements and training time are super high compared to the baseline models. You can train with i.e.
python train.py --weights yolov5s.pt --cfg yolov5s-transformer.yaml
For details see: https://github.com/ultralytics/yolov5/blob/master/models/hub/yolov5s-transformer.yaml
I have tested various versions of transformer/attention modules for yolov5. Some did raise a bit of metrics performance in certain types of dataset, but none of them justified the inevitable additional computation and vram cost.
I don't think vision transformers are the next thing to go for. I'd look more forward to ConvNeXt.
@Zephyr69 yes this is the impression I have currently also. I think a big part of the excitement originated from NLP but the transfer of benefits to vision is less clear to me.
While there is always a market for the absolute best accuracy, in the real world the product with the most positive impact will be the one with the best balance in terms of speed/size/performance.
I think Elon Musk mentioned something similar regarding range in electric vehicles, longest isn't necessarily best when all factors are considered.
Is there a model for yolov5s-transform ?
@konioy https://github.com/ultralytics/yolov5/blob/master/models/hub/yolov5s-transformer.yaml
what is the architecture of transformer with yolov5. is this used in backbone in topup with existing backbone or replacing with transformer, or in detection head. Can you make a bit clear.
@ratom you can just do a diff between yolov5s-transformer.yaml above and yolov5s.yaml
Is there a pretrained model for yolov5s-transformer?
@konioy no, sorry. You can train one on COCO yourself though:
python train.py --weights yolov5s.pt --cfg yolov5s-transformer.yaml --data coco.yaml
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Access additional YOLOv5 🚀 resources:
- Wiki – https://github.com/ultralytics/yolov5/wiki
- Tutorials – https://docs.ultralytics.com/yolov5
- Docs – https://docs.ultralytics.com
Access additional Ultralytics ⚡ resources:
- Ultralytics HUB – https://ultralytics.com/hub
- Vision API – https://ultralytics.com/yolov5
- About Us – https://ultralytics.com/about
- Join Our Team – https://ultralytics.com/work
- Contact Us – https://ultralytics.com/contact
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!