Sunday, September 15, 2013

a script for counting images/features

for i in $(ls);
 do
cd $i;
imcount=`ls |wc -l`;
cd /home/nchavali/feature_extraction/SUN_source_code_v2/data/ImagenetDataset/feature/$i;
for j in $(ls);
do
cd $j;
fcount=`ls|wc -l`;
if [ "$imcount" -ne "$fcount" ]; then
echo $i;
echo $imcount
echo $j;
echo $fcount;
fi
cd /home/nchavali/feature_extraction/SUN_source_code_v2/data/ImagenetDataset/feature/$i;
done

cd /home/nchavali/feature_extraction/SUN_source_code_v2/data/ImagenetDataset/image;
done

No comments: