Merge new model and config structures, CRUD functions#3
Open
neal-logan wants to merge 5 commits into
Open
Conversation
neal-logan
commented
Apr 30, 2025
Collaborator
- Project Structure: Extracted hard-coded information about gestures to .json files in configs folder: gesture-index mappings, gesture-action mappings, and defaults for each. Moved paths for models, data, and configs to environmental variables for coordinate; see .env.example. Moved raw hand landmark data to .csv format for maximum flexibility in data folder.
- Model Features: Added left/right handedness to feature set. When added to 21 landmarks * 3 dimensions, this brings us to a nice, round 64 dimension. Moved to the new models folder. Expanded training logic to use a balanced sample (by right/left hand and gesture), extend training by a few epochs per prediction class.
- Model Classes: Added an "other_gesture" class and corresponding data intended to classify hands that aren't making any particular gesture, intended to map to no action. This non-gesture includes a larger dataset, and the model should always be trained with a larger sample of this, perhaps as large as all other samples combined (it's currently about 1/3 of the data sampled).
- Landmark Normalization: Unified normalization of hand landmarks using mean-centered normalization, dimension by dimension, with scaling based on maximum deviation from the mean in that dimension.
- CRUD: Added methods for CRUD (create/read/update/delete) functionality for gestures, contexts, and gesture-action mappings in crud.py in the src folder. Minimally tested but they all seem to work.
- Dev/Testing Notebook: Added a notebook for development/testing. Currently includes sample code for running data capture for new gestures as well as for training a new model after gestures are created, deleted, or altered. Intended for use in development/testing of CRUD functions as well as supporting functions so the UI can be developed separately.
- Streamlit UI for configs: Broke it; it's going to need to get expanded to handle the new range of CRUD functions.
- Archived python files, configs, data, and models not currently in use
…1, added a function for data loading
…d notebook to include sample code for data gathering and model training (for use in CRUD functions later)
… developed and minimally tested
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.