alisalam commited on
Commit
1161ec2
·
verified ·
1 Parent(s): 10828a5

Add model card

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: video-classification
4
+ tags:
5
+ - video
6
+ - action-recognition
7
+ - efficient-inference
8
+ - token-selection
9
+ library_name: pytorch
10
+ ---
11
+
12
+ # LookWhen ViT-B/16
13
+
14
+ Pre-trained checkpoint for **"LookWhen? Fast Video Recognition by Learning When, Where,
15
+ and What to Compute"** ([arXiv:2605.06809](https://arxiv.org/abs/2605.06809)).
16
+
17
+ LookWhen splits video recognition in two: a shallow **selector** scores every patch of a
18
+ 2x-downscaled clip, and a deep **extractor** processes only the top-K of them while still
19
+ predicting features of the whole video.
20
+
21
+ This is the model used throughout the paper: ViT-B/16, pre-trained for 20 epochs on
22
+ Kinetics-400 and SSv2 by distilling InternVideo2's video token and DINOv3's frame and
23
+ patch tokens, with selection supervised by top1-distance token uniqueness. It was trained
24
+ over sparsity 70-95%, so it runs anywhere in that range without retraining.
25
+
26
+ ## Usage
27
+
28
+ ```bash
29
+ pip install git+https://github.com/alisalamatian1/LookWhen.git
30
+ ```
31
+
32
+ ```python
33
+ import torch
34
+ from lookwhen import LookWhen
35
+ from lookwhen.data.video import load_clip
36
+
37
+ model = LookWhen.from_pretrained().cuda().eval() # downloads this checkpoint
38
+ clip = load_clip("video.mp4", num_frames=16, img_size=224).unsqueeze(0).cuda()
39
+
40
+ out = model(clip, keep_ratio=0.1) # keep_ratio = 1 - sparsity
41
+ out["video"] # (1, 768) video embedding
42
+ ```
43
+
44
+ Code, training, and evaluation: https://github.com/alisalamatian1/LookWhen
45
+
46
+ ## Citation
47
+
48
+ ```bibtex
49
+ @article{salamatian2026lookwhen,
50
+ title = {LookWhen? Fast Video Recognition by Learning When, Where, and What to Compute},
51
+ author = {Salamatian, Ali and Fuller, Anthony and Sarkar, Pritam and
52
+ Green, James R. and Sigal, Leonid and Shelhamer, Evan},
53
+ journal = {arXiv preprint arXiv:2605.06809},
54
+ year = {2026}
55
+ }
56
+ ```