diff --git a/robotoff/app/api.py b/robotoff/app/api.py index 8c187a5b83..11e27bb479 100644 --- a/robotoff/app/api.py +++ b/robotoff/app/api.py @@ -895,7 +895,8 @@ def on_get(self, req: falcon.Request, resp: falcon.Response): result = model.detect_from_image(image, output_image=output_image) if output_image: - image_response(result.boxed_image, resp) + boxed_image = cast(Image.Image, result.boxed_image) + image_response(boxed_image, resp) return else: predictions[model_name] = result.to_json()