图像风格迁移所用模板starry_night.t7
OpenCV图像风格迁移所用模板文件之starry_night.t7
使用代码:
importcv2
image_file=xxx.jpg'#目标文件
model='starry_night.t7'#模板文件
net=cv2.dnn.readNetFromTorch('models/'+model)
image=cv2.imread('images/'+image_file)
(h,w)=image.shape[:2]
blob=cv2.dnn.blobFromImage(image,1.0,(w,h),
下载地址
用户评论