Compare commits

...

4 Commits

Author SHA1 Message Date
Xiaomeng Zhao
a0da3029fd Update mineru/model/utils/pytorchocr/modeling/backbones/rec_lcnetv3.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-24 15:54:12 +08:00
Xiaomeng Zhao
30fe325428 Update mineru/model/utils/tools/infer/predict_rec.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-24 15:53:55 +08:00
Xiaomeng Zhao
6131013ce9 Merge pull request #3822 from opendatalab/dev
Dev
2025-10-24 15:46:40 +08:00
Xiaomeng Zhao
4eddf28c8f Merge pull request #3820 from opendatalab/dev
Dev
2025-10-24 14:59:35 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -256,7 +256,7 @@ class LearnableRepLayer(nn.Module):
input_dim = self.in_channels // self.groups
kernel_value = torch.zeros(
(self.in_channels, input_dim, self.kernel_size, self.kernel_size),
dtype=branch.weight.dtype, device=branch.weight.device,
dtype=branch.weight.dtype, device=branch.weight.device,
)
for i in range(self.in_channels):
kernel_value[

View File

@@ -137,7 +137,7 @@ class TextRecognizer(BaseOCRV20):
h, w = img.shape[:2]
ratio = w / float(h)
ratio_imgH = max(math.ceil(imgH * ratio), self.limited_min_width)
resized_w = min(imgW,int(ratio_imgH))
resized_w = min(imgW, int(ratio_imgH))
resized_image = cv2.resize(img, (resized_w, imgH)) /127.5 - 1
padding_im = np.zeros((imgC, imgH, imgW), dtype=np.float32)
padding_im[:, :, 0:resized_w] = resized_image.transpose((2, 0, 1))