Skip to content

Y01N/RoundnetServeVision

Repository files navigation

Roundnet Serve Vision (RSV)

Roundnet Serve Vision is an open source project that leverages computer vision to help quickly track and collect data on Roundnet Serves. From a birdseye video of a roundnet serve, RSV can detect the trajectory and speed of the ball. It then can determine whether or not the serve is legal or not and provide stats such as velocity and change in angle. This project has applications in tracking the quality of one's own serves and potentially could be used to help referee Roundnet games.

Serve Analysis

Usage

  1. Install requirements:
    Run the first cell to install ipympl for interactive matplotlib widgets.

  2. Set up interactive plotting:
    Run %matplotlib widget in its own cell.

  3. Load your video:
    Set the video_path variable to your video file.

  4. Select the net area:
    Run the cell to select net corners on the first frame, then click "Done".

  5. Track the ball:
    Run the cell to step through frames, clicking the ball position and clicking "Next Frame" or "Done" as appropriate.

  6. Process and visualize:
    Run the analysis and plotting cells to see the trajectory and velocity.

  7. Export results:
    Run the final cell to save the plot and data to the plotted_serves and serve_data directory.

Action Items:

  • automate net polygon with computer vision or hybrid where you draw a circle and it corrects to fit the net you are circling
  • automatically find the center of the ball in each frame (experimental atm)
  • categorize serve as cut, jam, reverse
  • Aggregate stats for several serves or set of serves to do:
    • sorting serves by third, by spin
    • indexing serves by speed or change in speed
    • hit percentage
    • pie chart of serves by type and by type of goodness
  • add manual bad serve detection
  • store data field for why serve is bad
  • store third idx
  • store if serve is cut, jam, reverse

TODO later:

  • automatically find the center of the ball in each frame
  • automatically find net and be able to adjust if move
  • automatically know which frame the ball has hit net based on net tracking
  • auto rim detection (idk how maybe with sound maybe with net movement) (maybe hybrid approach where it trys to guess but ultimately user can correct)
  • no drop zone detection
  • Auto detecting and splitting up serves from a longer video of several serves
  • Live version of app that can in live time call a serve bad
  • Aggregate stats for several serves or set of serves to do
  • height detection and estimating if the serve will be high
  • 3d video of balls estimated path
  • Pose detection and timing for accuracy of fakes and window of time for receiver to know
  • maybe have area of ball instead of center
  • maybe have track all the frames the ball is touching the net rather than the first and change how the velocity after net it calculated bc ball slows down on net but can speed up coming of dependent on spin so averaging velocity with frames its touching net may be inaccurate to the speed it comes off

Known issues:

  • issues in plotting net hit (stops too early): see 0005.mp4
  • 0010.mp4
  • skip past net polygon exit point i think - 0011

Videos that work properly: 0001,0002,0003,0004,0006,0007,0008,0009

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Utilizes Computer Vision to analyze roundnet serves

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published