• Stars
    star
    281
  • Rank 142,492 (Top 3 %)
  • Language
    Jupyter Notebook
  • Created about 1 year ago
  • Updated about 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
98
star
2

GenericSSL

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

DHC

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

RSCFed

CVPR 2022: RSCFed: Random Sampling Consensus Federated Semi-supervised Learning
Python
43
star
5

CLD-Semi

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

DIF-Net

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

EPL_SemiDG

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

URN

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

OEEM

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

NuInstruct

26
star
11

AllSpark

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

GraphEcho

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

UCVME

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

AdaCon

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

FSDiffReg

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

FDDM

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

CPR

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

TimeStamp-Surgical

TMI 2023: Less is More: Surgical Phase Recognition from Timestamp Supervision
Python
13
star
19

CSS-SemiVideo

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

SC-Cor

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

C2RV-CBCT

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

ICLIP

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

HCGNet

J-BHI 2024: Exploiting Hierarchical Interactions for Protein Surface Learning
Python
11
star
24

DistillingSelf

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

SAHC

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

Fed-MAS

MICCAI Workshop 2023: Federated Model Aggregation via Self-Supervised Priors for Highly Imbalanced Medical Image Classification
Python
9
star
27

FreeSeg

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

ECBM

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

RIDL

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

TripleE-DG

Python
7
star
31

MSSG

MICCAI 2023: Morphology-inspired Unsupervised Gland Segmentation via Selective Semantic Grouping
Python
6
star
32

SCAN

Python
5
star
33

DiffCMR

Python
5
star
34

CLSS

Python
4
star
35

SEDSkill

Python
4
star
36

FoPro-KD

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

GL-Fusion

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

DDAug

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

M3-UDA

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

VDPL

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