hizhangp / yolo_tensorflow

Tensorflow implementation of YOLO, including training and test phase.
MIT License
795 stars 442 forks source link

Pre-trained model problem #61

Open zihao-lu opened 6 years ago

zihao-lu commented 6 years ago

hello I want to ask if you use the yolo author's pre-trained model (the convolution layers weights)? @hizhangp

Tshzzz commented 6 years ago

I have the same problems. Is the YOLO_small.ckpt trained from scratch or covert from darknet models?

yurenchou commented 6 years ago

i have some problem, (A) There is no detection output when i run train.py. (the data set is from VOC2007) ==> WHY? The output "loss" ~= 9.xx and i observe that all the biases value are very small, for example, one of 'yolo/conv_11/biases' = 1.44529605e-11.

bellows is the setting of config.py { WEIGHTS_FILE = None

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

IMAGE_SIZE = 448
CELL_SIZE = 7
BOXES_PER_CELL = 2
ALPHA = 0.1
DISP_CONSOLE = False

OBJECT_SCALE = 1.0
NOOBJECT_SCALE = 0.5 #1.0
CLASS_SCALE = 2.0
COORD_SCALE = 5.0

# solver parameter
#
GPU = ''
LEARNING_RATE = 0.01 #0.0001
DECAY_STEPS = 30000
DECAY_RATE = 0.1
STAIRCASE = True
BATCH_SIZE = 32
MAX_ITER = 1000
SUMMARY_ITER = 10
SAVE_ITER = 1000

# test parameter
THRESHOLD = 0.2
IOU_THRESHOLD = 0.5

}

(B) load initial weight (YOLO_small.ckpt) into train.py, then start training.... ==> it can detect object. And, the output "loss" ~= 4.xx

bellows is the setting of config.py {

WEIGHTS_FILE = None

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

IMAGE_SIZE = 448
CELL_SIZE = 7
BOXES_PER_CELL = 2
ALPHA = 0.1
DISP_CONSOLE = False

OBJECT_SCALE = 1.0
NOOBJECT_SCALE = 0.5 #1.0
CLASS_SCALE = 2.0
COORD_SCALE = 5.0

# solver parameter
#
GPU = ''
LEARNING_RATE = 0.0001
DECAY_STEPS = 30000
DECAY_RATE = 0.1
STAIRCASE = True
BATCH_SIZE = 32
MAX_ITER = 1000
SUMMARY_ITER = 10
SAVE_ITER = 1000

# test parameter
THRESHOLD = 0.2
IOU_THRESHOLD = 0.5

}