File size: 2,913 Bytes
25acfe4
 
772a14b
 
 
 
 
 
 
 
 
 
25acfe4
772a14b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b8ebf13
 
772a14b
b8ebf13
 
 
 
 
 
 
 
 
 
772a14b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b8ebf13
772a14b
 
b8ebf13
 
772a14b
 
 
 
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
---
license: mit
task_categories:
  - image-classification
tags:
  - shape-recognition
  - benchmark
  - 3d-objects
  - shapenet
pretty_name: ShapeY
size_categories:
  - 100K<n<1M
---

# ShapeY

ShapeY is a benchmark that tests a vision system's **shape recognition capacity**. It
consists of ~68k images of 200 3D objects rendered from
[ShapeNet](https://shapenet.org/).

ShapeY is **not a training set**. It validates that an object recognition system has
developed a genuine capacity for shape understanding, using tasks that are hard for
systems that rely on texture or contrast cues instead of shape.

Code: <https://github.com/njw0709/ShapeY>

## Contents

| Directory | Images | Description |
|---|---|---|
| `ShapeY200/<objname>/` | 68,200 total | The standard benchmark. |
| `ShapeY200CR/<objname>/` | 68,200 total | Contrast-reversed counterparts, for the CR experiment. |

200 objects across 20 categories (10 objects per category), each rendered in 31
transformation series of 11 views: 341 images per object, 68,200 per set.

**Images are grouped one directory per object** (200 directories of 341 images),
because the Hub does not allow more than 10,000 files in a single directory. The
benchmark code expects a single flat directory, so
[`scripts/download_data.py`](https://github.com/njw0709/ShapeY/blob/main/scripts/download_data.py)
flattens the tree after downloading. If you fetch the files yourself, collapse the
per-object directories before pointing `SHAPEY_IMG_DIR` at them -- filenames are
globally unique, so a flat merge is lossless.

## Filename convention

```
<category>_<shapenet_id>-<axis><NN>.png
```

* `<axis>` is a non-empty subset of the five transformation axes `x`, `y`, `p`, `r`, `w`
  (translation in x and y, pitch, roll, and scale/width), always in that canonical
  order — 31 combinations in total.
* `<NN>` is the view index within the series, `01`–`11`, increasing distance from the
  reference view.

Example: `airplane_1021a0914a7207aff927ed529ad90a11-pr03.png` is view 3 of the combined
pitch+roll series for that airplane.

The parser for these names is `shapeymodular.utils.ImageNameHelper.parse_imgname`.

## Usage

```bash
git clone https://github.com/njw0709/ShapeY && cd ShapeY
uv sync
uv run scripts/download_data.py --variant all --out data
export SHAPEY_IMG_DIR=$PWD/data/ShapeY200/dataset
export SHAPEY_IMG_DIR_CR=$PWD/data/ShapeY200CR/dataset
```

Or directly:

```python
from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="GamGyulNN/ShapeY",
    repo_type="dataset",
    allow_patterns=["ShapeY200/**"],
    local_dir="data",
)
# -> data/ShapeY200/<objname>/<objname>-<axis><NN>.png
```

Note the per-object subdirectories; flatten them before use (see above).

## License

MIT for the benchmark itself. The renders are derived from ShapeNet — please also
observe [ShapeNet's terms of use](https://shapenet.org/terms).