faldeus0092 commited on
Commit
d72d8ec
1 Parent(s): 5800931

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -0
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
3
+ # Doc / guide: https://huggingface.co/docs/hub/model-cards
4
+ {}
5
+ ---
6
+
7
+ # object-detection: detr-finetuned-thermal-dogs-and-people
8
+
9
+ <!-- Provide a quick summary of what the model is/does. -->
10
+
11
+ This model is a fine-tuned version of [DETR](https://huggingface.co/facebook/detr-resnet-50) on the Roboflow [Thermal Dogs and People](https://public.roboflow.com/object-detection/thermal-dogs-and-people/1) dataset.
12
+ It achieves the following results on the evaluation set:
13
+
14
+ ```
15
+ Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.681
16
+ Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.870
17
+ Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.778
18
+ Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.189
19
+ Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.489
20
+ Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.720
21
+ Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.641
22
+ Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.733
23
+ Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.746
24
+ Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.500
25
+ Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.542
26
+ Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.794
27
+ ```
28
+ ## Intended purpose
29
+
30
+ Main purpose for this model are solely for learning purposes.
31
+
32
+ Thermal images have a wide array of applications: monitoring machine performance, seeing in low light conditions, and adding another dimension to standard RGB scenarios. Infrared imaging is useful in security, wildlife detection,and hunting / outdoors recreation.
33
+
34
+ ## Training and evaluation data
35
+
36
+ Data can be seen at [Weights and Biases](https://wandb.ai/faldeus0092/thermal-dogs-and-people/runs/zjt8bp9x?workspace=user-faldeus0092)
37
+
38
+ ## Training procedure
39
+
40
+ ### Training hyperparameters
41
+
42
+ The following hyperparameters were used during training:
43
+ - learning_rate: 1e-4
44
+ - lr_backbone: 1e-5
45
+ - weight_decay: 1e-4
46
+ - optimizer: AdamW
47
+ - train_batch_size: 4
48
+ - eval_batch_size: 2
49
+ - train_set: 142
50
+ - test_set: 41
51
+ - num_epochs: 68
52
+
53
+ ### Example usage (transformers pipeline)
54
+ ```py
55
+ # Use a pipeline as a high-level helper
56
+ from transformers import pipeline
57
+
58
+ image = Image.open('/content/Thermal-Dogs-and-People-1/test/IMG_0006 5_jpg.rf.cd46e6a862d6ffb7fce6795067ce7cc7.jpg')
59
+ # image = Image.open(requests.get(url, stream=True).raw) # if you want to open from url
60
+
61
+ obj_detector = pipeline("object-detection", model="faldeus0092/detr-finetuned-thermal-dogs-and-people")
62
+
63
+ draw = ImageDraw.Draw(image)
64
+
65
+ for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
66
+ box = [round(i, 2) for i in box.tolist()]
67
+ x, y, x2, y2 = tuple(box)
68
+ draw.rectangle((x, y, x2, y2), outline="red", width=1)
69
+ draw.text((x, y), model.config.id2label[label.item()], fill="white")
70
+
71
+ image
72
+ ```
73
+
74
+