Should I gray scale the image?

眉间皱痕 提交于 2019-12-08 05:04:42

问题


I'm categorizing 30 types of clothes from the image using R-CNN Object Detection Library from tensorflow : https://github.com/tensorflow/models/tree/master/research/object_detection

Does color matter when we collect images for training and testing?

If I put only purple and blue shirts, I guess it won't recognize red shirts?

Should I gray scale all images to detect the types of clothes? :)


回答1:


Yes, colour does matter. The underlying visual feature extraction is based on a convolutional neural network, pre-trained to perform image recognition on colour images in the ImageNet dataset.

The R-CNN repository instructions on bringing in your own dataset asks for RGB images.

Dataset Requirements

For every example in your dataset, you should have the following information:

  1. An RGB image for the dataset encoded as jpeg or png.
  2. A list of bounding boxes for the image. Each bounding box should contain:
    • A bounding box coordinates (with origin in top left corner) defined by 4 floating point numbers [ymin, xmin, ymax, xmax]. Note that we store the normalized coordinates (x / width, y / height) in the TFRecord dataset.
    • The class of the object in the bounding box.


来源:https://stackoverflow.com/questions/46762421/should-i-gray-scale-the-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!