Metadata-Version: 2.1
Name: MedReportEval
Version: 0.0.1
Summary: A brief description of your package
License: MIT
Classifier: Development Status :: 1 - Planning
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: alembic==1.11.1
Requires-Dist: allennlp==1.1.0
Requires-Dist: allennlp-models==1.1.0
Requires-Dist: attrs==23.1.0
Requires-Dist: beautifulsoup4==4.8.1
Requires-Dist: bert-score==0.3.11
Requires-Dist: bioc==2.0.post5
Requires-Dist: blis==0.7.9
Requires-Dist: bllipparser==2021.11.7
Requires-Dist: boto3==1.26.149
Requires-Dist: botocore==1.29.149
Requires-Dist: catalogue==1.0.2
Requires-Dist: certifi==2023.5.7
Requires-Dist: charset-normalizer==3.1.0
Requires-Dist: click==8.1.3
Requires-Dist: cmaes==0.9.1
Requires-Dist: colorlog==6.7.0
Requires-Dist: conllu==4.1
Requires-Dist: cycler==0.11.0
Requires-Dist: cymem==2.0.7
Requires-Dist: exceptiongroup==1.1.1
Requires-Dist: fast-bleu==0.0.90
Requires-Dist: filelock==3.0.12
Requires-Dist: fonttools==4.38.0
Requires-Dist: fsspec==2023.1.0
Requires-Dist: ftfy==6.1.1
Requires-Dist: future==0.18.3
Requires-Dist: greenlet==2.0.2
Requires-Dist: h5py==3.8.0
Requires-Dist: huggingface-hub==0.16.4
Requires-Dist: idna==3.4
Requires-Dist: importlib-metadata==6.6.0
Requires-Dist: importlib-resources==5.12.0
Requires-Dist: iniconfig==2.0.0
Requires-Dist: intervaltree==3.1.0
Requires-Dist: jmespath==1.0.1
Requires-Dist: joblib==1.2.0
Requires-Dist: jsonlines==3.1.0
Requires-Dist: jsonnet==0.20.0
Requires-Dist: jsonpickle==3.0.1
Requires-Dist: kiwisolver==1.4.4
Requires-Dist: Levenshtein==0.21.0
Requires-Dist: lxml==4.9.2
Requires-Dist: Mako==1.2.4
Requires-Dist: MarkupSafe==2.1.3
Requires-Dist: matplotlib==3.5.3
Requires-Dist: mkl-fft==1.3.1
Requires-Dist: mkl-service==2.4.0
Requires-Dist: murmurhash==1.0.9
Requires-Dist: nltk==3.8.1
Requires-Dist: numpy==1.18.2
Requires-Dist: optuna==3.2.0
Requires-Dist: overrides==3.1.0
Requires-Dist: packaging==23.1
Requires-Dist: pandas==1.0.1
Requires-Dist: pathlib==1.0.1
Requires-Dist: pathlib2==2.3.7.post1
Requires-Dist: patsy==0.5.3
Requires-Dist: Pillow==9.5.0
Requires-Dist: plac==1.1.3
Requires-Dist: pluggy==1.0.0
Requires-Dist: preshed==3.0.8
Requires-Dist: protobuf==3.20.3
Requires-Dist: py-rouge==1.1
Requires-Dist: pyparsing==3.0.9
Requires-Dist: pytest==7.3.1
Requires-Dist: python-dateutil==2.8.2
Requires-Dist: python-Levenshtein==0.21.0
Requires-Dist: pytz==2023.3
Requires-Dist: PyYAML==6.0
Requires-Dist: rapidfuzz==3.1.1
Requires-Dist: regex==2023.6.3
Requires-Dist: requests==2.31.0
Requires-Dist: s3transfer==0.6.1
Requires-Dist: sacremoses==0.0.53
Requires-Dist: safetensors==0.3.1
Requires-Dist: scikit-learn==0.22.1
Requires-Dist: scipy==1.7.3
Requires-Dist: sentencepiece==0.1.99
Requires-Dist: sortedcontainers==2.4.0
Requires-Dist: soupsieve==2.4.1
Requires-Dist: spacy==2.3.9
Requires-Dist: SQLAlchemy==2.0.15
Requires-Dist: srsly==1.0.6
Requires-Dist: statsmodels==0.13.0
Requires-Dist: tensorboardX==2.6
Requires-Dist: thinc==7.4.6
Requires-Dist: timm==0.9.2
Requires-Dist: tokenizers==0.8.0rc4
Requires-Dist: tomli==2.0.1
Requires-Dist: torch
Requires-Dist: torchaudio==0.9.0a0+33b2469
Requires-Dist: torchvision
Requires-Dist: tqdm==4.65.0
Requires-Dist: transformers==3.0.1
Requires-Dist: typing_extensions==4.6.3
Requires-Dist: urllib3==1.26.16
Requires-Dist: wasabi==0.10.1
Requires-Dist: wcwidth==0.2.6
Requires-Dist: word2number==1.1
Requires-Dist: zipp==3.15.0

### Model Preparation

Our codebase integrates CheXbert [3] for report labeling and RadGraph [4] for evaluation. Download the required model checkpoints from the [repository here](https://github.com/rajpurkarlab/CXR-Report-Metric) and place them in the `./models/` directory.

### Environment Preparation

To set up the project environment, use the following command:

```
conda env create --name=<env_name> -f cxr-green.yml
```

If you're already on DSI cluster, use the following command to activate environment:

```
conda activate /net/projects/chai-lab/miniconda3/envs/cxr-green
```

### Test Example

Here is an example how to run evaluation:

```
python test.py \
--gt_csv /net/projects/chacha/cxr_eval/test/gt_imp_sample.csv \
--gen_csv /net/projects/chacha/cxr_eval/test/gen_imp_sample_3_1.csv \
--output_metrics /net/projects/chacha/cxr_eval/results/metrics.csv \
--output_combined /net/projects/chacha/cxr_eval/results/metrics_w_green.csv \
--output_dir /net/projects/chacha/cxr_eval/results
```

### Running Notes

1. Based on our testing, we can successfully run metrics without (GREEN, BertScore, RadGraph F1) on A40 GPU. We'll continue updating requirement for environment and gpu to run (GREEN, BertScore, RadGraph F1).
2. Each input csv should contain columns **['study_id', 'report']**. Each column needs to be str and 'study_id' should not include any other characters except numbers.
3. Ensure each input csv has no empty values.

