Paddle.js Versions Save

Paddle.js is a web project for Baidu PaddlePaddle, which is an open source deep learning framework running in the browser. Paddle.js can either load a pre-trained model, or transforming a model from paddle-hub with model transforming tools provided by Paddle.js. It could run in every browser with WebGL/WebGPU/WebAssembly supported. It could also run in Baidu Smartprogram and WX miniprogram.

v2.1.0

2 years ago

@paddlejs/paddlejs-core (2.0.1 => 2.1.0)

Features

  • Support multi-model case.
  • Support users to register custom op, users can insert custom op to change the model structure through tranformer plugins.
  • Upgrade OpExecutor to extend the uniform field to support passing values for uniform variables in operators' shader program.
  • Support WeChat Mini Program environment.
  • Upgrade tensor to extend the interpType field to support configurable data interpolation type(LINEAR or NEAREST, default is NEAREST) when use webgl backend.
  • Distinguish whether model pre-processing is performed in the CPU or in the GPU through env flag(webgl_gpu_pipeline or webgl_feed_process)

Upgrade

  • Migrate data preprocessing NCHW2NHWC operations to offline conversion.

@paddlejs/paddlejs-backend-webgl (1.0.1 => 1.1.0)

Features

  • Add 11 new operators.
  • Support custom webgl context.
  • Feature map texture support HALF_FLOAT.
  • Support rendering output texture to an on-screen color buffer.

Upgrade

  • Optimize cacheTexture to reduce redundant texture generation and resource usage.

Converter

Features

  • Support inferring shape.
  • Support transpose weight data layout from NCHW to NHWC.

Upgrade

Optimize model structure and reduce redundant model parameters.

models

  • Support ocr_detect model.
  • Support gesture model (multi_model case).
  • Upgrade humanseg model to support two models info(398x224 and 288x160), support gpu_pipeline, optimize total time to 18.8ms, 60.2% performance improvement.

v2.0.1

3 years ago

Core (2.0.0 => 2.0.1)

Features

  • Support multiple inputs and outputs cases.

Webgl (1.0.0 => 1.0.1)

Features

  • Add connect op to match the support of multipul outputs cases.

Bug fixes

  • Fix axis calculation in ops of elementwise_*, unsquenze2.

Converter

Features

  • Support multiple outputs cases and shape inferring.

v2.0.0

3 years ago

2.0.0 Release Note

Paddle.js v2.0 全面支持 Paddle 2.0 模型推理,并进行了架构升级。同时,预测性能相对 1.0 版本有较大提升,支持数据 4 通道排布,支持 WebGPU、NodeGL 和 Cpu 多种计算加速方案。支持了更多模型结构和算子类型。

架构升级

通过缩减代码规模和进一步拆分和封装,让子模块都能够完整地工程化,从而提升 Paddle.js 的可维护性和代码质量,提升研发效率,降低使用门槛

  1. 代码拆解解耦离线和在线模块,解耦主框架运行时和计算方案(backend);形成以独立迭代(开发、维护、上线)的模块;从单一代码库升级为 Monorepos
  2. 提供统一的工程化规范约束,拆分出来的模块再对其加以个性化并使用 image

框架升级

  1. 新增支持计算方案:WebGPUNodeGLCpu
  2. 支持数据 4 通道排布,减少I/O,提升预测性能,MobileNetV2 在 webgl 2.0 下预测耗时提升 39.6%;webgl 1.0 预测性能提升 40%
  3. 封装模型库 paddlejs-models 和工具包 paddlejs-mediapipe,提供简单 api,整体上提升 Paddle.js 易用性
  4. 升级 paddlejs-backend-webgl 算子和模型转换工具 paddlejs-converter 适配 Paddle 2.0
  5. 新增 benchmark,分析模型推理耗时,助力性能提升
  6. 支持模型变形机制:preTransformtransformpostTransform,便于对对特殊模型结构进行变换处理

性能增强

相对于 1.0 版本 Paddle.js 在 WebGL backend下,模型性能有较大提升: MobileNetV2 在 webgl 1.0 环境下 预测耗时性能提升 40%;在 webgl 2.0 环境下 预测耗时性能提升 39.6%。

浏览器/系统覆盖范围

PC浏览器: Chrome、Safari、Firefox 手机浏览器: Baidu App、Safari、Chrome、UC and QQ Browser 小程序: 百度小程序、微信小程序 系统: MacOS、Windows

模型结构支持

MobileNetV1 MobileNetV2 MobileNetV3 ShuffleNetV2 ssd-MobileNetV3 GhostNet HRNet_w18_small_v1

新增算子支持

arg_max arg_min elementwise_mul elementwise_div unsqueeze2 fc dropout hard_sigmoid sigmoid matmul clip flatten_contiguous_range greater_than reduce_sum where pow sqrt

2.0.0 Release Note

Paddle.js v2.0.0 fully supports Paddle v2.0. It implements architecture upgradation and separation. Compared with v1.0.0, the performance has been greatly improved. It supports texture packing and adds WebGPU, NodeGL, Cpu, NodeGL backends. More model structures and operator types are supported.

Breaking changes

This release contains a number of breaking changes, details of which are listed below:

Architecture upgrade:

Improve maintainability and code quality of Paddle.js by reducing code size and further splitting / packaging, so that sub-modules can be fully engineered, improving R&D efficiency and lowering the barrier to use.

  1. Disassembled offline and online modules, decouple the main frame runtime and backend modules. Each module can be iterated independently. Organized the large codebases into monorepos.

  2. Provide unified engineering specification constraints, and each package can be used individuality.

image

Functional upgrading:

  1. Add new backends: WebGPUNodeGLCpu

  2. Support texture packing and reduce I/O operations to improve performance.

  3. Package model library paddlejs-models and toolkit paddlejs-mediapipe. Provide simple api and better usability of Paddle.js.

  4. Some operators are newly added or upgraded in Paddle v2.0, and model conversion tool paddlejs-converter is upgraded in Paddle v2.0.

  5. Add benchmark tool to analyze model inference time to help performance optimization.

  6. Support transform-mechanism, including preTransform, transform and postTransform, which helps users transform special model structure conveniently.

Performance optimization:

Compared with v1.0.0, the performance has been greatly improved.
Optimized MobileNetV2 (speedup 40% in WebGL 1.0, 39.6% in WebGL 2.0)

Coverage:

PC: Chrome, Safari, Firefox Phone: Baidu App, Chrome, UC and QQ Browser Smartprogram: Baidu Smartprogram, WX Smartprogram Platform: macOS, Windows

Model architecture:

MobileNetV1 MobileNetV2 MobileNetV3 ShuffleNetV2 ssd-MobileNetV3 GhostNet HRNet_w18_small_v1

New Operators:

arg_max arg_min elementwise_mul elementwise_div unsqueeze2 fc dropout hard_sigmoid sigmoid matmul clip flatten_contiguous_range greater_than reduce_sum where pow sqrt

v1.0

3 years ago

Release Note

Paddle.js是百度Paddle的web方向子项目,是一个运行在浏览器中的开源深度学习框架。Paddle.js可以加载训练好Paddle.js模型,或者将Paddle.fluid模型通过Paddle.js的模型转换工具变成浏览器友好的模型进行在线预测使用。

兼容性

  • 支持在webGL2.0和webGL1.0的浏览器上运行。例如chrome, firefox, safari以及移动端的Baidu App, QQ浏览器等。
  • 支持NCHW与NHWC格式的模型数据计算。

功能

  • 开发者可以通过Paddle.js将他们训练好的深度学习模型部署在浏览器上。通过WebGL,Paddle.js能够利用用户端设备的gpu进行加速运算,无需与服务器端进行交互,完成快速,安全的模型预测。
  • Paddle.js可以对图像等多媒体数据进行处理,将web多媒体标签内容处理成在线推理引擎需要的输入数据。
  • 我们提供的模型转换工具可以将Paddle.fluid模型转换为Paddle.js支持的模型,并且集成了包括算子融合等模型优化的处理方法。查看转换工具使用方法
  • 对基础的算子提供了支持,未来会继续补充支持更多的算子。如果您的模型中存在目前Paddle.js不支持的算子,请提出问题,让我们知道你需要支持。联系方式请查看本文结尾处。 查看支持的op列表
  • 提供MobilenetV2、TinyYoloV3、人像分割、黄反暴恐检测和手势检测等模型的demo。查看演示
  • 支持预热和多次执行在线推理,并且进行了执行资源复用等性能方面的实现。
  • 支持多模型串执行在线推理。

反馈和社区支持

  • 欢迎在Github Issue中提出问题,反馈和建议!
  • 欢迎在我们的PaddlePaddle Forum提出观点,进行讨论!
  • QQ群:696965088