diff --git a/src/components/MachineLearning/MLFileDebugView.tsx b/src/components/MachineLearning/MLFileDebugView.tsx index db94d4e38..6bc82ec9c 100644 --- a/src/components/MachineLearning/MLFileDebugView.tsx +++ b/src/components/MachineLearning/MLFileDebugView.tsx @@ -15,6 +15,7 @@ import { ibExtractFaceImageFromCrop } from 'utils/machineLearning/faceCrop'; import { FaceCropsRow, FaceImagesRow, ImageBitmapView } from './ImageViews'; import ssdMobileNetV2Service from 'services/machineLearning/ssdMobileNetV2Service'; import { DEFAULT_ML_SYNC_CONFIG } from 'constants/machineLearning/config'; +import tesseractService from 'services/machineLearning/tesseractService'; interface MLFileDebugViewProps { file: File; @@ -100,6 +101,12 @@ export default function MLFileDebugView(props: MLFileDebugViewProps) { ); console.log('detectedObjects: ', objectDetections); + const textDetections = await tesseractService.detectText( + imageBitmap, + DEFAULT_ML_SYNC_CONFIG.textDetection.minAccuracy + ); + console.log('detectedTexts: ', textDetections); + const mlSyncConfig = await getMLSyncConfig(); const faceCropPromises = faceDetections.map(async (faceDetection) => arcfaceCropService.getFaceCrop(