Skip to content
Meftun Akarsu
Computer vision · 2026

yolo_pool

YOLOv8 · ByteTrack · TensorRT · Jetson Nano

A pool-safety detector that tells adults from children with a custom YOLOv8m model, tracks each person and warns when a child is alone.

Empty indoor swimming pool with lane ropes, a dark ceiling with warm lights and loungers lined up along tall windows
Photo: Andy Wang / Unsplash

Overview

A real-time safety system for swimming pools. A custom-trained YOLOv8m model detects the people around a pool and labels each one as an adult or a child, and ByteTrack keeps a persistent ID on every person from frame to frame. A dedicated tool raises a warning when a child is near the pool without an adult.

Training

The model learned from more than 14,000 labeled people, about half of them adults and half children, in pool scenes labeled with CVAT and Roboflow and combined with a public child-versus-adult dataset. It trained on an A100 in Google Colab with augmentation and early stopping, which ended the run at epoch 78. On validation it reaches a mAP50 of 0.86 and a mAP50-95 of 0.552, and inference takes about 2 ms per image on the A100.

Running it

A command-line tool processes video files, images, webcams and RTSP streams, and a real-time mode shows the frame rate and lets you change the confidence threshold while it runs. For the edge, scripts set everything up on an NVIDIA Jetson Nano and export the model to TensorRT in FP16, which the project says runs three to five times faster than PyTorch on the device.

Built with

Ultralytics YOLOv8 · ByteTrack · PyTorch · OpenCV · TensorRT

← All projects