Instructions to use qubvel-hf/vjepa2-vitl-fpc16-256-ssv2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qubvel-hf/vjepa2-vitl-fpc16-256-ssv2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("video-classification", model="qubvel-hf/vjepa2-vitl-fpc16-256-ssv2")# Load model directly from transformers import AutoTokenizer, AutoModelForVideoClassification tokenizer = AutoTokenizer.from_pretrained("qubvel-hf/vjepa2-vitl-fpc16-256-ssv2") model = AutoModelForVideoClassification.from_pretrained("qubvel-hf/vjepa2-vitl-fpc16-256-ssv2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -44,7 +44,6 @@ model = AutoModelForVideoClassification.from_pretrained(hf_repo).to(device)
|
|
| 44 |
processor = AutoVideoProcessor.from_pretrained(hf_repo)
|
| 45 |
|
| 46 |
# To load a video, sample the number of frames according to the model.
|
| 47 |
-
# For this model, we use 64.
|
| 48 |
video_url = "https://huggingface.co/datasets/nateraw/kinetics-mini/resolve/main/val/bowling/-WH-lxmGJVY_000005_000015.mp4"
|
| 49 |
vr = VideoDecoder(video_url)
|
| 50 |
frame_idx = np.arange(0, model.config.frames_per_clip, 8) # you can define more complex sampling strategy
|
|
|
|
| 44 |
processor = AutoVideoProcessor.from_pretrained(hf_repo)
|
| 45 |
|
| 46 |
# To load a video, sample the number of frames according to the model.
|
|
|
|
| 47 |
video_url = "https://huggingface.co/datasets/nateraw/kinetics-mini/resolve/main/val/bowling/-WH-lxmGJVY_000005_000015.mp4"
|
| 48 |
vr = VideoDecoder(video_url)
|
| 49 |
frame_idx = np.arange(0, model.config.frames_per_clip, 8) # you can define more complex sampling strategy
|