The aim of the project is to provide a telegram bot that can recognize a photographed painting and that can recommend similar ones.
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -e .
Create an .env file in the root folder and insert your bot's token
TOKEN = 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw
Download all_data_info.csv
, train.zip
and test.zip
from this dataset
and put them into painting_retrieval/data/raw/dataset/
.
Unzip model/resnet_model.zip
in the same directory.
Then, from the root, run the following script
pip install -e "/PATH_TO_PAINTING_RETREIVAL/painting_retrieval"
Now, from /PATH_TO_PAINTING_RETREIVAL/painting_retrieval/
, run
python3 scripts/generate_dataframe.py
python3 scripts/extract_features.py
python3 scripts/index_features.py
Run the bot
python3 main.py
Run any scripts
python3 scripts/{script-name}.py
This folder is intended to contain the original and processed dataset.
This folder contains all the trained models.
resnet_model.zip
: ResNet50 model finetuned.KMeans_BOW.joblib
: KMeans model, used in BOW featuresScaler_BOW.joblib
: Scaler, used in BOW features
This folder contains the code that must be executed offline to set up the system before execution.
This folder contains the code concerning the paintings. It ranges from the calculation of the features to the matching.
This folder contains the code concerning the telegram bot.