https://github.com/zer0int/clip-vit-visualization
What do CLIP Vision Transformers learn? Feature Visualization can show you!
https://github.com/zer0int/clip-vit-visualization
activation clip feature neuron vision-transformer visualization vit xai
Last synced: 3 months ago
JSON representation
What do CLIP Vision Transformers learn? Feature Visualization can show you!
- Host: GitHub
- URL: https://github.com/zer0int/clip-vit-visualization
- Owner: zer0int
- Created: 2024-04-02T23:17:07.000Z (over 1 year ago)
- Default Branch: CLIP-vision
- Last Pushed: 2024-08-29T08:10:59.000Z (about 1 year ago)
- Last Synced: 2025-04-28T19:51:38.917Z (5 months ago)
- Topics: activation, clip, feature, neuron, vision-transformer, visualization, vit, xai
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# CLIP-ViT-Visualization
Standing on the shoulders of giants:
- Based on [github.com/hamidkazemi22/vit-visualization](https://github.com/hamidkazemi22/vit-visualization)
- This repo is a lightweight, CLIP ViT feature visualization only, implementation thereof.
- Contains ALL (!) CLIP models + some speed optimization. Requires CUDA.
- Uses [OpenAI / CLIP](https://github.com/openai/CLIP)## Info
- Check / install `requirements.txt`
- Check the comments in "run_visualization.py" -> Easy lightweight configuration
- Configure: model, optimizer, single-feature vs. multi-feature/layer, intermediate steps, ...
- From the console, use "python run_visualization.py"
- Saves output in neatly organized and named way (subfolders)
- 29-AUG-204: Added script for deterministic results.## Warning about CLIP feature visualizations
- CLIP has been trained on "pretty much the entire internet".
- One neuron gets you a cat, a rose; another may encode explicit / sensitive / offensive / violent content.
- Use responsibly / at your own discretion.
- For more information, refer to the [CLIP Model Card](https://github.com/openai/CLIP/blob/main/model-card.md).