Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Pandora plugin mccnn

MC-CNN neural network plugin for .

OverviewInstallUsageRelatedReferences

Overview

Pandora stereo matching framework is designed to provide some state of the art stereo algorithms and to add others one as plugins.
This Pandora plugin aims to compute the cost volume using the similarity measure produced by MC-CNN neural network [MCCNN], with the MCCNN library .

Install

pandora_plugin_mccnn is available on Pypi and can be installed by:

pip install pandora_plugin_mccnn

This command will installed required dependencies as Pandora and MCCNN.

Usage

Let's refer to Pandora's readme or online documentation for further information about Pandora general functionalities.

More specifically, you can find :

Pretrained Weights for MCCNN networks

Download weights files

Pretrained weights for mc-cnn fast and mc-cnn accurate neural networks are available in the MCCNN repository:

Fast network

  • mc_cnn_fast_mb_weights.pt are the weights of the pretrained networks on the Middlebury dataset [Middlebury]
  • mc_cnn_fast_data_fusion_contest.pt are the weights of the pretrained networks on the Data Fusion Contest dataset [DFC]
  • mc_cnn_fast_dw.onnx are the weights of the pretrained networks using depthwise convolutions on the Middlebury dataset [Middlebury]
  • mc_cnn_fast_int8_excl_01.onnx are the weights of the quantized pretrained networks on the Middlebury dataset [Middlebury], where layers 0 and 1 are excluded from quantization

Accurate network

  • mc_cnn_accurate_mb_weights.pt are the weights of the pretrained networks on the Middlebury dataset [Middlebury]
  • mc_cnn_accurate_data_fusion_contest.pt are the weights of the pretrained networks on the Data Fusion Contest dataset [DFC]

To download the pretrained weights:

wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/mc_cnn/weights/mc_cnn_fast_mb_weights.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/mc_cnn/weights/mc_cnn_fast_data_fusion_contest.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/mc_cnn/weights/mc_cnn_accurate_mb_weights.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/mc_cnn/weights/mc_cnn_accurate_data_fusion_contest.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/mc_cnn/weights/mc_cnn_fast_dw.onnx
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/mc_cnn/weights/mc_cnn_fast_int8_excl_01.onnx

Access weights from pip package

Pretrained weights are stored into the pip package and downloaded for any installation of mc_cnn pip package. To access it, use the weights submodule :

from mc_cnn.weights import get_weights
mc_cnn_fast_mb_weights_path = get_weights(arch="fast", training_dataset="middlebury")
mc_cnn_fast_data_fusion_contest_path = get_weights(arch="fast", training_dataset="dfc")
mc_cnn_accurate_mb_weights_path = get_weights(arch="accurate", training_dataset="middlebury")
mc_cnn_accurate_data_fusion_contest_path = get_weights(arch="accurate", training_dataset="dfc")
mc_cnn_onnx_fast_int8_path = get_weights(arch="onnx_fast_int8", training_dataset="middlebury")
mc_cnn_onnx_fast_dw_path = get_weights(arch="onnx_fast_dw", training_dataset="middlebury")

Output example

The figures below show disparity maps produced on mountain, and desert areas generated with the Census and MCCNN similarity measures :

Left image Left disparity map using Census measure Left disparity map using mc-cnn fast pretrained on Middlebury Left disparity map using mc-cnn fast pretrained DFC
mountain_img mountain_census mountain_mid mountain_dfc
desert_img desert_census desert_mid desert_dfc

Related

Pandora - A stereo matching framework
MCCNN - Pytorch/python implementation of mc-cnn neural network

References

Please cite the following paper when using Pandora and pandora_plugin_mccnn:

Defonte, V., Dumas, L., Cournet, M., & Sarrazin, E. (2021, July). Evaluation of MC-CNN Based Stereo Matching Pipeline for the CO3D Earth Observation Program. In 2021 IEEE International Geoscience and Remote Sensing Symposium IGARSS (pp. 7670-7673). IEEE.

Cournet, M., Sarrazin, E., Dumas, L., Michel, J., Guinet, J., Youssefi, D., Defonte, V., Fardet, Q., 2020. Ground-truth generation and disparity estimation for optical satellite imagery. ISPRS - International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences.

[MCCNN] Zbontar, J., & LeCun, Y. (2016). Stereo matching by training a convolutional neural network to compare image patches. J. Mach. Learn. Res., 17(1), 2287-2318.

[Middlebury] Scharstein, D., Hirschmüller, H., Kitajima, Y., Krathwohl, G., Nešić, N., Wang, X., & Westling, P. (2014, September). High-resolution stereo datasets with subpixel-accurate ground truth. In German conference on pattern recognition (pp. 31-42). Springer, Cham.

[DFC] Bosch, M., Foster, K., Christie, G., Wang, S., Hager, G. D., & Brown, M. (2019, January). Semantic stereo for incidental satellite images. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV) (pp. 1524-1532). IEEE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandora_plugin_mccnn-1.3.8a1.tar.gz (4.0 MB view details)

Uploaded Source

File details

Details for the file pandora_plugin_mccnn-1.3.8a1.tar.gz.

File metadata

  • Download URL: pandora_plugin_mccnn-1.3.8a1.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pandora_plugin_mccnn-1.3.8a1.tar.gz
Algorithm Hash digest
SHA256 bb5e00947ca24b49abb6c7c745492f1cc20de59e1dfea2f5ea270f0f3191c035
MD5 535cc9b8e4bd4b238219deae4f6733e0
BLAKE2b-256 a17a74c847af44e3364398350a4d61d42f2b9d9ead89aed8e924adeffed73ff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pandora_plugin_mccnn-1.3.8a1.tar.gz:

Publisher: pandora_plugin_mccnn.yml on CNES/Pandora_plugin_mccnn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.3.8

1 file

This release

1.3.8a1 This release

1 file

1.3.7

1 file

1.3.6

1 file

1.3.5

1 file

1.3.4

1 file

1.3.3

1 file

1.3.2

1 file

1.3.0

1 file

1.2.0

1 file

1.1.0

1 file

1.0.1

1 file

1.0.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page