Downloads · 30 days
15
3% of all-time downloads
maxall4/TrOCR-biochemistry
TrOCR-biochemistry is a image-text-to-text model from maxall4. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mpl-2.0.
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.
Downloads · 30 days
15
3% of all-time downloads
All-time downloads
518
Public
Parameters
385M
1.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.5 GB · 100%
From the Hugging Face model README
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.
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)