nielsr HF staff commited on
Commit
0dea0db
1 Parent(s): a2ecf56

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -28,14 +28,14 @@ You can use the raw model for predicting pixel values for masked patches of a vi
28
  Here is how to use this model to predict pixel values for randomly masked patches:
29
 
30
  ```python
31
- from transformers import VideoMAEFeatureExtractor, VideoMAEForPreTraining
32
  import numpy as np
33
  import torch
34
 
35
  num_frames = 16
36
  video = list(np.random.randn(16, 3, 224, 224))
37
 
38
- feature_extractor = VideoMAEFeatureExtractor.from_pretrained("MCG-NJU/videomae-base")
39
  model = VideoMAEForPreTraining.from_pretrained("MCG-NJU/videomae-base")
40
 
41
  pixel_values = feature_extractor(video, return_tensors="pt").pixel_values
 
28
  Here is how to use this model to predict pixel values for randomly masked patches:
29
 
30
  ```python
31
+ from transformers import VideoMAEImageProcessor, VideoMAEForPreTraining
32
  import numpy as np
33
  import torch
34
 
35
  num_frames = 16
36
  video = list(np.random.randn(16, 3, 224, 224))
37
 
38
+ processor = VideoMAEImageProcessor.from_pretrained("MCG-NJU/videomae-base")
39
  model = VideoMAEForPreTraining.from_pretrained("MCG-NJU/videomae-base")
40
 
41
  pixel_values = feature_extractor(video, return_tensors="pt").pixel_values