From a0ee50b4b93650dc5c7d3ec73d3d636232e9c503 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Mon, 28 Oct 2024 12:51:27 +0100 Subject: [PATCH] correct bugs in python code --- src/main/java/ai/nets/samj/models/PythonMethods.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/ai/nets/samj/models/PythonMethods.java b/src/main/java/ai/nets/samj/models/PythonMethods.java index c2ba594..e9b7e0b 100644 --- a/src/main/java/ai/nets/samj/models/PythonMethods.java +++ b/src/main/java/ai/nets/samj/models/PythonMethods.java @@ -88,10 +88,10 @@ public class PythonMethods { + " for obj in labels:" + System.lineSeparator() + " if obj.num_pixels >= at_least_of_this_size:" + System.lineSeparator() + " x_coords,y_coords = trace_contour(obj.image, obj.num_pixels, obj.bbox[1],obj.bbox[0])" + System.lineSeparator() - + " rles = encode_rle(obj.image)" + System.lineSeparator() - + " for i in range(0, len(lst), 2):" + System.lineSeparator() - + " rles[i] += sam_result.shape[1] * (obj.bbox[0] + i) + obj.bbox[1]" + System.lineSeparator() - + " rles.append(encode_rle(obj.image))" + System.lineSeparator() + + " rle = encode_rle(obj.image)" + System.lineSeparator() + + " for i in range(0, len(rle), 2):" + System.lineSeparator() + + " rle[i] += sam_result.shape[1] * (obj.bbox[0] + i) + obj.bbox[1]" + System.lineSeparator() + + " rles.append(rle)" + System.lineSeparator() + " x_contours.append(x_coords)" + System.lineSeparator() + " y_contours.append(y_coords)" + System.lineSeparator() + " sizes.append(obj.num_pixels)" + System.lineSeparator()