Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hyphen instead of underscore for example arguments #4543

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/python/controlnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ python examples/python/controlnet/main.py

You can specify your own image and prompts using
```bash
main.py [--img_path IMG_PATH] [--prompt PROMPT] [--negative_prompt NEGATIVE_PROMPT]
main.py [--img-path IMG_PATH] [--prompt PROMPT] [--negative-prompt NEGATIVE_PROMPT]
```
4 changes: 2 additions & 2 deletions examples/python/controlnet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def run_canny_controlnet(image_path: str, prompt: str, negative_prompt: str) ->
def main() -> None:
parser = argparse.ArgumentParser(description="Use Canny-conditioned ControlNet to generate image.")
parser.add_argument(
"--img_path",
"--img-path",
type=str,
help="Path to image used as input for Canny edge detector.",
default=RERUN_LOGO_URL,
Expand All @@ -119,7 +119,7 @@ def main() -> None:
default="aerial view, a futuristic research complex in a bright foggy jungle, hard lighting",
)
parser.add_argument(
"--negative_prompt",
"--negative-prompt",
type=str,
help="Negative prompt used as input for ControlNet.",
default="low quality, bad quality, sketches",
Expand Down
10 changes: 5 additions & 5 deletions examples/python/depth_guided_stable_diffusion/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def main() -> None:
choices=IMAGE_NAMES,
help="The example image to run on.",
)
parser.add_argument("--dataset_dir", type=Path, default=DATASET_DIR, help="Directory to save example images to.")
parser.add_argument("--image_path", type=str, default="", help="Full path to image to run on. Overrides `--image`.")
parser.add_argument("--dataset-dir", type=Path, default=DATASET_DIR, help="Directory to save example images to.")
parser.add_argument("--image-path", type=str, default="", help="Full path to image to run on. Overrides `--image`.")

parser.add_argument(
"--prompt",
Expand All @@ -70,7 +70,7 @@ def main() -> None:
default="A tired robot sitting down on a dirt floor. Rusty metal. Unreal Engine. Wall-e",
)
parser.add_argument(
"--n_prompt",
"--n-prompt",
type=str,
help="Negative prompt describing what you don't want in the image you generate.",
default="White uniform floor and background",
Expand All @@ -88,7 +88,7 @@ def main() -> None:
""",
)
parser.add_argument(
"--guidance_scale",
"--guidance-scale",
type=float,
default=11,
help="""
Expand All @@ -100,7 +100,7 @@ def main() -> None:
""",
)
parser.add_argument(
"--num_inference_steps",
"--num-inference-steps",
type=int,
default=10,
help="""
Expand Down
4 changes: 2 additions & 2 deletions examples/python/detect_and_track_objects/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ def main() -> None:
choices=["horses, driving", "boats"],
help="The example video to run on.",
)
parser.add_argument("--dataset_dir", type=Path, default=DATASET_DIR, help="Directory to save example videos to.")
parser.add_argument("--video_path", type=str, default="", help="Full path to video to run on. Overrides `--video`.")
parser.add_argument("--dataset-dir", type=Path, default=DATASET_DIR, help="Directory to save example videos to.")
parser.add_argument("--video-path", type=str, default="", help="Full path to video to run on. Overrides `--video`.")
parser.add_argument(
"--max-frame",
type=int,
Expand Down
4 changes: 2 additions & 2 deletions examples/python/human_pose_tracking/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def main() -> None:
choices=["backflip", "soccer"],
help="The example video to run on.",
)
parser.add_argument("--dataset_dir", type=Path, default=DATASET_DIR, help="Directory to save example videos to.")
parser.add_argument("--video_path", type=str, default="", help="Full path to video to run on. Overrides `--video`.")
parser.add_argument("--dataset-dir", type=Path, default=DATASET_DIR, help="Directory to save example videos to.")
parser.add_argument("--video-path", type=str, default="", help="Full path to video to run on. Overrides `--video`.")
parser.add_argument("--no-segment", action="store_true", help="Don't run person segmentation.")
parser.add_argument(
"--max-frame",
Expand Down
6 changes: 3 additions & 3 deletions examples/python/lidar/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ def log_nuscenes_lidar(root_dir: pathlib.Path, dataset_version: str, scene_name:
def main() -> None:
parser = argparse.ArgumentParser(description="Visualizes lidar scans using the Rerun SDK.")
parser.add_argument(
"--root_dir",
"--root-dir",
type=pathlib.Path,
default=DATASET_DIR,
help="Root directory of nuScenes dataset",
)
parser.add_argument(
"--scene_name",
"--scene-name",
type=str,
default="scene-0061",
help="Scene name to visualize (typically of form 'scene-xxxx')",
)
parser.add_argument("--dataset_version", type=str, default="v1.0-mini", help="Scene id to visualize")
parser.add_argument("--dataset-version", type=str, default="v1.0-mini", help="Scene id to visualize")
rr.script_add_args(parser)
args = parser.parse_args()

Expand Down
6 changes: 3 additions & 3 deletions examples/python/nuscenes/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,18 @@ def log_sensor_calibration(sample_data: dict[str, Any], nusc: nuscenes.NuScenes)
def main() -> None:
parser = argparse.ArgumentParser(description="Visualizes the nuScenes dataset using the Rerun SDK.")
parser.add_argument(
"--root_dir",
"--root-dir",
type=pathlib.Path,
default=DATASET_DIR,
help="Root directory of nuScenes dataset",
)
parser.add_argument(
"--scene_name",
"--scene-name",
type=str,
default="scene-0061",
help="Scene name to visualize (typically of form 'scene-xxxx')",
)
parser.add_argument("--dataset_version", type=str, default="v1.0-mini", help="Scene id to visualize")
parser.add_argument("--dataset-version", type=str, default="v1.0-mini", help="Scene id to visualize")
rr.script_add_args(parser)
args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion examples/python/objectron/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def main() -> None:
help="Reprocess video frames even if they already exist",
)
parser.add_argument(
"--dataset_dir", type=Path, default=LOCAL_DATASET_DIR, help="Directory to save example videos to."
"--dataset-dir", type=Path, default=LOCAL_DATASET_DIR, help="Directory to save example videos to."
)

rr.script_add_args(parser)
Expand Down
2 changes: 1 addition & 1 deletion examples/python/raw_mesh/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def main() -> None:
help="The name of the scene to load",
)
parser.add_argument(
"--scene_path",
"--scene-path",
type=Path,
help="Path to a scene to analyze. If set, overrides the `--scene` argument.",
)
Expand Down
2 changes: 1 addition & 1 deletion examples/python/signed_distance_fields/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def main() -> None:
help="The name of the mesh to analyze",
)
parser.add_argument(
"--mesh_path",
"--mesh-path",
type=Path,
help="Path to a mesh to analyze. If set, overrides the `--mesh` argument.",
)
Expand Down
8 changes: 4 additions & 4 deletions examples/python/structure_from_motion/read_write_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ def rotmat2qvec(R):

def main():
parser = argparse.ArgumentParser(description="Read and write COLMAP binary and text models")
parser.add_argument("--input_model", help="path to input model folder")
parser.add_argument("--input_format", choices=[".bin", ".txt"], help="input model format", default="")
parser.add_argument("--output_model", help="path to output model folder")
parser.add_argument("--output_format", choices=[".bin", ".txt"], help="output model format", default=".txt")
parser.add_argument("--input-model", help="path to input model folder")
parser.add_argument("--input-format", choices=[".bin", ".txt"], help="input model format", default="")
parser.add_argument("--output-model", help="path to output model folder")
parser.add_argument("--output-format", choices=[".bin", ".txt"], help="output model format", default=".txt")
args = parser.parse_args()

cameras, images, points3D = read_model(path=args.input_model, ext=args.input_format)
Expand Down
Loading