yuanzhi.zyz yingda.chen 3 years ago
parent
commit
12b8f5d04b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modelscope/pipelines/cv/ocr_recognition_pipeline.py

+ 2
- 1
modelscope/pipelines/cv/ocr_recognition_pipeline.py View File

@@ -91,7 +91,8 @@ class OCRRecognitionPipeline(Pipeline):
data.append(mask)

data = torch.FloatTensor(data).view(
len(data), 1, IMG_HEIGHT, IMG_WIDTH).cuda() / 255.
len(data), 1, IMG_HEIGHT, IMG_WIDTH) / 255.
data = data.to(self.device)

result = {'img': data}



Loading…
Cancel
Save