exps/visualize/visualize.py
def apply_mask(image, mask, color):
    """Apply the given mask to the image.
    """
    for c in range(3):
        image[:, :, c] = np.where(mask == 1,
                                  image[:, :, c] + color[c],
                                  image[:, :, c])
    return image
Apply the given mask to the image.
    
Apply the given mask to the image.
Apply the given mask to the image .
def apply_mask(image, mask, color):
    for c in range(3):
        image[:, :, c] = np.where(mask == 1,
                                  image[:, :, c] + color[c],
                                  image[:, :, c])
    return image
def apply_mask ( image , mask , color ) : for c in range ( 3 ) : image [ : , : , c ] = np . where ( mask == 1 , image [ : , : , c ] + color [ c ] , image [ : , : , c ] ) return image
Apply the given mask to the image.
Apply the given mask to the image .
"""Apply the given mask to the image.
    """
image
mask
color