Building an aerial search-and-rescue vision pipeline
From swimmer detection to temporal distress analysis
How our drones find a swimmer in open water and tell distress from ordinary swimming: a YOLOv8n detector trained on SeaDronesSee, ByteTrack multi-object tracking and temporal behaviour analysis, built for the NVIDIA Jetson Orin Nano.

A person in open water is hard to spot from above. Waves, glare, splashes and the tiny visual footprint of a swimmer all make detection difficult. And locating a swimmer is only the first step: recognising signs of distress means understanding how they move over time.
We combine a domain-specific object detector with multi-object tracking and temporal behaviour analysis to tackle this. In this article we look at the datasets, models and engineering techniques behind the pipeline, and walk through the implementation step by step.
The use case
Autonomous first-responder drones give an aerial view over beaches, the sea and other open water, and from that view we can pick out swimmers who need help. But detecting a swimmer is not the goal. We need to know whether that person is in distress or simply swimming, and that means tracking their movement over time and looking for the patterns that signal trouble.
The pipeline is designed around three objectives:
- Swimmer detection. Find swimmers in the video, even when they are partly hidden or fill only a few pixels of the frame.
- Persistent tracking. Keep a consistent identity for each swimmer across frames, building a continuous record of how they move.
- Temporal distress analysis. Examine movement patterns and changes in what the camera sees over time to flag potential signs of distress.
Everything the pipeline produces is structured into incident alerts and diagnostic outputs for the mission systems. That supports situational awareness and the rescue itself, while keeping computer vision separate from flight control.
Our approach
Spotting distress or drowning from the air takes more than a single object detector. The system has to find swimmers in water scenes, keep their identities across frames and analyse how they move over time. So we built it as a modular computer vision pipeline that combines spatial detection, multi-object tracking and temporal analysis.

Each stage solves a different problem, from adapting detection to aerial maritime footage to telling ordinary movement apart from patterns that may indicate distress. The sections below cover the dataset, models and techniques behind each stage, then the implementation workflow and the optimisations we are considering for NVIDIA Jetson hardware.
The dataset: SeaDronesSee
SeaDronesSee is a maritime computer vision benchmark built to support object detection and tracking for UAV-based search and rescue. It provides annotated aerial images captured over water, and it takes on exactly the hard cases: targets that are small, blurred, and seen from many altitudes and camera angles.

- 14,227
- Images (Object Detection v2)
- 8,930
- Training
- 1,547
- Validation
- 3,750
- Testing
- 5–260 m
- Capture altitude
- 0°–90°
- Camera angle
- Five object categories: swimmer, boat, jetski, buoy and life-saving appliance.
- Varied aerial perspectives: altitudes from 5 to 260 metres, camera angles from 0° to 90°.
- Annotated imagery: bounding boxes and metadata for object localisation and evaluation.
For our drowning-detection pipeline, SeaDronesSee is the domain-specific foundation for swimmer detection. Its aerial maritime imagery bridges the gap between general-purpose object detection and the conditions a drone actually meets over water.
Tutorial walkthrough
The companion repository holds the core components of the pipeline. Here is how the system is organised, how video moves through detection and tracking, and how to inspect what comes out.
Steps 1–2: Get the repository and set up the environment
Clone the repository and switch to the working branch, which has the implementation discussed here.
git clone https://github.com/orbitalaerospace/dfr-cv.git
cd dfr-cv
git checkout workingNext, create a Python virtual environment and install the dependencies from requirements.txt. Before running inference, make sure the detector weights and the input video are at the paths set in the pipeline configuration.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtSteps 3–4: Run the detector
The detection stage processes each frame and returns bounding boxes, class labels and confidence scores. In our implementation the detector is wrapped by the pipeline’s detection adapter. Conceptually, a detection result looks like this:
# Conceptual example of a detection result
detection = {
"class": "swimmer",
"confidence": 0.91,
"bbox": [120, 85, 168, 142],
}The values are illustrative. The detector’s actual output format depends on the implementation and inference configuration.
Step 5: Track swimmers across frames
Detections from successive frames go to ByteTrack, which associates them with existing tracks. That lets the pipeline build a history for each swimmer instead of treating every frame as an unrelated image.
# Conceptual tracking workflow
detections = detector.detect(frame)
tracks = tracker.update(detections)Here detector and tracker stand for the pipeline components; the snippet shows how they relate rather than an exact function signature.
Step 6: Analyse movement over time
The temporal classifier examines each track’s history using several movement features: locomotion efficiency, directional volatility, bounding-box scale change, observation gaps and kinetic volatility. Its configuration sets the observation window, the distress threshold, and the confirmation and recovery windows. The defaults:
window_seconds = 2.0
stride_seconds = 0.5
distress_threshold = 0.55
confirm_windows = 3
recovery_windows = 3Steps 7–8: Generate and inspect outputs
The video pipeline can produce annotated video alongside structured JSON and incident alerts. Together they let you check the detector’s predictions, follow tracked identities and examine the temporal analysis behind each potential distress event.
To reproduce this stage, use the arguments and configuration exposed by src/pipeline/track_video.py. Check input paths, model-weight locations and command-line options against the current repository before running it.
Step 9: Prepare for edge deployment
For search and rescue, the pipeline eventually has to run within the compute, memory, power and thermal limits of the hardware on board. The NVIDIA Jetson Orin Nano is our target platform for evaluating the whole workflow under those limits.
Optimising for the edge
Computer vision on a drone is a balance between inference speed, memory, power and detection reliability. The strategies we are pursuing:
- TensorRT: optimise model inference for NVIDIA hardware.
- FP16 / INT8 precision: faster inference and less memory, while watching accuracy.
- CUDA preprocessing: speed up image processing and cut unnecessary CPU–GPU transfers.
- Performance profiling: measure latency, throughput, memory and power under realistic workloads.
Each of these will be benchmarked on the target device. We will measure the gains rather than assume them.
Where this goes next
The pipeline combines swimmer detection, multi-object tracking and temporal behaviour analysis to find patterns in aerial footage that may indicate distress. Next we are focused on robustness, validating the distress indicators, and measuring end-to-end performance on Jetson hardware. The goal is an efficient, on-board vision pipeline for aerial search and rescue.
See where it fits in a full mission in our sea rescue case study.


