Giter Site home page Giter Site logo

yas-sim / interactive-image-inpainting Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 4.0 895 KB

Deep Learning Based Interactive Image Inpainting Demo

License: Apache License 2.0

Python 100.00%
intel openvino openvino-toolkit deep-learning inpaint inference-engine inference image-ret image-retrieval image-inpainting demo dl-models undesired-objects picture python draw interactive-demo

interactive-image-inpainting's Introduction

Interactive Image Inpainting Demo

This program demonstrates how the inpainting-gmcnn model works with the Intel(r) Distribution of OpenVINO(tm) toolkit.
The demo program takes an image file and displays it on the screen. The user can draw the mask image on top of the input image, then the program will treat the masked areas as they are lacking and inpaint (compensate) the image by deep learning based inferencing.
You can remove undesired objects from your picture by masking them and the program will generate a natural looking picture without the undesired objects.

これはIntel(r) Distribution of OpenVINO(tm) toolkitinpainting-gmcnn (画像修復モデル)を使用する方法をデモするプログラムです。
デモプログラムは画像を1枚読み込み、表示します。ユーザーが入力画像の上に自由にマスクを描画したのち、プログラムがマスク部分を欠損部分として扱い、欠損部分を補うようにディープラーニングでの推論を行い修復描画(Inpaint)してくれます。
絵の中の望ましくない部分(景色に写りこんだ柵や人など)をマスクすることで、それらを取り除いた自然な絵を生成してくれます(当然ですが限度があります:-) )。

Image Inpainting Result

inpainting1

inpainting2

Required DL Models to Run This Demo

The demo expects the following models in the Intermediate Representation (IR) format:

  • gmcnn-places2-tf

You can download this model from OpenVINO Open Model Zoo. In the models.lst is the list of appropriate models for this demo that can be obtained via Model downloader. Please see more information about Model downloader here.

How to Run

0. Prerequisites

  • OpenVINO 2020.2
    • If you haven't installed it, go to the OpenVINO web page and follow the Get Started guide to do it.

1. Install dependencies

The demo depends on:

  • opencv-python
  • numpy

To install all the required Python modules you can use:

(Linux) pip3 install -r requirements.txt
(Win10) pip install -r requirements.txt

2. Download DL models from OMZ

Use Model Downloader to download the required models and convert the downloaded model into OpenVINO IR models with Model Converter.

(Linux) python3 $INTEL_OPENVINO_DIR/deployment_tools/tools/model_downloader/downloader.py --list models.lst
        python3 $INTEL_OPENVINO_DIR/deployment_tools/tools/model_downloader/converter.py --list models.lst
       
(Win10) python "%INTEL_OPENVINO_DIR%\deployment_tools\tools\model_downloader\downloader.py" --list models.lst
        python "%INTEL_OPENVINO_DIR%\deployment_tools\tools\model_downloader\converter.py" --list models.lst

3. Run the demo app

(Linux) python3 image-inpainting.py <input_image_file>
(Win10) python image-inpainting.py <input_image_file>

Demo Output

The application draws the results on the screen.

Tested Environment

  • Windows 10 x64 1909 and Ubuntu 18.04 LTS
  • Intel(r) Distribution of OpenVINO(tm) toolkit 2021.3
  • Python 3.6.5 x64

See Also

interactive-image-inpainting's People

Contributors

yas-sim avatar

Stargazers

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

Watchers

 avatar  avatar

interactive-image-inpainting's Issues

README.md gmcnn-place"s"2-tf

Hi yas-sim san,
Thanks a lot for sharing great work, found a typo, demo itself worked successfully!
BR/Kobu

gmcnn-place"s"2-tf

README.md
The demo expects the following models in the Intermediate Representation (IR) format:
gmcnn-place2-tf

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.