Skip to content
Snippets Groups Projects
generate_batch_json.py 1.33 KiB
Newer Older
cs = {
    'input': {
        'directory': 'Y:/TREC_STOP_26_Porto/MobileLab/LSM900/231026_automic/20231026-152512_lowzoom_data/LowZoom',
        'files': [

        ],
        'pattern': '.czi',
    },
    'setup': [
        {
            'description': 'Load an ilastik pixel classifier for segmentation',
            'method': 'PUT',
            'endpoint': 'ilastik/seg/load/',
            'params': {
                'model_id': 'px_seg_mod',
            },
            'body': {
                'project_file': 'ilastik/px-2d-cAF405-10x.ilp',
                'duplicate': False,
            },
        },
    ],
    'analyze': [
        {
            'description': 'Run segmentation with ilastik model',
            'method': 'PUT',
            'endpoint': 'pipelines/roiset_to_obmap/infer',
                'pixel_classifier_segmentation_model_id': 'px_seg_mod',
                'patches_channel': -1,
                'channel': 0,
            },
        },

    ],
    'teardown': [

    ],
}

if __name__ == '__main__':
    import json
    from pathlib import Path

    root = Path('C:\\Users\\rhodes\\projects\\proj0015-model-server\\dev\\dev_serverside_batch')

    fp = root / 'conf.json'
    with open(fp, 'w') as fh:
        json.dump(cs, fh, ensure_ascii=True)