import sys
from ultralytics import YOLO

def export_onnx(pt_path):
    model = YOLO(pt_path, task='detect')
    model.export(format="onnx", dynamic=False, simplify=True, device="cpu", nms=False)


if __name__ == "__main__":
    export_onnx(sys.argv[1])