Video Classification
Transformers
Safetensors
ttvidt
feature-extraction
video
video-representation-learning
self-supervised-learning
motion
temporal-modeling
dinov3
vision-transformer
custom_code
Eval Results (legacy)
Instructions to use KBlueLeaf/TTVidT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KBlueLeaf/TTVidT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("video-classification", model="KBlueLeaf/TTVidT", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KBlueLeaf/TTVidT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model card: repo id
Browse files
README.md
CHANGED
|
@@ -27,7 +27,7 @@ With `transformers` only:
|
|
| 27 |
import torch
|
| 28 |
from transformers import AutoModel
|
| 29 |
|
| 30 |
-
model = AutoModel.from_pretrained("
|
| 31 |
video = torch.rand(1, 8, 3, 256, 256, device="cuda") * 2 - 1 # [B, T, C, H, W], pixels in [-1, 1]
|
| 32 |
with torch.no_grad(), torch.autocast("cuda", dtype=torch.float16):
|
| 33 |
motion = model(video).motion_output # [B, T, 1, 768]
|
|
@@ -38,7 +38,7 @@ With the TT-VidT repository:
|
|
| 38 |
```python
|
| 39 |
from ttvidt.hub import load_model
|
| 40 |
|
| 41 |
-
model = load_model("
|
| 42 |
motion = model.encoder(video).motion_output
|
| 43 |
```
|
| 44 |
|
|
|
|
| 27 |
import torch
|
| 28 |
from transformers import AutoModel
|
| 29 |
|
| 30 |
+
model = AutoModel.from_pretrained("KBlueLeaf/TTVidT", trust_remote_code=True).cuda().eval()
|
| 31 |
video = torch.rand(1, 8, 3, 256, 256, device="cuda") * 2 - 1 # [B, T, C, H, W], pixels in [-1, 1]
|
| 32 |
with torch.no_grad(), torch.autocast("cuda", dtype=torch.float16):
|
| 33 |
motion = model(video).motion_output # [B, T, 1, 768]
|
|
|
|
| 38 |
```python
|
| 39 |
from ttvidt.hub import load_model
|
| 40 |
|
| 41 |
+
model = load_model("KBlueLeaf/TTVidT", device="cuda")
|
| 42 |
motion = model.encoder(video).motion_output
|
| 43 |
```
|
| 44 |
|