Skip to content

Golden-Retrieval/DeLF-easy-training

Repository files navigation

DeLF-easy-training

This repository was implemented based on the DeLF paper, and it was mainly focused on the parts that was specified in the paper but not implemented in the tensorflow/delf repository. We recommend you to follow those paper and repository if you are not familiar with DeLF.

Usage of this repository

You can implement your own CBIR(Content-based image retrieval) system based on the DeLF model with this repository. This repository provides two cases depending on whether you are learning the model yourself or not. To build a custom retrieval system specific to your custom dataset, you will need to train your own model along with following instructions. However, if the tensorflow hub model learned in the Landmark dataset is sufficient to your system, it is not necessary to learn (Then, you will need to tune some parameters to use tensorflow hub model).

Composition of DeLF

(you can also get this content in section 4 of the paper)

architectures

  1. Descriptor Fine-tuning (Section 4.1)
  2. Attention-based Training (Section 4.2)
  3. Retrieval System (Section 4.4)

Implementation

Training

By importing DelfV1 class from tensorflow/delf repository, we implemented training code for the case of using custom dataset. You can follow above 2 trianing steps (Descriptor Fine-tuning & Attention-based Training) by following this repository for your custom model.

Retrieval

When you are planning to implement an image retrieval system, Matching image one by one is not enough. Thus, as specified in the paper, we implemented Product Quantization to aggregate and retrieve images from a large number of features. It could be possible through facebook's faiss library.

Instructions

Reference

Maintainers