No project description provided
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fast-reflection-removal-1.1b0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2942c3420c50b58a7e6619c1b0af40179f7616563290f94bd637ef0933ea1f2c |
|
MD5 | 021811dc4841f0802d0a935997a0f5b2 |
|
BLAKE2b-256 | 0dfed7167bbd2c0f78b4fb7b08421e915c79ffd24e74f7c83d27df941d5f4075 |
Hashes for fast_reflection_removal-1.1b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a52a3bbbe88fc5ba21b52cc8b462d44a0af996ec1c60cd827323257a35d8b34 |
|
MD5 | e3b1a8732b0aa0b997143985e41c65d6 |
|
BLAKE2b-256 | efc72355c30ab059317bbc650b8f57c28b1d0e7e35342d29ddd97b49a088073e |