This repository is in an active migration to a src-centered layout.
- Active development happens under
src/ - The stable area in this iteration is Dask-backed lazy TIFF reading
scripts/contains legacy code from earlier experiments and is not the active entrypoint- Pipeline, segmentation, registration, and georeferencing modules remain under construction
See docs/migration_status.md for the current migration notes.
The reference implementation for lazy frame loading lives in src.utils.image.dask_io.
Public entrypoints:
src.utils.imread_lazysrc.utils.imread_lazy_with_paths
Current behavior contract:
- accepts a directory, glob pattern, single file path, or explicit list of paths
- raises
FileNotFoundErrorwhen no TIFF files are resolved - returns a Dask array shaped
(n_frames, height, width) - uses one chunk per frame
- sorts files deterministically by default
- validates that all frames share the same shape and dtype
Example:
from src.utils import imread_lazy, imread_lazy_with_paths
stack = imread_lazy("data/input_frames/AerialData_GeoModule/ImageFrames/")
frame_0 = stack[0].compute()
batch = stack[10:20].compute()
stack_with_paths, paths = imread_lazy_with_paths(
"data/input_frames/AerialData_GeoModule/ImageFrames/"
).
├── data/ # Input, metadata, and processed outputs
├── docs/ # Project and migration documentation
├── requirements/ # Dependency inputs and compiled lock file
├── scripts/ # Legacy scripts kept for reference only
├── src/
│ ├── algorithms/ # Target home for the new processing pipeline
│ ├── utils/ # Shared utilities, including lazy Dask I/O
│ └── validation/ # Validation hooks and metrics
└── tests/ # Automated tests
The intended end state is a modular processing pipeline with:
- band segmentation
- inter-frame registration
- mosaic generation
- georeferencing
src.utils.image.dask_iois implemented and testedsrc.algorithms.pipelinedefines the intended orchestration surface- pipeline step classes in
src.algorithms.pipeline.steps.image_processingare placeholders - algorithm modules may contain duplicated or transitional code while the migration continues
The pipeline example below is illustrative of the target API, not a production-ready workflow in the current revision.
from src.algorithms.pipeline import (
Pipeline,
BandSegmentationStep,
InterFrameRegistrationStep,
MosaicGenerationStep,
)
pipeline = Pipeline("image_processing")
pipeline.add_step(BandSegmentationStep())
pipeline.add_step(InterFrameRegistrationStep())
pipeline.add_step(MosaicGenerationStep())
pipeline.set_config(
{
"band_count": 5,
"registration_method": "feature_based",
"mosaic_overlap": 0.3,
}
)
result = pipeline.run(input_data)At the moment the step implementations are placeholders and should not be treated as complete processing features.
Docker remains the expected local environment.
docker compose build
docker compose run --rm app bashUseful commands inside the environment:
pytest tests/test_dask_io.py
pytest -m dask
make testFiles under scripts/ are retained for historical reference during the migration. They may contain useful ideas or code to port later, but they are not the source of truth for the current architecture.