利用自己数据集训练sast的loss飘忽不定
Created by: yingwei13mei
我使用公开数据集icdar2019-art,将它的标签文件转换成立sast制定的格式,例如:gt_3787.jpg [{"transcription": "SAAB", "points": [[192, 258], [231, 194], [305, 147], [401, 136], [430, 192], [352, 216], [283, 251], [242, 308]]}, {"transcription": "SCANIA", "points": [[323, 499], [411, 497], [489, 453], [533, 378], [573, 423], [528, 510], [434, 569], [324, 568]]}] 进行训练前,还利用插值算法,将标签文件的坐标点个数都补充到了一致的数目,例如14个. 脚本统计过标签文件中标签最多的点个数为13,不超过14. 试了两种插值算法,一种interpolate.splev Cubic Spline, 另一种是之间在相邻点位间线性插值来补充标签文件中坐标点数到14。 结果训练时还是都会有 Cross point does not exist 或者 invalid polygon. 导致: 2020-08-27 16:28:27,409-INFO: epoch: 0, iter: 2, 'lr': 1e-04, 'total_loss': 4.45639, 'score_loss': 0.89121, 'border_loss': 1.887751, 'tvo_loss': 0.742585, 'tco_loss': 0.29217, time: 1.135 2020-08-27 16:28:29,696-INFO: epoch: 0, iter: 4, 'lr': 1e-04, 'total_loss': 4.45639, 'score_loss': 0.89121, 'border_loss': 1.887751, 'tvo_loss': 0.725638, 'tco_loss': 0.290097, time: 1.141 2020-08-27 16:28:31,982-INFO: epoch: 0, iter: 6, 'lr': 1e-04, 'total_loss': 20056836000.0, 'score_loss': 0.889403, 'border_loss': 20056836000.0, 'tvo_loss': 0.725638, 'tco_loss': 0.290097, time: 1.145 2020-08-27 16:28:34,273-INFO: epoch: 0, iter: 8, 'lr': 1e-04, 'total_loss': 20056836000.0, 'score_loss': 0.889403, 'border_loss': 20056836000.0, 'tvo_loss': 0.725638, 'tco_loss': 0.290097, time: 1.138 2020-08-27 16:28:36,556-INFO: epoch: 0, iter: 10, 'lr': 1e-04, 'total_loss': 166.13765, 'score_loss': 0.887167, 'border_loss': 164.01006, 'tvo_loss': 0.711668, 'tco_loss': 0.287507, time: 1.141 2020-08-27 16:28:38,856-INFO: epoch: 0, iter: 12, 'lr': 1e-04, 'total_loss': 166.13765, 'score_loss': 0.882553, 'border_loss': 164.01006, 'tvo_loss': 0.688557, 'tco_loss': 0.275194, time: 1.146 2020-08-27 16:28:41,142-INFO: epoch: 0, iter: 14, 'lr': 1e-04, 'total_loss': 166.13765, 'score_loss': 0.877881, 'border_loss': 164.01006, 'tvo_loss': 0.65716, 'tco_loss': 0.248851, time: 1.145 2020-08-27 16:28:43,428-INFO: epoch: 0, iter: 16, 'lr': 1e-04, 'total_loss': 166.13765, 'score_loss': 0.877881, 'border_loss': 164.01006, 'tvo_loss': 0.688557, 'tco_loss': 0.275194, time: 1.150 2020-08-27 16:28:45,718-INFO: epoch: 0, iter: 18, 'lr': 1e-04, 'total_loss': 166.13765, 'score_loss': 0.877363, 'border_loss': 164.01006, 'tvo_loss': 0.672138, 'tco_loss': 0.269624, time: 1.145 2020-08-27 16:28:48,001-INFO: epoch: 0, iter: 20, 'lr': 1e-04, 'total_loss': 2277856000.0, 'score_loss': 0.866234, 'border_loss': 2277856000.0, 'tvo_loss': 0.661036, '
不清楚如何才能做到一个合适的标签文件满足sast模型正常训练了。。。