Open pribadihcr opened 7 years ago
@pribadihcr hi, run the scripts 4 times to generate tfrecords respectively. You should change variable item(keep the path of data(pos,neg,part or landmark)) in the get_dataset function.
@AITTSMD But why we should do it four times ?why not do it just like PNet? I'm sorry that i can't get the point. can u explain to me briefly? thx!
@T-mac93 Please refer the first item in Some Details in README
@AITTSMD why do we need positive, negative, part face?
change item
in get_dataset function and also return values to pos_landmark.tfrecord
in _get_output_filename function
@AITTSMD 你好,请问如果运行gen_RNet_tfrecords.py4次,为什么仍然需要执行gen_imglist_rnet.py呢?我的理解是运行了gen_imglist_pnet.py中生成的将几种图(pos,neg,part or landmark)合在了一个txt中?那是否不需要再执行Run中的9和13呢?望赐教
@houzidexiaoloulou gen_RNet_tfrecords.py只是用来产生tfrecord文件,并没有写在txt中~
@AITTSMD 你好,你在README中寫了""RNet和ONet的各自需要生成4个tfrecord(pos,neg,part,landmark),因为要控制各部分的样本比例(1:3:1:1)"",跟PAPER上不太一樣,是因為實驗結果比較好嗎? 若是這樣,為什麼不在gen_imglist_rnet.py和gen_imglist_onet.py的時候就把比例設好,這樣就不用跑四次了,感謝回答!
@kevinchang50105, 我就是这样做的,然后改了生成tfrecord的代码,我觉得这样做的结果也还是挺好的。
@AITTSMD @pribadihcr I have same question? why the ratio is different from the paper, which is 3:1:1:2 neg/pos/part/landmark ?
@tpys Just follow the original paper~
@AITTSMD ok, thanks u
@AITTSMD 你好,请问你说的修改get_dataset函数并运行四次指的是分别读取之前生成的neg part pos.txt,然后修改tfrecord文件名,分别保存四次对吗,所以get_dataset函数里并不应该读取之前代码里写的aug.txt,对吧?
@AITTSMD sorry but I am not getting what changes we have to make in gen_RNet_tfrecords.py in step 10 to run it 4 times. what are the changes we have to make each time??
@rashmisgh def _get_output_filename(output_dir, item, name, net): ----# item = 'lamdmark', 'pos', 'part' or 'neg' ----return '%s/%s_landmark.tfrecord' % (output_dir, item) def get_dataset(dir, item, net='PNet'): ----if item == 'landmark': --------item = '%s/%s__%saug.txt' % (net, item, net) ----else: --------item = '%s/%s%s.txt' % (net, item, net) these two functions should be changed, you can change by youself
@MrLeeBin93 The code you write is different from the original in gen_RNet_tfrecord.py, is it need to be modified according to yours?
@SavannahZhang Just like this: def get_dataset(dir, net):
#item = 'imglists/PNet/train_%s_landmark.txt' % net
#------uncomment below four line to generate four tfrecords for training RNet---------
#item = '%s/landmark_%s_aug.txt' % (net,net) #if you want to generate landmark_landmark tfrecord,uncomment this line.
#item = '%s/pos_%s.txt' % (net,net) #if you want to generate pos_landmark tfrecord,uncomment this line.
#item = '%s/neg_%s.txt' % (net,net) #if you want to generate neg_landmark tfrecord,uncomment this line.
item = '%s/part_%s.txt' % (net,net) #if you want to generate part_landmark tfrecord,uncomment this line.
def _get_output_filename(output_dir, name, net):
#return '%s/%s_%s_%s.tfrecord' % (output_dir, name, net, st)
#return '%s/train_PNet_landmark.tfrecord' % (output_dir)
#------uncomment below four line to generate four tfrecords for training RNet---------
#return '%s/landmark_landmark.tfrecord' % (output_dir) #if you want to generate landmark_landmark tfrecord,uncomment this line.
#return '%s/pos_landmark.tfrecord' % (output_dir) #if you want to generate pos_landmark tfrecord,uncomment this line.
#return '%s/neg_landmark.tfrecord' % (output_dir) #if you want to generate neg_landmark tfrecord,uncomment this line.
return '%s/part_landmark.tfrecord' % (output_dir) #if you want to generate part_landmark tfrecord,uncomment this line.
@Huanyongji Thanks a lot! It really helped!!
在第14步的时候,
Hi @AITTSMD,
in step 10, run the scripts 4 times. it means just run it 4 times or change something in the script?
Thanks.