A simple module for recognizing handwritten
Project description
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:
pip install cat-handwriting-recognizer
Install from GitHub:
pip install git+https://github.com/littlecommandcat/cat_handwriting_recognizer.git
Quick Example
from cat_handwriting_recognizer import HandwritingRecognizer
import asyncio
machine = HandwritingRecognizer(timeout=-1)
# Build templates from data
asyncio.run(machine.build_all_templates("directory")) # Your data directory
# Save model
machine.save_model("model.npz") # Save model file(.npz)
# Load model
machine.load_model("model.npz") # Load model file(.npz)
# Predict a picture
result = asyncio.run(machine.predict("file.png")) # Use model to predict png/jpg/jpeg file
print(result)
Requirements
- Python 3.10+
- NumPy
- Pillow
License
MIT License
Author
littlecommandcat
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cat_handwriting_recognizer-1.2.4.tar.gz.
File metadata
- Download URL: cat_handwriting_recognizer-1.2.4.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe5d837901e92e93ef660876f9d1a3b0664709ab28d6eb26ff35b75e647d8ceb
|
|
| MD5 |
5e5c334572b4c348843cbb9bc71b6d45
|
|
| BLAKE2b-256 |
970d18a074d85afdd5c3927cd312754662a54f90067d70160aa674cd2fa14a3f
|
File details
Details for the file cat_handwriting_recognizer-1.2.4-py3-none-any.whl.
File metadata
- Download URL: cat_handwriting_recognizer-1.2.4-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e62d1e9281de20af28a260e5bd8689ee18db7c056eb40edc227918c0e842503
|
|
| MD5 |
9e054519977c4601e50b35dfef9a2e71
|
|
| BLAKE2b-256 |
d2a76728db2ac36c891fb621cfea758ba479e03726c4b8f88de06dd893d2181a
|