Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: ultralytics
|
5 |
+
pipeline_tag: object-detection
|
6 |
+
tags:
|
7 |
+
- yolo
|
8 |
+
- object-detect
|
9 |
+
- yolo11
|
10 |
+
- yolov11
|
11 |
+
---
|
12 |
+
|
13 |
+
# Number and Operator Detection Based on YOLO11x
|
14 |
+
|
15 |
+
This repository contains a PyTorch-exported model for detecting greed/red/yellow ball using the YOLO11s architecture. The model has been trained to recognize these symbols in images and return their locations and classifications.
|
16 |
+
|
17 |
+
## Model Description
|
18 |
+
|
19 |
+
The YOLO11s model is optimized for detecting the following:
|
20 |
+
|
21 |
+
- greed/red/yellow ball
|
22 |
+
```text
|
23 |
+
#class
|
24 |
+
greed ball
|
25 |
+
red ball
|
26 |
+
yellow ball
|
27 |
+
```
|
28 |
+
## How to Use
|
29 |
+
|
30 |
+
To use this model in your project, follow the steps below:
|
31 |
+
|
32 |
+
### 1. Installation
|
33 |
+
|
34 |
+
Ensure you have the `ultralytics` library installed, which is used for YOLO models:
|
35 |
+
|
36 |
+
```bash
|
37 |
+
pip install ultralytics
|
38 |
+
```
|
39 |
+
|
40 |
+
### 2. Load the Model
|
41 |
+
|
42 |
+
You can load the model and perform detection on an image as follows:
|
43 |
+
```python
|
44 |
+
from ultralytics import YOLO
|
45 |
+
|
46 |
+
# Load the model
|
47 |
+
model = YOLO("./balldetect-11s.pt")
|
48 |
+
|
49 |
+
# Perform detection on an image
|
50 |
+
results = model("image.png")
|
51 |
+
|
52 |
+
# Display or process the results
|
53 |
+
results.show() # This will display the image with detected objects
|
54 |
+
```
|
55 |
+
|
56 |
+
### 3. Model Inference
|
57 |
+
The results object contains bounding boxes, labels (e.g., numbers or operators), and confidence scores for each detected object.
|
58 |
+
|
59 |
+
Access them like this:
|
60 |
+
|
61 |
+
```python
|
62 |
+
for result in results:
|
63 |
+
print(result.boxes) # Bounding boxes
|
64 |
+
print(result.names) # Detected classes
|
65 |
+
print(result.scores) # Confidence scores
|
66 |
+
```
|
67 |
+
|
68 |
+

|
69 |
+
|
70 |
+
#yolo11
|