Add support for starting syn data generation from specific point
This commit is contained in:
parent
4617525f61
commit
42599ee465
@ -4,4 +4,4 @@ cd data/lcn
|
||||
python setup.py build_ext --inplace
|
||||
|
||||
cd ../
|
||||
python create_syn_data.py
|
||||
python create_syn_data.py $2
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user