ArtLabss / tennis-tracking

Open-source Monocular Python HawkEye for Tennis
https://www.artlabs.tech
The Unlicense
419 stars 100 forks source link

Questions #23

Closed Draugsleip closed 1 year ago

Draugsleip commented 1 year ago

Hey, I have three questions: 1) Is there any way to use this on real time video (webcam, external camera etc...) ? 2) I want to calculate the speed of ball as well, how can I do this ? 3) Can you run this project using yolov5 instead yolov3, If so, how?

Edit: Also, when I tried to "pip install -r requirements.txt" on anaconda process is shows errors after the step "Installing build dependencies" how can I solve this problem Error1

shukkkur commented 1 year ago

Hey @Draugsleip!

  1. Yes you could modify the code a bit so instead of processing a single frame from the video you would process a frame captured from the camera in real-time (see OpenCV/cv2 code). However, if you have read the README, it states that this repo was designed and works best for official matches. Since, I doubt that you are going to capture a tennis match with the same view as in sample videos, I think there is no point of altering the the code for processing frames in real time.

  2. No clue!) Try googling while also taking into account that from the code we are given 2D coordinates of the ball (x, y) https://github.com/ArtLabss/tennis-tracking/blob/3a633be55f13667649c385ff76055176bf074c6b/predict_video.py#L186-L187

  3. Yep, I think we definitely could). Try going over the code and see where we are using YoloV3 and try replacing it with YoloV5. )))

As for the error, my guess would be dependency conflicts for NumPy. Try:

pip uninstall numpy
pip install -r requirements.txt

Or create virtual environment and then pip install the requirements)


Feel free to re-open the issue in case of further inquires.