Closed tengshaofeng closed 7 years ago
Another problem, when i run your code with all the input data ready, comes the following error :
Traceback (most recent call last):
File "train.py", in
I thought that calling restore function before saver.save? So dose the code is the latest code ?
Hi tengshaofeng
First of all, i ran some experiments so that i modified some conditions. For the first issue, in train.py 193 line,
for cascade_lv in xrange(1,etc.cascade_level):
if cascade_lv > 1:
the xrange of cascade_lv should be xrange(0,etc.cascade_level) and the if statement should be removed.
Maybe i trained the model whose cascade_lv is 2(48-net). So, hard neg mining from cascade_lv 1(24-net) and train the 48-net.
Also, for the second issue, you may understand why there is restore function before save. I loaded 24-net and hard neg mining and train 48-net.
I have understand what you said. Thanks very much. restore error from following code:
if cascade_lv == 0: saver_detect.restore(sess,etc.save_dir+"12-net.ckpt") elif cascade_lv == 1: saver_detect.restore(sess,etc.save_dir+"24-net.ckpt")
saver_calib_12.restore(sess,etc.save_dir+"12-net_calib.ckpt")
saver_calib_24.restore(sess,etc.save_dir+"24-net_calib.ckpt")
So shoud i run train_cali.py first?
training order is as follow: (12-net, 12-calib-net), (24-net, 24-calib-net), (48-net, 48-calib-net) the order in parenthesis does not matter
that restore is to collect hard negative from 12-net and 12-calib net
ok, it is so clear. Thank you very much. Here is the last question. It seems that your "normalization layer" keeps blank. Tensorflow does not have the function to acheive it ? I am the beginner to tensorflow. Sorry to bother you all the time.
I do not know whether there is normalization layer or not and that is why i omitted the normalization layer.
I think there is a normalization layer (LRN).
Hi @tengshaofeng, did you implement the LRN in the end? Did it give you any training speed boosts?
Also can I confirm, to train, do you guys run train.py and then afterwards run train_calib.py? I'm confused as to how you train both the 12-net and 12-calib-net in parallel?
Also, thank you so much for this implementation @mks0601!
As I said, 12-net and 12-calib net is different network. You do not need to train these networks simultaneously.
@mks0601 , Right ok - that's what I was thinking (having read through the paper)! So I was just a bit confused!
Thanks for the response!
Hi,@96imranahmed,
for the 1st question,
I have implemented the LRN, but I didn't investigate whether it can boost the training speed. I just do it like the paper said.
for the 2nd question,
You can train the all the 12-24-48-calib-net first then train the 12-24-48-net. if you have several machines gpu, you can train the 12-net on one machine, and train 24-cali-net on another machine.
Dear @mks0601 @tengshaofeng ,Sorry to bother you again, I'm running 'test.py' now, This should be the last step for the CNN_cascade, however when the code execute at 'load_db_test()', I found all the 'FDDB-fold-0X-ellipseList.txt' is empty, I am confused, could you please tell me when did you write data in this file?
dear mks0601: i am so appreciated with your great work. I have read your code these days. The following code comes my question:
code start
for cascade_lv in xrange(1,etc.cascade_level): #question
code ending
However "if cascade_lv == 0: ", i want to know xrange or range??? Look forward to your reply