mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-12 20:11:20 +08:00
[Doc] add readme for js packages (#421)
* add contributor * add package readme * refine ocr readme * refine ocr readme
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
[中文版](./README_cn.md)
|
||||
|
||||
# mobilenet
|
||||
|
||||
mobilenet model can classify img. It provides simple interfaces to use. You can use your own category model to classify img.
|
||||
|
||||
<img src="https://img.shields.io/npm/v/@paddle-js-models/mobilenet?color=success" alt="version"> <img src="https://img.shields.io/bundlephobia/min/@paddle-js-models/mobilenet" alt="size"> <img src="https://img.shields.io/npm/dm/@paddle-js-models/mobilenet?color=orange" alt="downloads"> <img src="https://img.shields.io/npm/dt/@paddle-js-models/mobilenet" alt="downloads">
|
||||
|
||||
# Usage
|
||||
|
||||
```js
|
||||
import * as mobilenet from '@paddle-js-models/mobilenet';
|
||||
// You need to specify your model path and the binary file count
|
||||
// If your has mean and std params, you need to specify them.
|
||||
// map is the results your model can classify.
|
||||
await mobilenet.load({
|
||||
path,
|
||||
mean: [0.485, 0.456, 0.406],
|
||||
std: [0.229, 0.224, 0.225]
|
||||
}, map);
|
||||
// get the result the mobilenet model classified.
|
||||
const res = await mobilenet.classify(img);
|
||||
```
|
||||
|
||||
# Online experience
|
||||
|
||||
mobileNet:https://paddlejs.baidu.com/mobilenet
|
||||
|
||||
wine:https://paddlejs.baidu.com/wine
|
||||
|
||||
# Performance
|
||||
<img alt="image" src="https://user-images.githubusercontent.com/43414102/156393394-ab1c9e4d-2960-4fcd-ba22-2072fa9b0e9d.png">
|
@@ -0,0 +1,31 @@
|
||||
[English](./README.md)
|
||||
|
||||
# mobilenet
|
||||
|
||||
mobilenet 模型可以对图片进行分类,提供的接口简单,使用者传入自己的分类模型去分类。
|
||||
|
||||
<img src="https://img.shields.io/npm/v/@paddle-js-models/mobilenet?color=success" alt="version"> <img src="https://img.shields.io/bundlephobia/min/@paddle-js-models/mobilenet" alt="size"> <img src="https://img.shields.io/npm/dm/@paddle-js-models/mobilenet?color=orange" alt="downloads"> <img src="https://img.shields.io/npm/dt/@paddle-js-models/mobilenet" alt="downloads">
|
||||
|
||||
# 使用
|
||||
|
||||
```js
|
||||
import * as mobilenet from '@paddle-js-models/mobilenet';
|
||||
// 使用者需要提供分类模型的地址和二进制参数文件个数,且二进制参数文件,参考 chunk_1.dat、chunk_2.dat,...
|
||||
// 模型参数支持 mean 和 std。如果没有,则不需要传
|
||||
// 还需要传递分类映射文件
|
||||
await mobilenet.load({
|
||||
path,
|
||||
mean: [0.485, 0.456, 0.406],
|
||||
std: [0.229, 0.224, 0.225]
|
||||
}, map);
|
||||
// 获取图片分类结果
|
||||
const res = await mobilenet.classify(img);
|
||||
```
|
||||
# 在线体验
|
||||
|
||||
1000物品识别:https://paddlejs.baidu.com/mobilenet
|
||||
|
||||
酒瓶识别:https://paddlejs.baidu.com/wine
|
||||
|
||||
# 效果
|
||||
<img alt="image" src="https://user-images.githubusercontent.com/43414102/156393394-ab1c9e4d-2960-4fcd-ba22-2072fa9b0e9d.png">
|
Reference in New Issue
Block a user