From a04d1fab8287f06aeebb970cb98a4dceb539f1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frano=20Raji=C4=8D?= Date: Mon, 4 Mar 2024 21:42:29 +0100 Subject: [PATCH] fix refactoring bugs in movi_def_worker (#309) --- challenges/movi/README.md | 2 +- challenges/movi/movi_def_worker.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/challenges/movi/README.md b/challenges/movi/README.md index a8148cf1..2084885b 100644 --- a/challenges/movi/README.md +++ b/challenges/movi/README.md @@ -477,7 +477,7 @@ docker run --rm --interactive \ kubricdockerhub/kubruntu \ /usr/bin/python3 challenges/movi/movi_def_worker.py \ --camera=linear_movement_linear_lookat \ - --max_camera_motion=8.0 + --max_camera_movement=8.0 ``` See [movi_e.py](movi_e.py) for the TFDS definition / conversion. diff --git a/challenges/movi/movi_def_worker.py b/challenges/movi/movi_def_worker.py index d93a73a2..dc407c59 100644 --- a/challenges/movi/movi_def_worker.py +++ b/challenges/movi/movi_def_worker.py @@ -50,7 +50,7 @@ parser.add_argument("--backgrounds_split", choices=["train", "test"], default="train") -parser.add_argument("--camera", choices=["fixed_random", "linear_movement"], +parser.add_argument("--camera", choices=["fixed_random", "linear_movement", "linear_movement_linear_lookat"], default="fixed_random") parser.add_argument("--max_camera_movement", type=float, default=4.0) parser.add_argument("--max_motion_blur", type=float, default=0.0) @@ -169,11 +169,11 @@ def get_linear_lookat_motion_start_end( inner_radius=7., outer_radius=9., offset=0.1) scene.camera.look_at((0, 0, 0)) elif ( - config.camera == "linear_movement" - or config.camera == "linear_movement_linear_lookat" + FLAGS.camera == "linear_movement" + or FLAGS.camera == "linear_movement_linear_lookat" ): - is_panning = config.camera == "linear_movement_linear_lookat" + is_panning = FLAGS.camera == "linear_movement_linear_lookat" camera_inner_radius = 6.0 if is_panning else 8.0 camera_start, camera_end = get_linear_camera_motion_start_end( movement_speed=rng.uniform(low=0., high=FLAGS.max_camera_movement)