Update README.md (#1)
- Update README.md (a05eabcb1201e0b0e8a27a19fc5c40cba20ffa0c) Co-authored-by: Younes Belkada <ybelkada@users.noreply.huggingface.co>
This commit is contained in:
parent
3c2f35027e
commit
4e7800c256
|
@ -64,13 +64,13 @@ prediction = torch.nn.functional.interpolate(
|
||||||
mode="bicubic",
|
mode="bicubic",
|
||||||
align_corners=False,
|
align_corners=False,
|
||||||
)
|
)
|
||||||
```
|
|
||||||
|
|
||||||
# visualize the prediction
|
# visualize the prediction
|
||||||
output = prediction.squeeze().cpu().numpy()
|
output = prediction.squeeze().cpu().numpy()
|
||||||
formatted = (output * 255 / np.max(output)).astype("uint8")
|
formatted = (output * 255 / np.max(output)).astype("uint8")
|
||||||
depth = Image.fromarray(formatted)
|
depth = Image.fromarray(formatted)
|
||||||
depth.show()
|
depth.show()
|
||||||
|
```
|
||||||
|
|
||||||
For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/dpt).
|
For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/dpt).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue