File size: 3,140 Bytes
1150bda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
task_categories:
  - image-to-text
  - visual-question-answering
tags:
  - origami
  - crease-pattern
  - fold
  - multiview
  - 3d-to-code
size_categories:
  - n<1K
---

# Origami Direct Crease Pattern Dataset

A multiview image dataset for training models to predict complete origami crease patterns from 3D visualizations.

## Task

Given **14 camera views** of a folded origami shape, predict the **complete crease pattern** as a FOLD JSON (vertices, edges, mountain/valley assignments).

## Dataset Structure

Each example contains:

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique sample ID (e.g., `grid4_4c_0000`) |
| `images` | list[string] | 14 PNG paths — 6 face views + 8 corner views |
| `fold` | dict | Complete crease pattern in FOLD format |
| `difficulty` | string | `"easy"`, `"medium"`, or `"hard"` |
| `num_creases` | int | Number of mountain/valley creases |

### Camera Views (14 per example)

- **6 face views:** `face_pos_x`, `face_neg_x`, `face_pos_y`, `face_neg_y`, `face_pos_z`, `face_neg_z`
- **8 corner views:** `corner_ppp`, `corner_ppn`, `corner_pnp`, `corner_pnn`, `corner_npp`, `corner_npn`, `corner_nnp`, `corner_nnn`

### Splits

| Split | Examples |
|-------|----------|
| train | 12 |
| val | 1 |
| test | 2 |

## Pattern Strategies

| Strategy | Description | Interior vertices |
|----------|-------------|-------------------|
| `grid` | Creases on NxN grid | Grid intersections |
| `singlevertex` | Radial creases from center | 1 (center) |
| `multivertex` | Random interior connections | N random points |
| `parallel` | Parallel lines at an angle | None |

## Usage

```python
from datasets import load_dataset
from PIL import Image

ds = load_dataset("YOUR_USERNAME/origami-direct")

example = ds["train"][0]
print(example["id"])              # "grid4_4c_0000"
print(len(example["images"]))     # 14
print(example["num_creases"])     # 4

# Access the complete crease pattern
fold = example["fold"]
print(fold["edges_assignment"])   # ["B", "B", ..., "M", "V", ...]

# Load a view
img = Image.open(example["images"][6])  # corner_ppp
```

### FOLD Format

The `fold` field uses the [FOLD format](https://github.com/edemaine/fold) (JSON-based):

```json
{
  "vertices_coords": [[0, 0], [0.5, 0], ...],
  "edges_vertices": [[0, 1], [1, 2], ...],
  "edges_assignment": ["B", "M", "V", ...],
  "edges_foldAngle": [0, -180, 180, ...],
  "faces_vertices": [[0, 1, 2], ...]
}
```

Edge assignments: `B` = boundary, `M` = mountain, `V` = valley, `F` = flat (structural).

## Generation

Generated using [OrigamiAnnotator](https://github.com/YOUR_USERNAME/OrigamiAnnotator) with rendering via [OrigamiSimulator](https://origamisimulator.org/).

- Crease patterns built via tree search with Kawasaki/Maekawa theorem verification
- 3D renderings produced by OrigamiSimulator (GPU physics simulation) at 60% fold
- Post-simulation intersection checking for quality filtering

## Related

- [origami-step-by-step](https://huggingface.co/datasets/YOUR_USERNAME/origami-step-by-step) — step-by-step version of this dataset (predict one crease at a time)