INNER CODE UNIT · Python

display_path

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

def display_path(path: Path) -> str:
    """Return a repository-relative path when possible."""
    try:
        return str(path.relative_to(ROOT))
    except ValueError:
        return str(path)


def export_one(model_id: str, imgsz: int, output_dir: Path) -> None:
    """Export one YOLO model to w8a32 LiteRT (no calibration data required)."""
    from ultralytics import YOLO

    os.chdir(output_dir)
    YOLO(output_dir / f"{model_id}.pt").export(
        format="litert",
        quantize=QUANTIZE,
        nms=None,
        imgsz=imgsz,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…