Closed kevinkmldn closed 5 years ago
Hi,
the word will NOT be segmented by SimpleHTR. Data augmentation is something different. If you want to crop out the text boxes, you could use some text detector first and then apply SimpleHTR for reading.
Thank you for your explanation @githubharald ! can you tell me what is the uses of Data augmentation in the code? and is your WordSegmentation able to do that or do you have any other references? thanks in advance.
for word segmentation / text detection, you could try EAST. But you most likely will have to train it on your data. There is no out-of-the-box solution I'm aware of.
Versions
Issue
def preprocess(img, imgSize, dataAugmentation=True): if img is None: img = np.zeros([imgSize[1], imgSize[0]]) if dataAugmentation: stretch = (random.random() - 0.5) # -0.5 .. +0.5 wStretched = max(int(img.shape[1] * (1 + stretch)), 1) # random width, but at least 1 img = cv2.resize(img, (wStretched, img.shape[0])) # stretch horizontally by factor 0.5 .. 1.5
*Provide All Datas My input image is like this
Sorry for my previous post didnt fill the issues template, Thank you so much!