Xenova HF staff commited on
Commit
d0c64dd
1 Parent(s): c70d1dd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -23,7 +23,6 @@ const depth_estimator = await pipeline('depth-estimation', 'onnx-community/depth
23
  // Predict depth of an image
24
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
25
  const { predicted_depth, depth } = await depth_estimator(url);
26
- depth.save('depth.png');
27
  // {
28
  // predicted_depth: Tensor {
29
  // dims: [ 518, 686 ],
@@ -38,6 +37,9 @@ depth.save('depth.png');
38
  // channels: 1
39
  // }
40
  // }
 
 
 
41
  ```
42
 
43
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61b253b7ac5ecaae3d1efe0c/vfxg_YtHfvna4gZBOCRgD.png)
 
23
  // Predict depth of an image
24
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
25
  const { predicted_depth, depth } = await depth_estimator(url);
 
26
  // {
27
  // predicted_depth: Tensor {
28
  // dims: [ 518, 686 ],
 
37
  // channels: 1
38
  // }
39
  // }
40
+
41
+ // Visualize the output
42
+ depth.save('depth.png');
43
  ```
44
 
45
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61b253b7ac5ecaae3d1efe0c/vfxg_YtHfvna4gZBOCRgD.png)