Skip to content
Advertisement

detect a table part from entire image in python

I have an image of size 3500×5000, now I want to detect only the table part from the entire image and crop and rotate it if it is not straight for OCR processing. After all search, I get an idea for cropping each cell in an image using https://medium.com/coinmonks/a-box-detection-algorithm-for-any-image-containing-boxes-756c15d7ed26 , but don’t know how to crop the table part in an image.

The image I used here:

enter image description here

now I want only this part like this:(manually cropped)

enter image description here

Thanks in advance!..

Advertisement

Answer

@user:12894468, @user:5404226 After a long search I came to found a best approch to find only table in images using DETECTRON2 https://github.com/facebookresearch/detectron2 but it works only in lunix environment, I used windows subsystem for lunix, here I used this code for several images placed in folder and create each folder(may image contains one or more table) with the file name

JavaScript

the output I get as below:

JavaScript

Use the above mentioned link for how to train the sample and others

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement