mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 12:36:36 +00:00
add resume training possibility
This commit is contained in:
@@ -172,6 +172,17 @@ def get_latest_model():
|
||||
return last_model['date'], last_model['path']
|
||||
|
||||
|
||||
def resume_training(last_pt_path):
|
||||
model = YOLO(last_pt_path)
|
||||
results = model.train(data=yaml,
|
||||
resume=True,
|
||||
epochs=120,
|
||||
batch=12,
|
||||
imgsz=1280,
|
||||
save_period=1,
|
||||
workers=24)
|
||||
|
||||
|
||||
def train_dataset(existing_date=None, from_scratch=False):
|
||||
latest_date, latest_model = get_latest_model() if not from_scratch else None, None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user