Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: ultralytics
|
5 |
+
pipeline_tag: image-classification
|
6 |
+
tags:
|
7 |
+
- action
|
8 |
+
---
|
9 |
+
|
10 |
+
## How to Use
|
11 |
+
|
12 |
+
To use this model in your project, follow the steps below:
|
13 |
+
|
14 |
+
### 1. Installation
|
15 |
+
|
16 |
+
Ensure you have the `ultralytics` library installed, which is used for YOLO models:
|
17 |
+
|
18 |
+
```bash
|
19 |
+
pip install ultralytics
|
20 |
+
```
|
21 |
+
|
22 |
+
### 2. Load the Model
|
23 |
+
|
24 |
+
You can load the model and perform detection on an image as follows:
|
25 |
+
```python
|
26 |
+
from ultralytics import YOLO
|
27 |
+
|
28 |
+
# Load the model
|
29 |
+
model = YOLO("./action-11x.pt")
|
30 |
+
|
31 |
+
# Perform detection on an image
|
32 |
+
results = model("image.png")
|
33 |
+
|
34 |
+
# Display or process the results
|
35 |
+
results.show() # This will display the image with detected objects
|
36 |
+
```
|
37 |
+
|
38 |
+
### 3. Model Inference
|
39 |
+
The results object contains bounding boxes, labels (e.g., numbers or operators), and confidence scores for each detected object.
|
40 |
+
|
41 |
+
Access them like this:
|
42 |
+
|
43 |
+
```python
|
44 |
+
# View results
|
45 |
+
for r in results:
|
46 |
+
print(r.probs) # print the Probs object containing the detected class probabilities
|
47 |
+
```
|
48 |
+
|
49 |
+
![](result.png)
|