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