Giter Site home page Giter Site logo

barbellcv's Issues

Record-save-analyze instead of record-analyze-save

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.

Add action in menu to find cameras

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

Add ability to label exercises in log interface correctly

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:

  1. Clean
  2. Front squat
  3. Jerk
  4. Clean
  5. Front squat
  6. Jerk

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:

  1. The lifter wants to see their history of jerks, but only when NOT performed as part of a clean and jerk or complex
  2. The lifter wants to see a history of the jerk portion of clean and jerks

Massive peak velocities reported erroneously

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:

  1. Use a "calibration" period when the set is first logged. A progress bar shows the lifter that they should leave the barbell relatively still for the first ~20 - 30 frames (1 - 2 seconds). After this, the marker radius is known, and any contours outside of a range of this radius are rejected, skipping frames where the marker is not found.
  2. After the calibration period described above, simply record a video with no live tracking. Then post-process the video with a tracking algorithm that finds a marker in every successive frame based on similarity metrics instead of color ranges. This delays feedback to the user for some time (maybe up to 10 - 15 seconds for sets of 8+).

Update requirements to explicitly include PyQtWebEngine

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.

Refactor into smaller files

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

Make setting to control pass/fail criteria of each exercise

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

Log actual N reps

Currently number of reps includes false reps

Add record in DB for the actual number of reps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.