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 8100537e08615928fec08140bb4aa466d32a5b6e..ed4d5f1db00495a491fe7a6a7af7f4d8e95bff98 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