Unstructured-IO / Unstructured-IO/unstructured-inference
Failed to draw bounding box: 'Rectangle' object has no attribute 'bbox'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 209
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
I was following this visualization example and it throws a warning at line 48
Failed to draw bounding box: 'Rectangle' object has no attribute 'bbox'
Looking at draw_bbox it uses element.bbox.coordinates
However, element Rectangle doesn't have bbox, it directly has attribute coordinates
If one of the authors can suggest an acceptable fix I can submit a PR!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/layout-analysis/visualization.py at line 48, then inspect draw_bbox in unstructured_inference/visualize.py and Rectangle in unstructured_inference/inference/elements.py. Confirm how the rectangle coordinates are exposed and make the example run without the warning while drawing the bounding box successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100