Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- thispersondoesnotexist
|
| 5 |
+
- stylegan
|
| 6 |
+
- stylegan2
|
| 7 |
+
- mesh
|
| 8 |
+
- model
|
| 9 |
+
- 3d
|
| 10 |
+
- asset
|
| 11 |
+
- generative
|
| 12 |
+
pretty_name: HeadsNet
|
| 13 |
+
size_categories:
|
| 14 |
+
- 1K<n<10K
|
| 15 |
---
|
| 16 |
+
|
| 17 |
+
# HeadsNet
|
| 18 |
+
|
| 19 |
+
This dataset uses the [thispersondoesnotexist_to_triposr_6748_3D_Heads ](https://huggingface.co/datasets/tfnn/thispersondoesnotexist_to_triposr_6748_3D_Heads) dataset as a foundation.
|
| 20 |
+
|
| 21 |
+
First normals are added to the ply files for each vertex, the easiest method to achieve this was with a simple [Blender](https://www.blender.org/) script:
|
| 22 |
+
```
|
| 23 |
+
import bpy
|
| 24 |
+
import glob
|
| 25 |
+
import pathlib
|
| 26 |
+
if not isdir(outputDir): mkdir(outputDir)
|
| 27 |
+
importDir = "ply/"
|
| 28 |
+
outputDir = "ply_norm/"
|
| 29 |
+
if not isdir(outputDir): mkdir(outputDir)
|
| 30 |
+
|
| 31 |
+
for file in glob.glob(importDir + "*.ply"):
|
| 32 |
+
model_name = pathlib.Path(file).stem
|
| 33 |
+
if pathlib.Path(outputDir+model_name+'.ply').is_file() == True: continue
|
| 34 |
+
bpy.ops.wm.ply_import(filepath=file)
|
| 35 |
+
bpy.ops.wm.ply_export(
|
| 36 |
+
filepath=outputDir+model_name+'.ply',
|
| 37 |
+
filter_glob='*.ply',
|
| 38 |
+
check_existing=False,
|
| 39 |
+
ascii_format=False,
|
| 40 |
+
export_selected_objects=False,
|
| 41 |
+
apply_modifiers=True,
|
| 42 |
+
export_triangulated_mesh=True,
|
| 43 |
+
export_normals=True,
|
| 44 |
+
export_uv=False,
|
| 45 |
+
export_colors='SRGB',
|
| 46 |
+
global_scale=1.0,
|
| 47 |
+
forward_axis='Y',
|
| 48 |
+
up_axis='Z'
|
| 49 |
+
)
|
| 50 |
+
bpy.ops.object.select_all(action='SELECT')
|
| 51 |
+
bpy.ops.object.delete(use_global=False)
|
| 52 |
+
bpy.ops.outliner.orphans_purge()
|
| 53 |
+
bpy.ops.outliner.orphans_purge()
|
| 54 |
+
bpy.ops.outliner.orphans_purge()
|
| 55 |
+
```
|
| 56 |
+
Importing the PLY without normals causes Blender to automatically generate them.
|
| 57 |
+
|