{"record":{"id":"8c450256b4059664","repo":"roboflow/supervision","slug":"easyocr-results-produced-with-detail-0-do-not-incl","errorCode":null,"errorMessage":"EasyOCR results produced with detail=0 do not include bounding boxes. Call reader.readtext(..., detail=1) instead.","messagePattern":"EasyOCR results produced with detail=0 do not include bounding boxes\\. Call reader\\.readtext\\(\\.\\.\\., detail=1\\) instead\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/supervision/detection/core.py","lineNumber":2174,"sourceCode":"        Returns:\n            A new Detections object.\n\n        Example:\n            ```python\n            import supervision as sv\n            import easyocr\n\n            reader = easyocr.Reader(['en'])\n            results = reader.readtext(\"<SOURCE_IMAGE_PATH>\")\n            detections = sv.Detections.from_easyocr(results)\n            detected_text = detections[\"class_name\"]\n            ```\n        \"\"\"\n        if len(easyocr_results) == 0:\n            return cls.empty()\n\n        if isinstance(easyocr_results[0], str):\n            raise ValueError(\n                \"EasyOCR results produced with detail=0 do not include bounding \"\n                \"boxes. Call reader.readtext(..., detail=1) instead.\"\n            )\n\n        bbox = np.array([result[0] for result in easyocr_results], dtype=np.float32)\n        if bbox.ndim != 3 or bbox.shape[1:] != (4, 2):\n            raise ValueError(\n                \"EasyOCR results must contain four corner points per detection.\"\n            )\n        xyxy = np.hstack((np.min(bbox, axis=1), np.max(bbox, axis=1)))\n        confidence = np.array(\n            [\n                result[2] if len(result) > 2 and result[2] else 0\n                for result in easyocr_results\n            ]\n        )\n        ocr_text = np.array([result[1] for result in easyocr_results])\n","sourceCodeStart":2156,"sourceCodeEnd":2192,"githubUrl":"https://github.com/roboflow/supervision/blob/7f254d9784d4c37e0f03cd89ddee164c8db099c0/src/supervision/detection/core.py#L2156-L2192","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\nresults = reader.readtext('image.jpg', detail=0)\ndetections = sv.Detections.from_easyocr(results)\n\n# after\nresults = reader.readtext('image.jpg', detail=1)\ndetections = sv.Detections.from_easyocr(results)","handlingStrategy":"validation","validationCode":"def easyocr_ready(results: list) -> bool:\n    return len(results) == 0 or not isinstance(results[0], str)\n\nresults = reader.readtext(image, detail=1)  # detail=1 is required\nassert easyocr_ready(results)\ndetections = sv.Detections.from_easyocr(results)","typeGuard":"def is_easyocr_detail_1(results: list) -> bool:\n    return all(\n        isinstance(r, (list, tuple)) and len(r) >= 2 and isinstance(r[0], (list, tuple))\n        for r in results\n    )","tryCatchPattern":"try:\n    detections = sv.Detections.from_easyocr(results)\nexcept ValueError as e:\n    if 'detail=0' in str(e):\n        results = reader.readtext(image, detail=1)\n        detections = sv.Detections.from_easyocr(results)\n    else:\n        raise","preventionTips":["Never set detail=0 when you need boxes","Pass readtext output through unmodified","Keep a single OCR call site so detail can't diverge"],"tags":["easyocr","ocr","detail","from-easyocr"],"backgroundTag":null,"analyzedSha":"7f254d9784d4c37e0f03cd89ddee164c8db099c0","analyzedAt":"2026-08-15T05:13:01.950Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}