Which is the simplest way to implement a network with 2 images as inputs?
Just use two ImageData layers. After that you can concatenate it if you need.
Do you have an example prototxt?
I've used an RGB representation (and use of discard data layer)
layer {
name: "weekly-data"
type: "ImageData"
top: "data_img0"
top: "vid"
image_data_param {
source: "train.txt"
is_color: true
batch_size: 15
}
transform_param {
scale: 0.0039215684
}
}
layer {
name: "weekly-data1"
type: "ImageData"
top: "data_img1"
top: "vid1"
image_data_param {
source: "test.txt"
is_color: true
batch_size: 15
}
transform_param {
scale: 0.0039215684
}
}
layer {
name: "concat"
bottom: "data_img0"
bottom: "data_img1"
top: "data_img"
type: "Concat"
concat_param {
axis: 1
}
}
And in inference how do you copy your data to each one of input layers(c++)
source: "train.txt"
train.txt contains a list if image file name one per line.
caffe get files for that list and make blob . So I don'n have to write any c++ code to load data.
From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:
_Please do not post usage, installation, or modeling questions, or other requests for help to Issues._
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.
how about the labels in the softmax layer? there are 2 sources of labels after the concat.. how to handle this?
regards,
@CHENTao-U Please use the caffe-users list for usage, installation, or modeling questions, or other requests for help.
You may also post questions on stackoverflow, make sure you tag them with caffe tag.
There is also caffe.help documenting the different layers of caffe.
Do not post such requests to Issues. Doing so interferes with the development of Caffe.
Please read the guidelines for contributing before submitting this issue.
Most helpful comment
layer {
name: "weekly-data"
type: "ImageData"
top: "data_img0"
top: "vid"
image_data_param {
source: "train.txt"
is_color: true
batch_size: 15
}
transform_param {
scale: 0.0039215684
}
}
layer {
name: "weekly-data1"
type: "ImageData"
top: "data_img1"
top: "vid1"
image_data_param {
source: "test.txt"
is_color: true
batch_size: 15
}
transform_param {
scale: 0.0039215684
}
}
layer {
name: "concat"
bottom: "data_img0"
bottom: "data_img1"
top: "data_img"
type: "Concat"
concat_param {
axis: 1
}
}