Skip to main content

Extremely easy to use Text Detection module with CRAFT pre-trained model.

Project description

keras-craft

Extremely easy to use Text Detection module with CRAFT pre-trained model.

keras-craft aims to be production ready and supports features like batch inference (auto batching for images of different size) and tensorflow serving.

Installation

pip install --upgrade craft_client (uses tf-serving - recommended)

pip install keras_craft (the entire library)

Note: Uninstall tensorflow and install tensorflow-gpu==1.14.0 for usage on gpu. This should be done after the installation of keras-craft and/or TextVision libraries.

Usage (craft_client)

docker run -p 8500:8500 bedapudi6788/keras-craft:generic-english
import craft_client

image_paths = [image_1, image_2, ..]
all_boxes = craft_client.detect(image_paths)

# Visualization
for image_path, boxes in zip(image_paths):
  image_with_boxes_path = craft_client.draw_boxes_on_image(image_path, boxes)
  print(image_with_boxes_path)

Usage (keras_craft)

import keras_craft

detector = keras_craft.Detector()

image_paths = [image_1, image_2, ..]
all_boxes = detector.detect(image_paths)

# Visualization
for image_path, boxes in zip(image_paths):
  image_with_boxes_path = keras_craft.draw_boxes_on_image(image_path, boxes)
  print(image_with_boxes_path)

Example image_with_boxes

To Do:

  1. Train different models for different use-cases. (various languages ..)
  2. Experiment with smaller model(s)

Credit for the core keras model, generic-english checkpoint .. goes to Fausto Morales and Clova.ai

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for craft-client, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size craft_client-1.0.0-py2.py3-none-any.whl (5.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size craft_client-1.0.0.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page