nielsr HF staff commited on
Commit
633307c
1 Parent(s): 9584bdd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -28,16 +28,16 @@ You can use the raw model for video classification into one of the 400 possible
28
  Here is how to use this model to classify a video:
29
 
30
  ```python
31
- from transformers import VideoMAEFeatureExtractor, VideoMAEForVideoClassification
32
  import numpy as np
33
  import torch
34
 
35
  video = list(np.random.randn(16, 3, 224, 224))
36
 
37
- feature_extractor = VideoMAEFeatureExtractor.from_pretrained("MCG-NJU/videomae-base-short-finetuned-kinetics")
38
  model = VideoMAEForVideoClassification.from_pretrained("MCG-NJU/videomae-base-short-finetuned-kinetics")
39
 
40
- inputs = feature_extractor(video, return_tensors="pt")
41
 
42
  with torch.no_grad():
43
  outputs = model(**inputs)
 
28
  Here is how to use this model to classify a video:
29
 
30
  ```python
31
+ from transformers import VideoMAEImageProcessor, VideoMAEForVideoClassification
32
  import numpy as np
33
  import torch
34
 
35
  video = list(np.random.randn(16, 3, 224, 224))
36
 
37
+ processor = VideoMAEImageProcessor.from_pretrained("MCG-NJU/videomae-base-short-finetuned-kinetics")
38
  model = VideoMAEForVideoClassification.from_pretrained("MCG-NJU/videomae-base-short-finetuned-kinetics")
39
 
40
+ inputs = processor(video, return_tensors="pt")
41
 
42
  with torch.no_grad():
43
  outputs = model(**inputs)