Commit 5b60dead authored by Robin Tissot's avatar Robin Tissot
Browse files

Segmentation training resize and train on top of default model.

parent 95bfde97
......@@ -146,8 +146,7 @@ def segtrain(task, model_pk, document_pk, part_pks, user_pk=None):
load = model.file.path
upload_to = model.file.field.upload_to(model, model.name + '.mlmodel')
except ValueError: # model is empty
# load = settings.KRAKEN_DEFAULT_SEGMENTATION_MODEL
load = None
load = settings.KRAKEN_DEFAULT_SEGMENTATION_MODEL
upload_to = model.file.field.upload_to(model, model.name + '.mlmodel')
model.file = upload_to
......@@ -185,6 +184,7 @@ def segtrain(task, model_pk, document_pk, part_pks, user_pk=None):
evaluation_data=evaluation_data,
threads=LOAD_THREADS,
augment=True,
resize='both',
load_hyper_parameters=True)
if not os.path.exists(os.path.split(modelpath)[0]):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment