From 36c57c59e0c7b15014531b5473ec376124b47e7b Mon Sep 17 00:00:00 2001 From: Yacine Zahidi Date: Sun, 18 Apr 2021 21:32:31 +0200 Subject: [PATCH] Update PrePostProcessor.java mOutputColumn was hardcoded in line 143. --- .../java/org/pytorch/demo/objectdetection/PrePostProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectDetection/app/src/main/java/org/pytorch/demo/objectdetection/PrePostProcessor.java b/ObjectDetection/app/src/main/java/org/pytorch/demo/objectdetection/PrePostProcessor.java index 305a943c..26d9cdf2 100644 --- a/ObjectDetection/app/src/main/java/org/pytorch/demo/objectdetection/PrePostProcessor.java +++ b/ObjectDetection/app/src/main/java/org/pytorch/demo/objectdetection/PrePostProcessor.java @@ -140,7 +140,7 @@ static ArrayList outputsToNMSPredictions(float[] outputs, float imgScale } Rect rect = new Rect((int)(startX+ivScaleX*left), (int)(startY+top*ivScaleY), (int)(startX+ivScaleX*right), (int)(startY+ivScaleY*bottom)); - Result result = new Result(cls, outputs[i*85+4], rect); + Result result = new Result(cls, outputs[i*mOutputColumn+4], rect); results.add(result); } }