Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CBICA/BrainMaGe
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakpati committed Jul 15, 2020
2 parents 2e00086 + 1b21da1 commit 8f3e5fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BrainMaGe/tester/test_ma.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def infer_ma(cfg, device, save_brain, weights):
for i in range(to_save_final.shape[2]):
if np.any(to_save_final[:, :, i]):
to_save_final[:, :, i] = binary_fill_holes(to_save_final[:, :, i])
to_save_final = getLargestCC(to_save_final)
to_save_final = getLargestCC(to_save_final).astype(np.uint8)
to_save_final_nib = nib.Nifti1Image(to_save_final,
current_patient_dict['old_affine'])

Expand Down
2 changes: 1 addition & 1 deletion BrainMaGe/tester/test_multi_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def infer_multi_4(cfg, device, save_brain, weights):
for i in range(to_save.shape[2]):
if np.any(to_save[:, :, i]):
to_save[:, :, i] = binary_fill_holes(to_save[:, :, i])
to_save = getLargestCC(to_save)
to_save = getLargestCC(to_save).astype(np.uint8)
to_save_mask = nib.Nifti1Image(to_save, patient_nib.affine)
nib.save(to_save_mask, os.path.join(params['results_dir'], patient[0],
patient[0]+'_mask.nii.gz'))
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,12 @@ python setup.py install # install dependencies and BrainMaGe
- We provide CPU (untested as of 2020/05/31) as well as GPU support.
- Running on GPU is a lot faster though and should always be preferred.
- You need an GPU memory of ~5-6GB for testing and ~8GB for training.
- Added support for hole filling and largest CCA post processing
## TO-DO
- Windows support (this currently works but needs a few work-arounds)
- Give example of skull stripping dataset
- In inference, rename ```model_dir``` to ```results_dir``` for clarity in the configuration and script(s)
- Add CCA for post-processing
- Test on CPU
- Move all dependencies to ```setup.py``` for consistency
- Put option to write logs to specific files in output directory
Expand Down

0 comments on commit 8f3e5fd

Please sign in to comment.