From 0c5eb2c8605b1e84cffda415a09351bf32d7ad2e Mon Sep 17 00:00:00 2001 From: Niels Rogge Date: Tue, 6 Dec 2022 08:17:10 +0000 Subject: [PATCH] fix a typo in code snippet (#2) - fix a typo in code snippet (1dda034dcd582d8543274e87bb9602ce4ec99c94) Co-authored-by: Fatih --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c742a7..e34be95 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ You can use the raw model for video classification into one of the 400 possible Here is how to use this model to classify a video: ```python -from transformers import TimesformerFeatureExtractor, TimesformerForVideoClassification +from transformers import VideoMAEFeatureExtractor, TimesformerForVideoClassification import numpy as np import torch video = list(np.random.randn(8, 3, 224, 224)) -feature_extractor = TimesformerFeatureExtractor.from_pretrained("facebook/timesformer-base-finetuned-k400") +feature_extractor = VideoMAEFeatureExtractor.from_pretrained("MCG-NJU/videomae-base-finetuned-kinetics") model = TimesformerForVideoClassification.from_pretrained("facebook/timesformer-base-finetuned-k400") inputs = feature_extractor(video, return_tensors="pt")