Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many explanatory comments to add to SynthSeg/dcan/paper/*.py scripts (from code review) #1

Open
GregConan opened this issue Feb 17, 2022 · 0 comments

Comments

@GregConan
Copy link
Member

Explanatory comments suggested to add to the Python scripts located in the SynthSeg/dcan/paper/ directory, all suggested during the code review on 2022-02-09:

In General

  • Add comments explaining each function, what the variables are, what the code is doing, etc.

Add explanatory comments to specific Python scripts

(Scripts in the SynthSeg/dcan/paper/ directory)

generate_metrics.py

  • Add comments explaining each function
  • Add comment (header?) explaining that this script is the top-level script that runs the rest of them

evaluate_results.py

  • Add comment on line 8 explaining what the evaluate_results function does
    • Especially its inputs and that it outputs numpy files
    • Explain what the rows and columns are in the output numpy files
  • Explain that gt_dir is ground truth directory
  • Explain that seg_dir is the dir for the segmentations done by the deep learning model
  • Explain that path_dice checks overlap between segmentations
  • Explain that hausdorff is a topological measure
  • Explain that range(10) on line 12 comes from 10-fold validation
  • Explain that labels_file_path is a path to FreeSurfer labels

generate_metrics_csv_files.py

  • Explain that if os.path.exists(labels_file_path) verifies that the script has been run
  • Explain the numpy rows and columns at line 19
    • Explain that (after transposition) rows are names of the .nii.gz files and columns are FreeSurfer segment file names
  • Explain that all of the labels variables are FreeSurfer labels

create_plots.py

  • Explain that this function creates a plot for each of the 5 measures
  • Explain what the function does, and its inputs and outputs
@GregConan GregConan changed the title Many explanatory comments to add to SynthSeg/dcan/paper/*.py scripts (from code review) Many explanatory comments to add to SynthSeg/dcan/paper/*.py scripts (from code review) Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant