tlancon / barbellcv Goto Github PK
View Code? Open in Web Editor NEWTrack your barbell using computer vision for velocity-based insights in your training.
Track your barbell using computer vision for velocity-based insights in your training.
Recording the video up front, then reopening it to analyze it may yield better results and higher frame rates. Currently the video is analyzed AS its recorded and for faster movements (the very thing I want to track) some frames are missed.
Using a workflow to save the video, open it, then analyze it also opens up a more flexible UI. Instead of needing to record to perform an analysis, any video from any source can be opened and analyzed or reanalyzed. If someone wants to use their phone to upload directly to a cloud storage (i.e. OneDrive), then open the lift from there, this should enable that.
Currently if a camera is attached after barbellcv starts, the lifter must restart the software to be able to access it. Need an action in the UI to send a signal to the camera finding method to circumvent this
To find cameras, barbellcv must activate them. And there is a sleep function inside the camera initiation function. So it takes a while to load! Display this to the user.
Due to heavy median filtering of original Y signal with a kernel of 7
Each rep in the table should be able to be correctly labeled AFTER the lift
Useful for situations where one rep is comprised of many individual movements
Ex.1:
The user logs a set of 2 clean and jerks. The rep finder will most likely report 6 separate reps:
The history database should remember this set as clean and jerks, but each rep should be remembered as the individual movement they are so that when the lifter reflects on their history they aren't comparing velocities/ROMS of intermixed movements.
Another example would be snatches, where the snatch and overhead squat are detected separately.
Somehow the database needs to respond to two different queries:
Change to scatterplot?
Currently you have to know the keys for set_stats and manually edit the JSON
Make optional in find_peaks function
Sometimes peak velocities are reported upwards of 5 - 8 m/s.
Currently the bar marker detection find the largest contour within the color range in every frame it can, and plots that contour as part of the bar path.
It's not uncommon for the marker to "blur" between some frames due to video compression, and for the blurred color to be outside of the valid color range that the user calibrates. There is also no way to expect the user to be able to calibrate this. Additionally, this normally occurs during a critical time in the concentric phase of the rep.
On top of that, it's also not uncommon for noisy pixels to present themselves for individual frames.
When these coincide, you end up with a marker that disappears during the concentric phase - when measuring velocity is most important - and for a tiny false "marker" to show up somewhere randomly in the frame.
Since barbellcv accepts the largest contour it finds, that means that the bar path will jump from the marker to that noise then back to the bar in a very short time, making it look like the bar traveled very far in a short period of time.
Ideas to get around this:
What do the plots look like if this is done? Worked before in initial testing
Since 45234p5u3245872458342 years ago when I made this, PyQt5 has broken out the web widgets I used for rendering the HTML documentation to its own package in pip (PyQtWebEngine). Add this to requirements.txt.
Also, update installation instructions in README.md to run the software using python main.pyw
instead of python main.py
.
Ideally:
barbellcv.py has logic to run the app and parse commands from the command line
log.py contains the UI for logging
analyze.py contains the UI for reviewing/editing lift history
helpers.py has self-contained functions that can be used throughout
Need to be able to save without exiting
Lifter may want to monitor different aspects of each lift to determine whether it was good/bad or pass/fail
For example, I would like to indicate that a snatch fails if it's below a certain peak velocity, but I want to measure squats by the time of concentric motion
This needs to react to rep reassignment when #8 is implemented
Use configparser from std lib
log_set reacts to Escape key
Currently number of reps includes false reps
Add record in DB for the actual number of reps
Requires logging set/rep data to database so filename isn't required to store exercise name and weight
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.