RT-DETR Russian car plate detection with classification by type
This model is a fine-tuned version of PekingU/rtdetr_r50vd_coco_o365 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 4.1673
- Map: 0.8829
- Map 50: 0.9858
- Map 75: 0.9736
- Map Car-plates-and-these-types: -1.0
- Map Large: 0.9689
- Map Medium: 0.9125
- Map N P: 0.857
- Map P P: 0.9087
- Map Small: 0.696
- Mar 1: 0.8686
- Mar 10: 0.9299
- Mar 100: 0.9357
- Mar 100 Car-plates-and-these-types: -1.0
- Mar 100 N P: 0.9169
- Mar 100 P P: 0.9545
- Mar Large: 0.9844
- Mar Medium: 0.958
- Mar Small: 0.8354
Model description
Модель детекции номерных знаков автомобилей РФ, в данный момент 2 класса n_p и p_p, обычные номера и полицейские
Intended uses & limitations
Пример использования:
from transformers import AutoModelForObjectDetection, AutoImageProcessor import torch import supervision as sv DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") model = AutoModelForObjectDetection.from_pretrained('Garon16/rtdetr_r50vd_russia_plate_detector').to(DEVICE) processor = AutoImageProcessor.from_pretrained('Garon16/rtdetr_r50vd_russia_plate_detector') path = 'path/to/image' image = Image.open(path) inputs = processor(image, return_tensors="pt").to(DEVICE) with torch.no_grad(): outputs = model(**inputs) w, h = image.size results = processor.post_process_object_detection( outputs, target_sizes=[(h, w)], threshold=0.3) detections = sv.Detections.from_transformers(results[0]).with_nms(0.3) labels = [ model.config.id2label[class_id] for class_id in detections.class_id ] annotated_image = image.copy() annotated_image = sv.BoundingBoxAnnotator().annotate(annotated_image, detections) annotated_image = sv.LabelAnnotator().annotate(annotated_image, detections, labels=labels) grid = sv.create_tiles( [annotated_image], grid_size=(1, 1), single_tile_size=(512, 512), tile_padding_color=sv.Color.WHITE, tile_margin_color=sv.Color.WHITE ) sv.plot_image(grid, size=(10, 10))
Training and evaluation data
Обучал на своём датасете - https://universe.roboflow.com/testcarplate/russian-license-plates-classification-by-this-type
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 8
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 300
- num_epochs: 20
Training results
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Framework versions
- Transformers 4.46.0.dev0
- Pytorch 2.5.0+cu124
- Tokenizers 0.20.1
- Downloads last month
- 161
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for Garon16/rtdetr_r50vd_russia_plate_detector
Base model
PekingU/rtdetr_r50vd_coco_o365