dengdan / seglink

An Implementation of the seglink alogrithm in paper Detecting Oriented Text in Natural Images by Linking Segments
GNU General Public License v3.0
495 stars 178 forks source link

Slow evaluation speed... #14

Closed JarveeLee closed 7 years ago

JarveeLee commented 7 years ago

It is me again.... I tried to speed up evaluation by changing eval_seglink.py 's batch_size to 8 instead of 1 , which took me 40 mins to evaluate my own entire dataset of about 14000 images config.init_config(image_shape, batch_size = 8, seg_conf_threshold = FLAGS.seg_conf_threshold, link_conf_threshold = FLAGS.link_conf_threshold, train_with_ignored = FLAGS.train_with_ignored, seg_loc_loss_weight = FLAGS.seg_loc_loss_weight, link_cls_loss_weight = FLAGS.link_cls_loss_weight, )

but changing to 8 will report error ValueError: slice index 1 of dimension 0 out of bounds. for 'evaluation_512x512/strided_slice_4' (op: 'StridedSlice') with input shapes: [1,5460], [2], [2], [2] and with computed input tensors: input[1] = <1 0>, input[2] = <2 0>, input[3] = <1 1>.

What does it mean....? Can only evaluate with batch_size more than one ?

dengdan commented 7 years ago

Yes, only one image per image supported in testing. I put the decode process into graph, and the number of decoded bboxes varies from image to image, making it inconvenient to decode in batches.