【源码】基于卷积神经网络的语义颜色一致性设计

640?wx_fmt=jpeg


请注意,将使用对角线校正的颜色恒定性应用于线性原始图像。

Note that color constancy using diagonal correction should be applied to the linear RAW image. 


在这里,我们并没有使用这一方法,因为没有原始图像的语义分割模型(只是概念上的证明)。

Here, we did not use that because of the absence of semantic segmentation models for RAW images (just a proof of concept). 


要生成语义掩码,可以从以下链接下载Refinenet

To generate semantic masks, you can download Refinenet from the following link:


https://github.com/guosheng/refinenet


记住:您必须使用在MIT ADE20K数据集(ResNet-152)上训练的模型来理解实验场景

Remember: you have to use the model trained on MIT ADE20K dataset (ResNet-152) for scene understanding


由于采用的是4-D图像,运行MATLAB将发现以下错误信息:Error using imageInputLayer>iParseInputArguments (line 59) The value of 'InputSize' is invalid. Expected input image size to be a 2 or 3 element vector. For a 3-element vector, the third element must be 3 or 1.

Because of the 4-D images, you are going to get an error states the following: Error using imageInputLayer>iParseInputArguments (line 59) The value of 'InputSize' is invalid. Expected input image size to be a 2 or 3 element vector. For a 3-element vector, the third element must be 3 or 1.


要修复这个错误,请执行以下操作:

-打开matlab(以管理员身份运行)

-修改:编辑imageInputLayer.m代码

To fix it, do the following: -Open Matlab (run as administrator) -Write: edit imageInputLayer.m


-修改以下代码:

-replace the following code:


function tf = iIsValidRGBImageSize(sz)

tf = numel(sz) == 3 && sz(end) == 3;

end


修改为

with the modified function:


function tf = iIsValidRGBImageSize(sz)

tf = numel(sz) == 3 && (sz(end) == 3 || sz(end) == 4);

end

-save


参考文献:

Mahmoud Afifi. "Semantic White Balance: Semantic Color Constancy Using Convolutional Neural Network." arXiv preprint arXiv:1802.00153 (2018).


完整源码下载请点击“阅读原文”

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值