Skip to main content

make my own ASL clasifier on A , B , C , D , nothing latters using Pytorch and OpenCV

Project description

MY Simple ASL project with OpenCV

Installation - pip install assignment_bp_roma_cherniak_2026

Quick Start

Predict from image file

from asl_classifier import load_model, predict
from PIL import Image

model = load_model()
image = Image.open("hand.jpg")
label, confidence = predict(model, image)
print(f"Prediction: {label} ({confidence}%)")

Try it live with your webcam

from asl_classifier import load_model, run_webcam

model = load_model()
run_webcam(model)  # press Q to quit

API Reference

load_model()

Loads the ASL classifier model with pretrained weights.

predict(model, image)

Runs inference on a single PIL image.

  • model — loaded model from load_model()
  • image — PIL Image object

run_webcam(model)

Opens webcam and runs live prediction in real time.

  • model — loaded model from load_model()
  • Press Q to quit

Evaluation Proposal

The model is trained on the ASL Alphabet dataset, a collection of 87,000 200×200 RGB images across 29 classes. For this project a 5-class subset (A, B, C, D, nothing) is used, split 80/10/10 into train/validation/test sets with stratified sampling to preserve class balance (~3,500 images per class in training).

Metrics

  • Per-epoch validation accuracy (primary signal for early stopping)
  • Per-class precision, recall, and F1-score on the held-out test set
  • Confusion matrix to identify which sign pairs are most often confused

Pipeline

  • Training: Adam optimizer, cross-entropy loss, 20 epochs, early stopping on validation loss plateau
  • Preprocessing: Resize((128, 128)), per-channel mean/std normalization (0.5/0.5)
  • Evaluation: the test set is never seen during training or hyperparameter tuning; final metrics are reported once against this set only
  • Real-world sanity check: qualitative webcam testing across different lighting conditions and hand positions

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

assignment_bp_roma_cherniak_2026-0.1.1.tar.gz (5.1 MB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file assignment_bp_roma_cherniak_2026-0.1.1.tar.gz.

File metadata

File hashes

Hashes for assignment_bp_roma_cherniak_2026-0.1.1.tar.gz
Algorithm Hash digest
SHA256 17d256e8b72aa5574adeb0db8f736c75dae0c5b4cb4a373ada979a0bf05d1e46
MD5 b39993501bd8ac196d5de7b4c88dc4ac
BLAKE2b-256 650b6a0482e9842cc4baf8b2f06880903df757daa16dc756f28f8fc1e24da4bf

See more details on using hashes here.

File details

Details for the file assignment_bp_roma_cherniak_2026-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for assignment_bp_roma_cherniak_2026-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ccd8b763c452ab5f5b02d744d95a2da284fcbab0874dc754bd8766cdc0360ff3
MD5 d7d6de6d70738f52b7c612a5ae307d56
BLAKE2b-256 d95dc7ea11dfc76c3b384261185bcbf150db2bd25a4690b179bd8f9f74928741

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