Skip to content

Commit 7ed0179

Browse files
committed
update scripts
1 parent 6bc5e75 commit 7ed0179

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

demo/text_spotting/evaluation/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
## Evaluation toolThis evaluation tools is modified from the official [ICDAR2015 competition](https://rrc.cvc.uab.es/?ch=4). The code is slightly modified to be compatible with python3 and curved text instances.We provide some of the popular benchmarks, including [ICDAR2013](https://rrc.cvc.uab.es/?ch=2), [ICDAR2015](https://rrc.cvc.uab.es/?ch=4), [Total-Text](https://github.com/cs-chan/Total-Text-Dataset), and all of the ground-truthes are transformed into the requried format.The default evaluation metric sets IoU constraint as 0.5.For MANGO which is without accurate text detection branch, The IoU constraint is set as 0.1.#### Do evaluationDirectly run python script.py -g=gts/gt-icdar2013.zip -s=preds/mango_r50_ic13_none.zip -word_spotting=false -iou=0.1 will produce num_gt, num_det: 917 1038 Origin: recall: 0.795 precision: 0.8265 hmean: 0.81Go into the directory of each algorithm for detailed evaluation results.
1+
## Evaluation toolThis evaluation tools is modified from the official [ICDAR2015 competition](https://rrc.cvc.uab.es/?ch=4). The code is slightly modified to be compatible with python3 and curved text instances.We provide some of the popular benchmarks, including [ICDAR2013](https://rrc.cvc.uab.es/?ch=2), [ICDAR2015](https://rrc.cvc.uab.es/?ch=4), [Total-Text](https://github.com/cs-chan/Total-Text-Dataset), and all of the ground-truthes are transformed into the requried format.The default evaluation metric sets IoU constraint as 0.5.For MANGO which is without accurate text detection branch, The IoU constraint is set as 0.1.#### Do evaluationDirectly run python script.py -g=gts/gt-icdar2013.zip -s=preds/mango_r50_ic13_none.zip -word_spotting=false -iou=0.1 will produce num_gt, num_det: 917 1038 Origin: det_recall: 0.9269 det_precision: 0.9626 det_hmean: 0.9444 spot_recall: 0.795 spot_precision: 0.8256 spot_hmean: 0.81Go into the directory of each algorithm for detailed evaluation results.

demo/text_spotting/evaluation/script.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,6 @@ def include_in_dictionary_transcription(transcription):
496496
spot_hmean = 0 if spot_recall + spot_precision == 0 else 2 * spot_recall * spot_precision / (
497497
spot_recall + spot_precision)
498498

499-
rcg_accuracy = matchedSum_spot / matchedSum_det
500-
501499
methodMetrics = {'precision': spot_precision, 'recall': spot_recall, 'hmean': spot_hmean, 'AP': AP}
502500

503501
print('num_gt, num_det: ', numGlobalCareGt, totalNumDetPols)
@@ -506,7 +504,6 @@ def include_in_dictionary_transcription(transcription):
506504
round(det_hmean, 4))
507505
print("spot_recall: ", round(spot_recall, 4), "spot_precision: ", round(spot_precision, 4), "spot_hmean: ",
508506
round(spot_hmean, 4))
509-
print("rcg_accuracy: ", round(rcg_accuracy, 4))
510507

511508
resDict = {'calculated': True, 'Message': '', 'method': methodMetrics, 'per_sample': perSampleMetrics}
512509

demo/text_spotting/mask_rcnn_spot/configs/mask_rcnn_r50_r32_e2e_finetune.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
type='MaskRoIExtractor',
1616
roi_layer=dict(type='RoIAlign', output_size=(32, 100), sampling_ratio=0),
1717
out_channels=256,
18-
featmap_strides=[4, 8, 16, 32]),
18+
featmap_strides=[4, 8, 16, 32],
19+
_delete_=True),
1920
rcg_backbone=dict(
2021
type='ResNet32',
2122
input_channel=256,

demo/text_spotting/mask_rcnn_spot/configs/mask_rcnn_r50_r32_e2e_pretrain.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
type='MaskRoIExtractor',
1616
roi_layer=dict(type='RoIAlign', output_size=(32, 100), sampling_ratio=0),
1717
out_channels=256,
18-
featmap_strides=[4, 8, 16, 32]),
18+
featmap_strides=[4, 8, 16, 32],
19+
_delete_=True),
1920
rcg_backbone=dict(
2021
type='ResNet32',
2122
input_channel=256,

0 commit comments

Comments
 (0)