Manav Rathi пре 1 година
родитељ
комит
f5bf776848
2 измењених фајлова са 7 додато и 6 уклоњено
  1. 5 5
      desktop/docs/dependencies.md
  2. 2 1
      desktop/src/main/services/ml-face.ts

+ 5 - 5
desktop/docs/dependencies.md

@@ -1,8 +1,8 @@
 # Dependencies
 
-* [Electron](#electron)
-* [Dev dependencies](#dev)
-* [Functionality](#functionality)
+-   [Electron](#electron)
+-   [Dev dependencies](#dev)
+-   [Functionality](#functionality)
 
 ## Electron
 
@@ -114,8 +114,8 @@ available on the host machine, and is not bundled with our app.
 AI/ML runtime. It powers both natural language searches (using CLIP) and face
 detection (using YOLO).
 
-[jpeg-js](https://github.com/jpeg-js/jpeg-js#readme) is used for decoding
-JPEG data into raw RGB bytes before passing it to ONNX.
+[jpeg-js](https://github.com/jpeg-js/jpeg-js#readme) is used for decoding JPEG
+data into raw RGB bytes before passing it to ONNX.
 
 html-entities is used by the bundled clip-bpe-ts tokenizer for CLIP.
 

+ 2 - 1
desktop/src/main/services/ml-face.ts

@@ -139,5 +139,6 @@ export const faceEmbedding = async (input: Float32Array) => {
     const feeds = { img_inputs: inputTensor };
     const results = await session.run(feeds);
     log.debug(() => `onnx/yolo face embedding took ${Date.now() - t} ms`);
-    return results.embeddings["cpuData"]; // as Float32Array;
+    // TODO: What's with this type?
+    return (results.embeddings as unknown as any)["cpuData"]; // as Float32Array;
 };