NicoloLocatelli's picture
Dataset card
8133cbc verified
|
Raw History Blame Contribute Delete
2.93 kB
---
license: other
license_name: onshape-terms-of-use
license_link: https://www.onshape.com/legal/terms-of-use
tags:
- cad
- graphs
- 2d-drawings
size_categories:
- 100K<n<1M
---
# EulerCAD-ABC-Preprocessed
2D CAD drawings made from the 3D objects of the [ABC dataset](https://deep-geometry.github.io/abc-dataset/),
stored as point graphs: points and the straight segments between them. They are the data of
[EulerCAD](https://github.com/NicoloLocatelli/EulerCAD) and of its model
[EulerCAD-Deep](https://huggingface.co/NicoloLocatelli/EulerCAD-Deep).
## How the data were made
1. The STEP files of ABC archives 0 to 4 (50,000 objects).
2. Each object projected along 20 directions: isometric, front, top, left, and 16 random ones (seed 0).
3. The drawings cleaned: endpoints snapped, duplicate and tiny segments removed, collinear segments merged,
chains simplified, coordinates normalized. Only drawings with 100 to 300 lines are kept.
4. The objects split 70/15/15 into train, validation and test (seed 42). All views of an object are in the
same split.
The code that runs these steps is `uv run eulercad data build-abc --chunks 0-4` in the EulerCAD repository.
| Split | Objects | Drawings |
|------------|--------:|---------:|
| train | 23,234 | 246,128 |
| validation | 5,030 | 52,820 |
| test | 4,912 | 51,240 |
EulerCAD drops the drawings with more than 512 points, which leaves 246,108, 52,817 and 51,236.
## Files
- `point_graph_dataset/{train,val,test}/chunk_*.pt`: the drawings, as PyTorch tensors with offset tables.
Each drawing has `pos` (point coordinates), `edge_index` (segments), `sketch_id` and `part_id`.
- `point_graph_dataset/{train,val,test}/part_index.parquet`: the ABC object name of each `part_id` number.
- `duplicates/point_graph_dataset/{train,val,test}.pt`: for each drawing, the segments to walk twice so that
an Euler walk exists. Computing them is the slowest step, so they are stored.
Download and read them with the EulerCAD code:
```bash
uv run eulercad data download # into data/ABC/
```
```python
from eulercad.abc.point_graph import PointGraphDataset
train = PointGraphDataset("data/ABC/point_graph_dataset/train")
```
## License and citation
The CAD models of ABC belong to their creators. ABC distributes them under the
[Onshape Terms of Use](https://www.onshape.com/legal/terms-of-use), section 1.g.ii, and these drawings derive
from them under the same terms. If you use the data, please cite ABC:
```bibtex
@inproceedings{koch2019abc,
author = {Koch, Sebastian and Matveev, Albert and Jiang, Zhongshi and Williams, Francis and Artemov, Alexey and Burnaev, Evgeny and Alexa, Marc and Zorin, Denis and Panozzo, Daniele},
title = {{ABC}: A Big {CAD} Model Dataset for Geometric Deep Learning},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2019}
}
```