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.
Name | 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 | - |
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.
You can clone this repo and install datasets separately or you can download the whole compressed file that we have already downloaded and structured.
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
This compressed file requires no further resource downloads or structuring.
Download
./requirements.txt
and
pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
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.
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>")
Yes, we do support image cropping, directly click into the image to crop it!
Of course the cropped part will be the new query.