ashaduzzaman
commited on
Commit
•
b896e93
1
Parent(s):
421099e
Update README.md
Browse files
README.md
CHANGED
@@ -7,103 +7,96 @@ tags:
|
|
7 |
model-index:
|
8 |
- name: detr_finetuned_cppe5
|
9 |
results: []
|
|
|
|
|
10 |
---
|
11 |
|
12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
should probably proofread and complete it, then remove this comment. -->
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
-
|
28 |
-
-
|
29 |
-
-
|
30 |
-
-
|
31 |
-
-
|
32 |
-
-
|
33 |
-
-
|
34 |
-
-
|
35 |
-
-
|
36 |
-
-
|
37 |
-
-
|
38 |
-
-
|
39 |
-
-
|
40 |
-
-
|
41 |
-
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
The
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
-
|
65 |
-
-
|
66 |
-
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
79 |
-
|
80 |
-
|
|
81 |
-
|
|
82 |
-
|
|
83 |
-
|
|
84 |
-
|
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
| 1.153 | 30.0 | 3210 | 1.2294 | 0.2366 | 0.4852 | 0.2032 | 0.1082 | 0.2086 | 0.3408 | 0.2819 | 0.4463 | 0.4665 | 0.249 | 0.4004 | 0.5893 | 0.5966 | 0.7461 | 0.1093 | 0.3645 | 0.1371 | 0.3865 | 0.0739 | 0.4417 | 0.266 | 0.3937 |
|
102 |
-
|
103 |
-
|
104 |
-
### Framework versions
|
105 |
-
|
106 |
-
- Transformers 4.44.2
|
107 |
-
- Pytorch 2.4.0+cu121
|
108 |
-
- Datasets 2.21.0
|
109 |
-
- Tokenizers 0.19.1
|
|
|
7 |
model-index:
|
8 |
- name: detr_finetuned_cppe5
|
9 |
results: []
|
10 |
+
datasets:
|
11 |
+
- rishitdagli/cppe-5
|
12 |
---
|
13 |
|
14 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
15 |
should probably proofread and complete it, then remove this comment. -->
|
16 |
|
17 |
+
# Model Card for DETR Finetuned on CPPE-5
|
18 |
+
|
19 |
+
## Model Overview
|
20 |
+
|
21 |
+
This model is a fine-tuned version of [facebook/detr-resnet-50](https://huggingface.co/facebook/detr-resnet-50) on a custom dataset, likely focused on detecting personal protective equipment (PPE) items. The fine-tuning has optimized the model to recognize various PPE elements such as face shields, masks, gloves, and goggles.
|
22 |
+
|
23 |
+
The model is based on the DEtection TRansformer (DETR) architecture, leveraging a ResNet-50 backbone for feature extraction. This fine-tuned version retains DETR's core functionality, enabling object detection tasks but is specifically adjusted to detect items relevant to occupational safety or PPE.
|
24 |
+
|
25 |
+
## Model Performance
|
26 |
+
|
27 |
+
The model achieves the following metrics on its evaluation set:
|
28 |
+
|
29 |
+
- **Loss**: 1.2294
|
30 |
+
- **mAP** (mean Average Precision):
|
31 |
+
- Overall: 0.2366
|
32 |
+
- 50 IoU threshold: 0.4852
|
33 |
+
- 75 IoU threshold: 0.2032
|
34 |
+
- Small objects: 0.1082
|
35 |
+
- Medium objects: 0.2086
|
36 |
+
- Large objects: 0.3408
|
37 |
+
- **mAR** (mean Average Recall):
|
38 |
+
- At 1 detection: 0.2819
|
39 |
+
- At 10 detections: 0.4463
|
40 |
+
- At 100 detections: 0.4665
|
41 |
+
- Small objects: 0.249
|
42 |
+
- Medium objects: 0.4004
|
43 |
+
- Large objects: 0.5893
|
44 |
+
|
45 |
+
For specific categories (face shields, gloves, goggles, masks), the precision and recall vary, with room for improvement, particularly for small objects like goggles.
|
46 |
+
|
47 |
+
## Intended Use and Limitations
|
48 |
+
|
49 |
+
### Intended Use
|
50 |
+
- Detecting personal protective equipment (PPE) in images or video streams.
|
51 |
+
- Monitoring workplace safety by ensuring proper usage of PPE items such as masks, gloves, face shields, and goggles.
|
52 |
+
- Suitable for industries like construction, healthcare, and manufacturing where PPE detection is critical for compliance and safety.
|
53 |
+
|
54 |
+
### Limitations
|
55 |
+
- The model may not generalize well to non-PPE items or general object detection tasks.
|
56 |
+
- Performance on small or occluded objects can be limited, as indicated by lower mAP and mAR scores for small objects.
|
57 |
+
- The model was trained on a dataset specific to PPE detection, so its performance on images outside of this domain might be inconsistent.
|
58 |
+
|
59 |
+
## Training and Evaluation Data
|
60 |
+
|
61 |
+
The dataset used for fine-tuning remains unspecified, but it appears to focus on personal protective equipment, such as face shields, masks, goggles, and gloves.
|
62 |
+
|
63 |
+
## Training Procedure
|
64 |
+
|
65 |
+
### Hyperparameters:
|
66 |
+
- **Learning rate**: 5e-05
|
67 |
+
- **Train batch size**: 8
|
68 |
+
- **Eval batch size**: 8
|
69 |
+
- **Optimizer**: Adam (betas=(0.9, 0.999), epsilon=1e-08)
|
70 |
+
- **Learning rate scheduler**: Cosine decay
|
71 |
+
- **Number of epochs**: 30
|
72 |
+
- **Seed**: 42
|
73 |
+
|
74 |
+
The model was trained for 30 epochs with Adam optimization, using a learning rate of 5e-05 and cosine learning rate decay. The training was conducted with a batch size of 8 for both training and evaluation.
|
75 |
+
|
76 |
+
## Evaluation Results
|
77 |
+
|
78 |
+
The following are performance metrics captured during the training process across multiple epochs:
|
79 |
+
|
80 |
+
| Epoch | Validation Loss | mAP | mAP 50 | mAP 75 | mAR | Comments |
|
81 |
+
|-------|-----------------|-----|--------|--------|-----|----------|
|
82 |
+
| 1 | 2.1073 | 0.0518 | 0.1075 | 0.0423 | 0.2819 | Initial training |
|
83 |
+
| 5 | 1.6220 | 0.1223 | 0.2258 | 0.1115 | 0.4463 | Significant improvement |
|
84 |
+
| 10 | 1.5033 | 0.155 | 0.3265 | 0.1325 | 0.5032 | Stable performance |
|
85 |
+
| 20 | 1.2649 | 0.2211 | 0.4427 | 0.1952 | 0.5867 | Peak performance |
|
86 |
+
| 25 | 1.2347 | 0.2333 | 0.4831 | 0.1989 | 0.5966 | Final metrics |
|
87 |
+
|
88 |
+
## Limitations and Ethical Considerations
|
89 |
+
|
90 |
+
### Limitations:
|
91 |
+
- **Domain-specific**: The model performs well in PPE-related object detection but may not generalize to other tasks.
|
92 |
+
- **Bias**: If the dataset is skewed or limited, certain PPE items may be under-represented, leading to poorer performance for some categories.
|
93 |
+
- **Real-time Applications**: The model might not meet the latency requirements for real-time detection in high-throughput environments.
|
94 |
+
|
95 |
+
### Ethical Considerations:
|
96 |
+
- **Privacy**: Using this model in surveillance scenarios (e.g., workplaces) may raise concerns about employee privacy, especially if applied without clear consent.
|
97 |
+
- **Misuse**: Improper use of this model could lead to incorrect enforcement of safety regulations.
|
98 |
+
|
99 |
+
## Future Work
|
100 |
+
|
101 |
+
- **Dataset Improvements**: Expanding the dataset to include more diverse PPE items, environments, and object scales could improve model performance, especially for smaller objects.
|
102 |
+
- **Model Efficiency**: Further fine-tuning or model distillation may help make the model more suitable for real-time applications.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|