Skip to content
Other

Tracera

детекция дефектов печатных плат на базе YOLO11s

2 min readupdated

Модель Tracera от автора ebboo находит и классифицирует шесть типов поверхностных дефектов на фотографиях печатных плат (PCB): отсутствующие отверстия, выкусы, обрывы дорожек, короткие замыкания, заусенцы и лишнюю медь. В основе лежит компактная архитектура yolo11s с высоким входным разрешением 1024×1024, обученная на датасете PKU-Market-PCB со строгим разделением по дизайнам плат, чтобы исключить утечку фоновых данных между обучением и тестом. Помимо стандартного чекпоинта PyTorch, в репозиторий сразу включены квантованная (сжатая до 8-битных целых чисел для ускорения) версия OpenVINO INT8 для процессоров и ONNX-файл для запуска прямо в браузере. Инструмент пригодится разработчикам систем визуального контроля электроники, студентам и инженерам, создающим веб- или десктоп-приложения для инспекции плат.

Ключевые особенности

  • 6 классов дефектов: распознаёт missing_hole, mouse_bite, open_circuit, short, spur и spurious_copper.
  • Три формата из коробки: PyTorch (18.37 MB), лёгкий OpenVINO INT8 (9.97 MB) для CPU и ONNX FP32 (36.43 MB) для WebGPU и WebView.
  • Поддержка объяснимости (XAI): в интерфейсе проекта решения модели визуализируются через LayerCAM на 4-м слое, подсвечивая область дефекта.
  • Готовые константы постобработки: в файле meta.json зафиксированы оптимальные пороги conf=0.395 и iou_nms=0.7.

Что можно сделать

  • Встроить в десктоп-приложение на CPU: использовать сборку OpenVINO INT8 в связке с FastAPI или Tauri для локальной проверки снимков плат без видеокарты (~22.9 FPS на Ryzen 7 8845HS).
  • Запустить прямо в браузере или Android WebView: подключить tracera_1024.onnx через ONNX Runtime Web, реализовав фильтрацию боксов (NMS) на стороне клиента.
  • Исследовать работу детектора: загрузить веса last.pt через ultralytics для анализа градиентов LayerCAM и проверки работы на собственных изображениях плат.

Пример

from huggingface_hub import snapshot_download
from ultralytics import YOLO

weights_dir = snapshot_download(repo_id="ebboo/tracera-model")
model = YOLO(f"{weights_dir}/last.pt")
results = model.predict("pcb.jpg", imgsz=1024, conf=0.395, iou=0.7)
Подробнее Метрики на отложенном тесте (2 дизайна плат, 93 фото): mAP50 = 0.9225, mAP50-95 = 0.4740, F1 = 0.8101 при conf=0.395; на 5-фолдовой кросс-валидации mAP50 = 0.8575 ± 0.1523.
Скорость на ноутбуке: 67.4 FPS в PyTorch FP32 (RTX 4060 Laptop) и 22.9 FPS в OpenVINO INT8 (Ryzen 7 8845HS).
Обучение: 80 эпох, пиковое потребление VRAM при обучении — 5.14 ГБ.
Ограничения: модель обучена на студийных снимках сверху с синтетическими дефектами из 10 дизайнов PKU-Market-PCB; при съёмке с рук под углом или при переходе на реальные промышленные данные AOI точность снижается. Лицензия AGPL-3.0.
Discuss Telegram 0 31

Will it run?

Runs in BF16

Fits without quantisation.

  • BF16weights 0.0 GB · ready files0.5 GB
  • FP8 / INT8recommendedweights 0.0 GB0.5 GB
  • 4-bitweights 0.0 GB0.5 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: FP8 / INT8 — from RTX 2060 · BF16 — from RTX 2060

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # ebboo/tracera-model
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download ebboo/tracera-model --local-dir ~/models/tracera-model
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to tracera-model
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of tracera-model (quants, finetunes, LoRAs) will show up under the bell.

No known relatives of this model yet. All derivatives on Hugging Face

About the model

ebboo/tracera-model
Author
ebboo
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

310

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments