add multi trainings +fix path for coco retraining

This commit is contained in:
Philipp
2025-12-02 10:16:18 +01:00
parent 0e31237b79
commit de5a8d2028
24 changed files with 2933 additions and 4533 deletions

View File

@@ -130,11 +130,17 @@ def start_yolox_training():
if (training.transfer_learning and
isinstance(training.transfer_learning, str) and
training.transfer_learning.lower() == 'coco'):
model_arg = f'-c {yolox_main_dir}/pretrained/{training.selected_model}.pth'
# Use yolox_path setting to construct pretrained model path
model_path = os.path.join(yolox_main_dir, 'pretrained', f'{training.selected_model}.pth')
model_path = model_path.replace('\\', '/') # Use forward slashes for command line
model_arg = f'-c {model_path}'
elif (training.selected_model and
training.selected_model.lower() == 'coco' and
(not training.transfer_learning or training.transfer_learning == False)):
model_arg = f'-c {yolox_main_dir}/pretrained/{training.selected_model}.pth'
# Use yolox_path setting to construct pretrained model path
model_path = os.path.join(yolox_main_dir, 'pretrained', f'{training.selected_model}.pth')
model_path = model_path.replace('\\', '/') # Use forward slashes for command line
model_arg = f'-c {model_path}'
# Build base training arguments
train_args = f'-f {exp_file_path} -d 1 -b 8 --fp16 --cache'