deepmancer commited on
Commit
0fbda27
·
verified ·
1 Parent(s): 39e0e02

Restore full README and minimally add bald_render fields

Browse files
Files changed (1) hide show
  1. README.md +233 -35
README.md CHANGED
@@ -65,10 +65,17 @@ task_categories:
65
  tags:
66
  - hair
67
  - bald
 
 
 
 
68
  - paired-data
 
69
  - synthetic
 
70
  - blender
71
  - controlnet
 
72
  - flux
73
  - smplx
74
  - 3d-rendering
@@ -79,43 +86,234 @@ size_categories:
79
 
80
  # Baldy Dataset
81
 
82
- A paired synthetic dataset for bald reconstruction and hairstyle transfer tasks.
83
-
84
- The training split contains 6402 samples across front, back, and side views.
85
- Each row includes aligned photorealistic images, Blender renders, and camera/material metadata.
86
-
87
- ## Columns
88
-
89
- - hairstyle_id
90
- - view
91
- - source
92
- - hairstyle_source_id
93
- - hair_image
94
- - bald_image
95
- - hair_render
96
- - bald_render
97
- - background_image
98
- - render_params_json
99
- - background_prompt
100
- - camera_focal_length
101
- - camera_location_x
102
- - camera_location_y
103
- - camera_location_z
104
- - camera_rotation_x
105
- - camera_rotation_y
106
- - camera_rotation_z
107
- - lighting_preset
108
- - body_gender
109
- - face_expression
110
- - hair_melanin
111
- - hair_roughness
112
- - has_garments
113
- - views_available
114
-
115
- ## Usage
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  from datasets import load_dataset
118
 
119
  ds = load_dataset("deepmancer/baldy", split="train")
120
  sample = ds[0]
121
- print(sample["view"], sample["source"], sample["bald_render"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  tags:
66
  - hair
67
  - bald
68
+ - bald-converter
69
+ - hair-transfer
70
+ - hairport
71
+ - siggraph-2026
72
  - paired-data
73
+ - paired-image-to-image
74
  - synthetic
75
+ - synthetic-data
76
  - blender
77
  - controlnet
78
+ - sdxl
79
  - flux
80
  - smplx
81
  - 3d-rendering
 
86
 
87
  # Baldy Dataset
88
 
89
+ [![Project Page](https://img.shields.io/badge/Project%20Page-HairPort-2ea44f)](https://deepmancer.github.io/HairPort/)
90
+ [![Code](https://img.shields.io/badge/Code-GitHub-181717)](https://github.com/deepmancer/HairPort)
91
+ [![Weights](https://img.shields.io/badge/Weights-Bald%20Converter-ffcc4d)](https://huggingface.co/deepmancer/bald_konverter)
92
+ [![License](https://img.shields.io/badge/License-CC%20BY%204.0-blue)](https://creativecommons.org/licenses/by/4.0/)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
+ **Baldy** is a synthetic paired image dataset for bald conversion, hairstyle-transfer preprocessing, and 3D-aware hair research. It contains **6,400 identity-consistent hair/bald image pairs** with auxiliary hair renders, background images, camera parameters, and rendering metadata.
95
+
96
+ Baldy is released with **HairPort: In-context 3D-Aware Hair Import and Transfer for Images**, accepted to **ACM SIGGRAPH 2026**.
97
+
98
+ ## Overview
99
+
100
+ Each Baldy sample provides a photorealistic image of a person with hair and a corresponding bald version of the same subject. The paired structure is designed to support training and evaluation of bald-conversion models, including the **Bald Converter** used by HairPort.
101
+
102
+ The dataset also includes intermediate rendering assets and metadata, making it useful for controlled experiments that require camera/view information, hairstyle provenance, or synthetic render supervision.
103
+
104
+ ## What's Included
105
+
106
+ | Component | Description |
107
+ |---|---|
108
+ | `hair_image` | Photorealistic image of the subject with hair |
109
+ | `bald_image` | Photorealistic bald version of the same subject |
110
+ | `hair_render` | Blender-rendered hairstyle on a transparent background |
111
+ | `bald_render` | Blender-rendered bald hairline layer on a transparent background |
112
+ | `background_image` | Generated or rendered scene background |
113
+ | Camera metadata | Focal length, location, and rotation in Blender coordinates |
114
+ | Appearance metadata | Hair material values, lighting preset, expression, body metadata |
115
+ | Source metadata | Hairstyle source dataset and source-specific hairstyle ID |
116
+
117
+ ## Dataset Construction
118
+
119
+ Baldy was generated with a multi-stage synthetic data pipeline:
120
+
121
+ 1. **3D hairstyle preparation.** Hairstyles from DiffLocks, Hair20K, USC-HairSalon, and CT2Hair are aligned to SMPL-X head/body configurations with pose, expression, and garment variation.
122
+ 2. **Blender rendering.** Hair, body, camera, lighting, and material parameters are rendered at **1024 x 1024** resolution.
123
+ 3. **Photorealistic paired generation.** ControlNet++ and SDXL-based generation, followed by FLUX Kontext refinement, are used to produce identity-consistent hair/bald image pairs.
124
+
125
+ ## Dataset Statistics
126
+
127
+ | Split | Samples |
128
+ |---|---:|
129
+ | `train` | 6,400 |
130
+
131
+ ### View Distribution
132
+
133
+ | View | Samples |
134
+ |---|---:|
135
+ | `front` | 6,009 |
136
+ | `side` | 292 |
137
+ | `back` | 99 |
138
+
139
+ The current release is front-view dominant. Users training view-balanced models may want to account for this distribution during sampling or evaluation.
140
+
141
+ ### Hairstyle Source Distribution
142
+
143
+ | Source | Samples |
144
+ |---|---:|
145
+ | `difflocks` | 3,197 |
146
+ | `hair20k` | 2,824 |
147
+ | `usc` | 370 |
148
+ | `ct2hair` | 9 |
149
+
150
+ ## Data Fields
151
+
152
+ ### Identity, View, And Source
153
+
154
+ | Field | Type | Description |
155
+ |---|---|---|
156
+ | `hairstyle_id` | `string` | Unique zero-padded sequential ID, such as `"000042"` |
157
+ | `view` | `string` | Camera view: `"front"`, `"side"`, or `"back"` |
158
+ | `source` | `string` | Hairstyle source: `"difflocks"`, `"hair20k"`, `"usc"`, or `"ct2hair"` |
159
+ | `hairstyle_source_id` | `string` | Source-specific hairstyle identifier |
160
+ | `views_available` | `string` | Pipe-separated list of views available for the hairstyle, such as `"front|back|side"` |
161
+
162
+ ### Image Columns
163
+
164
+ | Field | Type | Description |
165
+ |---|---|---|
166
+ | `hair_image` | `Image` | Photorealistic image of the subject with hair, decoded as a PIL image |
167
+ | `bald_image` | `Image` | Photorealistic bald image of the same subject, decoded as a PIL image |
168
+ | `hair_render` | `Image` | Blender-rendered hair layer, decoded as a PIL image |
169
+ | `bald_render` | `Image` | Blender-rendered bald hairline layer, decoded as a PIL image |
170
+ | `background_image` | `Image` | Background image, decoded as a PIL image |
171
+
172
+ ### Camera And Rendering Metadata
173
+
174
+ | Field | Type | Description |
175
+ |---|---|---|
176
+ | `render_params_json` | `string` | Full Blender render parameters as an embedded JSON string |
177
+ | `background_prompt` | `string` | Text prompt used to generate the background, empty when unavailable |
178
+ | `camera_focal_length` | `float64` | Camera focal length in millimeters |
179
+ | `camera_location_x` | `float64` | Camera X position in Blender world coordinates |
180
+ | `camera_location_y` | `float64` | Camera Y position in Blender world coordinates |
181
+ | `camera_location_z` | `float64` | Camera Z position in Blender world coordinates |
182
+ | `camera_rotation_x` | `float64` | Camera X rotation in radians |
183
+ | `camera_rotation_y` | `float64` | Camera Y rotation in radians |
184
+ | `camera_rotation_z` | `float64` | Camera Z rotation in radians |
185
+ | `lighting_preset` | `string` | Lighting preset name |
186
+
187
+ ### Appearance Metadata
188
+
189
+ | Field | Type | Description |
190
+ |---|---|---|
191
+ | `body_gender` | `string` | SMPL-X body gender configuration |
192
+ | `face_expression` | `string` | Facial expression label; empty for some samples |
193
+ | `hair_melanin` | `float64` | Hair melanin value controlling color darkness |
194
+ | `hair_roughness` | `float64` | Hair surface roughness value |
195
+ | `has_garments` | `bool` | Whether BEDLAM clothing is applied to the body |
196
+
197
+ ## Quick Start
198
+
199
+ Install the Hugging Face `datasets` package if needed:
200
+
201
+ ```bash
202
+ pip install datasets
203
+ ```
204
+
205
+ Load the dataset:
206
+
207
+ ```python
208
  from datasets import load_dataset
209
 
210
  ds = load_dataset("deepmancer/baldy", split="train")
211
  sample = ds[0]
212
+
213
+ hair = sample["hair_image"] # PIL.Image: subject with hair
214
+ bald = sample["bald_image"] # PIL.Image: same subject without hair
215
+ ```
216
+
217
+ Save a paired sample:
218
+
219
+ ```python
220
+ sample["hair_image"].save("hair.png")
221
+ sample["bald_image"].save("bald.png")
222
+ sample["hair_render"].save("hair_render.png")
223
+ sample["bald_render"].save("bald_render.png")
224
+ sample["background_image"].save("background.png")
225
+ ```
226
+
227
+ ## Common Usage Patterns
228
+
229
+ Filter by camera view:
230
+
231
+ ```python
232
+ front = ds.filter(lambda row: row["view"] == "front")
233
+ side = ds.filter(lambda row: row["view"] == "side")
234
+ back = ds.filter(lambda row: row["view"] == "back")
235
+ ```
236
+
237
+ Filter by hairstyle source:
238
+
239
+ ```python
240
+ hair20k = ds.filter(lambda row: row["source"] == "hair20k")
241
+ difflocks = ds.filter(lambda row: row["source"] == "difflocks")
242
+ ```
243
+
244
+ Read Blender render parameters:
245
+
246
+ ```python
247
+ import json
248
+
249
+ params = json.loads(sample["render_params_json"])
250
+ print(params.keys())
251
+ ```
252
+
253
+ Stream the dataset without downloading all shards:
254
+
255
+ ```python
256
+ from datasets import load_dataset
257
+
258
+ stream = load_dataset("deepmancer/baldy", split="train", streaming=True)
259
+ for row in stream:
260
+ print(row["hairstyle_id"], row["view"], row["source"])
261
+ break
262
+ ```
263
+
264
+ ## File Format
265
+
266
+ Baldy is stored as sharded Parquet files with embedded image bytes:
267
+
268
+ ```text
269
+ data/
270
+ ├── train-00000-of-NNNNN.parquet
271
+ ├── train-00001-of-NNNNN.parquet
272
+ ├── ...
273
+ └── train-NNNNN-of-NNNNN.parquet
274
+ ```
275
+
276
+ No external image files are required. Image columns are decoded automatically as PIL images by the `datasets` library.
277
+
278
+ ## Intended Uses
279
+
280
+ Baldy is intended for research and development in:
281
+
282
+ - bald-conversion model training
283
+ - hairstyle-transfer preprocessing
284
+ - paired image-to-image translation
285
+ - synthetic data studies for hair and head rendering
286
+ - controlled evaluation of hair removal and reconstruction pipelines
287
+ - HairPort-style 3D-aware hair import and transfer systems
288
+
289
+ ## Limitations And Responsible Use
290
+
291
+ Baldy is a synthetic dataset. Its distribution reflects the hairstyle sources, SMPL-X configurations, rendering settings, and generative refinement pipeline used to create it. The current release is also front-view dominant.
292
+
293
+ Generated samples may contain artifacts or biases inherited from the rendering and image-generation stages. Users should inspect samples before using the dataset in production settings.
294
+
295
+ This dataset is not designed as a demographic benchmark and should not be used for sensitive identity, demographic, or attribute-inference tasks.
296
+
297
+ ## Related Resources
298
+
299
+ - **Project page:** [deepmancer.github.io/HairPort](https://deepmancer.github.io/HairPort/)
300
+ - **Code:** [github.com/deepmancer/HairPort](https://github.com/deepmancer/HairPort)
301
+ - **Bald Converter LoRA weights:** [deepmancer/bald_konverter](https://huggingface.co/deepmancer/bald_konverter)
302
+ - **Baldy dataset:** [deepmancer/baldy](https://huggingface.co/datasets/deepmancer/baldy)
303
+
304
+ ## Citation
305
+
306
+ If you use Baldy or HairPort in your research, please cite:
307
+
308
+ ```bibtex
309
+ @inproceedings{heidari2026hairport,
310
+ title = {HairPort: In-context 3D-Aware Hair Import and Transfer for Images},
311
+ author = {A. Heidari and A. Alimohammadi and W. Michel Pinto Lira and A. Bar-Lev and A. Mahdavi-Amiri},
312
+ booktitle = {ACM SIGGRAPH 2026},
313
+ year = {2026}
314
+ }
315
+ ```
316
+
317
+ ## License
318
+
319
+ Baldy is released under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/) license.