This PR cherry picks Neeraj's ML related changes from the web_face_v2
branch.
Similar to https://github.com/ente-io/ente/pull/1399, this gets us one
step closer to integrating ONNX-YOLO with our desktop app. But it is not
currently in a usable state (The web app's functionality remains
untouched).
This PR cherry picks Neeraj's ML related changes from the web_face_v2 branch.
Similar to https://github.com/ente-io/ente/pull/1399, this gets us one step
closer to integrating ONNX-YOLO with our desktop app. But it is not currently in
a usable state (The web app's functionality remains untouched).
Laurens has made the relevant changes to get ONNX-YOLO face detection
working in a manner where the generated embeddings are the same as what
get generated by the corresponding ML stack in the mobile client.
This PR cherry picks his ML related changes from the branch he was
working in, but leaves out the surrounding scaffolding (We cannot merge
that branch directly because it relies on wasm that we don't need and
don't want to commit to main).
At this point this functionality is correct but not usable - the next
step will be to tie this to the ONNX runtime that we already have on the
Node.js layer of our desktop app.
**Tests**
- yarn dev + smoke test
- yarn build + smoke test
- yarn lint
## Description
- Migrated from `sqflite` to `sqlite_async` when fetching files for
gallery (Home gallery, Collections page, Archive page & Add photos sheet
gallery ). This has made gallery load significantly faster and has
gotten rid of logs like `NativeAlloc concurrent copying GC freed
392872(19MB) AllocSpace objects, 139(4024KB) LOS objects, 38% free,
38MB/62MB, paused 2.868ms,93us total 324.898ms`. The initial load(100
files) and final load completes instantaneously even before the user
starts interacting with the app which has gotten rid of the jank which
was present before on the final load.
- In the 'Add Photos sheet', it takes time for the gallery to load when
using `sqflite` and images are rendered after this delay. After
migrating to `sqlite_async`, since the gallery loads instantly and
images are rendered right after, the animation of the bottom sheet
coming up became a bit janky. To make it smooth, have added a delay to
load gallery only after the bottom sheet is up fully.
## Tests
- [x] Did basic testing to make sure the migrations are working fine.
Laurens has made the relevant changes to get ONNX-YOLO face detection working in
a manner where the generated embeddings are the same as what get generated by
the corresponding ML stack in the mobile client.
This commit cherry picks his ML related changes from the branch he was working
in, but leaves out the surrounding scaffolding (We cannot merge that branch
directly because it relies on wasm that we don't need and don't want to commit
to main).
At this point this functionality is correct but not usable - the next step will
be to tie this to the ONNX runtime that we already have on the Node.js layer of
our desktop app.