def define_flags()

in scripts/render/setup.py [0:0]


def define_flags():
    """Defines abseil flags for render."""
    for bin in bin_to_flags:
        for flag in bin_to_flags[bin]:
            if flag["name"] in flag_names:
                continue
            cmd = f"flags.DEFINE_{flag['type']}('{flag['name']}', {flag['default']}, '{flag['descr']}')"
            exec(cmd)
            flag_names.add(flag["name"])

    flags.DEFINE_integer("chunk_size", 1, "chunk size of work distribution to workers")
    flags.DEFINE_string("cloud", "", "cloud compute service (currently supports: aws)")
    flags.DEFINE_string("color_type", "color", "type of color to render")
    flags.DEFINE_string("disparity_type", "disparity", "type of disparity to render")
    flags.DEFINE_boolean(
        "do_temporal_filter", True, "whether to run temporal filtering"
    )
    flags.DEFINE_boolean(
        "do_temporal_masking",
        False,
        "use foreground masks when doing temporal filtering",
    )
    flags.DEFINE_boolean(
        "force_recompute",
        False,
        "whether to recompute previously performed pipeline stages",
    )
    flags.DEFINE_string("master", config.LOCALHOST, "ip address of master")
    flags.DEFINE_string(
        "password", "", "password for NFS (only relevant for SMB mounts)"
    )
    flags.DEFINE_boolean("run_convert_to_binary", True, "run binary conversion")
    flags.DEFINE_boolean("run_depth_estimation", True, "run depth estimation")
    flags.DEFINE_boolean("run_fusion", True, "run fusion")
    flags.DEFINE_boolean(
        "run_generate_foreground_masks", True, "run foreground mask generation"
    )
    flags.DEFINE_boolean("run_precompute_resizes", True, "run resizing")
    flags.DEFINE_boolean(
        "run_precompute_resizes_foreground", True, "run foreground mask resizing"
    )
    flags.DEFINE_boolean("run_simple_mesh_renderer", True, "run simple mesh renderer")
    flags.DEFINE_boolean("skip_setup", False, "assume workers have already been set up")
    flags.DEFINE_string(
        "username", "", "username for NFS (only relevant for SMB mounts)"
    )
    flags.DEFINE_string("workers", config.LOCALHOST, "ip addresses of workers")

    flag_names.update(
        {
            "chunk_size",
            "cloud",
            "color_type",
            "disparity_type",
            "do_temporal_filter",
            "do_temporal_masking",
            "force_recompute",
            "master",
            "password",
            "run_generate_foreground_masks",
            "run_precompute_resizes",
            "run_precompute_resizes_foreground",
            "run_depth_estimation",
            "run_convert_to_binary",
            "run_fusion",
            "run_simple_mesh_renderer",
            "skip_setup",
            "username",
            "workers",
        }
    )