This repository has been archived by the owner on Dec 2, 2022. It is now read-only.
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