Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPPR

This repo provides the code related to the paper titled "BPPR: A Framework for Content Navigation in Multi-Contrast Body CT Images using Deep Regression Models".

Usage

(1) Clone this repo and install the requirements.txt (python >= 3.10).

(2) Create a folder named checkpoints inside the repo, download model checkpoints bpr_model.pth and epr_model.pth from https://drive.google.com/drive/folders/1hDUEp47wdzPDElf7bVHQNoHyYFqeLmTL?usp=sharing and place them in the checkpoints folder.

(3) Prepare the test body CT image in nifti format.

(4) Use the following command to perform inference:

python inference_args.py \
    --input_path /path/to/image.nii.gz \
    --output_path /path/to/output_folder \
    --case_name case_name \
    --device cpu
Argument Description
--input_path Full path to the input body CT image in nifti format.
--output_path Folder where the results are saved.
--case_name Name used to identify the case in the outputs.
--device cpu or cuda.

Output

(1) A png visually illustrating the prediction results.

(2) A json containing the scores for each axial slice and the phase for both slice and volume. The volume phase label is inferred from the slice phase labels using the positional weighting mechanism explained in the paper. The json contains the fields scores, phase_label, x1x2 and pred_x1x2:

{
  "scores": [1.5509, 1.5229, 1.5083, "...", -1.5172, -1.5237],
  "phase_label": 0,
  "pred_x1x2": [-0.1390, 0.9903],
  "x1x2": [[0.3788, -0.4238], [0.3814, -0.4120], "...", [-0.2020, 1.5327]].
}
  • scores: the body part regression score of each axial slice, ordered along the slice axis of the input volume. See Body part score below.
  • phase_label: descrete phase label of the whole volume.
  • pred_x1x2: continuous phase label of the whole volume.
  • x1x2: continuous phase label of each slice, from which the pred_x1x2 and phase_label is derived using positional weighting mechanism.

Body part score

The score is a continuous coordinate describing the longitudinal position of an axial slice within the body. It is defined by seven anatomical landmarks, which are assigned fixed reference scores spanning the range from the head to the femur:

ks_label
# Landmark Definition Score
1 Head end Base of the skull -1
2 Neck end Slice at the C7 cervical vertebra -0.64
3 Aorta arc Slice through the center of the aortic arch -0.42
4 Liver start Apex of the dome of the liver -0.04
5 Pancreas mid Middle slice of the pancreas 0.21
6 Kidney end Most inferior slice of the kidney 0.53
7 Femur end Most superior slice of the femur ball 1

The score therefore increases from the head towards the feet, and the spacing between the reference values reflects the relative anatomical distance between the landmarks. The predicted scores for slices between two landmarks vary continuously between the corresponding reference values, so a score can be read directly as a body region, and slices from different volumes can be matched by comparing their scores. Slices lying beyond the first or the last landmark can be assigned scores outside the [-1, 1] range.

Phase label

The phase_label field encodes the contrast enhancement phase of the volume:

Value Phase
0 Non-contrast
1 Arterial phase
2 Portal venous phase
3 Delayed phase

About

Body-part-phase-regression

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages