Pre-op FL Study

This is the documentation for the Federated Learning Study conducted for pre-operative gliomas.

Home
Application Setup
Process the Data
Run the Application
Extras
ITCR Connectivity

Running the Application

Note the ${fets_root_dir} from Setup.

Table of Contents

Application Path

cd ${download_location}
${fets_root_dir}/bin/FeTS # launches application

Please add the following path to your LD_LIBRARY_PATH when using FeTS: ${fets_root_dir}/lib:

export LD_LIBRARY_PATH=${fets_root_dir}/lib:$LD_LIBRARY_PATH

Back To Top ↑

Inference

Inference using BraTS-winning algorithms

${fets_root_dir}/bin/FeTS_CLI_Segment -d /path/to/output/DataForFeTS \ # data directory after invoking ${fets_root_dir}/bin/PrepareDataset
  -a deepMedic,nnunet,deepscan,fets_singlet,fets_triplet \ # all pre-trained models currently available in FeTS see notes below for more details
  -lF STAPLE,ITKVoting,SIMPLE,MajorityVoting \ # if a single architecture is used, this parameter is ignored
  -g 1 \ # '0': cpu, '1': request gpu
  -t 0 # '0': inference mode, '1': training mode

The aforementioned command will perform the following steps:

Back To Top ↑

Inference using the FeTS Consensus Models

${fets_root_dir}/bin/FeTS_CLI_Segment -d /path/to/output/DataForFeTS \ # data directory after invoking ${fets_root_dir}/bin/PrepareDataset
  -a fets_singlet,fets_triplet \ # can be used with all pre-trained models currently available in FeTS
  -lF STAPLE,ITKVoting,SIMPLE,MajorityVoting \ # if a single architecture is used, this parameter is ignored
  -g 1 \ # '0': cpu, '1': request gpu
  -t 0 # '0': inference mode, '1': training mode

The aforementioned command will run inference using the FeTS Consensus models (both singlet and triplet) for the data directory specified by -d. The output will be placed in the directory specified by -o.

Back To Top ↑

Manual Corrections

Back To Top ↑

Sanity Check

Before starting final training, please run the following command to ensure the input dataset is as expected:

cd ${fets_root_dir}/bin
./OpenFederatedLearning/venv/bin/python ./SanityCheck.py \
  -inputDir /path/to/output/DataForFeTS \
  -outputFile /path/to/output/sanity_output.csv

Note: If you are running FeTS version 0.0.2 (you can check version using FeTS_CLI --version), please do the following to get the SanityChecker for your installation:

cd ${fets_root_dir}/bin
wget https://raw.githubusercontent.com/FETS-AI/Front-End/master/src/applications/SanityCheck.py

Phase-2 Intensity Check

During discussions with some of the collaborating sites, we note negative values randomly coming up in the pre-processed scans. To identify these cases, we have now put together an additional script to assess all pre-processed images for the negative values and provide relevant statistics. This can be run in the following manner:


cd ${fets_root_dir}/bin
wget https://raw.githubusercontent.com/FETS-AI/Front-End/master/src/applications/Phase2_IntensityCheck.py
./OpenFederatedLearning/venv/bin/python ./Phase2_IntensityCheck.py \
  -inputDir /path/to/output/DataForFeTS \
  -outputFile /path/to/output/intensity_check.csv

If /path/to/output/intensity_check.csv doesn’t get generated, that means the dataset is completely fine, otherwise, please send the file to admin@fets.ai for debugging.

Back To Top ↑

Training

Ensure Sanity Checking Is Done

Proceed to training once sanity check (↑) is successfully finished.

Transfer Certificates

If you have a signed certificate from a previous installation, ensure they are copied before trying to train:

cd ${fets_root_dir}/bin/
cp -r ${fets_root_dir_old}/bin/OpenFederatedLearning/bin/federations/pki/client ./OpenFederatedLearning/bin/federations/pki

Start Training

${fets_root_dir}/bin/FeTS_CLI -d /path/to/output/DataForFeTS \ # input data, ensure "final_seg" is present for each subject
  -c ${collaborator_common_name} \ # common collaborator name created during setup
  -g 1 -t 1 # request gpu and enable training mode

The aforementioned command will perform the following steps:

Back To Top ↑


Next: Contact FeTS Admin