Skip to content

update detection readme #1063

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

Merged
merged 11 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ MONAI detection implementation is based on the following papers:

### 1. Data

The dataset we are experimenting in this example is LUNA16 (https://luna16.grand-challenge.org/Home/), which is based on [LIDC/IDRI database](https://wiki.cancerimagingarchive.net/display/Public/LIDC-IDRI) [1,2,3].
The dataset we are experimenting in this example is LUNA16 (https://luna16.grand-challenge.org/Home/), which is based on [LIDC/IDRI database](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=1966254) [1,2,3].

LUNA16 is a public dataset of CT lung nodule detection. Using raw CT scans, the goal is to identify locations of possible nodules, and to assign a probability for being a nodule to each location.

Users can either download mhd/raw data from [LUNA16](https://luna16.grand-challenge.org/Home/), or DICOM data from [LIDC-IDRI](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=1966254).

Disclaimer: We are not the host of the data. Please make sure to read the requirements and usage policies of the data and give credit to the authors of the dataset! We acknowledge the National Cancer Institute and the Foundation for the National Institutes of Health, and their critical role in the creation of the free publicly available LIDC/IDRI Database used in this study.

We follow the official 10-fold data splitting from LUNA16 challenge and generate data split json files using the script from [nnDetection](https://github.com/MIC-DKFZ/nnDetection/blob/main/projects/Task016_Luna/scripts/prepare.py).
Expand All @@ -35,6 +33,10 @@ In these files, the values of "box" are the ground truth boxes in world coordina

### 3. Run the example
#### [3.1 Prepare Your Data](./luna16_prepare_images.py)
We provide [resampled Nifti images](https://drive.google.com/drive/folders/1JozrufA1VIZWJIc5A1EMV3J4CNCYovKK?usp=share_link) for users to download (recommended).
If you do this, please skip Sec. 3.1 and go directly to Sec. 3.2.

Alternatively, users can download the original data and resample them with the following steps. Users can either download 1) mhd/raw data from [LUNA16](https://luna16.grand-challenge.org/Home/) or its [copy](https://drive.google.com/drive/folders/1-enN4eNEnKmjltevKg3W2V-Aj0nriQWE?usp=share_link), or 2) DICOM data from [LIDC-IDRI](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=1966254) with [NBIA Data Retriever](https://wiki.cancerimagingarchive.net/display/NBIA/Downloading+TCIA+Images).

The raw CT images in LUNA16 have various of voxel sizes. The first step is to resample them to the same voxel size, which is defined in the value of "spacing" in [./config/config_train_luna16_16g.json](./config/config_train_luna16_16g.json).

Expand All @@ -51,9 +53,11 @@ If you downloaded DICOM data, please resample the images by running
python3 luna16_prepare_env_files.py
python3 luna16_prepare_images_dicom.py -c ./config/config_train_luna16_16g.json
```
Note that for DICOM data, the data split json files are based on data downloaded with [NBIA Data Retriever](https://wiki.cancerimagingarchive.net/display/NBIA/Downloading+TCIA+Images).

The resampled images will be with Nifti format.


#### [3.2 3D Detection Training](./luna16_training.py)

The LUNA16 dataset was splitted into 10-fold to run cross-fold training and inference.
Expand Down Expand Up @@ -96,7 +100,7 @@ python3 luna16_testing.py \

#### [3.4 LUNA16 Detection Evaluation](./run_luna16_offical_eval.sh)
Please download the official LUNA16 evaluation scripts from https://luna16.grand-challenge.org/Evaluation/,
and save it as ./evaluation_luna16
and save it as ./evaluation_luna16. Note that the official LUNA16 evaluation scripts are based on Python2.

./evaluation_luna16/noduleCADEvaluationLUNA16.py will be the main python script to generate evaluation scores.

Expand Down
2 changes: 1 addition & 1 deletion detection/run_luna16_offical_eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ python ./luna16_post_combine_cross_fold_results.py \
-o ./result/result_luna16_all.csv

mkdir -p ./result/eval_luna16_scores
python ./evaluation_luna16/noduleCADEvaluationLUNA16.py \
python2 ./evaluation_luna16/noduleCADEvaluationLUNA16.py \
./evaluation_luna16/annotations/annotations.csv \
./evaluation_luna16/annotations/annotations_excluded.csv \
./evaluation_luna16/annotations/seriesuids.csv \
Expand Down