Skip to content

Commit

Permalink
Merge branch 'docs/update_tutorial_docs' into 'master'
Browse files Browse the repository at this point in the history
Docs/update tutorial docs

See merge request ai/esp-dl!115
  • Loading branch information
BlueSkyB committed Dec 20, 2024
2 parents 3292cbd + 662fa94 commit f4dc931
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 1,640 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESP-DL [[中文]](./README_cn.md)

[![Documentation Status](./docs/_static/doc_latest.svg)](https://docs.espressif.com/projects/esp-dl/en/latest/index.html)
[![Documentation Status](./docs/_static/doc_latest.svg)](https://docs.espressif.com/projects/esp-dl/en/latest/index.html) [![Component Registry](https://components.espressif.com/components/espressif/esp-dl/badge.svg)](https://components.espressif.com/components/espressif/esp-dl)

ESP-DL is a lightweight and efficient neural network inference framework designed specifically for ESP series chips. With ESP-DL, you can easily and quickly develop AI applications using Espressif's System on Chips (SoCs).

Expand Down Expand Up @@ -40,7 +40,7 @@ pip install git+https://github.com/espressif/esp-ppq.git
First, please refer to the [ESP-DL Operator Support State](./operator_support_state.md) to ensure that the operators in your model are already supported.

ESP-PPQ can directly read ONNX models for quantization. Pytorch and TensorFlow need to be converted to ONNX models first, so make sure your model can be converted to ONNX models.
We provide the following python script templates. Please select the appropriate template to quantize your models. For more details about quantization, please refer to [tutorial/how_to_quantize_model](./tutorial/how_to_quantize_model_en.md).
We provide the following python script templates. Please select the appropriate template to quantize your models. For more details about quantization, please refer to [Using ESP-PPQ for Model Quantization](https://docs.espressif.com/projects/esp-dl/en/latest/tutorials/how_to_quantize_model.html).

[quantize_onnx_model.py](./tools/quantization/quantize_onnx_model.py): Quantize ONNX models

Expand All @@ -61,7 +61,7 @@ Model *model = new Model((const char *)espdl_model, fbs::MODEL_LOCATION_IN_FLASH
model->run(inputs); // inputs is a tensor or a map of tensors
```
For more details, please refer to [tutorial/how_to_load_model](./tutorial/how_to_load_model_en.md) and [mobilenet_v2 examples](./examples/mobilenet_v2/)
For more details, please refer to [Loading Models with ESP-DL](https://docs.espressif.com/projects/esp-dl/en/latest/tutorials/how_to_load_model.html) and [mobilenet_v2 examples](./examples/mobilenet_v2/)
## Support Models
Expand All @@ -74,6 +74,6 @@ For more details, please refer to [tutorial/how_to_load_model](./tutorial/how_to
## Suport Operators
If you encounter unsupported operators, please point them out in the [issues](https://github.com/espressif/esp-dl/issues), and we will support them as soon as possible. Contributions to this ESPDL are also welcomed.
If you encounter unsupported operators, please point them out in the [issues](https://github.com/espressif/esp-dl/issues), and we will support them as soon as possible. Contributions to this ESP-DL are also welcomed, please refer to [Creating a New Module (Operator)](https://docs.espressif.com/projects/esp-dl/en/latest/tutorials/how_to_add_a_new_module%28operator%29.html) for more details.
[ESP-DL Operator Support State](./operator_support_state.md)
8 changes: 4 additions & 4 deletions README_cn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESP-DL [[English]](./README.md)

[![Documentation Status](./docs/_static/doc_latest.svg)](https://docs.espressif.com/projects/esp-dl/zh_CN/latest/index.html)
[![Documentation Status](./docs/_static/doc_latest.svg)](https://docs.espressif.com/projects/esp-dl/zh_CN/latest/index.html) [![Component Registry](https://components.espressif.com/components/espressif/esp-dl/badge.svg)](https://components.espressif.com/components/espressif/esp-dl)

ESP-DL 是一个专为 ESP 系列芯片设计的轻量级且高效的神经网络推理框架。通过 ESP-DL,您可以轻松快速地使用乐鑫的系统级芯片 (SoC) 开发 AI 应用。

Expand Down Expand Up @@ -40,7 +40,7 @@ pip install git+https://github.com/espressif/esp-ppq.git

ESP-PPQ 可以直接读取 ONNX 模型进行量化。Pytorch 和 TensorFlow 需要先转换为 ONNX 模型,因此请确保你的模型可以转换为 ONNX 模型。

我们提供了以下 Python 脚本模板。你可以根据你自己的模型选择合适的模板进行修改。更多详细信息请参阅 [tutorial/how_to_quantize_model](./tutorial/how_to_quantize_model_cn.md)
我们提供了以下 Python 脚本模板。你可以根据你自己的模型选择合适的模板进行修改。更多详细信息请参阅 [使用 ESP-PPQ 量化模型](https://docs.espressif.com/projects/esp-dl/zh_CN/latest/tutorials/how_to_quantize_model.html)

[quantize_onnx_model.py](./tools/quantization/quantize_onnx_model.py): 量化 ONNX 模型

Expand All @@ -60,7 +60,7 @@ Model *model = new Model((const char *)espdl_model, fbs::MODEL_LOCATION_IN_FLASH
model->run(inputs); // inputs 是一个张量或张量映射
```
更多详细信息,请参阅 [tutorial/how_to_load_model](./tutorial/how_to_load_model_cn.md) 和 [mobilenet_v2 示例](./examples/mobilenet_v2/)。
更多详细信息,请参阅 [使用 ESP-DL 加载模型](https://docs.espressif.com/projects/esp-dl/zh_CN/latest/tutorials/how_to_load_model.html) 和 [mobilenet_v2 示例](./examples/mobilenet_v2/)。
## Support models
Expand All @@ -73,6 +73,6 @@ model->run(inputs); // inputs 是一个张量或张量映射
## Suport Operators
如果你有遇到不支持的算子,请将问题在[issues](https://github.com/espressif/esp-dl/issues)中反馈给我们,我们会尽快支持。
也欢迎大家贡献新的算子。
也欢迎大家贡献新的算子, 具体方法请参考[创建新模块(算子)](https://docs.espressif.com/projects/esp-dl/zh_CN/latest/tutorials/how_to_add_a_new_module%28operator%29.html)
[算子支持状态](./operator_support_state.md)
2 changes: 1 addition & 1 deletion esp-dl/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.0.0~1-rc.2"
version: "3.0.0"
license: "MIT"
targets:
- esp32s3
Expand Down
2 changes: 1 addition & 1 deletion examples/mobilenet_v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Deploy [MobileNet_v2](https://arxiv.org/abs/1801.04381) model from [torchvision](https://pytorch.org/vision/0.18/models/generated/torchvision.models.mobilenet_v2.html).

See [tutotial/how_to_deploy_mobilenet_v2](../../tutorial/how_to_deploy_mobilenet_v2_en.md) for more information.
See [Deploying MobileNet_v2 Using ESP-DL](https://docs.espressif.com/projects/esp-dl/en/latest/tutorials/how_to_deploy_mobilenet.html) for more information.

# Example Output
After the flashing you should see the output at idf monitor:
Expand Down
11 changes: 6 additions & 5 deletions operator_support_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ The rounding for ESP32-P4 is [rounding half to even](https://simple.wikipedia.or

## Support Operators

The ESP-DL operator interface is aligned with ONNX. The opset 13 is recommended to export ONNX.
Currently, the following 30 operators have been implemented and tested. Some operators do not implement all functionalities and attributes. Please refer to the description of each operator or [test cases](./tools/ops_test/config/op_cfg.toml) for details.
The ESP-DL operator interface is aligned with ONNX. The opset 13 is recommended to export ONNX.
Currently, the following 31 operators have been implemented and tested. Some operators do not implement all functionalities and attributes. Please refer to the description of each operator or [test cases](./tools/ops_test/config/op_cfg.toml) for details.
| Operator | int8 | int16 | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----------|---------------------------------------------|
| Add[(ESP-DL)](esp-dl/dl/module/include/dl_module_add.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Add.html) | ✔ | ✔ | Support up to 4D |
Expand All @@ -29,21 +29,22 @@ Currently, the following 30 operators have been implemented and tested. Some ope
| HardSwish[(ESP-DL)](esp-dl/dl/module/include/dl_module_hard_swish.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__HardSwish.html) | ✔ | ✔ | |
| LeakyRelu[(ESP-DL)](esp-dl/dl/module/include/dl_module_leaky_relu.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__LeakyRelu.html) | ✔ | ✔ | |
| Log[(ESP-DL)](esp-dl/dl/module/include/dl_module_log.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Log.html) | ✔ | ✔ | |
| MatMul[(ESP-DL)](esp-dl/dl/module/include/dl_module_matmul.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__MatMul.html) | ✔ | ✔ | |
| MatMul[(ESP-DL)](esp-dl/dl/module/include/dl_module_matmul.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__MatMul.html) | ✔ | ✔ | Support up to 4D |
| MaxPool[(ESP-DL)](esp-dl/dl/module/include/dl_module_max_pool.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__MaxPool.html) | ✔ | ✔ | |
| Mul[(ESP-DL)](esp-dl/dl/module/include/dl_module_mul.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Mul.html) | ✔ | ✔ | Support up to 4D |
| Pad[(ESP-DL)](esp-dl/dl/module/include/dl_module_pad.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Pad.html) | ✔ | ✔ | Do not support wrap mode |
| PRelu[(ESP-DL)](esp-dl/dl/module/include/dl_module_prelu.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__PRelu.html) | ✔ | ✔ | |
| Reshape[(ESP-DL)](esp-dl/dl/module/include/dl_module_reshape.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Reshape.html) | ✔ | ✔ | |
| Resize[(ESP-DL)](esp-dl/dl/module/include/dl_module_resize.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Resize.html) | ✔ | ✔ | Only support nearest and do not support roi |
| Resize[(ESP-DL)](esp-dl/dl/module/include/dl_module_resize.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Resize.html) | ✔ | ✖ | Only support nearest and do not support roi |
| Sigmoid[(ESP-DL)](esp-dl/dl/module/include/dl_module_sigmoid.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Sigmoid.html) | ✔ | ✔ | |
| Slice[(ESP-DL)](esp-dl/dl/module/include/dl_module_slice.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Slice.html) | ✔ | ✔ | |
| Softmax[(ESP-DL)](esp-dl/dl/module/include/dl_module_softmax.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Softmax.html) | ✔ | ✔ | Dtype of output is float32 |
| Split[(ESP-DL)](esp-dl/dl/module/include/dl_module_split.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Split.html) | ✔ | ✔ | |
| Sqrt[(ESP-DL)](esp-dl/dl/module/include/dl_module_sqrt.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Sqrt.html) | ✔ | ✔ | |
| Squeeze[(ESP-DL)](esp-dl/dl/module/include/dl_module_squeeze.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Squeeze.html) | ✔ | ✔ | |
| Sub[(ESP-DL)](esp-dl/dl/module/include/dl_module_sub.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Sub.html) | ✔ | ✔ | Support up to 4D |
| Tanh[(ESP-DL)](esp-dl/dl/module/include/dl_module_tanh.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Tanh.html) | ✔ | ✔ | |
| Transpose[(ESP-DL)](esp-dl/dl/module/include/dl_module_transpose.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Transpose.html) | ✔ | ✔ | |
| Unsqueeze[(ESP-DL)](esp-dl/dl/module/include/dl_module_unsqueeze.hpp)[(ONNX)](https://onnx.ai/onnx/operators/onnx__Unsqueeze.html) | ✔ | ✔ | |

Generation Time: 2024-12-13 15:55:57
Generation Time: 2024-12-20 17:28:29
100 changes: 0 additions & 100 deletions tutorial/how_to_add_a_new_module(operator)_cn.md

This file was deleted.

Loading

0 comments on commit f4dc931

Please sign in to comment.