INFINIQ-AI1 / RISF

official implementation of "Re-scoring using image-language similarity for few-shot object detection" CVIU, April 2024
Other
9 stars 0 forks source link

Re-scoring using image-language similarity for few-shot object detection

Min Jae Jung, Seung Dae Han, and JooHee Kim

This repository is the implementation of our CVIU paper, Re-scoring using image-language similarity for few-shot object detection .

Abstract

Few-shot object detection, which focuses on detecting novel objects with few labels, is an emerging challenge in the community. Recent studies show that adapting a pre-trained model or modified loss function can improve performance. In this paper, we explore leveraging the power of Contrastive Language-Image Pre-training (CLIP) and hard negative classification loss in low data setting. Specifically, we propose Re-scoring using Image-language Similarity for Few-shot object detection (RISF) which extends Faster R-CNN by introducing Calibration Module using CLIP (CM-CLIP) and Background Negative Re-scale Loss (BNRL). The former adapts CLIP, which performs zero-shot classification, to re-score the classification scores of a detector using image-class similarities, the latter is modified classification loss considering the punishment for fake backgrounds as well as confusing categories on a generalized few-shot object detection dataset. Extensive experiments on MS-COCO and PASCAL VOC show that the proposed RISF substantially outperforms the state-of-the-art approaches.

Installation

Requirements

Usage

Dataset Preparation

Please download MS-COCO and PASCAL-VOC dataset and organize it in the following structure:

...
datasets
| -- coco (trainval2014/*.jpg, val2014/*.jpg, annotations/*.json)
| -- cocosplit
| -- VOC2007
| -- VOC2012
| -- vocsplit
risf
tools
...

Training

Evaluation

python main.py --num-gpus {your_gpus} --config-file configs/coco/fsod_10shot_seed0.yaml --eval-only

Acknowlegement

RISF builds on previous works code base such as detectron2 and DeFRCN. If you found RISF useful please consider citing these works as well.

Trouble shooting