Skip to content

Commit 4e64116

Browse files
committed
Fix inproper rebase merge
1 parent 9ac45d9 commit 4e64116

File tree

1 file changed

+3
-1
lines changed
  • packages/react-native-executorch/common/rnexecutorch/models/object_detection

1 file changed

+3
-1
lines changed

packages/react-native-executorch/common/rnexecutorch/models/object_detection/ObjectDetection.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ std::vector<types::Detection> ObjectDetection::generateFromFrame(
206206
jsi::Runtime &runtime, const jsi::Value &frameData,
207207
double detectionThreshold, double iouThreshold,
208208
std::vector<int32_t> classIndices, std::string methodName) {
209+
auto orient = ::rnexecutorch::utils::readFrameOrientation(runtime, frameData);
209210
cv::Mat frame = extractFromFrame(runtime, frameData);
210-
auto detections = runInference(frame, detectionThreshold, iouThreshold,
211+
cv::Mat rotated = ::rnexecutorch::utils::rotateFrameForModel(frame, orient);
212+
auto detections = runInference(rotated, detectionThreshold, iouThreshold,
211213
classIndices, methodName);
212214

213215
for (auto &det : detections) {

0 commit comments

Comments
 (0)