a.k.a. Modern Fast Image REtrieval
ModFire is a training, testing, deploying toolkit for modern fast image retrieval.
Evaluating performance of a hashing / quantization based retrieval model is tricky. You may meet various evaluation protocols (3 kinds of CIFAR-10, 2 kinds of NUS-WIDE, the randomness in splits also matters a lot), you may handle different backbones (what should I use? AlexNet, VGG, ResNet?), you may even fight with some legacy codes (lots of troubles with Caffe, MXNet, TensorFlow). These just mess things up.
A comprehensive benchmark is needed for all methods --- with the latest deep learning tricks. Therefore, this repo issues the whole pipeline for it, with the extensible and customizable training and evaluation configs.
- Hardware
- A CUDA-enabled GPU (
≥ 16GiB VRAM
) ≥ 32GiB RAM
- A CUDA-enabled GPU (
- OS
- All features are tested on
Ubuntu 20.04
, other platforms should also work. If not, please file bugs.
- All features are tested on
- Software
- A
conda
environment is highly recommended. - Python should be
< 3.9
due to package dependencies. The following packages would be installed if missed, but it's still recommended to install them manually to choose your preferred version. PyTorch >= 11.3
withtorchdata, torchvision
.faiss-cpu >= 1.7
- A
To use ModFire, a direct way is to use the PyPI package:
pip install modfire
modfire -v
That will prints:
_ __ _
_ __ ___ ___ __| |/ _(_)_ __ ___
| '_ ` _ \ / _ \ / _` | |_| | '__/ _ \
| | | | | | (_) | (_| | _| | | | __/
|_| |_| |_|\___/ \__,_|_| |_|_| \___|
0.1.0
Common retrieval datasets are included in the repo.
modfire dataset
Available datasets are:
CIFAR10 : modfire.dataset.easy.cifar.CIFAR10
CIFAR100 : modfire.dataset.easy.cifar.CIFAR100
COCO : modfire.dataset.easy.coco.COCO
ImageNet100 : modfire.dataset.easy.imagenet100.ImageNet100
MIRFlickr25k: modfire.dataset.easy.mirflickr25k.MIRFlickr25k
NUS_WIDE : modfire.dataset.easy.nuswide.NUS_WIDE
You could download them by just a command.
modfire dataset --root [TARGET_DIR] [DATASET_NAME]
modfire train [CONFIG_PATH]
Just like other git repos, before raising issues or pull requests, please take a thorough look at issue templates.
- Benchmarking site
Fonts:
- [Don Perry]
Pictures:
Third-party repos:
This repo is licensed under