1

What algorithm should I use for detecting/tracking a tennis ball in a video of a tennis match? I was thinking of training a custom YOLOv3 model but since I am dealing with a small and fast moving object I think it wouldn't make sense.

drumaddict
  • 121
  • 2
  • 7

2 Answers2

2

You can also use opencv circle detection algorithm (Hough circles) but it requires a bit to tweaking. At least testing it on your test set should be quite straighforward. See here for an introduction: https://www.pyimagesearch.com/2014/07/21/detecting-circles-images-using-opencv-hough-circles/

Provided you know in advance the balls colors you could also do color based segmentation, blobs detection and circularity estimation on found objects. This is the cheapest way (in terms of processing complexity) but again nothing beats trying.

Jean-Marc Volle
  • 3,113
  • 1
  • 16
  • 20
  • It will probably not work in my case, the speed of the ball is such that it appears elongated in many frames - it's not always a circle. – drumaddict Oct 01 '20 at 18:04
1

Try it, it may work. I detected cars less than 100 pixels using YOLOv3.

AbdelAziz AbdelLatef
  • 3,650
  • 6
  • 24
  • 52
  • 1
    I will try YOLOv3. I about to annotate some 140 frame images, so I asked for some opinions just in case there was a better solution that could saved me from unnecessary tagging! – drumaddict Oct 01 '20 at 18:08
  • @drumaddict Try it and let's see the results, this may help you in training. https://stackoverflow.com/questions/57898577/how-to-reduce-number-of-classes-in-yolov3-files – AbdelAziz AbdelLatef Oct 01 '20 at 18:15