BiaHub Registration & Stabilization Refactoring#162
BiaHub Registration & Stabilization Refactoring#162tayllatheodoro wants to merge 46 commits intomainfrom
Conversation
|
Hi @tayllatheodoro thanks for writing this plan. One important addition to the testing strategy is to include real data in the testing loop. I suggest 5 crops from DynaCell and Neuromast movies (about the size of few cells) that need stabilization and registration, and automating tests. The automation can be via pytest or via a script. The initial evaluation can be done with human-in-the-loop where the code generates 5 movies before/after correction and plays them for you to quickly see if the code refactor or algorithmic changes are affecting the stabilization and registration. See an example of similar (not the same) strategy for testing widgets here: https://github.com/mehta-lab/waveorder/blob/main/tests/widget_tests/test_sample_contributions.py#L1 |
BiaHub Registration & Stabilization Refactoring Plan
Issue: #89
Continue work after: #98
Current Problems Identified
estimate-registration,optimize-registration,register,estimate-stabilization,stabilize)Proposed Architecture
1. Core Abstraction: Unified Transformation Engine
Create a shared
Transformsystem that handles both registration and stabilization.2. Implementation Strategy
Phase 1: Create Core Transform Engine
TransformEnginebase class with shared algorithmsTransformdata structures for parameter representationPhase 2: Refactor Registration
TransformEngineEstimator,Optimizer,Applicatorbiahub registrationCLI commandsPhase 3: Refactor Stabilization
TransformEnginebiahub stabilizationCLI commandsPhase 4: Migration & Cleanup
5. Configuration Unification
Create a unified configuration schema that works for:
6. Benefits of This Refactoring
7. Backward Compatibility Strategy
8. Success Metrics
Implementation Priority
TransformEngineand shared algorithmsThis refactoring will significantly improve code maintainability while providing a clearer, more powerful interface for users performing image registration and stabilization tasks.