Open Yugabharathi opened 2 years ago
@Yugabharathi you are getting the coordinates of the tabular region. I am writing one blog post in which end to end implementation. I will provide from model loading on CPU as well as GPU for Linux as well as windows.
Hi @themohitkumar,
Could you share the link to the blog post once u finished writing? Thanks in advance :)
We were able to detect the tables properly but we also want the coordinates of the table for further process .can you give us a any solution to get the coordinates of detected tables ?
same here
@Yugabharathi Using the below code snippet after having done inference one can extract table co-ordinates
from numpy import array, float32
result = inference_detector(model, img)
table_coordinates = []
## extracting bordered tables
for bordered_tables in result[0][0]:
table_coordinates.append(bordered_tables[:4].astype(int))
## extracting borderless tables
for borderless_tables in result[0][2]:
table_coordinates.append(borderless_tables[:4].astype(int))
## print tables
for table in table_coordinates:
x1 = table[0]
x2 = table[2]
y1 = table[1]
y2 = table[3]
print(f"Table with start co-ordinate ({x1}, {y1}) and end co-ordinate ({x2}, {y2})" %x1 %y1 %x2 %y2)
Hey @shivam07a , How to get threshold for each table with this? Any idea? Also how you know how to interpret result variable
with the given coordinate how to extract the table image?
Hi @shivam07a,
How can I get confidence score for each table in result? I am very happy if you give me example code.
Thanks
We were able to detect the tables properly but we also want the coordinates of the table for further process .can you give us a any solution to get the coordinates of detected tables ?