Skip to content

Commit

Permalink
Correct typo
Browse files Browse the repository at this point in the history
  • Loading branch information
LSeu-Open authored Oct 8, 2024
1 parent 8db666e commit 034ab7b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Cellpose_gradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,7 @@ def display_results(image: np.ndarray, masks: np.ndarray, display_channel: str,
ax1.axis('off')

# Display segmentation masks with the selected colormap
# Convert the colormap to grayscale
cmap_obj = plt.get_cmap(cmap)
grayscale_cmap = plt.cm.colors.LinearSegmentedColormap.from_list(
f"{cmap}_grayscale",
[cmap_obj(i) for i in range(cmap_obj.N)]
)
grayscale_cmap.set_bad(color='black')

ax2.imshow(masks, cmap=grayscale_cmap)
ax2.imshow(masks, cmap=cmap)
ax2.set_title('Segmentation Masks')
ax2.axis('off')
ax2.set_facecolor('black')
Expand Down

0 comments on commit 034ab7b

Please sign in to comment.