YAML Metadata
Warning:
The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
FLAN-T5 Land Survey Information Extractor
This model is a fine-tuned version of FLAN-T5 for extracting structured information from land survey documents.
Model Description
This model extracts the following fields from land survey OCR text:
- Land Surveyor
- Surveyed For
- Certified date
- Total Area
- Unit of Measurement
- Address
- Parish
- LT Num
Usage
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("DarthGlennium/flan-t5-land-survey-extractor2")
model = AutoModelForSeq2SeqLM.from_pretrained("DarthGlennium/flan-t5-land-survey-extractor2")
# Move to GPU if available
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
# Your OCR text here
text = "Your land survey document text..."
# Tokenize input
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=768)
inputs = {k: v.to(device) for k, v in inputs.items()}
# Generate prediction
with torch.no_grad():
outputs = model.generate(
**inputs,
max_length=512,
num_beams=5,
early_stopping=True,
no_repeat_ngram_size=3,
length_penalty=1.0
)
# Decode result
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
Training
The model was fine-tuned on land survey documents with the following configuration:
- Base model: FLAN-T5 (Large or Base)
- Input max length: 768 tokens
- Output max length: 512 tokens
- Beam search with 5 beams for generation
Output Format
The model outputs JSON-formatted strings with the extracted fields:
{
"Land Surveyor": "John Doe",
"Surveyed For": "Jane Smith",
"Certified date": "2024-01-15",
"Total Area": "1000",
"Unit of Measurement": "square meters",
"Address": "123 Main St",
"Parish": "St. Andrew",
"LT Num": "LT-12345"
}
Limitations
- Works best with English land survey documents
- OCR quality significantly affects extraction accuracy
- May require post-processing for JSON parsing
Citation
If you use this model, please cite:
@misc{flan-t5-land-survey,
author = {DarthGlennium},
title = {FLAN-T5 Land Survey Information Extractor},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/DarthGlennium/flan-t5-land-survey-extractor2}
}
- Downloads last month
- 2