unet开源项目中resize问题踩坑
作者:互联网
前言
开源项目unet中使用的图像尺寸是固定的256,但是如果要使用resize图片尺寸的话,调用OpenCV中的resize函数不可行,因为源码加载图片的格式是ndarray,所以必须使用与格式对应的resize格式,修改代码如下:
img = np.resize(img, (1, 640, 400, 1))
mask = np.resize(img, (1, 640, 400, 1))
标签:img,开源,640,unet,400,np,格式,resize 来源: https://blog.csdn.net/weixin_41552975/article/details/122151979