Python library for cloud masking optimized for CUDA MPS and CPU.
- Package manager: uv
- Formatter: ruff
- Testing: pytest
uv run pytest tests/- Run test suiteruff format .- Format coderuff check .- Lint code
- Use type hints for all functions and methods
- Follow ruff formatting standards
- PyTorch: https://pytorch.org/docs/stable/index.html
- Rasterio: https://rasterio.readthedocs.io/en/stable/
- segmentation-models-pytorch: https://segmentation-modelspytorch.readthedocs.io/en/latest/
- timm: https://pprp.github.io/timm/
- uv: https://docs.astral.sh/uv/
- ruff: https://docs.astral.sh/ruff/
- pytest: https://docs.pytest.org/en/stable/
- User handles git management (no commits/pushes unless requested)
- Batch multiple independent bash commands in parallel to reduce token usage
- Test changes only if requested
When profiling with cProfile, thread lock acquisition time (e.g., 8s spent in _thread.lock.acquire()) represents actual GPU inference work, not overhead. The threading pattern is:
- Main thread loads scene N
- Spawns background thread running
coordinator()(GPU inference) - Immediately continues to load scene N+1
- Eventually joins background threads to complete
The "waiting" time seen in profilers is the GPU actively processing in background threads. This is efficient pipeline parallelism, not wasted overhead.