Some problems occurred in testing
Hi, im interested in your amazing project. I've trained a model followed by your steps. But when i tried to test the model. It seems that nothing was detected in the picture. However, run the test.py with YOLO_small.ckpt is OK. But I cannot detect anything with save.ckpt-15000 etc. i changed nothing in your train.py. could you tell me what's possibly going wrong?
hi simon, did you solve the problem? i have the seem question ,i changed the input data code(only train 'car' and 'cat'),but after the trainning,nothing can be detected
Hi Simon, did you solve the problem? Because I am facing the same problem. So I changed MAX_ITER from 15000 to 30000 in my configuration, but the loss was not reduced to less than about 9 and could not detect anything in this train.
@joashchn @jongsukchoi unfortunately, i did not solve the problem```
I have the same problem. I have tried fine tune from YOLO_small.ckpt, the model could detect objects but it performed a little worse than YOLO_small.ckpt
I have the same problem... I use my trained weight (save.ckpt-15000) for testing, but nothing detected...@@ Is loss too high? (about 10) Have anyone solved the problem?
@NickZhung I trained the dataset, but I don't know which is the trained model. when I complete the training, I get three file after the last iteration. they are save.ckpt-15000.data-00000-of-00001,save.ckpt-15000.index and save.ckpt-15000.meta. which file should I use as the model for testing ? Help!
I think I have solute my own problem. In test.py, modify the following two lines like this: parser.add_argument('--weights', default="save.ckpt-15000", type=str) parser.add_argument('--weight_dir', default='pascal_voc/output/2017_11_26_09_36/', type=str)
@passion3394 Do you use the pre training weighs? and how much is the final loss? Is the test effect number good
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(with pre——training),the weight can be good enough to detect !
@passion3394 Thank you for your advice.I successfully run the test.py thought the result is not satisfied.
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)
I have the same question(no bounding-box in the test_pic)!and I used 1.5h to debug and figure this problem...
I checked the path problem. I finally found that if i change "THRESHOLD and IOU_THRESHOLD " in the configure.py, i can get the bounding-box(although it totally wrong) . So i guess the threshold is the probability threshold to show the box and the iou_threshold is the threshold to merge the boxes.
I hope this will help you

Hi Simon, did you solve the problem? Because I am facing the same problem. So I changed MAX_ITER from 15000 to 30000 in my configuration, but the loss was not reduced to less than about 9 and could not detect anything in this train.
I try it ,and MAX_ITER was set 50000, but loss was not reduced to less than about 9, and not detect anything too