There is a Permission problem when I run create_data.sh

183 Views Asked by At

enter image description here

/home/cow/VOC2007/trainval.txt: line 7902: VOC2007/JPEGImages/00149_00029.jpg: Permission denied

my creat_data.sh :

cur_dir=$(cd $( dirname ${BASH_SOURCE[0]} ) && pwd )
root_dir="$HOME/caffe"

cd $root_dir

redo=1
data_root_dir="$HOME"

dataset_name="VOC2007"
mapfile="$/home/cow/VOC2007/labelmap_voc.prototxt"

anno_type="detection"
db="lmdb"
min_dim=0
max_dim=0
width=0
height=0

extra_cmd="--encode-type=jpg --encoded"
if [ $redo ]
then
  extra_cmd="$extra_cmd --redo"
fi
for subset in test trainval
do
  python $root_dir/scripts/create_annoset.py --anno-type=$anno_type  --label-map-file=$mapfile --min-dim=$min_dim --max-dim=$max_dim --resize-width=$width --resize-height=$height --check-label $extra_cmd $data_root_dir 
    $HOME/VOC2007/$subset.txt
    $data_root_dir/$dataset_name/$subset"_"$db 
done

This problem is for each lines in test.txt and trainval.txt.

And "chmod -R 777 VOC2007" didn't work,what can I do? THANKS

1

There are 1 best solutions below

0
On

Script is using lot of directory paths. I am pretty sure some of them can not be accessed by the user executing script