/BU-CS655-Image-Recognition

BU CS 655 GENI Mini Project: Image Recognition Application

Primary LanguagePython

Image Recognition Application

We implement an image-recognition service which has a web interface, where a user is able to submit an image query and the service uses GoogLeNet to classify the image and returns the answer to the user. The web interface and the recognition systems are on separate nodes, and they are connected using socket programming.

 

Team

  • Hanlin Zou (U96634471)
  • Xiaohan Zou (U18269004)

 

Tech Stack

 

Demo Video

demo.mp4

 

Reproducibility

 

Report

See here for our report. Also see experiments folder for raw experimental results and the images we used during our experiments.

 

Usage

Prerequisites

Fisrt, use geni.xml to reserve resources on GENI.

Then, log in to web-interface node, clone Github repo and install dependencies:

git clone https://github.com/Renovamen/BU-CS655-Image-Recognition.git
cd BU-CS655-Image-Recognition/backend

chmod +x ./install.sh
./install.sh

After that, log in to node-1, node-2 and node-3, respectively:

git clone https://github.com/Renovamen/BU-CS655-Image-Recognition.git
cd BU-CS655-Image-Recognition/worker

chmod +x ./install.sh
./install.sh

 

Run Web Interface

Log in to web-interface node and:

cd backend/src
sudo python3 main.py --hostname 0.0.0.0 --port 80 --workers 3 --images 4 --delay 0 --loss 0

Options:

  • hostname: web interface hostname
  • port: web interface port number
  • workers: number of avaliable workers, maximum is 3
  • images: compute throughput after uploading how many number of images
  • delay: worker delay (delay of all workers are the same)
  • loss: worker loss rate (loss rate of all workers are the same)

 

Run Workers

node-1:

cd worker
python3 main.py --hostname 10.10.1.2 --port 2001 --fail 0

node-2:

python3 main.py --hostname 10.10.2.1 --port 2002 --fail 0

node-3:

python3 main.py --hostname 10.10.3.1 --port 2003 --fail 0

Options:

  • hostname: worker hostname
  • port: worker port number
  • fail: worker failure rate

 

Upload Images

Open the URL given by the web-interface node in your browser, then you can upload images.