Merge pull request #6781 from WenmuZhou/xlm

fix shape unmatch error in PSE postprocess
This commit is contained in:
zhoujun
2022-07-05 15:43:46 +08:00
committed by GitHub
@@ -58,6 +58,8 @@ class PSEPostProcess(object):
kernels = (pred > self.thresh).astype('float32')
text_mask = kernels[:, 0, :, :]
text_mask = paddle.unsqueeze(text_mask, axis=1)
kernels[:, 0:, :, :] = kernels[:, 0:, :, :] * text_mask
score = score.numpy()