DeepRF is an AI-powered RF pulse design framework which utilizes the self-learning characteristics
of deep reinforcement learning (DRL) to generate a novel RF pulse.
For more details, see preprint.
At least one NVIDIA GPU is needed, which supporting CUDA 10.2. Computing environment in which we tested the code is as follows.
To install all Python packages to run DeepRF,
conda env create --name your_environment_name --file ./pkgs/pkgs.yml
or
conda create --name your_environment_name --file ./pkgs/pkgs.txt
The installation time depends on internet speed but usually takes within an hour.
git clone https://gitfront.io/r/user-4833002/1be179452bed1e48e1048c7fd71b4fd83293983c/DeepRF/
We provide shell scripts and MATLAB scripts in the folder 'demo'
for the demonstration of an RF pulse design using DeepRF.
After running these scripts, a slice-selective excitation pulse will be designed,
and the analysis result will be displayed
(see Fig. 2 and Supplementary Fig. 5 in the paper).
To run the demo, first, activate an Anaconda environment and type:
cd demo
./1_exc_generation.sh
This shell script is to run the RF generation module (see METHODS in the paper).
The execution time was less than 30 minutes per DRL run,
and the total time was 23 hours.
If the .sh file is not executable, use following command.
chmod +x 1_exc_generation.sh
Second, run MATLAB script '2_exc_seed_rf.m' using MATLAB.
Third, execute the other shell script using following command:
./3_exc_refinement.sh
This shell script is to run the RF refinement module (see METHODS). The execution time was roughly 17 hours. If available size of GPU memory is not enough, the execution reports out-of-memory error. Then, open the shell script and modify the following line:
python ../envs/refinement.py --tag "exc_refinement" --env "Exc-v51" --gpu "0" --samples 256 --preset "../logs/exc_generation/seed_rfs.mat"
Decrease the argument value of '--samples', for example, as 64. However, this may lead to degraded design result than the result shown in the paper.
Finally, to analyze the design result, run '4_exc_plot_result.m' using MATLAB. You can see the pulse shapes and slice profiles of the DeepRF-designed pulse and corresponding SLR RF pulse.
To design your own RF pulse using DeepRF,
DeepRF was implemented by modifying the python code from Niraj Amalkanti.
We provide software for academic research purpose only and NOT for commercial or clinical use.
For commercial use of our software, contact us (snu.list.software@gmail.com) for licensing
via Seoul National University.
Please email to “snu.list.software@gmail.com” with the following information.
Name:
Affiliation:
Software:
When sending an email, an academic e-mail address (e.g. .edu, .ac.) is required.
Dongmyung Shin, Ph.D. candidate, Seoul National University.
shinsae11@gmail.com
http://list.snu.ac.kr