underdogquality commited on
Commit
4ac1e56
Β·
verified Β·
1 Parent(s): 61eb902

Upload folder using huggingface_hub

Browse files
Files changed (6) hide show
  1. .gitignore +15 -0
  2. LICENSE +21 -0
  3. README.md +79 -0
  4. model_card.yaml +25 -0
  5. pests.yaml +9 -0
  6. requirements.txt +3 -0
.gitignore ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python cache
2
+ __pycache__/
3
+ *.pyc
4
+
5
+ # OS files
6
+ .DS_Store
7
+ Thumbs.db
8
+
9
+ # Environment
10
+ .env
11
+
12
+ # Hugging Face LFS
13
+ *.pt
14
+ *.bin
15
+ *.onnx
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Winston Karanja Ngige
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the β€œSoftware”), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED β€œAS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🐞 IP102 Pest Detector β€” YOLO11 Small
2
+
3
+ A custom YOLO11 object detection model trained on the **IP102** dataset β€” designed for pest detection in precision agriculture.
4
+
5
+ > **Model Purpose:** Detect and classify 102 pest species in real-time field conditions using computer vision.
6
+
7
+ ---
8
+
9
+ ## πŸ’‘ Model Details
10
+
11
+ - **Model:** YOLO11 Small
12
+ - **Dataset:** IP102 (Balanced, 14K+ images)
13
+ - **Image Sizes:** Trained on 640x640 and 896x896
14
+ - **Classes:** 102 pest species
15
+ - **Framework:** Ultralytics YOLOv8
16
+ - **Hardware:** NVIDIA A100 GPU
17
+ - **Epochs:** 77
18
+ - **License:** MIT License
19
+
20
+ ---
21
+
22
+ ## πŸ§ͺ Performance
23
+
24
+ | Metric | Train Set | Validation Set |
25
+ |----------------------|-----------|-----------------|
26
+ | Precision | 0.912 | 0.744 |
27
+ | Recall | 0.923 | 0.789 |
28
+ | mAP@0.5 | 0.941 | 0.815 |
29
+ | mAP@0.5:0.95 | 0.838 | 0.605 |
30
+
31
+ ---
32
+
33
+ ## πŸ“¦ Usage
34
+
35
+ ```python
36
+ from ultralytics import YOLO
37
+
38
+ # Load model
39
+ model = YOLO("path/to/best.pt")
40
+
41
+ # Run inference
42
+ results = model.predict("your_image.jpg", imgsz=640)
43
+
44
+ # Display results
45
+ results.show()
46
+ 🐜 Class List
47
+ The model detects 102 agricultural pests, including:
48
+
49
+ rice leaf roller
50
+
51
+ paddy stem maggot
52
+
53
+ brown plant hopper
54
+
55
+ aphids
56
+
57
+ mole cricket
58
+
59
+ blister beetle
60
+ ...and many more!
61
+
62
+ (See pests.yaml for the full class list.)
63
+
64
+ βš–οΈ License
65
+ This project is released under the MIT License β€” free for personal and commercial use.
66
+
67
+
68
+
69
+ πŸ“š Citation
70
+ If you use this model in research or production, please cite the IP102 dataset:
71
+
72
+ Wu, S., Zhan, C., et al.
73
+ "IP102: A Large-Scale Benchmark Dataset for Insect Pest Recognition."
74
+ CVPR, 2019.
75
+
76
+
77
+
78
+ πŸ’¬ Questions?
79
+ Open an issue or reach me on Hugging Face Discussions.
model_card.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ license: mit
2
+ library_name: ultralytics
3
+ tags:
4
+ - yolo
5
+ - yolo11
6
+ - object-detection
7
+ - ip102
8
+ - pest-detection
9
+ - agriculture
10
+ model-index:
11
+ - name: IP102 Pest Detector YOLO11 Small
12
+ results:
13
+ - task: object-detection
14
+ dataset:
15
+ name: IP102
16
+ type: images
17
+ metrics:
18
+ - name: Precision
19
+ value: 0.912
20
+ - name: Recall
21
+ value: 0.923
22
+ - name: mAP@0.5
23
+ value: 0.941
24
+ - name: mAP@0.5:0.95
25
+ value: 0.838
pests.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ train: /home/salter/Desktop/project-jumanji/hack/Dataset/output_dataset/images/train
2
+ val: /home/salter/Desktop/project-jumanji/hack/Dataset/output_dataset/images/val
3
+ test: /home/salter/Desktop/project-jumanji/hack/Dataset/output_dataset/images/test
4
+
5
+ nc: 102
6
+
7
+ names: ['rice leaf roller', 'rice leaf caterpillar', 'paddy stem maggot', 'asiatic rice borer', 'yellow rice borer', 'rice gall midge', 'Rice Stemfly', 'brown plant hopper', 'white backed plant hopper', 'small brown plant hopper', 'rice water weevil', 'rice leafhopper', 'grain spreader thrips', 'rice shell pest', 'grub', 'mole cricket', 'wireworm', 'white margined moth', 'black cutworm', 'large cutworm', 'yellow cutworm', 'red spider', 'corn borer', 'army worm', 'aphids', 'Potosiabre vitarsis', 'peach borer', 'english grain aphid', 'green bug', 'bird cherry-oataphid', 'wheat blossom midge', 'penthaleus major', 'longlegged spider mite', 'wheat phloeothrips', 'wheat sawfly', 'cerodonta denticornis', 'beet fly', 'flea beetle', 'cabbage army worm', 'beet army worm', 'Beet spot flies', 'meadow moth', 'beet weevil', 'sericaorient alismots chulsky', 'alfalfa weevil', 'flax budworm', 'alfalfa plant bug', 'tarnished plant bug', 'Locustoidea', 'lytta polita', 'legume blister beetle', 'blister beetle', 'therioaphis maculata Buckton', 'odontothrips loti', 'Thrips', 'alfalfa seed chalcid', 'Pieris canidia', 'Apolygus lucorum', 'Limacodidae', 'Viteus vitifoliae', 'Colomerus vitis', 'Brevipoalpus lewisi McGregor', 'oides decempunctata', 'Polyphagotars onemus latus', 'Pseudococcus comstocki Kuwana', 'parathrene regalis', 'Ampelophaga', 'Lycorma delicatula', 'Xylotrechus', 'Cicadella viridis', 'Miridae', 'Trialeurodes vaporariorum', 'Erythroneura apicalis', 'Papilio xuthus', 'Panonchus citri McGregor', 'Phyllocoptes oleiverus ashmead', 'Icerya purchasi Maskell', 'Unaspis yanonensis', 'Ceroplastes rubens', 'Chrysomphalus aonidum', 'Parlatoria zizyphus Lucus', 'Nipaecoccus vastalor', 'Aleurocanthus spiniferus', 'Tetradacus c Bactrocera minax', 'Dacus dorsalis(Hendel)', 'Bactrocera tsuneonis', 'Prodenia litura', 'Adristyrannus', 'Phyllocnistis citrella Stainton', 'Toxoptera citricidus', 'Toxoptera aurantii', 'Aphis citricola Vander Goot', 'Scirtothrips dorsalis Hood', 'Dasineura sp', 'Lawana imitata Melichar', 'Salurnis marginella Guerr', 'Deporaus marginatus Pascoe', 'Chlumetia transversa', 'Mango flat beak leafhopper', 'Rhytidodera bowrinii white', 'Sternochetus frigidus', 'Cicadellidae']
8
+
9
+
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ ultralytics>=8.0.0
2
+ huggingface_hub>=0.20.0
3
+ gitpython>=3.1.31