pocketpose.models.body.movenet#

Module Contents#

Classes#

MoveNet

Base class for the MoveNet models.

MoveNetLightning

MoveNet Lightning model.

MoveNetLightningFP16

MoveNet Lightning model with float16 quantization.

MoveNetLightningINT8

MoveNet Lightning model with int8 quantization.

MoveNetThunder

MoveNet Thunder model.

MoveNetThunderFP16

MoveNet Thunder model with float16 quantization.

MoveNetThunderINT8

MoveNet Thunder model with int8 quantization.

class pocketpose.models.body.movenet.MoveNet(model_path: str, model_url: str, input_size: tuple)#

Bases: pocketpose.models.interfaces.TFLiteModel

Base class for the MoveNet models.

MoveNet is a lightweight pose estimation model developed by Google Research that runs on mobile devices. It uses a lightweight MobileNetV2 backbone and a Feature Pyramid Network (FPN) decoder together with CenterNet-style keypoint prediction heads. The model is trained on the COCO dataset and can detect 17 keypoints.

For more information, see the following links: - https://www.tensorflow.org/hub/tutorials/movenet - https://blog.tensorflow.org/2021/05/next-generation-pose-detection-with-movenet-and-tensorflowjs.html

postprocess_prediction(prediction, original_size)#

Postprocesses the prediction to get the keypoints.

Args:
prediction (Any): The raw prediction returned by the model. This can

be a single tensor or a tuple of tensors, depending on the model.

original_size (tuple): The original size of the input image as (height, width).

Returns:

The predicted keypoints as a list of (x, y, score) tuples.

class pocketpose.models.body.movenet.MoveNetLightning#

Bases: MoveNet

MoveNet Lightning model.

The Lightning model is the smallest MoveNet model and is intended for latency-critical applications.

class pocketpose.models.body.movenet.MoveNetLightningFP16#

Bases: MoveNet

MoveNet Lightning model with float16 quantization.

class pocketpose.models.body.movenet.MoveNetLightningINT8#

Bases: MoveNet

MoveNet Lightning model with int8 quantization.

class pocketpose.models.body.movenet.MoveNetThunder#

Bases: MoveNet

MoveNet Thunder model.

The Thunder model is the largest MoveNet model and is intended for high accuracy applications. This model gives better predictions than the Lightning variants, but is also slower.

class pocketpose.models.body.movenet.MoveNetThunderFP16#

Bases: MoveNet

MoveNet Thunder model with float16 quantization.

class pocketpose.models.body.movenet.MoveNetThunderINT8#

Bases: MoveNet

MoveNet Thunder model with int8 quantization.