nielsr HF staff commited on
Commit
fb1e058
1 Parent(s): 8a7c512

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
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("sandstorm12/videomae-huge-finetuned-kinetics")
38
- model = VideoMAEForVideoClassification.from_pretrained("sandstorm12/videomae-huge-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-huge-finetuned-kinetics")
38
+ model = VideoMAEForVideoClassification.from_pretrained("MCG-NJU/videomae-huge-finetuned-kinetics")
39
 
40
+ inputs = processor(video, return_tensors="pt")
41
 
42
  with torch.no_grad():
43
  outputs = model(**inputs)