Generation

generate functionTue, 07 Mar 2023

ファネル生成するためのデータを生成

def get_fanels(img, gt, mask, nlabels): fanels = [] for i in range(nlabels): fanel = img.copy() fanel[gt != i] = 0 fanel = fanel * mask fanels.append(fanel) return np.array(fanels)

Questions about programming?Chat with your personal AI assistant