#NEWLINE# def __init__( self , image , label , n_region , similarity_weight = SimilarityMask ( 1 , 1 , 1 , 1 ) ) : #NEWLINE# #INDENT# self . image = image #NEWLINE# self . label = label #NEWLINE# self . w = similarity_weight #NEWLINE# self . imsize = float ( ( label . shape [ 0 ] * label . shape [ 1 ] ) ) #NEWLINE# self . size = self . __init_size ( n_region ) #NEWLINE# self . color = self . __init_color ( n_region ) #NEWLINE# self . bbox = self . __init_bounding_box ( n_region ) #NEWLINE# self . texture = self . __init_texture ( n_region )