GstInference with ResNet

From RidgeRun Developer Wiki




Previous: Supported architectures/TinyYoloV3 Index Next: Supported architectures/MobileNet





Description

ResNet is a residual neural network, the difference with the traditional neural networks is that ResNet uses residual blocks. In traditional neural networks, each layer feeds into the next layer. In a network with residual blocks, each layer feeds into the next layer and directly into the layers about 2–3 hops away.

The following image shows the structure of the Residual learning:

Residual block [1]

Architecture

ResNet is a collection of residual blocks for different tasks, and ResNet is able to use a different number of layers.

Resnet architecture [2]


GStreamer Plugin

The Gstreamer plugin uses the pre-process and post-process described in the original paper. Please take into consideration that not all deep neural networks are trained the same even if they use the same model architecture. If the model is trained differently, details like label ordering, input dimensions, and color normalization can change.

This element was based on this TensorFlow repo. The pre-trained model used to test the element may be downloaded from our R2I Model Zoo for the different frameworks.

Pre-process

Input parameters:

  • Input size: 224 x 224
  • Format RGB

The pre-process consists of taking the input image and transforming it to the input size (by scaling, interpolation, cropping...) and subtract each pixel channel value by the mean.

Post-process

The model output is a float array of size 1000 containing the probability for each one of the ImageNet labels. The post-process consists of simply searching the highest probability on the array.

Examples

Please refer to the Inception section on the examples page.

References

  1. J. Redmon, S. Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun, “Deep Residual Learning for Image Recognition”, 2015.
  2. J. Redmon, S. Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun, “Deep Residual Learning for Image Recognition”, 2015.


Previous: Supported architectures/TinyYoloV3 Index Next: Supported architectures/MobileNet