sign / translate

Effortless Real-Time Sign Language Translation
https://sign.mt
Other
489 stars 83 forks source link

Can't open HUGE `.pose` files #44

Closed AmitMY closed 2 years ago

AmitMY commented 2 years ago

Current Behavior

When opening small .pose files with the site, it works just fine, however, when trying to open very large files (half an hour of pose), it breaks.

Expected Behavior

Site should be able to present arbitrarily long .pose files.

Steps To Reproduce

  1. Generate a HUGE pose file (100,000 frames, 500 keypoints, 3 dimensions)
  2. Drag and drop on sign.mt

Environment

Additional context

Console error:

core.mjs:6494 ERROR Error: Uncaught (in promise): RangeError: Invalid array length RangeError: Invalid array length

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length

AmitMY commented 2 years ago

Implemented hacky support: https://github.com/AmitMY/pose-format/commit/1cc77b98d8e6bb71931c20539e3698cf901c9a16

Hack not implemented for confidence, so it might fail for files with more than 150K frames, but the binary-parser people might fix it, so no hacks are necessary.


Additionally, expecting this to be the next bottleneck: https://github.com/sign/translate/pull/30 As each generated frame buffer is currently stored in memory, and not encoded directly.

AmitMY commented 2 years ago

Implemented the hack for the confidence as well https://github.com/AmitMY/pose-format/commit/6b5d569eaeb72b8803a738d2a13b3093c2a6572b