Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cat_handwriting_recognizer-1.2.4.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cat_handwriting_recognizer-1.2.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file cat_handwriting_recognizer-1.2.4.tar.gz.

File metadata

File hashes

Hashes for cat_handwriting_recognizer-1.2.4.tar.gz
Algorithm Hash digest
SHA256 fe5d837901e92e93ef660876f9d1a3b0664709ab28d6eb26ff35b75e647d8ceb
MD5 5e5c334572b4c348843cbb9bc71b6d45
BLAKE2b-256 970d18a074d85afdd5c3927cd312754662a54f90067d70160aa674cd2fa14a3f

See more details on using hashes here.

File details

Details for the file cat_handwriting_recognizer-1.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for cat_handwriting_recognizer-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6e62d1e9281de20af28a260e5bd8689ee18db7c056eb40edc227918c0e842503
MD5 9e054519977c4601e50b35dfef9a2e71
BLAKE2b-256 d2a76728db2ac36c891fb621cfea758ba479e03726c4b8f88de06dd893d2181a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page