export_mobile_debug.py 390 B

123456789101112131415161718
  1. from ultralytics import YOLO
  2. import os
  3. # 1. Load your high-accuracy PC model
  4. model_path = 'best.pt'
  5. if not os.path.exists(model_path):
  6. print(f"Error: {model_path} not found.")
  7. else:
  8. model = YOLO(model_path)
  9. # Removing int8=True for debugging
  10. model.export(
  11. format='tflite',
  12. nms=True,
  13. imgsz=640
  14. )
  15. print("Mobile assets attempt finished.")