Closed mzhadigerov closed 2 years ago
We just pushed an update to the code and documentation related to this. Please take a look at the updated documentation and how to use the --debug
flag during evaluation to visualize results.
It should produce a visualization of the (overlapping) bounding boxes directly output by the model:
...and of the final table cells after post-processing:
Cheers, Brandon
Thanks @bsmock ! But how do I make inference If all I have is an image (without json file containing texts and coordinates required for evaluation) ? Basically all I want to do is to test the pre-trained table structure recognizer model on my jpg image containing a table and visualize the recognized table components (rows, headers, columns etc.).
@hannody Could you attach the original image, please? I'm getting ValueError: not supported
on this line:
outputs = self.model(img_tensor)
Here is my file:
Hi @mzhadigerov, try this one please table Then compare your results with mine, I have attached the structure before and after the post-processing, but the post-processing is not complete
@mzhadigerov in the predict
function from TableStructure
class, tensor
shape manipulating process has some logic errors. It runs through but leads to your ValueError: not supported
error
@hannody Thanks, I was able to solve the bug. Regarding your images (before/after postprocessing): so the secod image (with red rectangles) is postprocessed? The first one looks more legit to me.
@hannody Thanks, I was able to solve the bug. Regarding your images (before/after postprocessing): so the secod image (with red rectangles) is postprocessed? The first one looks more legit to me.
My bad, sorry for the confusion, the one with only red rects is the raw one, uses the output data directly, not sure how you viewed the notebook, but this should be obvious inside the notebook, let me know if you improved upon it and good luck.
@hannody yes, that's what I thought it was according to the code in the notebook. Thanks for clarification!
@hannody Could you attach the original image, please? I'm getting
ValueError: not supported
on this line:outputs = self.model(img_tensor)
Here is my file:
@mzhadigerov How did you solve this issue?
I ran the pre-trained model in
eval
mode and got this output:How can I visualize the model predictions on input images? like : this