Fast Reflection Removal
Removes reflections quickly and easily.
How to use
You can either:
- install it as a Python package,
- clone and use it as a repository, or
- use it as a web app on my website.
How to install
As a package
In your own project, just perform the following command:
# python refers to the virtual environment to install package to
python -m pip install fast-reflection-removal
Now, you can use the reflection removal in your project in the following manner:
from frr import FastReflectionRemoval
...
# numpy array with values between 0 and 1 of shape (H, W, C)
img = ...
# instantiate the algoroithm class
alg = FastReflectionRemoval(h = 0.11)
# run the algorithm and get result of shape (H, W, C)
dereflected_img = alg.remove_reflection(img)
...
As a repository
- Clone the project and go to its root directory.
- Create and activate the virtual environment:
# create the environment python3 -m venv "venv" # activate the environment source venv/bin/activate # on Windows ./venv/Scripts/activate.ps1 in Powershell
- Install the necessary packages:
python -m pip install --upgrade pip python -m pip install --upgrade wheel setuptools pip-tools
- Install the packages from requirements and the project:
make sync # on windows just perform the following commands: python -m piptools sync requirements.txt; python -m pip install -e .
How to run the project
Example:
# activate the environment
source venv/bin/activate # on Windows ./venv/Scripts/activate.ps1 in Powershell
frr ".\tests\test_frr\fixtures\toy_example.jpg" "out.jpg" -h 0.11
The program, in this example, loads input image from the path .\tests\test_frr\fixtures\toy_example.jpg, processes it with parameter h=0.11 and outputs it into out.jpg. More information about the parameters can be obtained by invoking frr --help.
Project structure
Folders:
- docs: documentation.
- src: contains list of folders for sources, e.g. python.
- tests: tests that follow the structure of src/python.
Credits
This repository implements paper Fast Single Image Reflection Suppression via Convex Optimization authored by Yang Yang, Wenye Ma, Yin Zheng, Jian-Feng Cai and Weiyu Xu.
Metadata
Release files for fast-reflection-removal 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast-reflection-removal-1.1.tar.gz | 5.6 kB | Without provenance | Details for fast-reflection-removal-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_reflection_removal-1.1-py3-none-any.whl | Python 3 | none | any | Details for fast_reflection_removal-1.1-py3-none-any.whl |
Total release size: 12.4 kB
Release files / fast-reflection-removal-1.1.tar.gz
| Download URL | fast-reflection-removal-1.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d17cb4d90b67fecbfd2c92b0a3e64312c924cf59ef92cd785634ce78937b41a
|
|
BLAKE2b-256 checksum How to use checksums |
eaf8c64ea74a6d9dd8957b98671d457e47aeb4bda6d4e54ebe46e6d147d24fb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / fast_reflection_removal-1.1-py3-none-any.whl
| Download URL | fast_reflection_removal-1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ac11e7388c6b2559af61eb8d59dfc35fad1a7562206bf85ecd3f21b7cc355a1
|
|
BLAKE2b-256 checksum How to use checksums |
0602d45f20207403c7c7a15be2a1968c3d96e364109d9c879b26c7c25dd9713b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for fast-reflection-removal 1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.