forked from clovaai/CRAFT-pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,14 @@ | |
![CI](https://github.com/fcakyon/craft-text-detector/workflows/CI/badge.svg) | ||
|
||
## CRAFT: Character-Region Awareness For Text detection | ||
Packaged Version of the Official Pytorch implementation of CRAFT text detector | [Paper](https://arxiv.org/abs/1904.01941) | [Supplementary](https://youtu.be/HI8MzpY8KMI) | | ||
Packaged Version of the Official Pytorch implementation of CRAFT text detector | [Paper](https://arxiv.org/abs/1904.01941) | [Supplementary](https://youtu.be/HI8MzpY8KMI) | | ||
|
||
**[Youngmin Baek](mailto:[email protected]), Bado Lee, Dongyoon Han, Sangdoo Yun, Hwalsuk Lee.** | ||
|
||
**Package maintainer: Fatih Cagatay Akyon** | ||
|
||
### Overview | ||
PyTorch implementation for CRAFT text detector that effectively detect text area by exploring each character region and affinity between characters. The bounding box of texts are obtained by simply finding minimum bounding rectangles on binary map after thresholding character region and affinity scores. | ||
PyTorch implementation for CRAFT text detector that effectively detect text area by exploring each character region and affinity between characters. The bounding box of texts are obtained by simply finding minimum bounding rectangles on binary map after thresholding character region and affinity scores. | ||
|
||
<img width="1000" alt="teaser" src="./figures/craft_example.gif"> | ||
|
||
|
@@ -54,26 +54,26 @@ craft_net = craft.load_craftnet_model() | |
|
||
# perform prediction | ||
bboxes, polys, heatmap = craft.get_prediction(image=image, | ||
craft_net=craft_net, | ||
refine_net=refine_net, | ||
text_threshold=0.7, | ||
link_threshold=0.4, | ||
low_text=0.4, | ||
cuda=True, | ||
show_time=True) | ||
craft_net=craft_net, | ||
refine_net=refine_net, | ||
text_threshold=0.7, | ||
link_threshold=0.4, | ||
low_text=0.4, | ||
cuda=True, | ||
show_time=True) | ||
|
||
# export detected text regions | ||
craft.export_detected_regions(image_path=image_path, | ||
image=image, | ||
regions=polys, | ||
output_dir=output_dir) | ||
image=image, | ||
regions=polys, | ||
output_dir=output_dir, | ||
rectify=rectify) | ||
|
||
# export heatmap, detection points, box visualization | ||
craft.export_extra_results(image_path=image_path, | ||
image=image, | ||
image=image, | ||
regions=polys, | ||
heatmap=heatmap, | ||
output_dir=output_dir, | ||
smooth_contour=True) | ||
output_dir=output_dir) | ||
``` | ||
|