diff --git a/cv/ocr/dbnetpp/pytorch/README.md b/cv/ocr/dbnetpp/pytorch/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e1ae23f16def4fa57d71429b88713959d93e0a10 --- /dev/null +++ b/cv/ocr/dbnetpp/pytorch/README.md @@ -0,0 +1,47 @@ +# DBNetpp + +## Model description + +Recently, segmentation-based scene text detection methods have drawn extensive attention in the scene text detection field, because of their superiority in detecting the text instances of arbitrary shapes and extreme aspect ratios, profiting from the pixel-level descriptions. However, the vast majority of the existing segmentation-based approaches are limited to their complex post-processing algorithms and the scale robustness of their segmentation models, where the post-processing algorithms are not only isolated to the model optimization but also time-consuming and the scale robustness is usually strengthened by fusing multi-scale feature maps directly. In this paper, we propose a Differentiable Binarization (DB) module that integrates the binarization process, one of the most important steps in the post-processing procedure, into a segmentation network. Optimized along with the proposed DB module, the segmentation network can produce more accurate results, which enhances the accuracy of text detection with a simple pipeline. Furthermore, an efficient Adaptive Scale Fusion (ASF) module is proposed to improve the scale robustness by fusing features of different scales adaptively. By incorporating the proposed DB and ASF with the segmentation network, our proposed scene text detector consistently achieves state-of-the-art results, in terms of both detection accuracy and speed, on five standard benchmarks. + +## Step 1: Installation +```bash +pip3 install mmcv-2.0.0rc4-cp37-cp37m-linux_x86_64.whl +pip3 install mmdet==3.1.0 +git clone -b v1.0.1 https://github.com/open-mmlab/mmocr.git +cd mmocr +pip3 install -r requirements.txt +python3 setup.py develop +vim tools/dist_train.sh +python > python3 +pip3 install mmengine==0.8.3 +yum install mesa-libGL +Downloading: "https://download.pytorch.org/models/resnet50-0676ba61.pth" to /root/.cache/torch/hub/checkpoints/resnet50-0676ba61.pth + +``` + +## Step 2: Preparing datasets + +```bash +mkdir data +python3 tools/dataset_converters/prepare_dataset.py icdar2015 --task textdet + +``` + +## Step 3: Training + +```bash +# On single GPU +python3 tools/train.py configs/textdet/dbnetpp/dbnetpp_resnet50_fpnc_1200e_icdar2015.py + +# Multiple GPUs on one machine +bash tools/dist_train.sh configs/textdet/dbnetpp/dbnetpp_resnet50_fpnc_1200e_icdar2015.py 8 +``` + +## Results + +| GPUs | FP32 | +| ---------- | ------------ | +| BI-V100 x8 | Hmean=0.8622 | + + diff --git a/cv/ocr/dbnetpp/pytorch/mmcv-2.0.0rc4-cp37-cp37m-linux_x86_64.whl b/cv/ocr/dbnetpp/pytorch/mmcv-2.0.0rc4-cp37-cp37m-linux_x86_64.whl new file mode 100644 index 0000000000000000000000000000000000000000..ff3e62737e0e459b292e201c38e484d453b9eca4 Binary files /dev/null and b/cv/ocr/dbnetpp/pytorch/mmcv-2.0.0rc4-cp37-cp37m-linux_x86_64.whl differ