Hello,welcometothetutorialofTsinghua-Tencent100k,inthistutorial,wewillshowyou:
cdcode/script./compile.shThen,weneedtobuildthedatasetintotheLMDBformat,andcalculatetheimagemeanforcaffetraining.
mkdir-p../../data/lmdb./1_convert_lmdb.sh./2_calc_img_mean.shFinally,westartthetrainingprocess.
../caffe/build/tools/caffetrain--solver../model/solver.prototxt--gpu0Thetrainingbegin!Themodelconvergesin40Kiterations,ittakesabout3to4days.
Explanationofdirectories:
Inthissection,wewillshowyoutheoverviewofthisdataset,firstweimportthenecceserylibraries.
cd../python//mnt/hd1/from_linux/data/TT100K/code/pythonIn[9]:importjsonimportpylabasplimportrandomimportnumpyasnpimportcv2importanno_func%matplotlibinlineThen,weloadthejsonannotationfileandlistofthetestimages'sid
datadir="../../data/"filedir=datadir+"/annotations.json"ids=open(datadir+"/test/ids.txt").read().splitlines()annos=json.loads(open(filedir).read())Let'stakealookaboutannotationjsonfile,
annoshastwokeys:
annos.keys()Out[12]:[u'imgs',u'types']annos['types']containstypeswehaveinTT100K
First,loadourresults,youcanreplaceitwithyourresults.
Functioneval_annoswilltellyouhowmanymarksareright,wrongandmissed,
someargumentscanbeusedduringevaluate,iouaretheboundingboxoverlapratio
Forexample,showtheaccuracy-recallcurveondifferentsize.