Downloads · 30 days
20
2% of all-time downloads
Garon16/rtdetr_r50vd_russia_plate_detector_lightning
rtdetr_r50vd_russia_plate_detector_lightning is a object detection model from Garon16. Use it when you need objects located in an image. It is set up for transformers. The card lists the license as apache-2.0.
Модель детекции номерных знаков автомобилей РФ, в данный момент 2 класса np и pp, обычные номера и полицейские
Downloads · 30 days
20
2% of all-time downloads
All-time downloads
896
Public
Parameters
42.9M
343 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors172 MB · 100%
From the Hugging Face model README
Модель детекции номерных знаков автомобилей РФ, в данный момент 2 класса n_p и p_p, обычные номера и полицейские
Пример использования:
<pre> 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_lightning').to(DEVICE) processor = AutoImageProcessor.from_pretrained('Garon16/rtdetr_r50vd_russia_plate_detector_lightning') 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)) </pre>Обучал на своём датасете - https://universe.roboflow.com/testcarplate/russian-license-plates-classification-by-this-type
The following hyperparameters were used during training:
Пока не разобрался, как при дообучении лайтингом автоматом всё отправить сюда