Skip to content

Commit b935e2c

Browse files
authored
lint (#64)
1 parent 35f8e71 commit b935e2c

File tree

1 file changed

+5
-7
lines changed
  • advanced/segment-anything

1 file changed

+5
-7
lines changed

advanced/segment-anything/sam.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,11 @@ def generate_mask(self, url: str) -> PNGResponse:
229229
# The below rendering code is copied from the segment-anything repo to draw the mask
230230
# on top of the original image.
231231
sorted_anns = sorted(masks, key=(lambda x: x["area"]), reverse=True)
232-
mask_img = np.ones(
233-
(
234-
sorted_anns[0]["segmentation"].shape[0],
235-
sorted_anns[0]["segmentation"].shape[1],
236-
3,
237-
)
238-
)
232+
mask_img = np.ones((
233+
sorted_anns[0]["segmentation"].shape[0],
234+
sorted_anns[0]["segmentation"].shape[1],
235+
3,
236+
))
239237
for ann in sorted_anns:
240238
mask_img[ann["segmentation"]] = np.random.random(3)
241239
alpha = 0.35

0 commit comments

Comments
 (0)