pandora

This module contains functions to run Pandora pipeline.

Subpackages

Submodules

Package Contents

Functions

run(→ Tuple[xarray.Dataset, xarray.Dataset])

Run the pandora pipeline

setup_logging(→ None)

Setup the logging configuration

import_plugin(→ None)

Load all the registered entry points

main(→ None)

Check config file and run pandora framework accordingly

pandora.run(pandora_machine: state_machine.PandoraMachine, img_left: xarray.Dataset, img_right: xarray.Dataset, cfg: Dict[str, dict]) Tuple[xarray.Dataset, xarray.Dataset][source]

Run the pandora pipeline

Parameters:
  • pandora_machine (PandoraMachine) – instance of PandoraMachine

  • img_left (xarray.Dataset) –

    left Dataset image containing :

    • im: 2D (row, col) or 3D (band_im, row, col) xarray.DataArray float32

    • disparity (optional): 3D (disp, row, col) xarray.DataArray float32

    • msk (optional): 2D (row, col) xarray.DataArray int16

    • classif (optional): 3D (band_classif, row, col) xarray.DataArray int16

    • segm (optional): 2D (row, col) xarray.DataArray int16

  • img_right (xarray.Dataset) –

    right Dataset image containing :

    • im: 2D (row, col) or 3D (band_im, row, col) xarray.DataArray float32

    • disparity (optional): 3D (disp, row, col) xarray.DataArray float32

    • msk (optional): 2D (row, col) xarray.DataArray int16

    • classif (optional): 3D (band_classif, row, col) xarray.DataArray int16

    • segm (optional): 2D (row, col) xarray.DataArray int16

  • cfg (Dict[str, dict]) – pipeline configuration

Returns:

Two xarray.Dataset :

  • leftthe left dataset, which contains the variables :
    • disparity_map : the disparity map in the geometry of the left image 2D DataArray (row, col)

    • confidence_measure : the confidence measure in the geometry of the left image 3D DataArray (row, col, indicator)

    • validity_mask : the validity mask in the geometry of the left image 2D DataArray (row, col)

    • classif_mask : information about a classification

    • segm_mask : information about a segmentation

  • rightthe right dataset. If there is no validation step, the right Dataset will be empty.If a validation step is configured, the dataset will contain the variables :
    • disparity_map : the disparity map in the geometry of the right image 2D DataArray (row, col)

    • confidence_measure : the confidence measure in the geometry of the left image 3D DataArray (row, col, indicator)

    • validity_mask : the validity mask in the geometry of the left image 2D DataArray (row, col)

    • classif_mask : information about a classification

    • segm_mask : information about a segmentation

Return type:

tuple (xarray.Dataset, xarray.Dataset)

pandora.setup_logging(verbose: bool) None[source]

Setup the logging configuration

Parameters:

verbose (bool) – verbose mode

Returns:

None

pandora.import_plugin() None[source]

Load all the registered entry points :return: None

pandora.main(cfg_path: os.PathLike | str, output: str, verbose: bool) None[source]

Check config file and run pandora framework accordingly

Parameters:
  • cfg_path (string) – path to the json configuration file

  • output (string) – Path to output directory

  • verbose (bool) – verbose mode

Returns:

None