4b8716fd4bd6f462a9db9eee958f2508576ec019,gluoncv/utils/nn/matcher.py,BipartiteMatcher,hybrid_forward,#BipartiteMatcher#Any#Any#,65
Before Change
def hybrid_forward(self, F, x):
match = F.contrib.bipartite_matching(x, threshold=self._threshold,
is_ascend=self._is_ascend)
return match[0]
class MaximumMatcher(gluon.HybridBlock):
A Matcher implementing maximum matching strategy.
After Change
// otherwise positive/negative samples are confusing
// potential argmax and max
pargmax = x.argmax(axis=-1, keepdims=True) // (B, num_anchor, 1)
maxs = x.max(axis=-2, keepdims=True) // (B, 1, num_gt)
pmax = F.pick(x, pargmax, axis=-1, keepdims=True) // (B, num_anchor, 1)
mask = F.broadcast_greater_equal(pmax + self._eps, maxs) // (B, num_anchor, num_gt)
mask = F.pick(mask, pargmax, axis=-1, keepdims=True) // (B, num_anchor, 1)
new_match = F.where(mask > 0, pargmax, F.ones_like(pargmax) * -1)
result = F.where(match[0] < 0, new_match.squeeze(axis=-1), match[0])
return result
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: dmlc/gluon-cv
Commit Name: 4b8716fd4bd6f462a9db9eee958f2508576ec019
Time: 2018-06-15
Author: cheungchih@gmail.com
File Name: gluoncv/utils/nn/matcher.py
Class Name: BipartiteMatcher
Method Name: hybrid_forward
Project Name: raghakot/keras-vis
Commit Name: e3c42a0b8371bd4944efd70111c2458c28b9eca3
Time: 2016-12-15
Author: ragha@outlook.com
File Name: visualization.py
Class Name: Saliency
Method Name: visualize
Project Name: chainer/chainercv
Commit Name: 90b78b1379b3423aa3b4b5d0de7313f88bda23ab
Time: 2019-02-17
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/mask/mask_to_bbox.py
Class Name:
Method Name: mask_to_bbox