2023-10-10 03:17:35henryng3

Yolov8 Models 測試 網站架設

網站架設

官方文件鏈結 https://docs.ultralytics.com/models/

程式碼

  1. from ultralytics import YOLO
  2. import os
  3. os.environ["KMP_DUPLICATE_LIB_OK"]  =  "TRUE"
  4.  
  5. if __name__ == '__main__':
  6.     # Load a COCO-pretrained YOLOv8n model
  7.     model = YOLO('yolov8n.pt')
  8.  
  9.     # Display model information (optional)
  10.     model.info()
  11.  
  12.     # Train the model on the COCO8 example dataset for 100 epochs
  13.     results = model.train(data='coco8.yaml', epochs=100, imgsz=640)
  14.  
  15.     # Run inference with the YOLOv8n model on the 'bus.jpg' image
  16.     results = model('bus.jpg')
複製代碼



原始圖片
Yolov8 Models 測試Yolov8 Models 測試

結果圖:
Yolov8 Models 測試 Yolov8 Models 測試Yolov8 Models 測試
Yolov8 Models 測試
文章出處:NetYea 網頁設計