yizt / keras-ctpn

keras复现场景文本检测网络CPTN: 《Detecting Text in Natural Image with Connectionist Text Proposal Network》;欢迎试用,关注,并反馈问题...
Apache License 2.0
107 stars 38 forks source link

target.py正样本问题?不同的gt选择同一个anchor? #30

Closed chenying99 closed 3 years ago

chenying99 commented 3 years ago

合并两部分正样本索引

positive_bool_matrix = tf.logical_or(gt_iou_max_bool, anchors_iou_max_bool)

感觉按照target.py文件前面的规则,有可能不同的gt选择了同一个anchor;

而后面的逻辑选择正样本anchor时,每次随机抽取一部分(正样本anchor),其中会不会多次出现同一个anchor选择了不同的gt? 或者不同epoch中,同一张图片里面,相同索引的anchor选择了不同的gt?

yizt commented 3 years ago

理论上有可能,只要GT之间没有很高的重叠,就不会出现一对多的情况

在 2021年6月23日,下午2:06,chenying99 @.***> 写道:

合并两部分正样本索引

positive_bool_matrix = tf.logical_or(gt_iou_max_bool, anchors_iou_max_bool) 感觉按照target.py文件前面的规则,有可能不同的gt选择了同一个anchor;

而后面的逻辑选择正样本anchor时,每次随机抽取一部分(正样本anchor),其中会不会多次出现同一个anchor选择了不同的gt?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yizt/keras-ctpn/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV2STZMWYV6QNPQDXQLZF3TUF2UXANCNFSM47FCQZLA.

chenying99 commented 3 years ago

理论上有可能,只要GT之间没有很高的重叠,就不会出现一对多的情况 在 2021年6月23日,下午2:06,chenying99 @.***> 写道: 合并两部分正样本索引 positive_bool_matrix = tf.logical_or(gt_iou_max_bool, anchors_iou_max_bool) 感觉按照target.py文件前面的规则,有可能不同的gt选择了同一个anchor; 而后面的逻辑选择正样本anchor时,每次随机抽取一部分(正样本anchor),其中会不会多次出现同一个anchor选择了不同的gt? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#30>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV2STZMWYV6QNPQDXQLZF3TUF2UXANCNFSM47FCQZLA.

我的困惑就是,当gt去匹配iou最大的anchor的时候,逻辑上有可能有多个gt找到了同一个anchor ...

这会导致在训练时这些(带歧义的)anchor的gt编码是不固定的,搞得模型有点无所适从...

(当然正如up主所说,只要GT之间没有很高的重叠,这种概率应该是比较小的)