pierreguillou/DocLayNet-small
Viewer • Updated • 804 • 561 • 13
How to use Mit1208/sam-fine-tune-doclaynet with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("mask-generation", model="Mit1208/sam-fine-tune-doclaynet") # Load model directly
from transformers import AutoProcessor, AutoModelForMaskGeneration
processor = AutoProcessor.from_pretrained("Mit1208/sam-fine-tune-doclaynet")
model = AutoModelForMaskGeneration.from_pretrained("Mit1208/sam-fine-tune-doclaynet")I have Fine tuned https://huggingface.co/facebook/sam-vit-base using Doclaynet-small dataset.
My focus was to detect structure from the documents like paragraph, header, tabel using SOTA model Segment Anything Model (SAM).