I want to create lmdb using convert_annoset. I wrote the script for this. But when i run it, the output in console: A total of 0 images. But When I use convert_imagenet, script working correct, but i solve the task of detection and i need annotation.
I have the folders for image and for annotation. The structures next:
I thought that path to images not correct but for convert_imagnet all working, so i dont know what wrong. Path to annotation also correct i think.
My script:
DB_FOLDER=/home/my_name/Desktop/detection/images/db
TOOLS=/home/my_name/Desktop/Caffe/caffe-jacinto/build/tools
ROOT_FOLDER=/home/my_name/Desktop/detection
TRAIN_DATA_ROOT=/home/my_name/Desktop/detection/
VAL_DATA_ROOT=/home/my_name/Desktop/detection/images/val/
RESIZE=true
if $RESIZE; then
RESIZE_HEIGHT=224
RESIZE_WIDTH=224
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_imagenet.sh to the path" \
"where the ImageNet 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_imagenet.sh to the path" \
"where the ImageNet validation data is stored."
exit 1
fi
echo "Creating train lmdb..."
GLOG_logtostderr=1 $TOOLS/convert_annoset \
--resize_height=$RESIZE_HEIGHT \
--resize_width=$RESIZE_WIDTH \
--shuffle \
$ROOT_FOLDER \
$TRAIN_DATA_ROOT/train.txt \
$DB_FOLDER/ilsvrc12_train_lmdb_MW
echo "Creating val lmdb..."
GLOG_logtostderr=1 $TOOLS/convert_annoset \
--resize_height=$RESIZE_HEIGHT \
--resize_width=$RESIZE_WIDTH \
--shuffle \
$ROOT_FOLDER \
$VAL_DATA_ROOT/val.txt \
$DB_FOLDER/ilsvrc12_val_lmdb_MW
echo "Done."
And also output to console:
Creating train lmdb...
I0323 17:40:53.776692 24771 convert_annoset.cpp:118] Shuffling data
I0323 17:40:53.884591 24771 convert_annoset.cpp:121] A total of 0 images.
I0323 17:40:53.885545 24771 db_lmdb.cpp:36] Opened lmdb /home/dinar/Desktop/kate/detection/images/db/ilsvrc12_train_lmdb_MW
Creating val lmdb...
I0323 17:40:54.109081 24777 convert_annoset.cpp:118] Shuffling data
I0323 17:40:54.216404 24777 convert_annoset.cpp:121] A total of 0 images.
I0323 17:40:54.217329 24777 db_lmdb.cpp:36] Opened lmdb /home/my_name/Desktop/detection/images/db/ilsvrc12_val_lmdb_MW
Done.
I want to create lmdb using
convert_annoset
. I wrote the script for this. But when i run it, the output in console: A total of 0 images. But When I useconvert_imagenet
, script working correct, but i solve the task of detection and i need annotation.I have the folders for image and for annotation. The structures next:
Annotation structure next:
I thought that path to images not correct but for
convert_imagnet
all working, so i dont know what wrong. Path to annotation also correct i think. My script:And also output to console: