Skip to content

Instantly share code, notes, and snippets.

Last active March 10, 2021 17:47
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
# Example instructions to decode ground truth masks in BBBC039
# Masks available at:
import matplotlib.pyplot as plt
import skimage.morphology
# Load one image after uncompressing
gt ="IXMtest_A02_s1_w1051DAA7C-7042-435F-99F0-1E847D9B42CB.png")
# Keep first channel only
gt = gt[:,:,0]
# Label independent connected components
gt = skimage.morphology.label(gt)
# Display image or use as needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment