Skip to content

Commit 614753a

Browse files
committed
init commit. change the environment to be more clutter. change the default desk height and the door width
1 parent 59a2574 commit 614753a

File tree

17 files changed

+303
-17
lines changed

17 files changed

+303
-17
lines changed

count_obj.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
def count_lines_per_object(obj_file_path):
2+
object_lines = {}
3+
current_object = None
4+
line_count = 0
5+
6+
try:
7+
with open(obj_file_path, 'r') as file:
8+
lines = file.readlines()
9+
for i, line in enumerate(lines):
10+
if line.startswith('o '):
11+
if current_object is not None:
12+
object_lines[current_object] = line_count
13+
current_object = line.split(' ', 1)[1].strip()
14+
line_count = 0
15+
line_count += 1
16+
17+
# 处理最后一个物体
18+
if current_object is not None:
19+
object_lines[current_object] = line_count
20+
21+
except FileNotFoundError:
22+
print(f"文件 {obj_file_path} 未找到。")
23+
return
24+
25+
return object_lines
26+
27+
# 示例使用
28+
obj_file_path = '/ssd/yangyuqiang/infinigen/outputs/multi_dataset_no_plantandshlefobj/506fc8f/fine/scene.obj'
29+
result = count_lines_per_object(obj_file_path)
30+
31+
# 计算总行数
32+
total_lines = sum(result.values())
33+
34+
# 按照行数降序排序
35+
sorted_result = sorted(result.items(), key=lambda item: item[1], reverse=True)
36+
total_pro = 0.0
37+
for object_name, line_count in sorted_result:
38+
# 计算单个物体占总物体大小的比例
39+
proportion = (line_count / total_lines) * 100
40+
total_pro += proportion
41+
print(f"物体 {object_name} 所占行数: {line_count},占比: {proportion:.5f}%, cumsum: {total_pro:.5f}% ")

infinigen/assets/objects/shelves/simple_desk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def create_asset(self, i=0, **params):
410410
class SimpleDeskFactory(SimpleDeskBaseFactory):
411411
def sample_params(self):
412412
params = dict()
413-
params["Dimensions"] = (uniform(0.5, 0.75), uniform(0.8, 2), uniform(0.6, 0.8))
413+
params["Dimensions"] = (uniform(0.5, 0.75), uniform(0.8, 2), uniform(0.8, 1.2))
414414
params["depth"] = params["Dimensions"][0]
415415
params["width"] = params["Dimensions"][1]
416416
params["height"] = params["Dimensions"][2]

infinigen/core/constraints/constraint_language/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(
5151
def global_params(
5252
self,
5353
unit=0.5,
54-
segment_margin=1.4,
54+
segment_margin=1.8,
5555
wall_thickness=("uniform", 0.2, 0.3),
5656
wall_height=("uniform", 2.8, 3.2),
5757
):
@@ -65,7 +65,7 @@ def global_params(
6565
}
6666

6767
def door_params(
68-
self, door_width_ratio=("uniform", 0.7, 0.8), door_size=("uniform", 2.0, 2.4)
68+
self, door_width_ratio=("uniform", 0.9, 0.95), door_size=("uniform", 2.2, 2.6)
6969
):
7070
door_width = (self.segment_margin - self.wall_thickness) * rg(door_width_ratio)
7171
assert door_width > 0

infinigen/datagen/configs/compute_platform/local_256GB.gin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ get_cmd.process_niceness = 20 # let UI processes etc take precedence, to make th
66
local_submit_cmd.use_scheduler = True
77
LocalScheduleHandler.jobs_per_gpu = 1
88
jobs_to_launch_next.max_queued_total = 1
9-
jobs_to_launch_next.max_stuck_at_task = 4
9+
jobs_to_launch_next.max_stuck_at_task = 12
1010

1111
# All will run locally, LocalScheduleHandler doesnt actually enforce cpu/ram constraints currently
1212
queue_coarse.submit_cmd = @local_submit_cmd

infinigen_examples/configs_indoor/__init__.py

Whitespace-only changes.

infinigen_examples/configs_indoor/disable/__init__.py

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GraphMaker.room_children='studio'

infinigen_examples/configs_nature/__init__.py

Whitespace-only changes.

infinigen_examples/configs_nature/disable_assets/__init__.py

Whitespace-only changes.

infinigen_examples/configs_nature/extras/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)