Skip to content

Commit

Permalink
re shift the masks to their original position
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 25, 2024
1 parent 04c4792 commit 91d3176
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/ai/nets/samj/models/PythonMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ 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[0] * (obj.bbox[1] + i) + obj.bbox[0]:" + System.lineSeparator()
+ " rles.append(encode_rle(obj.image))" + System.lineSeparator()
+ " x_contours.append(x_coords)" + System.lineSeparator()
+ " y_contours.append(y_coords)" + System.lineSeparator()
Expand Down

0 comments on commit 91d3176

Please sign in to comment.