Update README.md (#1)

- Update README.md (a05eabcb1201e0b0e8a27a19fc5c40cba20ffa0c)


Co-authored-by: Younes Belkada <ybelkada@users.noreply.huggingface.co>
This commit is contained in:
Eliott Coyac 2022-12-07 15:49:50 +00:00 committed by system
parent 3c2f35027e
commit 4e7800c256
1 changed files with 1 additions and 1 deletions

View File

@ -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).