gpt4 book ai didi

caffe - Caffe 上的多维标签数据

转载 作者:行者123 更新时间:2023-12-01 12:28:38 27 4
gpt4 key购买 nike

我计划使用 NYU depth v2 数据集实现一个 CNN,它可以从单个图像估计深度。通过本教程,我了解到在 Caffe 上实现处理分类问题的 CNN 很容易。我很好奇 Caffe 是否适合涉及多维基本事实(例如深度图像)和回归(深度估计)的任务。

我想要实现的是使用深度图像作为 ground truths 来训练一个可以估计深度图像的 CNN。我需要将标签作为单 channel 图像数据加载。

我只能通过 Shelhamer 找到与我的问题相关的答案 https://groups.google.com/d/msg/caffe-users/JXmZrz4cCMU/mBTU1__ohg4J

我知道我应该定义两个顶层,一个用于输入,另一个用于深度数据作为地面实况。然后我可以使用损失层(如 EucledianLoss)来计算损失。我在下面添加了一个模型。

这个模型会按预期工作吗?如果不行,有没有其他方法可以在 Caffe 上实现?

layer {
name: "data"
type: "ImageData"
top: "data"
image_data_param {
source: "input_set.txt"
batch_size: 50
}
}

layer {
name: "label"
type: "ImageData"
top: "label"
image_data_param {
source: "depth_set.txt"
batch_size: 50
}
is_color: false
}

layer {
name: "loss"
type: "EuclideanLoss"
bottom: "some_output_layer_name"
bottom: "label"
top: "loss"
}

最佳答案

是的,上面的模型应该按照您预期的方式工作。只需确保 some_output_layer_name blob 的尺寸与 label blob 的尺寸相同即可。

关于caffe - Caffe 上的多维标签数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36874736/

27 4 0