File size: 2,838 Bytes
377c601
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
license: mit
task_categories:
- image-classification
tags:
- 3d
- point-cloud
- mesh
- modelnet40
- cad
pretty_name: ModelNet40 Auto Aligned
size_categories:
- 10K<n<100K
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
dataset_info:
  features:
  - name: object_id
    dtype: large_string
  - name: class
    dtype: large_string
  - name: split
    dtype: large_string
  - name: object_path
    dtype: large_string
  - name: __index_level_0__
    dtype: int64
  splits:
  - name: train
    num_bytes: 186438
    num_examples: 9843
  - name: test
    num_bytes: 48215
    num_examples: 2468
  download_size: 234653
  dataset_size: 234653
---

# ModelNet40 Auto Aligned

Auto-aligned version of the [ModelNet40](https://modelnet.cs.princeton.edu/) 3D CAD dataset. Each sample is an OFF mesh file organized by class and train/test split.

This dataset mirrors the layout of [`naderalfares/ModelNet40`](https://huggingface.co/datasets/naderalfares/ModelNet40), but uses the auto-aligned meshes from the Princeton ModelNet release.

## Dataset structure

```
modelnet40_auto_aligned/
  {class}/
    train/{class}_{id}.off
    test/{class}_{id}.off
```

- **40 classes** (airplane, bathtub, bed, …, xbox)
- **9,843** training meshes
- **2,468** test meshes
- **12,311** meshes total (~9.7 GB)

The parquet manifest stores metadata only. Mesh files live under `modelnet40_auto_aligned/` and are referenced by the `object_path` column (without that prefix).

## Load metadata with 🤗 Datasets

```python
from datasets import load_dataset

ds = load_dataset("naderalfares/ModelNet40_Auto_aligned")

print(ds)
# DatasetDict({
#     train: Dataset({ features: ['object_id', 'class', 'split', 'object_path', '__index_level_0__'], num_rows: 9843 })
#     test:  Dataset({ features: ['object_id', 'class', 'split', 'object_path', '__index_level_0__'], num_rows: 2468 })
# })

row = ds["train"][0]
print(row)
# {'object_id': 'airplane_0001', 'class': 'airplane', 'split': 'train',
#  'object_path': 'airplane/train/airplane_0001.off', '__index_level_0__': 100}
```

## Download a mesh file

```python
from huggingface_hub import hf_hub_download

repo_id = "naderalfares/ModelNet40_Auto_aligned"
row = ds["train"][0]

mesh_path = hf_hub_download(
    repo_id=repo_id,
    repo_type="dataset",
    filename=f"modelnet40_auto_aligned/{row['object_path']}",
)
print(mesh_path)  # local path to airplane_0001.off
```

## Citation

If you use this dataset, please cite the original ModelNet paper and the auto-alignment work:

```bibtex
@inproceedings{wu20153d,
  title={3D ShapeNets: A Deep Representation for Volumetric Shapes},
  author={Wu, Zhirong and Song, Shuran and Khademi, Adarsh and Zhao, Tian and others},
  booktitle={CVPR},
  year={2015}
}
```

## License

MIT