generate raw curv values for test set
This commit is contained in:
@@ -4,16 +4,16 @@ import os
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
folder = '/home/workspace/data/dataset/local-cache/train_skirt'
|
||||
folder = '/home/workspace/data/dataset/test_skirt_ready_2'
|
||||
out_folder = '/home/workspace/local-data/valid_skirt'
|
||||
ids = os.listdir(folder + '/mesh_posed')
|
||||
|
||||
count = 0
|
||||
step = 5000
|
||||
|
||||
# while count < len(ids):
|
||||
while count < 30000:
|
||||
while count < len(ids):
|
||||
# while count < 30000:
|
||||
# os.system('nohup python MeshUtils/curvature_labels.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'curv_train_' + str(count) + '_' + str(count+step) + ' > curv_train_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &')
|
||||
os.system('nohup python curvature_labels.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'curv_gen_10_train_skirt_' + str(count) + '_' + str(count+step) + ' > nohup/curv_gen_10_train_skirt_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &')
|
||||
os.system('nohup python curvature_labels.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'curv_gen_10_test_skirt_' + str(count) + '_' + str(count+step) + ' > nohup/curv_gen_10_test_skirt_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &')
|
||||
# os.system('python Data/convert_to_uv.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + '')
|
||||
count += step
|
||||
|
||||
+13
-13
@@ -251,9 +251,9 @@ def read_raw_curvatures(folder, frames, neighbourhood):
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-f", "--folder", help = "process the given folder", default=r'/home/workspace/data/dataset/local-cache/train_skirt')
|
||||
parser.add_argument("-s", "--start", help = "start of range", default=0)
|
||||
parser.add_argument("-e", "--end", help = "end of range", default=30000)
|
||||
parser.add_argument("-f", "--folder", help = "process the given folder", default=r'/home/workspace/data/dataset/test_skirt_ready_2')
|
||||
parser.add_argument("-s", "--start", help = "start of range", default=5000)
|
||||
parser.add_argument("-e", "--end", help = "end of range", default=10000)
|
||||
parser.add_argument("-n", "--name", help = "end of range", default="lhunor")
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -275,20 +275,20 @@ if __name__ == '__main__':
|
||||
|
||||
print('SKIRT' if is_skirt else 'NOT SKIRT')
|
||||
|
||||
# frames = sorted(os.listdir(os.path.join(folder, 'mesh_posed')))[int(args.start):int(args.end)]
|
||||
frames = sorted(os.listdir(os.path.join(folder, 'mesh_posed')))[int(args.start):int(args.end)]
|
||||
|
||||
frames = []
|
||||
with open(os.path.join(folder, frames_file), 'r') as f:
|
||||
lines = f.readlines()
|
||||
lines = [line.strip() for line in lines]
|
||||
frames = lines[int(args.start):int(args.end)]
|
||||
# frames = []
|
||||
# with open(os.path.join(folder, frames_file), 'r') as f:
|
||||
# lines = f.readlines()
|
||||
# lines = [line.strip() for line in lines]
|
||||
# frames = lines[int(args.start):int(args.end)]
|
||||
|
||||
# generate_curvatures(folder, neighbourhood, frames)
|
||||
curvatures = read_raw_curvatures(folder, frames, neighbourhood)
|
||||
generate_curvatures(folder, neighbourhood, frames)
|
||||
# curvatures = read_raw_curvatures(folder, frames, neighbourhood)
|
||||
# bins = get_bins(curvatures, nr_of_labels)
|
||||
# np.save('train_bins_skirt.npy', bins)
|
||||
bins = np.load('custom_data/train_bins_skirt.npy')
|
||||
generate_curvature_labels(folder, bins, curvatures, frames, neighbourhood)
|
||||
# bins = np.load('custom_data/train_bins_skirt.npy')
|
||||
# generate_curvature_labels(folder, bins, curvatures, frames, neighbourhood)
|
||||
# visualize_curvature_labels(folder)
|
||||
|
||||
pass
|
||||
Reference in New Issue
Block a user