内涵:reid

本周任務:re-id,起一個模型。

20170613:

模型例子:GitHub - daodaofr/caffe-re-id

附帶論文:PersonRe-Identification via Recurrent Feature Aggregation, Yichao Yan,Bingbing Ni, Zhichao Song, chao Ma, Yan Yan, xiaokang Yang, In ECCV2016.

代碼保存路徑:~/codes/reid_sourcecode

自己編寫的腳本代碼:create_filelist.sh(將原始文件轉換爲每行文件名標籤的形式)

create_lmdb.sh(調用caffe/build/tools/convert_imageset.bin講原始數據轉換爲lmdb形式,可以改变图片的大小)这部分详见http://www.cnblogs.com/denny402/p/5082341.html

问题:convert_imageset.bin有问题:

/home/zht/apps/caffe-master/build/tools/convert_imageset:error while loading shared libraries: libcudnn.so.5: cannot openshared object file: No such file or directory

解决方案:运行脚本时取掉sudo即可,因为lib文件仅对当前用户有效,即zhangteng

总结:1.forfile in $dir/*遍历dir目录下所有文件和文件夹

2.${basename$dir}最后一层路径或者文件名

3.ls$file | cut -d ‘/’ -f7 | sed “s/$/ $value/” >>a.txt$代表最末字符

4.grep-n -H -R "REGISTER_LAYER_CREATOR"在当前路径下搜索

来的任务:1.如何用模型例子跑起来

2.三通道

3.如何讲vbb数据转换为图片

# /usr/bin/env sh
DATA=/home/zht/codes/reid_sourcecode/output
echo "Create train.txt..."
rm -rf $DATA/train.txt
for file in $DATA/*
do
	#ls $file |cut -d '/' -f6>>label
	#echo $label
        #label=$file |cut -d '/' -f 2
        #echo $file
        #b=$file
	#a=$b| cut -d '/' -f1
	#echo $b
        #echo $a
        label=$(basename $file)
	ls $file | cut -d '/' -f7 | sed "s/$/ $label/">>$DATA/train.txt
	#echo file
	#echo $file
done
echo "Done.." 

#!/usr/bin/en sh
set -e
DATA=/home/zht/codes/reid_sourcecode/output
rm -rf $DATA/img_train_lmdb
/home/zht/apps/caffe-master/build/tools/convert_imageset --shuffle --resize_height=20 --resize_width=20 /home/zht/codes/reid_sourcecode/data/ /home/zht/codes/reid_sourcecode/data/train.txt /home/zht/codes/reid_sourcecode/data/train_lmdb

记录:

训练一个模型:坑:不要更改它的output1000到5因为它使用了dropout

batchsize=5过小,准确率只有0.81

batchsize=256,准确率有0.96

如果batchsize 过小,还会出现Restartingdata prefetching from提示,这不是错误,因为是因为数据集太小,它会很快的遍历一边数据集,然后就重新开始了。

outmemory:navid-msi来查看GPU使用情况

代码文件位于/home/zht/codes/myexamples/1/


 

http://www.cnblogs.com/wangxiaocvpr/p/5200837.html

ifeq($(USE_OPENCV), 1)

LIBRARIES+= opencv_core opencv_highgui opencv_imgproc

ifeq($(OPENCV_VERSION), 3)

LIBRARIES+= opencv_imgcodecs

endif

endif

opencv

loss=2.08643

accuracy=0.566667

makepy

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

学弟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值