Files
FastDeploy/examples/vision/classification/paddleclas/web
Double_V 0a22979c35 [Model] add Paddle.js web demo (#392)
* add application include paddle.js web demo and xcx

* cp PR #5

* add readme

* fix comments and link

* fix xcx readme

* fix Task 1

* fix bugs

* refine readme

* delete ocrxcx readme

* refine readme

* fix bugs

* delete old readme

* 200px to 300px

* revert 200px to 300px

Co-authored-by: Jason <jiangjiajun@baidu.com>
2022-10-20 17:01:38 +08:00
..

PP-OCRv3 前端部署示例

本节介绍部署PaddleClas的图像分类mobilenet模型在浏览器中运行以及@paddle-js-models/mobilenet npm包中的js接口。

前端部署图像分类模型

图像分类模型web demo使用参考文档

PP-OCRv3 js接口

import * as mobilenet from "@paddle-js-models/mobilenet";
# mobilenet模型加载和初始化
await mobilenet.load()
# mobilenet模型执行预测并获得分类的类别
const res = await mobilenet.classify(img);
console.log(res);

load()函数参数

classify()函数参数

  • img(HTMLImageElement): 输入图像参数类型为HTMLImageElement。

其它文档