diff --git a/doc/doc_ch/PP-OCRv3_introduction.md b/doc/doc_ch/PP-OCRv3_introduction.md index b8a6ad1245bdd6f5e7d3a4e5a674ef46a13fe414..3c17921a24d2da9603fb41e82633e30e01dfd437 100644 --- a/doc/doc_ch/PP-OCRv3_introduction.md +++ b/doc/doc_ch/PP-OCRv3_introduction.md @@ -53,11 +53,10 @@ PP-OCRv3检测模型是对PP-OCRv2中的[CML](https://arxiv.org/pdf/2109.03144.p |序号|策略|模型大小|hmean|速度(cpu + mkldnn)| |-|-|-|-|-| -|baseline teacher|PP-OCR server|49M|83.2%|171ms| +|baseline teacher|DB-R50|99M|83.5%|260ms| |teacher1|DB-R50-LK-PAN|124M|85.0%|396ms| |teacher2|DB-R50-LK-PAN-DML|124M|86.0%|396ms| |baseline student|PP-OCRv2|3M|83.2%|117ms| -|student0|DB-MV3-RSE-FPN|3.6M|84.5%|124ms| |student1|DB-MV3-CML(teacher2)|3M|84.3%|117ms| |student2|DB-MV3-RSE-FPN-CML(teacher2)|3.6M|85.4%|124ms| diff --git a/doc/doc_en/PP-OCRv3_introduction_en.md b/doc/doc_en/PP-OCRv3_introduction_en.md index 9ab25653e219c18e1acaaf7c99b050f790bcb1b9..07894340c2de9fe2fe2d677167439ec581aa43e8 100644 --- a/doc/doc_en/PP-OCRv3_introduction_en.md +++ b/doc/doc_en/PP-OCRv3_introduction_en.md @@ -55,11 +55,10 @@ The ablation experiments are as follows: |ID|Strategy|Model Size|Hmean|The Inference Time(cpu + mkldnn)| |-|-|-|-|-| -|baseline teacher|PP-OCR server|49M|83.2%|171ms| +|baseline teacher|DB-R50|99M|83.5%|260ms| |teacher1|DB-R50-LK-PAN|124M|85.0%|396ms| |teacher2|DB-R50-LK-PAN-DML|124M|86.0%|396ms| |baseline student|PP-OCRv2|3M|83.2%|117ms| -|student0|DB-MV3-RSE-FPN|3.6M|84.5%|124ms| |student1|DB-MV3-CML(teacher2)|3M|84.3%|117ms| |student2|DB-MV3-RSE-FPN-CML(teacher2)|3.6M|85.4%|124ms| diff --git a/ppocr/data/imaug/label_ops.py b/ppocr/data/imaug/label_ops.py index c9bc2e7722e8027ce870e4969bfcdab720495c28..02a5187dad27b76d04e866de45333d79383c1347 100644 --- a/ppocr/data/imaug/label_ops.py +++ b/ppocr/data/imaug/label_ops.py @@ -438,7 +438,12 @@ class KieLabelEncode(object): texts.append(ann['transcription']) text_ind = [self.dict[c] for c in text if c in self.dict] text_inds.append(text_ind) - labels.append(ann['label']) + if 'label' in anno.keys(): + labels.append(ann['label']) + elif 'key_cls' in anno.keys(): + labels.append(anno['key_cls']) + else: + raise ValueError("Cannot found 'key_cls' in ann.keys(), please check your training annotation.") edges.append(ann.get('edge', 0)) ann_infos = dict( image=data['image'],