how to prepare gray image data for caffe input
<p>I have read lots of references to prepare image data for caffe input but have not been able to solve my problem yet!!</p>

<p>I have put <code>.jpg</code> image files in 2 seperate folders:</p>

<pre><code>folder  train: containing 100,000 image files of size 227*227
folder val: containing 9,000 image files of size 227*227
</code></pre>

<p>I put them in a folder in <code>/home/user/DL</code></p>

<p>Then I made two text files listing the names of the images in <code>train</code> and <code>val</code> folders as:</p>

<pre><code>.
.
p127.jpg 2
p943.jpg 2
p8765.jpg 1
.
.
</code></pre>

<p>and I put these two files in <code>/home/user/caffe-master/data/DL</code>.</p>

<p>I made <code>DL_create.sh</code> located in <code>/home/user/caffe-master/examples/DL</code> as bellow:</p>

<pre><code>set -e

EXAMPLE=examples/DL
DATA=data/DL
TOOLS=build/tools

TRAIN_DATA_ROOT=/home/user/DL/train/
VAL_DATA_ROOT=/home/user/DL/val/


RESIZE=true
if $RESIZE; then
  RESIZE_HEIGHT=227
  RESIZE_WIDTH=227
else
  RESIZE_HEIGHT=0
  RESIZE_WIDTH=0
fi

if [ ! -d "$TRAIN_DATA_ROOT" ]; then
  echo "Error: TRAIN_DATA_ROOT is not a path to a directory:  $TRAIN_DATA_ROOT"
  echo "Set the TRAIN_DATA_ROOT variable in create_DL.sh to  the path" \
       "where the DL training data is stored."
  exit 1
fi

if [ ! -d "$VAL_DATA_ROOT" ]; then
  echo "Error: VAL_DATA_ROOT is not a path to a directory: $VAL_DATA_ROOT"
  echo "Set the VAL_DATA_ROOT variable in create_DL.sh to the path" \
       "where the DL validation data is stored."
  exit 1
fi

echo "Creating train lmdb..."

GLOG_logtostderr=1 $TOOLS/convert_imageset \
    --resize_height=$RESIZE_HEIGHT \
    --resize_width=$RESIZE_WIDTH \
    --shuffle \
    --gray \
    $TRAIN_DATA_ROOT \
    $DATA/train.txt \
    $EXAMPLE/DL_train_lmdb

echo "Creating val lmdb..."

GLOG_logtostderr=1 $TOOLS/convert_imageset \
    --resize_height=$RESIZE_HEIGHT \
    --resize_width=$RESIZE_WIDTH \
    --shuffle \
    --gray \
    $VAL_DATA_ROOT \
    $DATA/val.txt \
    $EXAMPLE/DL_val_lmdb

echo "Done."
</code></pre>

<p>Then when I run <code>DL_create.sh</code> script to change my image data into <code>lmdb</code> it can not find my images and gives messages like:</p>

<pre><code>.
.
.
E0922 14:35:24.152361 31301 io.cpp:80] Could not open or find file /home/user/caffe-master/data/DL/train/p84167.jpg
E0922 14:35:24.160773 31301 io.cpp:80] Could not open or find file /home/user/caffe-master/data/DL/train/p24118.jpg
.
.
.
</code></pre>

<p>could you please help me know where I am doing mistake??!?!</p>