naderalfares's picture
Add dataset card
377c601 verified
|
Raw
History Blame Contribute Delete
2.84 kB
metadata
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 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, 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

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

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:

@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