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.
- Hanlin Zou (U96634471)
- Xiaohan Zou (U18269004)
- Frontend: Vue 3 + Vite 3 + Ant Design
- Backend: Flask
- Image Recognition: PyTorch
- Socket
demo.mp4
- Scripts to setup the experiment:
setup/interface.sh
(web interface) andsetup/worker.sh
(worker) - Code and code quality:
frontend
,backend
andworker
- Rspec files:
geni.xml
- Instructions to reproduce experiment: see here and here
See here for our report. Also see experiments
folder for raw experimental results and the images we used during our experiments.
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
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 hostnameport
: web interface port numberworkers
: number of avaliable workers, maximum is 3images
: compute throughput after uploading how many number of imagesdelay
: worker delay (delay of all workers are the same)loss
: worker loss rate (loss rate of all workers are the same)
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 hostnameport
: worker port numberfail
: worker failure rate
Open the URL given by the web-interface node in your browser, then you can upload images.