Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
library_name: transformers.js
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
Converted from [wybxc/DocLayout-YOLO-DocStructBench-onnx](https://huggingface.co/wybxc/DocLayout-YOLO-DocStructBench-onnx)
|
| 6 |
|
|
@@ -31,6 +35,7 @@ const [scaledHeight, scaledWidth] = pixel_values.dims.slice(-2);
|
|
| 31 |
for (const [xc, yc, w, h, ...scores] of permuted.tolist()) {
|
| 32 |
const x1 = (xc / scaledWidth) * image.width;
|
| 33 |
const y1 = (yc / scaledHeight) * image.height;
|
|
|
|
| 34 |
const x2 = (w / scaledWidth) * image.width;
|
| 35 |
const y2 = (h / scaledHeight) * image.height;
|
| 36 |
const score = scores[0];
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
library_name: transformers.js
|
| 4 |
+
tags:
|
| 5 |
+
- DocLayout-yolo
|
| 6 |
+
- transformers.js
|
| 7 |
+
- onnx
|
| 8 |
---
|
| 9 |
Converted from [wybxc/DocLayout-YOLO-DocStructBench-onnx](https://huggingface.co/wybxc/DocLayout-YOLO-DocStructBench-onnx)
|
| 10 |
|
|
|
|
| 35 |
for (const [xc, yc, w, h, ...scores] of permuted.tolist()) {
|
| 36 |
const x1 = (xc / scaledWidth) * image.width;
|
| 37 |
const y1 = (yc / scaledHeight) * image.height;
|
| 38 |
+
|
| 39 |
const x2 = (w / scaledWidth) * image.width;
|
| 40 |
const y2 = (h / scaledHeight) * image.height;
|
| 41 |
const score = scores[0];
|