jaw12346 / R-IBES

Final project for Information Retrieval: Reverse-Image Biographical Entity Search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

R-IBES: Reverse-Image Biological Entity Search

Project Description

R-IBES is a reverse-image search engine utilizing the power of local and cloud-based facial recognition to answer biographical questions about public figures. This implementation uses a local Postgres database that’s pre-populated with over 13k images of celebrities. When an unknown face is provided, R-IBES queries AWS Rekognize for the person’s name and/or asks the end-user to contribute, thus adding that person to the dataset with the goal of limiting cloud usage as more people are searched.

Project documentation can be accessed by opening /docs/index.html in a web browser.

Video Demo

Installation instructions (with a DB file)

Note: R-IBES has only been tested on Ubuntu 22.04.3 LTS via WSL2 using Python 3.10.12

  1. Clone the repo into a local directory of your choice (if it hasn't already been provided to you)

    git clone https://github.com/jaw12346/R-IBES.git
  2. Run the following command in your Ubuntu instance to install prerequisites:

     sudo apt-get update && sudo apt-get upgrade -y
     sudo apt-get install python3 python3-pip python3-venv graphviz graphviz-dev imagemagick
  3. Navigate into the project directory and install the required pip packages

    pip3 install -r requirements.txt
  4. If you have a database file, place it into the project directory.

  5. (Optional) Open .env and change the following variables to match your environment:

    S3_BUCKET=your_s3_bucket_name
    S3_ACCESS_KEY=your_aws_s3_access_key
    S3_SECRET_KEY=your_aws_s3_secret_key
  6. Run the following command to start R-IBES:

    python3 main.py [--offline]

    Note: If you do not have a S3 bucket or keys, please add --offline to the startup command.

Troubleshooting steps:

  • If you get an AWS error...
    • Make sure you have the correct keys in .env and that your bucket is in the same region as your keys.
    • Run sudo hwclock -s to sync your WSL instance to the system clock.
  • If you get a ModuleNotFoundError...
    • Make sure you are running Python 3.10.12 or higher.
    • Make sure you are running the pip3 command and not pip.
      • Re-run pip3 install -r requirements.txt.
    • Make sure you are running the python3 command and not python.
    • Make sure that your current working directory is the project directory.

About

Final project for Information Retrieval: Reverse-Image Biographical Entity Search


Languages

Language:Python 100.0%