Skip to content

Commit

Permalink
correct bugs in python code
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 28, 2024
1 parent 86fac14 commit a0ee50b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/ai/nets/samj/models/PythonMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a0ee50b

Please sign in to comment.