arnabdhar commited on
Commit
33520ab
1 Parent(s): c2c61aa

Updated README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -4
README.md CHANGED
@@ -13,17 +13,44 @@ tags:
13
 
14
  ## Use Case
15
 
16
- ## Evaluation Metrics
17
 
18
- __Weights & Biases__: [Run Details](https://wandb.ai/2wb2ndur/Human-Detection-Thermal-Camera/runs/5j95496q/overview?workspace=user-2wb2ndur)
19
 
20
- ### Training Graphs
 
 
 
21
 
22
- ![Training Graphs](./training_artifacts/results.png)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  ## Training Code
25
 
26
  - Dataset Link: [Roboflow Universe](https://universe.roboflow.com/smart2/persondection-61bc2)
 
27
 
28
  ```python
29
  from ultralytics import YOLO
 
13
 
14
  ## Use Case
15
 
16
+ This model is can be used for detecting humans from thermal images. This should work on both Pseudo-color and Grayscale thermal images. The model was fine tuned for humans only but can be finetuned further fort detecting other objects using Thermal images.
17
 
18
+ To deploy this model use the following code:
19
 
20
+ - Install dependencies:
21
+ ```bash
22
+ $ python -m pip install ultralytics supervision huggingface_hub
23
+ ```
24
 
25
+ - Python code
26
+ ```python
27
+ # import libraries
28
+ from huggingface_hub import hf_hub_download
29
+ from ultralytics import YOLO
30
+ from supervision import Detections
31
+ import cv
32
+
33
+ # download model
34
+ model_path = hf_hub_download(
35
+ repo_id = "arnabdhar/YOLOv8-human-detection-thermal",
36
+ filename = "model.pt"
37
+ )
38
+
39
+ # load model
40
+ model = YOLO(model_path)
41
+
42
+ # method for inference
43
+ def inference(image_path):
44
+ cv_image = cv.imread(image_path, cv2.IMREAD_ANYCOLOR)
45
+ model_output = model(cv_image, conf=0.6, verbose=False)
46
+ detections = Detections.from_ultralytics(model_output[0])
47
+ return detections
48
+ ```
49
 
50
  ## Training Code
51
 
52
  - Dataset Link: [Roboflow Universe](https://universe.roboflow.com/smart2/persondection-61bc2)
53
+ - Weights & Biases: [Run Details](https://wandb.ai/2wb2ndur/Human-Detection-Thermal-Camera/runs/5j95496q/overview?workspace=user-2wb2ndur)
54
 
55
  ```python
56
  from ultralytics import YOLO