How to enter multiple slice points to get three output layers

1,667 views
Skip to first unread message

Oier Mees

unread,
Dec 10, 2014, 12:02:47 PM12/10/14
to caffe...@googlegroups.com
Hi,
I have rgb images  consisting of three concatenated images and would like to use the slice layer to separate them. As slice_point is an int vector, there is apparently a way of specifying multiple slicing points, but I don't know the syntax. I have following definition, which doesn't work.

layers {
    name: "slice_frames"
    type: SLICE
    bottom: "data"
    top: "data_left"
    top: "data_middle"
    top: "data_right"
    slice_param {
        slice_dim: 1
        slice_point: 3,6
    }
}

Does anyone know how to specify two slice points (3 and 6) so I get three output layers? Or is slice layer constrained to two tops and I  have to use two consecutive slice layers to get three output layers?
Cheers,
Oier

Sergio Guadarrama

unread,
Dec 11, 2014, 12:28:52 PM12/11/14
to caffe...@googlegroups.com
slice_point is a repeated field, just repeat it as many times as needed, and provide enough tops.


layers {
    name: "slice_frames"
    type: SLICE
    bottom: "data"
    top: "data_left"
    top: "data_middle"
    top: "data_right"
    slice_param {
        slice_dim: 1
        slice_point: 3
        slice_point: 6
    }
}

Venu Sharma

unread,
Jun 25, 2015, 4:54:35 AM6/25/15
to caffe...@googlegroups.com
Hi Oier,
   How did you add three Images onto LMDB?
   If I'm not wrong u have 3 Images and One label right?

Oier Mees

unread,
Jul 2, 2015, 6:11:17 AM7/2/15
to caffe...@googlegroups.com
I just wrote a method to read the corresponding image and add them in a datum.

Daniela G

unread,
Jun 9, 2016, 9:17:32 AM6/9/16
to Caffe Users
Hi!
I'm trying to do the same you did.
Can you explain me how did you do this method? I looked into convert_imageset but I don't understand enough about it to know what to change.
Reply all
Reply to author
Forward
0 new messages