/ Модель

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

Лицензия
Apache 2.0
Библиотека
onnx
Опубликована
27 сен 2026

electrical-circuit-connectivity

Сегментация изображенийИзображение → mask3 профессии

CircuitNet-0.6 — модель сегментации электрических планов, которая обнаруживает устройства и восстанавливает связи между ними для анализа цепей и подсчёта проводки.

60скачиваний за 30 дней1лайквеса обновлены2 ноя 2026

Бенчмарки

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

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

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

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

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

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

Electrical circuit connectivity — компактная модель CircuitNet-0.6 от Constructelligence для анализа электрических планов. Она принимает изображения планов этажей, в том числе сканы, фотографии и растровые рендеры PDF, и определяет электрические устройства, линии проводки и связи между устройствами, группируя их в цепи. Модель обучена на синтетических листах и опубликованных чертежах для США и Великобритании.

Модель построена на U-Net с 1,7 млн параметров и распространяется в формате ONNX. Она формирует карты центров 12 классов символов и стрелок home run, а также маску проводки; декодер преобразует результаты в граф связей. Поддерживаются розетки, выключатели, светильники, знаки выхода, распределительные коробки и другие символы. Выход включает обнаруженные устройства, связи и приблизительную длину проводки на листе.

Модель предназначена для помощи при подсчёте объёмов работ и проверке чертежей. На реальных американских листах качество обнаружения устройств умеренное, а F1 для линий проводки составил 0,541; результаты зависят от стиля чертежа. Текст на планах, включая номера цепей и обозначения щитов, не распознаётся; оценка длины дана в пикселях и требует масштаба листа. Результат не является проверкой соответствия нормам или исполнительной схемой. Лицензия Apache-2.0.

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

  • поиск розеток, выключателей и светильников на электрическом плане
  • восстановление связей между устройствами и группировка их по цепям
  • определение линий home run на чертежах электроснабжения
  • оценка длины проводки по растровому листу с известным масштабом
  • помощь при подсчёте объёмов работ и проверке электрических чертежей

Ограничения

На реальных чертежах точность умеренная и зависит от стиля оформления; текстовые обозначения цепей и щитов не распознаются. Длина проводки измеряется в пикселях, а схема не подтверждает соответствие нормам и не заменяет исполнительный чертёж.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

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

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

Открыть на Hugging Face

Electrical circuit connectivity (circuits-0.6)

Trained for UK and US electrical drawings. Reads an electrical floor plan (scan, photo or PDF render of an E-sheet) and returns which devices are on which circuit: every receptacle, switch, light fixture, exit sign and junction box it finds, the wiring runs drawn between them, which circuits have a home run, and roughly how much wiring each circuit draws on the sheet.

This is a lite model, trained on synthetic sheets and openly published public drawing sets. It is released for research and evaluation. Constructelligence is developing frontier construction-AI models — this open kit is the lite tier, and the company's proprietary production models are available at constructelligence.co.

It is a drafting aid for takeoff and review. It is not a code-compliance check and it is not an as-built. It reads what is drawn. Accuracy on real sheets is moderate and varies with drafting style (see Results on real E-sheets).

How it works

How it works

  1. CircuitNet is a 1.7M-parameter U-Net that takes grayscale input and produces stride-2 outputs:
    • peaks: 13 per-class centre heatmaps, already 3×3-NMS'd (12 symbol classes plus the home-run arrowhead).
    • size: log box size.
    • wire: a single wiring mask. Arcs and home-run lines appear as continuous centre lines, dashed runs are bridged, and walls, door swings, dimension strings and conductor hash marks are excluded.
  2. decode.py turns those outputs into a graph:
    • It cuts the mask at every symbol so each drawn run becomes its own stroke, thins the strokes and builds a skeleton graph.
    • It resolves crossings: at an X, the two straightest continuations pair up, so runs that cross without a dot stay separate circuits. A dead-straight pair of arms next to a symbol is a run passing by, not landing on it.
    • Stroke ends land on symbols or arrowheads, and a union-find groups the devices into circuits.

Classes: receptacle, gfci_receptacle, switch, switch_3way, ceiling_fixture, downlight, troffer, strip_light, exit_sign, junction_box, panelboard, data_outlet, homerun_arrow. data_outlet and panelboard are detected but never wired: data is low voltage, and panels are fed by home runs.

Results

These are measured on 800 held-out synthetic 512×512 sheets (seeds never used in training), with scan degradation applied: noise, blur, JPEG, thresholding and faded contrast.

modeldecoder on perfect inputs (ceiling)nearest-neighbour baseline
Wiring runs F10.8360.9020.323
Same-circuit pair F10.8170.8390.247
Circuits reproduced exactly60.0%70.7%2.3%
Home runs found90.8%95.9%—
Symbols F1 (all classes)0.9661.0001.000
  • Decoder on perfect inputs feeds the decoder the ground-truth wire mask and symbol boxes. The gap between the model column and this one is the model's error, and the gap between this column and 1.0 is the decoder's.
  • Nearest-neighbour baseline uses ground-truth symbols and wires each device to its nearest neighbour. It shows what you would get without reading the wiring at all.

Per-class symbol detection:

classGT boxesprecisionrecallF1
receptacle110000.9610.9990.979
gfci_receptacle15950.9840.8700.923
switch20080.8940.9060.900
switch_3way6770.9630.8520.904
ceiling_fixture8840.9340.8290.878
downlight40520.9420.9810.961
troffer42660.9950.9970.996
strip_light10170.9900.9970.994
exit_sign9630.9930.9750.984
junction_box1330.7160.5110.597
panelboard191.0000.4740.643
data_outlet2600.9960.9650.981
homerun_arrow72570.9560.9950.975

Measured results

Results on real E-sheets (held out)

United States. The model was tested on 5 plan regions from 4 real US sheets it never trained on (Colusa County Admin Office lighting plans, Town of Windsor Highway Garage lighting and power plans). That's 439 circuited devices and 284 drawn runs.

The ground truth is read from each PDF's own vector geometry: circuit-layer strokes are the runs, their ends on fixture symbols are the devices (CAD bends contracted), and filled arrowheads mark home runs. Every sheet was checked for 100% ink alignment. Each region was run at the page's default symbol size, with no per-sheet tuning.

real sheets, pooledcircuits-0.6circuits-0.1 (synthetic only)
Circuited devices found0.7360.731
Wiring runs F10.5410.343
Wiring runs precision0.5230.267
Same-circuit pair F10.7590.606
Same-circuit pair precision0.7190.604
Home runs found0.3380.238

Home runs use a second, coarser pass for large arrowheads (arrow_scale in decoder_config.json, on by default in predict.py) and dashed runs are bridged (dash_gap). Single pass only (--arrow-scale 1): home runs found 0.138, arrow F1 0.209.

regionGT devicesGT runsdevices foundruns F1pair F1home runs
colusa-e11#0112840.800.630.880.36
colusa-e11a#0100780.840.640.850.36
colusa-e11a#11151.000.461.000.00
windsor-e101#0116750.720.500.420.00
windsor-e103#0100420.550.250.900.02

This is still far below the synthetic numbers, so check real output against the drawing. Home-run detection on real sheets is the weakest part.

United Kingdom. Two held-out UK lighting layouts by two different design firms, drafted to BS EN 60617 (a school refurbishment in Cardiff and a basement lighting layout in Camden, London): 187 circuited devices and 141 drawn runs, scored exactly like the US sheets.

UK sheets, pooledcircuits-0.6circuits-0.3 (US-only training)
Circuited devices found0.7430.449
Wiring runs F10.1880.047
Same-circuit pair F10.4970.056
Home runs found0.6670.333
regionGT devicesGT runsdevices foundruns F1pair F1home runs
uk-cardiff-gf#0114800.870.330.790.67
uk-camden-streat#073610.550.000.040.00

UK accuracy is lower than US and varies by firm: on the Camden layout the model finds about half the devices but reads none of the runs correctly yet.

Harder synthetic sheets (v2 generator: type tags, ceiling grids, clouds, long linear fixtures), 400 held out: runs F1 0.797, pair F1 0.800, symbols F1 0.943, home runs 87.6%.

Use

pip install onnxruntime numpy pillow
python predict.py plan.png --symbol-px 20 --out circuits.png --json circuits.json

--symbol-px sets the sheet scale: 20 suits a PDF rendered at 150 dpi (tuned on real sheets). The model saw symbols of about 12–24 px, and the script rescales the sheet to match. Sheets of any size are processed in overlapping 512 px tiles. The same ONNX also runs in the browser with onnxruntime-web.

Training data

The model trained first on synthetic sheets with exact ground truth, then was fine-tuned on a mix of new synthetic sheets and real public drawing sets. Real training labels come from the PDFs' vector geometry, with no hand labelling:

  • US wired sheets (5): Pender County Hampstead Annex; SW Polk Fire District Rickreall Station; Sparks.
  • UK wired sheets (8): Derbyshire Fire & Rescue temporary accommodation; Saunders Interiors, 12 Madrid Road London SW13; Seaford Town Council, Martello Cafe & Public Toilets.
  • Philippine wired sheets (1): Southern Leyte State University.
  • Negatives (15): architectural, mechanical, plumbing and reflected-ceiling sheets, and sheets that give circuits by tag with no drawn runs (a common UK convention). They teach "no devices" or "no drawn wiring".

The real test sheets were never used for training.

The synthetic sheets contain:

  • Background: a screened architectural layer with walls (outlined, filled or hatched), doors and door swings, windows, furniture, room tags, column grid bubbles, keynote hexagons and dimension strings.
  • Symbols: NECA/ANSI-style devices in several drafting styles; 30% of sheets drafted UK-style (BS EN 60617: semicircle sockets, switch levers, cross-in-circle lamps, dashed switching links, DB/circuit tags); 10% German-style (DIN EN 60617-11: protective-earth sockets, conductor ticks, NYM cable callouts, UV/F tags). German drawings were synthetic only: there is no German real-sheet evaluation; 5% Australian/NZ-style (AS/NZS 1102: double GPOs, L3.5-style board.circuit tags); 5% Indian-style (IS 732 point wiring: fans and tube lights wired back to wall switchboards); these styles were synthetic only (no held-out real sheets from those countries), so no accuracy is claimed for them.
  • Circuits: runs drawn curved, straight or orthogonal, some dashed, some with conductor hash marks and neutral ticks. Home-run arrows are single or double, with circuit tags.
  • Routing rules a drafter follows: runs route around other symbols, and arrowheads never touch another run.

The real sheets are public bid, tender and planning documents published by public bodies in the US, UK, Australia, Canada and the Philippines. They were used to train and evaluate and are not redistributed here.

This repository is inference-only: ONNX weights, the graph decoder and an example. Training code and the synthetic sheet generator are not published.

Limitations

  • Real-sheet accuracy is moderate (see the real results above), and it varies a lot by drafting style. Expect misses on symbol styles it hasn't seen. Stroke ends that reach no recognised symbol become "unrecognized" devices, so connectivity survives a missed symbol, but the device type is unknown.
  • Text is not read. Circuit numbers beside home runs, panel names and switch letters are not OCR'd, so a circuit is "a group of connected devices with or without a home run", not "LP-1-12".
  • Shallow crossings and tangent arcs are where the decoder still merges or splits circuits. That is the ceiling column above.
  • Wiring length is measured on the drawing in pixels. It becomes feet only once you apply the sheet scale, and drawn arcs are schematic, not routed conduit.

Files

  • circuits.onnx: the model. Input image is [N,1,H,W] grayscale 0–255 with H and W multiples of 32. Outputs are peaks, size and wire at H/2 × W/2.
  • decode.py: the graph decoder (pure Python and NumPy).
  • decoder_config.json: the decoder's settings (thresholds, distances), tuned on real sheets.
  • predict.py: command-line example (onnxruntime only).
  • config.json: classes, strides, decoder thresholds and metrics.
  • example.png / example-circuits.png: a held-out test sheet and the model's reading of it.

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

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

GPU в ailist

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

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

В репозитории нет весов в формате PyTorch/safetensors.

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

0 моделей