diff --git a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/README.md b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/README.md index 54e63349ca2cf568d2b492686e7d663976e9c8bf..c23e28dbe6a5416e116655b357cb9db67f35c6d2 100644 --- a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/README.md +++ b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/README.md @@ -17,7 +17,7 @@ def context(num_classes=81, phase='train') ``` -提取头部特征,用于迁移学习。 +提取特征,用于迁移学习。 **参数** @@ -28,10 +28,28 @@ def context(num_classes=81, **返回** -* inputs (dict): 模型的输入,keys 包括 'image', 'im\_size',相应的取值为: - * image (Variable): 图像变量 - * im\_size (Variable): 图片的尺寸 -* outputs (dict): 模型的输出。如果 get\_prediction 为 False,输出 'head\_fatures',否则输出 'bbox\_out'。 +* inputs (dict): 模型的输入,相应的取值为: + 当 phase 为 'train'时,包含: + * image (Variable): 图像变量 + * 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。 ```python diff --git a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/module.py b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/module.py index 0a8a3818f2f0c11f6cfce43b8765d0ca630e66d7..3378cb0bf872a93047998800223e005863485408 100644 --- a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/module.py +++ b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_coco2017/module.py @@ -34,7 +34,7 @@ from faster_rcnn_resnet50_coco2017.roi_extractor import RoIAlign summary= "Baidu's Faster R-CNN model for object detection with backbone ResNet50, trained with dataset COCO2017", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class FasterRCNNResNet50(hub.Module): def _initialize(self): # default pretrained model, Faster-RCNN with backbone ResNet50, shape of input tensor is [3, 800, 1333] @@ -160,7 +160,7 @@ class FasterRCNNResNet50(hub.Module): 'is_crowd': var_prefix + is_crowd.name } outputs = { - 'head_feat': + 'head_features': var_prefix + head_feat.name, 'rpn_cls_loss': var_prefix + rpn_loss['rpn_cls_loss'].name, @@ -178,7 +178,7 @@ class FasterRCNNResNet50(hub.Module): 'im_shape': var_prefix + im_shape.name } outputs = { - 'head_feat': var_prefix + head_feat.name, + 'head_features': var_prefix + head_feat.name, 'rois': var_prefix + rois.name, 'bbox_out': var_prefix + pred.name } diff --git a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/README.md b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/README.md index 682f5e46e1d4a0052a0810395e9d492af50b0f44..c7864ae963da60e7938240ee1d47e1b57ee95382 100644 --- a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/README.md +++ b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/README.md @@ -17,7 +17,7 @@ def context(num_classes=81, phase='train') ``` -提取头部特征,用于迁移学习。 +提取特征,用于迁移学习。 **参数** @@ -28,10 +28,28 @@ def context(num_classes=81, **返回** -* inputs (dict): 模型的输入,keys 包括 'image', 'im\_size',相应的取值为: - * image (Variable): 图像变量 - * im\_size (Variable): 图片的尺寸 -* outputs (dict): 模型的输出。如果 get\_prediction 为 False,输出 'head\_fatures',否则输出 'bbox\_out'。 +* inputs (dict): 模型的输入,相应的取值为: + 当 phase 为 'train'时,包含: + * image (Variable): 图像变量 + * 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。 ```python diff --git a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/module.py b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/module.py index 3c2751b5f32acd502a5a247388016771f059d220..67ddca2f4132f3aeea0211fa0cefbf22dc3a0fb5 100644 --- a/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/module.py +++ b/hub_module/modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/module.py @@ -35,7 +35,7 @@ from faster_rcnn_resnet50_fpn_coco2017.roi_extractor import FPNRoIAlign summary= "Baidu's Faster-RCNN model for object detection, whose backbone is ResNet50, processed with Feature Pyramid Networks", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class FasterRCNNResNet50RPN(hub.Module): def _initialize(self): # default pretrained model, Faster-RCNN with backbone ResNet50, shape of input tensor is [3, 800, 1333] @@ -161,7 +161,7 @@ class FasterRCNNResNet50RPN(hub.Module): 'is_crowd': var_prefix + is_crowd.name } outputs = { - 'head_feat': + 'head_features': var_prefix + head_feat.name, 'rpn_cls_loss': var_prefix + rpn_loss['rpn_cls_loss'].name, @@ -179,7 +179,7 @@ class FasterRCNNResNet50RPN(hub.Module): 'im_shape': var_prefix + im_shape.name } outputs = { - 'head_feat': var_prefix + head_feat.name, + 'head_features': var_prefix + head_feat.name, 'rois': var_prefix + rois.name, 'bbox_out': var_prefix + pred.name } diff --git a/hub_module/modules/image/object_detection/retinanet_resnet50_fpn_coco2017/module.py b/hub_module/modules/image/object_detection/retinanet_resnet50_fpn_coco2017/module.py index d49dcfe6deaf1739f1c140dd57b632beae978474..9ec5ef702e42281773defe3e4934b1d65423737e 100644 --- a/hub_module/modules/image/object_detection/retinanet_resnet50_fpn_coco2017/module.py +++ b/hub_module/modules/image/object_detection/retinanet_resnet50_fpn_coco2017/module.py @@ -29,7 +29,7 @@ from retinanet_resnet50_fpn_coco2017.resnet import ResNet summary= "Baidu's RetinaNet model for object detection, with backbone ResNet50 and FPN.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class RetinaNetResNet50FPN(hub.Module): def _initialize(self): # default pretrained model of Retinanet_ResNet50_FPN, the shape of input image tensor is (3, 608, 608) diff --git a/hub_module/modules/image/object_detection/ssd_mobilenet_v1_pascal/module.py b/hub_module/modules/image/object_detection/ssd_mobilenet_v1_pascal/module.py index 6b790ed09d4177f912ef5f4087f5d08441db2440..3810a7b6447be5532e808db35b88882a8b4b5689 100644 --- a/hub_module/modules/image/object_detection/ssd_mobilenet_v1_pascal/module.py +++ b/hub_module/modules/image/object_detection/ssd_mobilenet_v1_pascal/module.py @@ -25,7 +25,7 @@ from ssd_mobilenet_v1_pascal.data_feed import reader type="cv/object_detection", summary="SSD with backbone MobileNet_V1, trained with dataset Pasecal VOC.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class SSDMobileNetv1(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/modules/image/object_detection/ssd_vgg16_300_coco2017/module.py b/hub_module/modules/image/object_detection/ssd_vgg16_300_coco2017/module.py index 09e50aa7d14b76ddd921dee4f707971666e0827c..f46ee36418c014adc32a9b2d3fefd4abef7723a4 100644 --- a/hub_module/modules/image/object_detection/ssd_vgg16_300_coco2017/module.py +++ b/hub_module/modules/image/object_detection/ssd_vgg16_300_coco2017/module.py @@ -25,7 +25,7 @@ from ssd_vgg16_300_coco2017.data_feed import reader type="cv/object_detection", summary="SSD with backbone VGG16, trained with dataset COCO.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class SSDVGG16(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/modules/image/object_detection/ssd_vgg16_512_coco2017/module.py b/hub_module/modules/image/object_detection/ssd_vgg16_512_coco2017/module.py index 0f81e12172e3601d3076dda7da94afa63aeeccbb..307d569b88ad108589dccf73e948a05d3dbd2712 100644 --- a/hub_module/modules/image/object_detection/ssd_vgg16_512_coco2017/module.py +++ b/hub_module/modules/image/object_detection/ssd_vgg16_512_coco2017/module.py @@ -25,7 +25,7 @@ from ssd_vgg16_512_coco2017.data_feed import reader type="cv/object_detection", summary="SSD with backbone VGG16, trained with dataset COCO.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class SSDVGG16_512(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/modules/image/object_detection/yolov3_darknet53_coco2017/module.py b/hub_module/modules/image/object_detection/yolov3_darknet53_coco2017/module.py index e919d4a609acb405c7b344730cab050e269e35c7..030f8a7610bf86d486ff55859b7202d39994dd7c 100644 --- a/hub_module/modules/image/object_detection/yolov3_darknet53_coco2017/module.py +++ b/hub_module/modules/image/object_detection/yolov3_darknet53_coco2017/module.py @@ -26,7 +26,7 @@ from yolov3_darknet53_coco2017.yolo_head import MultiClassNMS, YOLOv3Head summary= "Baidu's YOLOv3 model for object detection, with backbone DarkNet53, trained with dataset coco2017.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class YOLOv3DarkNet53Coco2017(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/modules/image/object_detection/yolov3_darknet53_pedestrian/module.py b/hub_module/modules/image/object_detection/yolov3_darknet53_pedestrian/module.py index 2a071ea49600afca2a49167004633d5a0e874048..417dadeb938660502fdd7ec0b3adb4ef396d4b4e 100644 --- a/hub_module/modules/image/object_detection/yolov3_darknet53_pedestrian/module.py +++ b/hub_module/modules/image/object_detection/yolov3_darknet53_pedestrian/module.py @@ -26,7 +26,7 @@ from yolov3_darknet53_pedestrian.yolo_head import MultiClassNMS, YOLOv3Head summary= "Baidu's YOLOv3 model for pedestrian detection, with backbone DarkNet53.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class YOLOv3DarkNet53Pedestrian(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/modules/image/object_detection/yolov3_darknet53_vehicles/module.py b/hub_module/modules/image/object_detection/yolov3_darknet53_vehicles/module.py index 668f2799a6254f2e06d43460aa45657a389b447f..7b2b04059e1af7f451f95281622ff3eca833982e 100644 --- a/hub_module/modules/image/object_detection/yolov3_darknet53_vehicles/module.py +++ b/hub_module/modules/image/object_detection/yolov3_darknet53_vehicles/module.py @@ -26,7 +26,7 @@ from yolov3_darknet53_vehicles.yolo_head import MultiClassNMS, YOLOv3Head summary= "Baidu's YOLOv3 model for vehicles detection, with backbone DarkNet53.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class YOLOv3DarkNet53Vehicles(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/modules/image/object_detection/yolov3_mobilenet_v1_coco2017/module.py b/hub_module/modules/image/object_detection/yolov3_mobilenet_v1_coco2017/module.py index f6adf130b99270f1da94646930b15e4d5c1091c4..6860ad6a67dd3910013133ec1b634d8f61110486 100644 --- a/hub_module/modules/image/object_detection/yolov3_mobilenet_v1_coco2017/module.py +++ b/hub_module/modules/image/object_detection/yolov3_mobilenet_v1_coco2017/module.py @@ -21,12 +21,12 @@ from yolov3_mobilenet_v1_coco2017.yolo_head import MultiClassNMS, YOLOv3Head @moduleinfo( name="yolov3_mobilenet_v1_coco2017", - version="1.1.0", + version="1.0.0", type="CV/object_detection", summary= "Baidu's YOLOv3 model for object detection with backbone MobileNet_V1, trained with dataset COCO2017.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class YOLOv3MobileNetV1Coco2017(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/modules/image/object_detection/yolov3_resnet34_coco2017/module.py b/hub_module/modules/image/object_detection/yolov3_resnet34_coco2017/module.py index 58a91390908700a1a2fd529b3c520b905c961d7f..fd70b918ffcdd1a54e740cc0ecb9e6ec01426f72 100644 --- a/hub_module/modules/image/object_detection/yolov3_resnet34_coco2017/module.py +++ b/hub_module/modules/image/object_detection/yolov3_resnet34_coco2017/module.py @@ -21,12 +21,12 @@ from yolov3_resnet34_coco2017.yolo_head import MultiClassNMS, YOLOv3Head @moduleinfo( name="yolov3_resnet34_coco2017", - version="1.1.0", + version="1.0.0", type="CV/object_detection", summary= "Baidu's YOLOv3 model for object detection with backbone ResNet34, trained with dataset coco2017.", author="paddlepaddle", - author_email="") + author_email="paddle-dev@baidu.com") class YOLOv3DarkNet53Coco2017(hub.Module): def _initialize(self): self.default_pretrained_model_path = os.path.join( diff --git a/hub_module/scripts/configs/faster_rcnn.yml b/hub_module/scripts/configs/faster_rcnn.yml deleted file mode 100644 index e17c6ba77532841713f26f26e66ed0ad12e2de34..0000000000000000000000000000000000000000 --- a/hub_module/scripts/configs/faster_rcnn.yml +++ /dev/null @@ -1,2 +0,0 @@ -name: faster_rcnn -dir: "modules/image/object_detection/faster_rcnn" diff --git a/hub_module/scripts/configs/ssd.yml b/hub_module/scripts/configs/ssd.yml deleted file mode 100644 index 039e71f8b80c5aa5168796e60cbb9b85275a76d2..0000000000000000000000000000000000000000 --- a/hub_module/scripts/configs/ssd.yml +++ /dev/null @@ -1,2 +0,0 @@ -name: ssd -dir: "modules/image/object_detection/ssd" diff --git a/hub_module/scripts/configs/yolov3.yml b/hub_module/scripts/configs/yolov3.yml deleted file mode 100644 index f6cca63104f52491b270593f4600f66226233e5f..0000000000000000000000000000000000000000 --- a/hub_module/scripts/configs/yolov3.yml +++ /dev/null @@ -1,2 +0,0 @@ -name: yolov3 -dir: "modules/image/object_detection/yolov3"