Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class RnExecutorchPackage : TurboReactPackage() {
LLM(reactContext)
} else if (name == ETModule.NAME) {
ETModule(reactContext)
} else if (name == ObjectDetection.NAME) {
ObjectDetection(reactContext)
} else if (name == SpeechToText.NAME) {
SpeechToText(reactContext)
} else if (name == OCR.NAME) {
Expand Down Expand Up @@ -60,17 +58,6 @@ class RnExecutorchPackage : TurboReactPackage() {
true,
)

moduleInfos[ObjectDetection.NAME] =
ReactModuleInfo(
ObjectDetection.NAME,
ObjectDetection.NAME,
false, // canOverrideExistingModule
false, // needsEagerInit
true, // hasConstants
false, // isCxxModule
true,
)

moduleInfos[SpeechToText.NAME] =
ReactModuleInfo(
SpeechToText.NAME,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <rnexecutorch/host_objects/JsiConversions.h>
#include <rnexecutorch/models/classification/Classification.h>
#include <rnexecutorch/models/image_segmentation/ImageSegmentation.h>
#include <rnexecutorch/models/object_detection/ObjectDetection.h>
#include <rnexecutorch/models/style_transfer/StyleTransfer.h>

namespace rnexecutorch {
Expand Down Expand Up @@ -31,5 +32,10 @@ void RnExecutorchInstaller::injectJSIBindings(
*jsiRuntime, "loadClassification",
RnExecutorchInstaller::loadModel<Classification>(
jsiRuntime, jsCallInvoker, "loadClassification"));

jsiRuntime->global().setProperty(
*jsiRuntime, "loadObjectDetection",
RnExecutorchInstaller::loadModel<ObjectDetection>(
jsiRuntime, jsCallInvoker, "loadObjectDetection"));
}
} // namespace rnexecutorch
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ cv::Mat readImage(const std::string &imageURI) {
throw std::runtime_error("Read image error: invalid argument");
}

cv::cvtColor(image, image, cv::COLOR_BGR2RGB);
return image;
}

Expand Down
Loading