from PIL import Image
import pytesseract

path = '/root/.hermes/cache/images/img_668b1b2125b9.jpg'
img = Image.open(path)

# 尝试用eng识别，因为chi_sim太慢
text = pytesseract.image_to_string(img, lang='eng', config='--psm 3')
print("=== ENG PSM3 ===")
print(text.strip()[:3000])

# 尝试只识别中文，放大1.2倍
img_small = img.resize((int(img.width * 1.2), int(img.height * 1.2)), Image.LANCZOS)
text2 = pytesseract.image_to_string(img_small, lang='chi_sim', config='--psm 11')
print("\n=== CHI_SIM PSM11 ===")
print(text2.strip()[:3000])
