Giter VIP home page Giter VIP logo

painting_retrieval's Introduction

Painting retrieval

The aim of the project is to provide a telegram bot that can recognize a photographed painting and that can recommend similar ones.

Preview

bot example

Install

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

Configuration

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

Execution

Run the bot

python3 main.py

Run any scripts

python3 scripts/{script-name}.py

Folders

data

This folder is intended to contain the original and processed dataset.

model

This folder contains all the trained models.

  • resnet_model.zip : ResNet50 model finetuned.
  • KMeans_BOW.joblib : KMeans model, used in BOW features
  • Scaler_BOW.joblib : Scaler, used in BOW features

scripts

This folder contains the code that must be executed offline to set up the system before execution.

src

painting

This folder contains the code concerning the paintings. It ranges from the calculation of the features to the matching.

bot

This folder contains the code concerning the telegram bot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.