Skip to content

Fix incorrect intensity augmentation defaults in training profiles#2647

Merged
gitttt-1234 merged 1 commit intodevelopfrom
fix/gaussian-noise-defaults
Mar 9, 2026
Merged

Fix incorrect intensity augmentation defaults in training profiles#2647
gitttt-1234 merged 1 commit intodevelopfrom
fix/gaussian-noise-defaults

Conversation

@gitttt-1234
Copy link
Copy Markdown
Collaborator

@gitttt-1234 gitttt-1234 commented Mar 9, 2026

Summary

  • Fixed legacy/inconsistent intensity augmentation default values in all 9 training profile YAML files
  • Standardized to match sleap-nn PR #485

Changes Made

Updated all training profiles in sleap/training_profiles/:

Parameter Old New Reason
gaussian_noise_mean 5.0 0.0 Zero-mean noise is standard; 5.0 × 255 = 1275 was outside uint8 range
gaussian_noise_std 1.0 0.02 1.0 × 255 = 255 was full pixel range; 0.02 × 255 ≈ 5 is subtle
uniform_noise_max 1.0 0.04 1.0 × 255 = 255 was full range; 0.04 × 255 ≈ 10 is subtle
contrast_min 0.5 0.9 Standardized to conservative range
contrast_max 2.0 1.1 Standardized to conservative range
brightness_min 0.0 0.9 0.0 would make images black; standardized
brightness_max 2.0 1.1 Standardized to conservative range

Files changed:

  • baseline.centroid.yaml
  • baseline.multi_class_bottomup.yaml
  • baseline.multi_class_topdown.yaml
  • baseline_large_rf.bottomup.yaml
  • baseline_large_rf.single.yaml
  • baseline_large_rf.topdown.yaml
  • baseline_medium_rf.bottomup.yaml
  • baseline_medium_rf.single.yaml
  • baseline_medium_rf.topdown.yaml

Technical Details

The sleap-nn augmentation code multiplies these values by 255 internally. The old values would produce unusable results if augmentations were enabled:

  • gaussian_noise_mean=5.0 → 5.0 × 255 = 1275 (completely washed out)
  • brightness_min=0.0 → completely black images
  • uniform_noise_max=1.0 → 255 pixel noise (full range)

Impact

Low - all *_p probability parameters default to 0.0, so these augmentations are disabled by default. This bug only affects users who manually enable intensity augmentations.

Testing

Related Issues

Fixes #2643


🤖 Generated with Claude Code

github-actions bot pushed a commit that referenced this pull request Mar 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

Docs Preview

Preview has been removed.

@gitttt-1234 gitttt-1234 force-pushed the fix/gaussian-noise-defaults branch from 99466f7 to 34cc3ce Compare March 9, 2026 17:05
The training profile YAML files had legacy/inconsistent values for intensity
augmentation parameters. These are now standardized to match sleap-nn PR #485.

Updated all 9 training profiles with correct normalized values:

| Parameter | Old | New |
|-----------|-----|-----|
| gaussian_noise_mean | 5.0 | 0.0 |
| gaussian_noise_std | 1.0 | 0.02 |
| uniform_noise_max | 1.0 | 0.04 |
| contrast_min | 0.5 | 0.9 |
| contrast_max | 2.0 | 1.1 |
| brightness_min | 0.0 | 0.9 |
| brightness_max | 2.0 | 1.1 |

The old values would produce unusable results if augmentations were enabled:
- gaussian_noise_mean=5.0 → 5.0*255=1275 (outside uint8 range)
- brightness_min=0.0 → completely black images

Fixes #2643

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gitttt-1234 gitttt-1234 force-pushed the fix/gaussian-noise-defaults branch from 34cc3ce to 2a31bb4 Compare March 9, 2026 17:18
@gitttt-1234 gitttt-1234 changed the title Fix incorrect gaussian_noise default values in training profiles Fix incorrect intensity augmentation defaults in training profiles Mar 9, 2026
@gitttt-1234 gitttt-1234 merged commit 960fd9f into develop Mar 9, 2026
8 checks passed
@gitttt-1234 gitttt-1234 deleted the fix/gaussian-noise-defaults branch March 9, 2026 17:26
github-actions bot added a commit that referenced this pull request Mar 9, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.54%. Comparing base (83e38a0) to head (2a31bb4).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2647   +/-   ##
========================================
  Coverage    64.54%   64.54%           
========================================
  Files           95       95           
  Lines        20223    20223           
========================================
  Hits         13053    13053           
  Misses        7170     7170           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Possible mistake in gaussian_noise values in default configs?

1 participant