SSDMobileNetV1

This model is a real-time neural network for object detection that detects 80 different classes (labels are available in org.jetbrains.kotlinx.dl.dataset.handler.cocoCategoriesForSSD).

SSD-MobilenetV1 is an object detection model that uses a Single Shot MultiBox Detector (SSD) approach to predict object classes for boundary boxes.

SSD is a CNN that enables the model to only need to take one single shot to detect multiple objects in an image, and MobileNet is a CNN base network that provides high-level features for object detection. The combination of these two model frameworks produces an efficient, high-accuracy detection model that requires less computational cost.

The model have an input with the shape is (1xHxWx3). H and W could be defined by user. H = W = 1000 by default.

The model has 4 outputs:

  • num_detections: the number of detections.

  • detection_boxes: a list of bounding boxes. Each list item describes a box with top, left, bottom, right relative to the image size.

  • detection_scores: the score for each detection with values between 0 and 1 representing probability that a class was detected.

  • detection_classes: Array of 10 integers (floating point values) indicating the index of a class label from the COCO class.

See also

Functions

model
Link copied to clipboard
open fun model(modelHub: ModelHub): OnnxInferenceModel
preInit
Link copied to clipboard
open override fun preInit(): SSDMobileNetV1ObjectDetectionModel
preprocessInput
Link copied to clipboard
open fun preprocessInput(imageFile: File, preprocessing: Preprocessing): FloatArray
open override fun preprocessInput(data: FloatArray, tensorShape: LongArray): FloatArray
pretrainedModel
Link copied to clipboard
open override fun pretrainedModel(modelHub: ModelHub): SSDMobileNetV1ObjectDetectionModel

Properties

channelsFirst
Link copied to clipboard
open override val channelsFirst: Boolean
modelRelativePath
Link copied to clipboard
open override val modelRelativePath: String