提交 2fa0e187 编写于 作者: C chenjian

finish face detection docs

上级 95aac060
......@@ -73,10 +73,10 @@
combined=True)
```
- **Parameters**
- dirname: 存在模型的目录名称;<br/>
- dirname: output dir for saving model
- model_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效); <br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- combined: whether save parameters into one file
......
......@@ -23,7 +23,7 @@
- ### Module Introduction
- PyramidBox是一种基于SSD的单阶段人脸检测器,它利用上下文信息解决困难人脸的检测问题.PyramidBox在六个尺度的特征图上进行不同层级的预测.该工作主要包括以下模块:LFPN、PyramidAnchors、CPM、Data-anchor-sampling.该PaddleHub Module的预训练数据集为WIDER FACE数据集,可支持预测.
- PyramidBox is a one-stage face detector based on SSD. It can redict results across six scale levels of feature maps. This module is based on PyramidBox, trained on WIDER FACE Dataset, and supports face detection.
## II.Installation
......@@ -73,7 +73,7 @@
score_thresh=0.15)
```
- 检测输入图片中的所有人脸位置.
- Detect all faces in image
- **Parameters**
......@@ -82,20 +82,20 @@
- use_gpu (bool): use GPU or not; **set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU**
- output_dir (str): save path of images;
- visualization (bool): Whether to save the results as picture files;
- score_thresh (float): 置信度的阈值.
- score_thresh (float): the confidence threshold
**NOTE:** choose one parameter to provide data from paths and images
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- path (str): 原输入图片的路径
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- res (list\[dict\]): results
- path (str): path for input image
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- ```python
......@@ -104,14 +104,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -4,7 +4,7 @@
| :--- | :---: |
|Category|face detection|
|Network|PyramidBox|
|Dataset|WIDER FACEDataset + 百度自采人脸Dataset|
|Dataset|WIDER FACEDataset + Baidu Face Dataset|
|Fine-tuning supported or not|No|
|Module Size|7.3MB|
|Latest update date|2021-02-26|
......@@ -22,7 +22,7 @@
- ### Module Introduction
- PyramidBox-Lite是基于2018年百度发表于计算机视觉顶级会议ECCV 2018的论文PyramidBox而研发的轻量级模型,模型基于主干网络FaceBoxes,对于光照、口罩遮挡、表情变化、尺度变化等常见问题具有很强的鲁棒性.该PaddleHub Module是针对于移动端优化过的模型,适合部署于移动端或者边缘检测等算力受限的设备上,并基于WIDER FACE数据集和百度自采人脸数据集进行训练,支持预测,可用于人脸检测.
- PyramidBox-Lite is a light-weight model based on PyramidBox proposed by Baidu in ECCV 2018. This model has solid robustness against interferences such as light and scale variation. This module is optimized for mobile device, based on PyramidBox, trained on WIDER FACE Dataset and Baidu Face Dataset, and can be used for face detection.
## II.Installation
......@@ -73,7 +73,7 @@
confs_threshold=0.6)
```
- 检测输入图片中的所有人脸位置.
- Detect all faces in image
- **Parameters**
......@@ -82,21 +82,21 @@
- use_gpu (bool): use GPU or not; **set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU**
- output_dir (str): save path of images;
- visualization (bool): Whether to save the results as picture files;
- shrink (float): 用于设置图片的缩放比例,该值越大,则对于输入图片中的小尺寸人脸有更好的检测效果(模型计算成本越高),反之则对于大尺寸人脸有更好的检测效果;<br/>
- confs\_threshold (float): 置信度的阈值.
- shrink (float): the scale to resize image
- confs\_threshold (float): the confidence threshold
**NOTE:** choose one parameter to provide data from paths and images
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- path (str): 原输入图片的路径
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- res (list\[dict\]): results
- path (str): path for input image
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- ```python
......@@ -105,14 +105,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -4,7 +4,7 @@
| :--- | :---: |
|Category|face detection|
|Network|PyramidBox|
|Dataset|WIDER FACEDataset + 百度自采人脸Dataset|
|Dataset|WIDER FACEDataset + Baidu Face Dataset|
|Fine-tuning supported or not|No|
|Module Size|1.2MB|
|Latest update date|2021-02-26|
......@@ -22,7 +22,8 @@
- ### Module Introduction
- PyramidBox-Lite是基于2018年百度发表于计算机视觉顶级会议ECCV 2018的论文PyramidBox而研发的轻量级模型,模型基于主干网络FaceBoxes,对于光照、口罩遮挡、表情变化、尺度变化等常见问题具有很强的鲁棒性.该PaddleHub Module是针对于移动端优化过的模型,适合部署于移动端或者边缘检测等算力受限的设备上,并基于WIDER FACE数据集和百度自采人脸数据集进行训练,支持预测,可用于检测人脸是否佩戴口罩.
- PyramidBox-Lite is a light-weight model based on PyramidBox proposed by Baidu in ECCV 2018. This model has solid robustness against interferences such as light and scale variation. This module is optimized for mobile device, based on PyramidBox, trained on WIDER FACE Dataset and Baidu Face Dataset, and can be used for mask detection.
## II.Installation
......@@ -63,13 +64,6 @@
- ### 3、API
- ```python
def __init__(face_detector_module=None)
```
- **Parameters**
- face\_detector\_module (class): 人脸检测模型,默认为 pyramidbox\_lite\_mobile.
- ```python
def face_detection(images=None,
......@@ -83,7 +77,7 @@
confs_threshold=0.6)
```
- 识别输入图片中的所有的人脸,并判断有无戴口罩.
- Detect all faces in image, and judge the existence of mask.
- **Parameters**
......@@ -93,40 +87,23 @@
- use_gpu (bool): use GPU or not; **set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU**
- visualization (bool): Whether to save the results as picture files;
- output_dir (str): save path of images;
- use\_multi\_scale (bool) : 用于设置是否开启多尺度的人脸检测,开启多尺度人脸检测能够更好的检测到输入图像中不同尺寸的人脸,但是会增加模型计算量,降低预测速度;<br/>
- shrink (float): 用于设置图片的缩放比例,该值越大,则对于输入图片中的小尺寸人脸有更好的检测效果(模型计算成本越高),反之则对于大尺寸人脸有更好的检测效果;<br/>
- confs\_threshold (float): 置信度的阈值.
- use\_multi\_scale (bool) : whether to detect across multiple scales;
- shrink (float): the scale to resize image
- confs\_threshold (float): the confidence threshold
**NOTE:** choose one parameter to provide data from paths and images
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- path (str): 原输入图片的路径
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- label (str): 识别标签,为 'NO MASK' 或者 'MASK';
- confidence (float): 识别的置信度
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- ```python
def set_face_detector_module(face_detector_module)
```
- 设置口罩检测模型中进行人脸检测的底座模型.
- **Parameters**
- face\_detector\_module (class): 人脸检测模型.
- ```python
def get_face_detector_module()
```
- 获取口罩检测模型中进行人脸检测的底座模型.
- **Return**
- 当前模型使用的人脸检测模型
- res (list\[dict\]): results
- path (str): path for input image
- data (list): detection results, each element in the list is dict
- label (str): 'NO MASK' or 'MASK';
- confidence (float): the confidence of the result
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- ```python
......@@ -135,14 +112,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......@@ -184,22 +161,22 @@
# print prediction results
print(r.json()["results"])
```
## V.Paddle Lite部署
- ### 通过python执行以下代码,保存模型
## V.Paddle Lite Deployment
- ### Save model demo
- ```python
import paddlehub as hub
pyramidbox_lite_mobile_mask = hub.Module(name="pyramidbox_lite_mobile_mask")
# 将模型保存在test_program文件夹之中
# save model in directory named test_program
pyramidbox_lite_mobile_mask.save_inference_model(dirname="test_program")
```
通过以上命令,可以获得人脸检测和口罩佩戴判断模型,分别存储在pyramidbox\_lite和mask\_detector之中。文件夹中的\_\_model\_\_是模型结构文件,\_\_params\_\_文件是权重文件。
- ### 进行模型转换
- 从paddlehub下载的是预测模型,可以使用PaddleLite提供的模型优化工具OPT对预测模型进行转换,转换之后进而可以实现在手机等端侧硬件上的部署,具体请请参考[OPT工具](https://paddle-lite.readthedocs.io/zh/latest/user_guides/model_optimize_tool.html)
- ### transform model
- The model downloaded from paddlehub is a prediction model. If we want to deploy it in mobile device, we can use OPT tool provided by PaddleLite to transform the model. For more information, please refer to [OPT tool](https://paddle-lite.readthedocs.io/zh/latest/user_guides/model_optimize_tool.html))
- ### 模型通过Paddle Lite进行部署
- 参考[Paddle-Lite口罩检测模型部署教程](https://github.com/PaddlePaddle/Paddle-Lite/tree/develop/lite/demo/cxx)
- ### Deploy the model with Paddle Lite
- Please refer to[Paddle-Lite mask detection model deployment demo](https://github.com/PaddlePaddle/Paddle-Lite/tree/develop/lite/demo/cxx)
## V.Release Note
......
......@@ -4,7 +4,7 @@
| :--- | :---: |
|Category|face detection|
|Network|PyramidBox|
|Dataset|WIDER FACEDataset + 百度自采人脸Dataset|
|Dataset|WIDER FACEDataset + Baidu Face Dataset|
|Fine-tuning supported or not|No|
|Module Size|8MB|
|Latest update date|2021-02-26|
......@@ -22,7 +22,8 @@
- ### Module Introduction
- PyramidBox-Lite是基于2018年百度发表于计算机视觉顶级会议ECCV 2018的论文PyramidBox而研发的轻量级模型,模型基于主干网络FaceBoxes,对于光照、口罩遮挡、表情变化、尺度变化等常见问题具有很强的鲁棒性.该PaddleHub Module基于WIDER FACE数据集和百度自采人脸数据集进行训练,支持预测,可用于人脸检测.
- PyramidBox-Lite is a light-weight model based on PyramidBox proposed by Baidu in ECCV 2018. This model has solid robustness against interferences such as light and scale variation. This module is based on PyramidBox, trained on WIDER FACE Dataset and Baidu Face Dataset, and can be used for face detection.
## II.Installation
......@@ -73,7 +74,7 @@
confs_threshold=0.6)
```
- 检测输入图片中的所有人脸位置.
- Detect all faces in image
- **Parameters**
......@@ -82,21 +83,21 @@
- use_gpu (bool): use GPU or not; **set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU**
- output_dir (str): save path of images;
- visualization (bool): Whether to save the results as picture files;
- shrink (float): 用于设置图片的缩放比例,该值越大,则对于输入图片中的小尺寸人脸有更好的检测效果(模型计算成本越高),反之则对于大尺寸人脸有更好的检测效果;<br/>
- confs\_threshold (float): 置信度的阈值.
- shrink (float): the scale to resize image
- confs\_threshold (float): the confidence threshold
**NOTE:** choose one parameter to provide data from paths and images
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- path (str): 原输入图片的路径
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- res (list\[dict\]): results
- path (str): path for input image
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- ```python
......@@ -105,14 +106,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -4,7 +4,7 @@
| :--- | :---: |
|Category|face detection|
|Network|PyramidBox|
|Dataset|WIDER FACEDataset + 百度自采人脸Dataset|
|Dataset|WIDER FACEDataset + Baidu Face Dataset|
|Fine-tuning supported or not|No|
|Module Size|1.2MB|
|Latest update date|2021-02-26|
......@@ -22,7 +22,7 @@
- ### Module Introduction
- PyramidBox-Lite是基于2018年百度发表于计算机视觉顶级会议ECCV 2018的论文PyramidBox而研发的轻量级模型,模型基于主干网络FaceBoxes,对于光照、口罩遮挡、表情变化、尺度变化等常见问题具有很强的鲁棒性.该PaddleHub Module基于WIDER FACE数据集和百度自采人脸数据集进行训练,支持预测,可用于检测人脸是否佩戴口罩.
- PyramidBox-Lite is a light-weight model based on PyramidBox proposed by Baidu in ECCV 2018. This model has solid robustness against interferences such as light and scale variation. This module is based on PyramidBox, trained on WIDER FACE Dataset and Baidu Face Dataset, and can be used for mask detection.
## II.Installation
......@@ -63,13 +63,6 @@
- ### 3、API
- ```python
def __init__(face_detector_module=None)
```
- **Parameters**
- face\_detector\_module (class): 人脸检测模型,默认为 pyramidbox\_lite\_server.
- ```python
def face_detection(images=None,
......@@ -83,7 +76,7 @@
confs_threshold=0.6)
```
- 识别输入图片中的所有的人脸,并判断有无戴口罩.
- Detect all faces in image, and judge the existence of mask.
- **Parameters**
......@@ -93,39 +86,23 @@
- use_gpu (bool): use GPU or not; **set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU**
- visualization (bool): Whether to save the results as picture files;
- output_dir (str): save path of images;
- use\_multi\_scale (bool) : 用于设置是否开启多尺度的人脸检测,开启多尺度人脸检测能够更好的检测到输入图像中不同尺寸的人脸,但是会增加模型计算量,降低预测速度;<br/>
- shrink (float): 用于设置图片的缩放比例,该值越大,则对于输入图片中的小尺寸人脸有更好的检测效果(模型计算成本越高),反之则对于大尺寸人脸有更好的检测效果;<br/>
- confs\_threshold (float): 置信度的阈值.
- use\_multi\_scale (bool) : whether to detect across multiple scales;
- shrink (float): the scale to resize image
- confs\_threshold (float): the confidence threshold
**NOTE:** choose one parameter to provide data from paths and images
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- path (str): 原输入图片的路径
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- label (str): 识别标签,为 'NO MASK' 或者 'MASK';
- confidence (float): 识别的置信度
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- ```python
def set_face_detector_module(face_detector_module)
```
- 设置口罩检测模型中进行人脸检测的底座模型.
- **Parameters**
- face\_detector\_module (class): 人脸检测模型.
- ```python
def get_face_detector_module()
```
- 获取口罩检测模型中进行人脸检测的底座模型.
- **Return**
- 当前模型使用的人脸检测模型
- res (list\[dict\]): results
- path (str): path for input image
- data (list): detection results, each element in the list is dict
- label (str): 'NO MASK' or 'MASK';
- confidence (float): the confidence of the result
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
......@@ -135,14 +112,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......@@ -184,22 +161,23 @@
# print prediction results
print(r.json()["results"])
```
## V.Paddle Lite部署
- ### 通过python执行以下代码,保存模型
## V.Paddle Lite Deployment
- ### Save model demo
- ```python
import paddlehub as hub
pyramidbox_lite_server_mask = hub.Module(name="pyramidbox_lite_server_mask")
# 将模型保存在test_program文件夹之中
# save model in directory named test_program
pyramidbox_lite_server_mask.save_inference_model(dirname="test_program")
```
通过以上命令,可以获得人脸检测和口罩佩戴判断模型,分别存储在pyramidbox\_lite和mask\_detector之中。文件夹中的\_\_model\_\_是模型结构文件,\_\_params\_\_文件是权重文件。
- ### 进行模型转换
- 从paddlehub下载的是预测模型,可以使用PaddleLite提供的模型优化工具OPT对预测模型进行转换,转换之后进而可以实现在手机等端侧硬件上的部署,具体请请参考[OPT工具](https://paddle-lite.readthedocs.io/zh/latest/user_guides/model_optimize_tool.html)
- ### 模型通过Paddle Lite进行部署
- 参考[Paddle-Lite口罩检测模型部署教程](https://github.com/PaddlePaddle/Paddle-Lite/tree/develop/lite/demo/cxx)
- ### transform model
- The model downloaded from paddlehub is a prediction model. If we want to deploy it in mobile device, we can use OPT tool provided by PaddleLite to transform the model. For more information, please refer to [OPT tool](https://paddle-lite.readthedocs.io/zh/latest/user_guides/model_optimize_tool.html))
- ### Deploy the model with Paddle Lite
- Please refer to[Paddle-Lite mask detection model deployment demo](https://github.com/PaddlePaddle/Paddle-Lite/tree/develop/lite/demo/cxx)
## V.Release Note
......
......@@ -22,7 +22,7 @@
- ### Module Introduction
- Ultra-Light-Fast-Generic-Face-Detector-1MB是针对边缘计算设备或低算力设备(如用ARM推理)设计的实时超轻量级通用人脸检测模型,可以在低算力设备中如用ARM进行实时的通用场景的人脸检测推理.该PaddleHub Module的预训练数据集为WIDER FACE数据集,可支持预测,在预测时会将图片输入缩放为320 * 240.
- Ultra-Light-Fast-Generic-Face-Detector-1MB is an extreme light-weight model for real-time face detection in low computation power devices. This module is based on Ultra-Light-Fast-Generic-Face-Detector-1MB, trained on WIDER FACEDataset, and can be used for face detection.
## II.Installation
......@@ -73,7 +73,7 @@
confs_threshold=0.5)
```
- 检测输入图片中的所有人脸位置.
- Detect all faces in image
- **Parameters**
......@@ -83,21 +83,21 @@
- use_gpu (bool): use GPU or not; **set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU**
- output_dir (str): save path of images;
- visualization (bool): Whether to save the results as picture files;
- confs\_threshold (float): 置信度的阈值.
- confs\_threshold (float): the confidence threshold
**NOTE:** choose one parameter to provide data from paths and images
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- path (str): 原输入图片的路径
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- save\_path 字段为可视化图片的保存路径(仅当visualization=True时存在)
- res (list\[dict\]): results
- path (str): path for input image
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str): path for saving output image
- ```python
......@@ -106,14 +106,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -22,7 +22,7 @@
- ### Module Introduction
- Ultra-Light-Fast-Generic-Face-Detector-1MB是针对边缘计算设备或低算力设备(如用ARM推理)设计的实时超轻量级通用人脸检测模型,可以在低算力设备中如用ARM进行实时的通用场景的人脸检测推理.该PaddleHub Module的预训练数据集为WIDER FACE数据集,可支持预测,在预测时会将图片输入缩放为640 * 480.
- Ultra-Light-Fast-Generic-Face-Detector-1MB is an extreme light-weight model for real-time face detection in low computation power devices. This module is based on Ultra-Light-Fast-Generic-Face-Detector-1MB, trained on WIDER FACEDataset, and can be used for face detection.
## II.Installation
......@@ -73,7 +73,7 @@
confs_threshold=0.5)
```
- 检测输入图片中的所有人脸位置.
- Detect all faces in image
- **Parameters**
......@@ -83,21 +83,21 @@
- use_gpu (bool): use GPU or not; **set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU**
- output_dir (str): save path of images;
- visualization (bool): Whether to save the results as picture files;
- confs\_threshold (float): 置信度的阈值.
- confs\_threshold (float): the confidence threshold
**NOTE:** choose one parameter to provide data from paths and images
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- path (str): 原输入图片的路径
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- save\_path 字段为可视化图片的保存路径(仅当visualization=True时存在)
- res (list\[dict\]): results
- path (str): path for input image
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str): path for saving output image
- ```python
......@@ -106,14 +106,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -90,13 +90,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
......@@ -106,14 +106,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -90,13 +90,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
......@@ -106,14 +106,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -83,14 +83,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
......
......@@ -91,13 +91,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -106,14 +106,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -89,13 +89,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -104,14 +104,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -89,13 +89,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -104,14 +104,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -90,13 +90,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -105,14 +105,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -89,13 +89,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -104,14 +104,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -83,13 +83,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -98,14 +98,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
......
......@@ -90,13 +90,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -105,14 +105,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -89,13 +89,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -104,14 +104,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -89,13 +89,13 @@
- **Return**
- res (list\[dict\]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): 检测结果,list的每一个元素为 dict,各字段为:
- confidence (float): 识别的置信度
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): 标签
- left (int): 边界框的左上角x坐标
- top (int): 边界框的左上角y坐标
- right (int): 边界框的右下角x坐标
- bottom (int): 边界框的右下角y坐标
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在)
- ```python
......@@ -104,14 +104,14 @@
params_filename=None,
combined=True)
```
- 将模型保存到指定路径.
- Save model to specific path
- **Parameters**
- dirname: 存在模型的目录名称; <br/>
- model\_filename: 模型文件名称,默认为\_\_model\_\_; <br/>
- params\_filename: Parameters文件名称,默认为\_\_params\_\_(仅当`combined`为True时生效);<br/>
- combined: 是否将Parameters保存到统一的一个文件中.
- dirname: output dir for saving model
- model\_filename: filename for saving model
- params\_filename: filename for saving parameters
- combined: whether save parameters into one file
## IV.Server Deployment
......
......@@ -64,7 +64,7 @@
- **Parameters**
- images (list\[numpy.ndarray\]): image data, ndarray.shape is in the format [H, W, C], BGR;<br/>
- images (list\[numpy.ndarray\]): image data, ndarray.shape is in the format [H, W, C], BGR;
- **Return**
......
......@@ -99,8 +99,8 @@
- box_thresh (float): The confidence threshold for text box detection;
- text_thresh (float): The confidence threshold for Germany text recognition;
- angle_classification_thresh(float): The confidence threshold for text angle classification
- visualization (bool): Whether to save the recognition results as picture files;
- output_dir (str): save path of images, ocr_result by default.
- visualization (bool): Whether to save the results as picture files;
- output_dir (str): save path of images;
- **Return**
- res (list[dict]): The list of recognition results, where each element is dict and each field is:
- data (list[dict]): recognition results, each element in the list is dict and each field is:
......
......@@ -98,8 +98,8 @@
- box_thresh (float): The confidence threshold for text box detection;
- text_thresh (float): The confidence threshold for Japanese text recognition;
- angle_classification_thresh(float): The confidence threshold for text angle classification
- visualization (bool): Whether to save the recognition results as picture files;
- output_dir (str): save path of images, ocr_result by default.
- visualization (bool): Whether to save the results as picture files;
- output_dir (str): save path of images;
- **Return**
- res (list[dict]): The list of recognition results, where each element is dict and each field is:
- data (list[dict]): recognition results, each element in the list is dict and each field is:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册