Skip to content

Latest commit

 

History

History
94 lines (60 loc) · 2.75 KB

File metadata and controls

94 lines (60 loc) · 2.75 KB

resnet50_vd_10w

Module Name resnet50_vd_10w
Category image classification
Network ResNet_vd
Dataset Baidu Dataset
Fine-tuning supported or not No
Module Size 92MB
Latest update date -
Data indicators -

I.Basic Information

  • Module Introduction

    • ResNet proposed a residual unit to solve the problem of training an extremely deep network, and improved the prediction accuracy of models. ResNet-vd is a variant of ResNet. This module is based on ResNet_vd, trained on Baidu dataset(consists of 100 thousand classes, 40 million pairs of data), and can predict an image of size 2242243.

II.Installation

III.Module API Prediction

  • 1、Prediction Code Example

    • import paddlehub as hub
      import cv2
      
      classifier = hub.Module(name="resnet50_vd_10w")
      input_dict, output_dict, program = classifier.context(trainable=True)
  • 2、API

    • def context(trainable=True, pretrained=True)
      • Parameters

        • trainable (bool): whether parameters are trainable;
        • pretrained (bool): whether load the pre-trained model.
      • Return

        • inputs (dict): model inputs,key is 'image', value is the image tensor;
        • outputs (dict): model outputs,key is 'classification' and 'feature_map',values:
          • classification (paddle.fluid.framework.Variable): classification result;
          • feature_map (paddle.fluid.framework.Variable): feature map extracted by model.
        • context_prog(fluid.Program): computation graph, used for transfer learning.
    • def save_inference_model(dirname,
                               model_filename=None,
                               params_filename=None,
                               combined=True)
      • Parameters
        • dirname: output dir for saving model;
        • model_filename: filename of model, default is __model__;
        • params_filename: filename of parameters,default is __params__(only effective when combined is True);
        • combined: whether save parameters into one file

V.Release Note

  • 1.0.0

    First release

    • $ hub install resnet50_vd_10w==1.0.0