diff --git a/web/src/feed/README.md b/web/src/feed/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b9afe0541756bd81d719d700a221f38aa450e42a --- /dev/null +++ b/web/src/feed/README.md @@ -0,0 +1,36 @@ +[中文版](./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) diff --git a/web/src/feed/README_cn.md b/web/src/feed/README_cn.md new file mode 100644 index 0000000000000000000000000000000000000000..a0f34d7a41c7d009a6057bae1e0fd837bb728ee3 --- /dev/null +++ b/web/src/feed/README_cn.md @@ -0,0 +1,38 @@ +# 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) diff --git a/web/src/loader/README.md b/web/src/loader/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b9afe0541756bd81d719d700a221f38aa450e42a --- /dev/null +++ b/web/src/loader/README.md @@ -0,0 +1,36 @@ +[中文版](./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) diff --git a/web/src/loader/README_cn.md b/web/src/loader/README_cn.md new file mode 100644 index 0000000000000000000000000000000000000000..a0f34d7a41c7d009a6057bae1e0fd837bb728ee3 --- /dev/null +++ b/web/src/loader/README_cn.md @@ -0,0 +1,38 @@ +# 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) diff --git a/web/src/paddle/README.md b/web/src/paddle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b9afe0541756bd81d719d700a221f38aa450e42a --- /dev/null +++ b/web/src/paddle/README.md @@ -0,0 +1,36 @@ +[中文版](./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) diff --git a/web/src/paddle/README_cn.md b/web/src/paddle/README_cn.md new file mode 100644 index 0000000000000000000000000000000000000000..a0f34d7a41c7d009a6057bae1e0fd837bb728ee3 --- /dev/null +++ b/web/src/paddle/README_cn.md @@ -0,0 +1,38 @@ +# 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) diff --git a/web/test/README.md b/web/test/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3cdaf95ee6c5c0393150e337ab947c43225c951e --- /dev/null +++ b/web/test/README.md @@ -0,0 +1,26 @@ +[中文版](./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 diff --git a/web/test/README_cn.md b/web/test/README_cn.md index ef10c63bca928ced79fc6ec5091afd1b51d98d72..a6d8b7238cca2f8b0d63b511ddd3831f2a33f7fe 100644 --- a/web/test/README_cn.md +++ b/web/test/README_cn.md @@ -1,38 +1,26 @@ -# 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