roboflow/supervision · error · ValueError
EasyOCR results produced with detail=0 do not include boundi
Error message
EasyOCR results produced with detail=0 do not include bounding boxes. Call reader.readtext(..., detail=1) instead.
What it means
Detections.from_easyocr expects EasyOCR's detail=1 output format, where each item is (bbox_points, text, confidence). When EasyOCR is called with detail=0 it returns plain strings with no bounding boxes, which supervision detects by checking the first element's type and rejects.
Source
Thrown at src/supervision/detection/core.py:2174
Returns:
A new Detections object.
Example:
```python
import supervision as sv
import easyocr
reader = easyocr.Reader(['en'])
results = reader.readtext("<SOURCE_IMAGE_PATH>")
detections = sv.Detections.from_easyocr(results)
detected_text = detections["class_name"]
```
"""
if len(easyocr_results) == 0:
return cls.empty()
if isinstance(easyocr_results[0], str):
raise ValueError(
"EasyOCR results produced with detail=0 do not include bounding "
"boxes. Call reader.readtext(..., detail=1) instead."
)
bbox = np.array([result[0] for result in easyocr_results], dtype=np.float32)
if bbox.ndim != 3 or bbox.shape[1:] != (4, 2):
raise ValueError(
"EasyOCR results must contain four corner points per detection."
)
xyxy = np.hstack((np.min(bbox, axis=1), np.max(bbox, axis=1)))
confidence = np.array(
[
result[2] if len(result) > 2 and result[2] else 0
for result in easyocr_results
]
)
ocr_text = np.array([result[1] for result in easyocr_results])
View on GitHub (pinned to 7f254d9784)
Solutions
- Call reader.readtext(image, detail=1) (detail=1 is the default — remove any explicit detail=0).
- Pass the resulting list of (quad_points, text, score) tuples straight to from_easyocr.
Example fix
# before
results = reader.readtext('image.jpg', detail=0)
detections = sv.Detections.from_easyocr(results)
# after
results = reader.readtext('image.jpg', detail=1)
detections = sv.Detections.from_easyocr(results) Defensive patterns
Strategy: validation
Validate before calling
def easyocr_ready(results: list) -> bool:
return len(results) == 0 or not isinstance(results[0], str)
results = reader.readtext(image, detail=1) # detail=1 is required
assert easyocr_ready(results)
detections = sv.Detections.from_easyocr(results) Type guard
def is_easyocr_detail_1(results: list) -> bool:
return all(
isinstance(r, (list, tuple)) and len(r) >= 2 and isinstance(r[0], (list, tuple))
for r in results
) Try / catch
try:
detections = sv.Detections.from_easyocr(results)
except ValueError as e:
if 'detail=0' in str(e):
results = reader.readtext(image, detail=1)
detections = sv.Detections.from_easyocr(results)
else:
raise Prevention
- Never set detail=0 when you need boxes
- Pass readtext output through unmodified
- Keep a single OCR call site so detail can't diverge
When it happens
Trigger: Calling reader.readtext(image, detail=0) — or a reader configured with detail=0 — and passing the string list to Detections.from_easyocr. The isinstance(easyocr_results[0], str) check trips and raises.
Common situations: Developers previously used EasyOCR just for text extraction (detail=0 is common in text-only pipelines) and reuse the same call when adding detection visualization; copy-pasted snippets from text-summarization code.
Related errors
AI-assisted analysis of roboflow/supervision@7f254d9784 (2026-08-15).
Data as JSON: /api/errors/8c450256b4059664.
Report an issue: GitHub.