This repository has been archived by the owner on Dec 2, 2022. It is now read-only.
Releases: fcakyon/craft-text-detector
Releases · fcakyon/craft-text-detector
v0.4.3
What's Changed
- Enable package to load model from local path by @TanjaBayer in #53
New Contributors
- @TanjaBayer made their first contribution in #53
Full Changelog: 0.4.2...0.4.3
v0.4.2
v0.4.1
v0.4.0
v0.3.5
v0.3.4
- add support for PIL and numpy images in addition to filepath. #28
from PIL import Image
import numpy
# can be filepath, PIL image or numpy array
image = 'figures/idcard.png'
image = Image.open("figures/idcard.png")
image = numpy.array(Image.open("figures/idcard.png"))
# apply craft text detection
prediction_result = craft.detect_text(image)
v0.3.3
v0.3.2
release 0.3.1
release 0.3.0
- updated basic usage for better device handling, now Craft instance should be created before calling detect_text:
# import Craft class
from craft_text_detector import Craft
# set image path and export folder directory
image_path = 'figures/idcard.png'
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)
# unload models from ram/gpu
craft.unload_craftnet_model()
craft.unload_refinenet_model()
- some internal naming and styling changes