Code for the Image similarity challenge.

Overview

ISC 2021

This repository contains code for the Image Similarity Challenge 2021.

Getting started

The docs subdirectory has step-by-step instructions on how to reproduce the baseline results from the paper.

Reference paper

The competition is described in this paper: https://arxiv.org/abs/2106.09672

BibTeX reference:

@ARTICLE{ISC2021,
       author = {
       Matthijs Douze and Giorgos Tolias and Zo\"e Papakipos and Ed Pizzi and 
       Lowik Chanussot and Filip Radenovic and Tomas Jenicek and 
       Maxim Maximov and Laura Leal-Taix\'e and Ismail Elezi and 
       Ondřej Chum and Cristian Canton Ferrer       
       },
        title = "{The 2021 Image Similarity Dataset and Challenge}",
      journal = {arXiv e-prints},
         year = "2021",
}

Contributing

See the CONTRIBUTING file for how to help out.

License

ISC2021 is CC BY-NC 4.0 licensed, as found in the LICENSE file.

The majority of ISC2021 is licensed under CC-BY-NC, however portions of the project are available under separate license terms: lear_gist1.2 is licensed under the PSF license.

You might also like...
1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime
1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime

1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime

PyTorch Implementation of Region Similarity Representation Learning (ReSim)
PyTorch Implementation of Region Similarity Representation Learning (ReSim)

ReSim This repository provides the PyTorch implementation of Region Similarity Representation Learning (ReSim) described in this paper: @Article{xiao2

Quasi-Dense Similarity Learning for Multiple Object Tracking, CVPR 2021 (Oral)
Quasi-Dense Similarity Learning for Multiple Object Tracking, CVPR 2021 (Oral)

Quasi-Dense Tracking This is the offical implementation of paper Quasi-Dense Similarity Learning for Multiple Object Tracking. We present a trailer th

A curated list of  awesome resources related to Semantic Search🔎  and Semantic Similarity tasks.
A curated list of awesome resources related to Semantic Search🔎 and Semantic Similarity tasks.

A curated list of awesome resources related to Semantic Search🔎 and Semantic Similarity tasks.

A PyTorch implementation of
A PyTorch implementation of "SimGNN: A Neural Network Approach to Fast Graph Similarity Computation" (WSDM 2019).

SimGNN ⠀⠀⠀ A PyTorch implementation of SimGNN: A Neural Network Approach to Fast Graph Similarity Computation (WSDM 2019). Abstract Graph similarity s

This is the official pytorch implementation for the paper: Instance Similarity Learning for Unsupervised Feature Representation.

ISL This is the official pytorch implementation for the paper: Instance Similarity Learning for Unsupervised Feature Representation, which is accepted

Official implementation of NeurIPS 2021 paper "One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective"

Official implementation of NeurIPS 2021 paper "One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective"

PyTorch implementation of Weak-shot Fine-grained Classification via Similarity Transfer
PyTorch implementation of Weak-shot Fine-grained Classification via Similarity Transfer

SimTrans-Weak-Shot-Classification This repository contains the official PyTorch implementation of the following paper: Weak-shot Fine-grained Classifi

Official implementation of NeurIPS 2021 paper
Official implementation of NeurIPS 2021 paper "Contextual Similarity Aggregation with Self-attention for Visual Re-ranking"

CSA: Contextual Similarity Aggregation with Self-attention for Visual Re-ranking PyTorch training code for CSA (Contextual Similarity Aggregation). We

Comments
  • About Qualifications for the Final Bonus

    About Qualifications for the Final Bonus

    Thanks for your baseline! Here's a doubt: The competition rules say that: (a) to any individual, entity, or country prohibited by any applicable U.S. or non-U.S. export controls and trade sanctions; (b) to anyone on U.S. or non-U.S. government restricted parties lists; or (c) for any purpose prohibited by applicable export controls and trade sanctions, including nuclear, chemical or biological weapons, or missile technology applications without the required government authorizations. Could the Chinese team win the final award? What's the detailed prohibited list?

    opened by ElliotQi 1
  • Setup

    Setup

    • Added setup.py so that pip install -e . works
    • Added matplotlib requirement to requirements.txt, which is required for compute_metrics script
    • Added some instructions for baseline #1

    I have now run all 5 baselines & verified they work as expected on my environment, which I set up using pip install -e.

    CLA Signed 
    opened by zpapakipos 1
  • Update dependencies

    Update dependencies

    Increased the Pillow version because <8.3.2 contained security issues. Also changed the faiss version to the most recent on pypi; the one specified can no longer be found.

    Successfully ran pip install -e .

    CLA Signed 
    opened by zpapakipos 0
  • Current implementation of metric does not stably score predictions with same score

    Current implementation of metric does not stably score predictions with same score

    If predictions have the same score, the current implementation of the metric will score them differently if they are submitted in a different order.

    https://github.com/facebookresearch/isc2021/blob/dab82c0381a3198270a8fa3a8ab722c3eba81b58/vcd/vcd/metrics.py#L351

    We have fixed this by grouping by score and updating precision and recall for a particular score threshold as a whole rather than for individual scores:

    from itertools import groupby
    ...
    def match_metric(gts: Collection[Match], predictions: Collection[Match]):
        r"""V2 metric:
    
        Computes the AP based on the VCSL approach for the
        calculation of Precision and Recall.
    
        AP = \sum_{i=1}^N P(i) ΔR(i)
    
        where, P(i) = sqrt(P_q * P_r) and R(i) = sqrt(R_q * R_r)
        calculated as in the VCSL.
        """
    
        predictions = sorted(predictions, key=lambda x: x.score, reverse=True)
    
        # Initialize video pairs and load their gt bboxs
        video_pairs = defaultdict(VideoPairEvaluator)
        for gt in gts:
            video_pairs[gt.pair_id].add_gt(gt)
    
        # Get the total gt length for each axis
        gt_total_lengths = {axis: 0 for axis in Axis}
        for _, v in video_pairs.items():
            for axis in Axis:
                gt_total_lengths[axis] += v.total_gt_length(axis)
    
        # Loop through the predictions
        recall = 0.0
        metric = 0.0
        intersections = {axis: 0 for axis in Axis}
        totals = {axis: 0 for axis in Axis}
    
        # Group predictions by score to break ties consistently
        for _, preds in groupby(predictions, key=lambda x: x.score):
            # Update precision and recall within a given group before updating metric
            for pred in preds:
                pair_id = pred.pair_id
                # Given a new prediction, we only need the differences in the intersection with
                # gt and total video length covered for both query and reference axes.
                intersection_deltas, total_deltas = video_pairs[pair_id].add_prediction(pred)
    
                recalls = {}
                precisions = {}
                for axis in Axis:
                    # Accumulate the differences to the corresponding values
                    intersections[axis] += intersection_deltas[axis]
                    totals[axis] += total_deltas[axis]
                    recalls[axis] = intersections[axis] / gt_total_lengths[axis]
                    precisions[axis] = intersections[axis] / totals[axis]
    
            new_recall = sqrt(recalls[Axis.QUERY] * recalls[Axis.REF])
            precision = sqrt(precisions[Axis.QUERY] * precisions[Axis.REF])
    
            # Compute metric
            delta_recall = new_recall - recall
            metric += precision * delta_recall
            recall = new_recall
    
        return metric
    ...
    opened by chrisjkuch 1
Owner
Facebook Research
Facebook Research
Sharpened cosine similarity torch - A Sharpened Cosine Similarity layer for PyTorch

Sharpened Cosine Similarity A layer implementation for PyTorch Install At your c

Brandon Rohrer 203 Nov 30, 2022
ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge (ManiSkill Challenge), a large-scale learning-from-demonstrations benchmark for object manipulation.

ManiSkill-Learn ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge, a large-scale learning-from-dem

Hao Su's Lab, UCSD 48 Dec 30, 2022
The code of “Similarity Reasoning and Filtration for Image-Text Matching” [AAAI2021]

SGRAF PyTorch implementation for AAAI2021 paper of “Similarity Reasoning and Filtration for Image-Text Matching”. It is built on top of the SCAN and C

Ronnie_IIAU 149 Dec 22, 2022
The AugNet Python module contains functions for the fast computation of image similarity.

AugNet AugNet: End-to-End Unsupervised Visual Representation Learning with Image Augmentation arxiv link In our work, we propose AugNet, a new deep le

Ming 74 Dec 28, 2022
Official implementation of the paper "Lightweight Deep CNN for Natural Image Matting via Similarity Preserving Knowledge Distillation"

Lightweight-Deep-CNN-for-Natural-Image-Matting-via-Similarity-Preserving-Knowledge-Distillation Introduction Accepted at IEEE Signal Processing Letter

DongGeun-Yoon 19 Jun 7, 2022
A variational Bayesian method for similarity learning in non-rigid image registration (CVPR 2022)

A variational Bayesian method for similarity learning in non-rigid image registration We provide the source code and the trained models used in the re

daniel grzech 14 Nov 21, 2022
Code for the paper "Adapting Monolingual Models: Data can be Scarce when Language Similarity is High"

Wietse de Vries • Martijn Bartelds • Malvina Nissim • Martijn Wieling Adapting Monolingual Models: Data can be Scarce when Language Similarity is High

Wietse de Vries 5 Aug 2, 2021
Code for the TIP 2021 Paper "Salient Object Detection with Purificatory Mechanism and Structural Similarity Loss"

PurNet Project for the TIP 2021 Paper "Salient Object Detection with Purificatory Mechanism and Structural Similarity Loss" Abstract Image-based salie

Jinming Su 4 Aug 25, 2022
Code for the CVPR2022 paper "Frequency-driven Imperceptible Adversarial Attack on Semantic Similarity"

Introduction This is an official release of the paper "Frequency-driven Imperceptible Adversarial Attack on Semantic Similarity" (arxiv link). Abstrac

Leo 21 Nov 23, 2022