提交 c6553c45 编写于 作者: W wuzewu

Fix docs

上级 3acfe6bd
...@@ -17,7 +17,7 @@ def context(num_classes=81, ...@@ -17,7 +17,7 @@ def context(num_classes=81,
phase='train') phase='train')
``` ```
提取头部特征,用于迁移学习。 提取特征,用于迁移学习。
**参数** **参数**
...@@ -28,10 +28,28 @@ def context(num_classes=81, ...@@ -28,10 +28,28 @@ def context(num_classes=81,
**返回** **返回**
* inputs (dict): 模型的输入,keys 包括 'image', 'im\_size',相应的取值为: * inputs (dict): 模型的输入,相应的取值为:
* image (Variable): 图像变量 当 phase 为 'train'时,包含:
* im\_size (Variable): 图片的尺寸 * image (Variable): 图像变量
* outputs (dict): 模型的输出。如果 get\_prediction 为 False,输出 'head\_fatures',否则输出 'bbox\_out'。 * im\_size (Variable): 图像的尺寸
* im\_info (Variable): 图像缩放信息
* gt\_class (Variable): 检测框类别
* gt\_box (Variable): 检测框坐标
* is\_crowd (Variable):
当 phase 为 'predict'时,包含:
* image (Variable): 图像变量
* im\_size (Variable): 图像的尺寸
* im\_info (Variable): 图像缩放信息
* outputs (dict): 模型的输出,相应的取值为:
当 phase 为 'train'时,包含:
* head_features (Variable): 所提取的特征
* rpn\_cls\_loss (Variable): 检测框分类损失
* rpn\_reg\_loss (Variable): 检测框回归损失
* generate\_proposal\_labels (Variable): 图像信息
当 phase 为 'predict'时,包含:
* head_features (Variable): 所提取的特征
* rois (Variable): 提取的roi
* bbox\_out (Variable): 预测结果
* context\_prog (Program): 用于迁移学习的 Program。 * context\_prog (Program): 用于迁移学习的 Program。
```python ```python
......
...@@ -34,7 +34,7 @@ from faster_rcnn_resnet50_coco2017.roi_extractor import RoIAlign ...@@ -34,7 +34,7 @@ from faster_rcnn_resnet50_coco2017.roi_extractor import RoIAlign
summary= summary=
"Baidu's Faster R-CNN model for object detection with backbone ResNet50, trained with dataset COCO2017", "Baidu's Faster R-CNN model for object detection with backbone ResNet50, trained with dataset COCO2017",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class FasterRCNNResNet50(hub.Module): class FasterRCNNResNet50(hub.Module):
def _initialize(self): def _initialize(self):
# default pretrained model, Faster-RCNN with backbone ResNet50, shape of input tensor is [3, 800, 1333] # default pretrained model, Faster-RCNN with backbone ResNet50, shape of input tensor is [3, 800, 1333]
...@@ -160,7 +160,7 @@ class FasterRCNNResNet50(hub.Module): ...@@ -160,7 +160,7 @@ class FasterRCNNResNet50(hub.Module):
'is_crowd': var_prefix + is_crowd.name 'is_crowd': var_prefix + is_crowd.name
} }
outputs = { outputs = {
'head_feat': 'head_features':
var_prefix + head_feat.name, var_prefix + head_feat.name,
'rpn_cls_loss': 'rpn_cls_loss':
var_prefix + rpn_loss['rpn_cls_loss'].name, var_prefix + rpn_loss['rpn_cls_loss'].name,
...@@ -178,7 +178,7 @@ class FasterRCNNResNet50(hub.Module): ...@@ -178,7 +178,7 @@ class FasterRCNNResNet50(hub.Module):
'im_shape': var_prefix + im_shape.name 'im_shape': var_prefix + im_shape.name
} }
outputs = { outputs = {
'head_feat': var_prefix + head_feat.name, 'head_features': var_prefix + head_feat.name,
'rois': var_prefix + rois.name, 'rois': var_prefix + rois.name,
'bbox_out': var_prefix + pred.name 'bbox_out': var_prefix + pred.name
} }
......
...@@ -17,7 +17,7 @@ def context(num_classes=81, ...@@ -17,7 +17,7 @@ def context(num_classes=81,
phase='train') phase='train')
``` ```
提取头部特征,用于迁移学习。 提取特征,用于迁移学习。
**参数** **参数**
...@@ -28,10 +28,28 @@ def context(num_classes=81, ...@@ -28,10 +28,28 @@ def context(num_classes=81,
**返回** **返回**
* inputs (dict): 模型的输入,keys 包括 'image', 'im\_size',相应的取值为: * inputs (dict): 模型的输入,相应的取值为:
* image (Variable): 图像变量 当 phase 为 'train'时,包含:
* im\_size (Variable): 图片的尺寸 * image (Variable): 图像变量
* outputs (dict): 模型的输出。如果 get\_prediction 为 False,输出 'head\_fatures',否则输出 'bbox\_out'。 * im\_size (Variable): 图像的尺寸
* im\_info (Variable): 图像缩放信息
* gt\_class (Variable): 检测框类别
* gt\_box (Variable): 检测框坐标
* is\_crowd (Variable):
当 phase 为 'predict'时,包含:
* image (Variable): 图像变量
* im\_size (Variable): 图像的尺寸
* im\_info (Variable): 图像缩放信息
* outputs (dict): 模型的输出,相应的取值为:
当 phase 为 'train'时,包含:
* head_features (Variable): 所提取的特征
* rpn\_cls\_loss (Variable): 检测框分类损失
* rpn\_reg\_loss (Variable): 检测框回归损失
* generate\_proposal\_labels (Variable): 图像信息
当 phase 为 'predict'时,包含:
* head_features (Variable): 所提取的特征
* rois (Variable): 提取的roi
* bbox\_out (Variable): 预测结果
* context\_prog (Program): 用于迁移学习的 Program。 * context\_prog (Program): 用于迁移学习的 Program。
```python ```python
......
...@@ -35,7 +35,7 @@ from faster_rcnn_resnet50_fpn_coco2017.roi_extractor import FPNRoIAlign ...@@ -35,7 +35,7 @@ from faster_rcnn_resnet50_fpn_coco2017.roi_extractor import FPNRoIAlign
summary= summary=
"Baidu's Faster-RCNN model for object detection, whose backbone is ResNet50, processed with Feature Pyramid Networks", "Baidu's Faster-RCNN model for object detection, whose backbone is ResNet50, processed with Feature Pyramid Networks",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class FasterRCNNResNet50RPN(hub.Module): class FasterRCNNResNet50RPN(hub.Module):
def _initialize(self): def _initialize(self):
# default pretrained model, Faster-RCNN with backbone ResNet50, shape of input tensor is [3, 800, 1333] # default pretrained model, Faster-RCNN with backbone ResNet50, shape of input tensor is [3, 800, 1333]
...@@ -161,7 +161,7 @@ class FasterRCNNResNet50RPN(hub.Module): ...@@ -161,7 +161,7 @@ class FasterRCNNResNet50RPN(hub.Module):
'is_crowd': var_prefix + is_crowd.name 'is_crowd': var_prefix + is_crowd.name
} }
outputs = { outputs = {
'head_feat': 'head_features':
var_prefix + head_feat.name, var_prefix + head_feat.name,
'rpn_cls_loss': 'rpn_cls_loss':
var_prefix + rpn_loss['rpn_cls_loss'].name, var_prefix + rpn_loss['rpn_cls_loss'].name,
...@@ -179,7 +179,7 @@ class FasterRCNNResNet50RPN(hub.Module): ...@@ -179,7 +179,7 @@ class FasterRCNNResNet50RPN(hub.Module):
'im_shape': var_prefix + im_shape.name 'im_shape': var_prefix + im_shape.name
} }
outputs = { outputs = {
'head_feat': var_prefix + head_feat.name, 'head_features': var_prefix + head_feat.name,
'rois': var_prefix + rois.name, 'rois': var_prefix + rois.name,
'bbox_out': var_prefix + pred.name 'bbox_out': var_prefix + pred.name
} }
......
...@@ -29,7 +29,7 @@ from retinanet_resnet50_fpn_coco2017.resnet import ResNet ...@@ -29,7 +29,7 @@ from retinanet_resnet50_fpn_coco2017.resnet import ResNet
summary= summary=
"Baidu's RetinaNet model for object detection, with backbone ResNet50 and FPN.", "Baidu's RetinaNet model for object detection, with backbone ResNet50 and FPN.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class RetinaNetResNet50FPN(hub.Module): class RetinaNetResNet50FPN(hub.Module):
def _initialize(self): def _initialize(self):
# default pretrained model of Retinanet_ResNet50_FPN, the shape of input image tensor is (3, 608, 608) # default pretrained model of Retinanet_ResNet50_FPN, the shape of input image tensor is (3, 608, 608)
......
...@@ -25,7 +25,7 @@ from ssd_mobilenet_v1_pascal.data_feed import reader ...@@ -25,7 +25,7 @@ from ssd_mobilenet_v1_pascal.data_feed import reader
type="cv/object_detection", type="cv/object_detection",
summary="SSD with backbone MobileNet_V1, trained with dataset Pasecal VOC.", summary="SSD with backbone MobileNet_V1, trained with dataset Pasecal VOC.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class SSDMobileNetv1(hub.Module): class SSDMobileNetv1(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
...@@ -25,7 +25,7 @@ from ssd_vgg16_300_coco2017.data_feed import reader ...@@ -25,7 +25,7 @@ from ssd_vgg16_300_coco2017.data_feed import reader
type="cv/object_detection", type="cv/object_detection",
summary="SSD with backbone VGG16, trained with dataset COCO.", summary="SSD with backbone VGG16, trained with dataset COCO.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class SSDVGG16(hub.Module): class SSDVGG16(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
...@@ -25,7 +25,7 @@ from ssd_vgg16_512_coco2017.data_feed import reader ...@@ -25,7 +25,7 @@ from ssd_vgg16_512_coco2017.data_feed import reader
type="cv/object_detection", type="cv/object_detection",
summary="SSD with backbone VGG16, trained with dataset COCO.", summary="SSD with backbone VGG16, trained with dataset COCO.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class SSDVGG16_512(hub.Module): class SSDVGG16_512(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
...@@ -26,7 +26,7 @@ from yolov3_darknet53_coco2017.yolo_head import MultiClassNMS, YOLOv3Head ...@@ -26,7 +26,7 @@ from yolov3_darknet53_coco2017.yolo_head import MultiClassNMS, YOLOv3Head
summary= summary=
"Baidu's YOLOv3 model for object detection, with backbone DarkNet53, trained with dataset coco2017.", "Baidu's YOLOv3 model for object detection, with backbone DarkNet53, trained with dataset coco2017.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class YOLOv3DarkNet53Coco2017(hub.Module): class YOLOv3DarkNet53Coco2017(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
...@@ -26,7 +26,7 @@ from yolov3_darknet53_pedestrian.yolo_head import MultiClassNMS, YOLOv3Head ...@@ -26,7 +26,7 @@ from yolov3_darknet53_pedestrian.yolo_head import MultiClassNMS, YOLOv3Head
summary= summary=
"Baidu's YOLOv3 model for pedestrian detection, with backbone DarkNet53.", "Baidu's YOLOv3 model for pedestrian detection, with backbone DarkNet53.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class YOLOv3DarkNet53Pedestrian(hub.Module): class YOLOv3DarkNet53Pedestrian(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
...@@ -26,7 +26,7 @@ from yolov3_darknet53_vehicles.yolo_head import MultiClassNMS, YOLOv3Head ...@@ -26,7 +26,7 @@ from yolov3_darknet53_vehicles.yolo_head import MultiClassNMS, YOLOv3Head
summary= summary=
"Baidu's YOLOv3 model for vehicles detection, with backbone DarkNet53.", "Baidu's YOLOv3 model for vehicles detection, with backbone DarkNet53.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class YOLOv3DarkNet53Vehicles(hub.Module): class YOLOv3DarkNet53Vehicles(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
...@@ -21,12 +21,12 @@ from yolov3_mobilenet_v1_coco2017.yolo_head import MultiClassNMS, YOLOv3Head ...@@ -21,12 +21,12 @@ from yolov3_mobilenet_v1_coco2017.yolo_head import MultiClassNMS, YOLOv3Head
@moduleinfo( @moduleinfo(
name="yolov3_mobilenet_v1_coco2017", name="yolov3_mobilenet_v1_coco2017",
version="1.1.0", version="1.0.0",
type="CV/object_detection", type="CV/object_detection",
summary= summary=
"Baidu's YOLOv3 model for object detection with backbone MobileNet_V1, trained with dataset COCO2017.", "Baidu's YOLOv3 model for object detection with backbone MobileNet_V1, trained with dataset COCO2017.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class YOLOv3MobileNetV1Coco2017(hub.Module): class YOLOv3MobileNetV1Coco2017(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
...@@ -21,12 +21,12 @@ from yolov3_resnet34_coco2017.yolo_head import MultiClassNMS, YOLOv3Head ...@@ -21,12 +21,12 @@ from yolov3_resnet34_coco2017.yolo_head import MultiClassNMS, YOLOv3Head
@moduleinfo( @moduleinfo(
name="yolov3_resnet34_coco2017", name="yolov3_resnet34_coco2017",
version="1.1.0", version="1.0.0",
type="CV/object_detection", type="CV/object_detection",
summary= summary=
"Baidu's YOLOv3 model for object detection with backbone ResNet34, trained with dataset coco2017.", "Baidu's YOLOv3 model for object detection with backbone ResNet34, trained with dataset coco2017.",
author="paddlepaddle", author="paddlepaddle",
author_email="") author_email="paddle-dev@baidu.com")
class YOLOv3DarkNet53Coco2017(hub.Module): class YOLOv3DarkNet53Coco2017(hub.Module):
def _initialize(self): def _initialize(self):
self.default_pretrained_model_path = os.path.join( self.default_pretrained_model_path = os.path.join(
......
name: faster_rcnn
dir: "modules/image/object_detection/faster_rcnn"
name: ssd
dir: "modules/image/object_detection/ssd"
name: yolov3
dir: "modules/image/object_detection/yolov3"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册