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); } }