问题描述
我正在尝试使用CNN进行深度估计(这是我的最终目标),但是发现的问题是:我只是使用CNN对图像进行了分类,例如使用"CIFAR-10","MNIST", 猫与狗"等.要进行深度估计,我需要输出一个新图像(NYUv2数据集具有标记的图像).因此,我将输入一个256x256x3之类的图像,并需要输出另一个具有228x228x3之类的图像.
I'm trying to do depth estimation with CNNs (this is my ultimate goal), but a problem that i found is: I just did image classifications with CNNs, using for example "CIFAR-10", "MNIST", "Cats vs Dogs", etc. To do depth estimation I need to output a new image (the NYUv2 dataset has the labeled images). So, I'll input an image like 256x256x3 and need to output another image with for example 228x228x3.
我需要做什么?我可以暂时进行卷积,然后减少特征图并增加维数吗?谢谢
What I need to do? Can I just do the convolutions for a while and after that decrease the features maps and increase the dimension? Thanks
obs:我正在使用Tensorflow 2.0
obs: I'm using Tensorflow 2.0
推荐答案
我建议您使用 UNet .这种架构具有下采样层,其后是上采样层,以恢复到原始的空间尺寸.
I suggest you use a type of UNet. This kind of architecture has downsampling layers, followed by up sampling layers to get back to the original spatial dimensions.
这篇关于如何使用CNN输出图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!