Skip to content

Commit a3fc6b4

Browse files
committed
jump to 0.3.1
1 parent fda3a7c commit a3fc6b4

File tree

353 files changed

+376
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+376
-228
lines changed

Diff for: davarocr/LICENSE renamed to LICENSE

File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: davarocr/davarocr/davar_common/apis/inference.py renamed to davarocr/davar_common/apis/inference.py

-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ def init_model(config, checkpoint=None, device='cuda:0', cfg_options=None):
5757
elif cfg_types == "SPOTTER":
5858
from davarocr.davar_spotting.models.builder import build_spotter
5959
model = build_spotter(config.model, test_cfg=config.get('test_cfg'))
60-
elif cfg_types == "NER":
61-
from davarocr.davar_ner.models.builder import build_ner
62-
model = build_ner(config.model, test_cfg=config.get('test_cfg'))
6360
else:
6461
raise NotImplementedError
6562

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: davarocr/davarocr/davar_det/core/post_processing/post_east.py renamed to davarocr/davar_det/core/post_processing/post_east.py

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from davarocr.davar_common.core import POSTPROCESS
1818
from .post_detector_base import BasePostDetector
1919

20+
2021
@POSTPROCESS.register_module()
2122
class PostEAST(BasePostDetector):
2223
""" EAST post-processing, using geo map and score map to generate final boxes."""

Diff for: davarocr/davarocr/davar_det/models/losses/dice_loss.py renamed to davarocr/davar_det/models/losses/dice_loss.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,22 @@ class DiceLoss(nn.Module):
5252
def __init__(self,
5353
smooth=1,
5454
p=2,
55-
loss_weight=1.0):
55+
loss_weight=1.0,
56+
use_sigmoid=False,
57+
):
5658
""" Initialization.
5759
5860
Args:
5961
smooth(float): a float number to smooth loss, and avoid NaN error, default:1
6062
p(int): Denominator value, \sum{x^p}+\sum{y^p}, default:2
6163
loss_weight(float): loss weight
64+
use_sigmoid(bool): whether to conduct sigmoid operation on feature map
6265
"""
6366
super().__init__()
6467
self.smooth = smooth
6568
self.p = p
6669
self.loss_weight = loss_weight
70+
self.use_sigmoid = use_sigmoid
6771

6872
def forward(self,
6973
pred,
@@ -104,6 +108,9 @@ def _multi_cls_loss(self, predict, target, weight=None, weight_in_channel=None):
104108
"""
105109
assert predict.shape == target.shape
106110

111+
if self.use_sigmoid:
112+
predict = predict.sigmoid()
113+
107114
if weight is not None:
108115
assert predict[0, 0].shape == weight[0].shape
109116
if weight_in_channel is not None:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: davarocr/davarocr/davar_rcg/datasets/pipelines/utils/__init__.py renamed to davarocr/davar_rcg/datasets/pipelines/utils/__init__.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
##################################################################################################
1010
"""
1111
from .loading_utils import wordmap_loader, shake_crop, shake_point,\
12-
scale_box, scale_box_hori_vert, get_perspective_img, crop_and_transform, rotate_and_crop
12+
scale_box, scale_box_hori_vert, get_perspective_img, crop_and_transform, rotate_and_crop, get_two_point_dis, check_point
1313

1414
__all__ = ["wordmap_loader",
1515

@@ -21,4 +21,8 @@
2121

2222
"get_perspective_img",
2323
"crop_and_transform",
24-
"rotate_and_crop"]
24+
"rotate_and_crop",
25+
'get_two_point_dis',
26+
'check_point'
27+
28+
]

Diff for: davarocr/davarocr/davar_rcg/models/__init__.py renamed to davarocr/davar_rcg/models/__init__.py

-6
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,3 @@
1818
from .builder import (TRANSFORMATIONS, RECOGNIZORS)
1919
from .builder import (build_transformation, build_recognizor)
2020

21-
__all__ = [
22-
'RECOGNIZORS',
23-
24-
'build_transformation',
25-
'build_recognizor',
26-
]
File renamed without changes.

Diff for: davarocr/davarocr/davar_rcg/models/recognizors/__init__.py renamed to davarocr/davar_rcg/models/recognizors/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
# Date : 2021-05-01
99
##################################################################################################
1010
"""
11+
from .base import BaseRecognizor
1112
from .general import GeneralRecognizor
1213
from .rf_learning import RFLRecognizor
1314

1415
__all__ = [
16+
17+
'BaseRecognizor',
18+
1519
'GeneralRecognizor',
1620
'RFLRecognizor',
1721
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: davarocr/davarocr/davar_videotext/datasets/multi_frame_dataset.py renamed to davarocr/davar_videotext/datasets/multi_frame_dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from davarocr.davar_common.datasets.davar_custom import DavarCustomDataset
2222

2323

24-
@DATASETS.register_module
24+
@DATASETS.register_module()
2525
class MultiFrameDataset(DavarCustomDataset):
2626
""" Implementation of the common video text dataset, which supports tasks of video text detection
2727

Diff for: davarocr/davarocr/davar_videotext/datasets/samplers/metric_sampler.py renamed to davarocr/davar_videotext/datasets/samplers/metric_sampler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from davarocr.davar_common.datasets.builder import SAMPLER
1717

1818

19-
@SAMPLER.register_module
19+
@SAMPLER.register_module()
2020
class MetricSampler(Sampler):
2121
""" Implementation of metric learning sampler"""
2222

File renamed without changes.
File renamed without changes.

Diff for: davarocr/setup.py

-36
This file was deleted.

Diff for: davarocr/setup.sh

-43
This file was deleted.

Diff for: davarocr/davarocr/version.py renamed to davarocr/version.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Filename : version.py
55
# Abstract :
66
7-
# Current Version: 0.3.0
8-
# Date : 2021-09-22
7+
# Current Version: 0.3.1
8+
# Date : 2021-12-15
99
##################################################################################################
1010
"""
11-
__version__ = "0.3.0"
11+
__version__ = "0.3.1"

Diff for: demo/table_recognition/datalist/ReadMe.md

+2

Diff for: demo/table_recognition/lgpma/dist_train.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export LANG=zh_CN.UTF-8
33
export LANGUAGE=zh_CN:zh:en_US:en
44
export PATH=/usr/local/miniconda3/bin/:$PATH
55

6-
DAVAROCR_PATH=/data1/davarocr/
6+
DAVAROCR_PATH=/path/to/Davar-Lab-OCR/
77
python -m torch.distributed.launch --nproc_per_node 8 $DAVAROCR_PATH/tools/train.py ./config/lgpma_pub.py --no-validate --launcher pytorch

Diff for: demo/table_recognition/lgpma/readme.md

+2-4

Diff for: demo/text_detection/east/config/east_r50_rbox.py

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
),
9696
test=dict(
9797
type=dataset_type,
98+
samples_per_gpu=1,
9899
ann_file='/path/to/datalist/icdar2015_test_datalist.json',
99100
img_prefix='/path/to/ICDAR2015',
100101
pipeline=test_pipeline

Diff for: demo/text_detection/east/dist_train.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export LANG=zh_CN.UTF-8
33
export LANGUAGE=zh_CN:zh:en_US:en
44
export PATH=/usr/local/miniconda3/bin/:$PATH
55

6-
DAVAROCR_PATH=/data1/davarocr/
6+
DAVAROCR_PATH=/path/to/Davar-Lab-OCR/
77
python -m torch.distributed.launch --nproc_per_node 8 $DAVAROCR_PATH/tools/train.py ./config/east_r50_rbox.py --launcher pytorch

Diff for: demo/text_detection/east/nondist_train.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export LANG=zh_CN.UTF-8
33
export LANGUAGE=zh_CN:zh:en_US:en
44
export PATH=/usr/local/miniconda3/bin/:$PATH
55

6-
DAVAROCR_PATH=/data1/davarocr/
6+
DAVAROCR_PATH=/path/to/Davar-Lab-OCR/
77
python $DAVAROCR_PATH/tools/train.py --no-validate --gpus 1 ./config/east_r50_rbox.py

Diff for: demo/text_detection/east/readme.md

+4-4

Diff for: demo/text_detection/mask_rcnn_det/dist_train.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export LANG=zh_CN.UTF-8
33
export LANGUAGE=zh_CN:zh:en_US:en
44
export PATH=/usr/local/miniconda3/bin/:$PATH
55

6-
DAVAROCR_PATH=/data1/davarocr/
6+
DAVAROCR_PATH=/path/to/Davar-Lab-OCR/
77
python -m torch.distributed.launch --nproc_per_node 8 $DAVAROCR_PATH/tools/train.py ./config/mask_rcnn_r50_fpn.py --launcher pytorch

Diff for: demo/text_detection/mask_rcnn_det/nondist_train.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export LANG=zh_CN.UTF-8
33
export LANGUAGE=zh_CN:zh:en_US:en
44
export PATH=/usr/local/miniconda3/bin/:$PATH
55

6-
DAVAROCR_PATH=/data1/davarocr/
6+
DAVAROCR_PATH=/path/to/Davar-Lab-OCR/
77
python $DAVAROCR_PATH/tools/train.py --no-validate --gpus 1 ./config/mask_rcnn_r50_fpn.py

Diff for: demo/text_detection/mask_rcnn_det/readme.md

+6-7

0 commit comments

Comments
 (0)