Upload a picture of a pet, and the YOLO algorithm will then recognize the pet in it. Then it will query the pet in the PoetryDB and send back a poem that mentions that pet. Depending on the brightness of the photo, you may get differing results! Let's see what poems are related to your pet! This project was created by Bo Hu and Connie Liu. Although this project is not currently hosted online, you can view a video demo here (insert youtube link).
References: Yolo v3 in Tensorflow by Kaggle notebook
After cloning this repo, follow the following steps to compile and start the project.
The server is written in Python v3. To compile the server, go to /server
folder
and follow the instructions below.
This project needs the virtual environment.
For mac users, that is to run the following commands:
python3 -m venv venv
. venv/bin/activate
and for Windows users:
py -3 -m venv venv
venv\Scripts\activate
After activating the virtual environment, run the following commands to install packages
pip install -r requirements.txt
Let's download official weights pretrained on COCO dataset.
wget -P weights https://pjreddie.com/media/files/yolov3.weights
Save the weights using load_weights.py
script.
python load_weights.py
After setting up the backend, we can start to run the project by going into
/frontend_2
folder and enter command yarn dev
.
The commands above assume that users are running this porject on a windows OS. If you
are using a MacOS, go into /frontend_2/package.json
and change server
into
"server": "cd .. && cd server && . venv/bin/activate && flask run --no-debugger",
After the project is launched, follow the instructions on the website. Click
upload
to upload an image of your choice / change the image uploaded. Once
you are all set, click Generate Poem
to have a poetry for your pet :)