google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://mediapipe.dev
Apache License 2.0
26.7k stars 5.07k forks source link

Adding Image to stream image_in was not ok: INVALID_ARGUMENT: Graph has errors #4654

Closed DevaPandiyan closed 12 months ago

DevaPandiyan commented 1 year ago

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

None

OS Platform and Distribution

Web Chrome

MediaPipe Tasks SDK version

0.10.2

Task name (e.g. Image classification, Gesture recognition etc.)

Image classification

Programming Language and version (e.g. C++, Python, Java)

javascript using react

Describe the actual behavior

image and video switch.  i switch  video rendering, then  after switch to image it shows an error

Describe the expected behaviour

image and video switch to get rendering images

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

Other info / Complete Logs

vision_wasm_internal.js:9 E0731 03:52:53.371000 1813520 gl_graph_runner_internal_image.cc:68] Adding Image to stream image_in was not ok: INVALID_ARGUMENT: Graph has errors: 
Packet timestamp mismatch on a calculator receiving from stream "norm_rect". Current minimum expected timestamp is 1690775569763001 but received 1690775569763000. Are you using a custom InputStreamHandler? Note that some InputStreamHandlers allow timestamps that are not strictly monotonically increasing. See for example the ImmediateInputStreamHandler class comment. [type.googleapis.com/mediapipe.StatusList='\n\xf5\x02\x08\x03\x12\xf0\x02Packet timestamp mismatch on a calculator receiving from stream \"norm_rect\". Current minimum expected timestamp is 1690775569763001 but received 1690775569763000. Are you using a custom InputStreamHandler? Note that some InputStreamHandlers allow timestamps that are not strictly monotonically increasing. See for example the ImmediateInputStreamHandler class comment.']
=== Source Location Trace: ===
third_party/mediapipe/framework/input_stream_manager.cc:139

vision_wasm_internal.js:9 E0731 03:52:53.372000 1813520 calculator_graph.cc:858] INVALID_ARGUMENT: CalculatorGraph::Run() failed in Run: 
Packet timestamp mismatch on a calculator receiving from stream "norm_rect". Current minimum expected timestamp is 1690775569763001 but received 1690775569763000. Are you using a custom InputStreamHandler? Note that some InputStreamHandlers allow timestamps that are not strictly monotonically increasing. See for example the ImmediateInputStreamHandler class comment. [type.googleapis.com/mediapipe.StatusList='\n\xf5\x02\x08\x03\x12\xf0\x02Packet timestamp mismatch on a calculator receiving from stream \"norm_rect\". Current minimum expected timestamp is 1690775569763001 but received 1690775569763000. Are you using a custom InputStreamHandler? Note that some InputStreamHandlers allow timestamps that are not strictly monotonically increasing. See for example the ImmediateInputStreamHandler class comment.']
=== Source Location Trace: ===
third_party/mediapipe/framework/input_stream_manager.cc:139
kuaashish commented 1 year ago

@DevaPandiyan,

Could you please elaborate your query with complete details? Also Please provide complete steps following from the documentation to reproduce the issue from our end. Thank you!

DevaPandiyan commented 1 year ago

Im Using with camera and Image when im switch to video to image multiple times that was not Detect in IMAGE it s showing error

Code :

async function handleClick(){
    if (runningModes === "IMAGE") {

        if (!face_landmarker) {
            console.log(" handllwclickWait for faceLandmarker to load before clicking!");
            return;
        }   
        // console.log('fa',canvasImageRef)

        var img = document.getElementById("FaceImage");
        console.log(img)
          if(img!=null){
              const faceLandmarkerResult =  await face_landmarker.detect(img);           
              onResultImage(faceLandmarkerResult,img)
          }
    }
}

Error:

vision_wasm_internal.js:9 E0731 03:52:53.371000 1813520 gl_graph_runner_internal_image.cc:68] Adding Image to stream image_in was not ok: INVALID_ARGUMENT: Graph has errors: Packet timestamp mismatch on a calculator receiving from stream "norm_rect". Current minimum expected timestamp is 1690775569763001 but received 1690775569763000. Are you using a custom InputStreamHandler? Note that some InputStreamHandlers allow timestamps that are not strictly monotonically increasing. See for example the ImmediateInputStreamHandler class comment. [type.googleapis.com/mediapipe.StatusList='\n\xf5\x02\x08\x03\x12\xf0\x02Packet timestamp mismatch on a calculator receiving from stream \"norm_rect\". Current minimum expected timestamp is 1690775569763001 but received 1690775569763000. Are you using a custom InputStreamHandler? Note that some InputStreamHandlers allow timestamps that are not strictly monotonically increasing. See for example the ImmediateInputStreamHandler class comment.'] === Source Location Trace: === third_party/mediapipe/framework/input_stream_manager.cc:139

schmidt-sebastian commented 1 year ago

Are you using "video" mode at all or does this issue occur with just "image" mode?

spennihana commented 12 months ago

I reported a similar issue (#4769) and after switching to runningMode=IMAGE, I no longer see these errors.

DevaPandiyan commented 12 months ago

Yeah i fixed it

google-ml-butler[bot] commented 12 months ago

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