Giter Club home page Giter Club logo

similar-image-remover's Introduction

similar-image-remover

setup

install Anaconda3 before run following commands.

conda create -n similar-image-remover python=3.8
conda activate similar-image-remover
pip install -r requirements.txt

design

  • ルートから辿って全ディレクトリを処理する
    • まず全スキャンを掛け、(ディレクトリ, 画像数)リストを作成する
    • tqdm用に全画像数も計算しておく
  • 類似判定処理は各ディレクトリ単位で実行する
    • ディレクトリ内の画像のdhash値を比較して差分が指定以下なら類似と判定する
      • (dry=false時) ディレクトリ構造を保ったまま、destに隔離する(ルートをdestに変える)
      • 結果をログ(CSV)に記録する

log fields

  • directory
  • filename
  • dhash val: number(hex)
  • dhash diff: number
  • is similar to prev img: boolean
  • moved to

args

  • -s, --source: 処理対象ルートディレクトリのパス
  • -d, --dest: 類似判定された画像の隔離および結果ログファイル保存先パス
  • -t, --threshold=20: dhash値の差分がこの値以下なら類似画像と判断する
  • --dry: ログ出力のみ、隔離実行せず

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.