openfoodfacts / robotoff

🤖 Real-time and batch prediction service for Open Food Facts
https://openfoodfacts.github.io/robotoff/
GNU Affero General Public License v3.0
80 stars 56 forks source link

ValueError: Unsupported number of image dimensions: 2 #1447

Closed sentry-io[bot] closed 4 weeks ago

sentry-io[bot] commented 4 weeks ago

Sentry Issue: ROBOTOFF-268

ValueError: Unsupported number of image dimensions: 2
(7 additional frame(s) were not displayed)
...
  File "robotoff/models.py", line 35, in wrapper
    return fn(*args, **kwargs)
  File "robotoff/workers/tasks/import_image.py", line 844, in extract_nutrition_job
    output = nutrition_extraction.predict(image, ocr_result, triton_uri=triton_uri)
  File "robotoff/prediction/nutrition_extraction.py", line 88, in predict
    preprocess_result = preprocess(image, ocr_result, processor)
  File "robotoff/prediction/nutrition_extraction.py", line 164, in preprocess
    batch_encoding = processor(