Run this model with HF Jobs
Run MCG-NJU/videomae-large on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/MCG-NJU/videomae-large. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/MCG-NJU/videomae-large on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use MCG-NJU/videomae-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MCG-NJU/videomae-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("video-classification", model="MCG-NJU/videomae-large")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForPreTraining processor = AutoImageProcessor.from_pretrained("MCG-NJU/videomae-large") model = AutoModelForPreTraining.from_pretrained("MCG-NJU/videomae-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files27 unmodified lines282930313233343536373839404142434427 unmodified linesHere is how to use this model to predict pixel values for randomly masked patches:```pythonfrom transformers import VideoMAEFeatureExtractor, VideoMAEForPreTrainingimport numpy as npimport torchnum_frames = 16video = list(np.random.randn(16, 3, 224, 224))feature_extractor = VideoMAEFeatureExtractor.from_pretrained("MCG-NJU/videomae-large")model = VideoMAEForPreTraining.from_pretrained("MCG-NJU/videomae-large")pixel_values = feature_extractor(video, return_tensors="pt").pixel_valuesnum_patches_per_frame = (model.config.image_size // model.config.patch_size) ** 2seq_length = (num_frames // model.config.tubelet_size) * num_patches_per_frame27 unmodified lines282930313233343536373839404142434427 unmodified linesHere is how to use this model to predict pixel values for randomly masked patches:```pythonfrom transformers import VideoMAEImageProcessor, VideoMAEForPreTrainingimport numpy as npimport torchnum_frames = 16video = list(np.random.randn(16, 3, 224, 224))processor = VideoMAEImageProcessor.from_pretrained("MCG-NJU/videomae-large")model = VideoMAEForPreTraining.from_pretrained("MCG-NJU/videomae-large")pixel_values = processor(video, return_tensors="pt").pixel_valuesnum_patches_per_frame = (model.config.image_size // model.config.patch_size) ** 2seq_length = (num_frames // model.config.tubelet_size) * num_patches_per_frame
README.md+3-3