Skip to content

Latest commit

 

History

History
122 lines (86 loc) · 3.27 KB

File metadata and controls

122 lines (86 loc) · 3.27 KB

Models

Deeplodocus comes packaged with some pre-defined neural network architectures:

  • LeNet
  • Darknet-53
  • Darknet-19 (coming soon)
  • YOLOv3 (coming soon)

Use entries in the config/model.yaml file to specify the model you wish to load (see Config.md for more details).

Deeplodocus in-house models can be found in deeplodocus.app.models

Darknet-53

Original paper: https://pjreddie.com/media/files/papers/YOLOv3.pdf

Python example:

Darknet53(num_channels=3, include_top=True, num_classes=80)

Config example:

name: Darknet53
module: deeplodocus.app.models.darknet

# Default kwargs     
kwargs:                                     
  num_channels: 3
  include_top: True
  num_classes: 80
  • num_channels: (int) specify the number of channels in the input images.

  • include_top: (bool) specify whether the network should be define with or without its fully-connected classifying layer.

  • num_classes: (int) [only used of include_top is True] specify the number of output classes at the output of the fully-connected classifier layer.

NB: Darknet53 does not require the specification of input height or width, (due to the use of global pooling after convolution). Inputs are downsampled by a factor of 32, therefore input height and width must each be a multiple of 32.

Darknet-19 (COMING SOON)

Original paper: https://pjreddie.com/media/files/papers/YOLOv3.pdf

Darknet19(num_channels=3, include_top=True, num_classes=80)

Config Example:

name: Darknet19                             
module: deeplodocus.app.models.darknet 

# Default kwargs     
kwargs:                                     
  num_channels: 3
  include_top: True
  num_classes: 80
  • num_channels: (int) specify the number of channels in the input images.

  • include_top: (bool) specify whether the network should be define with or without its fully-connected classifying layer.

  • num_classes: (int) [only used of include_top is True] specify the number of output classes at the output of the fully-connected classifier layer.

YOLO v3 (COMING SOON)

Original Paper: https://pjreddie.com/media/files/papers/YOLOv3.pdf

Python example:

YOLOv3(
    backbone={
        name: "Darknet53",
        module: "deeplodocus.app.models.darknet",
        kwargs: {
            num_channels: 3,
            include_top: False}}, 
    num_classes=80, 
    skip_layers=(36, 61), 
    num_anchors=3, 
    image_shape=(256, 256))

Config example:

name: YOLOv3
module: deeplodocus.app.models.yolokwargs:

# Default kwargs:
kwargs:
  backbone:
    name: Darknet53
    module: deeplodocus.app.models.darknet 
    kwargs: 
      num_channels: 1
      include_top: False
  num_classes: 80
  image_shape: [256, 256]
  • backbone: (dict) specify the backbone architecture.

    • name: (str): Name of the PyTorch model (nn.Module)

    • module: (str): Location of the module

    • kwargs: (dict):

      • (These depend on which backbone you have specified)
  • include_top: (bool) specify whether the network should be define with or without its fully-connected classifying layer.

  • num_classes: (int) specify the number of unique object classes.

  • image_shape: (list of ints) specify the input shape of the image (width, height).