Add/update the quantized ONNX model files and README.md for Transformers.js v3 (#1)
Browse files- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (34c42fcd2440bc5c8f3c9a9db3baa79b864a8e96)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -8,15 +8,15 @@ https://huggingface.co/nvidia/segformer-b3-finetuned-cityscapes-1024-1024 with O
|
|
| 8 |
|
| 9 |
## Usage (Transformers.js)
|
| 10 |
|
| 11 |
-
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@
|
| 12 |
```bash
|
| 13 |
-
npm i @
|
| 14 |
```
|
| 15 |
|
| 16 |
**Example:** Image segmentation with `Xenova/segformer-b3-finetuned-cityscapes-1024-1024`.
|
| 17 |
|
| 18 |
```js
|
| 19 |
-
import { pipeline } from '@
|
| 20 |
|
| 21 |
// Create an image segmentation pipeline
|
| 22 |
const segmenter = await pipeline('image-segmentation', 'Xenova/segformer-b3-finetuned-cityscapes-1024-1024');
|
|
@@ -24,7 +24,7 @@ const segmenter = await pipeline('image-segmentation', 'Xenova/segformer-b3-fine
|
|
| 24 |
// Segment an image
|
| 25 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cityscapes.png';
|
| 26 |
const output = await segmenter(url);
|
| 27 |
-
console.log(output)
|
| 28 |
// [
|
| 29 |
// {
|
| 30 |
// score: null,
|
|
|
|
| 8 |
|
| 9 |
## Usage (Transformers.js)
|
| 10 |
|
| 11 |
+
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
| 12 |
```bash
|
| 13 |
+
npm i @huggingface/transformers
|
| 14 |
```
|
| 15 |
|
| 16 |
**Example:** Image segmentation with `Xenova/segformer-b3-finetuned-cityscapes-1024-1024`.
|
| 17 |
|
| 18 |
```js
|
| 19 |
+
import { pipeline } from '@huggingface/transformers';
|
| 20 |
|
| 21 |
// Create an image segmentation pipeline
|
| 22 |
const segmenter = await pipeline('image-segmentation', 'Xenova/segformer-b3-finetuned-cityscapes-1024-1024');
|
|
|
|
| 24 |
// Segment an image
|
| 25 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cityscapes.png';
|
| 26 |
const output = await segmenter(url);
|
| 27 |
+
console.log(output);
|
| 28 |
// [
|
| 29 |
// {
|
| 30 |
// score: null,
|