DRAGON Preprocessing
This repository contains the preprocessing scripts for the DRAGON challenge.
If you are using this codebase or some part of it, please cite the following article: PENDING
BibTeX:
PENDING
Installation
dragon_prep can be pip-installed:
pip install dragon_prep
Alternatively, it can be installed from source:
git clone https://github.com/DIAGNijmegen/dragon_prep
cd dragon_prep
pip install -e .
The Docker can be built after cloning the repository. The anonymisation code is not included due to privacy concerns, so you have to uncomment copying and installing the diag-radiology-report-anonymizer. The unmodified version is included to reflect the exact code used to prepare the DRAGON challenge resources.
git clone https://github.com/DIAGNijmegen/dragon_prep
cd dragon_prep
nano Dockerfile # uncomment copying and installing the diag-radiology-report-anonymizer
./build.sh
If ran successfully, this results in the Docker container named dragon_prep:latest.
Resources
The preprocessing scripts for the synthetic datasets can be found in src/dragon_prep and are the script called Task1xx_Example_yy.py. The preprocessing scripts for the datasets used in the test leaderboard for the DRAGON challenge can be found in src/dragon_prep and are the script called Task0xx_yy.py. The datasets for the validation leaderboard are derived from the development data, using the src/dragon_prep/make_debug_splits.py script. For the DRAGON challenge, all datasets were preprocessed using the preprocess.sh script.
Usage
The synthetic datasets can be generated with any number of samples.
After installing the dragon_prep module:
python src/dragon_prep/Task101_Example_sl_bin_clf.py \
--output_dir=./output \
--num_examples={set any number you like}
Or, using the Docker container:
docker run --rm -it \
-v /path/to/store/data:/output \
dragon_prep:latest python /opt/app/dragon_prep/src/dragon_prep/Task101_Example_sl_bin_clf.py \
--num_examples={set any number you like}
# ... same for Task102_Example_sl_mc_clf.py, Task104_Example_ml_bin_clf.py, Task105_Example_ml_mc_clf.py, Task106_Example_sl_reg.py, Task107_Example_ml_reg.py, Task108_Example_sl_ner.py, Task109_Example_ml_ner.py
# for Task103_Example_mednli.py, setting the number of examples is not supported
The preprocessing scripts for the tasks in the DRAGON benchmark are included for transparancy and to provide building blocks to process your own data. To run the end-to-end script using your own data, you can turn off the anonymisation functionality:
prepare_for_anon(df=df, output_dir=output_dir, task_name=task_name, tag_phi=False, apply_hips=False)
Managed By
Diagnostic Image Analysis Group, Radboud University Medical Center, Nijmegen, The Netherlands
Contact Information
Joeran Bosma: Joeran.Bosma@radboudumc.nl
Metadata
Release files for dragon-prep 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dragon_prep-0.2.9.tar.gz | 54.5 kB | Without provenance | Details for dragon_prep-0.2.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dragon_prep-0.2.9-py3-none-any.whl | Python 3 | none | any | Details for dragon_prep-0.2.9-py3-none-any.whl |
Total release size: 168.3 kB
Release files / dragon_prep-0.2.9.tar.gz
| Download URL | dragon_prep-0.2.9.tar.gz |
|---|---|
| Size | 54.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d4e8d9d7987a288187429decea02dd8e4d1fbb6fd5355a8e5d3d858ba2234e1
|
|
BLAKE2b-256 checksum How to use checksums |
e7ba1ae05136bc87f2e79aa1ac0e97093ad53d87e03d2974ccbf7e2e750dc83f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Release files / dragon_prep-0.2.9-py3-none-any.whl
| Download URL | dragon_prep-0.2.9-py3-none-any.whl |
|---|---|
| Size | 113.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e55b8be6277bf565d668c2ef5b6f8800a5a5c59d8ad5e655e254d8b636dfbfe3
|
|
BLAKE2b-256 checksum How to use checksums |
25d3fe8210de293b44121032d7b66e4b1f30ac6e8c8829a3496c9a61a6f83005
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Security for dragon-prep 0.2.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.