{"id":13644950,"url":"https://github.com/tanmaypandey7/wheat-detection","last_synced_at":"2025-04-21T11:32:15.663Z","repository":{"id":104752263,"uuid":"286105169","full_name":"tanmaypandey7/wheat-detection","owner":"tanmaypandey7","description":"Detecting wheat heads using YOLOv5","archived":false,"fork":false,"pushed_at":"2021-10-18T07:52:16.000Z","size":2819,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T17:42:46.999Z","etag":null,"topics":["flask","kaggle-competition","wheat-detection","yolov5"],"latest_commit_sha":null,"homepage":"https://colab.research.google.com/drive/1bZe1CDa4g7wnOUZFO9ZUmw15T2I6Po0w?usp=sharing","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanmaypandey7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-08-08T19:16:16.000Z","updated_at":"2024-05-23T03:11:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"32939dbe-1deb-4f4b-881f-e6e3f64449a9","html_url":"https://github.com/tanmaypandey7/wheat-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmaypandey7%2Fwheat-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmaypandey7%2Fwheat-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmaypandey7%2Fwheat-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmaypandey7%2Fwheat-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanmaypandey7","download_url":"https://codeload.github.com/tanmaypandey7/wheat-detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250047972,"owners_count":21366149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","kaggle-competition","wheat-detection","yolov5"],"created_at":"2024-08-02T01:02:20.730Z","updated_at":"2025-04-21T11:32:15.612Z","avatar_url":"https://github.com/tanmaypandey7.png","language":"Python","funding_links":[],"categories":["Object Detection Applications"],"sub_categories":[],"readme":"# Wheat Detection\nDetecting wheat heads using YOLOv5\n- [Web App demo](#Web-app-demo)\n- [Brief overview of the competition images](#Brief-overview-of-the-competition-images)\n- [Modifications](#Modifications)\n- [Training](#Training)\n- [Inference and Deployment](#Inference-and-Deployment)\n\n## Web App Demo\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1bZe1CDa4g7wnOUZFO9ZUmw15T2I6Po0w?usp=sharing)\n\n[![https://imgur.com/a/Ap2kaeX](http://img.youtube.com/vi/JrL8nsV53tc/0.jpg)](http://www.youtube.com/watch?v=JrL8nsV53tc \"Wheat App\")\n\n## Brief overview of the competition images\nWheat heads were from various sources:  \n\u003ca href=\"https://imgur.com/HhOQtba\"\u003e\u003cimg src=\"https://imgur.com/HhOQtba.jpg\" title=\"head\" alt=\"head\" /\u003e\u003c/a\u003e  \nA few labeled images are as shown: (Blue bounding boxes)  \n\u003ca href=\"https://imgur.com/QhnuEEf\"\u003e\u003cimg src=\"https://imgur.com/QhnuEEf.jpg\" title=\"head\" alt=\"head\" width=\"378\" height=\"378\" /\u003e\u003c/a\u003e \u003ca href=\"https://imgur.com/5yUJCPV\"\u003e\u003cimg src=\"https://imgur.com/5yUJCPV.jpg\" title=\"head\" alt=\"head\" width=\"378\" height=\"378\" /\u003e\u003c/a\u003e  \n\n## Pre-trained models\nModels can be downloaded from \u003ca href=\"https://www.kaggle.com/ii5m0k3ii/mixup50e\"\u003ehere\u003c/a\u003e. (Use last_yolov5x_4M50fold0.pt for best results) \n\n## Modifications\nThe YOLOv5 notebook internally does some augmentations while preparing a Dataset. \nOriginally, this Dataset consists of only Mosaic images.\n\n**Mosaic** - https://arxiv.org/pdf/2004.12432.pdf  \n      4 images are cropped and stitched together  \n    \u003ca href=\"https://imgur.com/YZn47iN\"\u003e\u003cimg src=\"https://imgur.com/YZn47iN.jpg\" title=\"head\" alt=\"head\" width=\"378\" height=\"378\" /\u003e\u003c/a\u003e\n    \nHere, I modified the repo to add Mixup.\n\n**Mixup** - https://arxiv.org/pdf/1710.09412.pdf  \n      2 images are mixed together\n    \u003ca href=\"https://imgur.com/HkDFQ2g\"\u003e\u003cimg src=\"https://imgur.com/HkDFQ2g.jpg\" title=\"head\" alt=\"head\" /\u003e\u003c/a\u003e\n \nI 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-\u003e0.7769. \n\nThese developments were made before we found out that YOLOv5 was non-compliant and had to switch to EfficientDet for our final 2 submissions.\nKaggle later updated the leaderboard with the final 2 submissions and we ended up at 113th Private(Top 6%).\n\n## Training\nWe trained the model for 50 epochs on Colab Pro. \n\n## Inference and Deployment\nOur 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.\nThis web-app is served on Google Colab but can be easily deployed on AWS or GCP as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanmaypandey7%2Fwheat-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanmaypandey7%2Fwheat-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanmaypandey7%2Fwheat-detection/lists"}