π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove more tf
Manav Rathida5edc610f91
diff --git a/web/apps/photos/src/components/MachineLearning/TFJSImage.tsx b/web/apps/photos/src/components/MachineLearning/TFJSImage.tsxdeleted file mode 100644index 84e2618130..0000000000--- a/web/apps/photos/src/components/MachineLearning/TFJSImage.tsx+++ /dev/null@@ -1,39 +0,0 @@-import * as tf from "@tensorflow/tfjs-core";-import { useEffect, useRef } from "react";-import { FaceImage } from "types/machineLearning";--interface FaceImageProps {- faceImage: FaceImage;- width?: number;- height?: number;-}--export default function TFJSImage(props: FaceImageProps) {- const canvasRef = useRef(null);-- useEffect(() => {- if (!props || !props.faceImage) {- return;- }- const canvas = canvasRef.current;- const faceTensor = tf.tensor3d(props.faceImage);- const resized =- props.width && props.height- ? tf.image.resizeBilinear(faceTensor, [- props.width,- props.height,- ])- : faceTensor;- const normFaceImage = tf.div(tf.add(resized, 1.0), 2);- tf.browser.toPixels(normFaceImage as tf.Tensor3D, canvas);- }, [props]);-- return (- <canvas- ref={canvasRef}- width={112}- height={112}- style={{ display: "inline" }}- />- );-}diff --git a/web/apps/photos/src/types/machineLearning/index.ts b/web/apps/photos/src/types/machineLearning/index.tsindex da854f9c59..b452ab0baf 100644--- a/web/apps/photos/src/types/machineLearning/index.ts+++ b/web/apps/photos/src/types/machineLearning/index.ts@@ -13,16 +13,6 @@ export interface MLSyncResult {error?: Error;}-export interface DebugFace {- fileId: string;- // face: FaceApiResult;- face: AlignedFace;- embedding: FaceEmbedding;- faceImage: FaceImage;-}--export declare type FaceImage = Array<Array<Array<number>>>;-export declare type FaceDescriptor = Float32Array;export declare type Cluster = Array<number>;