Skip to content

patologiivest/GlomExtractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GlomExtractor

Implementation of the methods described in "GlomExtractor: a versatile tool for extracting glomerular patches from whole slide kidney biospy images"

Figure 1: Workflow illustration of the code

To run the code

Create the env

conda env create -f src/environment.yml

Run

python main "../INPUT/"

Folder Structure

Dataset mode (-d):

INPUT/
    Images/
        <slide files or images>
    Annotations/
        <annotation files with same stem as image>

Example: >>INPUT/Images/case_001.svs >> >>INPUT/Annotations/case_001.json

Single file mode (-f)

Example: INPUT/Images/case_001.svs >> The code will look for any matching annotation: >> >>INPUT/Annotations/case_001.*

Command-line options

Paths and output

  • path (positional): Dataset folder (contains Images/ + Annotations/) or a single slide/image path.
  • -o, --out_folder: Output root folder.
    Default: ../OUTPUT/

Export settings

  • -w, --patch_size: Patch width in pixels used for extraction (and for white/blur metrics).
    Default: 1000
  • --out_size: Size of exported PNGs (images/masks/markups).
    Default: 224
  • --no_masks: Disable saving masks (masks are ON by default).
  • --no_markups: Disable saving markups (markups are ON by default).

CSV

  • --no_csv: Disable saving annotations_full.csv (CSV is ON by default).

Filtering thresholds (used for the Filtered* output folders)

  • --min_area: FilteredSmall keeps area >= min_area.
    Default: 20000
  • --max_area: FilteredLarge keeps area <= max_area.
    Default: 1200000
  • --max_white: FilteredWhite keeps percWhite <= max_white.
    Default: 0.75
  • --min_lap: FilteredBlur keeps LaplacianVariance >= min_lap.
    Default: 400
  • --min_circ_q: FilteredCircularity keeps circularity >= quantile(min_circ_q) computed from the full dataset.
    Default: 0.10
  • --min_ch_q: FilteredCHmetric keeps chMetric >= quantile(min_ch_q) computed from the full dataset.
    Default: 0.10

License

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

About

Implementation of the methods described in "GlomExtractor: a versatile tool for extracting glomerular patches from whole slide kidney biospy images"

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages