Skip to content

ornlneutronimaging/bm3dornl

Repository files navigation

Build Status codecov CII Best Practices pre-commit.ci status Documentation Status Anaconda-Server Badge

BM3D ORNL

This repository contains the BM3D ORNL code, which is a Python implementation of the BM3D denoising algorithm. The BM3D algorithm was originally proposed by K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian in the paper "Image Denoising by Sparse 3D Transform-Domain Collaborative Filtering" (2007). The BM3D algorithm is a state-of-the-art denoising algorithm that is widely used in the image processing community. The BM3D ORNL code is a Python implementation of the BM3D algorithm that has been optimized for performance using both Numba and CuPy. The BM3D ORNL code is designed to be easy to use and easy to integrate into existing Python workflows. The BM3D ORNL code is released under an open-source license, and is freely available for download and use.

For more information, check out our FAQ.

How to install

For users, you can install the latest version published on our anaconda channel with:

conda install neutronimaging::bm3dornl

Or use pip to install from PyPI

pip install bm3dornl

Since the PyPI version relies on pre-built CuPy from PyPI, it is possible that the bundled latest version of CuPy might not be compatible. In such situations, please either install the correct pre-built version via pip, e.g. pip install cupy-cuda11x for Nvidia card with older drivers, or use local nvcc to build CuPy from source with pip install cupy.

How to contribute

For developers, please fork this repo and create a conda development environment with

conda env create -f environment.yml

followed by

pip install --no-deps -e .

The option --no-deps here is critical as pip will try to install a second set of dependencies based on information from pyproject.toml. Since conda does not check packages compatibility installed from pip, we need to avoid bring in in-compatible packages.

Once your feature implementation is ready, please make a pull request and ping one of our developers for review.