Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: bsd-3-clause
|
| 3 |
+
task_categories:
|
| 4 |
+
- graph-ml
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
---
|
| 8 |
+
# ModelNet40
|
| 9 |
+
|
| 10 |
+
This is a preprocessed version of the [ModelNet40](https://modelnet.cs.princeton.edu/) dataset, created with:
|
| 11 |
+
|
| 12 |
+
```
|
| 13 |
+
import torch_geometric
|
| 14 |
+
from torch_geometric.datasets import ModelNet
|
| 15 |
+
from torch_geometric.transforms import Compose, SamplePoints, KNNGraph
|
| 16 |
+
|
| 17 |
+
torch_geometric.seed.seed_everything(42)
|
| 18 |
+
|
| 19 |
+
# Standard setup
|
| 20 |
+
pre_transform = Compose([
|
| 21 |
+
SamplePoints(1024),
|
| 22 |
+
KNNGraph(k=20)
|
| 23 |
+
])
|
| 24 |
+
|
| 25 |
+
path = '/mnt/lrmc_pool/ModelNet40'
|
| 26 |
+
train_dataset = ModelNet(path, '40', train=True, transform=pre_transform)
|
| 27 |
+
test_dataset = ModelNet(path, '40', train=False, transform=pre_transform)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
%cd /mnt/lrmc_pool
|
| 32 |
+
!tar -I pigz -cf ModelNet40_s1024_k16.tar.gz ModelNet40
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
from huggingface_hub import upload_folder, upload_file, create_repo
|
| 36 |
+
|
| 37 |
+
try:
|
| 38 |
+
create_repo("cminst/ModelNet40", repo_type="dataset")
|
| 39 |
+
print("Dataset upload completed!")
|
| 40 |
+
except Exception as e:
|
| 41 |
+
print(f"Repository might already exist or upload failed: {e}")
|
| 42 |
+
|
| 43 |
+
upload_file(
|
| 44 |
+
path_or_fileobj="/mnt/lrmc_pool/ModelNet40_s1024_k16.tar.gz",
|
| 45 |
+
repo_id="cminst/ModelNet40",
|
| 46 |
+
path_in_repo="ModelNet40_s1024_k16.tar.gz",
|
| 47 |
+
repo_type="dataset",
|
| 48 |
+
)
|
| 49 |
+
```
|