{"record":{"id":"9718091cbff37375","repo":"odysseus-dev/odysseus","slug":"installed-transformers-does-not-expose-owl-vit-obj","errorCode":null,"errorMessage":"Installed Transformers does not expose OWL-ViT object detection post-processing","messagePattern":"Installed Transformers does not expose OWL-ViT object detection post-processing","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"routes/gallery/gallery_routes.py","lineNumber":182,"sourceCode":"        model_inputs = _model_inputs_to_device(inputs, device, torch)\n        with torch.no_grad():\n            outputs = model(**model_inputs)\n        target_sizes = torch.tensor([[image.height, image.width]])\n        if hasattr(processor, \"post_process_object_detection\"):\n            results = processor.post_process_object_detection(\n                outputs=outputs,\n                target_sizes=target_sizes,\n                threshold=float(threshold),\n            )\n        elif hasattr(processor, \"post_process_grounded_object_detection\"):\n            results = processor.post_process_grounded_object_detection(\n                outputs=outputs,\n                target_sizes=target_sizes,\n                threshold=float(threshold),\n                text_labels=[labels],\n            )\n        else:\n            raise HTTPException(500, \"Installed Transformers does not expose OWL-ViT object detection post-processing\")\n        boxes = results[0].get(\"boxes\")\n        scores = results[0].get(\"scores\")\n        labels_idx = results[0].get(\"labels\")\n        text_labels = results[0].get(\"text_labels\") or results[0].get(\"labels_text\")\n        if boxes is None or scores is None or len(boxes) == 0:\n            raise HTTPException(404, f\"No visible object matched '{query}'\")\n        idx = int(torch.argmax(scores).item())\n        box = [float(v) for v in boxes[idx].detach().cpu().tolist()]\n        label_idx = int(labels_idx[idx].detach().cpu().item()) if labels_idx is not None and len(labels_idx) else 0\n        label = labels[min(label_idx, len(labels) - 1)]\n        if text_labels and len(text_labels) > idx:\n            label = str(text_labels[idx])\n        return {\n            \"box\": box,\n            \"score\": float(scores[idx].detach().cpu().item()),\n            \"label\": label,\n            \"model\": backend[\"model_id\"],\n        }","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/gallery/gallery_routes.py#L164-L200","documentation":"Error \"Installed Transformers does not expose OWL-ViT object detection post-processing\" thrown in odysseus-dev/odysseus.","triggerScenarios":"Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.","commonSituations":"See trigger scenarios.","solutions":["Upgrade or downgrade Transformers to a version that exposes OWL-ViT post-processing.","Reinstall the mask tools dependencies to get a compatible Transformers version."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}