2017-07-31 312 views
-1

我正嘗試在自己的數據集上工作,爲此,我必須創建一個LMDB文件,我曾使用此腳本創建不同數據集的LMDB文件,工作得很好,現在它只是拋出一個錯誤。 這是腳本。嘗試創建LMDB文件時出錯

CAFFE_ROOT=/home/decentmakeover/caffe 
OUTPUT=/home/decentmakeover/invasive_species 
LABEL_TEXT_ROOT=/home/decentmakeover/invasive_species 
TRAIN_DATA_ROOT=/home/decentmakeover/invasive_species/train/ 
VAL_DATA_ROOT=/home/decentmakeover/invasive_species/train/ 

# Set RESIZE=true to resize the images to 256x256. Leave as false if 
images have 
# already been resized using another tool. 
#RESIZE=false 
RESIZE=true 
if $RESIZE; then 
    RESIZE_HEIGHT=256 
    RESIZE_WIDTH=256 
else 
    RESIZE_HEIGHT=0 
    RESIZE_WIDTH=0 
fi 

echo "Creating train lmdb..." 

TOOLS=$CAFFE_ROOT/build/tools 

GLOG_logtostderr=1 $TOOLS/convert_imageset \ 
    --resize_height=$RESIZE_HEIGHT \ 
    --resize_width=$RESIZE_WIDTH \ 
    --shuffle \ 
    $TRAIN_DATA_ROOT \ 
    $LABEL_TEXT_ROOT/train.txt \ 
    $OUTPUT/invasive_species_train_lmdb 

echo "Creating val lmdb..." 

GLOG_logtostderr=1 $TOOLS/convert_imageset \ 
    --resize_height=$RESIZE_HEIGHT \ 
    --resize_width=$RESIZE_WIDTH \ 
    --shuffle \ 
    $VAL_DATA_ROOT \ 
    $LABEL_TEXT_ROOT/val.txt \ 
    $OUTPUT/invasive_species_val_lmdb 

echo "Compute image mean..." 

$TOOLS/compute_image_mean $OUTPUT/invasive_species_train_lmdb \ 
    $OUTPUT/invasive_species_mean.binaryproto 

echo "Done." 

,這是錯誤: The Error Photo

任何建議就如何解決這一問題將有助於

回答

1

其中正在創建LMDB必須事先存在的目錄。

確保空目錄invasive_species_train_lmdbinvasive_species_val_lmdb在路徑OUTPUT創建運行此腳本之前。