Skip to content

Commit

Permalink
Change customgt path var, change opengl args to --longform
Browse files Browse the repository at this point in the history
  • Loading branch information
araistrick authored and pvl-bot committed Aug 26, 2024
1 parent 5b785e6 commit 8d2b78a
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions infinigen/datagen/job_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
)
assert UPLOAD_UTIL_PATH.exists(), f"{UPLOAD_UTIL_PATH=} does not exist"

CUSTOMGT_PATH = Path(__file__).parent / "customgt" / "build" / "customgt"
if not CUSTOMGT_PATH.exists():
logger.warning(
f"{CUSTOMGT_PATH=} does not exist, if opengl_gt is enabled it will fail"
)


@gin.configurable
def get_cmd(
Expand Down Expand Up @@ -482,13 +488,6 @@ def queue_mesh_save(
return res, output_folder


process_mesh_path = Path(__file__).parent / "customgt" / "build" / "customgt"
if not process_mesh_path.exists():
logger.warning(
f"{process_mesh_path=} does not exist, if opengl_gt is enabled it will fail"
)


@gin.configurable
def queue_opengl(
submit_cmd,
Expand Down Expand Up @@ -548,26 +547,26 @@ def queue_opengl(
f"{sys.executable} {infinigen.repo_root()/'infinigen/tools/process_static_meshes.py'} {input_folder} {point_trajectory_src_frame}"
)
lines += [
f"{process_mesh_path} -in {input_folder} -dst_in {input_folder} "
f"--frame {frame_idx} --dst_frame {frame_idx+1} -out {output_folder} "
f"{CUSTOMGT_PATH} --input_dir {input_folder} --dst_input_dir {input_folder} "
f"--frame {frame_idx} --dst_frame {frame_idx+1} --output_dir {output_folder} "
for frame_idx in range(start_frame, end_frame + 1)
]
# point trajectory
lines += [
f"{process_mesh_path} -in {input_folder} -dst_in {input_folder} "
f"--frame {point_trajectory_src_frame} --dst_frame {frame_idx} --flow_only 1 --flow_type 2 -out {output_folder} "
f"{CUSTOMGT_PATH} --input_dir {input_folder} --dst_input_dir {input_folder} "
f"--frame {point_trajectory_src_frame} --dst_frame {frame_idx} --flow_only 1 --flow_type 2 --output_dir {output_folder} "
for frame_idx in range(start_frame, end_frame + 1)
]

# depth of block end frame
lines += [
f"{process_mesh_path} -in {input_folder} -dst_in {input_folder} "
f"--frame {end_frame+1} --dst_frame {end_frame+1} --depth_only 1 -out {output_folder} "
f"{CUSTOMGT_PATH} --input_dir {input_folder} --dst_input_dir {input_folder} "
f"--frame {end_frame+1} --dst_frame {end_frame+1} --depth_only 1 --output_dir {output_folder} "
]
# depth of point trajectory source frame
lines += [
f"{process_mesh_path} -in {input_folder} -dst_in {input_folder} "
f"--frame {point_trajectory_src_frame} --dst_frame {point_trajectory_src_frame} --depth_only 1 -out {output_folder} "
f"{CUSTOMGT_PATH} --input_dir {input_folder} --dst_input_dir {input_folder} "
f"--frame {point_trajectory_src_frame} --dst_frame {point_trajectory_src_frame} --depth_only 1 --output_dir {output_folder} "
]

lines.append(
Expand Down

0 comments on commit 8d2b78a

Please sign in to comment.