11
Aug
FORAY - Update on Live Ball (with Distance) Detection
Aaron John Sabu foray computer vision machine learningThe video in the last post depicted a very slow detection of the ball. I also tested a CPU-trained model but, as expected, it was quite slow:
To improve the performance of the algorithm, I replaced the original FasterRCNN model (torchvision.models.detection.fasterrcnn_resnet50_fpn()
) with a mobile-based one (torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn()
). Here, the detection isn't great beyond a point where the ball is too small to be detected but the detection is fast enough to be used in a real-time application since the model size is less than half the original size: