Sfoglia il codice sorgente

Fix t_recognizer issue. (#4387)

### What problem does this PR solve?

#4230

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.16.0
Kevin Hu 9 mesi fa
parent
commit
2e40c2a6f6
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3
    3
      deepdoc/vision/t_recognizer.py

+ 3
- 3
deepdoc/vision/t_recognizer.py Vedi File

@@ -23,7 +23,7 @@ sys.path.insert(
'../../')))

from deepdoc.vision.seeit import draw_box
from deepdoc.vision import LayoutRecognizer, TableStructureRecognizer, OCR, init_in_out
from deepdoc.vision import LayoutRecognizer, TableStructureRecognizer, OCR, init_in_out, Recognizer
import argparse
import re
import numpy as np
@@ -33,12 +33,12 @@ def main(args):
images, outputs = init_in_out(args)
if args.mode.lower() == "layout":
detr = LayoutRecognizer("layout")
layouts = super(Recognizer, detr)(images, thr=float(args.threshold))
if args.mode.lower() == "tsr":
labels = TableStructureRecognizer.labels
detr = TableStructureRecognizer()
ocr = OCR()

layouts = detr(images, thr=float(args.threshold))
layouts = detr(images, thr=float(args.threshold))
for i, lyt in enumerate(layouts):
if args.mode.lower() == "tsr":
#lyt = [t for t in lyt if t["type"] == "table column"]

Loading…
Annulla
Salva