code: def vgg_retinanet(
      num_classes,
      backbone="vgg16",
      inputs=None,
      modifier=None,
      **kwargs,
  ):
      """Constructs a retinanet model using a vgg backbone.
  
      Args
          num_classes: Number of classes to predict.
          backbone: Which backbone to use (one of ('vgg16', 'vgg19')).
          inputs: The inputs to the network (defaults to a Tensor of shape (None, None, 3)).
          modifier: A function handler which can modify the backbone before using it in retinanet (this can be used to freeze backbone layers for example).
  
      Returns
          RetinaNet model with a VGG backbone.
      """
      # choose default input
      if inputs is None:
          inputs = keras.layers.Input(shape=(None, None, 3))
  
      # create the vgg backbone
      if backbone == "vgg16":
          vgg = keras.applications.VGG16(
              input_tensor=inputs, include_top=False, weights=None
          )
      elif backbone == "vgg19":
          vgg = keras.applications.VGG19(
              input_tensor=inputs, include_top=False, weights=None
          )
      else:
          raise ValueError(
              "Backbone '{}' not recognized.".format(backbone)
          )
  
      if modifier:
          vgg = modifier(vgg)
  
      # create the full model
      layer_names = ["block3_pool", "block4_pool", "block5_pool"]
      layer_outputs = [
          vgg.get_layer(name).output for name in layer_names
      ]
  
      # C2 not provided
      backbone_layers = {
          "C3": layer_outputs[0],
          "C4": layer_outputs[1],
          "C5": layer_outputs[2],
      }
  
      return retinanet.retinanet(
          inputs=inputs,
          num_classes=num_classes,
          backbone_layers=backbone_layers,
          **kwargs,
      )
  
file_path: ImageAI/imageai_tf_deprecated/Detection/keras_retinanet/models/vgg.py
imports: from tensorflow import keras
  from .None import retinanet
  from .None import Backbone
  from ..utils.image import preprocess_image
label_desc: Use image node_id 1 for calling a global function with example usage: vgg_retinanet(num_classes, backbone, inputs, modifier) and returns: retinanet