mirror of
https://gitee.com/nanjing-yimao-information/ieemoo-ai-gift.git
synced 2025-08-18 21:30:25 +00:00
update
This commit is contained in:
21
train.py
Normal file
21
train.py
Normal file
@ -0,0 +1,21 @@
|
||||
from ultralytics import YOLOv10
|
||||
|
||||
# model = YOLOv10()
|
||||
#model = YOLOv10('ultralytics/cfg/models/v10/yolov10s.yaml')
|
||||
#model = YOLOv10('runs/detect/runs_1010_1205_width0.375/weights/last.pt')
|
||||
#model = YOLOv10('runs/detect/train4/weights/last.pt')
|
||||
model = YOLOv10('ckpts/weights/yolov10n.pt')
|
||||
|
||||
# If you want to finetune the model with pretrained weights, you could load the
|
||||
# pretrained weights like below
|
||||
# model = YOLOv10.from_pretrained('jameslahm/yolov10{n/s/m/b/l/x}')
|
||||
# or
|
||||
# wget https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10{n/s/m/b/l/x}.pt
|
||||
# model = YOLOv10('yolov10{n/s/m/b/l/x}.pt')
|
||||
# model = YOLOv10('yolov10s.pt')
|
||||
|
||||
#model.train(data='coco.yaml', epochs=1, batch=64, imgsz=640)
|
||||
#model.train(data='coco128_cls10_0924.yaml', epochs=300, batch=64, imgsz=640, resume=False)
|
||||
#model.train(data='coco128_cls10_1010.yaml', epochs=300, batch=128, imgsz=640, resume=False)
|
||||
model.train(data='gift.yaml', epochs=200, batch=16, imgsz=224, resume=False, save_dir='ckpts')
|
||||
#model.train(data='coco128_cls10_1010_1205.yaml', epochs=300, batch=32, imgsz=640, resume=True)
|
Reference in New Issue
Block a user