j20001970 / GDMP-demo

Demo project for GDMP plugin.
MIT License
17 stars 3 forks source link

The application crashes while start detecting my hands in Gesture Recornizer #19

Open projectnowhub opened 1 month ago

projectnowhub commented 1 month ago

Hi, I am new to Godot, when running the GDMP Demo, while running the Gesture Recognizer, the application crashes when it starts to recognize/detects my hands from Live Camera. I have attached the Errors below for your reference:

image

j20001970 commented 1 month ago

Hi, have you checked the timestamp_ms variable in GestureRecognizer.gd line 34 is actually monotonically increasing? The variable should be provided by Time.get_ticks_msec() of the engine, if it is not working as expected there might have bigger problems.

projectnowhub commented 1 month ago

func process_camera_frame(image: MediaPipeImage, timestamp_ms: int) -> void: print(timestamp_ms) task.recognize_async(image, timestamp_ms)

I printed the timestamp. And getting the following output: Godot Engine v4.2.2.stable.official.15073afe3 - https://godotengine.org OpenGL API 4.6 (Core Profile) Mesa 24.0.9-0ubuntu0.1 - Compatibility - Using Device: Intel - Mesa Intel(R) UHD Graphics 620 (KBL GT2)

7504 7505 7552 7620 7688 7752 7822 7888 7952 8020 8088 8152 8223 8288 8355 8420 8488 8553 8620 8688 8752 8820 8888 8924 8956 8992 9024 9060 9096 9128 9164 9202 9232 9268 9300 9336 9372 9404 9440 9472 9508 9544 9576 9612 9648 9680 9716 9748 9784 9816 9848 9884 9916 9948 9984 10016 10048 10084 10116 10148 10184 10216 10252 10284 10316 10352 10384 10416 10452 10484 10516 10552 --- Debugging process stopped ---

j20001970 commented 1 month ago

func process_camera_frame(image: MediaPipeImage, timestamp_ms: int) -> void: print(timestamp_ms) task.recognize_async(image, timestamp_ms)

I printed the timestamp. And getting the following output: Godot Engine v4.2.2.stable.official.15073afe3 - https://godotengine.org OpenGL API 4.6 (Core Profile) Mesa 24.0.9-0ubuntu0.1 - Compatibility - Using Device: Intel - Mesa Intel(R) UHD Graphics 620 (KBL GT2)

7504 7505 7552 7620 7688 7752 7822 7888 7952 8020 8088 8152 8223 8288 8355 8420 8488 8553 8620 8688 8752 8820 8888 8924 8956 8992 9024 9060 9096 9128 9164 9202 9232 9268 9300 9336 9372 9404 9440 9472 9508 9544 9576 9612 9648 9680 9716 9748 9784 9816 9848 9884 9916 9948 9984 10016 10048 10084 10116 10148 10184 10216 10252 10284 10316 10352 10384 10416 10452 10484 10516 10552 --- Debugging process stopped ---

Looks like the timestamp is working as expected, but I'm unable to reproduce your issue.

Can you check the following:

  1. Have you modified the script in the demo?
  2. Have you tried building the library from source?
  3. Does using virtual webcam (e.g. v4l2loopback) for gesture recognizer have the same problem as using actual webcam?
  4. Have you tried loading the video file to see if timestamp issue persist?
projectnowhub commented 1 week ago

1) No. 2) No, Please let me know where i can find the documentation to build the library from source. 3) Yes, i have tried. 4) And it crashes for Videos and Image also.

Note: The face detector, Face landmarker and hand landmarker are working perfectly. But only in gesture recognizer, when it detects my hands then the application terminating.

j20001970 commented 1 week ago
  1. No.

    1. No, Please let me know where i can find the documentation to build the library from source.

    2. Yes, i have tried.

    3. And it crashes for Videos and Image also.

Note: The face detector, Face landmarker and hand landmarker are working perfectly. But only in gesture recognizer, when it detects my hands then the application terminating.

Thanks for the feedback, it's strange that only specific task fails to run. I re-read your problem description, you mentioned the project crashed upon detecting the presence of hands. There should be some error messages outside the editor when the crash happen, you can try opening Godot editor in terminal, and see if relevant output appear after project crashed.

In the meantime, it'll be appreciated if you can provide the details of distro you are using, I would like to try if I can reproduce the crash.

The library build instruction can be found on source repository of GDMP https://github.com/j20001970/GDMP/blob/master/docs/BUILDING.md