How a survey works

Survey process

Start survey Load calibration (footprint 37 × 21 cm, mm per pixel) Plan serpentine lanes (20% overlap between neighbors) Drive next 50 cm segment of lane (Arduino motor control) Save frames at 5 fps with odometry; steer back onto the lane line Lane complete? All lanes done? Turn into next lane; opposite direction After the drive:batch analysis of the saved survey Measure ground shift between frames (Fourier-Mellin + phase correlation) Detect debris in each frame (open-vocabulary model, e.g. YOLOE) Count detections centered in the new-ground strip and lane band; add strip to area Calculate density = unique items ÷ surveyed area (items/m²) Save counts, density, item list and map End survey Yes Yes No No
Survey workflow: drive and record first, then analyze the saved survey

DuneBroom doesn’t pick trash up. It drives a plot of sand in back-and-forth lanes, photographs the ground ahead of its tracks, and reports how many pieces of debris are there per square meter. It needs no internet connection and nobody has to count items by hand.

A survey has two phases. During the drive, the rover only captures photos and records how far it has moved. Detection, counting and the density calculation run afterwards as a batch on the saved survey. Keeping them apart lets the rover drive steadily, and the same code can replay any saved survey on a laptop.

Calibration

The camera is calibrated with a printed checkerboard. Views of the board at different angles give the lens model, and a tape-measured height fixes the scale. The camera then gets glued in place. It sits 27 cm above the ground, level to within 0.6°. Each photo covers 37 × 21 cm of ground at about 0.19 mm per pixel, so a 5 mm item spans roughly 25 pixels.

Driving the lanes

The rover starts at a marked corner of the plot, and the plot’s size is entered. It plans serpentine lanes, each driven in the opposite direction to the one before, which halves the driving compared with returning to the same end every time. Lane spacing comes from the camera’s footprint, with 20% side overlap between neighboring lanes. A 3 m × 5 m plot takes 10 lanes and about six minutes.

Lanes are driven in 50 cm segments. Between segments the rover checks its position from wheel-encoder odometry and steers back onto the lane line. A gyro is being added to make turns at the lane ends accurate. The camera sits on a boom ahead of the tracks, so it photographs each patch of ground before the rover drives over it.

Capture

The Raspberry Pi 5 saves photos from the downward-facing camera at 5 frames per second, along with the odometry for each frame. Exposure, focus and white balance are locked at the start of a run so every frame is measured the same way. Exposure is capped at 2 ms to keep motion blur under about half a millimeter.

Detection

After the drive, a detector looks for litter in each photo: plastic fragments, bottle caps, wrappers and foam, as opposed to shells, rocks, seaweed and twigs. The first choice is a zero-shot, open-vocabulary model that finds objects from a text description without any training on DuneBroom’s images. Several have been compared, and YOLOE leads so far. If none is accurate enough on hand-labeled beach photos, a small custom model will be trained, using the zero-shot model to pre-label its training images. The target is items down to 5 mm across.

Counting each item once

Consecutive images overlap, and neighboring lanes share an edge. At 5 frames per second an item stays in view for about four frames. A naive count would record the same bottle cap several times. DuneBroom prevents this in two steps:

Measuring ground shift

Each image is compared with the one before it to measure how far the ground slid and rotated between frames. This uses Fourier-Mellin registration and phase correlation, so it comes from the images alone and doesn’t depend on track slip. On simulated sand it is accurate to about 0.1 mm per frame pair.

New-ground strips and lane bands

Only detections centered in the strip of ground that is new in this frame, and inside the current lane’s band, are counted. An item that shows up in several overlapping images is counted once, in the first image where it appears.

Each counted item is logged with its size, type and position, and each new strip is added to the running total of surveyed area.

Results

The rover then computes density = unique items ÷ surveyed area in items/m². It saves the counts, the density estimate, a per-item list and a detection map showing where each item was found.

(a) Survey pattern for a 3 m × 3 m test plot (b) Counting only new ground prevents double counting Start 3.0 m 3.0 m Survey lane (direction of travel) Turn into next lane Debris item (e.g., litter) Serpentine lanes, 20% overlap between neighbors Item at 18 cm appears in all 3 images but is counted once (Image 1) Image 1 Image 2 Image 3 0 8 16 20 28 36 Position along track (cm) Counted (new ground) Already seen (ignored) Debris item (18 cm, counted once)
Serpentine survey lanes over a 3 m × 3 m plot, and how new-ground strips stop an item from being counted twice