Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanmaypandey7/wheat-detection
Detecting wheat heads using YOLOv5
https://github.com/tanmaypandey7/wheat-detection
flask kaggle-competition wheat-detection yolov5
Last synced: 12 days ago
JSON representation
Detecting wheat heads using YOLOv5
- Host: GitHub
- URL: https://github.com/tanmaypandey7/wheat-detection
- Owner: tanmaypandey7
- License: gpl-3.0
- Created: 2020-08-08T19:16:16.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T07:52:16.000Z (over 2 years ago)
- Last Synced: 2024-02-29T10:34:06.026Z (4 months ago)
- Topics: flask, kaggle-competition, wheat-detection, yolov5
- Language: Python
- Homepage: https://colab.research.google.com/drive/1bZe1CDa4g7wnOUZFO9ZUmw15T2I6Po0w?usp=sharing
- Size: 2.69 MB
- Stars: 11
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-yolo-object-detection - tanmaypandey7/wheat-detection - detection?style=social"/> : Detecting wheat heads using YOLOv5. (Applications)
README
# Wheat Detection
Detecting wheat heads using YOLOv5
- [Web App demo](#Web-app-demo)
- [Brief overview of the competition images](#Brief-overview-of-the-competition-images)
- [Modifications](#Modifications)
- [Training](#Training)
- [Inference and Deployment](#Inference-and-Deployment)## Web App Demo
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1bZe1CDa4g7wnOUZFO9ZUmw15T2I6Po0w?usp=sharing)[![https://imgur.com/a/Ap2kaeX](http://img.youtube.com/vi/JrL8nsV53tc/0.jpg)](http://www.youtube.com/watch?v=JrL8nsV53tc "Wheat App")
## Brief overview of the competition images
Wheat heads were from various sources:
A few labeled images are as shown: (Blue bounding boxes)
## Pre-trained models
Models can be downloaded from here. (Use last_yolov5x_4M50fold0.pt for best results)## Modifications
The YOLOv5 notebook internally does some augmentations while preparing a Dataset.
Originally, this Dataset consists of only Mosaic images.**Mosaic** - https://arxiv.org/pdf/2004.12432.pdf
4 images are cropped and stitched together
Here, I modified the repo to add Mixup.**Mixup** - https://arxiv.org/pdf/1710.09412.pdf
2 images are mixed together
I modified the code(especifically utils.datasets) so it had a 50-50 chance of creating a mixup or a mosaic image. This was very helpful for us as it boosted our public score from 0.77->0.7769.These developments were made before we found out that YOLOv5 was non-compliant and had to switch to EfficientDet for our final 2 submissions.
Kaggle later updated the leaderboard with the final 2 submissions and we ended up at 113th Private(Top 6%).## Training
We trained the model for 50 epochs on Colab Pro.## Inference and Deployment
Our best model is currently being used for inference in this web-app. I uses HTML and CSS as front-end and Flask as the backend.
This web-app is served on Google Colab but can be easily deployed on AWS or GCP as well.