[Doc] add readme for js packages (#421)

* add contributor

* add package readme

* refine ocr readme

* refine ocr readme
This commit is contained in:
Double_V
2022-10-24 16:18:00 +08:00
committed by GitHub
parent 828a81d81c
commit a823d4eebf
14 changed files with 715 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
[中文版](./README_cn.md)
# detect
detect model is used to detect the position of label frame in the image.
<img src="https://img.shields.io/npm/v/@paddle-js-models/detect?color=success" alt="version"> <img src="https://img.shields.io/bundlephobia/min/@paddle-js-models/detect" alt="size"> <img src="https://img.shields.io/npm/dm/@paddle-js-models/detect?color=orange" alt="downloads"> <img src="https://img.shields.io/npm/dt/@paddle-js-models/detect" alt="downloads">
# Usage
```js
import * as det from '@paddle-js-models/detect';
// Load model
await det.load();
// Get label index, confidence and coordinates
const res = await det.detect(img);
res.forEach(item => {
// Get label index
console.log(item[0]);
// Get label confidence
console.log(item[1]);
// Get label left coordinates
console.log(item[2]);
// Get label top coordinates
console.log(item[3]);
// Get label right coordinates
console.log(item[4]);
// Get label bottom coordinates
console.log(item[5]);
});
```
# effect
![img.png](https://user-images.githubusercontent.com/43414102/153805288-80f289bf-ca92-4788-b1dd-44854681a03f.png)

View File

@@ -0,0 +1,38 @@
[English](./README.md)
# detect
detect模型用于检测图像中label框选位置。
<img src="https://img.shields.io/npm/v/@paddle-js-models/detect?color=success" alt="version"> <img src="https://img.shields.io/bundlephobia/min/@paddle-js-models/detect" alt="size"> <img src="https://img.shields.io/npm/dm/@paddle-js-models/detect?color=orange" alt="downloads"> <img src="https://img.shields.io/npm/dt/@paddle-js-models/detect" alt="downloads">
# 使用
```js
import * as det from '@paddle-js-models/detect';
// 模型加载
await det.load();
// 获取label对应索引、置信度、检测框选坐标
const res = await det.detect(img);
res.forEach(item => {
// 获取label对应索引
console.log(item[0]);
// 获取label置信度
console.log(item[1]);
// 获取检测框选left顶点
console.log(item[2]);
// 获取检测框选top顶点
console.log(item[3]);
// 获取检测框选right顶点
console.log(item[4]);
// 获取检测框选bottom顶点
console.log(item[5]);
});
```
# 效果
![img.png](https://user-images.githubusercontent.com/43414102/153805288-80f289bf-ca92-4788-b1dd-44854681a03f.png)