mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Incorrect callback method argument for ObjectDetector.detect_async

Open nagok opened this issue 1 year ago • 3 comments

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

No

OS Platform and Distribution

Windows 10

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 3.11.8

MediaPipe version

0.10.11

Bazel version

No response

Solution

ObjectDetector

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

A Timestamp type value is passed to the third argument of the ObjectDetector.detect_async callback method. Further value is microsecond.

Describe the expected behaviour

milliseconds as an int

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

https://github.com/google-edge-ai/mediapipe-samples/blob/main/examples/object_detection/raspberry_pi/detect.py:62

  def save_result(result: vision.ObjectDetectorResult, unused_output_image: mp.Image, timestamp_ms: int):
      print(timestamp_ms)

Other info / Complete Logs

No response

nagok avatar Apr 22 '24 01:04 nagok

Hi @nagok,

We are having difficulty understanding the issue clearly. Could you please provide more details about the problem you are encountering?

Thank you!!

kuaashish avatar Apr 22 '24 06:04 kuaashish

created a pull request. #5341

nagok avatar Apr 23 '24 13:04 nagok

Hi @nagok,

We have assigned the PR for review and will update you if any updates becomes available.

Thank you!!

kuaashish avatar Apr 23 '24 13:04 kuaashish

Hi @nagok,

Thank you for bringing this to our attention. The PR has been successfully merged. As a result, we are closing this issue now.

kuaashish avatar May 09 '24 05:05 kuaashish

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar May 09 '24 05:05 google-ml-butler[bot]