【发布时间】:2022-11-11 00:00:18
【问题描述】:
我正在尝试使用自动编码器预处理 1600 张图像,然后使用权重训练 UNET 进行语义分割。
问题 1:我是否需要使用相同数量的图像进行预训练自编码器和 Unet 以获得最佳 IOU?
问题2:
img_data=[]
path1 = '/content/drive/MyDrive/Colab Notebooks/Skull images'
files=os.listdir(path1)
for i in tqdm(files):
img=cv2.imread(path1+'/'+i,1) #Change 0 to 1 for color images
img=cv2.resize(img,(SIZE, SIZE))
img_data.append(img_to_array(img))
img_array = np.reshape(img_data, (len(img_data), SIZE, SIZE, 3))
img_array = img_array.astype('float32') / 255
由于 img_array 使用过多的内存,该程序在 google colab 上崩溃。现在如何在不崩溃的情况下做到这一点?图像尺寸为 512*512。
【问题讨论】:
标签: autoencoder semantic-segmentation unet-neural-network