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 fromload_model()image— PIL Image object
run_webcam(model)
Opens webcam and runs live prediction in real time.
model— loaded model fromload_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
Release files for assignment-bp-roma-cherniak-2026 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| assignment_bp_roma_cherniak_2026-0.1.1.tar.gz | 5.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| assignment_bp_roma_cherniak_2026-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 MB
Release files / assignment_bp_roma_cherniak_2026-0.1.1.tar.gz
| Download URL | assignment_bp_roma_cherniak_2026-0.1.1.tar.gz |
|---|---|
| Size | 5.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17d256e8b72aa5574adeb0db8f736c75dae0c5b4cb4a373ada979a0bf05d1e46
|
|
BLAKE2b-256 checksum How to use checksums |
650b6a0482e9842cc4baf8b2f06880903df757daa16dc756f28f8fc1e24da4bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / assignment_bp_roma_cherniak_2026-0.1.1-py3-none-any.whl
| Download URL | assignment_bp_roma_cherniak_2026-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccd8b763c452ab5f5b02d744d95a2da284fcbab0874dc754bd8766cdc0360ff3
|
|
BLAKE2b-256 checksum How to use checksums |
d95dc7ea11dfc76c3b384261185bcbf150db2bd25a4690b179bd8f9f74928741
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|