Skip to main content

MCCNN

MCCNN neural network for stereo matching cost.

Overview • Install • Usage • Pretrained Weights for MCCNN networks • Related • References

Overview

Pytorch implementation of [MCCNN] neural network which computes a similarity measure on pair of small image patches.

Install from Pypi

MCCNN is available on Pypi and can be installed by:

pip install MCCNN

Developer install

After cloning source code from repository, do a local pip install in a virtualenv through MCCNN Makefile:

make install

PyTorch is an optional dependency. If your work requires it (e.g. training or running neural networks, or loading .pt weight files), install the torch extras group:

make install-torch

or

pip install .[torch]

Note: If you do not need PyTorch, the base make install is sufficient.

Usage

Documentation explains how to train and use MCCNN convolutional neural network. To generate it, please execute the following commands:

make docs

Let's see pandora_plugin_mccnn for real life example.

Pretrained Weights for MCCNN networks

Download weights files

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

  • mc_cnn_fast_mb_weights.pt and mc_cnn_accurate_mb_weights.pt are the PyTorch weights of the pretrained networks on the Middlebury dataset [Middlebury]
  • mc_cnn_fast_data_fusion_contest.pt and mc_cnn_accurate_data_fusion_contest.pt are the PyTorch weights of the pretrained networks on the Data Fusion Contest dataset [DFC]
  • mc_cnn_fast_int8_excl_01.onnx and mc_cnn_fast_dw.onnx are the ONNX weights of the pretrained networks on the Middlebury dataset [Middlebury]

To download the pretrained weights:

wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/src/mc_cnn/weights/mc_cnn_fast_mb_weights.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/src/mc_cnn/weights/mc_cnn_fast_data_fusion_contest.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/src/mc_cnn/weights/mc_cnn_accurate_mb_weights.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/src/mc_cnn/weights/mc_cnn_accurate_data_fusion_contest.pt
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/src/mc_cnn/weights/mc_cnn_fast_int8_excl_01.onnx
wget https://raw.githubusercontent.com/CNES/Pandora_MCCNN/master/src/mc_cnn/weights/mc_cnn_fast_dw.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, get_onnx
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 = get_weights(arch="accurate", training_dataset="dfc")
onnx_mc_cnn_fast_int_8_mb_weights_path = get_onnx(arch="onnx_fast_int8", training_dataset="middlebury")
onnx_mc_cnn_fast_dw_mb_weights_path = get_onnx(arch="onnx_fast_dw", training_dataset="middlebury")

References

Please cite the following paper when using 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.

Metadata

Release files for MCCNN 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MCCNN 1.4.1
File Size Uploaded
mccnn-1.4.1.tar.gz 30.3 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for MCCNN 1.4.1
File
mccnn-1.4.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
mccnn-1.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
mccnn-1.4.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
mccnn-1.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
mccnn-1.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
mccnn-1.4.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
mccnn-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 139.0 MB

Release files / mccnn-1.4.1.tar.gz

Download URL mccnn-1.4.1.tar.gz
Size 30.3 MB
Tags Source
SHA-256 checksum
How to use checksums
e697974b6e0cc1b298b2e67d8db11e24672f500026ea1b49241da49127e1de23
BLAKE2b-256 checksum
How to use checksums
07f55faef1f1ac49f625fe708ff712cdb5ef268c164ef049f2a7cbbd8ba183be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mccnn-1.4.1-cp313-cp313-win_amd64.whl

Download URL mccnn-1.4.1-cp313-cp313-win_amd64.whl
Size 16.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a55475373e32f99849f0639da828044f2671e3ce84fb102effd54efdec832bdb
BLAKE2b-256 checksum
How to use checksums
f19fb0bb6da7242b9c0f264ec0afcea94f7e664d2c3750f4b3d4bcf953a7c306
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mccnn-1.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL mccnn-1.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 15.1 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ee339ea19edd2b18cc3d80f83298df9f5058b34c40ed9195f136b87a55beb9ae
BLAKE2b-256 checksum
How to use checksums
2f53f139b8c2a8e68b9b7456f4cf34653df07b8ea47e7a079f7be4749b4bbb36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mccnn-1.4.1-cp312-cp312-win_amd64.whl

Download URL mccnn-1.4.1-cp312-cp312-win_amd64.whl
Size 16.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
66ab7b535e541a0bf7eba4c39cceceab6db342062729b31d15412486960868d5
BLAKE2b-256 checksum
How to use checksums
488bcd88e2ead36ca267c22bef1b13fe83cfd50c7523e3cb8c35a551d5f12098
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mccnn-1.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL mccnn-1.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 15.1 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b3e530a26b8951d66fb2d45314f5eddf4c4174d33ac3415e552ea12c6a4d4ad0
BLAKE2b-256 checksum
How to use checksums
9d726619bde2a718fb0ea977a8dab023a2a943529fc29ca55878ccb829b553f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mccnn-1.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL mccnn-1.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 15.1 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bb4de5d72256c8d3e72f75db6bd215bbcea39bef57472da6914f030b1e50a658
BLAKE2b-256 checksum
How to use checksums
6cfa1777b3acdaf71b749237093f161e0a52ed0d57eba4ff650660040351340d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mccnn-1.4.1-cp310-cp310-win_amd64.whl

Download URL mccnn-1.4.1-cp310-cp310-win_amd64.whl
Size 16.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
81b61bd83365b0e51887261c51cb5a5a6461a1d49e2712eb6b5b0743b2bf7798
BLAKE2b-256 checksum
How to use checksums
1abcaa3c3465a62e31f76a599aab35628c8edb78d7cff2e32683a17a506b03cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / mccnn-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL mccnn-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 15.1 MB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
876c64d41002e17c3137616a0b4fca2e9a826fe2dfd024e44f509b6e25e45c85
BLAKE2b-256 checksum
How to use checksums
7482fe4d0379b0c40f08d2e867967c8f932725bb02e783e964a3ac34f6a73f83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log
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