Skip to content

Commit 775b5cc

Browse files
committed
Move settings into generate
1 parent 058d7ba commit 775b5cc

File tree

2 files changed

+19
-28
lines changed

2 files changed

+19
-28
lines changed

generate.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,27 @@
22
import sys
33

44
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
5+
BASE_DIR = os.path.dirname(SCRIPT_DIR)
56
sys.path.append(SCRIPT_DIR)
67

78
from datagen import Generator
8-
from settings import (
9-
source_folder,
10-
destination_folder,
11-
camera_angles_range,
12-
camera_distance_range,
13-
render_per_input,
14-
)
9+
10+
11+
# The folder with images to render
12+
source_folder = os.path.join(BASE_DIR, "src")
13+
14+
# The folder to place renders
15+
destination_folder = os.path.join(BASE_DIR, "dst")
16+
17+
# The angles and distance are the spherical coordinates of the camera
18+
# given that the position of the object in the scene is (0,0,0)
19+
# render_per_input times different angles and distances are sampled
20+
# from these ranges
21+
camera_angles_range = [[70, -60], [110, 60]]
22+
23+
camera_distance_range = [3, 5]
24+
25+
render_per_input = 2
1526

1627

1728
if __name__ == "__main__":
@@ -21,5 +32,4 @@
2132
camera_angles_range=camera_angles_range,
2233
camera_distance_range=camera_distance_range,
2334
render_per_input=render_per_input,
24-
)
25-
gen.run()
35+
).run()

settings.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)