How suhasj30/signsense_cnn works
SignSense CNN trains and evaluates an ASL image classifier, then provides full-frame webcam inference through a local WebSocket backend and browser dashboard. The training workflow runs from CLI preflight through dataset preparation, model training/checkpointing, and held-out test evaluation; the interactive workflow captures camera frames, streams them to the backend, and presents predictions for sentence building and speech. Edges reflect excerpts, index references, or README statements; unsampled backend and CLI internals are represented only where documented.
Main entry points: App.tsx Dashboard application · main.py Command entry · model.py Model factory · evaluate.py Test metrics
Components 27
CLI orchestration
- Command entry
main.py - Run configuration
config/config.yaml
Model pipeline
- Dataset and transforms
training/dataset.py - Model factory
models/model.py - Training stages
training/trainer.py - Training orchestration
training/train.py - Model checkpoints
models/checkpoints - Image inference
inference/predict.py - Desktop webcam
inference/webcam.py
Evaluation
- Test metrics
evaluation/evaluate.py - Confusion analysis
evaluation/confusion_matrix.py - Evaluation plots
evaluation/visualize.py
Live inference
- WebSocket inference
backend/app.py
Browser experience
- Dashboard application
frontend/src/App.tsx - Camera controls
frontend/src/components/CameraPanel.tsx - Camera lifecycle
frontend/src/hooks/useCamera.ts - Camera device API
frontend/src/services/cameraService.ts - Recognition transport
frontend/src/services/recognitionService.ts - Prediction display
frontend/src/components/PredictionCard.tsx - Sentence builder
frontend/src/components/SentenceBuilder.tsx - Speech synthesis
frontend/src/hooks/useSpeech.ts - Recognition history
frontend/src/components/HistoryPage.tsx - History storage
frontend/src/services/historyService.ts - Preferences screen
frontend/src/components/SettingsPage.tsx - Settings storage
frontend/src/services/settingsService.ts
Other components
- Developer
- Browser user
Connections 34
- Developer → Command entry: runs commands
README.md - Command entry → Run configuration: loads settings
README.md - Command entry → Dataset and transforms: validates data
main.py - Command entry → Training orchestration: starts training
main.py - Training orchestration → Dataset and transforms: creates loaders
training/train.py - Training orchestration → Model factory: builds model
training/train.py - Training orchestration → Training stages: runs stages
training/train.py - Training stages → Model factory: configures parameters
training/trainer.py - Training stages → Model checkpoints: saves best model
training/trainer.py - Command entry → Test metrics: runs evaluation
main.py - Test metrics → Model factory: loads checkpoint
evaluation/evaluate.py - Test metrics → Dataset and transforms: loads test split
evaluation/evaluate.py - Test metrics → Confusion analysis: creates matrix
evaluation/evaluate.py - Test metrics → Evaluation plots: writes reports
evaluation/evaluate.py - Command entry → Desktop webcam: starts webcam
main.py - Desktop webcam → Model factory: loads checkpoint
inference/webcam.py - Image inference → Model factory: loads checkpoint
inference/predict.py - Browser user → Dashboard application: uses dashboard
README.md - Dashboard application → Camera controls: renders controls
frontend/src/App.tsx - Camera controls → Camera lifecycle: uses camera
frontend/src/components/CameraPanel.tsx - Camera lifecycle → Camera device API: opens device
frontend/src/hooks/useCamera.ts - Dashboard application → Recognition transport: starts recognition
frontend/src/App.tsx - Recognition transport → WebSocket inference: streams JPEG frames
README.md - WebSocket inference → Model factory: loads model
backend/app.py - WebSocket inference → Browser user: returns predictions
README.md - Dashboard application → Prediction display: displays results
frontend/src/App.tsx - Dashboard application → Sentence builder: renders builder
frontend/src/App.tsx - Sentence builder → Speech synthesis: speaks text
frontend/src/components/SentenceBuilder.tsx - Dashboard application → Recognition history: renders history
frontend/src/App.tsx - Dashboard application → History storage: clears entries
frontend/src/App.tsx - Dashboard application → Preferences screen: renders preferences
frontend/src/App.tsx - Dashboard application → Settings storage: saves preferences
frontend/src/App.tsx - Recognition history → History storage: reads history
frontend/src/services/historyService.ts - Preferences screen → Speech synthesis: configures speech
frontend/src/components/SettingsPage.tsx