All Projects → fcakyon → craft-text-detector

fcakyon / craft-text-detector

Licence: MIT License
Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to craft-text-detector

East icpr
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE
Stars: ✭ 154 (+1.99%)
Mutual labels:  ocr, text, text-detection
Craft Remade
Implementation of CRAFT Text Detection
Stars: ✭ 127 (-15.89%)
Mutual labels:  ocr, craft, text-detection
Docs
Lightweight document management system packed with all the features you can expect from big expensive solutions
Stars: ✭ 827 (+447.68%)
Mutual labels:  workflow, ocr, document
Craft Pytorch
Official implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 2,220 (+1370.2%)
Mutual labels:  ocr, craft, text-detection
Vds
Verteego Data Suite
Stars: ✭ 9 (-94.04%)
Mutual labels:  workflow, anaconda
Document Management System
OpenKM is a Open Source Document Management System
Stars: ✭ 373 (+147.02%)
Mutual labels:  workflow, document
Automator
Various Automator and AppleScript workflow and scripts for simplifying life
Stars: ✭ 68 (-54.97%)
Mutual labels:  workflow, text
CleanSCAN
A simple, smart and efficient document scanner for Android
Stars: ✭ 151 (+0%)
Mutual labels:  ocr, document
tip
GitHub Action to keep a 'tip' pre-release always up-to-date
Stars: ✭ 18 (-88.08%)
Mutual labels:  workflow, actions
Actionsflow
The free Zapier/IFTTT alternative for developers to automate your workflows based on Github actions
Stars: ✭ 2,243 (+1385.43%)
Mutual labels:  workflow, actions
deep-learning-for-document-dewarping
An application of high resolution GANs to dewarp images of perturbed documents
Stars: ✭ 100 (-33.77%)
Mutual labels:  ocr, document
Gh Action Pypi Publish
GitHub Action, for publishing distribution files to PyPI
Stars: ✭ 317 (+109.93%)
Mutual labels:  workflow, pypi
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (-83.44%)
Mutual labels:  workflow, actions
denoflow
Configuration as Code, use YAML to write automated workflows that run on Deno, with any Deno modules, Typescript/Javascript codes
Stars: ✭ 143 (-5.3%)
Mutual labels:  workflow, actions
scanbot-sdk-example-ios
No description or website provided.
Stars: ✭ 17 (-88.74%)
Mutual labels:  ocr, document
craft
The universal Sentry release CLI 🚀
Stars: ✭ 117 (-22.52%)
Mutual labels:  craft, pypi
doctr
docTR (Document Text Recognition) - a seamless, high-performing & accessible library for OCR-related tasks powered by Deep Learning.
Stars: ✭ 1,409 (+833.11%)
Mutual labels:  ocr, text-detection
nimtesseract
A Tesseract OCR wrapper for Nim
Stars: ✭ 23 (-84.77%)
Mutual labels:  ocr, text
vietnamese-ocr-toolbox
A toolbox for Vietnamese Optical Character Recognition.
Stars: ✭ 26 (-82.78%)
Mutual labels:  ocr, text-detection
version-check
An action that allows you to check whether your npm package version has been updated
Stars: ✭ 65 (-56.95%)
Mutual labels:  workflow, actions

CRAFT: Character-Region Awareness For Text detection

downloads downloads
Build status PyPI version License: MIT

Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector | Paper |

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.

teaser

Getting started

Installation

  • Install using pip:
pip install craft-text-detector

Basic Usage

# import Craft class
from craft_text_detector import Craft

# set image path and export folder directory
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)

# unload models from ram/gpu
craft.unload_craftnet_model()
craft.unload_refinenet_model()

Advanced Usage

# import craft functions
from craft_text_detector import (
    read_image,
    load_craftnet_model,
    load_refinenet_model,
    get_prediction,
    export_detected_regions,
    export_extra_results,
    empty_cuda_cache
)

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

# read image
image = read_image(image)

# load models
refine_net = load_refinenet_model(cuda=True)
craft_net = load_craftnet_model(cuda=True)

# perform prediction
prediction_result = 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,
    long_size=1280
)

# export detected text regions
exported_file_paths = export_detected_regions(
    image=image,
    regions=prediction_result["boxes"],
    output_dir=output_dir,
    rectify=True
)

# export heatmap, detection points, box visualization
export_extra_results(
    image=image,
    regions=prediction_result["boxes"],
    heatmaps=prediction_result["heatmaps"],
    output_dir=output_dir
)

# unload models from gpu
empty_cuda_cache()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].