The Met dataset
This is the official github repository of the Met dataset. The official webpage of the dataset can be found here.
What is it?
This code provides examples for the following:
- How to use the dataset.
- How to evaluate your own method.
- How to reproduce some of the baselines presented in the NeurIPS paper.
Prerequisites
In order to run the code you will need:
- Python3
- NumPy
- Faiss library for efficient similarity search
- PyTorch
- The Met dataset from the official website
Embedding models
We provide models for descriptor extraction. You can download them here.
Pre-extracted descriptors
We provide pre-extracted descriptors. You can download them here.
Usage
Navigate (cd
) to [YOUR_MET_ROOT]/met
. [YOUR_MET_ROOT]
is where you have cloned the github repository.
Descriptor extraction
Example script for extracting descriptors for the images of the Met dataset is located in code/examples/extract_descriptors.py
For detailed explanation of the options run:
python3 -m code.examples.extract_descriptors -h
kNN classifier & evaluation
Example evaluation script of pre-extracted descriptors with the non-parametric classifier is located in code/examples/knn_eval.py
For detailed explanation of the options run:
python3 -m code.examples.knn_eval -h
Training with contrastive loss
Example training script for trainng the embedding model with contrastive loss on the Met training set is located in code/examples/train_contrastive.py
. The trained network can be used for descriptor extraction and kNN classification.
For detailed explanation of the options run:
python3 -m code.examples.train_contrastive -h
State
Repository is under update...