Skip to content

bisohns/imageQ

Repository files navigation

ImageQ

Image search engine powered by Django

Python Django

Build Status License: MIT

Heroku App Status

Getting Started

Clone the repo

    # SSH
    git clone [email protected]:bisoncorps/imageQ.git
    # HTTPS
    git clone https://github.com/bisoncorps/imageQ.git

Activate virtual environment. All project work should be done in virtualenvs and virtualenv names must be added to gitignore

Installation

From Make File

  • You could easily run from project directory to setup project or follow through
    make

Step by step Setup

  • Install the requirements
    # install pipenv
    sudo pip3 install pipenv

    # install requirements
    pipenv install

Install Postgres

    sudo apt-get install postgresql postgresql-contrib postgis

Create Postgres User

    sudo su postgres -c "psql -c \"CREATE USER imageq WITH PASSWORD 'imageq';\""
    sudo su postgres -c "psql -c \"CREATE DATABASE imageqdb OWNER imageq;\""
    sudo su postgres -c "psql -d imageqdb -c \"CREATE EXTENSION IF NOT EXISTS postgis;\""
    sudo su postgres -c "psql -d imageqdb -c \"CREATE EXTENSION IF NOT EXISTS postgis_topology;\""

Run migrations before starting the django-server

    python manage.py migrate

Running Locally

To view the API locally on port 9500

    python manage.py runserver 9500

Prediction API

The prediction API code can be found at the repo

Deploy

The master branch of the repo is linked to automatically deployed Homepage and it sends requests to the deployed prediction API

Usage

  • Go to ImageQ Search Engine

  • Select an upload mode from dropdown i.e. (Image URL/Upload/Camera(mobile))

  • Select search engine to use i.e. (Google/Yahoo/Bing)

  • Click Search! button

Example

Example-Result

Code Documentation

Code Documentation is available on Github Pages

Code Structure

All important production settings are in the ImageQ.settings.production.py file.
Settings should be inherited from ImageQ.settings.common.py for development or used as it is
To change from local settings to production settings and vice-versa, change current_settings variable in ImageQ.wsgi.py accordingly
All Celery async tasks are located in tasks.py of each app file in each app directory

Todo

See TODO