-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdataset_gen.zsh
More file actions
116 lines (106 loc) · 6.94 KB
/
dataset_gen.zsh
File metadata and controls
116 lines (106 loc) · 6.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# generate dataset configurations
echo "Generating dataset config files for IID"
python src/dataset/blicket.py --train_size 6000 --val_size 2000 --test_size 2000 --regime IID --output_dataset_dir ./ACRE_IID/config
echo "Generating dataset config files for Comp"
python src/dataset/blicket.py --train_size 6000 --val_size 2000 --test_size 2000 --regime Comp --output_dataset_dir ./ACRE_Comp/config
echo "Generating dataset config files for Sys"
python src/dataset/blicket.py --train_size 6000 --val_size 2000 --test_size 2000 --regime Sys --output_dataset_dir ./ACRE_Sys/config
# call blender to render
alias blender2.79="/home/chizhang/blender-2.79b/blender"
mkdir ./log
mkdir ./log/IID
mkdir ./log/Comp
mkdir ./log/Sys
echo "Start rendering for IID"
echo "Rendering training set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=6000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_IID/config/train.json --shape_color_material_combos_json ./src/render/data/all.json --split train --output_image_dir ./ACRE_IID/images/ --output_scene_dir ./ACRE_IID/scenes/ --output_scene_file ./ACRE_IID/ACRE_scenes.json --output_blend_dir ./ACRE_IID/blendfiles >> "./log/IID/train_round_$round.txt"
(( round+=1 ))
done
echo "Rendering val set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=2000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_IID/config/val.json --shape_color_material_combos_json ./src/render/data/all.json --split val --output_image_dir ./ACRE_IID/images/ --output_scene_dir ./ACRE_IID/scenes/ --output_scene_file ./ACRE_IID/ACRE_scenes.json --output_blend_dir ./ACRE_IID/blendfiles >> "./log/IID/val_round_$round.txt"
(( round+=1 ))
done
echo "Rendering test set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=2000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_IID/config/test.json --shape_color_material_combos_json ./src/render/data/all.json --split test --output_image_dir ./ACRE_IID/images/ --output_scene_dir ./ACRE_IID/scenes/ --output_scene_file ./ACRE_IID/ACRE_scenes.json --output_blend_dir ./ACRE_IID/blendfiles >> "./log/IID/test_round_$round.txt"
(( round+=1 ))
done
echo "Start rendering for Comp"
echo "Rendering training set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=6000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_Comp/config/train.json --shape_color_material_combos_json ./src/render/data/attr_train.json --split train --output_image_dir ./ACRE_Comp/images/ --output_scene_dir ./ACRE_Comp/scenes/ --output_scene_file ./ACRE_Comp/ACRE_scenes.json --output_blend_dir ./ACRE_Comp/blendfiles >> "./log/Comp/train_round_$round.txt"
(( round+=1 ))
done
echo "Rendering val set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=2000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_Comp/config/val.json --shape_color_material_combos_json ./src/render/data/attr_test.json --split val --output_image_dir ./ACRE_Comp/images/ --output_scene_dir ./ACRE_Comp/scenes/ --output_scene_file ./ACRE_Comp/ACRE_scenes.json --output_blend_dir ./ACRE_Comp/blendfiles >> "./log/Comp/val_round_$round.txt"
(( round+=1 ))
done
echo "Rendering test set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=2000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_Comp/config/test.json --shape_color_material_combos_json ./src/render/data/attr_test.json --split test --output_image_dir ./ACRE_Comp/images/ --output_scene_dir ./ACRE_Comp/scenes/ --output_scene_file ./ACRE_Comp/ACRE_scenes.json --output_blend_dir ./ACRE_Comp/blendfiles >> "./log/Comp/test_round_$round.txt"
(( round+=1 ))
done
echo "Start rendering for Sys"
echo "Rendering training set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=6000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_Sys/config/train.json --shape_color_material_combos_json ./src/render/data/all.json --split train --output_image_dir ./ACRE_Sys/images/ --output_scene_dir ./ACRE_Sys/scenes/ --output_scene_file ./ACRE_Sys/ACRE_scenes.json --output_blend_dir ./ACRE_Sys/blendfiles >> "./log/Sys/train_round_$round.txt"
(( round+=1 ))
done
echo "Rendering val set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=2000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_Sys/config/val.json --shape_color_material_combos_json ./src/render/data/all.json --split val --output_image_dir ./ACRE_Sys/images/ --output_scene_dir ./ACRE_Sys/scenes/ --output_scene_file ./ACRE_Sys/ACRE_scenes.json --output_blend_dir ./ACRE_Sys/blendfiles >> "./log/Sys/val_round_$round.txt"
(( round+=1 ))
done
echo "Rendering test set"
(( round=0 ))
(( step=50 ))
for (( start_index=round*step; start_index<=2000-step; start_index+=step ))
do
echo "Start from $start_index"
(( end_index=start_index+step ))
blender2.79 --background -noaudio --python ./src/render/render_images.py -- --start_index $start_index --end_index $end_index --use_gpu 1 --dataset_json ./ACRE_Sys/config/test.json --shape_color_material_combos_json ./src/render/data/all.json --split test --output_image_dir ./ACRE_Sys/images/ --output_scene_dir ./ACRE_Sys/scenes/ --output_scene_file ./ACRE_Sys/ACRE_scenes.json --output_blend_dir ./ACRE_Sys/blendfiles >> "./log/Sys/test_round_$round.txt"
(( round+=1 ))
done