Skip to content

poseLandmarksStream sometimes generating an empty packet when observeTimestampBounds = true #642

@Kasra-G

Description

@Kasra-G

Plugin Version or Commit ID

v0.10.0

Unity Version

2021.3.3f1

Your Host OS

Windows 10

Target Platform

Windows Standalone

Target Device

No response

[Windows Only] Visual Studio C++ and Windows SDK Version

Visual Studio C++: 14.29.30139.0
Windows SDK: 10.0.17763

[Linux Only] GCC/G++ and GLIBC Version

No response

[Android Only] Android Build Tools and NDK Version

No response

[iOS Only] XCode Version

No response

Build Command

python build.py build --desktop cpu -vv

Bug Description

In the documentation, it says that setting observeTimestampBounds to true will generate an empty packet if mediapipe does not find a detection. However, I noticed that for some streams (poseLandmarkStream in PoseTrackingSolution, there could be more in other solutions), an empty packet is prepended to the detection packet, seemingly at random. This does not happen often, approximately 2-5 times in a 200 image sequence that all produce detections, but it does mean that the empty packets cannot be relied on to determine if a detection failed.

Steps to Reproduce the Bug

  1. Write a simple if statement in PoseTrackingGraph.TryGetNext() that checks when poseLandmark is null and print out all of the values (or set a breakpoint)
  2. run a sequence of 200+ images (that all would produce a detection from Mediapipe) through PoseTrackingSolution in Sync mode
  3. Debug and eventually you will find images that produced null values for poseLandmark (meaning an empty packet was grabbed), but roiFromLandmarks and poseWorldLandmarks will have values.

Switch off observeTimestampBounds on the poseLandmarksStream to false and this no longer happens.

Log

Unfortunately the log file contains sensitive information, so I am not permitted to share.

Screenshot/Video

No response

Additional Context

Workaround

image
Adding lines 126 to 129 in PoseTrackingGraph will successfully workaround the issue (for Pose), but it would be better if the empty packets were not generated in the first place

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions