import sys
import shutil
from ultralytics import YOLO

def main(pt_path, onnx_path):
    model = YOLO(pt_path)
    model_path = model.export(format="onnx", dynamic=False, simplify=True, device="cpu", nms=False)
    shutil.move(model_path, onnx_path)
    
if __name__ == '__main__':
    main(sys.argv[1], sys.argv[2])