Update README.md
Browse files
README.md
CHANGED
|
@@ -41,12 +41,13 @@ license: mit
|
|
| 41 |
## Model Usage
|
| 42 |
```python
|
| 43 |
from torchvision.transforms.functional import to_tensor
|
| 44 |
-
|
|
|
|
| 45 |
|
| 46 |
model = MicronFlow().eval()
|
| 47 |
-
frame1 = to_tensor(image1).unsqueeze(0)
|
| 48 |
frame2 = to_tensor(image2).unsqueeze(0)
|
| 49 |
-
flow = model(frame1, frame2)
|
| 50 |
```
|
| 51 |
|
| 52 |
## License
|
|
|
|
| 41 |
## Model Usage
|
| 42 |
```python
|
| 43 |
from torchvision.transforms.functional import to_tensor
|
| 44 |
+
|
| 45 |
+
# load the model from the .pth file
|
| 46 |
|
| 47 |
model = MicronFlow().eval()
|
| 48 |
+
frame1 = to_tensor(image1).unsqueeze(0)
|
| 49 |
frame2 = to_tensor(image2).unsqueeze(0)
|
| 50 |
+
flow = model(frame1, frame2)
|
| 51 |
```
|
| 52 |
|
| 53 |
## License
|