Sign inSign up

hectorandac/craft-sentence-extractor

By hectorandac

•Updated about 2 years ago

Dockerized application for sentence extraction using the CRAFT text detection model.

Image
Machine learning & AI
0

271

hectorandac/craft-sentence-extractor repository overview

⁠CRAFT-Sentence-Extractor

CRAFT-Sentence-Extractor is a Docker image designed for extracting sentences from documents using the CRAFT (Character Region Awareness for Text Detection) model, enhanced with custom logic for sentence grouping and document layout understanding.

⁠Key Features:
  • Text Detection: Detects words in documents using the CRAFT model.
  • Sentence Grouping: Groups words into sentences based on spatial relationships.
  • Flexible Configuration: Handles multi-column layouts with customizable hyperparameters.
  • Future Ready: Designed to integrate with Transformer models for advanced document layout analysis.
⁠How to Use

To run the Docker container and expose it on port 5000:

docker run -d -p 5000:5000 your-dockerhub-username/craft-app

Once the container is running, you can send an image (e.g., a scanned book page) via an HTTP request to the /process_image endpoint.

Example:

curl -X POST -F "image=@your_image.png" http://localhost:5000/process_image

This will return detected sentences or word bounding boxes, depending on the configuration.

⁠Environment Variables

You can set the following environment variables to adjust the app’s behavior:

  • FLASK_ENV: Set to production (default) or development.
⁠License

This project is licensed under the MIT License.

⁠Contributions

Contributions and suggestions are welcome! Feel free to open an issue or submit a pull request.

Tag summary

Content type

Image

Digest

sha256:a4056bb32…

Size

1.4 GB

Last updated

about 2 years ago

docker pull hectorandac/craft-sentence-extractor