Abstract

trailmask is a small convolutional segmentation model that marks satellite trails in amateur wide-field images. Trained on 2,140 frames with 3,870 hand-labeled trails, version 0.1 finds 94 percent of trails in held-out test images with a precision of 91 percent, and processes a 24-megapixel frame in about 1.4 seconds on a laptop processor.

1. Problem

Satellite trails cross a growing share of wide-field exposures. A trail adds a bright line to a frame; if it is not masked, it can bias photometry, leave streaks in stacked images, and produce false detections in any pipeline that classifies sources. Classical line detectors such as the Hough transform work well for bright, straight trails, but struggle with faint trails, trails that cross bright nebulosity, and frames with strong gradients, which are common in amateur images.

2. Data

The training set contains 2,140 calibrated frames from nine member setups and from the all-sky camera used on our March 2026 expedition. Frames range from 12 to 61 megapixels, with focal lengths from 14 to 530 mm.

Members drew 3,870 trails by hand as polylines with a width, which were converted to pixel masks. Every frame was labeled by one member and checked by a second. Disagreements (about 6 percent of trails) were resolved in discussion.

We also labeled 412 objects that look like trails but are not: meteors, aircraft lights, diffraction spikes, internal reflections and the edges of clouds.

The data were split by setup, not by frame, so that no camera appears in both the training and the test set.

Split Frames Trails Setups
Training 1,580 2,860 6
Validation 260 470 1
Test 300 540 2

3. Model

trailmask is a U-Net (Ronneberger et al. 2015) with a lightweight encoder based on MobileNetV3 (Howard et al. 2019), about 2.1 million parameters in total. It works on 512 × 512 pixel tiles of a frame that has been downsampled by a factor of two, with overlapping tiles merged by averaging. The output is a per-pixel probability that is thresholded and then cleaned with a short line-fitting step, which joins broken segments of the same trail.

Training used a combination of Dice and binary cross-entropy losses, with random flips, rotations, background gradients and added noise as augmentation.

4. Results

On the test set:

Measure Value
Trails found (recall) 94.1%
Flagged trails that are real (precision) 91.3%
Pixel-level intersection over union 0.81
Time per 24-megapixel frame (laptop processor) about 1.4 s

Recall falls for very faint trails: for trails less than about twice the background noise, it is 71 percent. Of the false detections, 38 percent were meteors, 27 percent aircraft lights, 21 percent diffraction spikes and 14 percent other features.

5. Limitations and next steps

  • trailmask does not distinguish satellites from meteors. That is the main goal for version 0.2, using the August 2026 Perseid frames.
  • Very short trails in narrow fields are under-represented in training.
  • The model has not been tested on professional survey data.

6. Availability

Code: MIT license. Trained weights: CC BY 4.0. The labeled masks from member images are available to members; masks for frames whose owners agreed to publication are released under CC BY 4.0.

References

  • Howard, A. et al. 2019, Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 1314
  • Ronneberger, O., Fischer, P. & Brox, T. 2015, Medical Image Computing and Computer-Assisted Intervention (MICCAI), LNCS 9351, 234