提交 f2fabe99 编写于 作者: W wangqun

[doc] paddle.js unit tests

[doc] paddle.js unit tests
上级 124cd5bd
[中文版](./README_cn.md)
# PaddleJS Examples
Baidu paddlejs uses the ready-made JavaScript model or transforms the paddle model to run in the browser.
## Demonstration
At present, tiny Yolo model can run within 30ms for web project, which is enough for general real-time scenarios.
## Browser coverage
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
## Building deployment
```bash
cd web # Go to root
npm i # Installation dependency
mkdir dist # Create resource directory
cd dist # Enter resource directory
git clone https://github.com/DerekYangMing/Paddle-Web-Models.git # Get models
mv Paddle-Web-Models/separablemodel . # Move the model to the designated location
cd .. # Root directory
npm run tinyYolo # run tinyYolo
```
## Preview
1. Open url: https://localhost:端口号/
2. Click the upload picture button。
## Result
![image](./tinyYolo/demoshow.png)
# PaddleJS Examples
百度PaddleJS使用现成的 JavaScript 模型或转换 Paddle 模型以在浏览器中运行。
## 演示
目前Web项目运行TinyYolo模型可以达到30ms以内,对于一般的实时场景已经足够应对。
### 模块化
## 浏览器覆盖面
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
## 构建部署
```bash
cd web # 进入根目录
npm i # 安装依赖
mkdir dist # 创建资源目录
cd dist # 进入资源目录
git clone https://github.com/DerekYangMing/Paddle-Web-Models.git # 获取模型
mv Paddle-Web-Models/separablemodel . # 移动模型到制定地点
cd .. # 返回根目录
npm run tinyYolo # 启动 tinyYolo 在线推理服务
```
## 如何预览 demo
1. 在浏览器中打开url: https://localhost:端口号/
2. 点击【开始检测】按钮。
3. 将人脸对准摄像头,没有问题的话,可以正常检测到人脸。
## 效果
![image](./tinyYolo/demoshow.png)
[中文版](./README_cn.md)
# PaddleJS Examples
Baidu paddlejs uses the ready-made JavaScript model or transforms the paddle model to run in the browser.
## Demonstration
At present, tiny Yolo model can run within 30ms for web project, which is enough for general real-time scenarios.
## Browser coverage
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
## Building deployment
```bash
cd web # Go to root
npm i # Installation dependency
mkdir dist # Create resource directory
cd dist # Enter resource directory
git clone https://github.com/DerekYangMing/Paddle-Web-Models.git # Get models
mv Paddle-Web-Models/separablemodel . # Move the model to the designated location
cd .. # Root directory
npm run tinyYolo # run tinyYolo
```
## Preview
1. Open url: https://localhost:端口号/
2. Click the upload picture button。
## Result
![image](./tinyYolo/demoshow.png)
# PaddleJS Examples
百度PaddleJS使用现成的 JavaScript 模型或转换 Paddle 模型以在浏览器中运行。
## 演示
目前Web项目运行TinyYolo模型可以达到30ms以内,对于一般的实时场景已经足够应对。
### 模块化
## 浏览器覆盖面
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
## 构建部署
```bash
cd web # 进入根目录
npm i # 安装依赖
mkdir dist # 创建资源目录
cd dist # 进入资源目录
git clone https://github.com/DerekYangMing/Paddle-Web-Models.git # 获取模型
mv Paddle-Web-Models/separablemodel . # 移动模型到制定地点
cd .. # 返回根目录
npm run tinyYolo # 启动 tinyYolo 在线推理服务
```
## 如何预览 demo
1. 在浏览器中打开url: https://localhost:端口号/
2. 点击【开始检测】按钮。
3. 将人脸对准摄像头,没有问题的话,可以正常检测到人脸。
## 效果
![image](./tinyYolo/demoshow.png)
[中文版](./README_cn.md)
# PaddleJS Examples
Baidu paddlejs uses the ready-made JavaScript model or transforms the paddle model to run in the browser.
## Demonstration
At present, tiny Yolo model can run within 30ms for web project, which is enough for general real-time scenarios.
## Browser coverage
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
## Building deployment
```bash
cd web # Go to root
npm i # Installation dependency
mkdir dist # Create resource directory
cd dist # Enter resource directory
git clone https://github.com/DerekYangMing/Paddle-Web-Models.git # Get models
mv Paddle-Web-Models/separablemodel . # Move the model to the designated location
cd .. # Root directory
npm run tinyYolo # run tinyYolo
```
## Preview
1. Open url: https://localhost:端口号/
2. Click the upload picture button。
## Result
![image](./tinyYolo/demoshow.png)
# PaddleJS Examples
百度PaddleJS使用现成的 JavaScript 模型或转换 Paddle 模型以在浏览器中运行。
## 演示
目前Web项目运行TinyYolo模型可以达到30ms以内,对于一般的实时场景已经足够应对。
### 模块化
## 浏览器覆盖面
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
## 构建部署
```bash
cd web # 进入根目录
npm i # 安装依赖
mkdir dist # 创建资源目录
cd dist # 进入资源目录
git clone https://github.com/DerekYangMing/Paddle-Web-Models.git # 获取模型
mv Paddle-Web-Models/separablemodel . # 移动模型到制定地点
cd .. # 返回根目录
npm run tinyYolo # 启动 tinyYolo 在线推理服务
```
## 如何预览 demo
1. 在浏览器中打开url: https://localhost:端口号/
2. 点击【开始检测】按钮。
3. 将人脸对准摄像头,没有问题的话,可以正常检测到人脸。
## 效果
![image](./tinyYolo/demoshow.png)
[中文版](./README_cn.md)
# PaddleJS Tests
Unit and functional tests for Baidu paddle.js can be found in this section.
## Basic Usage
Run npm run testunits after having run the install, the target operator execution can be specified, and the correctness of the operator execution can be judged according to the test cases of input and calculation output.
```bash
cd web # Go to root
npm i # Installation dependency
mkdir dist # Create resource directory
cd dist # Enter resource directory
git clone testunits # Get test unit data
mv testunits dist # Move the unit datas to the resource directory
npm run testunits # run testunits
```
## Browser coverage
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
\ No newline at end of file
# PaddleJS Examples
# PaddleJS 单元测试
百度PaddleJS使用现成的 JavaScript 模型或转换 Paddle 模型以在浏览器中运行
百度 PaddleJS 的单元和功能测试可以在本部分实现
## 演示
## 基本用法
目前Web项目运行TinyYolo模型可以达到30ms以内,对于一般的实时场景已经足够应对。
### 模块化
## 浏览器覆盖面
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
## 构建部署
执行 npm run testunits 可以指定目标算子执行,根据输入和计算输出的测试用例判断算子执行正确性。
```bash
cd web # 进入根目录
npm i # 安装依赖
mkdir dist # 创建资源目录
cd dist # 进入资源目录
git clone https://github.com/DerekYangMing/Paddle-Web-Models.git # 获取模型
mv Paddle-Web-Models/separablemodel . # 移动模型到制定地点
git clone testnuits # 获取模型
mv testnuits dist # 移动单元测试数据移动到指定地点
cd .. # 返回根目录
npm run tinyYolo # 启动 tinyYolo 在线推理服务
```
npm run testunits # 启动 testunits 单元测试
## 如何预览 demo
```
1. 在浏览器中打开url: https://localhost:8123/
2. 点击【开始检测】按钮。
3. 将人脸对准摄像头,没有问题的话,可以正常检测到人脸。
## 效果
## 浏览器覆盖面
![image](./tinyYolo/demoshow.png)
* PC: Chrome
* Mac: Chrome
* Android: Baidu App and QQ Browser
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册