INNER CODE UNIT · Python

parse_args

ultralytics/yolo-flutter-app · scripts/export-tflite-models.py:59

def parse_args() -> argparse.Namespace:
    """Parse command-line arguments."""
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--output-dir", type=Path, default=DEFAULT_OUTPUT_DIR)
    parser.add_argument("--repo", default=DEFAULT_REPO)
    parser.add_argument("--tag", default=DEFAULT_TAG)
    parser.add_argument("--sizes", nargs="+", choices=SIZES, default=list(SIZES))
    parser.add_argument("--tasks", nargs="+", choices=TASKS.keys(), default=list(TASKS))
    parser.add_argument("--verify", action="store_true", help="Run one zero-input TFLite inference per exported file.")
    parser.add_argument("--force", action="store_true", help="Re-export assets that already exist in release-assets/.")
    parser.add_argument("--worker-model-id", help=argparse.SUPPRESS)
    parser.add_argument("--worker-imgsz", type=int, help=argparse.SUPPRESS)
    parser.add_argument(
        "--upload",
        action="store_true",
        help="Upload generated .tflite files to the GitHub release with gh release upload --clobber.",
    )
    return parser.parse_args()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…