Fix incorrect intensity augmentation defaults in training profiles#2647
Merged
gitttt-1234 merged 1 commit intodevelopfrom Mar 9, 2026
Merged
Fix incorrect intensity augmentation defaults in training profiles#2647gitttt-1234 merged 1 commit intodevelopfrom
gitttt-1234 merged 1 commit intodevelopfrom
Conversation
Contributor
Docs PreviewPreview has been removed. |
99466f7 to
34cc3ce
Compare
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>
34cc3ce to
2a31bb4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes Made
Updated all training profiles in
sleap/training_profiles/:gaussian_noise_meangaussian_noise_stduniform_noise_maxcontrast_mincontrast_maxbrightness_minbrightness_maxFiles changed:
baseline.centroid.yamlbaseline.multi_class_bottomup.yamlbaseline.multi_class_topdown.yamlbaseline_large_rf.bottomup.yamlbaseline_large_rf.single.yamlbaseline_large_rf.topdown.yamlbaseline_medium_rf.bottomup.yamlbaseline_medium_rf.single.yamlbaseline_medium_rf.topdown.yamlTechnical 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 imagesuniform_noise_max=1.0→ 255 pixel noise (full range)Impact
Low - all
*_pprobability parameters default to0.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