How to use from the
Use from the
ultralytics library
from ultralytics import YOLOvv8

model = YOLOvv8.from_pretrained("Maxwelli/tennis-ball-detection")
source = 'http://images.cocodataset.org/val2017/000000039769.jpg'
model.predict(source=source, save=True)

Tennis Ball Detection with YOLOv8

This repository contains a YOLOv8n model fine-tuned specifically to detect tennis balls.

Project Overview

The goal is to accurately detect and localize tennis balls in images and video streams using the YOLOv8 object detection framework.

Requirements

  • Python 3.8+
  • Ultralytics YOLOv8
  • PyTorch
  • OpenCV

Installation

Install dependencies with:

pip install ultralytics opencv-python

Usage

Detect tennis balls in an image:

yolo task=detect mode=predict model=tennisball.pt source=your_image.jpg

Detect tennis balls in video/webcam:

yolo task=detect mode=predict model=tennisball.pt source=0  # webcam

License

This project is open-source under the Apache License 2.0 License.

Downloads last month
24
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Maxwelli/tennis-ball-detection

Quantized
(42)
this model