/ Модель

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

Лицензия
Своя лицензия
Архитектура
rfdetr-medium · dense
Опубликована
23 сен 2026

2dplan2strct

Поиск объектовИзображение → bounding_boxes3 профессии
308скачиваний за 30 дней1лайквеса обновлены23 сен 2026

Описание модели

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

RF-DETR Medium обнаруживает стены, комнаты, двери и окна на изображениях архитектурных планов и возвращает рамки объектов с оценками уверенности.

OsamaMo/2dplan2strct — модель обнаружения объектов на основе RF-DETR Medium, предназначенная для анализа изображений архитектурных планов. Она находит стены, комнаты, двери и окна, а для каждого объекта возвращает метку класса, оценку уверенности и ограничивающую рамку в координатах исходного изображения. Результаты можно получить в JSON и в виде PNG с нанесёнными рамками; стены и комнаты не сегментируются по пикселям.

Модель принимает RGB-изображения планов и выполняет детекцию при разрешении 576 пикселей. В README приведены результаты проверки на 2 964 отложенных изображениях планов: mAP@0.5 — 94,52%, mAP@0.5:0.95 — 82,58%, F1 — 91,86%. Точность может меняться в зависимости от стиля чертежа, качества скана и порога уверенности; возможны перекрывающиеся рамки, а оценки модели не являются калиброванными вероятностями. Локальный инференс доступен после загрузки весов. Указано применение для некоммерческих исследований и оценки; лицензия в метаданных обозначена как other, поэтому условия использования следует сверить с соответствующими условиями модели.

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

  • поиск стен и помещений на изображении плана
  • обнаружение дверей и окон в архитектурном чертеже
  • автоматическая разметка планов помещений рамками объектов
  • получение структурированного JSON с объектами плана для последующей обработки

Ограничения

Модель выдаёт ограничивающие рамки, а не маски сегментации; рамки могут перекрываться, а оценки уверенности не калиброваны. Результаты зависят от стиля чертежа, качества скана и выбранного порога; заявленные метрики относятся к валидационному набору.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

2DPlan2Strct

From Floor Plan Images to Structured Architectural Understanding

Detect walls, rooms, doors, and windows in 2D floor-plan images. Inference runs locally after the weights are downloaded from Hugging Face. It returns a JSON file with detections and an annotated PNG. Walls and rooms are represented by bounding boxes, not segmentation masks.

Before and after detection

Before detectionAfter detection
Floor plan before detectionSame floor plan with detected walls, rooms, doors, and windows highlighted
Second floor plan before detectionSecond floor plan with detected walls, rooms, doors, and windows highlighted

Quick start

Use Python 3.10–3.12. In a clean virtual environment, install the requirements and download the inference script:

python -m pip install "huggingface_hub>=0.25"
hf download OsamaMo/2dplan2strct inference.py requirements.txt --local-dir floorplan-inference
python -m pip install -r floorplan-inference/requirements.txt
python floorplan-inference/inference.py path/to/plan.png --output-dir results/plan

The last command downloads and caches the model weights automatically. It writes results/plan/predictions.json and results/plan/annotated.png. The --device option accepts auto (default), cpu, or cuda; auto selects CUDA when available. The first run downloads approximately 134 MB of weights.

Raise the confidence threshold to show fewer, stronger predictions:

python floorplan-inference/inference.py path/to/plan.png --threshold 0.50 --output-dir results/plan

The model is hosted on the Hugging Face Hub but is loaded with rfdetr. This checkpoint is not compatible with Transformers AutoModel or pipeline().

Prediction format

predictions.json contains the model ID, input image path, original image width and height, threshold, and a detections array. Each detection has:

FieldMeaning
labelOne of wall, room, door, or window
scoreDetector confidence from 0 to 1; it is not a calibrated probability
box_xyxy[left, top, right, bottom] in pixels of the original image

Detections are sorted from highest to lowest confidence. The annotated PNG keeps the original image size and draws color-coded boxes and labels. The source image is not modified. Overlapping boxes can occur.

Use in Python

After downloading inference.py and installing the requirements, load the model once and reuse it for multiple images:

from inference import FloorPlanDetector, save_prediction

detector = FloorPlanDetector()
result = detector.predict("path/to/plan.png", threshold=0.35)
print(f"Found {len(result['detections'])} objects")
print(result["detections"][:3])
save_prediction(result, "path/to/plan.png", "results/plan")

other_result = detector.predict("path/to/another-plan.jpg", threshold=0.35)

Run this snippet from the directory containing the downloaded inference.py, or add that directory to your Python path.

Offline use and reproducible versions

Download the configuration and checkpoint while online, then point the inference script at the local directory:

hf download OsamaMo/2dplan2strct config.json checkpoint_best_ema.pth --local-dir floorplan-model
python floorplan-inference/inference.py path/to/plan.png --model-dir floorplan-model --output-dir results/plan

For a reproducible run, pass a specific Hub commit SHA with --revision when using online inference. Use the same revision for any files downloaded separately.

Evaluation

The published checkpoint is the best EMA checkpoint after epoch 13. The following are validation results on 2,964 held-out floor-plan images, as reported by the training run. These are object-detection metrics, not a percentage of floor plans understood correctly or an independent test-set score.

MetricValue
COCO box mAP@0.594.52%
COCO box mAP@0.5:0.9582.58%
F191.86%
Precision93.53%
Recall90.26%

Scores can change with drawing style, scan quality, and confidence threshold. Inspect detections before using them in a consequential workflow.

Inference speed

Measured CPU result for this checkpoint: On a 1,206 × 1,013 pixel floor plan, the model produced 123 detections at confidence threshold 0.35. On an Intel Xeon Platinum 8488C with two PyTorch CPU threads, median latency was 457.63 ms/image (about 2.19 images/second); p95 was 654.66 ms/image. This used 3 warm-up runs and 20 timed model.predict() calls in float32. The RGB image was already loaded; model download, one-time model loading, image-file decoding, and drawing the annotated PNG were outside the timed section.

GPU reference, not a measurement of this checkpoint: The RF-DETR project's published benchmark reports 4.4 ms/image for the original RF-DETR Medium at 576 × 576 on an NVIDIA T4 using TensorRT FP16 and batch size 1 (about 227 images/second). This model repository currently provides a PyTorch checkpoint; its actual CUDA latency has not been measured here. The GPU reference uses a different checkpoint and runtime, so it is not a direct CPU-to-GPU speedup comparison.

To measure both devices on your own machine, download benchmark.py alongside inference.py, then run:

hf download OsamaMo/2dplan2strct benchmark.py inference.py --local-dir floorplan-inference
python floorplan-inference/benchmark.py path/to/plan.png --device both --warmups 3 --repeats 20

The benchmark reports CUDA: unavailable when the machine has no CUDA GPU. It synchronizes CUDA before and after each timed call when a GPU is present.

Model details

  • Architecture: RF-DETR Medium, PyTorch checkpoint
  • Input: floor-plan image converted to RGB; inference resolution 576 pixels
  • Outputs: boxes in xyxy image coordinates, class labels, confidence scores
  • Classes: wall, room, door, window
  • Default confidence threshold: 0.35; tune for your drawings
  • Supported use: non-commercial research and evaluation, subject to usage terms

Training setup

The model was trained on an NVIDIA T4 GPU with 16 GB of memory. The reported training duration was 16 hours.

Download tracking

Hugging Face displays a download count on this model page. The script retrieves config.json, which the Hub counts as a model download. The count represents file requests, not unique people or model-card readers. To retrieve the current count programmatically:

from huggingface_hub import HfApi

info = HfApi().model_info("OsamaMo/2dplan2strct")
print(info.downloads)

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

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

GPU в ailist

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

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

Не удалось определить, чем загружать веса модели (нет library_name и architectures).

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

0 моделей