* Add kie_image_demo.py
* Add kie demo docs
* Add brief instructions for kie image demo
* Add ann file field and return data for kie image demo
* Follow lint and import rules
* Fix bugs, reuse functions in KIEDataset, and use a new demo pic
* Add config-dir and fix indexing bug in ocr script
* [Feature] Improve ocr.py
1. Add box stitching back to ocr.py
2. Add config_dir which allows users to specify the default config path
3. Warn users when overriding parameters are set
4. Allow users to use customized checkpoint files
* Add docs for new ocr.py
* Add docs for merge
* Support kie in ocr.py
* Merged kie to ocr.py
* update docs, remove unsupported unvisual sdmgr
* Update mmocr/apis/inference.py
Co-authored-by: Hongbin Sun <hongbin306@gmail.com>
* Apply suggestions from code review
Co-authored-by: Hongbin Sun <hongbin306@gmail.com>
* fix linting
Co-authored-by: gaotongxiao <gaotongxiao@gmail.com>
Co-authored-by: Hongbin Sun <hongbin306@gmail.com>
add change directory to `mmocr` after git clone: `%cd mmocr`
"!pip install -r requirements.txt\n", was failing in colab as after git clone one needs to change dir to mmocr.
* update ner standard code format
* add pytest
* fix pre-commit
* Annotate the dataset section
* fix pre-commit for dataset
* rm big files and add comments in dataset
* rename configs for ner task
* minor changes if metric
* Note modification
* fix pre-commit
* detail modification
* rm transform
* rm magic number
* fix warnings in pylint
* fix pre-commit
* correct help info
* rename model files
* rename err fixed
* 428_tag
* Adjust to more general pipline
* update unit test rate
* update
* Unit test coverage over 90% and add Readme
* modify details
* fix precommit
* update
* fix pre-commit
* update
* update
* update
* update result
* update readme
* update baseline config
* update config and small minor changes
* minor changes in readme and etc.
* back to original
* update toy config
* upload model and log
* fix pytest
* Modify the notes.
* fix readme
* Delete Chinese punctuation
* add demo and fix some logic and naming problems
* add To_tensor transformer for ner and load pretrained model in config
* delete extra lines
* split ner loss to MaskedCrossEntropyLoss and MaskedFocalLoss
* update config
* fix err
* updata
* modify noqa
* update new model report
* fix err in ner demo
* Update ner_dataset.py
* Update test_ner_dataset.py
* Update ner_dataset.py
* Update ner_transforms.py
* rm toy config and data
* add comment
* add empty
* fix conflict
* fix precommit
* fix pytest
* fix pytest err
* Update ner_dataset.py
* change dataset name to cluener2020
* move the postprocess in metric to convertor
* rm __init__ etc.
* precommit
* add discription in loss
* add auto download
* add http
* update
* remove some 'issert'
* replace unsqueeze
* update config
* update doc and bert.py
* update
* update demo code
Co-authored-by: weihuaqiang <weihuaqiang@sensetime.com>
Co-authored-by: Hongbin Sun <hongbin306@gmail.com>
* Add support for numpy arrays in model_inference
* Add test for numpy ndarray inference
* Fix linting problems
* Add support for batch inference
* Add batch inference demo script
* Fix comment
* Test batch inference with paths and arrays
* lint code
* Update model_inference docstring
* Refactor model inference tests
* Change inference function to make text detectors and recognizers use the same input data types
* Change single state text detector model to support batch inference
* Lint code
* simplify inference tests
* Remove psenet from batch inference test cases to prevent the pytest being killed
* Update batch_image_demo.py
* fix bug when test with dataset
fix bug when test with dataset, for example, `./tools/dist_test.sh configs/textrecog/sar/sar_r31_parallel_decoder_academic.py <checkpoint> 1 --eval acc`
Co-authored-by: Hongbin Sun <hongbin306@gmail.com>