Step1)到https://wandb.ai 申請一個帳號,登入後點選「Settings」,複製API金鑰
Step2)安裝wandb套件,執行「wandb login」,貼上剛剛複製的金鑰,點選enter,產生設定檔在.netrc。
#pip install wandb
#wandb login
Step3)在yolov5的train.py上新增以下程式碼,之後所有訓練都會上傳到wandb網站的該帳號下。
import wandb
wandb.init(project="your_project_name")
Step4)使用coco128資料集進行訓練3個Epoch
#python train.py --img 640 --batch 8 --epochs 3 --data coco128.yaml --weights yolov5s.pt
Step5)瀏覽wandb網站,多出以下專案coco128-project,表示前一個步驟的訓練紀錄已經上傳到wandb網站。