Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,110 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: image-to-text
|
| 6 |
+
tags:
|
| 7 |
+
- gregg-shorthand
|
| 8 |
+
- handwriting-recognition
|
| 9 |
+
- ocr
|
| 10 |
+
- historical-documents
|
| 11 |
+
- stenography
|
| 12 |
+
library_name: pytorch
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# Gregg Shorthand Recognition Model
|
| 16 |
+
|
| 17 |
+
This model recognizes Gregg shorthand notation from images and converts it to readable text.
|
| 18 |
+
|
| 19 |
+
## Model Description
|
| 20 |
+
|
| 21 |
+
- **Model Type**: Image-to-Text recognition
|
| 22 |
+
- **Architecture**: CNN-LSTM with advanced pattern recognition
|
| 23 |
+
- **Training Data**: Gregg shorthand samples
|
| 24 |
+
- **Language**: English
|
| 25 |
+
- **License**: MIT
|
| 26 |
+
|
| 27 |
+
## Intended Use
|
| 28 |
+
|
| 29 |
+
This model is designed to:
|
| 30 |
+
- Recognize Gregg shorthand from scanned documents
|
| 31 |
+
- Convert historical stenographic notes to digital text
|
| 32 |
+
- Assist in digitizing shorthand archives
|
| 33 |
+
- Support stenography education and research
|
| 34 |
+
|
| 35 |
+
## How to Use
|
| 36 |
+
|
| 37 |
+
### Using the Hugging Face Transformers library
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
from transformers import pipeline
|
| 41 |
+
from PIL import Image
|
| 42 |
+
|
| 43 |
+
# Load the pipeline
|
| 44 |
+
pipe = pipeline("image-to-text", model="a0a7/gregg-recognition")
|
| 45 |
+
|
| 46 |
+
# Load an image
|
| 47 |
+
image = Image.open("path/to/shorthand/image.png")
|
| 48 |
+
|
| 49 |
+
# Generate text
|
| 50 |
+
result = pipe(image)
|
| 51 |
+
print(result[0]['generated_text'])
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
### Using the original package
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
from gregg_recognition import GreggRecognition
|
| 58 |
+
|
| 59 |
+
# Initialize the recognizer
|
| 60 |
+
recognizer = GreggRecognition(model_type="image_to_text")
|
| 61 |
+
|
| 62 |
+
# Recognize text from image
|
| 63 |
+
result = recognizer.recognize("path/to/image.png")
|
| 64 |
+
print(result)
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
### Command Line Interface
|
| 68 |
+
|
| 69 |
+
```bash
|
| 70 |
+
# Install the package
|
| 71 |
+
pip install gregg-recognition
|
| 72 |
+
|
| 73 |
+
# Use the CLI
|
| 74 |
+
gregg-recognize path/to/image.png --verbose
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## Model Performance
|
| 78 |
+
|
| 79 |
+
The model uses advanced pattern recognition techniques optimized for Gregg shorthand notation.
|
| 80 |
+
|
| 81 |
+
## Training Details
|
| 82 |
+
|
| 83 |
+
- **Framework**: PyTorch
|
| 84 |
+
- **Optimizer**: Adam
|
| 85 |
+
- **Architecture**: Custom CNN-LSTM with pattern database
|
| 86 |
+
- **Input Resolution**: 256x256 pixels
|
| 87 |
+
- **Preprocessing**: Grayscale conversion, normalization
|
| 88 |
+
|
| 89 |
+
## Limitations
|
| 90 |
+
|
| 91 |
+
- Optimized specifically for Gregg shorthand notation
|
| 92 |
+
- Performance may vary with image quality
|
| 93 |
+
- Best results with clear, high-contrast images
|
| 94 |
+
|
| 95 |
+
## Citation
|
| 96 |
+
|
| 97 |
+
If you use this model in your research, please cite:
|
| 98 |
+
|
| 99 |
+
```bibtex
|
| 100 |
+
@misc{gregg-recognition,
|
| 101 |
+
title={Gregg Shorthand Recognition Model},
|
| 102 |
+
author={Your Name},
|
| 103 |
+
year={2025},
|
| 104 |
+
url={https://huggingface.co/a0a7/gregg-recognition}
|
| 105 |
+
}
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
## Contact
|
| 109 |
+
|
| 110 |
+
For questions or issues, please open an issue on the [GitHub repository](https://github.com/a0a7/GreggRecognition).
|