项目作者: notAI-tech

项目描述 :
Extremely easy to use Text Detection module with CRAFT pre-trained model.
高级语言: Python
项目地址: git://github.com/notAI-tech/keras-craft.git
创建时间: 2020-01-23T10:53:44Z
项目社区:https://github.com/notAI-tech/keras-craft

开源协议:MIT License

下载


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 git+https://github.com/notAI-tech/keras-craft (the entire library)

Usage (craft_client)

  1. docker run -p 8500:8500 bedapudi6788/keras-craft:generic-english
  1. import craft_client
  2. image_paths = [image_1, image_2, ..]
  3. all_boxes = craft_client.detect(image_paths)
  4. # Visualization
  5. for image_path, boxes in zip(image_paths):
  6. image_with_boxes_path = craft_client.draw_boxes_on_image(image_path, boxes)
  7. print(image_with_boxes_path)

Usage (keras_craft)

  1. import keras_craft
  2. detector = keras_craft.Detector()
  3. image_paths = [image_1, image_2, ..]
  4. all_boxes = detector.detect(image_paths)
  5. # Visualization
  6. for image_path, boxes in zip(image_paths):
  7. image_with_boxes_path = keras_craft.draw_boxes_on_image(image_path, boxes)
  8. 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