Skip to content

luongphambao/InformationRetrieval_CS336

Repository files navigation

CS336.M11.KHCL

Information Retrieval Final Project
Supported features:

  • Retrieval methods DELF, CNN (ResNet), CNNIRPYTORCH are available on web app.
  • Particular object search: allow user to choose a specific area of the query image.

Contributors

Name Email Github profile
Phạm Ngọc Dương 19521412@gm.uit.edu.vn pnd280
Lương Phạm Bảo 19521242@gm.uit.edu.vn 19521242bao
Nguyễn Gia Thống 19520993@gm.uit.edu.vn -

Repo structure

Overview

.
├── ...
├── retrieval.py
├── app.py
├── static
│   ├── features
│   ├── images
│   ├── query
│   └── uploads
└── templates

Files:

  • ./app.py: flask web server.
  • ./retrieval.py: retrieve images (standalone).

Folders:

  • ./static/: contains 2 datasets including features and 256x256 resized version, uploaded query images.

Usage

You can clone this repo and install datasets separately or you can download the whole compressed file that we have already downloaded and structured.

Install datasets separately

Download the compressed file here and we require user an extra structuring step, ./static should look like this:

static
├── features
│   ├── feature
│   ├── feature_oxford
│   ├── feature_oxford_2
│   └── feature_paris
└── images
    ├── database_oxford
    ├── database_paris
    ├── resized_oxford
    └── resized_paris

Install the whole structured folder

This compressed file requires no further resource downloads or structuring.
Download

Install required libraries

./requirements.txt
and

pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html

Start web server

cd to top level folder

flask run

or

python app.py

If correctly configured, server will be accessible at http://127.0.0.1:5000.

Query image without starting web server

As we have mentioned above, we will use ./retrieval.py. We're too lazy too add some extra lines of code to implement command line call, so you have to directly run the file itself.

Example:

retrieval_image("<query_img_full_path>", "<method>", "<dataset>")

Demo

Yes, we do support image cropping, directly click into the image to crop it!
Of course the cropped part will be the new query. Demo

Video

Demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published