|
|
|
@ -218,6 +218,16 @@ if __name__=='__main__': |
|
|
|
|
out_root = data_root / f'{data_type}' |
|
|
|
|
out_root.mkdir(parents=True, exist_ok=True) |
|
|
|
|
|
|
|
|
|
start = 0 |
|
|
|
|
if len(sys.argv) >= 2 and isinstance(sys.argv[2], int): |
|
|
|
|
start = sys.argv[2] |
|
|
|
|
else: |
|
|
|
|
if sys.argv[2] == '--resume': |
|
|
|
|
try: |
|
|
|
|
start = max([int(dir) for dir in os.listdir(out_root) if str.isdigit(dir)]) or 0 |
|
|
|
|
except: |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
# load shapenet models |
|
|
|
|
obj_classes = ['chair'] |
|
|
|
|
objs = get_objs(shapenet_root, obj_classes) |
|
|
|
@ -254,6 +264,6 @@ if __name__=='__main__': |
|
|
|
|
|
|
|
|
|
# start the job |
|
|
|
|
n_samples = 2**10 + 2**13 |
|
|
|
|
for idx in range(n_samples): |
|
|
|
|
for idx in range(start, n_samples): |
|
|
|
|
args = (out_root, idx, n_samples, imsize, patterns, K, baseline, blend_im, noise, track_length) |
|
|
|
|
create_data(*args) |
|
|
|
|