TrOCR Biochemistry
This is a finetuned model based on the TrOCR model. It was finetuned on the biochemistry-ocr dataset to make the model better at recognizing text like Kcat/Km, Ki, Km, chemical names and greek symbols.
Usage
This model can be used just lile TrOCR just change the model name to maxall4/TrOCR-biochemistry
. You can find the TrOCR docs here.
Example:
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
import requests
from PIL import Image
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-handwritten")
model = VisionEncoderDecoderModel.from_pretrained("maxall4/TrOCR-biochemistry")
image = Image.open('kikcat.png').convert("RGB")
pixel_values = processor(image, return_tensors="pt").pixel_values
generated_ids = model.generate(pixel_values)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(generated_text)
- Downloads last month
- 38
Inference API (serverless) does not yet support transformers models for this pipeline type.