We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b90874 commit 938ddb4Copy full SHA for 938ddb4
1 file changed
packages/react-native-executorch/common/rnexecutorch/models/object_detection/ObjectDetection.cpp
@@ -38,8 +38,10 @@ ObjectDetection::preprocess(const std::string &imageSource) {
38
std::vector<Detection>
39
ObjectDetection::postprocess(const std::vector<EValue> &tensors,
40
cv::Size originalSize, double detectionThreshold) {
41
- float widthRatio = originalSize.width / modelImageSize.width;
42
- float heightRatio = originalSize.height / modelImageSize.height;
+ float widthRatio =
+ static_cast<float>(originalSize.width) / modelImageSize.width;
43
+ float heightRatio =
44
+ static_cast<float>(originalSize.height) / modelImageSize.height;
45
46
std::vector<Detection> detections;
47
auto bboxTensor = tensors.at(0).toTensor();
0 commit comments