Resource retrieval
Get the pre-trained net:
NetModel parameters
This model consists of a family of individual nets, each identified by a specific parameter combination. Inspect the available parameters:
Pick a non-default net by specifying the parameters:
Pick a non-default uninitialized net:
Evaluation function
Write an evaluation function to scale the result to the input image size and suppress the least probable detections:
Basic usage
Obtain the detected bounding boxes with their corresponding classes and confidences for a given image:
The model's output is an Association containing the detected "Boxes" and "Classes":
The "Boxes" key is a list of Rectangle expressions corresponding to the bounding boxes of the detected objects:
The "Classes" key contains the classes of the detected objects:
Visualize the detection:
Network result
The network computes eight thousand four hundred bounding boxes and the probability that the object is of any given class:
Visualize the bounding boxes scaled by their class probabilities:
Visualize all the boxes scaled by the probability that they contain a person:
Superimpose the person predictions on top of the input received by the net:
Net information
Inspect the number of parameters of all arrays in the net:
Obtain the total number of parameters:
Obtain the layer type counts:
Display the summary graphic:
Export to ONNX
Export the net to the ONNX format:
Get the size of the ONNX file:
The size is similar to the byte count of the resource object:
Check some metadata of the ONNX model:
Import the model back into Wolfram Language. However, the NetEncoder and NetDecoder will be absent because they are not supported by ONNX: