blog

Facebook AI Image Similarity Challenge - Getting Started


by Jay Qi

Content tracing is a crucial component on all social media platforms today, used for such tasks as flagging misinformation and manipulative advertising, preventing uploads of graphic violence, and enforcing copyright protections. But when dealing with the billions of new images generated every day on sites like Facebook, manual content moderation just doesn't scale. They depend on algorithms to help automatically flag or remove bad content.

In our new Facebook AI Image Similarity Challenge, hosted in partnership with Facebook AI, your task is to create models for detecting whether a query image is derived from one of the images in a large corpus of reference images.

This blog post will provide an overview of the challenge's two tracks and highlight some resources to help you get started.

A pair of original and manipulated images. The original image is a photo of a koala, and the manipulated image is a copy which has been rotated and has koala emoji overlaid.
Example of the kind of image pair that the Image Similarity Challenge asks competitors to detect. The original image has been rotated and combined with another image to create the manipulated image.

The challenge

Here is a quick introduction to the tracks, data, and phases of the challenge.

Two tracks

Unlike most DrivenData competitions, the Image Similarity Challenge has two tracks:

  • In the unconstrained Matching Track, your objective is just the overall objective: identify which query images are derived from which reference images. You are free to use whatever approach you want to achieve this objective (aside from some rules for ensuring that solutions are generalizable.)
  • In the constrained Descriptor Track, your submission will be descriptors (vector representations with at most 256 dimensions) for each image in the query and reference sets. These will be used in a similarity search to achieve the overall objective of finding the query–reference image pairs.

Using image descriptors is one common type of approach for image similarity detection. This means that you can potentially develop one solution to submit to both tracks of the challenge. However, the Matching Track gives you more freedom in your solution, and you may find this freedom lets you outperform Descriptor Track solutions. You might use this freedom as simply as having more than 256 descriptor dimensions. Or, you can potentially develop an entirely different approach that does not use descriptors at all.

There is a $100,000 prize pool for the best solutions in each track. You are welcome to participate in just one track or in both—it's up to you! You can read more about the details of the Matching Track and Descriptor Track on their respective "Problem Description" pages.

Datasets provided

For this competition, the image datasets provided can be thought of under two main categories:

  • The query and reference sets: these are images that will be used for evaluation.
  • The training set: these are additional images that you are free to use in any way for developing your solutions.

The query set is 50,000 images. Some of these images are transformed versions of images from the 1 million reference set, and the task of the challenge is to identify them. We provide ground truth labels for half of the query images for you to use for development evaluation, while the other half is held out for the leaderboard. For the final rankings in Phase 2 of the challenge (more on this in the next section), there will be a new unseen query set of 50,000 images.

Submissions to this challenge will need to generate scores assessing the likelihood that query–reference image pairs come from the same source. (In the Descriptor Track, this is done by evaluating the Euclidean distance between the image descriptors.) These submissions will be evaluated by micro-average precision on the predicted pairs ranked globally by confidence score.

Image pairs showing different compositions of image transformations applied to create a manipulated image from an original image.
Examples of how many different image transformations can be composed together to create the manipulated query images.


Unlike for a typical supervised machine learning competition, developing a model for this challenge is not as simple as just training a model on provided labeled training data. The query and reference sets are intended for evaluation and not for training. Again, please ensure that you read the rules on data use describing how solutions can use the query and reference images. The purpose of these rules is to make sure that solutions are not overfitted on the evaluation data and can generalize to new data. After all, any practical real-world system will have to continuously deal with new, previously unseen images.

We expect that successful competitors will need to be creative in assembling training data. The training image set of 1 million additional images is provided as a starting place for that purpose. For example, you can use image transformation tools (like the AugLy library described below) on training set images to generate your own labeled image pairs for supervised approaches. Finally, your are also allowed to bring in external datasets, as long as they comply with the rules on external data.

For further details about the provided datasets check out the "Data" section of the "Problem Description" pages (Matching Track; Descriptor Track). You can find instructions to download the data on the "Data Download" pages after accepting the data license agreement.

Two phases

In addition to being split into two tracks, the Image Similarity Challenge is also split into two phases. Participants have access to the research dataset in Phase 1 for model development, and can make submissions to the Phase 1 leaderboard. The final leaderboard and prizes will be determined by Phase 2, which runs for 48 hours from October 26–27, 2021 and for which a new unseen query image set will be provided.

Note that for Phase 2 eligibility, we will require solutions to be finalized at the end of Phase 1. You will need to submit your code (and reference image descriptors for the Descriptor Track) before Phase 2. You will have up to three submissions for the final phase. The top-performing solutions for Phase 2 will win from a $200,000 total prize pool for the challenge!

Resources

Finally, here are some resources to help you get started on developing your solutions.

Benchmark models examples

For example solution implementations, check out the facebookresearch/isc2021 repository on GitHub, published by our partners at Facebook AI accompanying their paper about this challenge. This repository has code and walkthroughs for three baseline models:

  • GIST descriptors: a traditional computer vision model first published in 2001 that computes descriptors for a particular set of perceptual dimensions.
  • MultiGrain: a pretrained ResNet-50 convolutional neural network trained on ImageNet for image classification and image retrieval, published in 2019.
  • HOW+ASMK: a model that represents images using aggregated local descriptors based on convolutional neural network activations, published in 2020.

The best place to start is the docs/ subdirectory which has walkthroughs for reproducing the results of the baseline models for the competitions. Scores from these benchmark models can be seen on the challenge leaderboard.

Screenshot of Image Similarity Challenge Leaderboard showing scores from the MultiGran and GIST benchmark models.
Scores from benchmark models on the challenge leaderboard.

Generating your own training data with AugLy

Our partners at Facebook AI have published an open-source Python library AugLy that you may find helpful for this challenge. AugLy is a general data augmentation library with one of its supported modalities being transformations of images. For example, you can use AugLy on the provided training set images to generate your own "query–reference" image pairs and use these for supervised machine learning. You can learn more about AugLy from its GitHub repository or its release announcement blog post.

Examples of data augmentations that AugLy can apply to an image.
Examples of data augmentations that AugLy can apply to an image. From the AugLy repository documentation.

Good luck!

Visit the homepages for the Image Similarity Challenge Matching Track and Descriptor Track to sign up and read about the challenge in detail. If you have any questions, you can visit the competition forum. Good luck, and enjoy the challenge!


Update July 13, 2021: Updated benchmark section to reflect addition of HOW+AMSK to the facebookresearch/isc2021 repository.