Skip to content

Instantly share code, notes, and snippets.

@IAmSuyogJadhav
Last active March 22, 2019 06:24
Show Gist options
  • Save IAmSuyogJadhav/a8f58e27fbab7007b8a777987b3481ce to your computer and use it in GitHub Desktop.
Save IAmSuyogJadhav/a8f58e27fbab7007b8a777987b3481ce to your computer and use it in GitHub Desktop.

Abstract

FaceSearch: Searches for faces in a given image using OpenCV and the Google Reverse Image Search engine.

Installation

  1. Directly download the latest release from the releases page.

OR 2. First clone this repo. Now, to install the dependencies and create the alias for FaceSearch, run the install.sh.

bash install.sh

Usage

Once it finishes, you can now use the following command on the terminal to detect and search for the faces in any image. https://gist.github.com/d9b91856f63165956183c2e98350bb4f

Also, note that the path/to/Image can be an internet URL as well! (prefixed with http: or https:) So, you can just drag an image off the internet over the terminal to get its URL pasted over there and search for faces in it using FaceSearch. Really convenient.

Examples

Test image:

alt text

On command line: https://gist.github.com/0165dfc44aad9056b5c5fd79a154525f

Output Window:

alt text

In the browser:

alt text

Any feedback, bug reports and issues are welcome here!

Updates

  • 18-10-18: Created and released the first release of FaceSearch (v1.0). Directly downloadable from here.
  • 12-10-18: Thanks to Kaj Jansen, fixed an easy-to-miss bug. The script previously used the default system python; but, this caused an issue because of the list.copy() method not being defined in Python 2. Changed the script to explicitly use Python 3 now. Also, added a function in install.sh to remove any redundant aliases defined by the same name facesearch, to prevent problems occured because of running install.sh script multiple times.
  • 10-08-18: Added support for closing the output window by GUI [x] button.
  • 07-08-18: The project report is now ready! You can read it here.
  • 05-08-18: A blog post detailing the implementation and working of FaceSearch is live now. Read it here.

Image Source: Rediff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment