|
|
--- |
|
|
license: mit |
|
|
language: |
|
|
- en |
|
|
pipeline_tag: image-to-text |
|
|
tags: |
|
|
- gregg-shorthand |
|
|
- handwriting-recognition |
|
|
- ocr |
|
|
- historical-documents |
|
|
- stenography |
|
|
library_name: pytorch |
|
|
datasets: |
|
|
- a0a7/Gregg-1916 |
|
|
metrics: |
|
|
- accuracy |
|
|
--- |
|
|
|
|
|
# Gregg Shorthand Recognition Model |
|
|
|
|
|
This model recognizes Gregg shorthand notation from images and converts it to readable text. |
|
|
|
|
|
## Model Description |
|
|
|
|
|
- **Model Type**: Image-to-Text recognition |
|
|
- **Architecture**: CNN-LSTM with advanced pattern recognition |
|
|
- **Training Data**: Gregg shorthand samples |
|
|
- **Language**: English |
|
|
- **License**: MIT |
|
|
|
|
|
## Intended Use |
|
|
|
|
|
This model is designed to: |
|
|
- Recognize Gregg shorthand from scanned documents |
|
|
- Convert historical stenographic notes to digital text |
|
|
- Assist in digitizing shorthand archives |
|
|
- Support stenography education and research |
|
|
|
|
|
## How to Use |
|
|
|
|
|
### Using the Hugging Face Transformers library |
|
|
|
|
|
```python |
|
|
from transformers import pipeline |
|
|
from PIL import Image |
|
|
|
|
|
# Load the pipeline |
|
|
pipe = pipeline("image-to-text", model="a0a7/gregg-recognition") |
|
|
|
|
|
# Load an image |
|
|
image = Image.open("path/to/shorthand/image.png") |
|
|
|
|
|
# Generate text |
|
|
result = pipe(image) |
|
|
print(result[0]['generated_text']) |
|
|
``` |
|
|
|
|
|
### Using the original package |
|
|
|
|
|
```python |
|
|
from gregg_recognition import GreggRecognition |
|
|
|
|
|
# Initialize the recognizer |
|
|
recognizer = GreggRecognition(model_type="image_to_text") |
|
|
|
|
|
# Recognize text from image |
|
|
result = recognizer.recognize("path/to/image.png") |
|
|
print(result) |
|
|
``` |
|
|
|
|
|
### Command Line Interface |
|
|
|
|
|
```bash |
|
|
# Install the package |
|
|
pip install gregg-recognition |
|
|
|
|
|
# Use the CLI |
|
|
gregg-recognize path/to/image.png --verbose |
|
|
``` |
|
|
|
|
|
## Model Performance |
|
|
|
|
|
The model uses advanced pattern recognition techniques optimized for Gregg shorthand notation. |
|
|
|
|
|
## Training Details |
|
|
|
|
|
- **Framework**: PyTorch |
|
|
- **Optimizer**: Adam |
|
|
- **Architecture**: Custom CNN-LSTM with pattern database |
|
|
- **Input Resolution**: 256x256 pixels |
|
|
- **Preprocessing**: Grayscale conversion, normalization |
|
|
|
|
|
## Limitations |
|
|
|
|
|
- Optimized specifically for Gregg shorthand notation |
|
|
- Performance may vary with image quality |
|
|
- Best results with clear, high-contrast images |
|
|
|
|
|
## Citation |
|
|
|
|
|
If you use this model in your research, please cite: |
|
|
|
|
|
```bibtex |
|
|
@misc{gregg-recognition, |
|
|
title={Gregg Shorthand Recognition Model}, |
|
|
author={Your Name}, |
|
|
year={2025}, |
|
|
url={https://huggingface.co/a0a7/gregg-recognition} |
|
|
} |
|
|
``` |
|
|
|
|
|
## Contact |
|
|
|
|
|
For questions or issues, please open an issue on the [GitHub repository](https://github.com/a0a7/GreggRecognition). |