Skip to content

Commit b928069

Browse files
committed
add download script and instructions
1 parent d1a8890 commit b928069

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

federated_learning/breast_density_challenge/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ We provide a minimal example of how to implement Federated Averaging using [NVFl
1515
### 1.1 Download example data
1616
Follow the steps described in [./data/README.md](./data/README.md) to download an example breast density mammography dataset.
1717
Note, the data used in the actual challenge will be different. We do however follow the same preprocessing steps and
18-
use the same four BI-RADS breast density classes for prediction.
18+
use the same four BI-RADS breast density classes for prediction, See [./code/pt/utils/preprocess_dicomdir.py](./code/pt/utils/preprocess_dicomdir.py) for details.
1919

20-
We provide a set of random data splits as `./data/dataset_blinded_site-*.json` which follows the same format as what
21-
will be used in the challenge. Please do not modify the data list filenames in the configs as they will be the same during the challenge.
20+
We provide a set of random data splits. Please download them using
21+
```
22+
python3 ./code/pt/utils/download_datalists_and_predictions.py
23+
```
24+
After download, they will be available as `./data/dataset_blinded_site-*.json` which follows the same format as what
25+
will be used in the challenge.
26+
Please do not modify the data list filenames in the configs as they will be the same during the challenge.
2227

2328
Note, the location of the dataset and data lists will be given by the system.
2429
Do not change the locations given in [config_fed_client.json](./code/configs/mammo_fedavg/config/config_fed_client.json):
@@ -135,7 +140,8 @@ Your FL framework will also need those ports for implementing the communication.
135140

136141
### 3.5 Results
137142
Results will need to be written to `/result/predictions.json`.
138-
Please follow the format produced by the reference implementation at [./result_server/predictions.json](./result_server/predictions.json)
143+
Please follow the format produced by the reference implementation at [./result_server_example/predictions.json](./result_server_example/predictions.json)
144+
(available after running `python3 ./code/pt/utils/download_datalists_and_predictions.py`)
139145
The code is expected to return a json file containing at least list of image names and prediction probabilities for each breast density class
140146
for the global model (should be named `SRV_best_FL_global_model.pt`).
141147
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2022 MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
from monai.apps.utils import download_url, download_and_extract
13+
14+
15+
download_and_extract(url="https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/dataset_lists.zip", output_dir="./data")
16+
download_url(url="https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/predictions.json", filepath="./result_server_example/predictions.json")

0 commit comments

Comments
 (0)