From 6e315a2b8205ad8a00bc553cd79124bc20617b79 Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Mon, 16 Oct 2023 16:09:17 +0200 Subject: [PATCH] Trying to recreate error during inference --- .../transfer_labels_to_ilastik_object_classifier.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extensions/chaeo/examples/transfer_labels_to_ilastik_object_classifier.py b/extensions/chaeo/examples/transfer_labels_to_ilastik_object_classifier.py index 8100537e..ed4d5f1d 100644 --- a/extensions/chaeo/examples/transfer_labels_to_ilastik_object_classifier.py +++ b/extensions/chaeo/examples/transfer_labels_to_ilastik_object_classifier.py @@ -7,6 +7,7 @@ import pandas as pd import uuid from extensions.chaeo.util import autonumber_new_file +from extensions.ilastik.models import IlastikObjectClassifierModel from model_server.accessors import generate_file_accessor def get_dataset_info(h5, lane=0): @@ -137,8 +138,14 @@ def generate_ilastik_object_classifier(template_ilp, where: str, lane=0): for zi in range(0, nz): lag[f'{zi}'] = np.array([0., float(get_label(zi))]) + return new_ilp + if __name__ == '__main__': - generate_ilastik_object_classifier( + new_ilp = generate_ilastik_object_classifier( 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0014/template_obj.ilp', 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0009/output/labeled_patches-20231016-0002' - ) \ No newline at end of file + ) + + mod = IlastikObjectClassifierModel({'project_file': new_ilp}) + + print(mod.project_file_abspath) \ No newline at end of file -- GitLab