Deep learning project for detecting internal ice boundaries from radar sounder data. The repository contains a PyTorch implementation that predicts two key boundaries in radargrams: the air/ice surface and the ice/bedrock bottom.
The work extends a U-Net style baseline with a Transformer encoder and a BiFusion attention module to improve spatial-context modelling for glacier radar imagery.
Radar sounder data is used in glaciology to study glacier structure and estimate ice thickness. A major challenge is automatically identifying boundary layers in noisy radargrams. This project frames the task as semantic/line segmentation and trains a neural network to predict boundary positions column-by-column.
The model outputs:
- Surface boundary: air-to-ice interface
- Bottom boundary: ice-to-bedrock interface
I worked on the implementation and experimentation pipeline for the remote sensing project, including:
- Implemented and adapted the training pipeline in PyTorch Lightning
- Extended the model from a U-Net baseline to a Transformer + BiFusion architecture
- Added dual-output prediction heads for surface and bottom boundary estimation
- Designed custom loss logic with class loss, label smoothing, and distance-aware loss
- Built evaluation scripts for MAE, MME, AP-1%, and AP-5%
- Added per-flight evaluation for Perito Moreno, James Ross, and Viedma glacier data
- Prepared HPC/cluster training workflow and model checkpoint handling
The main architecture is implemented in TransUNet_BiFusion.py.
High-level flow:
Radargram input
-> CNN encoder with residual blocks
-> ASPP-style dilated convolution block
-> Transformer encoder for global spatial context
-> BiFusion attention module
-> Decoder
-> Two prediction heads: surface and bedrock boundary
Key components:
UNet.py: baseline U-Net modelTransUNet_BiFusion.py: Transformer + BiFusion extensionTrainer.py: training loop, loss, validation metrics, checkpoint savingevaluate_model.py: final and per-flight evaluationDataloaderHelpers/: dataset loading, preprocessing, augmentation, and batching
The evaluation reports boundary-detection performance using pixel error and depth-scaled error metrics.
Metrics used:
- MAE: mean absolute boundary error in resized image coordinates
- MME: depth-scaled mean metric error
- AP-1%: percentage of predictions within 1% image-height tolerance
- AP-5%: percentage of predictions within 5% image-height tolerance
The original radar datasets and trained model weights are not included in this repository because they are large research artifacts. They are intentionally excluded through .gitignore.
Ignored artifacts include:
IceAnatomy/*.h5*.pth*.ckptlightning_logs/
To reproduce training, place the dataset under the expected IceAnatomy/ structure and update the paths in Config/Dataloader/Fau.yaml if needed.
.
|-- Config/
| `-- Dataloader/ # Dataset configuration files
|-- DataloaderHelpers/ # Dataset loading, transforms, augmentations
|-- Model/ # Utility functions for config-based object loading
|-- Paper/ # Final project paper
|-- docs/results/ # Evaluation screenshots for README
|-- TransUNet_BiFusion.py # Main Transformer + BiFusion model
|-- UNet.py # Baseline U-Net model
|-- Trainer.py # Training entry point
|-- Trainer_Updated.py # Alternate/updated trainer version
|-- evaluate_model.py # Evaluation entry point
|-- hpcStartRun.sh # HPC/cluster run script template
`-- requirements.txt
Create an environment and install the main dependencies:
pip install -r requirements.txtThis project was developed for GPU training with PyTorch and PyTorch Lightning. CUDA installation may vary depending on the machine or cluster environment.
After placing the dataset in the expected directory structure:
python Trainer.pyFor cluster/HPC runs, adapt the placeholders in:
hpcStartRun.shAfter training and placing the desired checkpoint/weight file in the project root:
python evaluate_model.pyThe script reports overall and per-flight metrics for surface and bottom boundary prediction.
- Python
- PyTorch
- PyTorch Lightning
- TorchVision
- NumPy
- OpenCV
- Kornia
- HDF5/radar data processing
- HPC/SLURM workflow
This repository is a cleaned and recruiter-readable version of the academic remote sensing project work. Large datasets and model weights are excluded, while the implementation, model architecture, training code, evaluation code, and final paper are included.

