semvec/pypi-packages huggingface dataset:
cat-handwriting-recognizer 1.2.6
A lightweight handwritten character recognition module using template-based KNN.
License: MIT
Requires Python: >=3.10

# Cat Handwriting Recognizer

A simple Python module for recognizing handwritten using machine learning. Designed for easy integration and efficient preprocessing.

## Features

- Preprocess handwritten images
- Extract simple features for recognition
- K-Nearest Neighbors (KNN) prediction
- Async support for building templates
- Timeout mechanism for long-running operations
- Save and load models as .npz files

## Installation

Install from PyPI:

```bash
pip install cat-handwriting-recognizer
```

## Quick Example
```py
from cat_handwriting_recognizer import HandwritingRecognizer  
import asyncio

recognizer = HandwritingRecognizer(timeout=-1)

# Build templates from data
asyncio.run(recognizer.build_all_templates("directory")) # Your data directory

# Save model
recognizer.save_model("model.npz") # Save model file(.npz)

# Load model
recognizer.load_model("model.npz") # Load model file(.npz)

# Predict a picture
result = asyncio.run(recognizer.predict("file.png")) # Use model to predict png/jpg/jpeg file
print(result)
```
## Requirements

- Python 3.10+
- NumPy
- Pillow

## License

MIT License

## Author

littlecommandcat