Garon16 commited on
Commit
c1cb6c2
1 Parent(s): 91fdc21

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +132 -97
README.md CHANGED
@@ -1,97 +1,132 @@
1
- ---
2
- library_name: transformers
3
- language:
4
- - ru
5
- license: apache-2.0
6
- base_model: PekingU/rtdetr_r50vd_coco_o365
7
- tags:
8
- - generated_from_trainer
9
- model-index:
10
- - name: RT-DETR Russian car plate detection with classification by type
11
- results: []
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
- # RT-DETR Russian car plate detection with classification by type
18
-
19
- This model is a fine-tuned version of [PekingU/rtdetr_r50vd_coco_o365](https://huggingface.co/PekingU/rtdetr_r50vd_coco_o365) on an unknown dataset.
20
- It achieves the following results on the evaluation set:
21
- - Loss: 4.1673
22
- - Map: 0.8829
23
- - Map 50: 0.9858
24
- - Map 75: 0.9736
25
- - Map Car-plates-and-these-types: -1.0
26
- - Map Large: 0.9689
27
- - Map Medium: 0.9125
28
- - Map N P: 0.857
29
- - Map P P: 0.9087
30
- - Map Small: 0.696
31
- - Mar 1: 0.8686
32
- - Mar 10: 0.9299
33
- - Mar 100: 0.9357
34
- - Mar 100 Car-plates-and-these-types: -1.0
35
- - Mar 100 N P: 0.9169
36
- - Mar 100 P P: 0.9545
37
- - Mar Large: 0.9844
38
- - Mar Medium: 0.958
39
- - Mar Small: 0.8354
40
-
41
- ## Model description
42
-
43
- More information needed
44
-
45
- ## Intended uses & limitations
46
-
47
- More information needed
48
-
49
- ## Training and evaluation data
50
-
51
- More information needed
52
-
53
- ## Training procedure
54
-
55
- ### Training hyperparameters
56
-
57
- The following hyperparameters were used during training:
58
- - learning_rate: 5e-05
59
- - train_batch_size: 32
60
- - eval_batch_size: 8
61
- - seed: 42
62
- - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
63
- - lr_scheduler_type: linear
64
- - lr_scheduler_warmup_steps: 300
65
- - num_epochs: 20
66
-
67
- ### Training results
68
-
69
- | Training Loss | Epoch | Step | Validation Loss | Map | Map 50 | Map 75 | Map Car-plates-and-these-types | Map Large | Map Medium | Map N P | Map P P | Map Small | Mar 1 | Mar 10 | Mar 100 | Mar 100 Car-plates-and-these-types | Mar 100 N P | Mar 100 P P | Mar Large | Mar Medium | Mar Small |
70
- |:-------------:|:-----:|:----:|:---------------:|:------:|:------:|:------:|:------------------------------:|:---------:|:----------:|:-------:|:-------:|:---------:|:------:|:------:|:-------:|:----------------------------------:|:-----------:|:-----------:|:---------:|:----------:|:---------:|
71
- | No log | 1.0 | 109 | 64.6127 | 0.035 | 0.0558 | 0.0379 | -1.0 | 0.0039 | 0.0663 | 0.0191 | 0.0508 | 0.0071 | 0.1523 | 0.3009 | 0.3361 | -1.0 | 0.3179 | 0.3543 | 0.7625 | 0.3788 | 0.1157 |
72
- | No log | 2.0 | 218 | 15.4008 | 0.8237 | 0.9418 | 0.9327 | -1.0 | 0.893 | 0.879 | 0.7945 | 0.8529 | 0.4319 | 0.8203 | 0.8924 | 0.9018 | -1.0 | 0.8766 | 0.9269 | 0.9656 | 0.9324 | 0.7653 |
73
- | No log | 3.0 | 327 | 9.4050 | 0.8439 | 0.9566 | 0.9479 | -1.0 | 0.9439 | 0.8908 | 0.8158 | 0.872 | 0.5171 | 0.8416 | 0.908 | 0.9144 | -1.0 | 0.9002 | 0.9286 | 0.9781 | 0.9368 | 0.8051 |
74
- | No log | 4.0 | 436 | 7.9164 | 0.8493 | 0.9665 | 0.9543 | -1.0 | 0.9567 | 0.8903 | 0.8338 | 0.8648 | 0.5581 | 0.8481 | 0.9159 | 0.9267 | -1.0 | 0.9173 | 0.936 | 0.975 | 0.949 | 0.8185 |
75
- | 70.2867 | 5.0 | 545 | 6.8177 | 0.8525 | 0.9723 | 0.9602 | -1.0 | 0.9521 | 0.8918 | 0.8234 | 0.8816 | 0.6025 | 0.8438 | 0.9214 | 0.9279 | -1.0 | 0.9181 | 0.9378 | 0.975 | 0.9492 | 0.8211 |
76
- | 70.2867 | 6.0 | 654 | 6.0182 | 0.854 | 0.9744 | 0.9619 | -1.0 | 0.9574 | 0.8912 | 0.8251 | 0.8829 | 0.6123 | 0.8438 | 0.9176 | 0.927 | -1.0 | 0.9137 | 0.9403 | 0.9781 | 0.9503 | 0.8163 |
77
- | 70.2867 | 7.0 | 763 | 5.4024 | 0.8731 | 0.9772 | 0.9667 | -1.0 | 0.9635 | 0.9113 | 0.8462 | 0.9001 | 0.6376 | 0.8608 | 0.9275 | 0.9336 | -1.0 | 0.9202 | 0.9471 | 0.9781 | 0.956 | 0.8266 |
78
- | 70.2867 | 8.0 | 872 | 5.2224 | 0.8726 | 0.9809 | 0.9767 | -1.0 | 0.9582 | 0.9069 | 0.8487 | 0.8966 | 0.6472 | 0.8625 | 0.9265 | 0.9301 | -1.0 | 0.9137 | 0.9464 | 0.9875 | 0.9528 | 0.8232 |
79
- | 70.2867 | 9.0 | 981 | 4.7844 | 0.8679 | 0.9821 | 0.9687 | -1.0 | 0.9574 | 0.9023 | 0.8451 | 0.8907 | 0.6382 | 0.8606 | 0.9213 | 0.9283 | -1.0 | 0.9119 | 0.9448 | 0.9844 | 0.952 | 0.8165 |
80
- | 4.2466 | 10.0 | 1090 | 5.1437 | 0.8729 | 0.9816 | 0.9762 | -1.0 | 0.9577 | 0.9028 | 0.8448 | 0.901 | 0.6686 | 0.8605 | 0.9296 | 0.9359 | -1.0 | 0.9203 | 0.9514 | 0.9781 | 0.9567 | 0.8413 |
81
- | 4.2466 | 11.0 | 1199 | 4.5169 | 0.8858 | 0.9828 | 0.9768 | -1.0 | 0.9707 | 0.9162 | 0.8628 | 0.9087 | 0.6734 | 0.8695 | 0.9264 | 0.931 | -1.0 | 0.9121 | 0.95 | 0.9781 | 0.9538 | 0.823 |
82
- | 4.2466 | 12.0 | 1308 | 4.5858 | 0.8813 | 0.9865 | 0.9744 | -1.0 | 0.9623 | 0.9126 | 0.8585 | 0.9041 | 0.6815 | 0.8671 | 0.9308 | 0.9355 | -1.0 | 0.9185 | 0.9526 | 0.9812 | 0.9583 | 0.8308 |
83
- | 4.2466 | 13.0 | 1417 | 4.5345 | 0.8778 | 0.9843 | 0.9726 | -1.0 | 0.957 | 0.9101 | 0.8526 | 0.903 | 0.6754 | 0.8628 | 0.9281 | 0.9335 | -1.0 | 0.9158 | 0.9512 | 0.9812 | 0.9557 | 0.8314 |
84
- | 3.589 | 14.0 | 1526 | 4.3003 | 0.8885 | 0.9857 | 0.9759 | -1.0 | 0.9656 | 0.9189 | 0.8642 | 0.9128 | 0.6957 | 0.8724 | 0.9334 | 0.9375 | -1.0 | 0.9194 | 0.9555 | 0.9875 | 0.959 | 0.8375 |
85
- | 3.589 | 15.0 | 1635 | 4.3999 | 0.8819 | 0.986 | 0.9741 | -1.0 | 0.9606 | 0.9118 | 0.8575 | 0.9064 | 0.6892 | 0.8659 | 0.9283 | 0.9336 | -1.0 | 0.9137 | 0.9534 | 0.9844 | 0.9566 | 0.8245 |
86
- | 3.589 | 16.0 | 1744 | 4.2719 | 0.8796 | 0.986 | 0.9726 | -1.0 | 0.9661 | 0.9093 | 0.8543 | 0.905 | 0.6914 | 0.8649 | 0.927 | 0.9313 | -1.0 | 0.9121 | 0.9505 | 0.9875 | 0.9543 | 0.8266 |
87
- | 3.589 | 17.0 | 1853 | 4.2497 | 0.8838 | 0.9845 | 0.9733 | -1.0 | 0.9656 | 0.9141 | 0.8599 | 0.9077 | 0.6997 | 0.8678 | 0.9295 | 0.9352 | -1.0 | 0.9141 | 0.9562 | 0.9812 | 0.958 | 0.832 |
88
- | 3.589 | 18.0 | 1962 | 4.2807 | 0.8829 | 0.9855 | 0.9754 | -1.0 | 0.9673 | 0.9121 | 0.8558 | 0.9099 | 0.6964 | 0.8683 | 0.9286 | 0.9337 | -1.0 | 0.9126 | 0.9548 | 0.9844 | 0.9555 | 0.8357 |
89
- | 3.2442 | 19.0 | 2071 | 4.1978 | 0.8835 | 0.9861 | 0.9748 | -1.0 | 0.9675 | 0.9121 | 0.8559 | 0.911 | 0.6932 | 0.8691 | 0.9272 | 0.9336 | -1.0 | 0.9134 | 0.9538 | 0.9844 | 0.9557 | 0.8337 |
90
- | 3.2442 | 20.0 | 2180 | 4.1673 | 0.8829 | 0.9858 | 0.9736 | -1.0 | 0.9689 | 0.9125 | 0.857 | 0.9087 | 0.696 | 0.8686 | 0.9299 | 0.9357 | -1.0 | 0.9169 | 0.9545 | 0.9844 | 0.958 | 0.8354 |
91
-
92
-
93
- ### Framework versions
94
-
95
- - Transformers 4.46.0.dev0
96
- - Pytorch 2.5.0+cu124
97
- - Tokenizers 0.20.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ language:
4
+ - ru
5
+ license: apache-2.0
6
+ base_model: PekingU/rtdetr_r50vd_coco_o365
7
+ tags:
8
+ - generated_from_trainer
9
+ model-index:
10
+ - name: RT-DETR Russian car plate detection with classification by type
11
+ results: []
12
+ ---
13
+
14
+ # RT-DETR Russian car plate detection with classification by type
15
+
16
+ This model is a fine-tuned version of [PekingU/rtdetr_r50vd_coco_o365](https://huggingface.co/PekingU/rtdetr_r50vd_coco_o365) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Loss: 4.1673
19
+ - Map: 0.8829
20
+ - Map 50: 0.9858
21
+ - Map 75: 0.9736
22
+ - Map Car-plates-and-these-types: -1.0
23
+ - Map Large: 0.9689
24
+ - Map Medium: 0.9125
25
+ - Map N P: 0.857
26
+ - Map P P: 0.9087
27
+ - Map Small: 0.696
28
+ - Mar 1: 0.8686
29
+ - Mar 10: 0.9299
30
+ - Mar 100: 0.9357
31
+ - Mar 100 Car-plates-and-these-types: -1.0
32
+ - Mar 100 N P: 0.9169
33
+ - Mar 100 P P: 0.9545
34
+ - Mar Large: 0.9844
35
+ - Mar Medium: 0.958
36
+ - Mar Small: 0.8354
37
+
38
+ ## Model description
39
+
40
+ Модель детекции номерных знаков автомобилей РФ, в данный момент 2 класса n_p и p_p, обычные номера и полицейские
41
+
42
+ ## Intended uses & limitations
43
+
44
+ Пример использования:
45
+ <pre>
46
+ from transformers import AutoModelForObjectDetection, AutoImageProcessor
47
+ import torch
48
+ import supervision as sv
49
+
50
+
51
+ DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
52
+ model = AutoModelForObjectDetection.from_pretrained('Garon16/rtdetr_r50vd_russia_plate_detector').to(DEVICE)
53
+ processor = AutoImageProcessor.from_pretrained('Garon16/rtdetr_r50vd_russia_plate_detector')
54
+
55
+ path = 'path/to/image'
56
+ image = Image.open(path)
57
+ inputs = processor(image, return_tensors="pt").to(DEVICE)
58
+ with torch.no_grad():
59
+ outputs = model(**inputs)
60
+ w, h = image.size
61
+ results = processor.post_process_object_detection(
62
+ outputs, target_sizes=[(h, w)], threshold=0.3)
63
+ detections = sv.Detections.from_transformers(results[0]).with_nms(0.3)
64
+ labels = [
65
+ model.config.id2label[class_id]
66
+ for class_id
67
+ in detections.class_id
68
+ ]
69
+
70
+ annotated_image = image.copy()
71
+ annotated_image = sv.BoundingBoxAnnotator().annotate(annotated_image, detections)
72
+ annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels=labels)
73
+
74
+ grid = sv.create_tiles(
75
+ [annotated_image],
76
+ grid_size=(1, 1),
77
+ single_tile_size=(512, 512),
78
+ tile_padding_color=sv.Color.WHITE,
79
+ tile_margin_color=sv.Color.WHITE
80
+ )
81
+ sv.plot_image(grid, size=(10, 10))
82
+ </pre>
83
+
84
+ ## Training and evaluation data
85
+
86
+ Обучал на своём датасете - https://universe.roboflow.com/testcarplate/russian-license-plates-classification-by-this-type
87
+
88
+ ## Training procedure
89
+
90
+ ### Training hyperparameters
91
+
92
+ The following hyperparameters were used during training:
93
+ - learning_rate: 5e-05
94
+ - train_batch_size: 32
95
+ - eval_batch_size: 8
96
+ - seed: 42
97
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
98
+ - lr_scheduler_type: linear
99
+ - lr_scheduler_warmup_steps: 300
100
+ - num_epochs: 20
101
+
102
+ ### Training results
103
+
104
+ | Training Loss | Epoch | Step | Validation Loss | Map | Map 50 | Map 75 | Map Car-plates-and-these-types | Map Large | Map Medium | Map N P | Map P P | Map Small | Mar 1 | Mar 10 | Mar 100 | Mar 100 Car-plates-and-these-types | Mar 100 N P | Mar 100 P P | Mar Large | Mar Medium | Mar Small |
105
+ |:-------------:|:-----:|:----:|:---------------:|:------:|:------:|:------:|:------------------------------:|:---------:|:----------:|:-------:|:-------:|:---------:|:------:|:------:|:-------:|:----------------------------------:|:-----------:|:-----------:|:---------:|:----------:|:---------:|
106
+ | No log | 1.0 | 109 | 64.6127 | 0.035 | 0.0558 | 0.0379 | -1.0 | 0.0039 | 0.0663 | 0.0191 | 0.0508 | 0.0071 | 0.1523 | 0.3009 | 0.3361 | -1.0 | 0.3179 | 0.3543 | 0.7625 | 0.3788 | 0.1157 |
107
+ | No log | 2.0 | 218 | 15.4008 | 0.8237 | 0.9418 | 0.9327 | -1.0 | 0.893 | 0.879 | 0.7945 | 0.8529 | 0.4319 | 0.8203 | 0.8924 | 0.9018 | -1.0 | 0.8766 | 0.9269 | 0.9656 | 0.9324 | 0.7653 |
108
+ | No log | 3.0 | 327 | 9.4050 | 0.8439 | 0.9566 | 0.9479 | -1.0 | 0.9439 | 0.8908 | 0.8158 | 0.872 | 0.5171 | 0.8416 | 0.908 | 0.9144 | -1.0 | 0.9002 | 0.9286 | 0.9781 | 0.9368 | 0.8051 |
109
+ | No log | 4.0 | 436 | 7.9164 | 0.8493 | 0.9665 | 0.9543 | -1.0 | 0.9567 | 0.8903 | 0.8338 | 0.8648 | 0.5581 | 0.8481 | 0.9159 | 0.9267 | -1.0 | 0.9173 | 0.936 | 0.975 | 0.949 | 0.8185 |
110
+ | 70.2867 | 5.0 | 545 | 6.8177 | 0.8525 | 0.9723 | 0.9602 | -1.0 | 0.9521 | 0.8918 | 0.8234 | 0.8816 | 0.6025 | 0.8438 | 0.9214 | 0.9279 | -1.0 | 0.9181 | 0.9378 | 0.975 | 0.9492 | 0.8211 |
111
+ | 70.2867 | 6.0 | 654 | 6.0182 | 0.854 | 0.9744 | 0.9619 | -1.0 | 0.9574 | 0.8912 | 0.8251 | 0.8829 | 0.6123 | 0.8438 | 0.9176 | 0.927 | -1.0 | 0.9137 | 0.9403 | 0.9781 | 0.9503 | 0.8163 |
112
+ | 70.2867 | 7.0 | 763 | 5.4024 | 0.8731 | 0.9772 | 0.9667 | -1.0 | 0.9635 | 0.9113 | 0.8462 | 0.9001 | 0.6376 | 0.8608 | 0.9275 | 0.9336 | -1.0 | 0.9202 | 0.9471 | 0.9781 | 0.956 | 0.8266 |
113
+ | 70.2867 | 8.0 | 872 | 5.2224 | 0.8726 | 0.9809 | 0.9767 | -1.0 | 0.9582 | 0.9069 | 0.8487 | 0.8966 | 0.6472 | 0.8625 | 0.9265 | 0.9301 | -1.0 | 0.9137 | 0.9464 | 0.9875 | 0.9528 | 0.8232 |
114
+ | 70.2867 | 9.0 | 981 | 4.7844 | 0.8679 | 0.9821 | 0.9687 | -1.0 | 0.9574 | 0.9023 | 0.8451 | 0.8907 | 0.6382 | 0.8606 | 0.9213 | 0.9283 | -1.0 | 0.9119 | 0.9448 | 0.9844 | 0.952 | 0.8165 |
115
+ | 4.2466 | 10.0 | 1090 | 5.1437 | 0.8729 | 0.9816 | 0.9762 | -1.0 | 0.9577 | 0.9028 | 0.8448 | 0.901 | 0.6686 | 0.8605 | 0.9296 | 0.9359 | -1.0 | 0.9203 | 0.9514 | 0.9781 | 0.9567 | 0.8413 |
116
+ | 4.2466 | 11.0 | 1199 | 4.5169 | 0.8858 | 0.9828 | 0.9768 | -1.0 | 0.9707 | 0.9162 | 0.8628 | 0.9087 | 0.6734 | 0.8695 | 0.9264 | 0.931 | -1.0 | 0.9121 | 0.95 | 0.9781 | 0.9538 | 0.823 |
117
+ | 4.2466 | 12.0 | 1308 | 4.5858 | 0.8813 | 0.9865 | 0.9744 | -1.0 | 0.9623 | 0.9126 | 0.8585 | 0.9041 | 0.6815 | 0.8671 | 0.9308 | 0.9355 | -1.0 | 0.9185 | 0.9526 | 0.9812 | 0.9583 | 0.8308 |
118
+ | 4.2466 | 13.0 | 1417 | 4.5345 | 0.8778 | 0.9843 | 0.9726 | -1.0 | 0.957 | 0.9101 | 0.8526 | 0.903 | 0.6754 | 0.8628 | 0.9281 | 0.9335 | -1.0 | 0.9158 | 0.9512 | 0.9812 | 0.9557 | 0.8314 |
119
+ | 3.589 | 14.0 | 1526 | 4.3003 | 0.8885 | 0.9857 | 0.9759 | -1.0 | 0.9656 | 0.9189 | 0.8642 | 0.9128 | 0.6957 | 0.8724 | 0.9334 | 0.9375 | -1.0 | 0.9194 | 0.9555 | 0.9875 | 0.959 | 0.8375 |
120
+ | 3.589 | 15.0 | 1635 | 4.3999 | 0.8819 | 0.986 | 0.9741 | -1.0 | 0.9606 | 0.9118 | 0.8575 | 0.9064 | 0.6892 | 0.8659 | 0.9283 | 0.9336 | -1.0 | 0.9137 | 0.9534 | 0.9844 | 0.9566 | 0.8245 |
121
+ | 3.589 | 16.0 | 1744 | 4.2719 | 0.8796 | 0.986 | 0.9726 | -1.0 | 0.9661 | 0.9093 | 0.8543 | 0.905 | 0.6914 | 0.8649 | 0.927 | 0.9313 | -1.0 | 0.9121 | 0.9505 | 0.9875 | 0.9543 | 0.8266 |
122
+ | 3.589 | 17.0 | 1853 | 4.2497 | 0.8838 | 0.9845 | 0.9733 | -1.0 | 0.9656 | 0.9141 | 0.8599 | 0.9077 | 0.6997 | 0.8678 | 0.9295 | 0.9352 | -1.0 | 0.9141 | 0.9562 | 0.9812 | 0.958 | 0.832 |
123
+ | 3.589 | 18.0 | 1962 | 4.2807 | 0.8829 | 0.9855 | 0.9754 | -1.0 | 0.9673 | 0.9121 | 0.8558 | 0.9099 | 0.6964 | 0.8683 | 0.9286 | 0.9337 | -1.0 | 0.9126 | 0.9548 | 0.9844 | 0.9555 | 0.8357 |
124
+ | 3.2442 | 19.0 | 2071 | 4.1978 | 0.8835 | 0.9861 | 0.9748 | -1.0 | 0.9675 | 0.9121 | 0.8559 | 0.911 | 0.6932 | 0.8691 | 0.9272 | 0.9336 | -1.0 | 0.9134 | 0.9538 | 0.9844 | 0.9557 | 0.8337 |
125
+ | 3.2442 | 20.0 | 2180 | 4.1673 | 0.8829 | 0.9858 | 0.9736 | -1.0 | 0.9689 | 0.9125 | 0.857 | 0.9087 | 0.696 | 0.8686 | 0.9299 | 0.9357 | -1.0 | 0.9169 | 0.9545 | 0.9844 | 0.958 | 0.8354 |
126
+
127
+
128
+ ### Framework versions
129
+
130
+ - Transformers 4.46.0.dev0
131
+ - Pytorch 2.5.0+cu124
132
+ - Tokenizers 0.20.1