Skip to content

Improve fireball detector recall with stdpixel decontamination#866

Open
alextudorica wants to merge 1 commit into
CroatianMeteorNetwork:prereleasefrom
alextudorica:fireball-stdpixel-decontamination
Open

Improve fireball detector recall with stdpixel decontamination#866
alextudorica wants to merge 1 commit into
CroatianMeteorNetwork:prereleasefrom
alextudorica:fireball-stdpixel-decontamination

Conversation

@alextudorica
Copy link
Copy Markdown

Summary

The fireball detector misses events when a bright fireball inflates stdpixel along its trail within the 256-frame FF block. The threshold formula (avepixel + k1*stdpixel + j1) exceeds 255, gets clipped to 255 (uint8), and near-saturated trail pixels (250–254) are killed.

Fix: before passing to thresholdAndSubsample, replace stdpixel at contaminated pixels with the background median:

  1. Background reference: std_ref = median(stdpixel) where maxpixel < P90
  2. Contamination mask: maxpixel >= P90 AND stdpixel > 3 × std_ref
  3. Replace: stdpixel[contaminated] = std_ref

Pure numpy preprocessing — no Cython changes needed, Pi3/Py2 compatible.

Additional changes:

  • Clip threshold to 254 (not 255) in Grouping3Dcy.pyx so near-saturated pixels can pass
  • Make max_velocity configurable via .config file (default raised from 2 to 3 px/frame)

Results on 133-event reference dataset

1730 FF files, 100 FR-less (missed) stations:

Metric Stock Improved
FR-positive recall 98.5% 99.4%
Missed station recall 30.0% (30/100) 55.0% (55/100)

Zero regressions on existing detections.

Test plan

  • Benchmarked on full 133-event v2 reference dataset
  • Verified zero regressions on FR-positive stations
  • Confirmed Pi3/Py2 compatibility (pure numpy, no new dependencies)
  • k1 sweep tested (k1 cap 4.5 is safe, k1 <= 4 causes overflow in point allocation)

@alextudorica alextudorica force-pushed the fireball-stdpixel-decontamination branch from 7ac217a to 2f18ff2 Compare May 21, 2026 12:56
@alextudorica alextudorica changed the base branch from master to prerelease May 21, 2026 12:57
@alextudorica alextudorica force-pushed the fireball-stdpixel-decontamination branch 2 times, most recently from 99d6a39 to f88aa48 Compare May 21, 2026 16:26
A bright fireball inflates stdpixel along its trail within the 256-frame
FF block, pushing the threshold (avepixel + k1*stdpixel + j1) above 255.
The uint8 clip kills near-saturated trail pixels (250-254).

Fix: before thresholding, replace stdpixel at contaminated pixels
(maxpixel >= P90 AND stdpixel > 3x background median) with the
background median. Pure numpy, no Cython changes needed.

Also: clip threshold to 254 (not 255) so near-saturated pixels can pass,
and replace the hard-coded 2 px/frame fireball velocity cap with a
configurable angular velocity (fireball_max_ang_vel, default 60 deg/s)
converted to a per-sensor px/frame limit at runtime using fps and the
platepar-derived deg/pixel scale - same conversion the meteor detector
already uses. Lets the same config value transfer between cameras with
different FOV/resolution.

Tested on 133-event reference dataset (1730 FF files, 100 FR-less
stations): missed station recall 30% -> 55%, zero regressions on
existing detections (FR-positive recall 98.5% -> 99.4%).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant