Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
update readme (#29)
Browse files Browse the repository at this point in the history
* update readme
  • Loading branch information
fcakyon authored Apr 7, 2021
1 parent 3a31dc8 commit 02c8109
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ pip install craft-text-detector
from craft_text_detector import Craft

# set image path and export folder directory
image_path = 'figures/idcard.png'
image = 'figures/idcard.png' # can be filepath, PIL image or numpy array
output_dir = 'outputs/'

# create a craft instance
craft = Craft(output_dir=output_dir, crop_type="poly", cuda=False)

# apply craft text detection and export detected regions to output directory
prediction_result = craft.detect_text(image_path)
prediction_result = craft.detect_text(image)

# unload models from ram/gpu
craft.unload_craftnet_model()
Expand All @@ -65,11 +65,11 @@ from craft_text_detector import (
)

# set image path and export folder directory
image_path = 'figures/idcard.png'
image = 'figures/idcard.png' # can be filepath, PIL image or numpy array
output_dir = 'outputs/'

# read image
image = read_image(image_path)
image = read_image(image)

# load models
refine_net = load_refinenet_model(cuda=True)
Expand Down

0 comments on commit 02c8109

Please sign in to comment.