ashaduzzaman commited on
Commit
b896e93
1 Parent(s): 421099e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +88 -95
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
- # detr_finetuned_cppe5
16
-
17
- This model is a fine-tuned version of [facebook/detr-resnet-50](https://huggingface.co/facebook/detr-resnet-50) on an unknown dataset.
18
- It achieves the following results on the evaluation set:
19
- - Loss: 1.2294
20
- - Map: 0.2366
21
- - Map 50: 0.4852
22
- - Map 75: 0.2032
23
- - Map Small: 0.1082
24
- - Map Medium: 0.2086
25
- - Map Large: 0.3408
26
- - Mar 1: 0.2819
27
- - Mar 10: 0.4463
28
- - Mar 100: 0.4665
29
- - Mar Small: 0.249
30
- - Mar Medium: 0.4004
31
- - Mar Large: 0.5893
32
- - Map Coverall: 0.5966
33
- - Mar 100 Coverall: 0.7461
34
- - Map Face Shield: 0.1093
35
- - Mar 100 Face Shield: 0.3645
36
- - Map Gloves: 0.1371
37
- - Mar 100 Gloves: 0.3865
38
- - Map Goggles: 0.0739
39
- - Mar 100 Goggles: 0.4417
40
- - Map Mask: 0.266
41
- - Mar 100 Mask: 0.3937
42
-
43
- ## Model description
44
-
45
- More information needed
46
-
47
- ## Intended uses & limitations
48
-
49
- More information needed
50
-
51
- ## Training and evaluation data
52
-
53
- More information needed
54
-
55
- ## Training procedure
56
-
57
- ### Training hyperparameters
58
-
59
- The following hyperparameters were used during training:
60
- - learning_rate: 5e-05
61
- - train_batch_size: 8
62
- - eval_batch_size: 8
63
- - seed: 42
64
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
65
- - lr_scheduler_type: cosine
66
- - num_epochs: 30
67
-
68
- ### Training results
69
-
70
- | Training Loss | Epoch | Step | Validation Loss | Map | Map 50 | Map 75 | Map Small | Map Medium | Map Large | Mar 1 | Mar 10 | Mar 100 | Mar Small | Mar Medium | Mar Large | Map Coverall | Mar 100 Coverall | Map Face Shield | Mar 100 Face Shield | Map Gloves | Mar 100 Gloves | Map Goggles | Mar 100 Goggles | Map Mask | Mar 100 Mask |
71
- |:-------------:|:-----:|:----:|:---------------:|:------:|:------:|:------:|:---------:|:----------:|:---------:|:------:|:------:|:-------:|:---------:|:----------:|:---------:|:------------:|:----------------:|:---------------:|:-------------------:|:----------:|:--------------:|:-----------:|:---------------:|:--------:|:------------:|
72
- | No log | 1.0 | 107 | 2.1073 | 0.0518 | 0.1075 | 0.0423 | 0.004 | 0.05 | 0.053 | 0.0951 | 0.1836 | 0.2192 | 0.1066 | 0.1872 | 0.2079 | 0.2454 | 0.69 | 0.0 | 0.0 | 0.0046 | 0.1736 | 0.0 | 0.0 | 0.0089 | 0.2323 |
73
- | No log | 2.0 | 214 | 1.9912 | 0.0686 | 0.1359 | 0.0618 | 0.0054 | 0.0787 | 0.0713 | 0.1077 | 0.1966 | 0.2362 | 0.0965 | 0.1874 | 0.2636 | 0.2953 | 0.7078 | 0.0 | 0.0 | 0.0092 | 0.191 | 0.0 | 0.0 | 0.0386 | 0.282 |
74
- | No log | 3.0 | 321 | 1.8712 | 0.0674 | 0.1339 | 0.0593 | 0.0088 | 0.0666 | 0.0694 | 0.0984 | 0.1885 | 0.2351 | 0.1056 | 0.1885 | 0.2378 | 0.304 | 0.7011 | 0.0 | 0.0 | 0.0096 | 0.2045 | 0.0 | 0.0 | 0.0237 | 0.2698 |
75
- | No log | 4.0 | 428 | 1.7812 | 0.1012 | 0.1844 | 0.095 | 0.0084 | 0.0989 | 0.1046 | 0.1183 | 0.2104 | 0.2539 | 0.1291 | 0.214 | 0.2584 | 0.4384 | 0.7039 | 0.002 | 0.0016 | 0.0154 | 0.2281 | 0.0 | 0.0 | 0.0501 | 0.336 |
76
- | 2.1402 | 5.0 | 535 | 1.6220 | 0.1223 | 0.2258 | 0.1115 | 0.0168 | 0.1078 | 0.1262 | 0.1225 | 0.2387 | 0.27 | 0.1457 | 0.2248 | 0.2882 | 0.5049 | 0.7222 | 0.001 | 0.0016 | 0.0337 | 0.2697 | 0.0 | 0.0 | 0.072 | 0.3566 |
77
- | 2.1402 | 6.0 | 642 | 1.5978 | 0.1257 | 0.2475 | 0.113 | 0.0297 | 0.0975 | 0.1347 | 0.1336 | 0.2488 | 0.2703 | 0.1604 | 0.2203 | 0.3037 | 0.505 | 0.7156 | 0.002 | 0.0032 | 0.0374 | 0.2635 | 0.0 | 0.0 | 0.0842 | 0.3693 |
78
- | 2.1402 | 7.0 | 749 | 1.5898 | 0.1428 | 0.273 | 0.1266 | 0.0275 | 0.1287 | 0.1639 | 0.1769 | 0.2802 | 0.307 | 0.1775 | 0.2573 | 0.3428 | 0.5307 | 0.7033 | 0.0336 | 0.1419 | 0.0462 | 0.3135 | 0.0053 | 0.0167 | 0.0984 | 0.3598 |
79
- | 2.1402 | 8.0 | 856 | 1.4987 | 0.1509 | 0.3116 | 0.1277 | 0.0499 | 0.1425 | 0.1671 | 0.1921 | 0.3128 | 0.3404 | 0.2041 | 0.3089 | 0.3779 | 0.5255 | 0.7344 | 0.0574 | 0.2532 | 0.0458 | 0.3169 | 0.0037 | 0.0292 | 0.122 | 0.3683 |
80
- | 2.1402 | 9.0 | 963 | 1.5228 | 0.1419 | 0.2954 | 0.1181 | 0.0434 | 0.1457 | 0.1735 | 0.1739 | 0.2969 | 0.3194 | 0.1831 | 0.2773 | 0.3981 | 0.4928 | 0.7033 | 0.0369 | 0.1468 | 0.0365 | 0.2556 | 0.0146 | 0.1208 | 0.1287 | 0.3704 |
81
- | 1.6663 | 10.0 | 1070 | 1.5033 | 0.155 | 0.3265 | 0.1325 | 0.0945 | 0.1552 | 0.1757 | 0.2063 | 0.3416 | 0.3655 | 0.2078 | 0.3358 | 0.4288 | 0.5032 | 0.7228 | 0.056 | 0.2516 | 0.0551 | 0.3281 | 0.0255 | 0.1479 | 0.1353 | 0.3772 |
82
- | 1.6663 | 11.0 | 1177 | 1.5154 | 0.1588 | 0.3542 | 0.1207 | 0.0438 | 0.1487 | 0.1986 | 0.195 | 0.337 | 0.3528 | 0.144 | 0.3254 | 0.4215 | 0.4644 | 0.6833 | 0.0487 | 0.221 | 0.063 | 0.2747 | 0.052 | 0.2271 | 0.1658 | 0.3577 |
83
- | 1.6663 | 12.0 | 1284 | 1.4366 | 0.174 | 0.3675 | 0.1483 | 0.0667 | 0.1566 | 0.2069 | 0.2111 | 0.3537 | 0.3733 | 0.2117 | 0.3126 | 0.4585 | 0.5298 | 0.7083 | 0.0704 | 0.2871 | 0.0734 | 0.3242 | 0.0295 | 0.1833 | 0.1672 | 0.3635 |
84
- | 1.6663 | 13.0 | 1391 | 1.4312 | 0.174 | 0.3693 | 0.1411 | 0.0641 | 0.1851 | 0.2306 | 0.2305 | 0.4005 | 0.4257 | 0.2798 | 0.3645 | 0.5193 | 0.4709 | 0.7044 | 0.0952 | 0.35 | 0.0995 | 0.3775 | 0.0286 | 0.3375 | 0.1759 | 0.3593 |
85
- | 1.6663 | 14.0 | 1498 | 1.3795 | 0.1975 | 0.3943 | 0.1703 | 0.0578 | 0.1746 | 0.2588 | 0.2331 | 0.3874 | 0.4107 | 0.2163 | 0.3426 | 0.512 | 0.5466 | 0.7222 | 0.0885 | 0.3048 | 0.0919 | 0.3629 | 0.0604 | 0.2875 | 0.2001 | 0.3762 |
86
- | 1.4771 | 15.0 | 1605 | 1.3600 | 0.1956 | 0.4063 | 0.1566 | 0.0946 | 0.1767 | 0.25 | 0.2357 | 0.4019 | 0.4196 | 0.2409 | 0.3621 | 0.5077 | 0.5538 | 0.7211 | 0.0853 | 0.329 | 0.0893 | 0.3208 | 0.0436 | 0.3604 | 0.206 | 0.3667 |
87
- | 1.4771 | 16.0 | 1712 | 1.3385 | 0.1998 | 0.4023 | 0.1747 | 0.0828 | 0.1792 | 0.2561 | 0.2363 | 0.4077 | 0.4216 | 0.2114 | 0.3628 | 0.5217 | 0.5634 | 0.7233 | 0.0728 | 0.329 | 0.0938 | 0.3056 | 0.0515 | 0.375 | 0.2174 | 0.3751 |
88
- | 1.4771 | 17.0 | 1819 | 1.3266 | 0.208 | 0.4212 | 0.1706 | 0.0988 | 0.1786 | 0.283 | 0.257 | 0.4071 | 0.4241 | 0.2396 | 0.3563 | 0.5225 | 0.5792 | 0.735 | 0.1202 | 0.3548 | 0.0971 | 0.3388 | 0.0352 | 0.3313 | 0.2084 | 0.3608 |
89
- | 1.4771 | 18.0 | 1926 | 1.3150 | 0.2113 | 0.4155 | 0.1871 | 0.1087 | 0.1892 | 0.2776 | 0.2576 | 0.4252 | 0.449 | 0.2589 | 0.3891 | 0.5548 | 0.586 | 0.7483 | 0.0714 | 0.3694 | 0.1097 | 0.3528 | 0.049 | 0.3833 | 0.2402 | 0.391 |
90
- | 1.3206 | 19.0 | 2033 | 1.3129 | 0.2015 | 0.4113 | 0.1755 | 0.1143 | 0.1803 | 0.2776 | 0.2403 | 0.4133 | 0.4355 | 0.2618 | 0.3912 | 0.5328 | 0.5867 | 0.7506 | 0.0645 | 0.321 | 0.1043 | 0.3421 | 0.0361 | 0.3812 | 0.2158 | 0.3825 |
91
- | 1.3206 | 20.0 | 2140 | 1.2649 | 0.2211 | 0.4427 | 0.1952 | 0.1146 | 0.1886 | 0.3091 | 0.2684 | 0.4428 | 0.4671 | 0.2785 | 0.4031 | 0.5786 | 0.5929 | 0.7489 | 0.0913 | 0.3726 | 0.1193 | 0.3764 | 0.0459 | 0.4313 | 0.2559 | 0.4063 |
92
- | 1.3206 | 21.0 | 2247 | 1.2681 | 0.2219 | 0.4544 | 0.1904 | 0.1025 | 0.1935 | 0.3141 | 0.2613 | 0.4258 | 0.4459 | 0.2563 | 0.3789 | 0.5547 | 0.5955 | 0.74 | 0.1128 | 0.35 | 0.1127 | 0.3826 | 0.0471 | 0.375 | 0.2413 | 0.382 |
93
- | 1.3206 | 22.0 | 2354 | 1.2399 | 0.2293 | 0.4623 | 0.2049 | 0.1129 | 0.2011 | 0.3339 | 0.2799 | 0.4453 | 0.4686 | 0.2762 | 0.4048 | 0.5869 | 0.5941 | 0.7489 | 0.0976 | 0.379 | 0.1263 | 0.3927 | 0.0694 | 0.425 | 0.2592 | 0.3974 |
94
- | 1.3206 | 23.0 | 2461 | 1.2363 | 0.2331 | 0.4808 | 0.1947 | 0.1059 | 0.2082 | 0.3341 | 0.2819 | 0.4444 | 0.4642 | 0.2274 | 0.3918 | 0.5897 | 0.5897 | 0.7406 | 0.1127 | 0.3903 | 0.1321 | 0.3742 | 0.0728 | 0.425 | 0.258 | 0.391 |
95
- | 1.2107 | 24.0 | 2568 | 1.2379 | 0.2332 | 0.4787 | 0.1979 | 0.1097 | 0.203 | 0.324 | 0.2763 | 0.4388 | 0.4574 | 0.2514 | 0.3919 | 0.5719 | 0.5969 | 0.7428 | 0.1023 | 0.3565 | 0.1359 | 0.3764 | 0.0646 | 0.4104 | 0.2661 | 0.4011 |
96
- | 1.2107 | 25.0 | 2675 | 1.2347 | 0.2333 | 0.4831 | 0.1989 | 0.1123 | 0.2042 | 0.3267 | 0.2784 | 0.4468 | 0.4644 | 0.2474 | 0.3916 | 0.5884 | 0.5952 | 0.7456 | 0.1027 | 0.3548 | 0.1327 | 0.3837 | 0.0716 | 0.4437 | 0.2641 | 0.3942 |
97
- | 1.2107 | 26.0 | 2782 | 1.2408 | 0.2347 | 0.4776 | 0.2085 | 0.1109 | 0.2104 | 0.3304 | 0.2863 | 0.4481 | 0.4669 | 0.2597 | 0.3976 | 0.5914 | 0.5934 | 0.7433 | 0.1035 | 0.3677 | 0.1333 | 0.3961 | 0.0784 | 0.4375 | 0.2649 | 0.3899 |
98
- | 1.2107 | 27.0 | 2889 | 1.2385 | 0.2363 | 0.4787 | 0.209 | 0.1127 | 0.2084 | 0.3349 | 0.2854 | 0.4461 | 0.4648 | 0.2661 | 0.3952 | 0.5868 | 0.5964 | 0.7422 | 0.1057 | 0.3661 | 0.1364 | 0.3882 | 0.0779 | 0.4417 | 0.2648 | 0.3857 |
99
- | 1.2107 | 28.0 | 2996 | 1.2320 | 0.2366 | 0.4863 | 0.2018 | 0.1083 | 0.2098 | 0.3371 | 0.2847 | 0.4464 | 0.4685 | 0.2507 | 0.4014 | 0.5895 | 0.596 | 0.7444 | 0.1092 | 0.371 | 0.1384 | 0.391 | 0.0749 | 0.4458 | 0.2644 | 0.3905 |
100
- | 1.153 | 29.0 | 3103 | 1.2295 | 0.2365 | 0.4851 | 0.2033 | 0.1076 | 0.209 | 0.3393 | 0.2819 | 0.4463 | 0.4662 | 0.249 | 0.4014 | 0.5864 | 0.5966 | 0.7461 | 0.1095 | 0.3645 | 0.1376 | 0.3876 | 0.0736 | 0.4396 | 0.2651 | 0.3931 |
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.