nehulagrawal commited on
Commit
7ce9ece
1 Parent(s): ae5d347

Upload 2 files

Browse files
Files changed (2) hide show
  1. README (1).md +173 -0
  2. thumbnail.jpg +0 -0
README (1).md ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - ultralyticsplus
4
+ - yolov8
5
+ - ultralytics
6
+ - yolo
7
+ - vision
8
+ - object-detection
9
+ - pytorch
10
+ - awesome-yolov8-models
11
+ - plant classification
12
+ - plant detection
13
+ - leaf classification
14
+ - leaf detection
15
+ - crop detection
16
+ - disease detection
17
+ library_name: ultralytics
18
+ library_version: 8.0.43
19
+ inference: False
20
+ model-index:
21
+ - name: foduucom/plant-leaf-detection-and-classification
22
+ results:
23
+ - task:
24
+ type: object-detection
25
+ metrics:
26
+ - type: precision
27
+ value: 0.946
28
+ name: [email protected](box)
29
+ language:
30
+ - en
31
+ metrics:
32
+ - accuracy
33
+ ---
34
+ Below is the Model Card for the YOLOv8s Leaf Detection and Classification model:
35
+
36
+ ---
37
+ <p align="center">
38
+ <!-- Smaller size image -->
39
+ <img src="https://huggingface.co/foduucom/leaf-detection-and-classification/resolve/main/thumbnail.jpg" alt="Image" style="width:500px; height:300px;">
40
+ </p>
41
+ # Model Card for YOLOv8s Leaf Detection and Classification
42
+
43
+ ## Model Summary
44
+
45
+ The YOLOv8s Leaf Detection and Classification model is an object detection model based on the YOLO (You Only Look Once) framework. It is designed to detect and classify various types of leaves in images. The model has achieved a precision ([email protected]) of 0.946 on the object detection task.
46
+
47
+ ## Model Details
48
+
49
+ ### Model Description
50
+
51
+ The YOLOv8s Leaf Detection and Classification model is built on the YOLOv8 architecture, which is known for its real-time object detection capabilities. This specific model has been trained to recognize and classify different types of leaves from various plant species. It can detect multiple leaf instances in an image and assign them to their respective classes.
52
+
53
+ ```
54
+ ['lemon', 'capcicum', 'pea', 'ornamaental', 'cassava', 'tomato', 'chiku', 'Blueberry', 'grape', 'cauliflower', 'potato', 'cardamom', 'cherry', 'garlic', 'gram', 'apple', 'tea', 'wheat', 'sunflower', 'chilli', 'cucumber', 'castor', 'coffee', 'soyabean', 'cabbage', 'olive', 'jamun', 'cotton', 'banana', 'peach', 'tobacco', 'mango', 'papaya', 'rose', 'brinjal', 'ginger', 'raspberry', 'gauava', 'rice', 'corn', 'strawberry', 'groundnut', 'sugarcane', 'pomgernate', 'onion']
55
+ ```
56
+ - **Developed by:** FODUU AI
57
+ - **Model type:** Object Detection
58
+ - **Language(s) (NLP):** English
59
+
60
+ Furthermore, the YOLOv8s Leaf Detection and Classification model encourages user collaboration by allowing them to contribute their own plant leaf data. Users can submit images of new plant species, and suggest plant names for classification. Our team will diligently work to incorporate these new plant classes into the model, enhancing its ability to identify and classify an even wider variety of plant leaves.
61
+ Users are invited to actively participate in expanding the YOLOv8s Leaf Detection and Classification model's capabilities by sharing their plant names and corresponding dataset links through our community platform or by emailing the information to [email protected]. Your contributions will play a crucial role in enriching the model's knowledge and recognition of diverse plant species.
62
+
63
+ ## Uses
64
+
65
+ ### Direct Use
66
+
67
+ The YOLOv8s Leaf Detection and Classification model can be used directly for object detection tasks related to leaf detection and classification. It does not require fine-tuning or integration into a larger ecosystem or application.
68
+
69
+ ### Downstream Use
70
+
71
+ The model can also be fine-tuned for specific leaf detection and classification tasks or integrated into a larger application for plant-related research, agriculture, or environmental monitoring.
72
+
73
+ ### Out-of-Scope Use
74
+
75
+ The model is not designed for unrelated tasks or object detection scenarios outside the scope of leaf detection and classification.
76
+
77
+ ## Bias, Risks, and Limitations
78
+
79
+ The YOLOv8s Leaf Detection and Classification model may have some limitations and biases:
80
+
81
+ - The model's performance may vary depending on the quality and diversity of the training data.
82
+ - It may struggle with detecting leaves that are heavily occluded or overlapping with other objects.
83
+ - The model's accuracy may be affected by variations in lighting conditions, image quality, and resolution.
84
+ - It may not accurately detect very small or distant leaves in images.
85
+ - The model's classification accuracy may be lower for leaf species that resemble each other closely.
86
+ - The model's biases may stem from the biases present in the training data.
87
+
88
+ ### Recommendations
89
+
90
+ Users (both direct and downstream) should be made aware of the risks, biases, and limitations of the model. Further research and experimentation are recommended to assess its performance in specific use cases and domains.
91
+
92
+ ## How to Get Started with the Model
93
+
94
+ To get started with the YOLOv8s Leaf Detection and Classification model, follow these steps:
95
+
96
+ 1. Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus) and [ultralytics](https://github.com/ultralytics/ultralytics) libraries using pip:
97
+
98
+ ```bash
99
+ pip install ultralyticsplus ultralytics
100
+ ```
101
+
102
+ 2. Load the model and perform prediction using the provided code snippet.
103
+
104
+ ```python
105
+ from ultralyticsplus import YOLO, render_result
106
+
107
+ # load model
108
+ model = YOLO('foduucom/plant-leaf-detection-and-classification')
109
+
110
+ # set model parameters
111
+ model.overrides['conf'] = 0.25 # NMS confidence threshold
112
+ model.overrides['iou'] = 0.45 # NMS IoU threshold
113
+ model.overrides['agnostic_nms'] = False # NMS class-agnostic
114
+ model.overrides['max_det'] = 1000 # maximum number of detections per image
115
+
116
+
117
+ # set image
118
+ image = 'path/to/your/image'
119
+
120
+ # perform inference
121
+ results = model.predict(image)
122
+
123
+ # observe results
124
+ print(results[0].boxes)
125
+ render = render_result(model=model, image=image, result=results[0])
126
+ render.show()
127
+ ```
128
+
129
+ ## Training Details
130
+
131
+
132
+ ### Training Data
133
+
134
+ The model is trained on hundreds of images of 46 different plants, including both disease-infected and healthy leaves.
135
+
136
+ ### Training Procedure
137
+
138
+ The training process involves using high GPU capacity and is run for up to 50 epochs, where each epoch represents a complete pass through the entire training dataset, adjusting model weights to minimize the classification loss and optimize the performance.
139
+
140
+ #### Metrics
141
+
142
+ - [email protected] (box):
143
+ 0.946
144
+
145
+ #### Summary
146
+
147
+ YOLOv8s is a powerful convolutional neural network tailored for leaf detection and classification of over 46 plant species. It leverages a modified CSPDarknet53 backbone, self-attention mechanism, and a feature pyramid network for accurate multi-scaled object detection, providing precise identification and classification of plant leaves.
148
+
149
+ ### Model Architecture and Objective
150
+
151
+ YOLOv8 architecture utilizes a modified CSPDarknet53 as its backbone with 53 convolutional layers and cross-stage partial connections for improved information flow. The head consists of convolutional and fully connected layers for predicting bounding boxes, objectness scores, and class probabilities. It incorporates a self-attention mechanism and a feature pyramid network for multi-scaled object detection, enabling focus on relevant image features and detecting objects of different sizes.
152
+
153
+ ### Compute Infrastructure
154
+
155
+ #### Hardware
156
+
157
+ NVIDIA A100 40GB GPU card
158
+
159
+ #### Software
160
+ Jupyter Notebook environment for model training.
161
+
162
+ ## Model Card Contact
163
+
164
165
+ ```bibtex
166
+ @ModelCard{
167
+ author = {Nehul Agrawal and
168
+ Pranjal singh Thakur},
169
+ title = { YOLOv8s Leaf Detection and Classification},
170
+ year = {2023}
171
+ }
172
+ ```
173
+ ---
thumbnail.jpg ADDED