Commit graph

184 commits

Author SHA1 Message Date
Manav Rathi 38e9e901f6
Inline 2024-04-11 12:06:50 +05:30
Manav Rathi 79a975a281
Remove various unused util methods 2024-04-11 12:05:09 +05:30
Manav Rathi ce566f522d
Prune 2024-04-11 11:59:36 +05:30
Manav Rathi d2e7925c63
Prune 2024-04-11 11:47:07 +05:30
Manav Rathi 006ea085fe
Prune 2024-04-11 11:43:05 +05:30
Manav Rathi 03df858dcc
Remove ssdMobileNetV2 2024-04-11 11:23:23 +05:30
Manav Rathi da3b58661a
Remove blazeface 2024-04-11 11:21:19 +05:30
Manav Rathi e6905577c6
Remove blazeface-back 2024-04-11 11:17:15 +05:30
Manav Rathi e7902c5d83
Remove more tf 2024-04-11 11:15:15 +05:30
Manav Rathi 3182d67ca1
Remove tf utils 2024-04-11 11:13:52 +05:30
Manav Rathi 1ad5cb83f9
Remove object detection related code 2024-04-11 11:09:32 +05:30
Manav Rathi b6e1c4d3da
Inline 2024-04-10 21:36:43 +05:30
Manav Rathi 0ee416c91b
git rm -r apps/photos/public/js/{tesseract,tfjs,tflite} 2024-04-10 21:32:22 +05:30
Manav Rathi 3e8d88caf2
git rm -r apps/photos/public/models 2024-04-10 21:31:06 +05:30
Manav Rathi 52342a23cb
Remove tensorflow packages
yarn workspace photos remove "@tensorflow-models/coco-ssd" "@tensorflow/tfjs-backend-cpu" "@tensorflow/tfjs-backend-webgl" "@tensorflow/tfjs-converter" "@tensorflow/tfjs-core" "@tensorflow/tfjs-tflite"
2024-04-10 21:29:23 +05:30
Manav Rathi 18937581a5
Lint fixes 2024-04-10 16:41:26 +05:30
Neeraj Gupta eefac7fd01
[web] Import the scaffolding to sync face embeddings from web_face_v2
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).
2024-04-10 16:38:12 +05:30
Manav Rathi 6fc82ff062
[web] Import ONNX-YOLO face changes from the web_face branch (#1399)
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
2024-04-10 15:36:03 +05:30
Manav Rathi 45d22d5863
Undo concurrency change 2024-04-10 15:34:21 +05:30
Manav Rathi 71e839e9c4
Remove unused minFaceSize 2024-04-10 14:52:23 +05:30
laurenspriem 3eb95bd822
Import ONNX-YOLO face changes from the web_face branch
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.
2024-04-10 14:41:59 +05:30
Manav Rathi 5eda8fd464
Log in other apps too 2024-04-10 13:09:14 +05:30
Manav Rathi e0fe018f34
Log on unhandled errors and promise rejections
Test code:

    useEffect(() => {
        setTimeout(() => testFunctionSync(), 5000);
    }, []);

    useEffect(() => {
        testFunction();
    }, []);

    const testFunctionSync = () => {
        console.log("sleeping not");
        // sleep(2000);
        console.log("woke up not");
        throw new Error("Handle me");
    };

    const testFunction = async () => {
        console.log("sleeping");
        sleep(2000);
        console.log("woke up");
        throw new Error("Handle me");
    };

Refs:
- https://developer.mozilla.org/en-US/docs/Web/API/Window/unhandledrejection_event
- https://github.com/megahertz/electron-log/blob/master/src/renderer/lib/RendererErrorHandler.js
2024-04-10 13:05:00 +05:30
Manav Rathi af79f4f0c9
Audit app update functions 2024-04-10 12:32:43 +05:30
Manav Rathi 3c7277a0b1
onMainWindowFocus 2024-04-10 11:16:21 +05:30
Manav Rathi 8bcf77b7f7
IPC keys 2024-04-10 11:03:36 +05:30
Manav Rathi d828bcb071
[web] Fix SSR build
Fixes the following error on the nightly build

    Error: Attempting to assert globalThis.electron in a non-electron context
        at r (/home/runner/work/ente/ente/web/apps/photos/.next/server/chunks/676.js:1:25418)
        ...

    > Build error occurred
    Error: Failed to collect page data for /gallery
        at /home/runner/work/ente/ente/web/node_modules/next/dist/build/utils.js:1258:15 {
      type: 'Error'
    }
2024-04-10 09:53:30 +05:30
Manav Rathi 1214b4ddc3
Web enum cleanup 2024-04-09 21:12:00 +05:30
Manav Rathi a813de5617
Only ONNX, web 2024-04-09 20:53:08 +05:30
Manav Rathi b76b57d07e
Bye GGML web 2024-04-09 20:07:11 +05:30
Manav Rathi 67e39daff5
Cleanup 2024-04-09 19:59:31 +05:30
Manav Rathi b02600cb42
Rename 2024-04-09 19:26:20 +05:30
Manav Rathi b937102cda
A more apropos link 2024-04-09 16:22:02 +05:30
Manav Rathi 544e6be3fd
Document 2024-04-09 15:38:59 +05:30
Manav Rathi b0fbd68d27
Fix errors 2024-04-09 13:13:37 +05:30
Manav Rathi 5edca461f7
Final touches 2024-04-09 12:39:37 +05:30
Manav Rathi 4aa3d68e36
Wrap the assertion 2024-04-09 12:36:25 +05:30
Manav Rathi c729516faf
Final stretch 2024-04-09 12:21:32 +05:30
Manav Rathi 56ce5c0b0e
More transition 2024-04-09 12:17:33 +05:30
Manav Rathi d441418b5b
Remove deprecated loggers 2024-04-09 12:06:46 +05:30
Manav Rathi 0d0e20f7c4
More manual tweaks 2024-04-09 11:58:44 +05:30
Manav Rathi 1dc8f4617e
log.error regex replacement
- logError\(e, (".+")\);
- log.error($1, e);

+ a whole bunch of manual tweakings
2024-04-09 11:32:34 +05:30
Manav Rathi 2b7aa372bd
Switch 2024-04-09 10:33:54 +05:30
Manav Rathi f92a4c2a6e
Fix errors 2024-04-08 20:57:13 +05:30
Manav Rathi 92a3650696
Dedup comlink 2024-04-08 20:53:27 +05:30
Manav Rathi a1c9ceae6b
Add temporary gateways 2024-04-08 20:47:47 +05:30
Manav Rathi 3e3712efb3
Transition 2024-04-08 20:43:42 +05:30
Manav Rathi 5339b1aa89
Merge 2024-04-08 20:39:53 +05:30
Manav Rathi 0be549c91b
Transition 2024-04-08 20:21:49 +05:30
Manav Rathi 90a770c619
WIP 2024-04-08 18:09:08 +05:30