Skip to content

Commit

Permalink
Clean code.
Browse files Browse the repository at this point in the history
  • Loading branch information
qingqing01 committed May 29, 2018
1 parent ae9a7e6 commit f530d78
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
7 changes: 2 additions & 5 deletions fluid/face_detction/image_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ def satisfy_sample_constraint(sampler, sample_bbox, bbox_labels):
if sampler.min_jaccard_overlap == 0 and sampler.max_jaccard_overlap == 0:
return True
for i in range(len(bbox_labels)):
object_bbox = bbox(
bbox_labels[i][0],
bbox_labels[i][1], # tangxu @ 2018-05-17
bbox_labels[i][2],
bbox_labels[i][3])
object_bbox = bbox(bbox_labels[i][0], bbox_labels[i][1],
bbox_labels[i][2], bbox_labels[i][3])
overlap = jaccard_overlap(sample_bbox, object_bbox)
if sampler.min_jaccard_overlap != 0 and \
overlap < sampler.min_jaccard_overlap:
Expand Down
3 changes: 1 addition & 2 deletions fluid/face_detction/pyramidbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ def permute_and_reshape(input, last_dim):
self.prior_boxes = fluid.layers.concat(boxes)
self.box_vars = fluid.layers.concat(vars)

def vgg_ssd(self, num_classes, image_shape): # tangxu

def vgg_ssd(self, num_classes, image_shape):
self.conv3_norm = self._l2_norm_scale(self.conv3)
self.conv4_norm = self._l2_norm_scale(self.conv4)
self.conv5_norm = self._l2_norm_scale(self.conv5)
Expand Down
2 changes: 1 addition & 1 deletion fluid/face_detction/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
add_arg('batch_size', int, 16, "Minibatch size.")
add_arg('num_passes', int, 120, "Epoch number.")
add_arg('use_gpu', bool, True, "Whether use GPU.")
add_arg('use_pyramidbox', bool, False, "Whether use GPU.")
add_arg('use_pyramidbox', bool, False, "Whether use PyramidBox model.")
add_arg('dataset', str, 'WIDERFACE', "coco2014, coco2017, and pascalvoc.")
add_arg('model_save_dir', str, 'model', "The path to save model.")
add_arg('pretrained_model', str, './vgg_model/', "The init model path.")
Expand Down

0 comments on commit f530d78

Please sign in to comment.