Update README.md
Browse files
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
|
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 |
-
|
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
|