marker icon indicating copy to clipboard operation
marker copied to clipboard

ImportError: cannot import name 'segformer' from 'surya.model.detection' (unknown location)

Open Beaverfffan opened this issue 1 year ago • 1 comments

marker /mnt/f/markerpdfsource /mnt/f/output/folder --workers 1 --max 1000 --langs Chinese Traceback (most recent call last): File "/home/shenteng/anaconda3/bin/marker", line 5, in from convert import main File "/home/shenteng/anaconda3/lib/python3.12/site-packages/convert.py", line 9, in from marker.convert import convert_single_pdf File "/home/shenteng/anaconda3/lib/python3.12/site-packages/marker/convert.py", line 14, in from marker.ocr.recognition import run_ocr File "/home/shenteng/anaconda3/lib/python3.12/site-packages/marker/ocr/recognition.py", line 10, in from marker.models import setup_recognition_model File "/home/shenteng/anaconda3/lib/python3.12/site-packages/marker/models.py", line 2, in from surya.model.detection import segformer ImportError: cannot import name 'segformer' from 'surya.model.detection' (unknown location)

Beaverfffan avatar Aug 07 '24 09:08 Beaverfffan

You need to pin the ocr lib to surya-ocr = "0.4.14" until code is adjusted for new interfaces.

Blackskyliner avatar Aug 13 '24 11:08 Blackskyliner

i cannot use surya-marker can you please provide runing code marker

rudraaa0012-web avatar Nov 01 '25 09:11 rudraaa0012-web