(self, labels)
return colors
Simple function that adds fixed colors depending on the class
Simple function that adds fixed colors depending on the class
Simple function that adds fixed colors depending on the class
def compute_colors_for_labels(self, labels):
        """
        Simple function that adds fixed colors depending on the class
        """
        colors = labels[:, None] * self.palette
        colors = (colors % 255).numpy().astype("uint8")
        return colors
def compute_colors_for_labels ( self , labels ) : colors = labels [ : , None ] * self . palette colors = ( colors % 255 ) . numpy ( ) . astype ( "uint8" ) return colors