Skip to content

ttknguyen/CS336.M11.KHCL

Repository files navigation

Trường Đại học Công nghệ Thông tin | University of Information Technology

CS336.M11.KHCL - Multimedia Information Retrieval

IMAGE SEARCH ENGINE

Table Content

Information Subject

  • Subject: Multimedia Information Retrieval
  • Class: CS336.M11.KHCL
  • Lecturer: Ngo Duc Thanh

Team

STT Name MSSV Email Github
1 Thai Tran Khanh Nguyen 19520188 [email protected] ttknguyen
2 Doan Nguyen Nhat Quang 19520235 [email protected] JD981
3 Nguyen Pham Vinh Nguyen 19520186 [email protected] nivla0607
4 Nguyen Khanh Nhu 19520209 [email protected] nkn-nhu

Usage (for Google Colab only)

Link video demo: https://youtu.be/HQFgYrPgjX4\
Check if GPU is available on Google Colab or not for running our API

nvidia-smi -L
Git clone

Clone API source code from our github repository.

git clone https://github.com/ttknguyen/CS336.M11.KHCL.git
cd ./CS336.M11.KHCL/
Installation
We have a script to do the entire installation in one shot. This step may takes a few minutes for:
  • Dowloading data, include: corpus, features & models
  • Installing some neccessary libraries for running demo
  • Loading ngrok authentication token
!bash setup.sh
Feature Extraction
If you want to extract new dataset, run these cells below to extract feature
python3 feature_extractor.py --method <method id> --root <root path> --data_path <corpus path> --feartures_path <feature path>

Must follow the example of data path setup in cells below before running

python3 feature_extractor.py\
  --method 0\
  --root /content/CS336.M11.KHCL/\
  --data_path /content/CS336.M11.KHCL/data/test/oxford5k/jpg/\
  --features_path /content/CS336.M11.KHCL/data/\

which arguments is defined here:

  • --method: the method you want to extract feature
  • --root: root folder path of your project
  • --data_path: path of your corpus folder
  • --feartures_path: path of feature file you want to store after extraction

If not, you may pass this step because we have download it when running setup.sh in the previous step

Start back-end Server
=> Start the API by running cell below and wait a few seconds for loading features into RAM.

=> After starting Server successfully, you copy the URL link of back-end Server with the following form "http:// * .ngrok.io", then patse it into Client website when accessing this URL: http://searchengine-ir.surge.sh

FOR CUSTOMIZATION

python3 app.py -ng <0 or 1> -r <root path> -pd <data path> -pc <corpus path>
  • -ng: Expose local web server to the internet with ngrok (0: off, 1: on)
  • -r: Path to your root folder of project
  • -pd: Path to your dataset folder
  • -pc: Path to your images database (corpus), use for return image

=> If nothing change, the arguments above will be set as the cell below
python3 app.py -ng 1\
              -r /content/CS336.M11.KHCL/\
              -pd /content/CS336.M11.KHCL/data/\
              -pc /content/CS336.M11.KHCL/data/test/oxford5k/jpg/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published