tfnn commited on
Commit
9cbcb5e
1 Parent(s): 1b6648d

Upload 5 files

Browse files
Files changed (5) hide show
  1. Dataset_Scraper.7z +3 -0
  2. HeadsNet-2-6.7z +3 -0
  3. fix_ply.blend +0 -0
  4. fix_ply.py +33 -0
  5. nan_check.py +18 -0
Dataset_Scraper.7z ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4daaf5218628fd767985030c6e6cadac425ed5ace3fc6f9557fbe135eea8e4e7
3
+ size 52184
HeadsNet-2-6.7z ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ab339e7b10dd320c0eb9f917654cf0a19bb453e5f34f02197981c2e989de067
3
+ size 5074033744
fix_ply.blend ADDED
Binary file (903 kB). View file
 
fix_ply.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # https://github.com/mrbid
2
+ import bpy
3
+ import glob
4
+ import pathlib
5
+ if not isdir(outputDir): mkdir(outputDir)
6
+ importDir = "ply/"
7
+ outputDir = "ply_norm/"
8
+ if not isdir(outputDir): mkdir(outputDir)
9
+
10
+ for file in glob.glob(importDir + "*.ply"):
11
+ model_name = pathlib.Path(file).stem
12
+ if pathlib.Path(outputDir+model_name+'.ply').is_file() == True: continue
13
+ bpy.ops.wm.ply_import(filepath=file)
14
+ bpy.ops.wm.ply_export(
15
+ filepath=outputDir+model_name+'.ply',
16
+ filter_glob='*.ply',
17
+ check_existing=False,
18
+ ascii_format=False,
19
+ export_selected_objects=False,
20
+ apply_modifiers=True,
21
+ export_triangulated_mesh=True,
22
+ export_normals=True,
23
+ export_uv=False,
24
+ export_colors='SRGB',
25
+ global_scale=1.0,
26
+ forward_axis='Y',
27
+ up_axis='Z'
28
+ )
29
+ bpy.ops.object.select_all(action='SELECT')
30
+ bpy.ops.object.delete(use_global=False)
31
+ bpy.ops.outliner.orphans_purge()
32
+ bpy.ops.outliner.orphans_purge()
33
+ bpy.ops.outliner.orphans_purge()
nan_check.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # https://github.com/mrbid
2
+ import sys
3
+ import numpy as np
4
+ from time import time_ns
5
+
6
+ # print everything / no truncations
7
+ np.set_printoptions(threshold=sys.maxsize)
8
+
9
+ # load training data
10
+ st = time_ns()
11
+ train_x = []
12
+ train_y = []
13
+ print("Loading...")
14
+ with open("train_x.dat", 'rb') as f: data = np.fromfile(f, dtype=np.float32)
15
+ with open("train_y.dat", 'rb') as f: data = np.fromfile(f, dtype=np.float32)
16
+ print("NaN's detected:", np.count_nonzero(np.isnan(data)))
17
+ timetaken = (time_ns()-st)/1e+9
18
+ print("Time Taken:", "{:.2f}".format(timetaken), "seconds")