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 as well as the locations of human joints for a given image:
Inspect the prediction keys:
The "ObjectDetection" key contains the coordinates of the detected objects as well as their confidences and classes:
The "KeypointEstimation" key contains the locations of the top predicted keypoints:
The "KeypointConfidence" key contains the confidences for each person’s keypoints:
Inspect the predicted keypoint locations:
Visualize the keypoints:
Visualize the keypoints grouped by person:
Visualize the keypoints grouped by a keypoint type:
Define a function to combine the keypoints into a skeleton shape:
Visualize the pose keypoints, object detections and human skeletons:
Network result
The network computes eight thousand four hundred bounding boxes, the position of the keypoints with their probabilities and the probability of an object inside the box:
Rescale the "KeyPoints" to the coordinates of the input image and visualize them scaled and colored by their probability measures:
Overlay the heat map on the image:
Rescale the bounding boxes to the coordinates of the input image and visualize them scaled by their "Objectness" measures:
Superimpose the 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: