/ Модель

Характеристики

Лицензия
Apache 2.0
Базовая модель
rf-detr-base
Опубликована
21 июл 2026

rfdetr-pid-detector

Поиск объектовИзображение → bounding_boxes

Модель обнаруживает символы арматуры и другого оборудования на изображениях технологических схем P&ID для последующей автоматической оцифровки.

0скачиваний за 30 дней1лайквеса обновлены1 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

RF-DETR P&ID Symbol Detector — модель обнаружения объектов на изображениях, разработанная dimtri009 путём дообучения RF-DETR Base. Она находит графические символы на технологических схемах P&ID и предназначена для использования как первый этап автоматической оцифровки таких схем. Модель обучена 10 эпох на пользовательском наборе данных из 32 классов символов; финальным чекпойнтом выбраны веса EMA. Для больших чертежей, отрисованных с высоким разрешением, поддерживается обработка фрагментами с помощью SAHI.

В карточке заявлены mAP@50 99,96%, mAP@50:95 97,89%, точность 99,97% и полнота 99,00%. Модель выдаёт классы объектов и их расположение на изображении. Она специализирована на символах P&ID, поэтому её показатели не следует переносить на другие типы изображений. Распространяется под лицензией Apache-2.0.

Сценарии применения

  • поиск символов клапанов на схемах P&ID
  • обнаружение и локализация оборудования на промышленных схемах
  • обработка больших чертежей P&ID фрагментами через SAHI
  • подготовка схем P&ID к последующему распознаванию и оцифровке

Ограничения

Модель специализирована на 32 классах символов P&ID и не предназначена для обнаружения произвольных объектов. Заявленные показатели относятся к пользовательскому набору данных; независимые результаты на других чертежах в карточке не приведены.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

RF-DETR P&ID Symbol Detector

A fine-tuned RF-DETR model for detecting Process & Instrumentation Diagram (P&ID) symbols.

The model was developed as part of the paper:

Towards Automated P&ID Digitization: Graph-Based OCR Consolidation and Global Symbol–Tag Association
Accepted at ACM Symposium on Document Engineering (DocEng 2026).

The detector recognizes the graphical symbols appearing in industrial P&IDs and is intended as the first stage of a complete P&ID digitization pipeline.


Training

The model was fine-tuned for 10 epochs on a custom P&ID symbol dataset containing 32 symbol classes. During training, both the base model and its Exponential Moving Average (EMA) weights were monitored. The EMA model was selected as the final checkpoint because it consistently achieved higher detection performance.


Detected Classes

The model detects the following classes:

IDClass
0Not_used
1Gate_Valve
2Ball_Valve
3Globe_valve_NO
4Gate_valve_NO
5Globe_valve_NO
6Butterfly_valve
7Plug_valve
8Check_valve
9Diaphragm_valve
10Needle_valve
11Half_Filled_Gate_Valve
12Gate_Valve_NC
13Globle_valve_NC
14Control_Valve
15Rotary_Valve
16Ball_valve_NC
17Paddle_blind
18Spectacle_blind_Closed
19Spectacle_blind_Open
20Reducer
21Flange_or_Nozzle
22Rupture_disk
23Pipe_Insulation_or_Tracing
24Flow_Arrow
25Sight_glass
26Instrument_Field
27Instrument_Field
28Instrument_Panel
29Instrument_Aux_Panel
30Box
31Instrument_Panel
32Box

Installation

pip install rfdetr supervision

For tiled inference:

pip install sahi

Load the model

from rfdetr import RFDETRBase

model = RFDETRBase(
    pretrain_weights="checkpoint_best_total.pth"
)

Inference (without SAHI)

import cv2
import supervision as sv

image = cv2.imread("image.png")

detections = model.predict(
    image,
    threshold=0.5
)

labels = [
    f"{CLASS_NAMES[c]} {conf:.2f}"
    for c, conf in zip(
        detections.class_id,
        detections.confidence
    )
]

annotated = image.copy()

annotated = sv.BoxAnnotator().annotate(
    annotated,
    detections
)

annotated = sv.LabelAnnotator().annotate(
    annotated,
    detections,
    labels
)

sv.plot_image(annotated)

Inference using SAHI

For very large engineering drawings (typically PDF pages rendered at high resolution), tiled inference significantly improves recall.

Recommended parameters:

  • Slice size: 1280 × 1280
  • Overlap: 20%
from sahi import AutoDetectionModel
from sahi.predict import get_sliced_prediction

detection_model = AutoDetectionModel.from_pretrained(
    model_type="roboflow",
    model=model,
    confidence_threshold=0.5,
    category_mapping=CLASS_NAMES,
    device="cuda",
)

result = get_sliced_prediction(
    image,
    detection_model=detection_model,
    slice_height=1280,
    slice_width=1280,
    overlap_height_ratio=0.2,
    overlap_width_ratio=0.2,
)

The resulting detections are available in

result.object_prediction_list

or can be converted into Supervision detections for visualization.


Example

Without SAHI:

Large drawings may miss small symbols.

With SAHI:

Large drawings are processed tile-by-tile, improving the detection of small symbols and densely packed regions.

📊 Test Performance

Overall Performance

MetricScore
mAP@0.50:0.9597.89%
mAP@0.5099.96%
Precision99.97%
Recall99.00%

Per-Class Performance

ClassmAP@50:95mAP@50PrecisionRecall
Gate_Valve0.99061.00001.00000.99
Ball_Valve0.99080.99991.00000.99
Globe_valve_NO0.99041.00001.00000.99
Gate_valve_NO0.98961.00001.00000.99
Butterfly_valve0.97511.00001.00000.99
Plug valve0.97751.00001.00000.99
Check_valve0.98051.00001.00000.99
Diaphragm_valve0.98121.00001.00000.99
Needle_valve0.99501.00001.00000.99
Half_Filled_Gate_Valve0.99151.00001.00000.99
Gate_Valve_NC0.98811.00001.00000.99
Globle_valve_NC0.99131.00001.00000.99
Control_Valve1.00001.00001.00000.99
Rotary_Valve0.95191.00001.00000.99
Ball_valve_NC0.96081.00001.00000.99
Paddle_blind0.96061.00001.00000.99
Spectacle_blind_Closed0.96271.00001.00000.99
Spectacle_blind_Open0.96510.99991.00000.99
Reducer0.98641.00001.00000.99
Flange_or_Nozzle0.94450.99011.00000.99
Rupture_disk0.98430.99971.00000.99
Pipe_Insulation_or_Tracing0.98641.00001.00000.99
Flow_Arrow0.94471.00001.00000.99
sight_glass0.99011.00001.00000.99
Instrument_Field0.98810.99980.99820.99
Instrument_Panel0.98900.99990.99470.99
Instrument_Aux_Panel0.98750.99990.99820.99
Box0.94821.00000.99810.99

🚀 Highlights

  • 33 P&ID symbol classes
  • mAP@50: 99.96%
  • mAP@50:95: 97.89%
  • Precision: 99.97%
  • Recall: 99.00%
  • Control Valve achieved perfect detection performance (100% mAP).
  • More than 85% of the classes achieved a mAP@50:95 greater than 98%.
  • The EMA model consistently outperformed the base model during training and was selected as the final released checkpoint.
  • Optimized for high-resolution P&ID drawings and compatible with SAHI for sliced inference on large engineering diagrams.

Citation

If you use this model in your research, please cite:

@inproceedings{10.1145/3820755.3832800,
author = {Dimitri Romaric, Nguinwa Mbakop and Marinai, Simone},
title = {Towards Automated P&ID Digitization: Graph-Based OCR Consolidation and Global Symbol-Tag Association},
year = {2026},
isbn = {9798400727863},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3820755.3832800},
doi = {10.1145/3820755.3832800},
abstract = {Piping and Instrumentation Diagrams (P&IDs) are essential engineering documents, but many remain available only as scanned PDFs, limiting their integration into digital workflows. Automatic extraction of structured information from these drawings is challenging due to large document sizes, small text annotations, and ambiguous symbol-tag relationships.This paper presents an end-to-end framework for automatic instrument-tag extraction and association from scanned P&IDs. A tiled OCR strategy with graph-based text merging improves text completeness and reconstructs fragmented engineering tags. For symbol detection, an RF-DETR model fine-tuned on the Dataset-P&ID benchmark achieves 99.96\% mAP@50 and 99.97\% precision, while SAHI-based inference slicing improves performance on large drawings.To automate symbol-tag association, we formulate the problem as a minimum-cost bipartite matching task that combines geometric, semantic, and spatial cues and solves it globally using the Hungarian algorithm. Results on Dataset-P&ID demonstrate accurate tag reconstruction, highly reliable symbol-tag associations, and a substantial reduction in manual annotation effort, providing an effective foundation for large-scale P&ID digitization. The code is available at https://github.com/dimitri009/STA.},
booktitle = {Proceedings of the 2026 ACM Symposium on Document Engineering},
articleno = {26},
numpages = {4},
keywords = {Document Digitization, OCR, Engineering Drawing Analysis, Symbol Detection, Information Extraction, Hungarian Algorithm},
location = {
},
series = {DocEng '26}
}

Acknowledgements

This model is built upon the excellent RF-DETR object detector and supports tiled inference through SAHI.


License

Please refer to the license accompanying this repository.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
bc41b7c

0 моделей