add multi trainings +fix path for coco retraining
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user