Commit Graph

96 Commits (d068370b85e2eb84d83351a85dcfb531edc121a2)

Author SHA1 Message Date
liukuikun e1e26d3f74
[Enchance] add codespell ignore and use mdformat (#1022)
* update

* update contributing

* update ci

* fix md

* update pre-commit hook

* update mdformat

Co-authored-by: gaotongxiao <gaotongxiao@gmail.com>
2022-06-09 14:58:44 +08:00
Qing Jiang 0c060099e1
[Fix] Fix config name of MASTER in ocr.py (#1044)
* loss

* fix

* 'fix'

* [update] full fix
2022-05-28 20:47:00 +08:00
tpoisonooo 426995747b
[Docs] Fix typo (#1024)
* Update README.md

* Update configs/textdet/panet/README.md

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update configs/textdet/panet/README.md

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
2022-05-24 23:38:26 +08:00
Qing Jiang 86879c6834
[Fix] Fix a typo problem in MASTER (#1031)
* loss

* fix

* 'fix'
2022-05-23 23:33:13 +08:00
Tong Gao 08eecb9256
[Fix] Remove confusing img_scales in pipelines (#1007) 2022-05-10 12:52:45 +08:00
Jianquan Ye 061d353b2a
[Model] Add MASTER (#807)
* fix #794: add MASTER

* fix conflict add MASTER

* fix conflict add MASTER

* fix conflict add MASTER

* fix conflict add MASTER

* fix conflict add MASTER

* fix conflict add MASTER

* fix conflict add MASTER

* Fix linting

* after git rebase main

* after git rebase main

* fix conflict add MASTER

* fix conflict add MASTER

* after git rebase main

* fix conflict add MASTER

* fix conflict add MASTER

* fix conflict add MASTER

* after git rebase main

* add GCAModule to plugins

* coexist master and master_old

* fix merge mmocr 0.5.0 conflict

* fix lint error

* update

* [fix] remove remains in __init__

* [update] update code in review

* update readme for master

* Add docstr to MasterDecoder, refined MasterDecoder, remove MASTERLoss

* Unify the output length of MasterDecoder in train and test mode; add test for it, remove MasterLoss

* update readme

* update

* update metafile,README,demo/README,config,ocr.py

* Update mmocr/utils/ocr.py

* update

Co-authored-by: gaotongxiao <gaotongxiao@gmail.com>
Co-authored-by: Mountchicken <mountchicken@outlook.com>
2022-05-05 16:06:15 +08:00
Xinyu Wang fbc138d2d3
[Feature] Add DBNet++ (#973)
* add dbnet++

* fix docstring

* fix some param names

* fix

* fix docstring

* add init

* add doc; remove configs

* add dbnet++ to readme

* fix readme

* update config

* update readme

* update readme

* update ocr.py

* update metafile.yml

* update readme

* update readme

* move to dbnetpp

* fix paths

* fix head level

* fix typo

* update demo.md

* Update configs/textdet/dbnetpp/README.md

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* fix typo

* fix link
2022-05-05 14:39:20 +08:00
Xinyu Wang 28c9e460d5
[Enhancement] Add SynthText dataset config (#983)
* add synthtext config; add db pretrain config; move checkpoint config to schedule

* add db_r50 synthtext config

* fix r50 eval iter

* fix lint

* fix
2022-05-05 12:57:07 +08:00
Qing Jiang d8549ade85
[Feature] Support loading images and labels from lmdb file (#982)
* loss

* fix

* add LoadImageFromLMDB

* update

* new version

* add json

* fix bug

* Compatible with older versions

* modify test_loader

* add docstring and update test_loader

* fix a bug

* fix docstring and update doc

* update

* Update mmocr/datasets/utils/backend.py

Co-authored-by: Xinyu Wang <45810070+xinke-wang@users.noreply.github.com>

* Update docs/en/tutorials/dataset_types.md

Co-authored-by: Xinyu Wang <45810070+xinke-wang@users.noreply.github.com>

* fix lint

Co-authored-by: Xinyu Wang <45810070+xinke-wang@users.noreply.github.com>
2022-04-29 15:46:36 +08:00
Xinyu Wang 798614aad0
[Enhancement] Update Dataset Configs (#980)
* update runner in configs

* update AnnFileLoader
2022-04-27 12:53:57 +08:00
Tong Gao 700b5d7a60
[Fix] Revert a wrong setting in db_r18 cfg (#978) 2022-04-27 10:30:46 +08:00
Tong Gao 888f700134
[Enhancement] Support dynamic threshold range in eval_hmean (#962)
* [Enhancement] Support dynamic threshold range in eval_hmean

* upgrade textdetdataset, add deprecate warning
2022-04-22 17:07:36 +08:00
garvan2021 b11fa80d82
[Fix] correct meta key (#926)
* correct meta key

* fix test metakey
2022-04-18 09:09:09 +08:00
Tong Gao d901b37035
[Fix] Add num_classes to configs of ABINet (#805)
* [Fix] Add num_classes to configs of ABINet

* add comments
2022-03-16 17:17:02 +08:00
Tong Gao a36de7b48e
[Fix] Add necessary keys to test_pipelines to enable test-time visualization (#754) 2022-01-26 21:02:31 +08:00
liukuikun 976b976e4a
[Docs] update readme according to standard (#742)
* config/readme standard

* add ABINet linking

* fix linking error, delete unused cite and adjust note sytle

* union note format

* Remove > before paper link when generating docs
2022-01-25 23:02:59 +08:00
Tong Gao ad3957bb41
[Enhancement] Speed up training (#739) 2022-01-19 20:14:41 +08:00
Hongbin Sun 5176e1bd5a
[Fix] fix link (#726) 2022-01-12 10:25:07 +08:00
Hongbin Sun fb1892a1ae
[Fix] fix bug of show_results in single_gpu_test (#667)
* move single_gpu_test to mmocr/apis

* fix show result in single_gpu_test

* add unittest

* add docstring

* add unittest for kie

* avoid re-define

* remove skipif

* add skip

* fix conflict

* fix with comment

* add note in readme

* update
2021-12-23 03:30:01 +00:00
Tong Gao 9104667112
[Model] Full ABINet Framework (#651)
Co-authored-by: liukuikun <24622904+Harold-lkk@users.noreply.github.com>
2021-12-15 11:21:54 +08:00
Hongbin Sun 7874531db3
[Refactor] refactor textdet postprocess (#640)
* refactor textdet postprocess using build_postprocessor

* update docstring

* update docstring

* update postprocess docstring

* compatible with previous configs

* rename to BaseTextDetector

* rename to DRRGPostprocessor

* fix

* update warning

* fix

* fix conflict

* rename back

* rename warpper to utils

* fix doc
2021-12-14 17:35:44 +08:00
Hongbin Sun 0a1787d6bc
[Refactor] refactor transformer modules (#618)
* base refactor

* update config

* modify implementation of nrtr

* add config file

* add mask

* add operation order

* fix contiguous bug

* update config

* fix pytest

* fix pytest

* update readme

* update readme and metafile

* update docstring

* fix norm cfg and dict size

* rm useless

* use mmocr builder instead

* update pytest

* update

* remove useless

* fix ckpt name

* fix path

* include all config file into pytest

* update inference

* Update test_recog_config.py
2021-12-04 17:12:31 +08:00
Hongbin Sun 5a8859fe66
[Refactor] Refactor text detection config (#626)
* refactor textdet configs

* remove duplicate keys in _base_

* remove import from config

* syncbn to bn on cpu

* minimize change
2021-12-03 19:37:43 +08:00
Tong Gao 69d5040590
[Docs] Update model readme (#604)
* update satrn

* Add intro and pic to readmes

* update stats.py

* abstract for tps

* Fix CRNN and TPS CRNN readme
2021-11-30 16:40:18 +08:00
Tong Gao 5654079839
[Fix] Fix DBNet_r50 config (#625) 2021-11-26 12:26:32 +00:00
Hongbin Sun 3188e53404
[Refactor] refactor textrecog config structure (#617)
* refactor configs of textrecog

* remove duplicate key in config _base_

* fix typo

* rename dataset config file
2021-11-25 16:27:45 +08:00
Hongbin Sun 98c5bff1e0
[Feature] Save results to json file for kie. (#589)
* save results json for kie

* update config

* Fix KIE inference bug

Co-authored-by: gaotongxiao <gaotongxiao@gmail.com>
2021-11-15 20:28:13 +08:00
Shouping Shan 18fde080c4
[Fix] Modify algorithm "sar" weights path in metafile (#581)
Original model `sar_r31_parallel_decoder_academic` weights path in sar/metafile.yml belongs to crnn which should be modified.
2021-11-12 12:55:56 +08:00
Tong Gao a9fde9146f
[Feature] Improve dbnet r50 by fixing std (#578) 2021-11-11 19:10:12 +08:00
Tong Gao 34bd6b9bbb
[Docs] Docs for KIE CloseSet & OpenSet (#573)
* add kie docs

* fix paths

* sync cn docs

* fix layout error
2021-11-11 17:39:27 +08:00
Hongbin Sun a50b0c9fb9
[Feature] Support openset kie (#498)
* add openset kie dataset

* updare readme

* add anno convert script

* update docstring

* update script

* add & update docstring

* fix typo

* update docstring format
2021-11-11 14:47:38 +08:00
Tong Gao 5fb1268a06
unify task names in metafiles (#548) 2021-11-03 15:03:37 +08:00
Tong Gao dab5725d70
fix paper field in metafiles (#550) 2021-11-03 15:02:31 +08:00
Tong Gao 2f983eca83
[Fix] Fix PyTorch 1.6 incompatible checkpoints (#540)
* fix pt1.6 incompatible checkpoints

* fix satrn metafile
2021-10-27 19:12:52 +08:00
Tong Gao abfe75dc62
[Fix] Update checkpoint links for SATRN (#518) 2021-10-10 11:26:37 +08:00
Tong Gao aa4b5b5574
[Fix] Allow invalid polygons in intersection and union by default (#471)
* Allow invalid polygons in intersection and union by default

* update docs
2021-09-28 10:57:12 +08:00
Tong Gao 8c72d80164
[Fix] Fix image export in test.py for KIE models (#486)
* Fix image export in test.py for sdmgr model

* fix pretrained
2021-09-18 18:24:55 +08:00
Tong Gao 4c43f3fc47
[Docs] Fix a model link and add the metafile for SATRN (#473)
* update model link

* add metafile
2021-09-01 03:01:11 +00:00
LvTianlei 8f377f2fa2
[Feature] Add Satrn (#405)
* Add SATRN

* Create satrn_small_academic.py

* Update README.md

* change config name

* Update mmocr/models/textrecog/backbones/shallow_cnn.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update configs/textrecog/satrn/satrn_academic.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update configs/textrecog/satrn/satrn_small.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update shallow_cnn.py

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update test_ocr_encoder.py

* change keep_aspect_ratio=False

* Update transformer_layer.py

* Update configs/textrecog/satrn/satrn_small.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update configs/textrecog/satrn/satrn_academic.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update mmocr/models/textrecog/layers/transformer_layer.py

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update transformer_layer.py

* Apply suggestions from code review

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>

* Update transformer_layer.py

* update satrn readme

* add satrn to ocr.py

* add satrn_sm and fix configs

* add a test for config

* add copyright info

* use mmocr registry

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
2021-08-19 22:02:58 +08:00
Tong Gao 7571763376
[Refactor] Use MMOCR's registry (#436)
* [Refactor] Use MMOCR's registry

1. Define MMOCR's registries as a child of MMDet's
2. Register all models to MMOCR's own registries
3. Modify some model configs so that some models in MMDet can be
   correctly located
4. Remove some outdated demo scripts

* add detectors
2021-08-19 19:17:15 +08:00
Hongbin Sun 3707d67106
support batch inference for crnn and segocr (#407)
* support batch inference for crnn and segocr
2021-08-03 16:52:58 +08:00
Tong Gao 4f7270e574
Fix #282: Support init_cfg & update depreciated configs (#365)
* update coco ref

* init_cfg for dbnet

* initcfg for mask_rcnn

* textsnake init_cfg

* fix dbnet

* panet initcfg

* psenet initcfg

* fcenet initcfg

* drrg initcfg

* add init_cfg to detectors

* update maskrcnn config file to support mmdet

* fix init_cfg of fce_head

* crnn initcfg

* init_weights in training

* nrtr initcfg

* robust_scanner initcfg

* sar init_cfg

* seg init_cfg

* tps_crnn init_cfg

* sdmgr initcfg

* ner init_cfg

* fix textsnake

* sdmgr initcfg

* move "pretrained" to "init_cfg" for config files

* Moduleslist update

* fix seg

* ner init_cfg

* fix base

* fix encode decode recognizer

* revert dbnet config

* fix crnn

* fix base.py

* fix robust_scanner

* fix panet

* fix test

* remove redundant init_weights() in fcehead

* clean up

* relex mmdet version in workflow

* Add dependency version check

* Update mmocr/models/textdet/dense_heads/pse_head.py

Co-authored-by: Hongbin Sun <hongbin306@gmail.com>

Co-authored-by: Hongbin Sun <hongbin306@gmail.com>
2021-07-20 23:18:25 +08:00
Tong Gao 884755d05d
Fix #112: Remove the need of drop_orientation_info in data preprocessing steps (#375)
* ctw1500 ignore orientation

* restore maskrcnn config

* ignore_orientation support for icdar datasets

* update docs

* ignore orientation for total text

* Add LoadOCRImageFromFile

* Fix typo

* simplify design

* remove LoadOCRImageFromFile

* update chinese docs
2021-07-20 23:02:25 +08:00
Hongbin Sun 6d97d8286e
Update nrtr batch size (#370) 2021-07-16 15:06:36 +08:00
Tong Gao 1a5a880abb
fix nrtr cfg (#356) 2021-07-08 13:30:58 +08:00
Hongbin Sun 20f65fb521
use unifor_concat_datase instead of concat_dataset (#343)
* use unifor_concat_datase instead of concat_dataset

* add unittest for uniform_concat_dataset
2021-07-03 16:03:37 +08:00
lizz 8999c56159
Fix kie_test_imgs script for novisual (#319)
* Fix kie_test_imgs script for novisual

Signed-off-by: lizz <lizz@sensetime.com>

* Fix test

Signed-off-by: lizz <lizz@sensetime.com>
2021-06-24 07:22:34 +00:00
Hongbin Sun ae90deab68
fix bug in sdmgr config (#316) 2021-06-23 16:58:56 +08:00
Hongbin Sun 82f64a5b62
support batch inference during testing (#310)
* support batch inference during testing

* fix unittest

* update docs using url

* set cfg for train, val and test

* update docs

* update docs and test.py

* samples_per_gpu as global setting

* changes revert
2021-06-23 11:34:29 +08:00
Hongbin Sun 50a25e718a
update ckpt link (#287) 2021-06-15 20:28:09 +08:00