LoginSignup
8
8

More than 3 years have passed since last update.

DeepCreamPyをMacで使ってみた

Last updated at Posted at 2019-05-15

概要

DeepCreamPyとは
簡単に説明すると、画像に入っているモザイクやノイズを消してくれる便利なライブラリ。

MacでDeepCreamPyを使用している日本語記事がなかったので、メモ程度に。

環境

macOS Mojave10.14.4
Python3.6.0

手順

  1. https://github.com/deeppomf/DeepCreamPy/releasesからSource core(zip)、もしくはSouce code(tar.gz)をDL。

  2. DLしたzip、もしくはtar.gzファイルを解凍。

  3. https://drive.google.com/file/d/1Nzh2KAUO_rYPu2vDM_YP1EgbWtjI2hRX/viewをDL。

  4. 手順3.を解凍し、model.h5を手順2.のmodelsの中に配置。

  5. DeepCreamPyに移動。(DeepCreamPyのバージョンによってフォルダ名が変わります)

    cd ./DeepCreamPy-1.3.0-beta
    
  6. 必要なライブラリをインストールします。
    (私の場合、依存関係がややこしくなりそうだったので、requirementsに記載されていた==より後ろを削除しました。削除する場合、Pillow==5.3.0は消さないで下さい。
    参照:https://github.com/deeppomf/DeepCreamPy/issues/108

    pip install -r requirements.txt
    
  7. decensor_inputフォルダにpngファイルを配置し、以下コマンドを実行。

    python decensor.py
    

結果

今回はDeepCreamPyに元々入っていた画像を使用しました。上は若干モザイクがかかった画像で、下はDeepCreamPyによってモザイクが無くなった画像です。
ほとんどノイズが消えてるのが分かると思います。とても優秀。
mermaid_censored.pngmermaid_censored (1).png

感想

@koshian2 様のDeepCreamPyで学ぶモザイク除去を購読し、とても面白かった為、PCで実行しようと思った次第です。
DeepCreamPyはとても優秀なので、是非実行して遊んでみて下さい。
感想や指摘点などございましたらコメント頂けると幸いです。

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8