From 964aaf051ccc33fd2277ca2bf3640fe58046f3d9 Mon Sep 17 00:00:00 2001 From: jiangjiajun Date: Tue, 11 Oct 2022 06:01:18 +0000 Subject: [PATCH] add api docs --- .new_docs/api_docs/README.md | 21 +++++++++++++++ .new_docs/api_docs/build.sh | 9 +++++++ .new_docs/api_docs/cpp/{docs => }/.gitignore | 0 .new_docs/api_docs/cpp/Doxyfile | 5 ++-- .new_docs/api_docs/index.html | 13 ++++++++++ .new_docs/api_docs/python/conf.py | 3 ++- .new_docs/cn/quick_start/models/python.md | 4 +-- fastdeploy/README.md | 27 -------------------- 8 files changed, 50 insertions(+), 32 deletions(-) create mode 100644 .new_docs/api_docs/README.md create mode 100644 .new_docs/api_docs/build.sh rename .new_docs/api_docs/cpp/{docs => }/.gitignore (100%) create mode 100644 .new_docs/api_docs/index.html delete mode 100644 fastdeploy/README.md diff --git a/.new_docs/api_docs/README.md b/.new_docs/api_docs/README.md new file mode 100644 index 0000000000..4da649deca --- /dev/null +++ b/.new_docs/api_docs/README.md @@ -0,0 +1,21 @@ +# API文档生成 + +## 环境要求 +- Ubuntu +- python >= 3.6 + +## 前置依赖安装 + +``` +sudo apt-get install doxygen + +pip install -r python/requirements.txt +``` + +## 文档生成 + +``` +bash build.sh +``` + +执行完成后,浏览器打开当前目录下的`index.html`即可查阅API文档 diff --git a/.new_docs/api_docs/build.sh b/.new_docs/api_docs/build.sh new file mode 100644 index 0000000000..e064140c32 --- /dev/null +++ b/.new_docs/api_docs/build.sh @@ -0,0 +1,9 @@ +CURRENT_DIR=${PWD} + +cd cpp +doxygen + +cd ../python +make html + +cd ${CURRENT_DIR} diff --git a/.new_docs/api_docs/cpp/docs/.gitignore b/.new_docs/api_docs/cpp/.gitignore similarity index 100% rename from .new_docs/api_docs/cpp/docs/.gitignore rename to .new_docs/api_docs/cpp/.gitignore diff --git a/.new_docs/api_docs/cpp/Doxyfile b/.new_docs/api_docs/cpp/Doxyfile index b5f23f5c03..4bd48f09d7 100644 --- a/.new_docs/api_docs/cpp/Doxyfile +++ b/.new_docs/api_docs/cpp/Doxyfile @@ -791,6 +791,7 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = ../../../fastdeploy/ +INPUT += ./main_page.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -982,7 +983,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = main_page.md +USE_MDFILE_AS_MAINPAGE = ./main_page.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1666,7 +1667,7 @@ EXTRA_SEARCH_MAPPINGS = # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. -GENERATE_LATEX = YES +GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/.new_docs/api_docs/index.html b/.new_docs/api_docs/index.html new file mode 100644 index 0000000000..4f65912813 --- /dev/null +++ b/.new_docs/api_docs/index.html @@ -0,0 +1,13 @@ +

FastDeploy API Documents

+ +

More Information

+ diff --git a/.new_docs/api_docs/python/conf.py b/.new_docs/api_docs/python/conf.py index 667d2dd0c9..f22b0fd169 100644 --- a/.new_docs/api_docs/python/conf.py +++ b/.new_docs/api_docs/python/conf.py @@ -35,7 +35,8 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx_markdown_tables', - 'sphinx.ext.viewcode' + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages', ] autoclass_content = 'both' diff --git a/.new_docs/cn/quick_start/models/python.md b/.new_docs/cn/quick_start/models/python.md index 6cad7ccf1b..55a245dd9f 100644 --- a/.new_docs/cn/quick_start/models/python.md +++ b/.new_docs/cn/quick_start/models/python.md @@ -1,8 +1,8 @@ -# Python部署 +# PPYOLOE Python部署 确认开发环境已安装FastDeploy,参考[FastDeploy安装](../../build_and_install/)安装预编译的FastDeploy,或根据自己需求进行编译安装。 -本文档以PaddleDetection目标检测模型PicoDet为例展示CPU上的推理示例 +本文档以PaddleDetection目标检测模型PPYOLOE为例展示CPU上的推理示例 ## 1. 获取模型和测试图像 diff --git a/fastdeploy/README.md b/fastdeploy/README.md deleted file mode 100644 index 2266d476aa..0000000000 --- a/fastdeploy/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# FastDeploy C++ API Summary - -## Runtime - -FastDeploy Runtime can be used as an inference engine with the same code, we can deploy Paddle/ONNX model on different device by different backends. -Currently, FastDeploy supported backends listed as below, - -| Backend | Hardware | Support Model Format | Platform | -| :------ | :------- | :------------------- | :------- | -| Paddle Inference | CPU/Nvidia GPU | Paddle | Windows(x64)/Linux(x64) | -| ONNX Runtime | CPU/Nvidia GPU | Paddle/ONNX | Windows(x64)/Linux(x64/aarch64)/Mac(x86/arm64) | -| TensorRT | Nvidia GPU | Paddle/ONNX | Windows(x64)/Linux(x64)/Jetson | -| OpenVINO | CPU | Paddle/ONNX | Windows(x64)/Linux(x64)/Mac(x86) | - -### Example code -- [Python examples](./) -- [C++ examples](./) - -### Related APIs -- [RuntimeOption](./structfastdeploy_1_1RuntimeOption.html) -- [Runtime](./structfastdeploy_1_1Runtime.html) - -## Vision Models - -| Task | Model | API | Example | -| :---- | :---- | :---- | :----- | -| object detection | PaddleDetection/PPYOLOE | [fastdeploy::vision::detection::PPYOLOE](./classfastdeploy_1_1vision_1_1detection_1_1PPYOLOE.html) | [C++](./)/[Python](./) |