Skip to content

Log warning polluting my console with "New timestamp is equal or less than the last one" #5726

Open
@RossLote

Description

@RossLote

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

No

OS Platform and Distribution

MacOS 15.0.1

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

No response

Programming Language and version

Python

MediaPipe version

0.10.18

Bazel version

No response

Solution

Pose

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

Outputs too many warning

Describe the expected behaviour

Don't do that

Standalone code/steps you may have used to try to get what you need

model_path = get_model_path("pose_landmarker_heavy.task")

BaseOptions = mp.tasks.BaseOptions
PoseLandmarker = mp.tasks.vision.PoseLandmarker
PoseLandmarkerOptions = mp.tasks.vision.PoseLandmarkerOptions
VisionRunningMode = mp.tasks.vision.RunningMode

options = PoseLandmarkerOptions(
    base_options=BaseOptions(model_asset_path=model_path),
    running_mode=VisionRunningMode.LIVE_STREAM,
    result_callback=result_callback,
)
landmarker = PoseLandmarker.create_from_options(options)

while True:
  // get frame
  mp_image = mp.Image(image_format=mp.ImageFormat.SRGB, data=frame.image)
  timestamp = mp.Timestamp.from_seconds(
    frame.frame_timestamp.timestamp()
  ).microseconds()
  logger.debug(f"Predicting pose at timestamp: {timestamp}")
  landmarker.detect_async(mp_image, timestamp)

If you check the logs you will see that my timestamps are incrementing.
These logs are really annoying as they make printing to the console pointless as there are 1000's every second.



### Other info / Complete Logs

```shell
My debug log shows:

2024-11-12 23:39:35,100:DEBUG:Predicting pose at timestamp: 1731454775050570
2024-11-12 23:39:35,157:DEBUG:Predicting pose at timestamp: 1731454775057239
2024-11-12 23:39:35,218:DEBUG:Predicting pose at timestamp: 1731454775060507
2024-11-12 23:39:35,268:DEBUG:Predicting pose at timestamp: 1731454775183180
2024-11-12 23:39:35,394:DEBUG:Predicting pose at timestamp: 1731454775186423
2024-11-12 23:39:35,446:DEBUG:Predicting pose at timestamp: 1731454775359237
2024-11-12 23:39:35,638:DEBUG:Predicting pose at timestamp: 1731454775591741
2024-11-12 23:39:35,692:DEBUG:Predicting pose at timestamp: 1731454775599519
2024-11-12 23:39:35,864:DEBUG:Predicting pose at timestamp: 1731454775812444
2024-11-12 23:39:35,919:DEBUG:Predicting pose at timestamp: 1731454775819363
2024-11-12 23:39:36,104:DEBUG:Predicting pose at timestamp: 1731454776050883
2024-11-12 23:39:36,159:DEBUG:Predicting pose at timestamp: 1731454776059214

The warnings in the terminal show:

W0000 00:00:1731454775.946410 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946414 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946418 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946423 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946429 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946433 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946437 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946441 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946446 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946451 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454775.946455 62858690 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454776.022882 62858682 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454776.022939 62858682 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454776.022947 62858682 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454776.022952 62858682 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454776.022895 62858691 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454776.022970 62858691 one_euro_filter.cc:32] New timestamp is equal or less than the last one.
W0000 00:00:1731454776.022978 62858691 one_euro_filter.cc:32] New timestamp is equal or less than the last one.

Metadata

Metadata

Labels

os:macOSIssues on MacOSplatform:pythonMediaPipe Python issuesstat:awaiting googlerWaiting for Google Engineer's Responsetask:pose landmarkerIssues related to Pose Landmarker: Find people and body positionstype:bugBug in the Source Code of MediaPipe Solution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions