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 (a66a8b2879df8d3c41668ebc7fac5e61d03e8b0e)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
README.md
CHANGED
@@ -10,15 +10,15 @@ https://github.com/open-mmlab/mmpose/tree/main/projects/rtmo with ONNX weights t
|
|
10 |
|
11 |
## Usage (Transformers.js)
|
12 |
|
13 |
-
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/@
|
14 |
```bash
|
15 |
-
npm i @
|
16 |
```
|
17 |
|
18 |
**Example:** Perform pose-estimation w/ `Xenova/RTMO-m`.
|
19 |
|
20 |
```js
|
21 |
-
import { AutoModel, AutoProcessor, RawImage } from '@
|
22 |
|
23 |
// Load model and processor
|
24 |
const model_id = 'Xenova/RTMO-m';
|
@@ -57,7 +57,7 @@ for (let i = 0; i < predicted_boxes.length; ++i) {
|
|
57 |
const x2 = (xmax * xScale).toFixed(2);
|
58 |
const y2 = (ymax * yScale).toFixed(2);
|
59 |
|
60 |
-
console.log(`Found person at [${x1}, ${y1}, ${x2}, ${y2}] with score ${box_score.toFixed(3)}`)
|
61 |
const points = predicted_points[i]; // of shape [17, 3]
|
62 |
for (let id = 0; id < points.length; ++id) {
|
63 |
const label = model.config.id2label[id];
|
|
|
10 |
|
11 |
## Usage (Transformers.js)
|
12 |
|
13 |
+
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:
|
14 |
```bash
|
15 |
+
npm i @huggingface/transformers
|
16 |
```
|
17 |
|
18 |
**Example:** Perform pose-estimation w/ `Xenova/RTMO-m`.
|
19 |
|
20 |
```js
|
21 |
+
import { AutoModel, AutoProcessor, RawImage } from '@huggingface/transformers';
|
22 |
|
23 |
// Load model and processor
|
24 |
const model_id = 'Xenova/RTMO-m';
|
|
|
57 |
const x2 = (xmax * xScale).toFixed(2);
|
58 |
const y2 = (ymax * yScale).toFixed(2);
|
59 |
|
60 |
+
console.log(`Found person at [${x1}, ${y1}, ${x2}, ${y2}] with score ${box_score.toFixed(3)}`);
|
61 |
const points = predicted_points[i]; // of shape [17, 3]
|
62 |
for (let id = 0; id < points.length; ++id) {
|
63 |
const label = model.config.id2label[id];
|