main_profile.py 354 B

1234567891011121314
  1. import warnings
  2. warnings.filterwarnings('ignore')
  3. from ultralytics import YOLO
  4. if __name__ == '__main__':
  5. # choose your yaml file
  6. model = YOLO('ultralytics/cfg/models/v10/yolov10b-bifpn.yaml')
  7. model.info(detailed=True)
  8. try:
  9. model.profile(imgsz=[640, 640])
  10. except Exception as e:
  11. print(e)
  12. pass
  13. model.fuse()