caffe icon indicating copy to clipboard operation
caffe copied to clipboard

Can Caffe handle gray scale images?

Open shehrozskhan opened this issue 11 years ago • 3 comments

The documentation says that the images should be RGB, however if we have gray scale images, will Caffe have any problem with that? regards

shehrozskhan avatar Jun 02 '15 03:06 shehrozskhan

Caffe has no problem with that, see the documentation on blobs, layers and nets, where RGB is only an example.

How to enforce that they are treated as grayscale depends on your data layer.

burk avatar Jun 05 '15 18:06 burk

For example, the MNIST dataset is composed of greyscale images. A network for recognizing MNIST (e.g. LeNet) would be defined as:

name: "LeNet"
input: "data"
input_dim: 64 // batch size
input_dim: 1 // number of channels (3 for RGB)
input_dim: 28 // height
input_dim: 28 // width
...

ben-eysenbach avatar Jun 06 '15 22:06 ben-eysenbach

This tracker is for issues and bugs with Caffe. Please ask usage questions on the caffe-users list. Thanks!

longjon avatar Jun 07 '15 07:06 longjon