From 2793f7a99143e1cdf6051ccb797474b5fcd180fd Mon Sep 17 00:00:00 2001 From: Steve Schmerler Date: Sun, 3 Sep 2017 17:46:24 +0200 Subject: [PATCH] API: use Keras and NNs, remove cmd line interface Complete rewrite. We now use keras and pre-trained NNs for calculating fingerprints. The command line interface is not necessary, we use this package as a library only. --- .gitignore | 3 + README.rst | 268 +++++++++++++-------------- bin/00resize.py | 111 ----------- bin/10fingerprints.py | 54 ------ bin/20cluster.py | 64 ------- imagecluster/__init__.py | 0 {imgcmp => imagecluster}/env.py | 0 imagecluster/imagecluster.py | 146 +++++++++++++++ imagecluster/main.py | 26 +++ imagecluster/test/test.py | 39 ++++ imgcmp.egg-info/PKG-INFO | 173 ----------------- imgcmp.egg-info/SOURCES.txt | 14 -- imgcmp.egg-info/dependency_links.txt | 1 - imgcmp.egg-info/top_level.txt | 1 - imgcmp/__init__.py | 1 - imgcmp/calc.py | 83 --------- imgcmp/cli.py | 11 -- imgcmp/io.py | 26 --- imgcmp/misc.py | 25 --- imgcmp/tests/test_idx.py | 22 --- setup.py | 17 +- 21 files changed, 350 insertions(+), 735 deletions(-) delete mode 100755 bin/00resize.py delete mode 100755 bin/10fingerprints.py delete mode 100755 bin/20cluster.py create mode 100644 imagecluster/__init__.py rename {imgcmp => imagecluster}/env.py (100%) create mode 100644 imagecluster/imagecluster.py create mode 100644 imagecluster/main.py create mode 100644 imagecluster/test/test.py delete mode 100644 imgcmp.egg-info/PKG-INFO delete mode 100644 imgcmp.egg-info/SOURCES.txt delete mode 100644 imgcmp.egg-info/dependency_links.txt delete mode 100644 imgcmp.egg-info/top_level.txt delete mode 100644 imgcmp/__init__.py delete mode 100644 imgcmp/calc.py delete mode 100644 imgcmp/cli.py delete mode 100644 imgcmp/io.py delete mode 100644 imgcmp/misc.py delete mode 100644 imgcmp/tests/test_idx.py diff --git a/.gitignore b/.gitignore index 0d20b64..9c17578 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ *.pyc +*.egg-info +*.swp +*.bak diff --git a/README.rst b/README.rst index e044ae9..194bb1f 100644 --- a/README.rst +++ b/README.rst @@ -1,162 +1,148 @@ About ===== -Package for comparing images by content. Uses simple image hashing -("fingerprints"). See "Methods" below for details. + +Package for comparing and clustering images by content. We use a pre-trained +deep convolutional neural network for calculating image fingerprints, which are +then used to cluster similar images. Install ======= :: - git clone ... - pip3 install -e . - -Usage -===== - -There are 3 scripts in ``bin/``:: - - 00resize.py 10fingerprints.py 20cluster.py - -These must be executed one after another. Have a look at the help (use -``