Welcome to the Hackathon accompanying the 2025 Spring School on Physics Informed Machine Learning for Medical Sciences.
This repo will serve you as a starting point for solving the task described below.
To setup the environment, fork this repository (or create a new one using this repository as a template) and clone the repository.
In the new repository create a new environment and install all requirements by running the following commands:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
You are given a complex 3D object sitting inside an array of 8 dipoles, positioned radially around the object as seen in Figure 1.
Figure 1: Coil and object positions.
The domain is a simulated MRI environment with electric
Additionally, the object mask and various physical properties (electrical conductivity, magnetic permittivity and density) are also available as seen in Figure 2.
Figure 2: Example simulation with physical features and distribution of electric and magnetic fields.
When the phase and amplitude for a specific dipole
This can significantly change the overall distribution of the fields and in result, the distribution of the SAR and the
Figure 2: Example distribution of Fields, SAR and the
Your task is to optimize the phase and amplitude of the coils (coil configuration) with respect to a specified cost function (e.g.
For the purposes of this task we consider two cost functions:
Given the
This cost function maximizes the mean strength of the
Additionally, we also consider the cost function which maximizes the
Where
with
You can download the data from Google Drive
Place the data directory in the main directory of the project. It should look something like this:
project/
├── ...
├── data/
│ ├── simulations/
│ │ ├── sim1.h5
│ │ ├── sim2.h5
│ │ └── ...
│ └── antenna/
│ │ └── antenna.h5
└── ...
All teams will be asked to submit their solutions as a git repository. In the git repository the main.py should be modified (only) to include the optimization algorithm developed by the team. The evaluation.py script should not be changed at all.
Each submission will be evaluated on a previously unseen set of simulations, with both cost functions specified in the task. The optimization algorithm should run within 5 Minutes after which the program execution will timeout and the solution will be disqualified.
For the second cost function a weighting factor of
- Implement parallel processing during optimization
- Speed up the calculation of phase-shifted fields
- Run pytorch (or other DL software) to use gradient descent for local optimization
- Try out different global optimization algorithms



