assets: optimized tracking demo GIF (8.9MB, same label quality)

#3
by gkalstn0 - opened
.gitattributes CHANGED
@@ -34,5 +34,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.gif filter=lfs diff=lfs merge=lfs -text
37
- assets/architecture.png filter=lfs diff=lfs merge=lfs -text
38
- assets/dense_attention_comparison.png filter=lfs diff=lfs merge=lfs -text
 
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.gif filter=lfs diff=lfs merge=lfs -text
 
 
README.md CHANGED
@@ -13,24 +13,25 @@ tags:
13
 
14
  # Motif Vision Encoder
15
 
16
- Motif Vision Encoder is a unified image + video self-supervised vision encoder on a ViT
17
- backbone. A single 3D-convolutional tokenizer ingests both modalities β€” an image is a
18
- 1-frame clip (`T=1`), a video is `T>1` β€” so the same weights produce dense patch-level
19
- features and a language-aligned global (CLS) representation.
20
 
21
  Trained on **~1/3 the data of DINOv3** (0.5B vs 1.7B samples), it still reaches competitive
22
  performance across image and video benchmarks β€” and leads on DAVIS video tracking.
23
 
24
  <p align="center">
25
- <img src="assets/haaland_attn_blk20.gif" width="480" alt="Point tracking on a video clip: Motif vs V-JEPA 2.1"/>
26
  </p>
27
- <p align="center"><em>Point tracking on a video clip (top: Motif, bottom: V-JEPA 2.1) β€” a query point propagated across frames by patch-feature cosine similarity. Motif tracks the subject more reliably than V-JEPA 2.1.</em></p>
28
 
29
  - **Architecture**: ViT-7B (embed 4096 / depth 40 / heads 32), patch 16, 3D axial RoPE
30
  (`base=100`), SwiGLU FFN, LayerScale, per-head QK-norm, gated attention, 4 register tokens.
31
  - **Tokenizer**: `Conv3d(kernel=stride=(tubelet, patch, patch))` β€” image `(B,3,H,W)` β†’ `T=1`,
32
  video `(B,T,3,H,W)`. Token layout `[CLS] + [register Γ— 4] + [patch Γ— N]`.
33
-
 
34
 
35
  ## Usage
36
 
@@ -46,7 +47,7 @@ from transformers.image_utils import load_image
46
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
47
  image = load_image(url)
48
 
49
- repo = "Motif-Technologies/Motif-Vision-Encoder"
50
  processor = AutoImageProcessor.from_pretrained(repo)
51
  model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda").eval()
52
 
@@ -78,10 +79,6 @@ with torch.inference_mode():
78
 
79
  ## Model details
80
 
81
- <p align="center">
82
- <img src="assets/architecture.png" width="820" alt="Motif Vision Encoder architecture: image and video inputs, patch embedding, 40-block transformer stack, and transformer block internals"/>
83
- </p>
84
-
85
  | | |
86
  |---|---|
87
  | Backbone | ViT-7B, patch 16, embed 4096, depth 40, heads 32, SwiGLU |
@@ -98,42 +95,49 @@ Outputs (`BaseModelOutputWithPooling`): `last_hidden_state` `(B, 1+4+N, 4096)`,
98
  ## Evaluation
99
 
100
  Compared against the strongest publicly reported self-supervised / vision backbones. Higher is
101
- better for every column. Best comparable value per column in bold, second best <u>underlined</u>.
 
 
102
 
103
  DAVIS S/M/L follow the DINOv3 protocol (J&F-mean at video short side 420/480, 840/960,
104
  1260/1440 px). V-JEPA 2.1 is not part of the DINOv3 Table 5 tracking benchmark, so only its
105
  single-resolution (S) figure is available.
106
 
107
- | Model | Training<br>data | DAVIS S<br>J&F ↑ | DAVIS M<br>J&F ↑ | DAVIS L<br>J&F ↑ | ImageNet-1K<br>lin. probe ↑ | ADE20K<br>mIoU ↑ | K400 ↑ |
108
- |---|---|---|---|---|---|---|---|
109
- | **Motif Vision Encoder** | 0.5B | **73.8** | **80.4** | **83.4** | 87.4 | <u>52.0</u> | 87.4 |
110
- | DINOv3 | 1.7B | <u>71.1</u> | <u>79.7</u> | <u>83.3</u> | 88.4 | **55.9** | <u>87.8</u> |
111
- | Web-DINO | 2B | 57.2 | 65.8 | 69.5 | 85.9 | 42.7 | 86.8 |
112
- | PEcore | 5.4B | 48.2 | 53.1 | 49.8 | **89.3** | 38.9 | **87.9** |
113
- | SigLIP2 | 10B | 56.1 | 62.3 | 62.9 | <u>89.1</u> | 45.4 | 86.9 |
114
- | OpenCLIP | 2B | – | – | – | – | – | – |
115
- | V-JEPA 2.1 | 0.022B | 69.0 | – | – | 85.5 | 47.9 | 87.7 |
116
 
117
- Protocol: DINOv3-style linear/attentive probes for image tasks; V-JEPA 2-style protocol for
118
- video. Baseline DAVIS / ADE20K / K400 figures are taken from the DINOv3 technical report's
119
- unified evaluation (Tab. 3, 5, 6) and ImageNet from Tab. 7; OpenCLIP is not in that report and
120
- its benchmarks are not reported under a comparable protocol.
121
-
122
- Motif is state of the art on DAVIS video tracking at every resolution (74.0 / 80.5 / 83.5 J&F)
123
- and stays competitive on the other image and video benchmarks, using roughly 1/3 of DINOv3's
124
- training data (~0.5B samples).
125
 
126
- <p align="center">
127
- <img src="assets/davis_mask_propagation.gif" width="820" alt="Mask propagation: ground truth vs DINOv3 vs Motif"/>
128
- </p>
129
-
130
- <p align="center">
131
- <img src="assets/dense_attention_comparison.png" width="820" alt="Dense attention and feature-similarity comparison across Motif, DINOv3, V-JEPA 2.1, and SigLIP2"/>
132
- </p>
133
- <p align="center"><em>Dense features on a single image (768px). Columns: query point, CLS attention, query-point attention, patch-feature cosine similarity. Motif and DINOv3 keep attention and similarity tightly localized on the queried object, while V-JEPA 2.1 and SigLIP2 are noticeably noisier.</em></p>
134
 
 
 
 
 
 
135
 
136
  ## License
137
 
138
  Released under the **MIT License** (see `LICENSE`). The model was trained on data governed by the
139
  respective dataset licenses; downstream users are responsible for compliance with those terms.
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  # Motif Vision Encoder
15
 
16
+ Motif Vision Encoder is a **unified image + video** self-supervised vision encoder on a ViT
17
+ backbone. A single **3D-convolutional tokenizer** ingests both modalities β€” an image is a
18
+ 1-frame clip (`T=1`), a video is `T>1` β€” so the same weights produce **dense patch-level
19
+ features** and a **language-aligned global (CLS) representation**.
20
 
21
  Trained on **~1/3 the data of DINOv3** (0.5B vs 1.7B samples), it still reaches competitive
22
  performance across image and video benchmarks β€” and leads on DAVIS video tracking.
23
 
24
  <p align="center">
25
+ <img src="assets/haaland_full_attn_blk20.gif" width="480" alt="Point tracking on a video clip: Motif vs V-JEPA 2.1"/>
26
  </p>
27
+ <p align="center"><em>Point tracking on a video clip (top: Motif, bottom: V-JEPA 2.1) β€” a query point propagated across frames by patch-feature cosine similarity. Motif stays locked on the subject noticeably better than V-JEPA 2.1.</em></p>
28
 
29
  - **Architecture**: ViT-7B (embed 4096 / depth 40 / heads 32), patch 16, 3D axial RoPE
30
  (`base=100`), SwiGLU FFN, LayerScale, per-head QK-norm, gated attention, 4 register tokens.
31
  - **Tokenizer**: `Conv3d(kernel=stride=(tubelet, patch, patch))` β€” image `(B,3,H,W)` β†’ `T=1`,
32
  video `(B,T,3,H,W)`. Token layout `[CLS] + [register Γ— 4] + [patch Γ— N]`.
33
+ - **This repo**: inference-only. Weights + self-contained `modeling_motif_vision_encoder.py` (loaded
34
+ via `trust_remote_code`). Training/eval code lives in the GitHub repo.
35
 
36
  ## Usage
37
 
 
47
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
48
  image = load_image(url)
49
 
50
+ repo = "Motif-Technologies/Motif-Vision-Encoder-7B"
51
  processor = AutoImageProcessor.from_pretrained(repo)
52
  model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda").eval()
53
 
 
79
 
80
  ## Model details
81
 
 
 
 
 
82
  | | |
83
  |---|---|
84
  | Backbone | ViT-7B, patch 16, embed 4096, depth 40, heads 32, SwiGLU |
 
95
  ## Evaluation
96
 
97
  Compared against the strongest publicly reported self-supervised / vision backbones. Higher is
98
+ better for every column **except KITTI depth** (lower is better). Best **comparable** value per
99
+ column in **bold**, second best <u>underlined</u>; the footnoted figure (‑) is measured under a
100
+ different protocol and is excluded from the ranking.
101
 
102
  DAVIS S/M/L follow the DINOv3 protocol (J&F-mean at video short side 420/480, 840/960,
103
  1260/1440 px). V-JEPA 2.1 is not part of the DINOv3 Table 5 tracking benchmark, so only its
104
  single-resolution (S) figure is available.
105
 
106
+ | Model | Training<br>data | DAVIS S<br>J&F ↑ | DAVIS M<br>J&F ↑ | DAVIS L<br>J&F ↑ | ImageNet-1K<br>lin. probe ↑ | ADE20K<br>mIoU ↑ | K400 ↑ | KITTI<br>depth MSE ↓ |
107
+ |---|---|---|---|---|---|---|---|---|
108
+ | **Motif Vision Encoder** | 0.5B | **74.0** | **80.5** | **83.5** | 87.2 | <u>52.0</u> | 87.4 | *in progress* |
109
+ | DINOv3 | 1.7B | <u>71.1</u> | <u>79.7</u> | <u>83.3</u> | 88.4 | **55.9** | <u>87.8</u> | **2.3** |
110
+ | PEcore | 5.4B | 48.2 | 53.1 | 49.8 | **89.3** | 38.9 | **87.9** | 4.1 |
111
+ | SigLIP2 | 10B | 56.1 | 62.3 | 62.9 | <u>89.1</u> | 45.4 | 86.9 | – |
112
+ | OpenCLIP | 2B | – | – | – | – | – | – | – |
113
+ | V-JEPA 2.1 | 0.022B | 69.0 | – | – | 85.5 | 47.9 | 87.7 | <u>2.5</u> |
114
+ | VideoMAEv2 | 1.35M | – | – | – | – | – | 90.0<sup>‑</sup> | – |
115
 
116
+ <sub>‑ VideoMAEv2 ViT-g: K400 top-1 after **full fine-tuning**, not the frozen attentive-probe protocol used for the other rows.</sub>
 
 
 
 
 
 
 
117
 
118
+ Motif sets a new **state of the art on DAVIS video segmentation**, leading at every resolution
119
+ (74.0 / 80.5 / 83.5 J&F), and stays **competitive across the remaining image and video
120
+ benchmarks** β€” despite training on only **~0.5B samples**, roughly **1/3 of DINOv3's data**.
121
+ KITTI depth is still being evaluated and will be added as the run completes.
 
 
 
 
122
 
123
+ Protocol: DINOv3-style linear/attentive probes for image tasks; V-JEPA 2-style protocol for
124
+ video. Baseline DAVIS / ADE20K / K400 / KITTI figures are taken from the DINOv3 technical
125
+ report's unified evaluation (Tab. 3, 5, 6) and ImageNet from Tab. 7; OpenCLIP and VideoMAEv2
126
+ are not in that report; VideoMAEv2's K400 figure is cited from its own paper (see ‑), and
127
+ OpenCLIP's remaining benchmarks are not reported under a comparable protocol.
128
 
129
  ## License
130
 
131
  Released under the **MIT License** (see `LICENSE`). The model was trained on data governed by the
132
  respective dataset licenses; downstream users are responsible for compliance with those terms.
133
+
134
+ ## Citation
135
+
136
+ ```bibtex
137
+ @misc{motif_vision_encoder,
138
+ title = {Motif Vision Encoder: a unified image/video self-supervised vision encoder},
139
+ author = {Motif Technologies},
140
+ year = {2026},
141
+ howpublished = {\url{https://huggingface.co/Motif-Technologies/Motif-Vision-Encoder-7B}}
142
+ }
143
+ ```
assets/davis_mask_propagation.gif DELETED

Git LFS Details

  • SHA256: 3092d02d65c4bd712ed1f49c3e8732ba8715cc1e28bd60d6575ee89421c70a1f
  • Pointer size: 133 Bytes
  • Size of remote file: 17.4 MB
assets/dense_attention_comparison.png DELETED

Git LFS Details

  • SHA256: 578d395000ee6c909af378f4c7093e74983baeff8870e6885de7103e21761285
  • Pointer size: 132 Bytes
  • Size of remote file: 2.9 MB
assets/haaland_attn_blk20.gif DELETED

Git LFS Details

  • SHA256: 74bdfadd4b22999e7051f6fac7afd002c128c2198f4d9ce9117456c1d4a9a85c
  • Pointer size: 132 Bytes
  • Size of remote file: 2.47 MB
assets/{architecture.png β†’ haaland_full_attn_blk20.gif} RENAMED
File without changes