react-native-executorch 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +1 -0
- package/android/src/main/cpp/CMakeLists.txt +25 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +1 -13
- package/common/rnexecutorch/RnExecutorchInstaller.cpp +52 -18
- package/common/rnexecutorch/RnExecutorchInstaller.h +0 -25
- package/common/rnexecutorch/TokenizerModule.cpp +1 -1
- package/common/rnexecutorch/TokenizerModule.h +4 -1
- package/common/rnexecutorch/data_processing/FileUtils.h +2 -2
- package/common/rnexecutorch/data_processing/ImageProcessing.cpp +5 -5
- package/common/rnexecutorch/data_processing/ImageProcessing.h +2 -2
- package/common/rnexecutorch/data_processing/Numerical.cpp +13 -0
- package/common/rnexecutorch/host_objects/JsiConversions.h +43 -62
- package/common/rnexecutorch/host_objects/ModelHostObject.h +43 -24
- package/common/rnexecutorch/metaprogramming/ConstructorHelpers.h +8 -6
- package/common/rnexecutorch/metaprogramming/FunctionHelpers.h +1 -1
- package/common/rnexecutorch/models/BaseModel.cpp +2 -2
- package/common/rnexecutorch/models/BaseModel.h +5 -0
- package/common/rnexecutorch/models/EncoderDecoderBase.cpp +2 -2
- package/common/rnexecutorch/models/EncoderDecoderBase.h +2 -2
- package/common/rnexecutorch/models/classification/Classification.cpp +6 -6
- package/common/rnexecutorch/models/classification/Classification.h +5 -0
- package/common/rnexecutorch/models/classification/Constants.h +3 -3
- package/common/rnexecutorch/models/embeddings/BaseEmbeddings.cpp +2 -2
- package/common/rnexecutorch/models/embeddings/BaseEmbeddings.h +2 -2
- package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.cpp +3 -3
- package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.h +5 -0
- package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.cpp +2 -2
- package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.h +6 -1
- package/common/rnexecutorch/models/image_segmentation/Constants.h +3 -3
- package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.cpp +6 -5
- package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.h +8 -1
- package/common/rnexecutorch/models/llm/LLM.cpp +58 -0
- package/common/rnexecutorch/models/llm/LLM.h +35 -0
- package/common/rnexecutorch/models/object_detection/Constants.h +3 -3
- package/common/rnexecutorch/models/object_detection/ObjectDetection.cpp +8 -8
- package/common/rnexecutorch/models/object_detection/ObjectDetection.h +11 -5
- package/common/rnexecutorch/models/object_detection/Types.h +13 -0
- package/common/rnexecutorch/models/object_detection/Utils.cpp +13 -11
- package/common/rnexecutorch/models/object_detection/Utils.h +7 -13
- package/common/rnexecutorch/models/ocr/CTCLabelConverter.cpp +2 -2
- package/common/rnexecutorch/models/ocr/CTCLabelConverter.h +2 -2
- package/common/rnexecutorch/models/ocr/Constants.h +33 -26
- package/common/rnexecutorch/models/ocr/Detector.cpp +20 -22
- package/common/rnexecutorch/models/ocr/Detector.h +4 -4
- package/common/rnexecutorch/models/ocr/OCR.cpp +9 -8
- package/common/rnexecutorch/models/ocr/OCR.h +11 -3
- package/common/rnexecutorch/models/ocr/RecognitionHandler.cpp +20 -19
- package/common/rnexecutorch/models/ocr/RecognitionHandler.h +9 -7
- package/common/rnexecutorch/models/ocr/Recognizer.cpp +7 -7
- package/common/rnexecutorch/models/ocr/Recognizer.h +2 -2
- package/common/rnexecutorch/models/ocr/Types.h +4 -6
- package/common/rnexecutorch/models/ocr/{DetectorUtils.cpp → utils/DetectorUtils.cpp} +70 -63
- package/common/rnexecutorch/models/ocr/{DetectorUtils.h → utils/DetectorUtils.h} +12 -11
- package/common/rnexecutorch/models/ocr/{RecognitionHandlerUtils.cpp → utils/RecognitionHandlerUtils.cpp} +14 -11
- package/common/rnexecutorch/models/ocr/{RecognitionHandlerUtils.h → utils/RecognitionHandlerUtils.h} +5 -5
- package/common/rnexecutorch/models/ocr/{RecognizerUtils.cpp → utils/RecognizerUtils.cpp} +28 -26
- package/common/rnexecutorch/models/ocr/{RecognizerUtils.h → utils/RecognizerUtils.h} +15 -14
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.cpp +2 -2
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.h +9 -2
- package/common/rnexecutorch/models/speech_to_text/SpeechToTextStrategy.h +2 -2
- package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.cpp +2 -2
- package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.h +2 -2
- package/common/rnexecutorch/models/style_transfer/StyleTransfer.cpp +5 -5
- package/common/rnexecutorch/models/style_transfer/StyleTransfer.h +6 -0
- package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.cpp +23 -22
- package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.h +4 -4
- package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.cpp +34 -34
- package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.h +27 -20
- package/{third-party/ios/ExecutorchLib/ExecutorchLib/sampler → common/runner}/sampler.cpp +3 -2
- package/{third-party/ios/ExecutorchLib/ExecutorchLib/sampler → common/runner}/sampler.h +3 -2
- package/ios/libs/executorch/libbackend_coreml_ios.a +0 -0
- package/ios/libs/executorch/libbackend_coreml_simulator.a +0 -0
- package/{third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64 → ios/libs/executorch}/libbackend_mps_ios.a +0 -0
- package/{third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64-simulator → ios/libs/executorch}/libbackend_mps_simulator.a +0 -0
- package/ios/libs/executorch/libbackend_xnnpack_ios.a +0 -0
- package/ios/libs/executorch/libbackend_xnnpack_simulator.a +0 -0
- package/ios/libs/executorch/libexecutorch_ios.a +0 -0
- package/ios/libs/executorch/libexecutorch_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_custom_ios.a +0 -0
- package/ios/libs/executorch/libkernels_custom_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_optimized_ios.a +0 -0
- package/ios/libs/executorch/libkernels_optimized_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_portable_ios.a +0 -0
- package/ios/libs/executorch/libkernels_portable_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_quantized_ios.a +0 -0
- package/ios/libs/executorch/libkernels_quantized_simulator.a +0 -0
- package/ios/libs/tokenizers-cpp/physical-arm64-release/libsentencepiece.a +0 -0
- package/ios/{ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib → libs/tokenizers-cpp/physical-arm64-release/libtokenizers_c.a} +0 -0
- package/ios/libs/tokenizers-cpp/physical-arm64-release/libtokenizers_cpp.a +0 -0
- package/ios/libs/tokenizers-cpp/simulator-arm64-debug/libsentencepiece.a +0 -0
- package/ios/{ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib → libs/tokenizers-cpp/simulator-arm64-debug/libtokenizers_c.a} +0 -0
- package/ios/libs/tokenizers-cpp/simulator-arm64-debug/libtokenizers_cpp.a +0 -0
- package/lib/Error.js +53 -0
- package/lib/ThreadPool.d.ts +10 -0
- package/lib/ThreadPool.js +28 -0
- package/lib/common/Logger.d.ts +8 -0
- package/lib/common/Logger.js +19 -0
- package/lib/constants/directories.js +2 -0
- package/lib/constants/llmDefaults.d.ts +6 -0
- package/lib/constants/llmDefaults.js +16 -0
- package/lib/constants/modelUrls.d.ts +223 -0
- package/lib/constants/modelUrls.js +322 -0
- package/lib/constants/ocr/models.d.ts +882 -0
- package/lib/constants/ocr/models.js +182 -0
- package/lib/constants/ocr/symbols.js +139 -0
- package/lib/constants/sttDefaults.d.ts +28 -0
- package/lib/constants/sttDefaults.js +68 -0
- package/lib/controllers/LLMController.d.ts +47 -0
- package/lib/controllers/LLMController.js +213 -0
- package/lib/controllers/OCRController.js +67 -0
- package/lib/controllers/SpeechToTextController.d.ts +56 -0
- package/lib/controllers/SpeechToTextController.js +349 -0
- package/lib/controllers/VerticalOCRController.js +70 -0
- package/lib/hooks/computer_vision/useClassification.d.ts +15 -0
- package/lib/hooks/computer_vision/useClassification.js +7 -0
- package/lib/hooks/computer_vision/useImageEmbeddings.d.ts +15 -0
- package/lib/hooks/computer_vision/useImageEmbeddings.js +7 -0
- package/lib/hooks/computer_vision/useImageSegmentation.d.ts +38 -0
- package/lib/hooks/computer_vision/useImageSegmentation.js +7 -0
- package/lib/hooks/computer_vision/useOCR.d.ts +20 -0
- package/lib/hooks/computer_vision/useOCR.js +41 -0
- package/lib/hooks/computer_vision/useObjectDetection.d.ts +15 -0
- package/lib/hooks/computer_vision/useObjectDetection.js +7 -0
- package/lib/hooks/computer_vision/useStyleTransfer.d.ts +15 -0
- package/lib/hooks/computer_vision/useStyleTransfer.js +7 -0
- package/lib/hooks/computer_vision/useVerticalOCR.d.ts +21 -0
- package/lib/hooks/computer_vision/useVerticalOCR.js +43 -0
- package/lib/hooks/general/useExecutorchModule.d.ts +13 -0
- package/lib/hooks/general/useExecutorchModule.js +7 -0
- package/lib/hooks/natural_language_processing/useLLM.d.ts +10 -0
- package/lib/hooks/natural_language_processing/useLLM.js +78 -0
- package/lib/hooks/natural_language_processing/useSpeechToText.d.ts +27 -0
- package/lib/hooks/natural_language_processing/useSpeechToText.js +49 -0
- package/lib/hooks/natural_language_processing/useTextEmbeddings.d.ts +16 -0
- package/lib/hooks/natural_language_processing/useTextEmbeddings.js +7 -0
- package/lib/hooks/natural_language_processing/useTokenizer.d.ts +17 -0
- package/lib/hooks/natural_language_processing/useTokenizer.js +52 -0
- package/lib/hooks/useModule.js +45 -0
- package/lib/hooks/useNonStaticModule.d.ts +20 -0
- package/lib/hooks/useNonStaticModule.js +49 -0
- package/lib/index.d.ts +48 -0
- package/lib/index.js +58 -0
- package/lib/module/controllers/LLMController.js +6 -10
- package/lib/module/controllers/LLMController.js.map +1 -1
- package/lib/module/hooks/computer_vision/useClassification.js +2 -2
- package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageEmbeddings.js +2 -2
- package/lib/module/hooks/computer_vision/useImageEmbeddings.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageSegmentation.js +2 -2
- package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -1
- package/lib/module/hooks/computer_vision/useObjectDetection.js +2 -2
- package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
- package/lib/module/hooks/computer_vision/useStyleTransfer.js +2 -2
- package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
- package/lib/module/hooks/general/useExecutorchModule.js +2 -2
- package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +2 -2
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -1
- package/lib/module/hooks/useModule.js +13 -9
- package/lib/module/hooks/useModule.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/BaseModule.js +9 -17
- package/lib/module/modules/BaseModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ClassificationModule.js +2 -2
- package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js +2 -2
- package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js +2 -2
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js +2 -2
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
- package/lib/module/modules/computer_vision/StyleTransferModule.js +2 -2
- package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
- package/lib/module/modules/general/ExecutorchModule.js +2 -2
- package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +2 -2
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -1
- package/lib/module/native/RnExecutorchModules.js +1 -2
- package/lib/module/native/RnExecutorchModules.js.map +1 -1
- package/lib/module/utils/ResourceFetcher.js +6 -8
- package/lib/module/utils/ResourceFetcher.js.map +1 -1
- package/lib/module/utils/ResourceFetcherUtils.js +20 -20
- package/lib/module/utils/ResourceFetcherUtils.js.map +1 -1
- package/lib/module/utils/SpeechToTextModule/ASR.js +3 -3
- package/lib/module/utils/SpeechToTextModule/ASR.js.map +1 -1
- package/lib/modules/BaseModule.js +25 -0
- package/lib/modules/BaseNonStaticModule.js +14 -0
- package/lib/modules/computer_vision/ClassificationModule.d.ts +8 -0
- package/lib/modules/computer_vision/ClassificationModule.js +17 -0
- package/lib/modules/computer_vision/ImageEmbeddingsModule.d.ts +8 -0
- package/lib/modules/computer_vision/ImageEmbeddingsModule.js +17 -0
- package/lib/modules/computer_vision/ImageSegmentationModule.d.ts +11 -0
- package/lib/modules/computer_vision/ImageSegmentationModule.js +27 -0
- package/lib/modules/computer_vision/OCRModule.d.ts +14 -0
- package/lib/modules/computer_vision/OCRModule.js +17 -0
- package/lib/modules/computer_vision/ObjectDetectionModule.d.ts +9 -0
- package/lib/modules/computer_vision/ObjectDetectionModule.js +17 -0
- package/lib/modules/computer_vision/StyleTransferModule.d.ts +8 -0
- package/lib/modules/computer_vision/StyleTransferModule.js +17 -0
- package/lib/modules/computer_vision/VerticalOCRModule.d.ts +14 -0
- package/lib/modules/computer_vision/VerticalOCRModule.js +19 -0
- package/lib/modules/general/ExecutorchModule.d.ts +7 -0
- package/lib/modules/general/ExecutorchModule.js +14 -0
- package/lib/modules/natural_language_processing/LLMModule.d.ts +28 -0
- package/lib/modules/natural_language_processing/LLMModule.js +45 -0
- package/lib/modules/natural_language_processing/SpeechToTextModule.d.ts +24 -0
- package/lib/modules/natural_language_processing/SpeechToTextModule.js +36 -0
- package/lib/modules/natural_language_processing/TextEmbeddingsModule.d.ts +9 -0
- package/lib/modules/natural_language_processing/TextEmbeddingsModule.js +21 -0
- package/lib/modules/natural_language_processing/TokenizerModule.d.ts +12 -0
- package/lib/modules/natural_language_processing/TokenizerModule.js +30 -0
- package/lib/native/NativeETInstaller.js +2 -0
- package/lib/native/NativeOCR.js +2 -0
- package/lib/native/NativeVerticalOCR.js +2 -0
- package/lib/native/RnExecutorchModules.d.ts +7 -0
- package/lib/native/RnExecutorchModules.js +18 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/common.d.ts +32 -0
- package/lib/types/common.js +25 -0
- package/lib/types/imageSegmentation.js +26 -0
- package/lib/types/llm.d.ts +46 -0
- package/lib/types/llm.js +9 -0
- package/lib/types/objectDetection.js +94 -0
- package/lib/types/ocr.js +1 -0
- package/lib/types/stt.d.ts +94 -0
- package/lib/types/stt.js +85 -0
- package/lib/typescript/controllers/LLMController.d.ts +1 -1
- package/lib/typescript/controllers/LLMController.d.ts.map +1 -1
- package/lib/typescript/hooks/useModule.d.ts +8 -5
- package/lib/typescript/hooks/useModule.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/BaseModule.d.ts +7 -6
- package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
- package/lib/typescript/modules/general/ExecutorchModule.d.ts +2 -2
- package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +2 -2
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -1
- package/lib/typescript/native/RnExecutorchModules.d.ts +1 -3
- package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
- package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -1
- package/lib/typescript/utils/ResourceFetcherUtils.d.ts.map +1 -1
- package/lib/utils/ResourceFetcher.d.ts +24 -0
- package/lib/utils/ResourceFetcher.js +305 -0
- package/lib/utils/ResourceFetcherUtils.d.ts +54 -0
- package/lib/utils/ResourceFetcherUtils.js +127 -0
- package/lib/utils/llm.d.ts +6 -0
- package/lib/utils/llm.js +72 -0
- package/lib/utils/stt.js +21 -0
- package/package.json +1 -2
- package/react-native-executorch.podspec +47 -44
- package/src/controllers/LLMController.ts +8 -13
- package/src/hooks/computer_vision/useClassification.ts +2 -2
- package/src/hooks/computer_vision/useImageEmbeddings.ts +2 -2
- package/src/hooks/computer_vision/useImageSegmentation.ts +2 -2
- package/src/hooks/computer_vision/useObjectDetection.ts +2 -2
- package/src/hooks/computer_vision/useStyleTransfer.ts +2 -2
- package/src/hooks/general/useExecutorchModule.ts +2 -2
- package/src/hooks/natural_language_processing/useTextEmbeddings.ts +2 -2
- package/src/hooks/useModule.ts +23 -13
- package/src/index.ts +3 -2
- package/src/modules/BaseModule.ts +17 -28
- package/src/modules/computer_vision/ClassificationModule.ts +2 -2
- package/src/modules/computer_vision/ImageEmbeddingsModule.ts +2 -2
- package/src/modules/computer_vision/ImageSegmentationModule.ts +2 -2
- package/src/modules/computer_vision/ObjectDetectionModule.ts +2 -2
- package/src/modules/computer_vision/StyleTransferModule.ts +2 -2
- package/src/modules/general/ExecutorchModule.ts +2 -2
- package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +2 -2
- package/src/native/RnExecutorchModules.ts +1 -5
- package/src/utils/ResourceFetcher.ts +9 -7
- package/src/utils/ResourceFetcherUtils.ts +15 -17
- package/src/utils/SpeechToTextModule/ASR.ts +4 -4
- package/third-party/android/libs/cpuinfo/arm64-v8a/libcpuinfo.so +0 -0
- package/third-party/android/libs/pthreadpool/arm64-v8a/libpthreadpool.so +0 -0
- package/third-party/include/cpuinfo/cpuinfo.h +2305 -0
- package/third-party/include/executorch/extension/threadpool/cpuinfo_utils.h +26 -0
- package/third-party/include/executorch/extension/threadpool/threadpool.h +94 -0
- package/third-party/include/pthreadpool/pthreadpool.h +2236 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +0 -63
- package/ios/ExecutorchLib.xcframework/Info.plist +0 -43
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/ETModel.h +0 -27
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +0 -14
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/LLaMARunner.h +0 -32
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/ETModel.h +0 -27
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +0 -14
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/LLaMARunner.h +0 -32
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/RnExecutorch/LLM.h +0 -5
- package/ios/RnExecutorch/LLM.mm +0 -78
- package/ios/RnExecutorch.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/RnExecutorch.xcodeproj/project.xcworkspace/xcuserdata/jakubchmura.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RnExecutorch.xcodeproj/xcuserdata/jakubchmura.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/lib/module/modules/BaseNonStaticModule.js +0 -17
- package/lib/module/modules/BaseNonStaticModule.js.map +0 -1
- package/lib/module/native/NativeLLM.js +0 -5
- package/lib/module/native/NativeLLM.js.map +0 -1
- package/lib/typescript/modules/BaseNonStaticModule.d.ts +0 -10
- package/lib/typescript/modules/BaseNonStaticModule.d.ts.map +0 -1
- package/lib/typescript/native/NativeLLM.d.ts +0 -12
- package/lib/typescript/native/NativeLLM.d.ts.map +0 -1
- package/src/modules/BaseNonStaticModule.ts +0 -26
- package/src/native/NativeLLM.ts +0 -14
- package/third-party/include/tokenizers-cpp/tokenizers_c.h +0 -61
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.h +0 -27
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.mm +0 -249
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.h +0 -14
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.mm +0 -80
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.h +0 -32
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.mm +0 -95
- package/third-party/ios/ExecutorchLib/ExecutorchLib/InputType.h +0 -12
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Utils.hpp +0 -217
- package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.cpp +0 -11
- package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.h +0 -11
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/base64.h +0 -202
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.cpp +0 -313
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.h +0 -57
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.cpp +0 -78
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.h +0 -23
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.cpp +0 -427
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.h +0 -87
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tokenizer.h +0 -76
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.pbxproj +0 -683
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.xcworkspace/xcuserdata/jakubchmura.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/xcuserdata/jakubchmura.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/third-party/ios/ExecutorchLib/build.sh +0 -44
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64/libbackend_coreml_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64-simulator/libbackend_coreml_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64/libbackend_xnnpack_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64-simulator/libbackend_xnnpack_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/Info.plist +0 -47
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorch.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchError.h +0 -16
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchLog.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchModule.h +0 -286
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchTensor.h +0 -742
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchValue.h +0 -219
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/module/module.h +0 -492
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_accessor.h +0 -190
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr_maker.h +0 -653
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_execution_context.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_init_context.h +0 -72
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/interface.h +0 -166
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/array_ref.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/data_loader.h +0 -136
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/defines.h +0 -20
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/error.h +0 -229
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/evalue.h +0 -521
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer.h +0 -565
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks.h +0 -323
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +0 -197
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/exec_aten.h +0 -147
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +0 -263
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +0 -1331
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +0 -21
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +0 -69
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +0 -1250
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/freeable_buffer.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/hierarchical_allocator.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/memory_allocator.h +0 -198
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/named_data_map.h +0 -86
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +0 -14
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bits_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/complex.h +0 -44
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/device.h +0 -70
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/half.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/optional.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/qint_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar.h +0 -110
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar_type.h +0 -154
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/string_view.h +0 -29
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor.h +0 -142
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_impl.h +0 -261
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_options.h +0 -60
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/result.h +0 -258
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/span.h +0 -93
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tag.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_layout.h +0 -79
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_shape_dynamism.h +0 -39
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/memory_manager.h +0 -113
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method.h +0 -387
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method_meta.h +0 -251
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/program.h +0 -320
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/pte_data_map.h +0 -144
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/tensor_parser.h +0 -156
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/kernel_runtime_context.h +0 -122
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/operator_registry.h +0 -278
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/abort.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/assert.h +0 -119
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/clock.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compat_unistd.h +0 -75
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compiler.h +0 -191
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/log.h +0 -177
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/platform.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/profiler.h +0 -292
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/runtime.h +0 -35
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/system.h +0 -49
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/types.h +0 -24
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/schema/extended_header.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/module.modulemap +0 -5
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/libexecutorch_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorch.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchError.h +0 -16
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchLog.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchModule.h +0 -286
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchTensor.h +0 -742
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchValue.h +0 -219
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/module/module.h +0 -492
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_accessor.h +0 -190
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr_maker.h +0 -653
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_execution_context.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_init_context.h +0 -72
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/interface.h +0 -166
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/array_ref.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/data_loader.h +0 -136
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/defines.h +0 -20
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/error.h +0 -229
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/evalue.h +0 -521
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer.h +0 -565
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks.h +0 -323
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +0 -197
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/exec_aten.h +0 -147
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +0 -263
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +0 -1331
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +0 -21
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +0 -69
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +0 -1250
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/freeable_buffer.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/hierarchical_allocator.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/memory_allocator.h +0 -198
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/named_data_map.h +0 -86
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +0 -14
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bits_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/complex.h +0 -44
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/device.h +0 -70
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/half.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/optional.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/qint_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar.h +0 -110
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar_type.h +0 -154
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/string_view.h +0 -29
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor.h +0 -142
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_impl.h +0 -261
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_options.h +0 -60
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/result.h +0 -258
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/span.h +0 -93
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tag.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_layout.h +0 -79
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_shape_dynamism.h +0 -39
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/memory_manager.h +0 -113
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method.h +0 -387
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method_meta.h +0 -251
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/program.h +0 -320
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/pte_data_map.h +0 -144
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/tensor_parser.h +0 -156
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/kernel_runtime_context.h +0 -122
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/operator_registry.h +0 -278
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/abort.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/assert.h +0 -119
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/clock.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compat_unistd.h +0 -75
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compiler.h +0 -191
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/log.h +0 -177
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/platform.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/profiler.h +0 -292
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/runtime.h +0 -35
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/system.h +0 -49
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/types.h +0 -24
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/schema/extended_header.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/module.modulemap +0 -5
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/libexecutorch_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64/libkernels_custom_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64-simulator/libkernels_custom_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64/libkernels_optimized_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64-simulator/libkernels_optimized_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64/libkernels_portable_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64-simulator/libkernels_portable_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64/libkernels_quantized_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64-simulator/libkernels_quantized_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/bitmap256.h +0 -82
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/filtered_re2.h +0 -111
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/pod_array.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter.h +0 -130
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter_tree.h +0 -139
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prog.h +0 -483
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/re2.h +0 -994
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/regexp.h +0 -692
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/set.h +0 -85
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_array.h +0 -367
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_set.h +0 -241
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/stringpiece.h +0 -205
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_casefold.h +0 -78
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_groups.h +0 -64
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/walker-inl.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Info.plist +0 -26
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/re2 +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/bitmap256.h +0 -82
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/filtered_re2.h +0 -111
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/pod_array.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter.h +0 -130
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter_tree.h +0 -139
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prog.h +0 -483
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/re2.h +0 -994
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/regexp.h +0 -692
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/set.h +0 -85
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_array.h +0 -367
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_set.h +0 -241
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/stringpiece.h +0 -205
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_casefold.h +0 -78
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_groups.h +0 -64
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/walker-inl.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Info.plist +0 -26
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/re2 +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/irunner.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/runner.cpp +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/runner.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/stats.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_decoder_runner.cpp +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_decoder_runner.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_prefiller.cpp +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_prefiller.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_token_generator.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/util.h +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
4
4
|
import { ETError, getError } from '../../Error';
|
|
5
|
-
import {
|
|
6
|
-
export class ClassificationModule extends
|
|
5
|
+
import { BaseModule } from '../BaseModule';
|
|
6
|
+
export class ClassificationModule extends BaseModule {
|
|
7
7
|
async load(model, onDownloadProgressCallback = () => {}) {
|
|
8
8
|
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
9
9
|
if (paths === null || paths.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ResourceFetcher","ETError","getError","
|
|
1
|
+
{"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","ClassificationModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadClassification","forward","imageSource","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ClassificationModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,oBAAoB,SAASD,UAAU,CAAC;EACnD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,kBAAkB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAC/D;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAE;IACjC,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,WAAW,CAAC;EACtD;AACF","ignoreList":[]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
4
4
|
import { ETError, getError } from '../../Error';
|
|
5
|
-
import {
|
|
6
|
-
export class ImageEmbeddingsModule extends
|
|
5
|
+
import { BaseModule } from '../BaseModule';
|
|
6
|
+
export class ImageEmbeddingsModule extends BaseModule {
|
|
7
7
|
async load(model, onDownloadProgressCallback = () => {}) {
|
|
8
8
|
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
9
9
|
if (paths === null || paths.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ResourceFetcher","ETError","getError","
|
|
1
|
+
{"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","ImageEmbeddingsModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadImageEmbeddings","forward","imageSource","ModuleNotLoaded","Float32Array","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ImageEmbeddingsModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,qBAAqB,SAASD,UAAU,CAAC;EACpD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,mBAAmB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAChE;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAyB;IACxD,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,IAAIC,YAAY,CAAC,MAAM,IAAI,CAACN,YAAY,CAACO,QAAQ,CAACH,WAAW,CAAC,CAAC;EACxE;AACF","ignoreList":[]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
4
4
|
import { DeeplabLabel } from '../../types/imageSegmentation';
|
|
5
5
|
import { ETError, getError } from '../../Error';
|
|
6
|
-
import {
|
|
7
|
-
export class ImageSegmentationModule extends
|
|
6
|
+
import { BaseModule } from '../BaseModule';
|
|
7
|
+
export class ImageSegmentationModule extends BaseModule {
|
|
8
8
|
async load(model, onDownloadProgressCallback = () => {}) {
|
|
9
9
|
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
10
10
|
if (paths === null || paths.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ResourceFetcher","DeeplabLabel","ETError","getError","
|
|
1
|
+
{"version":3,"names":["ResourceFetcher","DeeplabLabel","ETError","getError","BaseModule","ImageSegmentationModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadImageSegmentation","forward","imageSource","classesOfInterest","resize","ModuleNotLoaded","stringDict","generate","map","label","enumDict","key","enumKey"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ImageSegmentationModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,uBAAuB,SAASD,UAAU,CAAC;EACtD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMT,eAAe,CAACU,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,qBAAqB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAClE;EAEA,MAAMQ,OAAOA,CACXC,WAAmB,EACnBC,iBAAkC,EAClCC,MAAgB,EAC+B;IAC/C,IAAI,IAAI,CAACN,YAAY,IAAI,IAAI,EAAE;MAC7B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACmB,eAAe,CAAC,CAAC;IACpD;IAEA,MAAMC,UAAU,GAAG,MAAM,IAAI,CAACR,YAAY,CAACS,QAAQ,CACjDL,WAAW,EACX,CAACC,iBAAiB,IAAI,EAAE,EAAEK,GAAG,CAAEC,KAAK,IAAKxB,YAAY,CAACwB,KAAK,CAAC,CAAC,EAC7DL,MAAM,IAAI,KACZ,CAAC;IAED,IAAIM,QAA8C,GAAG,CAAC,CAAC;IAEvD,KAAK,MAAMC,GAAG,IAAIL,UAAU,EAAE;MAC5B,IAAIK,GAAG,IAAI1B,YAAY,EAAE;QACvB,MAAM2B,OAAO,GAAG3B,YAAY,CAAC0B,GAAG,CAA8B;QAC9DD,QAAQ,CAACE,OAAO,CAAC,GAAGN,UAAU,CAACK,GAAG,CAAC;MACrC;IACF;IACA,OAAOD,QAAQ;EACjB;AACF","ignoreList":[]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
4
4
|
import { ETError, getError } from '../../Error';
|
|
5
|
-
import {
|
|
6
|
-
export class ObjectDetectionModule extends
|
|
5
|
+
import { BaseModule } from '../BaseModule';
|
|
6
|
+
export class ObjectDetectionModule extends BaseModule {
|
|
7
7
|
async load(model, onDownloadProgressCallback = () => {}) {
|
|
8
8
|
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
9
9
|
if (paths === null || paths.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ResourceFetcher","ETError","getError","
|
|
1
|
+
{"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","ObjectDetectionModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadObjectDetection","forward","imageSource","detectionThreshold","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ObjectDetectionModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAG7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,qBAAqB,SAASD,UAAU,CAAC;EACpD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,mBAAmB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAChE;EAEA,MAAMQ,OAAOA,CACXC,WAAmB,EACnBC,kBAA0B,GAAG,GAAG,EACV;IACtB,IAAI,IAAI,CAACL,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACkB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACN,YAAY,CAACO,QAAQ,CAACH,WAAW,EAAEC,kBAAkB,CAAC;EAC1E;AACF","ignoreList":[]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
4
4
|
import { ETError, getError } from '../../Error';
|
|
5
|
-
import {
|
|
6
|
-
export class StyleTransferModule extends
|
|
5
|
+
import { BaseModule } from '../BaseModule';
|
|
6
|
+
export class StyleTransferModule extends BaseModule {
|
|
7
7
|
async load(model, onDownloadProgressCallback = () => {}) {
|
|
8
8
|
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
9
9
|
if (paths === null || paths.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ResourceFetcher","ETError","getError","
|
|
1
|
+
{"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","StyleTransferModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadStyleTransfer","forward","imageSource","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/StyleTransferModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,mBAAmB,SAASD,UAAU,CAAC;EAClD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,iBAAiB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAC9D;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAmB;IAClD,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,WAAW,CAAC;EACtD;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { BaseModule } from '../BaseModule';
|
|
4
4
|
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
5
|
-
export class ExecutorchModule extends
|
|
5
|
+
export class ExecutorchModule extends BaseModule {
|
|
6
6
|
async load(modelSource, onDownloadProgressCallback = () => {}) {
|
|
7
7
|
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, modelSource);
|
|
8
8
|
if (paths === null || paths.length < 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["BaseModule","ResourceFetcher","ExecutorchModule","load","modelSource","onDownloadProgressCallback","paths","fetch","length","Error","nativeModule","global","loadExecutorchModule","forward","inputTensor","forwardET"],"sourceRoot":"../../../../src","sources":["modules/general/ExecutorchModule.ts"],"mappings":";;AACA,SAASA,UAAU,QAAQ,eAAe;AAE1C,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,OAAO,MAAMC,gBAAgB,SAASF,UAAU,CAAC;EAC/C,MAAMG,IAAIA,CACRC,WAA2B,EAC3BC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAML,eAAe,CAACM,KAAK,CACvCF,0BAA0B,EAC1BD,WACF,CAAC;IACD,IAAIE,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACE,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,oBAAoB,CAACN,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACjE;EAEA,MAAMO,OAAOA,CAACC,WAAwB,EAAwB;IAC5D,OAAO,MAAM,IAAI,CAACC,SAAS,CAACD,WAAW,CAAC;EAC1C;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
4
|
-
import {
|
|
5
|
-
export class TextEmbeddingsModule extends
|
|
4
|
+
import { BaseModule } from '../BaseModule';
|
|
5
|
+
export class TextEmbeddingsModule extends BaseModule {
|
|
6
6
|
async load(model, onDownloadProgressCallback = () => {}) {
|
|
7
7
|
const modelPromise = ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
8
8
|
const tokenizerPromise = ResourceFetcher.fetch(undefined, model.tokenizerSource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ResourceFetcher","
|
|
1
|
+
{"version":3,"names":["ResourceFetcher","BaseModule","TextEmbeddingsModule","load","model","onDownloadProgressCallback","modelPromise","fetch","modelSource","tokenizerPromise","undefined","tokenizerSource","modelResult","tokenizerResult","Promise","all","modelPath","tokenizerPath","Error","nativeModule","global","loadTextEmbeddings","forward","input","Float32Array","generate"],"sourceRoot":"../../../../src","sources":["modules/natural_language_processing/TextEmbeddingsModule.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,oBAAoB,SAASD,UAAU,CAAC;EACnD,MAAME,IAAIA,CACRC,KAAuE,EACvEC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,YAAY,GAAGN,eAAe,CAACO,KAAK,CACxCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,MAAMC,gBAAgB,GAAGT,eAAe,CAACO,KAAK,CAC5CG,SAAS,EACTN,KAAK,CAACO,eACR,CAAC;IACD,MAAM,CAACC,WAAW,EAAEC,eAAe,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CACvDT,YAAY,EACZG,gBAAgB,CACjB,CAAC;IACF,MAAMO,SAAS,GAAGJ,WAAW,GAAG,CAAC,CAAC;IAClC,MAAMK,aAAa,GAAGJ,eAAe,GAAG,CAAC,CAAC;IAC1C,IAAI,CAACG,SAAS,IAAI,CAACC,aAAa,EAAE;MAChC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,kBAAkB,CAACL,SAAS,EAAEC,aAAa,CAAC;EACzE;EAEA,MAAMK,OAAOA,CAACC,KAAa,EAAyB;IAClD,OAAO,IAAIC,YAAY,CAAC,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,KAAK,CAAC,CAAC;EAClE;AACF","ignoreList":[]}
|
|
@@ -13,6 +13,5 @@ function returnSpecOrThrowLinkingError(spec) {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
const ETInstallerNativeModule = returnSpecOrThrowLinkingError(require('./NativeETInstaller').default);
|
|
16
|
-
|
|
17
|
-
export { LLMNativeModule, ETInstallerNativeModule };
|
|
16
|
+
export { ETInstallerNativeModule };
|
|
18
17
|
//# sourceMappingURL=RnExecutorchModules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","LINKING_ERROR","select","ios","default","returnSpecOrThrowLinkingError","spec","Proxy","get","Error","ETInstallerNativeModule","require"
|
|
1
|
+
{"version":3,"names":["Platform","LINKING_ERROR","select","ios","default","returnSpecOrThrowLinkingError","spec","Proxy","get","Error","ETInstallerNativeModule","require"],"sourceRoot":"../../../src","sources":["native/RnExecutorchModules.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAGvC,MAAMC,aAAa,GACjB,kFAAkF,GAClFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,SAASC,6BAA6BA,CAACC,IAAS,EAAE;EAChD,OAAOA,IAAI,GACPA,IAAI,GACJ,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;IACEC,GAAGA,CAAA,EAAG;MACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;IAChC;EACF,CACF,CAAC;AACP;AAEA,MAAMS,uBAA6C,GACjDL,6BAA6B,CAACM,OAAO,CAAC,qBAAqB,CAAC,CAACP,OAAO,CAAC;AAEvE,SAASM,uBAAuB","ignoreList":[]}
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
* - Implements linked list behavior via the `.next` attribute
|
|
30
30
|
* - Automatically processes subsequent downloads when `.next` contains a valid resource
|
|
31
31
|
*/
|
|
32
|
-
import { cacheDirectory, createDownloadResumable, moveAsync, FileSystemSessionType, writeAsStringAsync, EncodingType, deleteAsync, readDirectoryAsync } from 'expo-file-system';
|
|
32
|
+
import { cacheDirectory, copyAsync, createDownloadResumable, moveAsync, FileSystemSessionType, writeAsStringAsync, EncodingType, deleteAsync, readDirectoryAsync } from 'expo-file-system';
|
|
33
33
|
import { Asset } from 'expo-asset';
|
|
34
|
+
import { Platform } from 'react-native';
|
|
34
35
|
import { RNEDirectory } from '../constants/directories';
|
|
35
36
|
import { ResourceFetcherUtils, HTTP_CODE, DownloadStatus, SourceType } from './ResourceFetcherUtils';
|
|
36
37
|
export class ResourceFetcher {
|
|
@@ -226,17 +227,14 @@ export class ResourceFetcher {
|
|
|
226
227
|
const uri = asset.uri;
|
|
227
228
|
const filename = ResourceFetcherUtils.getFilenameFromUri(uri);
|
|
228
229
|
const fileUri = `${RNEDirectory}${filename}`;
|
|
229
|
-
|
|
230
|
+
// On Android, file uri does not contain file extension, so we add it manually
|
|
231
|
+
const fileUriWithType = Platform.OS === 'android' ? `${fileUri}.${asset.type}` : fileUri;
|
|
230
232
|
if (await ResourceFetcherUtils.checkFileExists(fileUri)) {
|
|
231
233
|
return ResourceFetcherUtils.removeFilePrefix(fileUri);
|
|
232
234
|
}
|
|
233
235
|
await ResourceFetcherUtils.createDirectoryIfNoExists();
|
|
234
|
-
await
|
|
235
|
-
|
|
236
|
-
throw new Error(`Asset local URI is not available for ${source}`);
|
|
237
|
-
}
|
|
238
|
-
await moveAsync({
|
|
239
|
-
from: asset.localUri,
|
|
236
|
+
await copyAsync({
|
|
237
|
+
from: asset.uri,
|
|
240
238
|
to: fileUriWithType
|
|
241
239
|
});
|
|
242
240
|
return ResourceFetcherUtils.removeFilePrefix(fileUriWithType);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cacheDirectory","createDownloadResumable","moveAsync","FileSystemSessionType","writeAsStringAsync","EncodingType","deleteAsync","readDirectoryAsync","Asset","RNEDirectory","ResourceFetcherUtils","HTTP_CODE","DownloadStatus","SourceType","ResourceFetcher","downloads","Map","fetch","callback","sources","length","Error","results","info","totalLength","getFilesSizes","head","source","sourceType","type","REMOTE_FILE","calculateDownloadProgress","previousFilesTotalLength","node","idx","next","singleFetch","sourceExtended","OBJECT","returnOrStartNext","handleObject","LOCAL_FILE","handleLocalFile","RELEASE_MODE_FILE","handleReleaseModeFile","DEV_MODE_FILE","result","handleDevModeFile","handleRemoteFile","push","nextSource","pause","resource","get","status","PAUSED","downloadResumable","pauseAsync","resume","extendedInfo","fileUri","cacheFileUri","uri","ONGOING","resumeAsync","has","OK","PARTIAL_CONTENT","from","to","delete","triggerHuggingFaceDownloadCounter","removeFilePrefix","cancel","cancelAsync","pauseFetching","findActive","resumeFetching","cancelFetching","listDownloadedFiles","files","map","file","listDownloadedModels","filter","endsWith","deleteResources","filename","getFilenameFromUri","checkFileExists","getFilesTotalSize","jsonString","JSON","stringify","digest","hashObject","path","createDirectoryIfNoExists","encoding","UTF8","asset","fromModule","fileUriWithType","downloadAsync","localUri","sessionType","BACKGROUND","totalBytesWritten","totalBytesExpectedToWrite","downloadResource","set"],"sourceRoot":"../../../src","sources":["utils/ResourceFetcher.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,cAAc,EACdC,uBAAuB,EACvBC,SAAS,EACTC,qBAAqB,EACrBC,kBAAkB,EAClBC,YAAY,EACZC,WAAW,EACXC,kBAAkB,QACb,kBA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AC,IAC3B,IAAI,CAACZ,SAAS,CAACsC,GAAG,CAAC1B,MAAM,CAAC,CAAE2B,MAAM,KAAK1C,cAAc,CAAC2C,MAAM,EAC5D;MACA;MACA,OAAO,IAAI;IACb;IACA,IAAI,CAACT,MAAM,IAAIA,MAAM,CAACQ,MAAM,KAAK3C,SAAS,CAACuD,EAAE,EAAE;MAC7C,MAAM,IAAI7C,KAAK,CAAC,kCAAkCM,MAAM,GAAG,CAAC;IAC9D;IACA,MAAMzB,SAAS,CAAC;MACdkE,IAAI,EAAE/B,cAAc,CAACwB,YAAY;MACjCQ,EAAE,EAAEhC,cAAc,CAACuB;IACrB,CAAC,CAAC;IACF,IAAI,CAAC7C,SAAS,CAACuD,MAAM,CAAC3C,MAAM,CAAC;IAC7BjB,oBAAoB,CAAC6D,iCAAiC,CAACT,GAAG,CAAC;IAC3D,OAAOpD,oBAAoB,CAAC8D,gBAAgB,CAACnC,cAAc,CAACuB,OAAO,CAAC;EACtE;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["cacheDirectory","copyAsync","createDownloadResumable","moveAsync","FileSystemSessionType","writeAsStringAsync","EncodingType","deleteAsync","readDirectoryAsync","Asset","Platform","RNEDirectory","ResourceFetcherUtils","HTTP_CODE","DownloadStatus","SourceType","ResourceFetcher","downloads","Map","fetch","callback","sources","length","Error","results","info","totalLength","getFilesSizes","head","source","sourceType","type","REMOTE_FILE","calculateDownloadProgress","previousFilesTotalLength","node","idx","next","singleFetch","sourceExtended","OBJECT","returnOrStartNext","handleObject","LOCAL_FILE","handleLocalFile","RELEASE_MODE_FILE","handleReleaseModeFile","DEV_MODE_FILE","result","handleDevModeFile","handleRemoteFile","push","nextSource","pause","resource","get","status","PAUSED","downloadResumable","pauseAsync","resume","extendedInfo","fileUri","cacheFileUri","uri","ONGOING","resumeAsync","has","OK","PARTIAL_CONTENT","from","to","delete","triggerHuggingFaceDownloadCounter","removeFilePrefix","cancel","cancelAsync","pauseFetching","findActive","resumeFetching","cancelFetching","listDownloadedFiles","files","map","file","listDownloadedModels","filter","endsWith","deleteResources","filename","getFilenameFromUri","checkFileExists","getFilesTotalSize","jsonString","JSON","stringify","digest","hashObject","path","createDirectoryIfNoExists","encoding","UTF8","asset","fromModule","fileUriWithType","OS","sessionType","BACKGROUND","totalBytesWritten","totalBytesExpectedToWrite","downloadResource","set","downloadAsync"],"sourceRoot":"../../../src","sources":["utils/ResourceFetcher.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,cAAc,EACdC,SAAS,EACTC,uBAAuB,EACvBC,SAAS,EACTC,qBAAqB,EACrBC,kBAAkB,EAClBC,YAAY,EACZC,WAAW,EACXC,kBAAkB,QACb,kBAAkB;AACzB,SAASC,KAAK,QAAQ,YAAY;AAClC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,YAAY,QAAQ,0BAA0B;AAEvD,SACEC,oBAAoB,EACpBC,SAAS,EACTC,cAAc,EACdC,UAAU,QAGL,wBAAwB;AAE/B,OAAO,MAAMC,eAAe,CAAC;EAC3B,OAAOC,SAAS,GAAG,IAAIC,GAAG,CAAmC,CAAC,CAAC,CAAC;;EAEhE,aAAaC,KAAKA,CAChBC,QAA4C,GAAGA,CAAA,KAAM,CAAC,CAAC,EACvD,GAAGC,OAAyB,EAC5B;IACA,IAAIA,OAAO,CAACC,MAAM,KAAK,CAAC,EAAE;MACxB,MAAM,IAAIC,KAAK,CAAC,kCAAkC,CAAC;IACrD;IACA,MAAM;MAAEC,OAAO,EAAEC,IAAI;MAAEC;IAAY,CAAC,GAClC,MAAMd,oBAAoB,CAACe,aAAa,CAACN,OAAO,CAAC;IACnD,MAAMO,IAA4B,GAAG;MACnCC,MAAM,EAAEJ,IAAI,CAAC,CAAC,CAAC,CAAEI,MAAM;MACvBC,UAAU,EAA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c,CAACnB,QAAQ,CAAE,CAAC,CAAC;QAC3B;MACF;MACAmB,cAAc,CAACnB,QAAQ,CAAEwF,iBAAiB,GAAGC,yBAAyB,CAAC;IACzE,CACF,CAAC;IACD;IACA,MAAMC,gBAAkC,GAAG;MACzCpD,iBAAiB,EAAEA,iBAAiB;MACpCF,MAAM,EAAE1C,cAAc,CAACmD,OAAO;MAC9BJ,YAAY,EAAEtB;IAChB,CAAC;IACD;IACA,IAAI,CAACtB,SAAS,CAAC8F,GAAG,CAAClF,MAAM,EAAEiF,gBAAgB,CAAC;IAC5C,MAAM9D,MAAM,GAAG,MAAMU,iBAAiB,CAACsD,aAAa,CAAC,CAAC;IACtD,IACE,CAAC,IAAI,CAAC/F,SAAS,CAACkD,GAAG,CAACtC,MAAM,CAAC,IAC3B,IAAI,CAACZ,SAAS,CAACsC,GAAG,CAAC1B,MAAM,CAAC,CAAE2B,MAAM,KAAK1C,cAAc,CAAC2C,MAAM,EAC5D;MACA;MACA,OAAO,IAAI;IACb;IACA,IAAI,CAACT,MAAM,IAAIA,MAAM,CAACQ,MAAM,KAAK3C,SAAS,CAACuD,EAAE,EAAE;MAC7C,MAAM,IAAI7C,KAAK,CAAC,kCAAkCM,MAAM,GAAG,CAAC;IAC9D;IACA,MAAM1B,SAAS,CAAC;MACdmE,IAAI,EAAE/B,cAAc,CAACwB,YAAY;MACjCQ,EAAE,EAAEhC,cAAc,CAACuB;IACrB,CAAC,CAAC;IACF,IAAI,CAAC7C,SAAS,CAACuD,MAAM,CAAC3C,MAAM,CAAC;IAC7BjB,oBAAoB,CAAC6D,iCAAiC,CAACT,GAAG,CAAC;IAC3D,OAAOpD,oBAAoB,CAAC8D,gBAAgB,CAACnC,cAAc,CAACuB,OAAO,CAAC;EACtE;AACF","ignoreList":[]}
|
|
@@ -33,17 +33,16 @@ export let ResourceFetcherUtils;
|
|
|
33
33
|
return SourceType.OBJECT;
|
|
34
34
|
} else if (typeof source === 'number') {
|
|
35
35
|
const uri = Asset.fromModule(source).uri;
|
|
36
|
-
if (
|
|
37
|
-
return SourceType.
|
|
36
|
+
if (uri.startsWith('http')) {
|
|
37
|
+
return SourceType.DEV_MODE_FILE;
|
|
38
38
|
}
|
|
39
|
-
return SourceType.
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
return SourceType.REMOTE_FILE;
|
|
39
|
+
return SourceType.RELEASE_MODE_FILE;
|
|
40
|
+
}
|
|
41
|
+
// typeof source == 'string'
|
|
42
|
+
if (source.startsWith('file://')) {
|
|
43
|
+
return SourceType.LOCAL_FILE;
|
|
46
44
|
}
|
|
45
|
+
return SourceType.REMOTE_FILE;
|
|
47
46
|
}
|
|
48
47
|
_ResourceFetcherUtils.getType = getType;
|
|
49
48
|
async function getFilesSizes(sources) {
|
|
@@ -53,8 +52,8 @@ export let ResourceFetcherUtils;
|
|
|
53
52
|
for (const source of sources) {
|
|
54
53
|
const type = await ResourceFetcherUtils.getType(source);
|
|
55
54
|
let length = 0;
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
try {
|
|
56
|
+
if (type === SourceType.REMOTE_FILE && typeof source === 'string') {
|
|
58
57
|
const response = await fetch(source, {
|
|
59
58
|
method: 'HEAD'
|
|
60
59
|
});
|
|
@@ -69,17 +68,18 @@ export let ResourceFetcherUtils;
|
|
|
69
68
|
length = contentLength ? parseInt(contentLength, 10) : 0;
|
|
70
69
|
previousFilesTotalLength = totalLength;
|
|
71
70
|
totalLength += length;
|
|
72
|
-
} catch (error) {
|
|
73
|
-
Logger.warn(`Error fetching HEAD for ${source}:`, error);
|
|
74
|
-
continue;
|
|
75
71
|
}
|
|
72
|
+
} catch (error) {
|
|
73
|
+
Logger.warn(`Error fetching HEAD for ${source}:`, error);
|
|
74
|
+
continue;
|
|
75
|
+
} finally {
|
|
76
|
+
results.push({
|
|
77
|
+
source,
|
|
78
|
+
type,
|
|
79
|
+
length,
|
|
80
|
+
previousFilesTotalLength
|
|
81
|
+
});
|
|
76
82
|
}
|
|
77
|
-
results.push({
|
|
78
|
-
source,
|
|
79
|
-
type,
|
|
80
|
-
length,
|
|
81
|
-
previousFilesTotalLength
|
|
82
|
-
});
|
|
83
83
|
}
|
|
84
84
|
return {
|
|
85
85
|
results,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getInfoAsync","makeDirectoryAsync","RNEDirectory","Asset","Logger","HTTP_CODE","DownloadStatus","SourceType","ResourceFetcherUtils","_ResourceFetcherUtils","getType","source","OBJECT","uri","fromModule","
|
|
1
|
+
{"version":3,"names":["getInfoAsync","makeDirectoryAsync","RNEDirectory","Asset","Logger","HTTP_CODE","DownloadStatus","SourceType","ResourceFetcherUtils","_ResourceFetcherUtils","getType","source","OBJECT","uri","fromModule","startsWith","DEV_MODE_FILE","RELEASE_MODE_FILE","LOCAL_FILE","REMOTE_FILE","getFilesSizes","sources","results","totalLength","previousFilesTotalLength","type","length","response","fetch","method","ok","warn","status","contentLength","headers","get","parseInt","error","push","removeFilePrefix","slice","hashObject","jsonString","hash","i","charCodeAt","toString","calculateDownloadProgress","currentFileLength","setProgress","progress","baseProgress","scaledProgress","updatedProgress","triggerHuggingFaceDownloadCounter","url","URL","host","pathname","baseUrl","protocol","split","createDirectoryIfNoExists","checkFileExists","intermediates","fileUri","fileInfo","exists","getFilenameFromUri","cleanUri","replace"],"sourceRoot":"../../../src","sources":["utils/ResourceFetcherUtils.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAEEA,YAAY,EACZC,kBAAkB,QACb,kBAAkB;AACzB,SAASC,YAAY,QAAQ,0BAA0B;AAEvD,SAASC,KAAK,QAAQ,YAAY;AAClC,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,WAAkBC,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAK3B,WAAkBC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cA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SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;MACjFjC,KAAK,CAAC,GAAG+B,OAAO,0BAA0B,EAAE;QAAE9B,MAAM,EAAE;MAAO,CAAC,CAAC;IACjE;EACF;EAACpB,qBAAA,CAAA6C,iCAAA,GAAAA,iCAAA;EAEM,eAAeQ,yBAAyBA,CAAA,EAAG;IAChD,IAAI,EAAE,MAAMC,eAAe,CAAC7D,YAAY,CAAC,CAAC,EAAE;MAC1C,MAAMD,kBAAkB,CAACC,YAAY,EAAE;QAAE8D,aAAa,EAAE;MAAK,CAAC,CAAC;IACjE;EACF;EAACvD,qBAAA,CAAAqD,yBAAA,GAAAA,yBAAA;EAEM,eAAeC,eAAeA,CAACE,OAAe,EAAE;IACrD,MAAMC,QAAQ,GAAG,MAAMlE,YAAY,CAACiE,OAAO,CAAC;IAC5C,OAAOC,QAAQ,CAACC,MAAM;EACxB;EAAC1D,qBAAA,CAAAsD,eAAA,GAAAA,eAAA;EAEM,SAASK,kBAAkBA,CAACvD,GAAW,EAAE;IAC9C,IAAIwD,QAAQ,GAAGxD,GAAG,CAACyD,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;IAC9CD,QAAQ,GAAGA,QAAQ,CAACR,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAIQ,QAAQ;IAC/C,OAAOA,QAAQ,CAACC,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC;EAClD;EAAC7D,qBAAA,CAAA2D,kBAAA,GAAAA,kBAAA;AAAA,GArIc5D,oBAAoB,KAApBA,oBAAoB","ignoreList":[]}
|
|
@@ -126,14 +126,14 @@ export class ASR {
|
|
|
126
126
|
}
|
|
127
127
|
return segments;
|
|
128
128
|
}
|
|
129
|
-
async estimateWordTimestampsLinear(tokens,
|
|
130
|
-
const duration = (
|
|
129
|
+
async estimateWordTimestampsLinear(tokens, timestampStart, timestampEnd) {
|
|
130
|
+
const duration = (timestampEnd - timestampStart) * this.timePrecision;
|
|
131
131
|
const segmentText = (await this.tokenizerModule.decode(tokens)).trim();
|
|
132
132
|
const words = segmentText.split(' ').map(w => ` ${w}`);
|
|
133
133
|
const numOfCharacters = words.reduce((acc, word) => acc + word.length, 0);
|
|
134
134
|
const timePerCharacter = duration / numOfCharacters;
|
|
135
135
|
const wordObjects = [];
|
|
136
|
-
const startTimeOffset = (
|
|
136
|
+
const startTimeOffset = (timestampStart - this.timestampBeginToken) * this.timePrecision;
|
|
137
137
|
let prevCharNum = 0;
|
|
138
138
|
for (let j = 0; j < words.length; j++) {
|
|
139
139
|
const word = words[j];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TokenizerModule","ResourceFetcher","ASR","tokenizerModule","timePrecision","maxDecodeLength","chunkSize","minChunkSamples","samplingRate","load","model","onDownloadProgressCallback","tokenizerLoadPromise","encoderDecoderPromise","fetch","encoderSource","decoderSource","_","encoderDecoderResults","Promise","all","Error","nativeModule","global","loadSpeechToText","startOfTranscriptToken","tokenToId","endOfTextToken","timestampBeginToken","getInitialSequence","options","initialSequence","language","languageToken","taskToken","push","generate","audio","temperature","encode","Float32Array","sequencesIds","scores","length","logits","softmaxWithTemperature","Array","from","decode","nextTokenId","indexOf","Math","max","sampleFromDistribution","nextTokenProb","slice","exps","map","logit","exp","sum","reduce","a","b","probs","r","random","cumulative","i","generateWithFallback","temperatures","generatedTokens","result","tokens","seqLen","cumLogProb","acc","score","log","avgLogProb","calculateWordLevelTimestamps","segments","prevTimestamp","start","end","wordObjects","estimateWordTimestampsLinear","words","at","scalingFactor","segment","word","duration","segmentText","trim","split","w","numOfCharacters","timePerCharacter","startTimeOffset","prevCharNum","j","transcribe","seek","allSegments","chunk","lastTimeStamp","tsWords","o","segmentsEndTs","res","waveform"],"sourceRoot":"../../../../src","sources":["utils/SpeechToTextModule/ASR.ts"],"mappings":";;AAAA;;AAEA,SAASA,eAAe,QAAQ,2DAA2D;AAQ3F,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,OAAO,MAAMC,GAAG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izerModule","ResourceFetcher","ASR","tokenizerModule","timePrecision","maxDecodeLength","chunkSize","minChunkSamples","samplingRate","load","model","onDownloadProgressCallback","tokenizerLoadPromise","encoderDecoderPromise","fetch","encoderSource","decoderSource","_","encoderDecoderResults","Promise","all","Error","nativeModule","global","loadSpeechToText","startOfTranscriptToken","tokenToId","endOfTextToken","timestampBeginToken","getInitialSequence","options","initialSequence","language","languageToken","taskToken","push","generate","audio","temperature","encode","Float32Array","sequencesIds","scores","length","logits","softmaxWithTemperature","Array","from","decode","nextTokenId","indexOf","Math","max","sampleFromDistribution","nextTokenProb","slice","exps","map","logit","exp","sum","reduce","a","b","probs","r","random","cumulative","i","generateWithFallback","temperatures","generatedTokens","result","tokens","seqLen","cumLogProb","acc","score","log","avgLogProb","calculateWordLevelTimestamps","segments","prevTimestamp","start","end","wordObjects","estimateWordTimestampsLinear","words","at","scalingFactor","segment","word","timestampStart","timestampEnd","duration","segmentText","trim","split","w","numOfCharacters","timePerCharacter","startTimeOffset","prevCharNum","j","transcribe","seek","allSegments","chunk","lastTimeStamp","tsWords","o","segmentsEndTs","res","waveform"],"sourceRoot":"../../../../src","sources":["utils/SpeechToTextModule/ASR.ts"],"mappings":";;AAAA;;AAEA,SAASA,eAAe,QAAQ,2DAA2D;AAQ3F,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,OAAO,MAAMC,GAAG,CAAC;EAEPC,eAAe,GAAoB,IAAIH,eAAe,CAAC,CAAC;EAExDI,aAAa,GAAW,IAAI,CAAC,CAAC;EAC9BC,eAAe,GAAW,GAAG;EAC7BC,SAAS,GAAW,EAAE,CAAC,CAAC;EACxBC,eAAe,GAAW,CAAC,GAAG,KAAK,CAAC,CAAC;EACrCC,YAAY,GAAW,KAAK;EAMpC,MAAaC,IAAIA,CACfC,KAA8B,EAC9BC,0BAAsD,EACtD;IACA,MAAMC,oBAAoB,GAAG,IAAI,CAACT,eAAe,CAACM,IAAI,CAACC,KAAK,CAAC;IAC7D,MAAMG,qBAAqB,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B,MAAM,CAAC,CAAC;EACjE;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResourceFetcher } from '../utils/ResourceFetcher';
|
|
2
|
+
import { getError } from '../Error';
|
|
3
|
+
export class BaseModule {
|
|
4
|
+
static nativeModule;
|
|
5
|
+
static onDownloadProgressCallback = () => { };
|
|
6
|
+
static async load(sources, ...loadArgs // this can be used in derived classes to pass extra args to load method
|
|
7
|
+
) {
|
|
8
|
+
try {
|
|
9
|
+
const paths = await ResourceFetcher.fetch(this.onDownloadProgressCallback, ...sources);
|
|
10
|
+
if (paths === null || paths.length < sources.length) {
|
|
11
|
+
throw new Error('Download interrupted.');
|
|
12
|
+
}
|
|
13
|
+
await this.nativeModule.loadModule(...paths, ...loadArgs);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw new Error(getError(error));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
static async forward(..._args) {
|
|
20
|
+
throw new Error('forward method is not implemented in the BaseModule class. Please implement it in the derived class.');
|
|
21
|
+
}
|
|
22
|
+
static onDownloadProgress(callback) {
|
|
23
|
+
this.onDownloadProgressCallback = callback;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class BaseNonStaticModule {
|
|
2
|
+
nativeModule = null;
|
|
3
|
+
async forwardET(inputTensor) {
|
|
4
|
+
return await this.nativeModule.forward(inputTensor);
|
|
5
|
+
}
|
|
6
|
+
async getInputShape(methodName, index) {
|
|
7
|
+
return this.nativeModule.getInputShape(methodName, index);
|
|
8
|
+
}
|
|
9
|
+
delete() {
|
|
10
|
+
if (this.nativeModule !== null) {
|
|
11
|
+
this.nativeModule.unload();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { BaseNonStaticModule } from '../BaseNonStaticModule';
|
|
3
|
+
export declare class ClassificationModule extends BaseNonStaticModule {
|
|
4
|
+
load(model: {
|
|
5
|
+
modelSource: ResourceSource;
|
|
6
|
+
}, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
7
|
+
forward(imageSource: string): Promise<any>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
2
|
+
import { ETError, getError } from '../../Error';
|
|
3
|
+
import { BaseNonStaticModule } from '../BaseNonStaticModule';
|
|
4
|
+
export class ClassificationModule extends BaseNonStaticModule {
|
|
5
|
+
async load(model, onDownloadProgressCallback = () => { }) {
|
|
6
|
+
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
7
|
+
if (paths === null || paths.length < 1) {
|
|
8
|
+
throw new Error('Download interrupted.');
|
|
9
|
+
}
|
|
10
|
+
this.nativeModule = global.loadClassification(paths[0] || '');
|
|
11
|
+
}
|
|
12
|
+
async forward(imageSource) {
|
|
13
|
+
if (this.nativeModule == null)
|
|
14
|
+
throw new Error(getError(ETError.ModuleNotLoaded));
|
|
15
|
+
return await this.nativeModule.generate(imageSource);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { BaseNonStaticModule } from '../BaseNonStaticModule';
|
|
3
|
+
export declare class ImageEmbeddingsModule extends BaseNonStaticModule {
|
|
4
|
+
load(model: {
|
|
5
|
+
modelSource: ResourceSource;
|
|
6
|
+
}, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
7
|
+
forward(imageSource: string): Promise<Float32Array>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
2
|
+
import { ETError, getError } from '../../Error';
|
|
3
|
+
import { BaseNonStaticModule } from '../BaseNonStaticModule';
|
|
4
|
+
export class ImageEmbeddingsModule extends BaseNonStaticModule {
|
|
5
|
+
async load(model, onDownloadProgressCallback = () => { }) {
|
|
6
|
+
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
7
|
+
if (paths === null || paths.length < 1) {
|
|
8
|
+
throw new Error('Download interrupted.');
|
|
9
|
+
}
|
|
10
|
+
this.nativeModule = global.loadImageEmbeddings(paths[0] || '');
|
|
11
|
+
}
|
|
12
|
+
async forward(imageSource) {
|
|
13
|
+
if (this.nativeModule == null)
|
|
14
|
+
throw new Error(getError(ETError.ModuleNotLoaded));
|
|
15
|
+
return new Float32Array(await this.nativeModule.generate(imageSource));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { DeeplabLabel } from '../../types/imageSegmentation';
|
|
3
|
+
import { BaseNonStaticModule } from '../BaseNonStaticModule';
|
|
4
|
+
export declare class ImageSegmentationModule extends BaseNonStaticModule {
|
|
5
|
+
load(model: {
|
|
6
|
+
modelSource: ResourceSource;
|
|
7
|
+
}, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
8
|
+
forward(imageSource: string, classesOfInterest?: DeeplabLabel[], resize?: boolean): Promise<{
|
|
9
|
+
[key in DeeplabLabel]?: number[];
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ResourceFetcher } from '../../utils/ResourceFetcher';
|
|
2
|
+
import { DeeplabLabel } from '../../types/imageSegmentation';
|
|
3
|
+
import { ETError, getError } from '../../Error';
|
|
4
|
+
import { BaseNonStaticModule } from '../BaseNonStaticModule';
|
|
5
|
+
export class ImageSegmentationModule extends BaseNonStaticModule {
|
|
6
|
+
async load(model, onDownloadProgressCallback = () => { }) {
|
|
7
|
+
const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
|
|
8
|
+
if (paths === null || paths.length < 1) {
|
|
9
|
+
throw new Error('Download interrupted.');
|
|
10
|
+
}
|
|
11
|
+
this.nativeModule = global.loadImageSegmentation(paths[0] || '');
|
|
12
|
+
}
|
|
13
|
+
async forward(imageSource, classesOfInterest, resize) {
|
|
14
|
+
if (this.nativeModule == null) {
|
|
15
|
+
throw new Error(getError(ETError.ModuleNotLoaded));
|
|
16
|
+
}
|
|
17
|
+
const stringDict = await this.nativeModule.generate(imageSource, (classesOfInterest || []).map((label) => DeeplabLabel[label]), resize || false);
|
|
18
|
+
let enumDict = {};
|
|
19
|
+
for (const key in stringDict) {
|
|
20
|
+
if (key in DeeplabLabel) {
|
|
21
|
+
const enumKey = DeeplabLabel[key];
|
|
22
|
+
enumDict[enumKey] = stringDict[key];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return enumDict;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OCRController } from '../../controllers/OCRController';
|
|
2
|
+
import { ResourceSource } from '../../types/common';
|
|
3
|
+
import { OCRLanguage } from '../../types/ocr';
|
|
4
|
+
export declare class OCRModule {
|
|
5
|
+
static module: OCRController;
|
|
6
|
+
static load(model: {
|
|
7
|
+
detectorSource: ResourceSource;
|
|
8
|
+
recognizerLarge: ResourceSource;
|
|
9
|
+
recognizerMedium: ResourceSource;
|
|
10
|
+
recognizerSmall: ResourceSource;
|
|
11
|
+
language: OCRLanguage;
|
|
12
|
+
}, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
13
|
+
static forward(input: string): Promise<import("../../types/ocr").OCRDetection[]>;
|
|
14
|
+
}
|