yolo_tensorflow icon indicating copy to clipboard operation
yolo_tensorflow copied to clipboard

Why the training makes no efforts?

Open ChiefGodMan opened this issue 7 years ago • 22 comments

Dear all: I have been training this network thousands of iterations, but I nearly cannot find any change about the loss value. So what's wrong? Does anyone have validated its validity? yolo yolo2

ChiefGodMan avatar May 19 '17 01:05 ChiefGodMan

Have you used a pre-trained network or where you training from scratch? In the original paper it is described, that they train the first CNN layers for solving a classification task, e. g. based on the ImageNet dataset and then add some more layers and fine-tune for object detection. [Section 2.2, https://arxiv.org/abs/1506.02640] I am not sure whether this is the reason for the problem, but maybe you could try to train with pre-trained weights?

ericdoerheit avatar May 25 '17 10:05 ericdoerheit

@ailias i have the seem question ,i changed the input data code(only train 'car' and 'cat'),but after the trainning,nothing can be detected i did not use any pre-trained weights, and here i have another question,if the class i want to train is not in the pre-trained weights,can i use the pre-train weights?

joashchn avatar May 31 '17 09:05 joashchn

@joashchn hi joashchn i have same problem with you. did you solve the this problem? my goal is the just one object detection in image. perhaps, your goal is the two object detection in image.

jongsukchoi avatar Jun 28 '17 00:06 jongsukchoi

@joashchn @ailias did you solve the problem? I have train it and test nothing in cat.jpg or person.jpg. Its training problem?

liuhyCV avatar Sep 23 '17 10:09 liuhyCV

@liuhyCV Did you meet the question of testing noting in person.jpg ? Just like the original jpg ,did not have any output and circle , did you solve the problem?

feitiandemiaomi avatar Oct 05 '17 06:10 feitiandemiaomi

I have the problem when I train the model without pre-training. The total loss goes from 42 to 10, and cannot get less any more. However I get loss about 6 when I fine-turn the model using the Yolo_small.ckpt . Is it impossible to train the model without any pre-trained weight?

shadowdyj avatar Oct 19 '17 01:10 shadowdyj

I also meet the same question. I train the download model-YOLO-small ,but finally,I find the result is pretty worse,i set the iteration time is thirty thousands.

linydf avatar Nov 21 '17 01:11 linydf

Has anyone solved the problem of training?

ss199302 avatar Nov 25 '17 10:11 ss199302

I have the same problems with you. I thought the weight that I trained without pre-training was not good that cause the problem(detect nothing).Then I changed the parameter‘THRESHOLD ’(in the config file) to 0.01,it did work!Although the result was not right!So my conclusion is if our loss can arrive about 6,the weight can be good enough to detect !

Liu-Yicheng avatar Nov 28 '17 11:11 Liu-Yicheng

@ailias Have you solved the problem of training?

ss199302 avatar Dec 03 '17 03:12 ss199302

now my loss arrive 3. but I am failed to result this condition

linydf avatar Dec 06 '17 09:12 linydf

@linydf What data set do you use?thanks!

ss199302 avatar Dec 20 '17 01:12 ss199302

@joashchn @jongsukchoi Hi! How can I changed the code if I want to input data (only train 'car' and 'cat')? Thank you! Shu Guo

xiaoshuguo750 avatar Jan 27 '18 02:01 xiaoshuguo750

edit config.py,just as this:

#WEIGHTS_FILE = None WEIGHTS_FILE = os.path.join(DATA_PATH, 'weights', 'YOLO_small.ckpt')

when turn on the pre-training weights YOLO_small.ckpt,the trained model can make effect!

my test.py which use the trained model ,just like this:

class Detector(object):

def __init__(self, net, weight_file):
    self.net = net
    self.weights_file = weight_file

    self.classes = cfg.CLASSES
    self.num_class = len(self.classes)
    self.image_size = cfg.IMAGE_SIZE
    self.cell_size = cfg.CELL_SIZE
    self.boxes_per_cell = cfg.BOXES_PER_CELL
    self.threshold = cfg.THRESHOLD
    self.iou_threshold = cfg.IOU_THRESHOLD
    self.boundary1 = self.cell_size * self.cell_size * self.num_class
    self.boundary2 = self.boundary1 + self.cell_size * self.cell_size * self.boxes_per_cell

    self.sess = tf.Session()
    self.sess.run(tf.global_variables_initializer())
         
    PATH = **'/media/stockerc/f/wz/project/yolo/data/pascal_voc/output/2018_02_23_11_13'
    print 'Restoring weights from: ' + PATH
    self.saver = tf.train.Saver()
    ckpt = tf.train.get_checkpoint_state(PATH)
    self.saver.restore(self.sess, ckpt.model_checkpoint_path)

zy486at189cn avatar Feb 23 '18 03:02 zy486at189cn

How do you get the 'YOLO_small.ckpt you gave'? is it your training results? or others.

leadcain84 avatar Mar 09 '18 09:03 leadcain84

I download it

-- 发自189邮箱 App 点击下载,安全、高效管理邮箱

http://t.mail.189.cn/rcyyzhw

leadcain84 [email protected]写到:

How do you get the 'YOLO_small.ckpt you gave'? is it your training results? or others. 
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

zy486at189cn avatar May 06 '18 10:05 zy486at189cn

@joashchn i have same problem with you. did you solve the this problem?

MindyZLM avatar May 23 '18 02:05 MindyZLM

My model can get the loss of 3, but it can not detect any right objects. Before i trained this model to fine-tune my own data, i have tried to fine-tune this model on pascal-voc, it can detect the right objects, but it's confidence was very low, such as 0.6.

XiangqianMa avatar May 27 '18 04:05 XiangqianMa

I have the same problem. I doubt that the model is right, but there's some errors in the loss function.

M000M avatar May 28 '18 16:05 M000M

I have the same problem, do you solve it?

guker avatar Mar 13 '19 01:03 guker

Have you used a pre-trained network or where you training from scratch? In the original paper it is described, that they train the first CNN layers for solving a classification task, e. g. based on the ImageNet dataset and then add some more layers and fine-tune for object detection. [Section 2.2, https://arxiv.org/abs/1506.02640] I am not sure whether this is the reason for the problem, but maybe you could try to train with pre-trained weights?

yes, you must pretrain,not train from scrath,otherwise,loss is about 10.0 and does not decrease

guker avatar Mar 14 '19 08:03 guker

Have you used a pre-trained network or where you training from scratch? In the original paper it is described, that they train the first CNN layers for solving a classification task, e. g. based on the ImageNet dataset and then add some more layers and fine-tune for object detection. [Section 2.2, https://arxiv.org/abs/1506.02640] I am not sure whether this is the reason for the problem, but maybe you could try to train with pre-trained weights?

yes, you must pretrain,not train from scrath,otherwise,loss is about 10.0 and does not decrease

@guker I have some problem,if my the num of detect classes is 5 not 20,how can I pre train,can I pre train with the YOLO_small.ckpt,or I need to pre train with only 5 classes?

LinzzMichael avatar Apr 06 '19 08:04 LinzzMichael