faustomorales / keras-ocr

A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.
https://keras-ocr.readthedocs.io/
MIT License
1.38k stars 355 forks source link

How to define box parameter of "warpBox" function's argument box ? #108

Closed somiljain7 closed 4 years ago

somiljain7 commented 4 years ago

hey! I am trying to build my own dataset for custom fine-tuning. I saw that in issue #3 you mentioned that "a dataset where each image file is cropped to just one line of text. If your dataset is not cropped but you have the bounding boxes, you can use it in conjunction with keras_ocr.tools.warpBox to get just the line of text from the image.". I want to know how to define box parameter (like how to define lines ) for an image to be cropped to one line of text.

thank you

faustomorales commented 4 years ago

Hi there -- please see this section of the docs which explains how the arguments are expected to be provided. It is a list of four points starting in the top left corner and moving clockwise. The following would be one example.

box = [(0, 0), (10, 0), (10, 10), (0, 10)]

Closing this issue as it is not a bug.