This project documents a golf ball detection workflow using the Detecto library. Detecto is built on top of PyTorch and uses the Faster R-CNN model as its core architecture for object detection.
This project was prepared as part of an interview process for IdeasLab. Before the interview process finished, I accepted an offer from another company. Even so, I still completed this project and submitted it to IdeasLab.
The datasets used in this project were provided directly by IdeasLab. Because of that, the dataset files are not included and cannot be publicly shared in this repository.
-
Object Detection:Detects golf balls in images using a pre-trained Faster R-CNN model. -
Custom Training:Fine-tuning the model with a custom dataset of golf ball images.
The notebook follows a simple end-to-end pipeline:
- Prepare and extract detection/tracking datasets.
- Convert XML annotations into CSV format.
- Build datasets/loaders and train or load the Detecto model.
- Run predictions and visualize results with bounding boxes and heatmaps.
- Evaluate tracking sequences and export summary GIF/JPG outputs.
Below are examples of the golf ball detection tested on the testing datasets. Each row contains three images:
- Original Image: The input image.
- Detection with Bounding Box: The output image showing the detected golf balls with bounding boxes.
- Heatmap: A visualization using a heatmap to indicate the detected golf ball(s).















