Update README.md
Browse filesUpdated README.md
README.md
CHANGED
@@ -37,6 +37,35 @@ List of supported species:
|
|
37 |
|
38 |
The recommended image resolution for the model is 1024px. The model's performance enables the processing of ~30,000 images in one hour using a single NVIDIA GPU with more than 11 GB of vRAM.
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
## 🏢 Who is using TRAPPER?
|
41 |
* Mammal Research Institute Polish Academy of Sciences;
|
42 |
* Karkonosze National Park;
|
|
|
37 |
|
38 |
The recommended image resolution for the model is 1024px. The model's performance enables the processing of ~30,000 images in one hour using a single NVIDIA GPU with more than 11 GB of vRAM.
|
39 |
|
40 |
+
## 📥 Installation
|
41 |
+
|
42 |
+
```bash
|
43 |
+
$ python3 -m venv env
|
44 |
+
$ source env/bin/activate
|
45 |
+
$ pip install ultralytics dill ipython # IPython is optional
|
46 |
+
```
|
47 |
+
|
48 |
+
## 🚀 Usage
|
49 |
+
|
50 |
+
```ipython
|
51 |
+
In [1]: from ultralytics import YOLO
|
52 |
+
In [2]: model = YOLO("TrapperAI-v02.2024-YOLOv8-m.pt")
|
53 |
+
In [3]: results = model.predict("fox36-Vulpes-vulpes.jpg")
|
54 |
+
|
55 |
+
In [4]: len(results) # how many animals were detected
|
56 |
+
Out[4]: 1
|
57 |
+
|
58 |
+
In [5]: results[0].show() # open image viewer with detection and classification results
|
59 |
+
|
60 |
+
In [6]: results[0].boxes.conf # return best confidence score for detection and classification results
|
61 |
+
Out[6]: tensor([0.9558], device='cuda:0')
|
62 |
+
|
63 |
+
In [7]: results[0].boxes.cls # return index value for detection and classification results
|
64 |
+
Out[7]: tensor([14.], device='cuda:0') # Red Fox
|
65 |
+
```
|
66 |
+
|
67 |
+
If your image contains more than one object (animal), you will need to iterate through the results list to obtain the confidence score and species index value for each detected object.
|
68 |
+
|
69 |
## 🏢 Who is using TRAPPER?
|
70 |
* Mammal Research Institute Polish Academy of Sciences;
|
71 |
* Karkonosze National Park;
|