• Stars
    star
    346
  • Rank 122,430 (Top 3 %)
  • Language
    Jupyter Notebook
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLIP Surgery for Better Explainability with Enhancement in Open-Vocabulary Tasks

CLIP Surgery for Better Explainability with Enhancement in Open-Vocabulary Tasks (arxiv)

Introduction

This work focuses on the explainability of CLIP via its raw predictions. We identify two problems about CLIP's explainability: opposite visualization and noisy activations. Then we propose the CLIP Surgery, which does not require any fine-tuning or additional supervision. It greatly improves the explainability of CLIP, and enhances downstream open-vocabulary tasks such as multi-label recognition, semantic segmentation, interactive segmentation (specifically the Segment Anything Model, SAM), and multimodal visualization. Currently, we offer a simple demo for interpretability analysis, and how to convert text to point prompts for SAM. Rest codes including evaluation and other tasks will be released later.

Opposite visualization is due to wrong relation in self-attention: image

Noisy activations is owing to redundant features across lables: image

Our visualization results: image

Text2Points to guide SAM: image

Multimodal visualization: image

Segmentation results: image

Multilabel results: image

Demo

Firstly to install the SAM, and download the model

pip install git+https://github.com/facebookresearch/segment-anything.git
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth

Then explain CLIP via jupyter demo "demo.ipynb". Or use the python file:

python demo.py

(Note: demo's results are slightly different from the experimental code, specifically no apex amp fp16 for easier to use.)

Cite

@misc{li2023clip,
      title={CLIP Surgery for Better Explainability with Enhancement in Open-Vocabulary Tasks}, 
      author={Yi Li and Hualiang Wang and Yiqun Duan and Xiaomeng Li},
      year={2023},
      eprint={2304.05653},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

More Repositories

1

CLIPN

ICCV 2023: CLIPN for Zero-Shot OOD Detection: Teaching CLIP to Say No
Python
120
star
2

GenericSSL

NeurIPS 2023: Towards Generic Semi-Supervised Framework for Volumetric Medical Image Segmentation
Python
78
star
3

AllSpark

CVPR 2024: AllSpark: Reborn Labeled Features from Unlabeled in Transformer for Semi-Supervised Semantic Segmentation
Python
53
star
4

DIF-Net

MICCAI 2023: Learning Deep Intensity Field for Extremely Sparse-View CBCT Reconstruction
Python
51
star
5

TriALS

MICCAI 2024: nnUNet incorporating additional baselines as SAMed️, Mamba Variants, and MedNeXT to establish a benchmark for segmentation challenges.
Python
49
star
6

DHC

MICCAI 2023: DHC: Dual-debiased Heterogeneous Co-training Framework for Class-imbalanced Semi-supervised Medical Image Segmentation
Python
48
star
7

NuInstruct

46
star
8

RSCFed

CVPR 2022: RSCFed: Random Sampling Consensus Federated Semi-supervised Learning
Python
45
star
9

CLD-Semi

MICCAI 2022: Calibrating Label Distribution for Class-Imbalanced Barely-Supervised Knee Segmentation
Python
45
star
10

EPL_SemiDG

AAAI 2022: Enhancing Pseudo Label Quality for Semi-Supervised Domain-Generalized Medical Image Segmentation
Python
40
star
11

URN

AAAI 2022: Uncertainty Estimation via Response Scaling for Pseudo-Mask Noise Mitigation in Weakly-Supervised Semantic Segmentation
Python
38
star
12

OEEM

MICCAI 2022: Online Easy Example Mining for Weakly-supervised Gland Segmentation from Histology Images
Jupyter Notebook
33
star
13

GraphEcho

ICCV 2023, "GraphEcho: Graph-Driven Unsupervised Domain Adaptation for Echocardiogram Video Segmentation"
Python
32
star
14

DIF-Gaussian

MICCAI 2024: Learning 3D Gaussians for Extremely Sparse-View Cone-Beam CT Reconstruction
Python
28
star
15

FSDiffReg

MICCAI 2023: FSDiffReg: Feature-wise and Score-wise Diffusion-guided Unsupervised Deformable Image Registration for Cardiac Images
Python
27
star
16

C2RV-CBCT

CVPR 2024, "C^2RV: Cross-Regional and Cross-View Learning for Sparse-View CBCT Reconstruction"
Python
24
star
17

UCVME

AAAI 2023: Semi-Supervised Deep Regression with Uncertainty Consistency and Variational Model Ensembling via Bayesian Neural Networks
Python
24
star
18

FDDM

MICCAI 2023: Fundus-Enhanced Disease-Aware Distillation Model for Retinal Disease Classification from OCT Images
Python
23
star
19

AdaCon

IEEE TMI 2021: AdaCon: Adaptive Contrast for Image Regression in Computer-Aided Disease Assessment
Python
20
star
20

CSS-SemiVideo

IEEE TMI 2022: Cyclical Self-Supervision for Semi-Supervised Ejection Fraction Prediction from Echocardiogram Videos
Python
16
star
21

TimeStamp-Surgical

TMI 2023: Less is More: Surgical Phase Recognition from Timestamp Supervision
Python
15
star
22

ECBM

ICLR 2024: Energy-Based Concept Bottleneck Models: Unifying Prediction, Concept Intervention, and Probabilistic Interpretations
Jupyter Notebook
15
star
23

CPR

MICCAI 2023: Context-Aware Pseudo-Label Refinement for Source-Free Domain Adaptive Fundus Image Segmentation
Python
14
star
24

HCGNet

J-BHI 2024: Exploiting Hierarchical Interactions for Protein Surface Learning
Python
14
star
25

Fed-MAS

MICCAI 2023 DeCaF Best Paper Award: Federated Model Aggregation via Self-Supervised Priors for Highly Imbalanced Medical Image Classification
Python
12
star
26

SAHC

IEEE TMI 2022: Exploring Segment-level Semantics for Online Phase Recognition from Surgical Videos
Python
12
star
27

SC-Cor

ECCV 2022: Learning Shadow Correspondence for Video Shadow Detection
Python
12
star
28

DistillingSelf

MICCAI 2022: Free Lunch for Surgical Video Understanding by Distilling Self-Supervisions
Python
11
star
29

ICLIP

Exploring Visual Interpretability for Contrastive Language-Image Pretraining
11
star
30

RIDL

MICCAI 2023: Radiomics-Informed Deep Learning for Classification of Atrial Fibrillation Sub-Types from Left-Atrium CT Volumes
Python
9
star
31

FreeSeg

FreeSeg: Free Mask from Interpretable Contrastive Language-Image Pretraining for Semantic Segmentation
9
star
32

TripleE-DG

Python
8
star
33

MSSG

MICCAI 2023: Morphology-inspired Unsupervised Gland Segmentation via Selective Semantic Grouping
Python
7
star
34

SCAN

Python
6
star
35

DiffCMR

Python
6
star
36

FoPro-KD

TMI 2023: FoPro-KD: Fourier Prompted Effective Knowledge Distillation for Long-Tailed Medical Image Recognition
6
star
37

ToMo-UDA

[ICML' 24] Unsupervised Domain Adaptation for Anatomical Structure Detection in Ultrasound Images.
Python
6
star
38

FD-SOS

MICCAI 2024 Oral: Vision-Language Open-Set Detectors for Bone Fenestration and Dehiscence Detection from Intraoral Images
Python
5
star
39

M3-UDA

CVPR M^3-UDA: A New Benchmark for Unsupervised Domain Adaptive Fetal Cardiac Structure Detection
Python
5
star
40

CLSS

Python
4
star
41

SEDSkill

Python
4
star
42

VDPL

Variance-Aware Domain-Augmented Pseudo Labeling for Semi-Supervised Domain Generalization on Medical Image Segmentation
Python
3
star
43

GL-Fusion

MICCAI 2023: GL-Fusion: Global-Local Fusion Network for Multi-view Echocardiogram Video Segmentation
Python
3
star
44

NumCLIP

[ECCV 2024] Teach CLIP to Develop a Number Sense for Ordinal Regression
Python
3
star
45

DrugRec

Python
3
star
46

CardiacNet

Python
2
star
47

NGOAT

1
star
48

GPTrack

1
star
49

DDAug

ICONIP 2023: Dynamic Data Augmentation via Monte-Carlo Tree Search for Prostate MRI Segmentation
Python
1
star
50

CoFA

1
star