Image Recognition and OCR

25 May 2020| Category: Machine Learning| Project hosted at: GitHub
work-single-image

Overview

This project is about using open-source libraries for image detection and text recognition such as OpenCV, pillow, Tesseract, etc. It is a python project where the input can be newspaper clippings and the code offers search functionality to search the image using the text.

Project key steps

Take a ZIP file of images and process them, using a library built into python plus any additional libraries that might be required. A ZIP file takes several different files and compresses them, thus saving space, into one single file. The files in the ZIP file that is provided are newspaper images. The task is to write python code which allows one to search through the images looking for the occurrences of keywords and faces. E.g. if you search for "pizza" it will return a contact sheet of all of the faces which were located on the newspaper page which mentions "pizza".

This demonstrates the ability to learn a new (library), ability to use OpenCV to detect faces, ability to use tesseract to do optical character recognition, and ability to use PIL to composite images together into contact sheets.

Each page of the newspapers is saved as a single PNG image in a file called images.zip. These newspapers are in english, and contain a variety of stories, advertisements and images. Note: This file is fairly large (~200 MB) and may take some time to work with, I would encourage you to use small_img.zip for testing.

Code Working Examples

Example 1

If searched for the string "Christopher" the results will be as per the following image:

Example 2

If we search for "Mark", then the results will be as per the following image (note that there are times when there are no faces on a page, but a word is found!):

SO WHAT YOU THINK ?

I am available for short term projects as well as long term contracts.

Contact With Me