mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-09-24 23:33:08 +08:00
Merge pull request #6781 from WenmuZhou/xlm
fix shape unmatch error in PSE postprocess
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user