src/utils.py
def masked_bounding_box(mask):
	'''
	Bounding box of the masked region
	'''
	inp_ind_y, inp_ind_x = np.nonzero(mask)
	inp_top_left_x = np.amin(inp_ind_x);	inp_bot_rght_x = np.amax(inp_ind_x)
	inp_top_left_y = np.amin(inp_ind_y);	inp_bot_rght_y = np.amax(inp_ind_y)
	return [inp_top_left_y, inp_top_left_x, inp_bot_rght_y, inp_bot_rght_x]

	Bounding box of the masked region
	
Bounding box of the masked region
Bounding box of the masked region
def masked_bounding_box(mask):
	inp_ind_y, inp_ind_x = np.nonzero(mask)
	inp_top_left_x = np.amin(inp_ind_x);	inp_bot_rght_x = np.amax(inp_ind_x)
	inp_top_left_y = np.amin(inp_ind_y);	inp_bot_rght_y = np.amax(inp_ind_y)
	return [inp_top_left_y, inp_top_left_x, inp_bot_rght_y, inp_bot_rght_x]
def masked_bounding_box ( mask ) : inp_ind_y , inp_ind_x = np . nonzero ( mask ) inp_top_left_x = np . amin ( inp_ind_x ) ; inp_bot_rght_x = np . amax ( inp_ind_x ) inp_top_left_y = np . amin ( inp_ind_y ) ; inp_bot_rght_y = np . amax ( inp_ind_y ) return [ inp_top_left_y , inp_top_left_x , inp_bot_rght_y , inp_bot_rght_x ]
Bounding box of the masked region
Bounding box of the masked region
'''
	Bounding box of the masked region
	'''
mask