Xenova HF staff commited on
Commit
2d94b31
1 Parent(s): 1d41393

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -12,7 +12,7 @@ If you haven't already, you can install the [Transformers.js](https://huggingfac
12
  npm i @huggingface/transformers
13
  ```
14
 
15
- **Example:** Face segmentation with `onnx-community/maskformer-resnet101-ade20k-full`.
16
 
17
  ```js
18
  import { pipeline } from '@huggingface/transformers';
@@ -21,18 +21,18 @@ import { pipeline } from '@huggingface/transformers';
21
  const segmenter = await pipeline('image-segmentation', 'onnx-community/maskformer-resnet101-ade20k-full');
22
 
23
  // Segment an image
24
- const url = 'http://images.cocodataset.org/val2017/000000039769.jpg';
25
  const output = await segmenter(url);
26
  console.log(output)
27
  // [
28
  // {
29
- // score: 0.9626941680908203,
30
- // label: 'couch',
31
  // mask: RawImage { ... }
32
  // },
33
  // {
34
- // score: 0.9967071413993835,
35
- // label: 'cat',
36
  // mask: RawImage { ... }
37
  // },
38
  // ...
 
12
  npm i @huggingface/transformers
13
  ```
14
 
15
+ **Example:** Scene segmentation with `onnx-community/maskformer-resnet101-ade20k-full`.
16
 
17
  ```js
18
  import { pipeline } from '@huggingface/transformers';
 
21
  const segmenter = await pipeline('image-segmentation', 'onnx-community/maskformer-resnet101-ade20k-full');
22
 
23
  // Segment an image
24
+ const url = 'https://huggingface.co/datasets/hf-internal-testing/fixtures_ade20k/resolve/main/ADE_val_00000001.jpg';
25
  const output = await segmenter(url);
26
  console.log(output)
27
  // [
28
  // {
29
+ // score: 0.9240802526473999,
30
+ // label: 'plant',
31
  // mask: RawImage { ... }
32
  // },
33
  // {
34
+ // score: 0.967036783695221,
35
+ // label: 'house',
36
  // mask: RawImage { ... }
37
  // },
38
  // ...