Upload folder using huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-to-text
|
| 5 |
+
- visual-question-answering
|
| 6 |
+
tags:
|
| 7 |
+
- origami
|
| 8 |
+
- crease-pattern
|
| 9 |
+
- fold
|
| 10 |
+
- multiview
|
| 11 |
+
- step-by-step
|
| 12 |
+
- 3d-to-code
|
| 13 |
+
size_categories:
|
| 14 |
+
- n<1K
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Origami Step-by-Step Crease Pattern Dataset
|
| 18 |
+
|
| 19 |
+
A multiview image dataset for training models to infer origami crease patterns from 3D visualizations, one fold at a time.
|
| 20 |
+
|
| 21 |
+
## Task
|
| 22 |
+
|
| 23 |
+
Given **14 camera views** of a partially-folded origami sheet, predict the **next crease line** to add (edge position + mountain/valley assignment).
|
| 24 |
+
|
| 25 |
+
This mirrors a step-by-step folding process: starting from a blank sheet, each step adds one crease and the model must predict the next one from the current 3D visualization.
|
| 26 |
+
|
| 27 |
+
## Dataset Structure
|
| 28 |
+
|
| 29 |
+
Each example contains:
|
| 30 |
+
|
| 31 |
+
| Field | Type | Description |
|
| 32 |
+
|-------|------|-------------|
|
| 33 |
+
| `id` | string | Unique example ID (e.g., `grid3_3c_0000_step_001`) |
|
| 34 |
+
| `images` | list[string] | 14 PNG paths — 6 face views + 8 corner views |
|
| 35 |
+
| `partial_fold` | dict | Current crease pattern in FOLD format (vertices, edges, assignments) |
|
| 36 |
+
| `next_crease` | dict | The crease to predict: `{"edge": [v0, v1], "assignment": "M" or "V"}` |
|
| 37 |
+
| `step` | int | Current step index (0-based) |
|
| 38 |
+
| `steps_remaining` | int | Steps left to complete the pattern |
|
| 39 |
+
| `difficulty` | string | `"easy"`, `"medium"`, or `"hard"` |
|
| 40 |
+
|
| 41 |
+
### Camera Views (14 per example)
|
| 42 |
+
|
| 43 |
+
- **6 face views:** `face_pos_x`, `face_neg_x`, `face_pos_y`, `face_neg_y`, `face_pos_z`, `face_neg_z`
|
| 44 |
+
- **8 corner views:** `corner_ppp`, `corner_ppn`, `corner_pnp`, `corner_pnn`, `corner_npp`, `corner_npn`, `corner_nnp`, `corner_nnn`
|
| 45 |
+
|
| 46 |
+
### Splits
|
| 47 |
+
|
| 48 |
+
| Split | Examples |
|
| 49 |
+
|-------|----------|
|
| 50 |
+
| train | 75 |
|
| 51 |
+
| val | 9 |
|
| 52 |
+
| test | 10 |
|
| 53 |
+
|
| 54 |
+
## Pattern Strategies
|
| 55 |
+
|
| 56 |
+
Patterns are generated using four strategies for diversity:
|
| 57 |
+
|
| 58 |
+
| Strategy | Description | Interior vertices |
|
| 59 |
+
|----------|-------------|-------------------|
|
| 60 |
+
| `grid` | Creases on NxN grid | Grid intersections |
|
| 61 |
+
| `singlevertex` | Radial creases from center | 1 (center) |
|
| 62 |
+
| `multivertex` | Random interior connections | N random points |
|
| 63 |
+
| `parallel` | Parallel lines at an angle | None |
|
| 64 |
+
|
| 65 |
+
## Usage
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
from datasets import load_dataset
|
| 69 |
+
from PIL import Image
|
| 70 |
+
|
| 71 |
+
ds = load_dataset("YOUR_USERNAME/origami-step-by-step")
|
| 72 |
+
|
| 73 |
+
example = ds["train"][0]
|
| 74 |
+
print(example["id"]) # "grid3_3c_0000_step_001"
|
| 75 |
+
print(len(example["images"])) # 14
|
| 76 |
+
print(example["next_crease"]) # {"edge": [3, 7], "assignment": "M"}
|
| 77 |
+
print(example["steps_remaining"]) # 2
|
| 78 |
+
|
| 79 |
+
# Load one view
|
| 80 |
+
img = Image.open(example["images"][6]) # corner_ppp
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
### FOLD Format
|
| 84 |
+
|
| 85 |
+
The `partial_fold` field uses the [FOLD format](https://github.com/edemaine/fold) (JSON-based):
|
| 86 |
+
|
| 87 |
+
```json
|
| 88 |
+
{
|
| 89 |
+
"vertices_coords": [[0, 0], [0.5, 0], ...],
|
| 90 |
+
"edges_vertices": [[0, 1], [1, 2], ...],
|
| 91 |
+
"edges_assignment": ["B", "M", "V", ...],
|
| 92 |
+
"edges_foldAngle": [0, -180, 180, ...],
|
| 93 |
+
"faces_vertices": [[0, 1, 2], ...]
|
| 94 |
+
}
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
Edge assignments: `B` = boundary, `M` = mountain, `V` = valley, `F` = flat (structural).
|
| 98 |
+
|
| 99 |
+
## Generation
|
| 100 |
+
|
| 101 |
+
Generated using [OrigamiAnnotator](https://github.com/YOUR_USERNAME/OrigamiAnnotator) with rendering via [OrigamiSimulator](https://origamisimulator.org/).
|
| 102 |
+
|
| 103 |
+
- Crease patterns built incrementally via tree search with Kawasaki/Maekawa theorem verification
|
| 104 |
+
- 3D renderings produced by OrigamiSimulator (GPU physics simulation) at 60% fold
|
| 105 |
+
- Post-simulation intersection checking for quality filtering
|