画像内の正確でほぼ重複する画像を見つける「imagededup」のインストール

スポンサーリンク

画像内の正確でほぼ重複する画像を見つける「imagededup」ライブラリのインストールについて解説しています。

「imagededup(https://github.com/idealo/imagededup)」は、画像コレクション内の正確でほぼ重複する発見できるPythonパッケージ,ライブラリです。

■Python

今回のPythonのバージョンは、「3.6.8」を使用しています。(Windows10)(pythonランチャーでの確認)

■imagededupをインストールする

imagededupをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install imagededup

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.6.8にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。

py -3.6 -m pip install imagededup

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable
Collecting imagededup
Downloading imagededup-0.2.2-cp36-cp36m-win_amd64.whl (50 kB)
|████████████████████████████████| 50 kB 453 kB/s
Collecting tqdm
Downloading tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
|████████████████████████████████| 76 kB 825 kB/s
Collecting PyWavelets~=1.0.3
Downloading PyWavelets-1.0.3-cp36-none-win_amd64.whl (4.2 MB)
|████████████████████████████████| 4.2 MB 3.3 MB/s
Collecting tensorflow>1.0
Downloading tensorflow-2.6.1-cp36-cp36m-win_amd64.whl (423.3 MB)
|████████████████████████████████| 423.3 MB 20 kB/s
Collecting scikit-learn
Downloading scikit_learn-0.24.2-cp36-cp36m-win_amd64.whl (6.8 MB)
|████████████████████████████████| 6.8 MB 3.2 MB/s
Collecting Pillow<7.0.0
Downloading Pillow-6.2.2-cp36-cp36m-win_amd64.whl (2.0 MB)
|████████████████████████████████| 2.0 MB 2.2 MB/s
Collecting scipy
Downloading scipy-1.5.4-cp36-cp36m-win_amd64.whl (31.2 MB)
|████████████████████████████████| 31.2 MB 3.3 MB/s
Collecting numpy<1.17
Downloading numpy-1.16.6-cp36-cp36m-win_amd64.whl (11.9 MB)
|████████████████████████████████| 11.9 MB 3.3 MB/s
Collecting matplotlib
Downloading matplotlib-3.3.4-cp36-cp36m-win_amd64.whl (8.5 MB)
|████████████████████████████████| 8.5 MB 6.4 MB/s
Collecting protobuf>=3.9.2
Downloading protobuf-3.19.1-cp36-cp36m-win_amd64.whl (897 kB)
|████████████████████████████████| 897 kB 6.4 MB/s
Collecting tensorflow-estimator<2.7
Downloading tensorflow_estimator-2.6.0-py2.py3-none-any.whl (462 kB)
|████████████████████████████████| 462 kB 3.2 MB/s
Collecting keras~=2.6
Downloading keras-2.7.0-py2.py3-none-any.whl (1.3 MB)
|████████████████████████████████| 1.3 MB 6.4 MB/s
Collecting astunparse~=1.6.3
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting tensorboard~=2.6
Downloading tensorboard-2.7.0-py3-none-any.whl (5.8 MB)
|████████████████████████████████| 5.8 MB 6.8 MB/s
Collecting typing-extensions~=3.7.4
Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting termcolor~=1.1.0
Using cached termcolor-1.1.0.tar.gz (3.9 kB)
Collecting tensorflow>1.0
Downloading tensorflow-2.6.0-cp36-cp36m-win_amd64.whl (423.2 MB)
|████████████████████████████████| 423.2 MB 12 kB/s
Downloading tensorflow-2.5.2-cp36-cp36m-win_amd64.whl (422.6 MB)
|████████████████████████████████| 422.6 MB 1.3 kB/s
Collecting tensorflow-estimator<2.6.0,>=2.5.0
Using cached tensorflow_estimator-2.5.0-py2.py3-none-any.whl (462 kB)
Collecting tensorflow>1.0
Downloading tensorflow-2.5.1-cp36-cp36m-win_amd64.whl (422.6 MB)
|████████████████████████████████| 422.6 MB 27 kB/s
Downloading tensorflow-2.5.0-cp36-cp36m-win_amd64.whl (422.6 MB)
|████████████████████████████████| 422.6 MB 11 kB/s
Collecting grpcio~=1.34.0
Downloading grpcio-1.34.1-cp36-cp36m-win_amd64.whl (2.9 MB)
|████████████████████████████████| 2.9 MB 6.4 MB/s
Collecting tensorflow>1.0
Downloading tensorflow-2.4.4-cp36-cp36m-win_amd64.whl (370.8 MB)
|████████████████████████████████| 370.8 MB 19 kB/s
Downloading tensorflow-2.4.3-cp36-cp36m-win_amd64.whl (370.8 MB)
|████████████████████████████████| 370.8 MB 7.2 kB/s
Downloading tensorflow-2.4.2-cp36-cp36m-win_amd64.whl (370.8 MB)
|████████████████████████████████| 370.8 MB 30 kB/s
Downloading tensorflow-2.4.1-cp36-cp36m-win_amd64.whl (370.7 MB)
|████████████████████████████████| 370.7 MB 15 kB/s
Downloading tensorflow-2.4.0-cp36-cp36m-win_amd64.whl (370.6 MB)
|████████████████████████████████| 370.6 MB 924 bytes/s
Downloading tensorflow-2.3.4-cp36-cp36m-win_amd64.whl (342.7 MB)
|████████████████████████████████| 342.7 MB 18 kB/s
Collecting grpcio>=1.8.6
Downloading grpcio-1.41.1-cp36-cp36m-win_amd64.whl (3.2 MB)
|████████████████████████████████| 3.2 MB 6.4 MB/s
Collecting opt-einsum>=2.3.2
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting keras-preprocessing<1.2,>=1.1.1
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Collecting h5py<2.11.0,>=2.10.0
Downloading h5py-2.10.0-cp36-cp36m-win_amd64.whl (2.4 MB)
|████████████████████████████████| 2.4 MB 3.3 MB/s
Collecting google-pasta>=0.1.8
Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Collecting gast==0.3.3
Downloading gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting absl-py>=0.7.0
Downloading absl_py-0.15.0-py3-none-any.whl (132 kB)
|████████████████████████████████| 132 kB 3.3 MB/s
Collecting wheel>=0.26
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting wrapt>=1.11.1
Downloading wrapt-1.13.3-cp36-cp36m-win_amd64.whl (34 kB)
Requirement already satisfied: six>=1.12.0 in c:\users\user_\appdata\roaming\python\python36\site-packages (from tensorflow>1.0->imagededup) (1.16.0)
Collecting tensorflow-estimator<2.4.0,>=2.3.0
Downloading tensorflow_estimator-2.3.0-py2.py3-none-any.whl (459 kB)
|████████████████████████████████| 459 kB 6.8 MB/s
Collecting markdown>=2.6.8
Using cached Markdown-3.3.4-py3-none-any.whl (97 kB)
Requirement already satisfied: requests<3,>=2.21.0 in c:\users\user_\appdata\roaming\python\python36\site-packages (from tensorboard~=2.6->tensorflow>1.0->imagededup) (2.21.0)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
Using cached tensorboard_data_server-0.6.1-py3-none-any.whl (2.4 kB)
Collecting setuptools>=41.0.0
Downloading setuptools-58.5.3-py3-none-any.whl (946 kB)
|████████████████████████████████| 946 kB 3.2 MB/s
Collecting tensorboard-plugin-wit>=1.6.0
Using cached tensorboard_plugin_wit-1.8.0-py3-none-any.whl (781 kB)
Collecting werkzeug>=0.11.15
Downloading Werkzeug-2.0.2-py3-none-any.whl (288 kB)
|████████████████████████████████| 288 kB 6.4 MB/s
Collecting google-auth<3,>=1.6.3
Downloading google_auth-2.3.3-py2.py3-none-any.whl (155 kB)
|████████████████████████████████| 155 kB 3.3 MB/s
Collecting google-auth-oauthlib<0.5,>=0.4.1
Downloading google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting rsa<5,>=3.1.4
Using cached rsa-4.7.2-py3-none-any.whl (34 kB)
Collecting cachetools<5.0,>=2.0.0
Downloading cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting requests-oauthlib>=0.7.0
Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting importlib-metadata
Using cached importlib_metadata-4.8.1-py3-none-any.whl (17 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\user_\appdata\roaming\python\python36\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorflow>1.0->imagededup) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\user_\appdata\roaming\python\python36\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorflow>1.0->imagededup) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python36\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorflow>1.0->imagededup) (2020.12.5)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in c:\users\user_\appdata\roaming\python\python36\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorflow>1.0->imagededup) (1.24.3)
Collecting oauthlib>=3.0.0
Using cached oauthlib-3.1.1-py2.py3-none-any.whl (146 kB)
Collecting dataclasses
Downloading dataclasses-0.8-py3-none-any.whl (19 kB)
Collecting zipp>=0.5
Using cached zipp-3.6.0-py3-none-any.whl (5.3 kB)
Collecting typing-extensions>=3.6.4
Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting kiwisolver>=1.0.1
Downloading kiwisolver-1.3.1-cp36-cp36m-win_amd64.whl (51 kB)
|████████████████████████████████| 51 kB 43 kB/s
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\users\user_\appdata\roaming\python\python36\site-packages (from matplotlib->imagededup) (2.4.7)
Collecting cycler>=0.10
Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\user_\appdata\roaming\python\python36\site-packages (from matplotlib->imagededup) (2.8.1)
Collecting joblib>=0.11
Downloading joblib-1.1.0-py2.py3-none-any.whl (306 kB)
|████████████████████████████████| 306 kB 3.3 MB/s
Collecting threadpoolctl>=2.0.0
Downloading threadpoolctl-3.0.0-py3-none-any.whl (14 kB)
Collecting colorama
Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Using legacy ‘setup.py install’ for termcolor, since package ‘wheel’ is not installed.
Installing collected packages: pyasn1, zipp, typing-extensions, setuptools, rsa, pyasn1-modules, oauthlib, cachetools, requests-oauthlib, importlib-metadata, google-auth, dataclasses, wheel, werkzeug, tensorboard-plugin-wit, tensorboard-data-server, protobuf, numpy, markdown, grpcio, google-auth-oauthlib, absl-py, wrapt, threadpoolctl, termcolor, tensorflow-estimator, tensorboard, scipy, Pillow, opt-einsum, kiwisolver, keras-preprocessing, joblib, h5py, google-pasta, gast, cycler, colorama, astunparse, tqdm, tensorflow, scikit-learn, PyWavelets, matplotlib, imagededup
WARNING: The scripts pyrsa-decrypt.exe, pyrsa-encrypt.exe, pyrsa-keygen.exe, pyrsa-priv2pub.exe, pyrsa-sign.exe and pyrsa-verify.exe are installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
WARNING: The script wheel.exe is installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
Attempting uninstall: numpy
Found existing installation: numpy 1.19.5
Uninstalling numpy-1.19.5:
Successfully uninstalled numpy-1.19.5
WARNING: The script f2py.exe is installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
WARNING: The script markdown_py.exe is installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
WARNING: The script google-oauthlib-tool.exe is installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
Running setup.py install for termcolor … done
WARNING: The script tensorboard.exe is installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
Attempting uninstall: Pillow
Found existing installation: Pillow 8.3.1
Uninstalling Pillow-8.3.1:
Successfully uninstalled Pillow-8.3.1
WARNING: The script tqdm.exe is installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
WARNING: The scripts estimator_ckpt_converter.exe, saved_model_cli.exe, tensorboard.exe, tf_upgrade_v2.exe, tflite_convert.exe, toco.exe and toco_from_protos.exe are installed in ‘C:\Users\user_\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
Successfully installed Pillow-6.2.2 PyWavelets-1.0.3 absl-py-0.15.0 astunparse-1.6.3 cachetools-4.2.4 colorama-0.4.4 cycler-0.11.0 dataclasses-0.8 gast-0.3.3 google-auth-2.3.3 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.41.1 h5py-2.10.0 imagededup-0.2.2 importlib-metadata-4.8.1 joblib-1.1.0 keras-preprocessing-1.1.2 kiwisolver-1.3.1 markdown-3.3.4 matplotlib-3.3.4 numpy-1.16.6 oauthlib-3.1.1 opt-einsum-3.3.0 protobuf-3.19.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-oauthlib-1.3.0 rsa-4.7.2 scikit-learn-0.24.2 scipy-1.5.4 setuptools-58.5.3 tensorboard-2.7.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.0 tensorflow-2.3.4 tensorflow-estimator-2.3.0 termcolor-1.1.0 threadpoolctl-3.0.0 tqdm-4.62.3 typing-extensions-3.10.0.2 werkzeug-2.0.2 wheel-0.37.0 wrapt-1.13.3 zipp-3.6.0
WARNING: You are using pip version 21.1.2; however, version 21.3.1 is available.
You should consider upgrading via the ‘C:\Program Files\Python36\python.exe -m pip install –upgrade pip’ command.

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、imagededupが正常にインストールされたことになります。

なお、今回はimagededupのバージョン0.2.2をインストールしました。「WARNING」が表示されてしまっているが、「ERROR」ではないので、ここでは一旦無視します。

インストールを行ってみたが、tensorflowをダウンロードするのに、多少時間がかかった。

 

コメント

タイトルとURLをコピーしました