fcd690b14b04c11e7f25b9d473db056c4b7947b3,official/vision/keras_cv/ops/iou_similarity.py,,iou,#Any#Any#,59

Before Change


  intersections = intersection(box1, box2)
  areas1 = area(box1)
  areas2 = area(box2)
  unions = (
      tf.expand_dims(areas1, 1) + tf.expand_dims(areas2, 0) - intersections)
  return tf.where(
      tf.equal(intersections, 0.0), tf.zeros_like(intersections),
      tf.truediv(intersections, unions))

After Change


    intersections = intersection(gt_boxes, boxes)
    gt_boxes_areas = area(gt_boxes)
    boxes_areas = area(boxes)
    boxes_rank = len(boxes_areas.shape)
    boxes_axis = 1 if (boxes_rank == 2) else 0
    gt_boxes_areas = tf.expand_dims(gt_boxes_areas, -1)
    boxes_areas = tf.expand_dims(boxes_areas, boxes_axis)
    unions = gt_boxes_areas + boxes_areas
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/models
Commit Name: fcd690b14b04c11e7f25b9d473db056c4b7947b3
Time: 2020-09-30
Author: tanzheny@google.com
File Name: official/vision/keras_cv/ops/iou_similarity.py
Class Name:
Method Name: iou


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 3ca448728b74a7a6186c7c76f518f1362163ce0d
Time: 2018-04-07
Author: davide.tateo90@gmail.com
File Name: mushroom/policy/gaussian_policy.py
Class Name: GaussianPolicy
Method Name: diff_log


Project Name: NifTK/NiftyNet
Commit Name: 2665f09ab4159730c12ddbc3e643291f01234a80
Time: 2018-08-11
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/contrib/csv_reader/csv_reader.py
Class Name: CSVReader
Method Name: layer_op