Perform Image Similarity Matching

Measuring image similarity is a common task in machine learning. In DeepDIVA we implemented a basic version of it where use the mean average precision (mAP) to measure the performance of the system.

For a simple scenario it is only necessary to provide the following parameters:

  • --dataset-folder specifies the location of the dataset on the machine
  • --runner-class triplet specifies to use the code for this task and not the standard image classification one
  • --output-channels specifies the size of the sub-dimensional space where the learned embeddings will be mapped

For example:

python RunMe.py --dataset-folder /path/to/dataset --runner-class triplet --output-channels 256

It is very important that the dataset is in the right structure (see prepare your data).

Additionally, one can enable the anchor swap optimization with the flag --anchor-swap. This will swap the positive and the anchor sample should it be beneficial with respect to their respective distance to the negative one.

Troubleshooting:

See Troubleshooting

Visualize Results

The visualization for this task a similar to those provided for the image classification one (see perform image classification). Additionally, a per-class performance evaluation is printed as text on Tensorboard. For a full list see full list of visualizations.

Customization Options

There are a lot of elements that can be modified in an experiment. Many functionalities are already implemented and accessible through a command line parameters.

See customizing options for a brief overview of the most common ones.

For a comprehensive list of the possibilities offered by the framework see the latest version of the docs.