Code Monkey home page Code Monkey logo

fast-reflection-removal's Introduction

Fast Reflection Removal

Build

Removes reflections quickly and easily.

demo

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

  1. Clone the project and go to its root directory.
  2. 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
  3. Install the necessary packages:
    python -m pip install --upgrade pip
    python -m pip install --upgrade wheel setuptools pip-tools
  4. 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.

fast-reflection-removal's People

Contributors

janpalasek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fast-reflection-removal's Issues

CI

Add support for GH actions CI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.