Automatically generate a skeletal overlay for slow motion pose form critiques over videos.
·
Installation
·
- 📝 Table of Contents
- 🧐 About
- 🖥️ Screenshots
- 💨 Quickstart
- 💾 Installation
- ⛏️ Tech Stack
- ✍️ Authors
- 🎉 Acknowledgements
A tool that creates a skeletal overlay for slow motion pose form critiques via cloud based python infrastructure.
form.mp4
- Python and Python Poetry
- Docker To containerize the form checking function.
- Serverless For infrastructure deployment
- ffmpeg For local invocation
- AWS For infrastructure hosting
poetry install
(To install in the top level directory always:poetry config virtualenvs.in-project true
)npm install
- Installs Serverless framework
aws profile
- Create an AWS profile or changeserverless.yml.provider.profile
to your own profile name (or delete the line for[default]
)sls login
- Log in to serverlessadd github secrets
- Add the following repo secrets (to allow cloud deployment):
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
CODECOV_TOKEN
-
create .env
- Optional configuration as needed. Example .env file -
add github secrets
- If deploying using the GitHub Action workflow CI/CD you must specify these secrets (ignore codecov token if you did not set up code coverage.):
AWS_ACCESS_KEY_ID
AWS_DEFAULT_REGION
AWS_SECRET_ACCESS_KEY
CODECOV_TOKEN
FC_EMAIL_DESTINATION # (in case you want your email address obscured from SCM.)
- Start a poetry virtual environment shell
foo@bar:~$ poetry shell
- Run the script on the local file:
foo@bar:~$ form_check /path/to/your/file.mp4
- You can also run the following to open a file browser using Tkinter:
foo@bar:~$ form_check_ui
- Finally you can find the outputted processed/compressed version in
~./tmp/*.mp4
Please note that deployment will be automatic if you set up the configuration properly and push to your own fork via GitHub Actions.
- Example local invocation of email notification lambda
foo@bar:~$ sls invoke local --function notify --data '{"Records":[{"s3":{"bucket": {"name":"form-checker-videos"}, "object":{"key": "processed/video.mp4"}}}]}'
- Deploys the serverless cloud infrastructure from your local .env settings.
foo@bar:~$ sls deploy -v
- Create the domain for the AWS Api Gateway
foo@bar:~$ sls create_domain
- Add the necessary GitHub repo secrets:
CODECOV_TOKEN=<Optional: Your (CodeCov)[https://codecov.io/] generated API Key>
SENDGRID_API_KEY=<Optional: Your SendGrid (email notification feature) generated API key>
FC_EMAIL_DESTINATION=<Optional: the email address you want to be notified to>
AWS_ACCESS_KEY_ID=<Your AWS generated key id>
AWS_SECRET_ACCESS_KEY=<Your AWS generated access key>
AWS_DEFAULT_REGION=<Your AWS region>
- Push to GitHub
- Now you will be able to upload a file using
${DOMAIN}/presigned
foo@bar:~$ curl -L -X POST 'subdomain.domain.com/presigned' \
-H 'Content-Type: application/json' \
--data-raw '{
"filename": "test"
}'
- Now you may upload a file using the response url and the upload lambda will trigger which will create a new video file in the s3 bucket.
- Python - Software Development
- Poetry - Package Management
- OpenCV - Image Processing
- MediaPipe - Machine Learning Model/Solution
- Serverless - Web Framework
- AWS - Cloud Infrastructure
- pytest - Testing Framework
- CodeCov - Test Coverage Metrics

- @FFMPEG for providing amazing open source video solutions.