Request access to TempFit

Complete the form to request access for non-commercial use.

Log in or Sign Up to review the conditions and access this dataset content.

TempFit Dataset

TempFit contains industrial CAD scenes represented as line segments, with instance annotations for semantic class, primitive template, translation, rotation, scale, and reflection. It supports research on template-based CAD scene understanding and reconstruction.

Code and installation

Dataset contents

Split Scenes Annotated instances Line segments
train 2,112 27,774 69,612,738
test 494 5,884 13,523,488

The dataset includes 23 semantic classes, 76 primitive templates, and a training augmentation donor bank with 21,085 instances from 1,985 training scenes. The complete package occupies approximately 12.33 GB before compression.

Instance counts describe the stored annotations; evaluation applies the TempFit loader's range and validity filters.

Directory structure

data/industrycad/
β”œβ”€β”€ template-v1/
β”‚   β”œβ”€β”€ train/
β”‚   β”‚   β”œβ”€β”€ svg/                 # Input line-segment JSON
β”‚   β”‚   └── gt/                  # Instance annotations
β”‚   β”œβ”€β”€ test/
β”‚   β”‚   β”œβ”€β”€ svg/
β”‚   β”‚   └── gt/
β”‚   β”œβ”€β”€ primitive_mapping.json
β”‚   β”œβ”€β”€ invalid_scene.txt
β”‚   └── DATA_MANIFEST.json
└── resources/
    β”œβ”€β”€ templates/               # 0.json ... 75.json
    β”œβ”€β”€ model_mapping.json
    β”œβ”€β”€ donor/
    └── invalid_train.txt
splits/
β”œβ”€β”€ train.json                   # Training filenames
└── test.json                    # Test filenames

Scene filenames follow PPPP-BBBB.json: PPPP identifies the parent drawing and BBBB identifies its block. Input and GT files share the same basename.

Data format

Each input JSON stores line endpoints, RGB colors, widths, layer indices, and source primitive groups. Each GT JSON is a list of instances with template and geometric attributes.

Field Meaning
Input coords Line endpoints [x1, y1, x2, y2] in drawing coordinates
Input primitive_ids Indices into source CAD primitive groups
Input instance_ids Source-group instance references; i refers to GT[i-1]
Input semantic_ids Source-group semantic class IDs, 0–22
GT semantic_id Semantic class ID, 0–22
GT template_id Template ID, 0–75
GT translation Translation in the centered scene frame
GT rotate Rotation angle in degrees
GT scale Template scale factors [sx, sy]
GT flip Whether to mirror template x before scaling and rotation

All input lines belong to annotated instances. Input and GT semantic class IDs both range from 0 to 22. Input primitive_ids identify source geometry groups, while GT template_id identifies a template.

To obtain the semantic class for each line segment:

line_semantic_ids = [scene["semantic_ids"][p] for p in scene["primitive_ids"]]

line_semantic_ids[i] is the class ID (0–22) of coords[i].

See SCHEMA.txt for the complete format and coordinate transformation, and LABELS.json for semantic-to-template IDs.

Download

Request access on Hugging Face. Once access is granted, download and extract the dataset:

pip install -U huggingface_hub
hf auth login
hf download Daisy-1227/TempFit TempFit.zip TempFit.zip.sha256 --repo-type dataset --local-dir downloads
(cd downloads && sha256sum -c TempFit.zip.sha256)
python -m zipfile -e downloads/TempFit.zip tempfit-data
python tempfit-data/verify_package.py

The archive contains the directory structure shown above.

Usage

Place data/ and splits/ from tempfit-data/ at the root of a TempFit checkout. The training and inference configurations use the paths shown above.

To read a scene directly:

import json
from pathlib import Path

root = Path("data/industrycad/template-v1")
test_names = json.loads(Path("splits/test.json").read_text())
name = test_names[0]

scene = json.loads((root / "test" / "svg" / name).read_text())
instances = json.loads((root / "test" / "gt" / name).read_text())

To verify the downloaded package:

python verify_package.py

License and access

The dataset is licensed under CC BY-NC 4.0. You may share and adapt it for non-commercial purposes with attribution. See LICENSE for the full terms.

To download the dataset from Hugging Face, complete the access request form.

Downloads last month
-