123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- from view.python_core.processing_pipelines import PipelineManager
- # this tells view all settings including the folder structure of your project
- # On Windows, if you copy paths from the file explorer, make sure the string below is always of the form r"......"
- ymlfile = r"/home/aj/SharedWithWindows/MR_Till/usage_till_linux.yml"
- # specify the pipeline definition file to use
- pipelines_definition_file = r"/home/aj/SharedWithWindows/MR_Till/progs/pipelines_settings/processing_pipelines.yml"
- # specify the animals whose data is to be processed; and their corresponding pipelines
- animals = {
- # "<animal name>": ['pipeline1', 'pipeline2', 'pipeline3'],
- # "MR_190510b_or47a": ['pipeline1', 'pipeline2'],
- "MR_190510b_or47a": ['pipeline1', 'pipeline2', 'pipeline4', 'pipeline5', 'pipeline5a']
- # "MR_190510b_or47a": ['pipeline1', 'pipeline4', 'pipeline5', 'pipeline5a']
- # "MR_190510b_or47a": ['pipeline1_custom_cnmf',
- # 'pipeline2_custom_cnmf',
- # 'pipeline4_custom_cnmf',
- # 'pipeline5_custom_cnmf',
- # 'pipeline5a_custom_cnmf'],
- # "MR_190510b_or47a": ['pipeline2_custom_cnmf',
- # 'pipeline2_custom_cnmf_1',
- # 'pipeline2_custom_cnmf_2',
- # 'pipeline2_custom_cnmf_3'
- # ]
- # "MR_190510b_or47a": [
- # 'pipeline2_rnmf_defaults', 'pipeline2_rnmf_maxCount_50'
- # ]
- }
- # ----------------------------------------------------------------------------------------------------------------------
- # visualization flags
- # These flags control some aspects of the graphs and plots of evaluation reports
- # -----------------------------------------------------------------------------------------------------------------------
- # Specifies a threshold that is used when creating and drawing contours of detected components
- # from their spatial footprints. Footprints are normalized by dividing by their maximum before being thresholded.
- # NOTE: Since this flag is also used when overlaying ROI information in TIF on overviews and movies,
- # please set for consistency the flag "RM_ROIThreshold" in your project YML file.
- roi_threshold = 0.75 # a float value between 0 and 1, like 0.75
- # A maximum-correlation summary image is created from the data and used as the background for showing
- # detected components. Maximum-correlation summary image is created by binning frames into non-overlapping bins, and the
- # size of these bins are controlled by this flag
- frame_bin_size = 200 # an integer value, like 200
- # ----------------------------------------------------------------------------------------------------------------------
- # required on windows when code spawns subprocesses
- # https://stackoverflow.com/questions/18204782/runtimeerror-on-windows-trying-python-multiprocessing
- if __name__ == '__main__':
- for animal, pipelines in animals.items():
- visualization_flags = {
- "roi_threshold": roi_threshold,
- "frame_bin_size": frame_bin_size
- }
- pipline_manager = PipelineManager(
- project_yml_file=ymlfile, animal=animal, pipelines_config_file=pipelines_definition_file,
- pipeline_names=pipelines, visualization_flags=visualization_flags)
- pipline_manager.run_all_pipelines(analyse_value_to_use=(1,))
|