diff --git a/LLAVA_Biovil/.dockerignore b/LLAVA_Biovil/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..e98058ee30350a2be1da90c47bf2f335ec21457b --- /dev/null +++ b/LLAVA_Biovil/.dockerignore @@ -0,0 +1,21 @@ +# The .dockerignore file excludes files from the container build process. +# +# https://docs.docker.com/engine/reference/builder/#dockerignore-file + +# Exclude Git files +.git +.github +.gitignore + +# Exclude Python cache files +__pycache__ +.mypy_cache +.pytest_cache +.ruff_cache + +# Exclude Python virtual environment +/venv + +# Exclude some weights +/openai +/liuhaotian diff --git a/LLAVA_Biovil/.editorconfig b/LLAVA_Biovil/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..d99a490bee397f969e93faa0c083b69674435ee8 --- /dev/null +++ b/LLAVA_Biovil/.editorconfig @@ -0,0 +1,18 @@ +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +# 4 space indentation +[*.{py,json}] +indent_style = space +indent_size = 4 + +# 2 space indentation +[*.{md,sh,yaml,yml}] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/LLAVA_Biovil/.gitattributes b/LLAVA_Biovil/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..5462cde720b76950382f4f83eb14d08ac438edaa --- /dev/null +++ b/LLAVA_Biovil/.gitattributes @@ -0,0 +1,29 @@ +# https://git-scm.com/docs/gitattributes + +# Set the default behavior, in case people don't have core.autocrlf set. +# https://git-scm.com/docs/gitattributes#_end_of_line_conversion +* text=auto + +# common python attributes, taken from https://github.com/alexkaratarakis/gitattributes/blob/710900479a2bedeec7003d381719521ffbb18bf8/Python.gitattributes +# Source files +# ============ +*.pxd text diff=python +*.py text diff=python +*.py3 text diff=python +*.pyw text diff=python +*.pyx text diff=python +*.pyz text diff=python +*.pyi text diff=python + +# Binary files +# ============ +*.db binary +*.p binary +*.pkl binary +*.pickle binary +*.pyc binary export-ignore +*.pyo binary export-ignore +*.pyd binary + +# Jupyter notebook +*.ipynb text eol=lf diff --git a/LLAVA_Biovil/.gitignore b/LLAVA_Biovil/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a258400f7b3d5748d0725321466a3c42eac1cc8f --- /dev/null +++ b/LLAVA_Biovil/.gitignore @@ -0,0 +1,35 @@ +# Python +__pycache__ +*.pyc +*.egg-info +dist + +# Log +*.log +*.log.* +*.json +*.jsonl + +# Data +!**/alpaca-data-conversation.json + +# Editor +../.idea +*.swp + +# Other +.DS_Store +wandb +output + +checkpoints +ckpts* + +.ipynb_checkpoints +*.ipynb + +# DevContainer +!.devcontainer/* + +# Demo +serve_images/ diff --git a/LLAVA_Biovil/LICENSE b/LLAVA_Biovil/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 --- /dev/null +++ b/LLAVA_Biovil/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/LLAVA_Biovil/README.md b/LLAVA_Biovil/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7ccfa0ad260631837b92d81bac90bb290fb07891 --- /dev/null +++ b/LLAVA_Biovil/README.md @@ -0,0 +1,410 @@ +# 🌋 LLaVA: Large Language and Vision Assistant + +*Visual instruction tuning towards large language and vision models with GPT-4 level capabilities.* + +[[Project Page](https://llava-vl.github.io/)] [[Demo](https://llava.hliu.cc/)] [[Data](https://github.com/haotian-liu/LLaVA/blob/main/docs/Data.md)] [[Model Zoo](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md)] + +🤝Community Contributions: [[llama.cpp](https://github.com/ggerganov/llama.cpp/pull/3436)] [[Colab](https://github.com/camenduru/LLaVA-colab)] [[🤗Space](https://huggingface.co/spaces/badayvedat/LLaVA)] [[Replicate](https://replicate.com/yorickvp/llava-13b)] [[AutoGen](https://github.com/microsoft/autogen/blob/main/notebook/agentchat_lmm_llava.ipynb)] [[BakLLaVA (LLaVA with Mistral-7B)](https://github.com/SkunkworksAI/BakLLaVA)] + +**Improved Baselines with Visual Instruction Tuning** [[Paper](https://arxiv.org/abs/2310.03744)]
+[Haotian Liu](https://hliu.cc), [Chunyuan Li](https://chunyuan.li/), [Yuheng Li](https://yuheng-li.github.io/), [Yong Jae Lee](https://pages.cs.wisc.edu/~yongjaelee/) + +**Visual Instruction Tuning** (NeurIPS 2023, **Oral**) [[Paper](https://arxiv.org/abs/2304.08485)]
+[Haotian Liu*](https://hliu.cc), [Chunyuan Li*](https://chunyuan.li/), [Qingyang Wu](https://scholar.google.ca/citations?user=HDiw-TsAAAAJ&hl=en/), [Yong Jae Lee](https://pages.cs.wisc.edu/~yongjaelee/) (*Equal Contribution) + + + + +## Release +- [11/10] [LLaVA-Plus](https://llava-vl.github.io/llava-plus/) is released: Learning to Use Tools for Creating Multimodal Agents, with LLaVA-Plus (LLaVA that Plug and Learn to Use Skills). [[Project Page](https://llava-vl.github.io/llava-plus/)] [[Demo](https://llavaplus.ngrok.io/)] [[Code](https://github.com/LLaVA-VL/LLaVA-Plus-Codebase)] [[Paper](https://arxiv.org/abs/2311.05437)] +- [11/6] Support **Intel** dGPU and CPU platforms. [More details here.](https://github.com/haotian-liu/LLaVA/tree/intel/docs/intel) +- [11/2] [LLaVA-Interactive](https://llava-vl.github.io/llava-interactive/) is released: Experience the future of human-AI multimodal interaction with an all-in-one demo for Image Chat, Segmentation, Generation and Editing. [[Project Page](https://llava-vl.github.io/llava-interactive/)] [[Demo](https://llavainteractive.ngrok.io/)] [[Code](https://github.com/LLaVA-VL/LLaVA-Interactive-Demo)] [[Paper](https://arxiv.org/abs/2311.00571)] +- [10/26] 🔥 LLaVA-1.5 with LoRA achieves comparable performance as full-model finetuning, with a reduced GPU RAM requirement ([ckpts](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md#llava-v15), [script](https://github.com/haotian-liu/LLaVA#train)). We also provide a [doc](https://github.com/haotian-liu/LLaVA/blob/main/docs/Finetune_Custom_Data.md) on how to finetune LLaVA-1.5 on your own dataset with LoRA. +- [10/12] Check out the Korean LLaVA (Ko-LLaVA), created by ETRI, who has generously supported our research! [[🤗 Demo](https://huggingface.co/spaces/etri-vilab/Ko-LLaVA)] +- [10/12] LLaVA is now supported in [llama.cpp](https://github.com/ggerganov/llama.cpp/pull/3436) with 4-bit / 5-bit quantization support! +- [10/11] The training data and scripts of LLaVA-1.5 are released [here](https://github.com/haotian-liu/LLaVA#train), and evaluation scripts are released [here](https://github.com/haotian-liu/LLaVA/blob/main/docs/Evaluation.md)! +- [10/10] [Roboflow Deep Dive](https://blog.roboflow.com/first-impressions-with-llava-1-5/): First Impressions with LLaVA-1.5. +- [10/5] 🔥 LLaVA-1.5 is out! Achieving SoTA on 11 benchmarks, with just simple modifications to the original LLaVA, utilizes all public data, completes training in ~1 day on a single 8-A100 node, and surpasses methods like Qwen-VL-Chat that use billion-scale data. Check out the [technical report](https://arxiv.org/abs/2310.03744), and explore the [demo](https://llava.hliu.cc/)! Models are available in [Model Zoo](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md). +- [9/26] LLaVA is improved with reinforcement learning from human feedback (RLHF) to improve fact grounding and reduce hallucination. Check out the new SFT and RLHF checkpoints at project [[LLavA-RLHF]](https://llava-rlhf.github.io/) +- [9/22] [LLaVA](https://arxiv.org/abs/2304.08485) is accepted by NeurIPS 2023 as **oral presentation**, and [LLaVA-Med](https://arxiv.org/abs/2306.00890) is accepted by NeurIPS 2023 Datasets and Benchmarks Track as **spotlight presentation**. +- [9/20] We summarize our empirical study of training 33B and 65B LLaVA models in a [note](https://arxiv.org/abs/2309.09958). Further, if you are interested in the comprehensive review, evolution and trend of multimodal foundation models, please check out our recent survey paper [``Multimodal Foundation Models: From Specialists to General-Purpose Assistants''.](https://arxiv.org/abs/2309.10020) +

+ +

+ +- [7/19] 🔥 We release a major upgrade, including support for LLaMA-2, LoRA training, 4-/8-bit inference, higher resolution (336x336), and a lot more. We release [LLaVA Bench](https://github.com/haotian-liu/LLaVA/blob/main/docs/LLaVA_Bench.md) for benchmarking open-ended visual chat with results from Bard and Bing-Chat. We also support and verify training with RTX 3090 and RTX A6000. Check out [LLaVA-from-LLaMA-2](https://github.com/haotian-liu/LLaVA/blob/main/docs/LLaVA_from_LLaMA2.md), and our [model zoo](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md)! +- [6/26] [CVPR 2023 Tutorial](https://vlp-tutorial.github.io/) on **Large Multimodal Models: Towards Building and Surpassing Multimodal GPT-4**! Please check out [[Slides](https://datarelease.blob.core.windows.net/tutorial/vision_foundation_models_2023/slides/Chunyuan_cvpr2023_tutorial_lmm.pdf)] [[Notes](https://arxiv.org/abs/2306.14895)] [[YouTube](https://youtu.be/mkI7EPD1vp8)] [[Bilibli](https://www.bilibili.com/video/BV1Ng4y1T7v3/)]. +- [6/11] We released the preview for the most requested feature: DeepSpeed and LoRA support! Please see documentations [here](./docs/LoRA.md). +- [6/1] We released **LLaVA-Med: Large Language and Vision Assistant for Biomedicine**, a step towards building biomedical domain large language and vision models with GPT-4 level capabilities. Checkout the [paper](https://arxiv.org/abs/2306.00890) and [page](https://github.com/microsoft/LLaVA-Med). +- [5/6] We are releasing [LLaVA-Lighting-MPT-7B-preview](https://huggingface.co/liuhaotian/LLaVA-Lightning-MPT-7B-preview), based on MPT-7B-Chat! See [here](#LLaVA-MPT-7b) for more details. +- [5/2] 🔥 We are releasing LLaVA-Lighting! Train a lite, multimodal GPT-4 with just $40 in 3 hours! See [here](#train-llava-lightning) for more details. +- [4/27] Thanks to the community effort, LLaVA-13B with 4-bit quantization allows you to run on a GPU with as few as 12GB VRAM! Try it out [here](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/llava). +- [4/17] 🔥 We released **LLaVA: Large Language and Vision Assistant**. We propose visual instruction tuning, towards building large language and vision models with GPT-4 level capabilities. Checkout the [paper](https://arxiv.org/abs/2304.08485) and [demo](https://llava.hliu.cc/). + + + +[![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg)](https://github.com/tatsu-lab/stanford_alpaca/blob/main/LICENSE) +[![Data License](https://img.shields.io/badge/Data%20License-CC%20By%20NC%204.0-red.svg)](https://github.com/tatsu-lab/stanford_alpaca/blob/main/DATA_LICENSE) +**Usage and License Notices**: The data and checkpoint is intended and licensed for research use only. They are also restricted to uses that follow the license agreement of LLaMA, Vicuna and GPT-4. The dataset is CC BY NC 4.0 (allowing only non-commercial use) and models trained using the dataset should not be used outside of research purposes. + + +## Contents +- [Install](#install) +- [LLaVA Weights](#llava-weights) +- [Demo](#Demo) +- [Model Zoo](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md) +- [Dataset](https://github.com/haotian-liu/LLaVA/blob/main/docs/Data.md) +- [Train](#train) +- [Evaluation](#evaluation) + +## Install + +If you are not using Linux, do *NOT* proceed, see instructions for [macOS](https://github.com/haotian-liu/LLaVA/blob/main/docs/macOS.md) and [Windows](https://github.com/haotian-liu/LLaVA/blob/main/docs/Windows.md). + +1. Clone this repository and navigate to LLaVA folder +```bash +git clone https://github.com/haotian-liu/LLaVA.git +cd LLaVA +``` + +2. Install Package +```Shell +conda create -n llava python=3.10 -y +conda activate llava +pip install --upgrade pip # enable PEP 660 support +pip install -e . +``` + +3. Install additional packages for training cases +``` +pip install -e ".[train]" +pip install flash-attn --no-build-isolation +``` + +### Upgrade to latest code base + +```Shell +git pull +pip install -e . +``` + +### Quick Start With HuggingFace + +
+Example Code + +```Python +from LLAV.llava import load_pretrained_model +from LLAV.llava import get_model_name_from_path +from LLAV.llava import eval_model + +model_path = "liuhaotian/llava-v1.5-7b" + +tokenizer, model, image_processor, context_len = load_pretrained_model( + model_path=model_path, + model_base=None, + model_name=get_model_name_from_path(model_path) +) +``` + +Check out the details wth the `load_pretrained_model` function in `llava/model/builder.py`. + +You can also use the `eval_model` function in `llava/eval/run_llava.py` to get the output easily. By doing so, you can use this code on Colab directly after downloading this repository. + +``` python +model_path = "liuhaotian/llava-v1.5-7b" +prompt = "What are the things I should be cautious about when I visit here?" +image_file = "https://llava-vl.github.io/static/images/view.jpg" + +args = type('Args', (), { + "model_path": model_path, + "model_base": None, + "model_name": get_model_name_from_path(model_path), + "query": prompt, + "conv_mode": None, + "image_file": image_file, + "sep": ",", +})() + +eval_model(args) +``` +
+ +## LLaVA Weights +Please check out our [Model Zoo](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md) for all public LLaVA checkpoints, and the instructions of how to use the weights. + +## Demo + +To run our demo, you need to prepare LLaVA checkpoints locally. Please follow the instructions [here](#llava-weights) to download the checkpoints. + +### Gradio Web UI + +To launch a Gradio demo locally, please run the following commands one by one. If you plan to launch multiple model workers to compare between different checkpoints, you only need to launch the controller and the web server *ONCE*. + +```mermaid +flowchart BT + %% Declare Nodes + gws("Gradio (UI Server)") + c("Controller (API Server):
PORT: 10000") + mw7b("Model Worker:
llava-v1.5-7b
PORT: 40000") + mw13b("Model Worker:
llava-v1.5-13b
PORT: 40001") + + %% Declare Styles + classDef data fill:#3af,stroke:#48a,stroke-width:2px,color:#444 + classDef success fill:#8f8,stroke:#0a0,stroke-width:2px,color:#444 + classDef failure fill:#f88,stroke:#f00,stroke-width:2px,color:#444 + + %% Assign Styles + class id,od data; + class cimg,cs_s,scsim_s success; + class ncimg,cs_f,scsim_f failure; + + subgraph Demo Connections + direction BT + c<-->gws + + mw7b<-->c + mw13b<-->c + end +``` + +#### Launch a controller +```Shell +python -m llava.serve.controller --host 0.0.0.0 --port 10000 +``` + +#### Launch a gradio web server. +```Shell +python -m llava.serve.gradio_web_server --controller http://localhost:10000 --model-list-mode reload +``` +You just launched the Gradio web interface. Now, you can open the web interface with the URL printed on the screen. You may notice that there is no model in the model list. Do not worry, as we have not launched any model worker yet. It will be automatically updated when you launch a model worker. + +#### Launch a model worker + +This is the actual *worker* that performs the inference on the GPU. Each worker is responsible for a single model specified in `--model-path`. + +```Shell +python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path liuhaotian/llava-v1.5-13b +``` +Wait until the process finishes loading the model and you see "Uvicorn running on ...". Now, refresh your Gradio web UI, and you will see the model you just launched in the model list. + +You can launch as many workers as you want, and compare between different model checkpoints in the same Gradio interface. Please keep the `--controller` the same, and modify the `--port` and `--worker` to a different port number for each worker. +```Shell +python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port --worker http://localhost: --model-path +``` + +If you are using an Apple device with an M1 or M2 chip, you can specify the mps device by using the `--device` flag: `--device mps`. + +#### Launch a model worker (Multiple GPUs, when GPU VRAM <= 24GB) + +If the VRAM of your GPU is less than 24GB (e.g., RTX 3090, RTX 4090, etc.), you may try running it with multiple GPUs. Our latest code base will automatically try to use multiple GPUs if you have more than one GPU. You can specify which GPUs to use with `CUDA_VISIBLE_DEVICES`. Below is an example of running with the first two GPUs. + +```Shell +CUDA_VISIBLE_DEVICES=0,1 python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path liuhaotian/llava-v1.5-13b +``` + +#### Launch a model worker (4-bit, 8-bit inference, quantized) + +You can launch the model worker with quantized bits (4-bit, 8-bit), which allows you to run the inference with reduced GPU memory footprint, potentially allowing you to run on a GPU with as few as 12GB VRAM. Note that inference with quantized bits may not be as accurate as the full-precision model. Simply append `--load-4bit` or `--load-8bit` to the **model worker** command that you are executing. Below is an example of running with 4-bit quantization. + +```Shell +python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path liuhaotian/llava-v1.5-13b --load-4bit +``` + +#### Launch a model worker (LoRA weights, unmerged) + +You can launch the model worker with LoRA weights, without merging them with the base checkpoint, to save disk space. There will be additional loading time, while the inference speed is the same as the merged checkpoints. Unmerged LoRA checkpoints do not have `lora-merge` in the model name, and are usually much smaller (less than 1GB) than the merged checkpoints (13G for 7B, and 25G for 13B). + +To load unmerged LoRA weights, you simply need to pass an additional argument `--model-base`, which is the base LLM that is used to train the LoRA weights. You can check the base LLM of each LoRA weights in the [model zoo](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md). + +```Shell +python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path liuhaotian/llava-v1-0719-336px-lora-vicuna-13b-v1.3 --model-base lmsys/vicuna-13b-v1.3 +``` + +### CLI Inference + +Chat about images using LLaVA without the need of Gradio interface. It also supports multiple GPUs, 4-bit and 8-bit quantized inference. With 4-bit quantization, for our LLaVA-1.5-7B, it uses less than 8GB VRAM on a single GPU. + +```Shell +python -m llava.serve.cli \ + --model-path liuhaotian/llava-v1.5-7b \ + --image-file "https://llava-vl.github.io/static/images/view.jpg" \ + --load-4bit +``` + + + +## Train + +*Below is the latest training configuration for LLaVA v1.5. For legacy models, please refer to README of [this](https://github.com/haotian-liu/LLaVA/tree/v1.0.1) version for now. We'll add them in a separate doc later.* + +LLaVA training consists of two stages: (1) feature alignment stage: use our 558K subset of the LAION-CC-SBU dataset to connect a *frozen pretrained* vision encoder to a *frozen LLM*; (2) visual instruction tuning stage: use 150K GPT-generated multimodal instruction-following data, plus around 515K VQA data from academic-oriented tasks, to teach the model to follow multimodal instructions. + +LLaVA is trained on 8 A100 GPUs with 80GB memory. To train on fewer GPUs, you can reduce the `per_device_train_batch_size` and increase the `gradient_accumulation_steps` accordingly. Always keep the global batch size the same: `per_device_train_batch_size` x `gradient_accumulation_steps` x `num_gpus`. + +### Hyperparameters +We use a similar set of hyperparameters as Vicuna in finetuning. Both hyperparameters used in pretraining and finetuning are provided below. + +1. Pretraining + +| Hyperparameter | Global Batch Size | Learning rate | Epochs | Max length | Weight decay | +| --- | ---: | ---: | ---: | ---: | ---: | +| LLaVA-v1.5-13B | 256 | 1e-3 | 1 | 2048 | 0 | + +2. Finetuning + +| Hyperparameter | Global Batch Size | Learning rate | Epochs | Max length | Weight decay | +| --- | ---: | ---: | ---: | ---: | ---: | +| LLaVA-v1.5-13B | 128 | 2e-5 | 1 | 2048 | 0 | + +### Download Vicuna checkpoints (automatically) + +Our base model Vicuna v1.5, which is an instruction-tuned chatbot, will be downloaded automatically when you run our provided training scripts. No action is needed. + +### Pretrain (feature alignment) + +Please download the 558K subset of the LAION-CC-SBU dataset with BLIP captions we use in the paper [here](https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain). + +Pretrain takes around 5.5 hours for LLaVA-v1.5-13B on 8x A100 (80G), due to the increased resolution to 336px. It takes around 3.5 hours for LLaVA-v1.5-7B. + +Training script with DeepSpeed ZeRO-2: [`pretrain.sh`](https://github.com/haotian-liu/LLaVA/blob/main/scripts/v1_5/pretrain.sh). + +- `--mm_projector_type mlp2x_gelu`: the two-layer MLP vision-language connector. +- `--vision_tower openai/clip-vit-large-patch14-336`: CLIP ViT-L/14 336px. + +
+Pretrain takes around 20 hours for LLaVA-7B on 8x V100 (32G) + + We provide training script with DeepSpeed [here](https://github.com/haotian-liu/LLaVA/blob/main/scripts/pretrain_xformers.sh). +Tips: +- If you are using V100 which is not supported by FlashAttention, you can use the [memory-efficient attention](https://arxiv.org/abs/2112.05682) implemented in [xFormers](https://github.com/facebookresearch/xformers). Install xformers and replace `llava/train/train_mem.py` above with [llava/train/train_xformers.py](LLAV/llava/train/train_xformers.py). +
+ +### Visual Instruction Tuning + +1. Prepare data + +Please download the annotation of the final mixture our instruction tuning data [llava_v1_5_mix665k.json](https://huggingface.co/datasets/liuhaotian/LLaVA-Instruct-150K/blob/main/llava_v1_5_mix665k.json), and download the images from constituting datasets: + +- COCO: [train2017](http://images.cocodataset.org/zips/train2017.zip) +- GQA: [images](https://downloads.cs.stanford.edu/nlp/data/gqa/images.zip) +- OCR-VQA: [download script](https://drive.google.com/drive/folders/1_GYPY5UkUy7HIcR0zq3ZCFgeZN7BAfm_?usp=sharing), **we save all files as `.jpg`** +- TextVQA: [train_val_images](https://dl.fbaipublicfiles.com/textvqa/images/train_val_images.zip) +- VisualGenome: [part1](https://cs.stanford.edu/people/rak248/VG_100K_2/images.zip), [part2](https://cs.stanford.edu/people/rak248/VG_100K_2/images2.zip) + +After downloading all of them, organize the data as follows in `./playground/data`, + +``` +├── coco +│ └── train2017 +├── gqa +│ └── images +├── ocr_vqa +│ └── images +├── textvqa +│ └── train_images +└── vg + ├── VG_100K + └── VG_100K_2 +``` + +2. Start training! + +You may download our pretrained projectors in [Model Zoo](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md). It is not recommended to use legacy projectors, as they may be trained with a different version of the codebase, and if any option is off, the model will not function/train as we expected. + +Visual instruction tuning takes around 20 hours for LLaVA-v1.5-13B on 8x A100 (80G), due to the increased resolution to 336px. It takes around 10 hours for LLaVA-v1.5-7B on 8x A100 (40G). + +Training script with DeepSpeed ZeRO-3: [`finetune.sh`](https://github.com/haotian-liu/LLaVA/blob/main/scripts/v1_5/finetune.sh). + +If you are do not have enough GPU memory: + +- Use LoRA: [`finetune_lora.sh`](https://github.com/haotian-liu/LLaVA/blob/main/scripts/v1_5/finetune_lora.sh). We are able to fit 13B training in 8-A100-40G/8-A6000, and 7B training in 8-RTX3090. Make sure `per_device_train_batch_size*gradient_accumulation_steps` is the same as the provided script for best reproducibility. +- Replace `zero3.json` with `zero3_offload.json` which offloads some parameters to CPU RAM. This slows down the training speed. + +If you are interested in finetuning LLaVA model to your own task/data, please check out [`Finetune_Custom_Data.md`](https://github.com/haotian-liu/LLaVA/blob/main/docs/Finetune_Custom_Data.md)。 + +New options to note: + +- `--mm_projector_type mlp2x_gelu`: the two-layer MLP vision-language connector. +- `--vision_tower openai/clip-vit-large-patch14-336`: CLIP ViT-L/14 336px. +- `--image_aspect_ratio pad`: this pads the non-square images to square, instead of cropping them; it slightly reduces hallucination. +- `--group_by_modality_length True`: this should only be used when your instruction tuning dataset contains both language (e.g. ShareGPT) and multimodal (e.g. LLaVA-Instruct). It makes the training sampler only sample a single modality (either image or language) during training, which we observe to speed up training by ~25%, and does not affect the final outcome. + +## Evaluation + +In LLaVA-1.5, we evaluate models on a diverse set of 12 benchmarks. To ensure the reproducibility, we evaluate the models with greedy decoding. We do not evaluate using beam search to make the inference process consistent with the chat demo of real-time outputs. + +See [Evaluation.md](https://github.com/haotian-liu/LLaVA/blob/main/docs/Evaluation.md). + +### GPT-assisted Evaluation + +Our GPT-assisted evaluation pipeline for multimodal modeling is provided for a comprehensive understanding of the capabilities of vision-language models. Please see our paper for more details. + +1. Generate LLaVA responses + +```Shell +python model_vqa.py \ + --model-path ./checkpoints/LLaVA-13B-v0 \ + --question-file \ + playground/data/coco2014_val_qa_eval/qa90_questions.jsonl \ + --image-folder \ + /path/to/coco2014_val \ + --answers-file \ + /path/to/answer-file-our.jsonl +``` + +2. Evaluate the generated responses. In our case, [`answer-file-ref.jsonl`](./playground/data/coco2014_val_qa_eval/qa90_gpt4_answer.jsonl) is the response generated by text-only GPT-4 (0314), with the context captions/boxes provided. + +```Shell +OPENAI_API_KEY="sk-***********************************" python llava/eval/eval_gpt_review_visual.py \ + --question playground/data/coco2014_val_qa_eval/qa90_questions.jsonl \ + --context llava/eval/table/caps_boxes_coco2014_val_80.jsonl \ + --answer-list \ + /path/to/answer-file-ref.jsonl \ + /path/to/answer-file-our.jsonl \ + --rule llava/eval/table/rule.json \ + --output /path/to/review.json +``` + +3. Summarize the evaluation results + +```Shell +python summarize_gpt_review.py +``` + +## Citation + +If you find LLaVA useful for your research and applications, please cite using this BibTeX: +```bibtex + +@misc{liu2023improvedllava, + title={Improved Baselines with Visual Instruction Tuning}, + author={Liu, Haotian and Li, Chunyuan and Li, Yuheng and Lee, Yong Jae}, + publisher={arXiv:2310.03744}, + year={2023}, +} + +@misc{liu2023llava, + title={Visual Instruction Tuning}, + author={Liu, Haotian and Li, Chunyuan and Wu, Qingyang and Lee, Yong Jae}, + publisher={arXiv:2304.08485}, + year={2023}, +} +``` + +## Acknowledgement + +- [Vicuna](https://github.com/lm-sys/FastChat): the codebase we built upon, and our base model Vicuna-13B that has the amazing language capabilities! + +## Related Projects + +- [Instruction Tuning with GPT-4](https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM) +- [LLaVA-Med: Training a Large Language-and-Vision Assistant for Biomedicine in One Day](https://github.com/microsoft/LLaVA-Med) +- [Otter: In-Context Multi-Modal Instruction Tuning](https://github.com/Luodian/Otter) + +For future project ideas, please check out: +- [SEEM: Segment Everything Everywhere All at Once](https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once) +- [Grounded-Segment-Anything](https://github.com/IDEA-Research/Grounded-Segment-Anything) to detect, segment, and generate anything by marrying [Grounding DINO](https://github.com/IDEA-Research/GroundingDINO) and [Segment-Anything](https://github.com/facebookresearch/segment-anything). diff --git a/LLAVA_Biovil/__init__.py b/LLAVA_Biovil/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/biovil_t/__init__.py b/LLAVA_Biovil/biovil_t/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/biovil_t/encoder.py b/LLAVA_Biovil/biovil_t/encoder.py new file mode 100644 index 0000000000000000000000000000000000000000..b24f1ea5e096fed11a46b0dfbaa3cf801782b2af --- /dev/null +++ b/LLAVA_Biovil/biovil_t/encoder.py @@ -0,0 +1,180 @@ +# ------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +# ------------------------------------------------------------------------------------------- + +from __future__ import annotations + +from contextlib import contextmanager +from typing import Any, Generator, Optional, Sequence, Tuple, Union + +import torch +import torch.nn as nn +from health_multimodal.common.device import get_module_device +from timm.models.layers import trunc_normal_ + +from .resnet import resnet18, resnet50 +from .transformer import VisionTransformerPooler +from .types import ImageEncoderType + +DEFAULT_DILATION_VALUES_FOR_RESNET = (False, False, True) +ImageEncoderOutputType = Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]] + + +class ImageEncoder(nn.Module): + """Image encoder trunk module for the ``ImageModel`` class. + + :param img_encoder_type : Type of image encoder model to use, either ``"resnet18_multi_image"`` or + ``"resnet50_multi_image"``. + """ + + def __init__(self, img_encoder_type: str): + super().__init__() + self.img_encoder_type = img_encoder_type + self.encoder = self._create_encoder() + + def _create_encoder(self, **kwargs: Any) -> nn.Module: + if self.img_encoder_type in [ImageEncoderType.RESNET18, ImageEncoderType.RESNET18_MULTI_IMAGE]: + encoder_class = resnet18 + elif self.img_encoder_type in [ImageEncoderType.RESNET50, ImageEncoderType.RESNET50_MULTI_IMAGE]: + encoder_class = resnet50 + else: + supported = ImageEncoderType.get_members(multi_image_encoders_only=False) + raise NotImplementedError(f"Image encoder type \"{self.img_encoder_type}\" must be in {supported}") + + encoder = encoder_class(pretrained=True, **kwargs) + + return encoder + + def forward(self, + current_image: torch.Tensor, + return_patch_embeddings: bool = False) -> ImageEncoderOutputType: + """Get image global and patch embeddings""" + + patch_emb = self.encoder(current_image) + avg_pooled_emb = torch.flatten(torch.nn.functional.adaptive_avg_pool2d(patch_emb, (1, 1)), 1) + if return_patch_embeddings: + return patch_emb, avg_pooled_emb + + return avg_pooled_emb + + def reload_encoder_with_dilation(self, replace_stride_with_dilation: Optional[Sequence[bool]] = None) -> None: + """Workaround for enabling dilated convolutions after model initialization. + + :param replace_stride_with_dilation: Replace the 2x2 standard convolution stride with a dilated convolution + in each layer in the last three blocks of ResNet architecture. + """ + if self.img_encoder_type == ImageEncoderType.RESNET18: + # resnet18 uses BasicBlock implementation, which does not support dilated convolutions. + raise NotImplementedError("resnet18 does not support dilated convolutions") + + if replace_stride_with_dilation is None: + replace_stride_with_dilation = DEFAULT_DILATION_VALUES_FOR_RESNET + + device = next(self.encoder.parameters()).device + new_encoder = self._create_encoder(replace_stride_with_dilation=replace_stride_with_dilation).to(device) + + if self.encoder.training: + new_encoder.train() + else: + new_encoder.eval() + + new_encoder.load_state_dict(self.encoder.state_dict()) + self.encoder = new_encoder + + +class MultiImageEncoder(ImageEncoder): + """Multi-image encoder trunk module for the ``ImageModel`` class. + It can be used to encode multiple images into combined latent representation. + Currently it only supports two input images but can be extended to support more in future. + + :param img_encoder_type: Type of image encoder model to use: either ``"resnet18"`` or ``"resnet50"``. + """ + + def __init__(self, img_encoder_type: str): + super().__init__(img_encoder_type) + + output_dim = 256 # The aggregate feature dim of the encoder is `2 * output_dim` i.e. [f_static, f_diff] + grid_shape = (14, 14) # Spatial dimensions of patch grid. + + backbone_output_feature_dim = get_encoder_output_dim(self.encoder, device=get_module_device(self)) + + self.backbone_to_vit = nn.Conv2d(in_channels=backbone_output_feature_dim, out_channels=output_dim, + kernel_size=1, stride=1, padding=0, bias=False) + self.vit_pooler = VisionTransformerPooler(input_dim=output_dim, grid_shape=grid_shape) + + # Missing image embedding + self.missing_previous_emb = nn.Parameter(torch.zeros(1, output_dim, 1, 1)) + trunc_normal_(self.missing_previous_emb, std=.02) + + def forward(self, # type: ignore[override] + current_image: torch.Tensor, + previous_image: Optional[torch.Tensor] = None, + return_patch_embeddings: bool = False) -> ImageEncoderOutputType: + + batch_size = current_image.shape[0] + + if previous_image is not None: + assert current_image.shape == previous_image.shape + x = torch.cat([current_image, previous_image], dim=0) + x = super().forward(x, return_patch_embeddings=True)[0] + x = self.backbone_to_vit(x) + patch_x, patch_x_previous = x[:batch_size], x[batch_size:] + diff_x = self.vit_pooler(current_image=patch_x, previous_image=patch_x_previous) + else: + x = super().forward(current_image, return_patch_embeddings=True)[0] + patch_x = self.backbone_to_vit(x) + B, _, W, H = patch_x.shape + diff_x = self.missing_previous_emb.repeat(B, 1, W, H) + + patch_fused = torch.cat([patch_x, diff_x], dim=1) + avg_pooled_emb = torch.flatten(torch.nn.functional.adaptive_avg_pool2d(patch_fused, (1, 1)), 1) + + if return_patch_embeddings: + return patch_fused, avg_pooled_emb + + return avg_pooled_emb + + def reload_encoder_with_dilation(self, replace_stride_with_dilation: Optional[Sequence[bool]] = None) -> None: + raise NotImplementedError + + +@torch.no_grad() +def get_encoder_output_dim(module: torch.nn.Module, device: torch.device) -> int: + """Calculate the output dimension of an encoder by making a single forward pass. + + :param module: Encoder module. + :param device: Compute device to use. + """ + # Target device + assert isinstance(device, torch.device) + + x = torch.rand((1, 3, 448, 448)).to(device) + + # Extract the number of output feature dimensions + with restore_training_mode(module): + module.eval() + representations = module(x) + return representations.shape[1] + + +@contextmanager +def restore_training_mode(module: nn.Module) -> Generator[None, None, None]: + """Restore the training mode of a module after some operation. + + :param module: PyTorch module. + """ + training_mode = module.training + yield + module.train(mode=training_mode) + + +def get_encoder_from_type(img_encoder_type: str) -> ImageEncoder: + """Returns the encoder class for the given encoder type. + + :param img_encoder_type: Encoder type. {RESNET18, RESNET50, RESNET18_MULTI_IMAGE, RESNET50_MULTI_IMAGE} + """ + if img_encoder_type in ImageEncoderType.get_members(multi_image_encoders_only=True): + return MultiImageEncoder(img_encoder_type=img_encoder_type) + else: + return ImageEncoder(img_encoder_type=img_encoder_type) diff --git a/LLAVA_Biovil/biovil_t/model.py b/LLAVA_Biovil/biovil_t/model.py new file mode 100644 index 0000000000000000000000000000000000000000..71b1ebc580ca0f93aefce1ccbcde1f0aacb4d755 --- /dev/null +++ b/LLAVA_Biovil/biovil_t/model.py @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +# ------------------------------------------------------------------------------------------- + +from __future__ import annotations + +from abc import ABC, abstractmethod +from pathlib import Path +from typing import Any, Optional, Union + +import torch +import torch.nn as nn +import torch.nn.functional as F +from health_multimodal.common.device import get_module_device + +from .encoder import get_encoder_from_type, get_encoder_output_dim, MultiImageEncoder +from .modules import MLP, MultiTaskModel +from .types import ImageModelOutput + + +class BaseImageModel(nn.Module, ABC): + """Abstract class for image models.""" + @abstractmethod + def forward(self, *args: Any, **kwargs: Any) -> ImageModelOutput: + raise NotImplementedError + + @abstractmethod + def get_patchwise_projected_embeddings(self, input_img: torch.Tensor, normalize: bool) -> torch.Tensor: + raise NotImplementedError + + +class ImageModel(BaseImageModel): + """Image encoder module""" + + def __init__(self, + img_encoder_type: str, + joint_feature_size: int, + freeze_encoder: bool = False, + pretrained_model_path: Optional[Union[str, Path]] = None, + **downstream_classifier_kwargs: Any): + super().__init__() + + # Initiate encoder, projector, and classifier + self.encoder = get_encoder_from_type(img_encoder_type) + self.feature_size = get_encoder_output_dim(self.encoder, device=get_module_device(self.encoder)) + self.projector = MLP(input_dim=self.feature_size, output_dim=joint_feature_size, + hidden_dim=joint_feature_size, use_1x1_convs=True) + self.downstream_classifier_kwargs = downstream_classifier_kwargs + self.classifier = self.create_downstream_classifier() if downstream_classifier_kwargs else None + + # Initialise the mode of modules + self.freeze_encoder = freeze_encoder + self.train() + + self.image_processor = None #TODO + + if pretrained_model_path is not None: + if not isinstance(pretrained_model_path, (str, Path)): + raise TypeError(f"Expected a string or Path, got {type(pretrained_model_path)}") + state_dict = torch.load(pretrained_model_path, map_location="cpu") + # drop projector + # for k in list(state_dict.keys()): + # if k.startswith("projector"): + # state_dict.pop(k) + + self.load_state_dict(state_dict, strict=False) + + + def train(self, mode: bool = True) -> Any: + """Switch the model between training and evaluation modes.""" + super().train(mode=mode) + if self.freeze_encoder: + self.encoder.train(mode=False) + self.projector.train(mode=False) + return self + + def forward(self, x: torch.Tensor) -> ImageModelOutput: # type: ignore[override] + with torch.set_grad_enabled(not self.freeze_encoder): + patch_x, pooled_x = self.encoder(x, return_patch_embeddings=True) + return self.forward_post_encoder(patch_x, pooled_x) + + def forward_post_encoder(self, patch_x: torch.Tensor, pooled_x: torch.Tensor) -> ImageModelOutput: + with torch.set_grad_enabled(not self.freeze_encoder): + projected_patch_embeddings = self.projector(patch_x) + projected_global_embedding = torch.mean(projected_patch_embeddings, dim=(2, 3)) + + logits = self.classifier(pooled_x) if self.classifier else None + return ImageModelOutput(img_embedding=pooled_x, + patch_embeddings=patch_x, + class_logits=logits, + projected_patch_embeddings=projected_patch_embeddings, + projected_global_embedding=projected_global_embedding) + + def create_downstream_classifier(self, **kwargs: Any) -> MultiTaskModel: + """Create the classification module for the downstream task.""" + downstream_classifier_kwargs = kwargs if kwargs else self.downstream_classifier_kwargs + return MultiTaskModel(self.feature_size, **downstream_classifier_kwargs) + + @torch.no_grad() + def get_patchwise_projected_embeddings(self, input_img: torch.Tensor, normalize: bool) -> torch.Tensor: + """Get patch-wise projected embeddings from the CNN model. + + :param input_img: input tensor image [B, C, H, W]. + :param normalize: If ``True``, the embeddings are L2-normalized. + :returns projected_embeddings: tensor of embeddings in shape [batch, n_patches_h, n_patches_w, feature_size]. + """ + assert not self.training, "This function is only implemented for evaluation mode" + outputs = self.forward(input_img) + projected_embeddings = outputs.projected_patch_embeddings.detach() # type: ignore + if normalize: + projected_embeddings = F.normalize(projected_embeddings, dim=1) + projected_embeddings = projected_embeddings.permute([0, 2, 3, 1]) # B D H W -> B H W D (D: Features) + return projected_embeddings + + +class MultiImageModel(ImageModel): + def __init__(self, **kwargs: Any) -> None: + super().__init__(**kwargs) + assert isinstance(self.encoder, MultiImageEncoder), "MultiImageModel only supports MultiImageEncoder" + + def forward(self, # type: ignore[override] + current_image: torch.Tensor, + previous_image: Optional[torch.Tensor] = None) -> ImageModelOutput: + + with torch.set_grad_enabled(not self.freeze_encoder): + patch_x, pooled_x = self.encoder(current_image=current_image, + previous_image=previous_image, + return_patch_embeddings=True) + return self.forward_post_encoder(patch_x, pooled_x) diff --git a/LLAVA_Biovil/biovil_t/modules.py b/LLAVA_Biovil/biovil_t/modules.py new file mode 100644 index 0000000000000000000000000000000000000000..83869bdb7be7fd68c0eb697c4dd14359afb5347f --- /dev/null +++ b/LLAVA_Biovil/biovil_t/modules.py @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +# ------------------------------------------------------------------------------------------- + +from typing import Callable, Optional + +import torch +import torch.nn as nn + + +class MLP(nn.Module): + """ + Fully connected layers to map between image embeddings and projection space where pairs of images are compared. + + :param input_dim: Input embedding feature size + :param hidden_dim: Hidden layer size in MLP + :param output_dim: Output projection size + :param use_1x1_convs: Use 1x1 conv kernels instead of 2D linear transformations for speed and memory efficiency. + """ + + def __init__(self, + input_dim: int, + output_dim: int, + hidden_dim: Optional[int] = None, + use_1x1_convs: bool = False) -> None: + super().__init__() + + if use_1x1_convs: + linear_proj_1_args = {'in_channels': input_dim, 'out_channels': hidden_dim, 'kernel_size': 1, 'bias': False} + linear_proj_2_args = {'in_channels': hidden_dim, 'out_channels': output_dim, 'kernel_size': 1, 'bias': True} + normalisation_layer: Callable = nn.BatchNorm2d + projection_layer: Callable = nn.Conv2d + else: + linear_proj_1_args = {'in_features': input_dim, 'out_features': hidden_dim, 'bias': False} + linear_proj_2_args = {'in_features': hidden_dim, 'out_features': output_dim, 'bias': True} + normalisation_layer = nn.BatchNorm1d + projection_layer = nn.Linear + + self.output_dim = output_dim + self.input_dim = input_dim + if hidden_dim is not None: + self.model = nn.Sequential( + projection_layer(**linear_proj_1_args), + normalisation_layer(hidden_dim), + nn.ReLU(inplace=True), + projection_layer(**linear_proj_2_args)) + else: + self.model = nn.Linear(input_dim, output_dim) # type: ignore + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """forward pass of the multi-layer perceptron""" + x = self.model(x) + return x + + +class MultiTaskModel(nn.Module): + """Torch module for multi-task classification heads. We create a separate classification head + for each task and perform a forward pass on each head independently in forward(). Classification + heads are instances of `MLP`. + + :param input_dim: Number of dimensions of the input feature map. + :param classifier_hidden_dim: Number of dimensions of hidden features in the MLP. + :param num_classes: Number of output classes per task. + :param num_tasks: Number of classification tasks or heads required. + """ + + def __init__(self, input_dim: int, classifier_hidden_dim: Optional[int], num_classes: int, num_tasks: int): + + super().__init__() + + self.num_classes = num_classes + self.num_tasks = num_tasks + + for task in range(num_tasks): + setattr(self, "fc_" + str(task), MLP(input_dim, output_dim=num_classes, hidden_dim=classifier_hidden_dim)) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """Returns [batch_size, num_tasks, num_classes] tensor of logits.""" + batch_size = x.shape[0] + out = torch.zeros((batch_size, self.num_classes, self.num_tasks), dtype=x.dtype, device=x.device) + for task in range(self.num_tasks): + classifier = getattr(self, "fc_" + str(task)) + out[:, :, task] = classifier(x) + return out diff --git a/LLAVA_Biovil/biovil_t/pretrained.py b/LLAVA_Biovil/biovil_t/pretrained.py new file mode 100644 index 0000000000000000000000000000000000000000..57373890252e1ec7a4bd33629102150d4d1cc383 --- /dev/null +++ b/LLAVA_Biovil/biovil_t/pretrained.py @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +# ------------------------------------------------------------------------------------------- + +from __future__ import annotations + +import tempfile +from pathlib import Path + +from torchvision.datasets.utils import download_url + +from .model import ImageModel +from .types import ImageEncoderType + + +JOINT_FEATURE_SIZE = 128 + +BIOMED_VLP_CXR_BERT_SPECIALIZED = "microsoft/BiomedVLP-CXR-BERT-specialized" +BIOMED_VLP_BIOVIL_T = "microsoft/BiomedVLP-BioViL-T" +HF_URL = "https://huggingface.co" + +CXR_BERT_COMMIT_TAG = "v1.1" +BIOVIL_T_COMMIT_TAG = "v1.0" + +BIOVIL_IMAGE_WEIGHTS_NAME = "biovil_image_resnet50_proj_size_128.pt" +BIOVIL_IMAGE_WEIGHTS_URL = f"{HF_URL}/{BIOMED_VLP_CXR_BERT_SPECIALIZED}/resolve/{CXR_BERT_COMMIT_TAG}/{BIOVIL_IMAGE_WEIGHTS_NAME}" # noqa: E501 +BIOVIL_IMAGE_WEIGHTS_MD5 = "02ce6ee460f72efd599295f440dbb453" + +BIOVIL_T_IMAGE_WEIGHTS_NAME = "biovil_t_image_model_proj_size_128.pt" +BIOVIL_T_IMAGE_WEIGHTS_URL = f"{HF_URL}/{BIOMED_VLP_BIOVIL_T}/resolve/{BIOVIL_T_COMMIT_TAG}/{BIOVIL_T_IMAGE_WEIGHTS_NAME}" # noqa: E501 +BIOVIL_T_IMAGE_WEIGHTS_MD5 = "a83080e2f23aa584a4f2b24c39b1bb64" + + +def _download_biovil_image_model_weights() -> Path: + """Download image model weights from Hugging Face. + + More information available at https://huggingface.co/microsoft/BiomedVLP-CXR-BERT-specialized. + """ + root_dir = tempfile.gettempdir() + download_url( + BIOVIL_IMAGE_WEIGHTS_URL, + root=root_dir, + filename=BIOVIL_IMAGE_WEIGHTS_NAME, + md5=BIOVIL_IMAGE_WEIGHTS_MD5, + ) + return Path(root_dir, BIOVIL_IMAGE_WEIGHTS_NAME) + + +def _download_biovil_t_image_model_weights() -> Path: + """Download image model weights from Hugging Face. + + More information available at https://huggingface.co/microsoft/microsoft/BiomedVLP-BioViL-T. + """ + root_dir = tempfile.gettempdir() + download_url( + BIOVIL_T_IMAGE_WEIGHTS_URL, + root=root_dir, + filename=BIOVIL_T_IMAGE_WEIGHTS_NAME, + md5=BIOVIL_T_IMAGE_WEIGHTS_MD5 + ) + return Path(root_dir, BIOVIL_T_IMAGE_WEIGHTS_NAME) + + +def get_biovil_image_encoder(pretrained: bool = True) -> ImageModel: + """Download weights from Hugging Face and instantiate the image model.""" + resnet_checkpoint_path = _download_biovil_image_model_weights() if pretrained else None + + image_model = ImageModel( + img_encoder_type=ImageEncoderType.RESNET50, + joint_feature_size=JOINT_FEATURE_SIZE, + pretrained_model_path=resnet_checkpoint_path, + ) + return image_model + + +def get_biovil_t_image_encoder() -> ImageModel: + """Download weights from Hugging Face and instantiate the image model.""" + + biovilt_checkpoint_path = _download_biovil_t_image_model_weights() + model_type = ImageEncoderType.RESNET50_MULTI_IMAGE + image_model = ImageModel(img_encoder_type=model_type, + joint_feature_size=JOINT_FEATURE_SIZE, + pretrained_model_path=biovilt_checkpoint_path) + return image_model diff --git a/LLAVA_Biovil/biovil_t/resnet.py b/LLAVA_Biovil/biovil_t/resnet.py new file mode 100644 index 0000000000000000000000000000000000000000..577d4a0a0608f1a0f97740758bfa635f5d09f320 --- /dev/null +++ b/LLAVA_Biovil/biovil_t/resnet.py @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +# ------------------------------------------------------------------------------------------- + +from typing import Any, List, Tuple, Type, Union + +import torch +from torch.hub import load_state_dict_from_url +from torchvision.models.resnet import ResNet, BasicBlock, Bottleneck + +TypeSkipConnections = Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor] + + +class ResNetHIML(ResNet): + """Wrapper class of the original torchvision ResNet model. + + The forward function is updated to return the penultimate layer + activations, which are required to obtain image patch embeddings. + """ + + def __init__(self, **kwargs: Any) -> None: + super().__init__(**kwargs) + + def forward(self, x: torch.Tensor, + return_intermediate_layers: bool = False) -> Union[torch.Tensor, TypeSkipConnections]: + """ResNetHIML forward pass. Optionally returns intermediate layers using the + ``return_intermediate_layers`` argument. + + :param return_intermediate_layers: If ``True``, return layers x0-x4 as a tuple, + otherwise return x4 only. + """ + + x0 = self.conv1(x) + x0 = self.bn1(x0) + x0 = self.relu(x0) + x0 = self.maxpool(x0) + + x1 = self.layer1(x0) + x2 = self.layer2(x1) + x3 = self.layer3(x2) + x4 = self.layer4(x3) + + if return_intermediate_layers: + return x0, x1, x2, x3, x4 + else: + return x4 + + +def _resnet(arch: str, block: Type[Union[BasicBlock, Bottleneck]], layers: List[int], + pretrained: bool, progress: bool, **kwargs: Any) -> ResNetHIML: + """Instantiate a custom :class:`ResNet` model. + + Adapted from :mod:`torchvision.models.resnet`. + """ + model = ResNetHIML(block=block, layers=layers, **kwargs) + if pretrained: + state_dict = load_state_dict_from_url('https://download.pytorch.org/models/resnet50-19c8e357.pth', progress=progress) + model.load_state_dict(state_dict) + return model + + +def resnet18(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ResNetHIML: + r"""ResNet-18 model from + `"Deep Residual Learning for Image Recognition" `_. + + :param pretrained: If ``True``, returns a model pre-trained on ImageNet. + :param progress: If ``True``, displays a progress bar of the download to ``stderr``. + """ + return _resnet('resnet18', BasicBlock, [2, 2, 2, 2], pretrained, progress, **kwargs) + + +def resnet50(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ResNetHIML: + r"""ResNet-50 model from + `"Deep Residual Learning for Image Recognition" `_. + + :param pretrained: If ``True``, returns a model pre-trained on ImageNet + :param progress: If ``True``, displays a progress bar of the download to ``stderr``. + """ + return _resnet('resnet50', Bottleneck, [3, 4, 6, 3], pretrained, progress, **kwargs) diff --git a/LLAVA_Biovil/biovil_t/transformer.py b/LLAVA_Biovil/biovil_t/transformer.py new file mode 100644 index 0000000000000000000000000000000000000000..9be4210d7bb435b39d013e192aed9776abfcac21 --- /dev/null +++ b/LLAVA_Biovil/biovil_t/transformer.py @@ -0,0 +1,266 @@ +# ------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +# ------------------------------------------------------------------------------------------- + +import math +from dataclasses import dataclass +from functools import partial +from typing import Any, Callable, Optional, Set, Tuple + +import torch +import torch.nn as nn +from timm.models.layers import DropPath, Mlp, trunc_normal_ + + +def torch_int_div(tensor1, tensor2): + """ + A function that performs integer division across different versions of PyTorch. + """ + return torch.div(tensor1, tensor2, rounding_mode="floor") + +@dataclass +class MultiHeadAttentionOutput: + mha_output: torch.Tensor + attention: Optional[torch.Tensor] = None + + +class VisionTransformerPooler(nn.Module): + """ + :param input_dim: Input feature dimension (i.e., channels in old CNN terminology) + :param grid_shape: Shape of the grid of patches per image + :param num_heads: Number of self-attention heads within the MHA block + :param num_blocks: Number of blocks per attention layer + :param norm_layer: Normalisation layer + + `self.type_embed`: Is used to characterise prior and current scans, and + create permutation variance across modalities/series. + """ + + def __init__(self, + input_dim: int, + grid_shape: Tuple[int, int], + num_heads: int = 8, + num_blocks: int = 3, + norm_layer: Any = partial(nn.LayerNorm, eps=1e-6)): + super().__init__() + + block_kwargs = dict(dim=input_dim, num_heads=num_heads, mlp_ratio=1., drop=0.10, attn_drop=0.10, + drop_path=0.25, act_layer=nn.GELU, norm_layer=norm_layer) + self.blocks = nn.ModuleList([Block(**block_kwargs) for _ in range(num_blocks)]) + self.norm_post = norm_layer(input_dim) + self.grid_shape = grid_shape + self.num_patches = grid_shape[0] * grid_shape[1] + self.num_blocks = num_blocks + + # Temporal positional embeddings + num_series: int = 2 + self.type_embed = nn.Parameter(torch.zeros(num_series, 1, input_dim)) + trunc_normal_(self.type_embed, std=.02) + + # Positional embeddings 1 x L x C (L: Sequence length, C: Feature dimension) + self.pos_drop = nn.Dropout(p=0.10) + pos_embed_class = SinePositionEmbedding(embedding_dim=input_dim // 2, normalize=True) + pos_embed = pos_embed_class(mask=torch.ones([1, grid_shape[0], grid_shape[1]])) # 1 x L x C + self.register_buffer("pos_embed", pos_embed, persistent=False) + + # Initialisation + self.apply(self._init_weights) + + def no_weight_decay(self) -> Set[str]: + return {'type_embed'} + + def forward(self, current_image: torch.Tensor, previous_image: Optional[torch.Tensor] = None) -> torch.Tensor: + B, C, H, W = current_image.shape + assert H == self.grid_shape[0] and W == self.grid_shape[1], "Input and grid shapes do not match" + + # Flatten patch embeddings to have shape (B x L x C), L = H * W + if previous_image is not None: + assert previous_image.shape == current_image.shape, "current_image and previous_image shapes do not match" + previous_image = previous_image.view(B, C, H * W).transpose(1, 2) + current_image = current_image.view(B, C, H * W).transpose(1, 2) + pos_embed = self.pos_embed.repeat(B, 1, 1) # type: ignore + + # Final token activations (B x 2L x C) + token_features = self.forward_after_reshape(x=current_image, pos_embed=pos_embed, x_previous=previous_image) + + # Extract the patch features of current image + cur_img_token_id = 0 + current_token_features = token_features[:, cur_img_token_id:self.num_patches+cur_img_token_id] + current_patch_features = current_token_features.transpose(1, 2).view(B, C, H, W) + + return current_patch_features + + def forward_after_reshape(self, + x: torch.Tensor, + pos_embed: torch.Tensor, + x_previous: Optional[torch.Tensor] = None) -> torch.Tensor: + B, L, _ = x.shape # Batch, Sequence length, Feature dimension + + # Positional and type embeddings + type_embed = self.type_embed[0].expand(B, L, -1) + if x_previous is not None: + x = torch.cat((x, x_previous), dim=1) + pos_embed = torch.cat((pos_embed, pos_embed), dim=1) + prev_type_embed = self.type_embed[1].expand(B, L, -1) + type_embed = torch.cat((type_embed, prev_type_embed), dim=1) + + # Add positional and type embeddings (used in query and key matching) + pos_and_type_embed = pos_embed + type_embed + + # Positional dropout + x = self.pos_drop(x) + + # Multihead attention followed by MLP + for block in self.blocks: + x = block(x=x, pos_and_type_embed=pos_and_type_embed) + x = self.norm_post(x) + + return x + + def _init_weights(self, m: nn.Module) -> None: + if isinstance(m, nn.Linear): + trunc_normal_(m.weight, std=.02) + if isinstance(m, nn.Linear) and m.bias is not None: + nn.init.constant_(m.bias, 0) + elif isinstance(m, nn.LayerNorm): + nn.init.constant_(m.bias, 0) + nn.init.constant_(m.weight, 1.0) + + +class MultiHeadAttentionLayer(nn.Module): + """ + Multi-head self attention module + + The content builds on top of the TIMM library (vision_transformer.py) and differs by the following: + - Defines a custom `MultiHeadAttentionLayer` which does not only apply `self-attention` but it can be + generalised to arbitrary (query, key, value) input tuples. This feature can be valuable to process + more than 2 scans at a time. + - `Self-attention` specific use-case can still be invoked by calling the `forward_as_mhsa` method. + """ + + def __init__(self, + dim: int, + num_heads: int = 8, + qkv_bias: bool = False, + attn_drop: float = 0., + proj_drop: float = 0.) -> None: + super().__init__() + self.num_heads = num_heads + assert dim % num_heads == 0, f"The embedding dim ({dim}) must be divisible by the number of heads ({num_heads})" + head_dim = dim // num_heads + self.scale = head_dim ** -0.5 + self.return_attention = False + + self.proj_q = nn.Linear(dim, dim, bias=qkv_bias) + self.proj_k = nn.Linear(dim, dim, bias=qkv_bias) + self.proj_v = nn.Linear(dim, dim, bias=qkv_bias) + + self.attn_drop = nn.Dropout(attn_drop) + self.proj = nn.Linear(dim, dim) + self.proj_drop = nn.Dropout(proj_drop) + + def forward(self, k: torch.Tensor, q: torch.Tensor, v: torch.Tensor) -> MultiHeadAttentionOutput: + B, N, C = v.shape + assert C % self.num_heads == 0, \ + f"The embedding dim ({C}) must be divisible by the number of heads ({self.num_heads})" + + w_q = self.proj_q(q).reshape(B, N, self.num_heads, C // self.num_heads).permute(0, 2, 1, 3) + w_k = self.proj_k(k).reshape(B, N, self.num_heads, C // self.num_heads).permute(0, 2, 1, 3) + w_v = self.proj_v(v).reshape(B, N, self.num_heads, C // self.num_heads).permute(0, 2, 1, 3) + + attn = (w_q @ w_k.transpose(-2, -1)) * self.scale + attn = attn.softmax(dim=-1) + attn = self.attn_drop(attn) + + o = (attn @ w_v).transpose(1, 2).reshape(B, N, C) + o = self.proj(o) + o = self.proj_drop(o) + + attention_output = attn if self.return_attention else None + + return MultiHeadAttentionOutput(mha_output=o, attention=attention_output) + + def forward_as_mhsa(self, input: torch.Tensor) -> MultiHeadAttentionOutput: + return self(k=input, q=input, v=input) + + +class Block(nn.Module): + """ + Encapsulates multi-layer perceptron and multi-head self attention modules into a block. + + The content builds on top of the TIMM library (vision_transformer.py) and differs by the following: + - This implementation uses spatio-temporal positional embeddings instead of 2D positional embeddings only, + and they are taken into account within the forward pass of each ViT block. + - Utilises the custom defined `MultiHeadAttentionLayer` which does not apply `self-attention` only but can be + generalised to arbitrary (query, key, value) tuples. This can be valuable to process more than 2 scans. + + Positional and type embeddings are handled in a similar fashion as DETR object localisation paper + https://alcinos.github.io/detr_page/, where a fixed set of sine/cos positional embeddings are used + in an additive manner to Q and K tensors. + """ + + def __init__(self, dim: int, num_heads: int, mlp_ratio: float = 1., qkv_bias: bool = False, drop: float = 0., + attn_drop: float = 0., drop_path: float = 0., act_layer: Callable = nn.GELU, + norm_layer: Callable = nn.LayerNorm) -> None: + super().__init__() + self.norm1 = norm_layer(dim) + self.attn = MultiHeadAttentionLayer(dim=dim, num_heads=num_heads, qkv_bias=qkv_bias, + attn_drop=attn_drop, proj_drop=drop) + self.drop_path = DropPath(drop_path) if drop_path > 0. else nn.Identity() + self.norm2 = norm_layer(dim) + mlp_hidden_dim = int(dim * mlp_ratio) + self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop) + + def with_pos_and_type_embed(self, tensor: torch.Tensor, emb: Optional[torch.Tensor]) -> torch.Tensor: + # Add positional embeddings to key and query tensors + return tensor if emb is None else tensor + emb + + def forward(self, x: torch.Tensor, pos_and_type_embed: Optional[torch.Tensor]) -> torch.Tensor: + x_with_emb = self.with_pos_and_type_embed(self.norm1(x), emb=pos_and_type_embed) + x = x + self.drop_path(self.attn.forward_as_mhsa(x_with_emb).mha_output) + x = x + self.drop_path(self.mlp(self.norm2(x))) + + return x + + +class SinePositionEmbedding(): + """ + This is a more standard version of the position embedding, very similar to the one used by the Attention is all you + need paper, generalized to work on images. + """ + + def __init__(self, + embedding_dim: int = 64, + temperature: int = 10000, + normalize: bool = False, + scale: float = None) -> None: + super().__init__() + self.embedding_dim = embedding_dim + self.temperature = temperature + self.normalize = normalize + if scale is not None and normalize is False: + raise ValueError("normalize should be True if scale is passed") + if scale is None: + scale = 2 * math.pi + self.scale = scale + + def __call__(self, mask: torch.Tensor) -> torch.Tensor: + assert mask is not None, "No pixel mask provided" + B, H, W = mask.shape + y_embed = mask.cumsum(1, dtype=torch.float32) + x_embed = mask.cumsum(2, dtype=torch.float32) + if self.normalize: + y_embed = y_embed / (y_embed[:, -1:, :] + 1e-6) * self.scale + x_embed = x_embed / (x_embed[:, :, -1:] + 1e-6) * self.scale + + dim_t = torch.arange(self.embedding_dim, dtype=torch.float32) + dim_t = self.temperature ** (2 * torch_int_div(dim_t, 2) / self.embedding_dim) + + pos_x = x_embed[:, :, :, None] / dim_t + pos_y = y_embed[:, :, :, None] / dim_t + pos_x = torch.stack((pos_x[:, :, :, 0::2].sin(), pos_x[:, :, :, 1::2].cos()), dim=4).flatten(3) + pos_y = torch.stack((pos_y[:, :, :, 0::2].sin(), pos_y[:, :, :, 1::2].cos()), dim=4).flatten(3) + pos = torch.cat((pos_y, pos_x), dim=3).view(B, H * W, self.embedding_dim * 2) + + return pos diff --git a/LLAVA_Biovil/biovil_t/types.py b/LLAVA_Biovil/biovil_t/types.py new file mode 100644 index 0000000000000000000000000000000000000000..27e15bd386523eca98acdf2a77ea6357a1ec86e2 --- /dev/null +++ b/LLAVA_Biovil/biovil_t/types.py @@ -0,0 +1,37 @@ +# ------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. +# ------------------------------------------------------------------------------------------- + + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum, unique +from typing import List + +import torch + + +@dataclass +class ImageModelOutput(): + img_embedding: torch.Tensor + patch_embeddings: torch.Tensor + projected_global_embedding: torch.Tensor + class_logits: torch.Tensor + projected_patch_embeddings: torch.Tensor + + +@unique +class ImageEncoderType(str, Enum): + RESNET18 = "resnet18" + RESNET50 = "resnet50" + RESNET18_MULTI_IMAGE = "resnet18_multi_image" + RESNET50_MULTI_IMAGE = "resnet50_multi_image" + + @classmethod + def get_members(cls, multi_image_encoders_only: bool) -> List[ImageEncoderType]: + if multi_image_encoders_only: + return [cls.RESNET18_MULTI_IMAGE, cls.RESNET50_MULTI_IMAGE] + else: + return [member for member in cls] diff --git a/LLAVA_Biovil/cog.yaml b/LLAVA_Biovil/cog.yaml new file mode 100644 index 0000000000000000000000000000000000000000..55b739fd437a1897c1c1ec001f47aac2fbfdf68b --- /dev/null +++ b/LLAVA_Biovil/cog.yaml @@ -0,0 +1,37 @@ +# Configuration for Cog ⚙️ +# Reference: https://github.com/replicate/cog/blob/main/docs/yaml.md + +build: + gpu: true + + python_version: "3.11" + + python_packages: + - "torch==2.0.1" + - "accelerate==0.21.0" + - "bitsandbytes==0.41.0" + - "deepspeed==0.9.5" + - "einops-exts==0.0.4" + - "einops==0.6.1" + - "gradio==3.35.2" + - "gradio_client==0.2.9" + - "httpx==0.24.0" + - "markdown2==2.4.10" + - "numpy==1.26.0" + - "peft==0.4.0" + - "scikit-learn==1.2.2" + - "sentencepiece==0.1.99" + - "shortuuid==1.0.11" + - "timm==0.6.13" + - "tokenizers==0.13.3" + - "torch==2.0.1" + - "torchvision==0.15.2" + - "transformers==4.31.0" + - "wandb==0.15.12" + - "wavedrom==2.0.3.post3" + - "Pygments==2.16.1" + run: + - curl -o /usr/local/bin/pget -L "https://github.com/replicate/pget/releases/download/v0.0.3/pget" && chmod +x /usr/local/bin/pget + +# predict.py defines how predictions are run on your model +predict: "predict.py:Predictor" diff --git a/LLAVA_Biovil/install.md b/LLAVA_Biovil/install.md new file mode 100644 index 0000000000000000000000000000000000000000..e1023309a419ee16243d3bccde322b90c63a934c --- /dev/null +++ b/LLAVA_Biovil/install.md @@ -0,0 +1,6 @@ +step 1: clone Llava +step 2: git clone https://github.com/Dao-AILab/flash-attention.git +step 3: conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.7 -c pytorch -c nvidia +step 4: pip install -e . +step 5: pip install -e ".[train]" +step 6: in flash attention folder, run: python setup.py install diff --git a/LLAVA_Biovil/llava/__init__.py b/LLAVA_Biovil/llava/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4d1f016db1028101d45ba7d68cb3f0bcb558c2bb --- /dev/null +++ b/LLAVA_Biovil/llava/__init__.py @@ -0,0 +1 @@ +from .model import LlavaLlamaForCausalLM diff --git a/LLAVA_Biovil/llava/constants.py b/LLAVA_Biovil/llava/constants.py new file mode 100644 index 0000000000000000000000000000000000000000..374be090510b302de9882d880c755787a8eafe11 --- /dev/null +++ b/LLAVA_Biovil/llava/constants.py @@ -0,0 +1,13 @@ +CONTROLLER_HEART_BEAT_EXPIRATION = 30 +WORKER_HEART_BEAT_INTERVAL = 15 + +LOGDIR = "." + +# Model Constants +IGNORE_INDEX = -100 +IMAGE_TOKEN_INDEX = -200 +DEFAULT_IMAGE_TOKEN = "" +DEFAULT_IMAGE_PATCH_TOKEN = "" +DEFAULT_IM_START_TOKEN = "" +DEFAULT_IM_END_TOKEN = "" +IMAGE_PLACEHOLDER = "" diff --git a/LLAVA_Biovil/llava/conversation.py b/LLAVA_Biovil/llava/conversation.py new file mode 100644 index 0000000000000000000000000000000000000000..763fb975d8386b78f23b69f67009b031be667fb6 --- /dev/null +++ b/LLAVA_Biovil/llava/conversation.py @@ -0,0 +1,414 @@ +import dataclasses +from enum import auto, Enum +from typing import List, Tuple + + +class SeparatorStyle(Enum): + """Different separator style.""" + SINGLE = auto() + TWO = auto() + MPT = auto() + PLAIN = auto() + LLAMA_2 = auto() + + +@dataclasses.dataclass +class Conversation: + """A class that keeps all conversation history.""" + system: str + roles: List[str] + messages: List[List[str]] + offset: int + sep_style: SeparatorStyle = SeparatorStyle.SINGLE + sep: str = "###" + sep2: str = None + version: str = "Unknown" + + skip_next: bool = False + + def get_prompt(self): + messages = self.messages + if len(messages) > 0 and type(messages[0][1]) is tuple: + messages = self.messages.copy() + init_role, init_msg = messages[0].copy() + init_msg = init_msg[0].replace("", "").strip() + if 'mmtag' in self.version: + messages[0] = (init_role, init_msg) + messages.insert(0, (self.roles[0], "")) + messages.insert(1, (self.roles[1], "Received.")) + else: + messages[0] = (init_role, "\n" + init_msg) + + if self.sep_style == SeparatorStyle.SINGLE: + ret = self.system + self.sep + for role, message in messages: + if message: + if type(message) is tuple: + message, _, _ = message + ret += role + ": " + message + self.sep + else: + ret += role + ":" + elif self.sep_style == SeparatorStyle.TWO: + seps = [self.sep, self.sep2] + ret = self.system + seps[0] + for i, (role, message) in enumerate(messages): + if message: + if type(message) is tuple: + message, _, _ = message + ret += role + ": " + message + seps[i % 2] + else: + ret += role + ":" + elif self.sep_style == SeparatorStyle.MPT: + ret = self.system + self.sep + for role, message in messages: + if message: + if type(message) is tuple: + message, _, _ = message + ret += role + message + self.sep + else: + ret += role + elif self.sep_style == SeparatorStyle.LLAMA_2: + wrap_sys = lambda msg: f"<>\n{msg}\n<>\n\n" + wrap_inst = lambda msg: f"[INST] {msg} [/INST]" + ret = "" + + for i, (role, message) in enumerate(messages): + if i == 0: + assert message, "first message should not be none" + assert role == self.roles[0], "first message should come from user" + if message: + if type(message) is tuple: + message, _, _ = message + if i == 0: message = wrap_sys(self.system) + message + if i % 2 == 0: + message = wrap_inst(message) + ret += self.sep + message + else: + ret += " " + message + " " + self.sep2 + else: + ret += "" + ret = ret.lstrip(self.sep) + elif self.sep_style == SeparatorStyle.PLAIN: + seps = [self.sep, self.sep2] + ret = self.system + for i, (role, message) in enumerate(messages): + if message: + if type(message) is tuple: + message, _, _ = message + ret += message + seps[i % 2] + else: + ret += "" + else: + raise ValueError(f"Invalid style: {self.sep_style}") + + return ret + + def append_message(self, role, message): + self.messages.append([role, message]) + + def get_images(self, return_pil=False): + images = [] + for i, (role, msg) in enumerate(self.messages[self.offset:]): + if i % 2 == 0: + if type(msg) is tuple: + import base64 + from io import BytesIO + from PIL import Image + msg, image, image_process_mode = msg + if image_process_mode == "Pad": + def expand2square(pil_img, background_color=(122, 116, 104)): + width, height = pil_img.size + if width == height: + return pil_img + elif width > height: + result = Image.new(pil_img.mode, (width, width), background_color) + result.paste(pil_img, (0, (width - height) // 2)) + return result + else: + result = Image.new(pil_img.mode, (height, height), background_color) + result.paste(pil_img, ((height - width) // 2, 0)) + return result + image = expand2square(image) + elif image_process_mode in ["Default", "Crop"]: + pass + elif image_process_mode == "Resize": + image = image.resize((336, 336)) + else: + raise ValueError(f"Invalid image_process_mode: {image_process_mode}") + max_hw, min_hw = max(image.size), min(image.size) + aspect_ratio = max_hw / min_hw + max_len, min_len = 800, 400 + shortest_edge = int(min(max_len / aspect_ratio, min_len, min_hw)) + longest_edge = int(shortest_edge * aspect_ratio) + W, H = image.size + if longest_edge != max(image.size): + if H > W: + H, W = longest_edge, shortest_edge + else: + H, W = shortest_edge, longest_edge + image = image.resize((W, H)) + if return_pil: + images.append(image) + else: + buffered = BytesIO() + image.save(buffered, format="PNG") + img_b64_str = base64.b64encode(buffered.getvalue()).decode() + images.append(img_b64_str) + return images + + def to_gradio_chatbot(self): + ret = [] + for i, (role, msg) in enumerate(self.messages[self.offset:]): + if i % 2 == 0: + if type(msg) is tuple: + import base64 + from io import BytesIO + msg, image, image_process_mode = msg + max_hw, min_hw = max(image.size), min(image.size) + aspect_ratio = max_hw / min_hw + max_len, min_len = 800, 400 + shortest_edge = int(min(max_len / aspect_ratio, min_len, min_hw)) + longest_edge = int(shortest_edge * aspect_ratio) + W, H = image.size + if H > W: + H, W = longest_edge, shortest_edge + else: + H, W = shortest_edge, longest_edge + image = image.resize((W, H)) + buffered = BytesIO() + image.save(buffered, format="JPEG") + img_b64_str = base64.b64encode(buffered.getvalue()).decode() + img_str = f'user upload image' + msg = img_str + msg.replace('', '').strip() + ret.append([msg, None]) + else: + ret.append([msg, None]) + else: + ret[-1][-1] = msg + return ret + + def copy(self): + return Conversation( + system=self.system, + roles=self.roles, + messages=[[x, y] for x, y in self.messages], + offset=self.offset, + sep_style=self.sep_style, + sep=self.sep, + sep2=self.sep2, + version=self.version) + + def dict(self): + if len(self.get_images()) > 0: + return { + "system": self.system, + "roles": self.roles, + "messages": [[x, y[0] if type(y) is tuple else y] for x, y in self.messages], + "offset": self.offset, + "sep": self.sep, + "sep2": self.sep2, + } + return { + "system": self.system, + "roles": self.roles, + "messages": self.messages, + "offset": self.offset, + "sep": self.sep, + "sep2": self.sep2, + } + + +conv_vicuna_v0 = Conversation( + system="A chat between a curious human and an artificial intelligence assistant. " + "The assistant gives helpful, detailed, and polite answers to the human's questions.", + roles=("Human", "Assistant"), + messages=( + ("Human", "What are the key differences between renewable and non-renewable energy sources?"), + ("Assistant", + "Renewable energy sources are those that can be replenished naturally in a relatively " + "short amount of time, such as solar, wind, hydro, geothermal, and biomass. " + "Non-renewable energy sources, on the other hand, are finite and will eventually be " + "depleted, such as coal, oil, and natural gas. Here are some key differences between " + "renewable and non-renewable energy sources:\n" + "1. Availability: Renewable energy sources are virtually inexhaustible, while non-renewable " + "energy sources are finite and will eventually run out.\n" + "2. Environmental impact: Renewable energy sources have a much lower environmental impact " + "than non-renewable sources, which can lead to air and water pollution, greenhouse gas emissions, " + "and other negative effects.\n" + "3. Cost: Renewable energy sources can be more expensive to initially set up, but they typically " + "have lower operational costs than non-renewable sources.\n" + "4. Reliability: Renewable energy sources are often more reliable and can be used in more remote " + "locations than non-renewable sources.\n" + "5. Flexibility: Renewable energy sources are often more flexible and can be adapted to different " + "situations and needs, while non-renewable sources are more rigid and inflexible.\n" + "6. Sustainability: Renewable energy sources are more sustainable over the long term, while " + "non-renewable sources are not, and their depletion can lead to economic and social instability.\n") + ), + offset=2, + sep_style=SeparatorStyle.SINGLE, + sep="###", +) + +conv_vicuna_v1 = Conversation( + # system="A chat between a curious user and an artificial intelligence assistant. " + # "The assistant gives helpful, detailed, and polite answers to the user's questions.", + system="A chat between a curious user and an artificial intelligence assistant acting as an experienced radiologist. " + "The assistant gives professional, detailed, and polite answers to the user's questions.", + roles=("USER", "ASSISTANT"), + version="v1", + messages=[], + offset=0, + sep_style=SeparatorStyle.TWO, + sep=" ", + sep2="", +) + +conv_llava_med = Conversation( + system="A chat between a curious user and an artificial intelligence assistant acting as an experienced radiologist. " + "The assistant gives professional, detailed, and polite answers to the user's questions.", + roles=("USER", "ASSISTANT"), + version="v1", + messages=[], + offset=2, + sep_style=SeparatorStyle.TWO, + sep="###", + sep2="" +) + +simple_conv_multimodal = Conversation( + system="You are LLaVA-Med, a large language and vision assistant trained by a group of researchers at Microsoft, based on the general domain LLaVA architecture." + "You are able to understand the visual content that the user provides, and assist the user with a variety of medical and clinical tasks using natural language." + "Follow the instructions carefully and explain your answers in detail.", + roles=("Human", "Assistant"), + messages=( + ("Human", "Hi!"), + ("Assistant", "Hi there! How can I help you today?\n") + ), + offset=2, + sep_style=SeparatorStyle.SINGLE, + sep="###", +) + +conv_llama_2 = Conversation( + system="""You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. + +If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.""", + roles=("USER", "ASSISTANT"), + version="llama_v2", + messages=(), + offset=0, + sep_style=SeparatorStyle.LLAMA_2, + sep="", + sep2="", +) + +conv_llava_llama_2 = Conversation( + system="You are a helpful language and vision assistant. " + "You are able to understand the visual content that the user provides, " + "and assist the user with a variety of tasks using natural language.", + roles=("USER", "ASSISTANT"), + version="llama_v2", + messages=(), + offset=0, + sep_style=SeparatorStyle.LLAMA_2, + sep="", + sep2="", +) + +conv_mpt = Conversation( + system="""<|im_start|>system +A conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers.""", + roles=("<|im_start|>user\n", "<|im_start|>assistant\n"), + version="mpt", + messages=(), + offset=0, + sep_style=SeparatorStyle.MPT, + sep="<|im_end|>", +) + +conv_llava_plain = Conversation( + system="", + roles=("", ""), + messages=( + ), + offset=0, + sep_style=SeparatorStyle.PLAIN, + sep="\n", +) + +conv_llava_v0 = Conversation( + system="A chat between a curious human and an artificial intelligence assistant. " + "The assistant gives helpful, detailed, and polite answers to the human's questions.", + roles=("Human", "Assistant"), + messages=( + ), + offset=0, + sep_style=SeparatorStyle.SINGLE, + sep="###", +) + +conv_llava_v0_mmtag = Conversation( + system="A chat between a curious user and an artificial intelligence assistant. " + "The assistant is able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language." + "The visual content will be provided with the following format: visual content.", + roles=("Human", "Assistant"), + messages=( + ), + offset=0, + sep_style=SeparatorStyle.SINGLE, + sep="###", + version="v0_mmtag", +) + +conv_llava_v1 = Conversation( + # system="A chat between a curious human and an artificial intelligence assistant. " + # "The assistant gives helpful, detailed, and polite answers to the human's questions.", + system="A chat between a curious user and an artificial intelligence assistant acting as an experienced radiologist. " + "The assistant gives professional, detailed, and polite answers to the user's questions.", + roles=("USER", "ASSISTANT"), + version="v1", + messages=(), + offset=0, + sep_style=SeparatorStyle.TWO, + sep=" ", + sep2="", +) + + +conv_llava_v1_mmtag = Conversation( + system="A chat between a curious user and an artificial intelligence assistant. " + "The assistant is able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language." + "The visual content will be provided with the following format: visual content.", + roles=("USER", "ASSISTANT"), + messages=(), + offset=0, + sep_style=SeparatorStyle.TWO, + sep=" ", + sep2="", + version="v1_mmtag", +) + +default_conversation = conv_vicuna_v1 +conv_templates = { + "default": conv_vicuna_v0, + "v0": conv_vicuna_v0, + "v1": conv_vicuna_v1, + "llava_med": conv_llava_med, + "vicuna_v1": conv_vicuna_v1, + "llama_2": conv_llama_2, + + "plain": conv_llava_plain, + "v0_plain": conv_llava_plain, + "llava_v0": conv_llava_v0, + "v0_mmtag": conv_llava_v0_mmtag, + "llava_v1": conv_llava_v1, + "v1_mmtag": conv_llava_v1_mmtag, + "llava_llama_2": conv_llava_llama_2, + "multimodal": simple_conv_multimodal, + + "mpt": conv_mpt, +} + + +if __name__ == "__main__": + print(default_conversation.get_prompt()) diff --git a/LLAVA_Biovil/llava/eval/__init__.py b/LLAVA_Biovil/llava/eval/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/llava/eval/eval_gpt_review.py b/LLAVA_Biovil/llava/eval/eval_gpt_review.py new file mode 100644 index 0000000000000000000000000000000000000000..8af4559c65fc2728b11fd2097a109981ee1ef686 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_gpt_review.py @@ -0,0 +1,113 @@ +import argparse +import json +import os + +import openai +import tqdm +import ray +import time + +NUM_SECONDS_TO_SLEEP = 3 + +@ray.remote(num_cpus=4) +def get_eval(content: str, max_tokens: int): + while True: + try: + response = openai.ChatCompletion.create( + model='gpt-4', + messages=[{ + 'role': 'system', + 'content': 'You are a helpful and precise assistant for checking the quality of the answer.' + }, { + 'role': 'user', + 'content': content, + }], + temperature=0.2, # TODO: figure out which temperature is best for evaluation + max_tokens=max_tokens, + ) + break + except openai.error.RateLimitError: + pass + except Exception as e: + print(e) + time.sleep(NUM_SECONDS_TO_SLEEP) + + print('success!') + return response['choices'][0]['message']['content'] + + +def parse_score(review): + try: + score_pair = review.split('\n')[0] + score_pair = score_pair.replace(',', ' ') + sp = score_pair.split(' ') + if len(sp) == 2: + return [float(sp[0]), float(sp[1])] + else: + print('error', review) + return [-1, -1] + except Exception as e: + print(e) + print('error', review) + return [-1, -1] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='ChatGPT-based QA evaluation.') + parser.add_argument('-q', '--question') + # parser.add_argument('-a', '--answer') + parser.add_argument('-a', '--answer-list', nargs='+', default=[]) + parser.add_argument('-r', '--rule') + parser.add_argument('-o', '--output') + parser.add_argument('--max-tokens', type=int, default=1024, help='maximum number of tokens produced in the output') + args = parser.parse_args() + + ray.init() + + f_q = open(os.path.expanduser(args.question)) + f_ans1 = open(os.path.expanduser(args.answer_list[0])) + f_ans2 = open(os.path.expanduser(args.answer_list[1])) + rule_dict = json.load(open(os.path.expanduser(args.rule), 'r')) + + review_file = open(f'{args.output}', 'w') + + js_list = [] + handles = [] + idx = 0 + for ques_js, ans1_js, ans2_js in zip(f_q, f_ans1, f_ans2): + # if idx == 1: + # break + + ques = json.loads(ques_js) + ans1 = json.loads(ans1_js) + ans2 = json.loads(ans2_js) + + category = json.loads(ques_js)['category'] + if category in rule_dict: + rule = rule_dict[category] + else: + rule = rule_dict['default'] + prompt = rule['prompt'] + role = rule['role'] + content = (f'[Question]\n{ques["text"]}\n\n' + f'[{role} 1]\n{ans1["text"]}\n\n[End of {role} 1]\n\n' + f'[{role} 2]\n{ans2["text"]}\n\n[End of {role} 2]\n\n' + f'[System]\n{prompt}\n\n') + js_list.append({ + 'id': idx+1, + 'question_id': ques['question_id'], + 'answer1_id': ans1['answer_id'], + 'answer2_id': ans2['answer_id'], + 'category': category}) + idx += 1 + handles.append(get_eval.remote(content, args.max_tokens)) + # To avoid the rate limit set by OpenAI + time.sleep(NUM_SECONDS_TO_SLEEP) + + reviews = ray.get(handles) + for idx, review in enumerate(reviews): + scores = parse_score(review) + js_list[idx]['content'] = review + js_list[idx]['tuple'] = scores + review_file.write(json.dumps(js_list[idx]) + '\n') + review_file.close() diff --git a/LLAVA_Biovil/llava/eval/eval_gpt_review_bench.py b/LLAVA_Biovil/llava/eval/eval_gpt_review_bench.py new file mode 100644 index 0000000000000000000000000000000000000000..06160f2422b5368f30fb967f7cae635208a1dc69 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_gpt_review_bench.py @@ -0,0 +1,121 @@ +import argparse +import json +import os + +import openai +import time + +NUM_SECONDS_TO_SLEEP = 0.5 + + +def get_eval(content: str, max_tokens: int): + while True: + try: + response = openai.ChatCompletion.create( + model='gpt-4-0314', + messages=[{ + 'role': 'system', + 'content': 'You are a helpful and precise assistant for checking the quality of the answer.' + }, { + 'role': 'user', + 'content': content, + }], + temperature=0.2, # TODO: figure out which temperature is best for evaluation + max_tokens=max_tokens, + ) + break + except openai.error.RateLimitError: + pass + except Exception as e: + print(e) + time.sleep(NUM_SECONDS_TO_SLEEP) + + return response['choices'][0]['message']['content'] + + +def parse_score(review): + try: + score_pair = review.split('\n')[0] + score_pair = score_pair.replace(',', ' ') + sp = score_pair.split(' ') + if len(sp) == 2: + return [float(sp[0]), float(sp[1])] + else: + print('error', review) + return [-1, -1] + except Exception as e: + print(e) + print('error', review) + return [-1, -1] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='ChatGPT-based QA evaluation.') + parser.add_argument('-q', '--question') + parser.add_argument('-c', '--context') + parser.add_argument('-a', '--answer-list', nargs='+', default=[]) + parser.add_argument('-r', '--rule') + parser.add_argument('-o', '--output') + parser.add_argument('--max-tokens', type=int, default=1024, help='maximum number of tokens produced in the output') + args = parser.parse_args() + + f_q = open(os.path.expanduser(args.question)) + f_ans1 = open(os.path.expanduser(args.answer_list[0])) + f_ans2 = open(os.path.expanduser(args.answer_list[1])) + rule_dict = json.load(open(os.path.expanduser(args.rule), 'r')) + + if os.path.isfile(os.path.expanduser(args.output)): + cur_reviews = [json.loads(line) for line in open(os.path.expanduser(args.output))] + else: + cur_reviews = [] + + review_file = open(f'{args.output}', 'a') + + context_list = [json.loads(line) for line in open(os.path.expanduser(args.context))] + image_to_context = {context['image']: context for context in context_list} + + handles = [] + idx = 0 + for ques_js, ans1_js, ans2_js in zip(f_q, f_ans1, f_ans2): + ques = json.loads(ques_js) + ans1 = json.loads(ans1_js) + ans2 = json.loads(ans2_js) + + inst = image_to_context[ques['image']] + + if isinstance(inst['caption'], list): + cap_str = '\n'.join(inst['caption']) + else: + cap_str = inst['caption'] + + category = 'llava_bench_' + json.loads(ques_js)['category'] + if category in rule_dict: + rule = rule_dict[category] + else: + assert False, f"Visual QA category not found in rule file: {category}." + prompt = rule['prompt'] + role = rule['role'] + content = (f'[Context]\n{cap_str}\n\n' + f'[Question]\n{ques["text"]}\n\n' + f'[{role} 1]\n{ans1["text"]}\n\n[End of {role} 1]\n\n' + f'[{role} 2]\n{ans2["text"]}\n\n[End of {role} 2]\n\n' + f'[System]\n{prompt}\n\n') + cur_js = { + 'id': idx+1, + 'question_id': ques['question_id'], + 'answer1_id': ans1.get('answer_id', ans1['question_id']), + 'answer2_id': ans2.get('answer_id', ans2['answer_id']), + 'category': category + } + if idx >= len(cur_reviews): + review = get_eval(content, args.max_tokens) + scores = parse_score(review) + cur_js['content'] = review + cur_js['tuple'] = scores + review_file.write(json.dumps(cur_js) + '\n') + review_file.flush() + else: + print(f'Skipping {idx} as we already have it.') + idx += 1 + print(idx) + review_file.close() diff --git a/LLAVA_Biovil/llava/eval/eval_gpt_review_visual.py b/LLAVA_Biovil/llava/eval/eval_gpt_review_visual.py new file mode 100644 index 0000000000000000000000000000000000000000..d6e407a400a67020d801e6c27a3c32a2ee38f30c --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_gpt_review_visual.py @@ -0,0 +1,118 @@ +import argparse +import json +import os + +import openai +import time + +NUM_SECONDS_TO_SLEEP = 0.5 + + +def get_eval(content: str, max_tokens: int): + while True: + try: + response = openai.ChatCompletion.create( + model='gpt-4-0314', + messages=[{ + 'role': 'system', + 'content': 'You are a helpful and precise assistant for checking the quality of the answer.' + }, { + 'role': 'user', + 'content': content, + }], + temperature=0.2, # TODO: figure out which temperature is best for evaluation + max_tokens=max_tokens, + ) + break + except openai.error.RateLimitError: + pass + except Exception as e: + print(e) + time.sleep(NUM_SECONDS_TO_SLEEP) + + return response['choices'][0]['message']['content'] + + +def parse_score(review): + try: + score_pair = review.split('\n')[0] + score_pair = score_pair.replace(',', ' ') + sp = score_pair.split(' ') + if len(sp) == 2: + return [float(sp[0]), float(sp[1])] + else: + print('error', review) + return [-1, -1] + except Exception as e: + print(e) + print('error', review) + return [-1, -1] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='ChatGPT-based QA evaluation.') + parser.add_argument('-q', '--question') + parser.add_argument('-c', '--context') + parser.add_argument('-a', '--answer-list', nargs='+', default=[]) + parser.add_argument('-r', '--rule') + parser.add_argument('-o', '--output') + parser.add_argument('--max-tokens', type=int, default=1024, help='maximum number of tokens produced in the output') + args = parser.parse_args() + + f_q = open(os.path.expanduser(args.question)) + f_ans1 = open(os.path.expanduser(args.answer_list[0])) + f_ans2 = open(os.path.expanduser(args.answer_list[1])) + rule_dict = json.load(open(os.path.expanduser(args.rule), 'r')) + + if os.path.isfile(os.path.expanduser(args.output)): + cur_reviews = [json.loads(line) for line in open(os.path.expanduser(args.output))] + else: + cur_reviews = [] + + review_file = open(f'{args.output}', 'a') + + context_list = [json.loads(line) for line in open(os.path.expanduser(args.context))] + image_to_context = {context['image']: context for context in context_list} + + handles = [] + idx = 0 + for ques_js, ans1_js, ans2_js in zip(f_q, f_ans1, f_ans2): + ques = json.loads(ques_js) + ans1 = json.loads(ans1_js) + ans2 = json.loads(ans2_js) + + inst = image_to_context[ques['image']] + cap_str = '\n'.join(inst['captions']) + box_str = '\n'.join([f'{instance["category"]}: {instance["bbox"]}' for instance in inst['instances']]) + + category = json.loads(ques_js)['category'] + if category in rule_dict: + rule = rule_dict[category] + else: + assert False, f"Visual QA category not found in rule file: {category}." + prompt = rule['prompt'] + role = rule['role'] + content = (f'[Context]\n{cap_str}\n\n{box_str}\n\n' + f'[Question]\n{ques["text"]}\n\n' + f'[{role} 1]\n{ans1["text"]}\n\n[End of {role} 1]\n\n' + f'[{role} 2]\n{ans2["text"]}\n\n[End of {role} 2]\n\n' + f'[System]\n{prompt}\n\n') + cur_js = { + 'id': idx+1, + 'question_id': ques['question_id'], + 'answer1_id': ans1.get('answer_id', ans1['question_id']), + 'answer2_id': ans2.get('answer_id', ans2['answer_id']), + 'category': category + } + if idx >= len(cur_reviews): + review = get_eval(content, args.max_tokens) + scores = parse_score(review) + cur_js['content'] = review + cur_js['tuple'] = scores + review_file.write(json.dumps(cur_js) + '\n') + review_file.flush() + else: + print(f'Skipping {idx} as we already have it.') + idx += 1 + print(idx) + review_file.close() diff --git a/LLAVA_Biovil/llava/eval/eval_pope.py b/LLAVA_Biovil/llava/eval/eval_pope.py new file mode 100644 index 0000000000000000000000000000000000000000..b115b8f2327ea9d972f9e41bcbb03c68be6b3508 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_pope.py @@ -0,0 +1,81 @@ +import os +import json +import argparse + +def eval_pope(answers, label_file): + label_list = [json.loads(q)['label'] for q in open(label_file, 'r')] + + for answer in answers: + text = answer['text'] + + # Only keep the first sentence + if text.find('.') != -1: + text = text.split('.')[0] + + text = text.replace(',', '') + words = text.split(' ') + if 'No' in words or 'not' in words or 'no' in words: + answer['text'] = 'no' + else: + answer['text'] = 'yes' + + for i in range(len(label_list)): + if label_list[i] == 'no': + label_list[i] = 0 + else: + label_list[i] = 1 + + pred_list = [] + for answer in answers: + if answer['text'] == 'no': + pred_list.append(0) + else: + pred_list.append(1) + + pos = 1 + neg = 0 + yes_ratio = pred_list.count(1) / len(pred_list) + + TP, TN, FP, FN = 0, 0, 0, 0 + for pred, label in zip(pred_list, label_list): + if pred == pos and label == pos: + TP += 1 + elif pred == pos and label == neg: + FP += 1 + elif pred == neg and label == neg: + TN += 1 + elif pred == neg and label == pos: + FN += 1 + + print('TP\tFP\tTN\tFN\t') + print('{}\t{}\t{}\t{}'.format(TP, FP, TN, FN)) + + precision = float(TP) / float(TP + FP) + recall = float(TP) / float(TP + FN) + f1 = 2*precision*recall / (precision + recall) + acc = (TP + TN) / (TP + TN + FP + FN) + print('Accuracy: {}'.format(acc)) + print('Precision: {}'.format(precision)) + print('Recall: {}'.format(recall)) + print('F1 score: {}'.format(f1)) + print('Yes ratio: {}'.format(yes_ratio)) + print('%.3f, %.3f, %.3f, %.3f, %.3f' % (f1, acc, precision, recall, yes_ratio) ) + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--annotation-dir", type=str) + parser.add_argument("--question-file", type=str) + parser.add_argument("--result-file", type=str) + args = parser.parse_args() + + questions = [json.loads(line) for line in open(args.question_file)] + questions = {question['question_id']: question for question in questions} + answers = [json.loads(q) for q in open(args.result_file)] + for file in os.listdir(args.annotation_dir): + assert file.startswith('coco_pope_') + assert file.endswith('.json') + category = file[10:-5] + cur_answers = [x for x in answers if questions[x['question_id']]['category'] == category] + print('Category: {}, # samples: {}'.format(category, len(cur_answers))) + eval_pope(cur_answers, os.path.join(args.annotation_dir, file)) + print("====================================") diff --git a/LLAVA_Biovil/llava/eval/eval_science_qa.py b/LLAVA_Biovil/llava/eval/eval_science_qa.py new file mode 100644 index 0000000000000000000000000000000000000000..ccf206bbd7a5d6376eef82d61b3ef8bbe0f71c6c --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_science_qa.py @@ -0,0 +1,114 @@ +import argparse +import json +import os +import re +import random + + +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--base-dir', type=str) + parser.add_argument('--result-file', type=str) + parser.add_argument('--output-file', type=str) + parser.add_argument('--output-result', type=str) + parser.add_argument('--split', type=str, default='test') + parser.add_argument('--options', type=list, default=["A", "B", "C", "D", "E"]) + return parser.parse_args() + + +def convert_caps(results): + fakecaps = [] + for result in results: + image_id = result['question_id'] + caption = result['text'] + fakecaps.append({"image_id": int(image_id), "caption": caption}) + return fakecaps + + +def get_pred_idx(prediction, choices, options): + """ + Get the index (e.g. 2) from the prediction (e.g. 'C') + """ + if prediction in options[:len(choices)]: + return options.index(prediction) + else: + return -1 + return random.choice(range(len(choices))) + + +if __name__ == "__main__": + args = get_args() + + base_dir = args.base_dir + split_indices = json.load(open(os.path.join(base_dir, "pid_splits.json")))[args.split] + problems = json.load(open(os.path.join(base_dir, "problems.json"))) + predictions = [json.loads(line) for line in open(args.result_file)] + predictions = {pred['question_id']: pred for pred in predictions} + split_problems = {idx: problems[idx] for idx in split_indices} + + results = {'correct': [], 'incorrect': []} + sqa_results = {} + sqa_results['acc'] = None + sqa_results['correct'] = None + sqa_results['count'] = None + sqa_results['results'] = {} + sqa_results['outputs'] = {} + + for prob_id, prob in split_problems.items(): + if prob_id not in predictions: + pred = {'text': 'FAILED', 'prompt': 'Unknown'} + pred_text = 'FAILED' + else: + pred = predictions[prob_id] + pred_text = pred['text'] + + if pred_text in args.options: + answer = pred_text + elif len(pred_text) >= 3 and pred_text[0] in args.options and pred_text[1:3] == ". ": + answer = pred_text[0] + else: + pattern = re.compile(r'The answer is ([A-Z]).') + res = pattern.findall(pred_text) + if len(res) == 1: + answer = res[0] # 'A', 'B', ... + else: + answer = "FAILED" + + pred_idx = get_pred_idx(answer, prob['choices'], args.options) + + analysis = { + 'question_id': prob_id, + 'parsed_ans': answer, + 'ground_truth': args.options[prob['answer']], + 'question': pred['prompt'], + 'pred': pred_text, + 'is_multimodal': '' in pred['prompt'], + } + + sqa_results['results'][prob_id] = get_pred_idx(answer, prob['choices'], args.options) + sqa_results['outputs'][prob_id] = pred_text + + if pred_idx == prob['answer']: + results['correct'].append(analysis) + else: + results['incorrect'].append(analysis) + + correct = len(results['correct']) + total = len(results['correct']) + len(results['incorrect']) + + ###### IMG ###### + multimodal_correct = len([x for x in results['correct'] if x['is_multimodal']]) + multimodal_incorrect = len([x for x in results['incorrect'] if x['is_multimodal']]) + multimodal_total = multimodal_correct + multimodal_incorrect + ###### IMG ###### + + print(f'Total: {total}, Correct: {correct}, Accuracy: {correct / total * 100:.2f}%, IMG-Accuracy: {multimodal_correct / multimodal_total * 100:.2f}%') + + sqa_results['acc'] = correct / total * 100 + sqa_results['correct'] = correct + sqa_results['count'] = total + + with open(args.output_file, 'w') as f: + json.dump(results, f, indent=2) + with open(args.output_result, 'w') as f: + json.dump(sqa_results, f, indent=2) diff --git a/LLAVA_Biovil/llava/eval/eval_science_qa_gpt4.py b/LLAVA_Biovil/llava/eval/eval_science_qa_gpt4.py new file mode 100644 index 0000000000000000000000000000000000000000..c2ff17c915481fb556aba6ec816a9e08f519c515 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_science_qa_gpt4.py @@ -0,0 +1,104 @@ +import argparse +import json +import os +import re +import random +from collections import defaultdict + + +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--base-dir', type=str) + parser.add_argument('--gpt4-result', type=str) + parser.add_argument('--our-result', type=str) + parser.add_argument('--split', type=str, default='test') + parser.add_argument('--options', type=list, default=["A", "B", "C", "D", "E"]) + return parser.parse_args() + + +def convert_caps(results): + fakecaps = [] + for result in results: + image_id = result['question_id'] + caption = result['text'] + fakecaps.append({"image_id": int(image_id), "caption": caption}) + return fakecaps + + +def get_pred_idx(prediction, choices, options): + """ + Get the index (e.g. 2) from the prediction (e.g. 'C') + """ + if prediction in options[:len(choices)]: + return options.index(prediction) + else: + return random.choice(range(len(choices))) + + +if __name__ == "__main__": + args = get_args() + + base_dir = args.base_dir + split_indices = json.load(open(os.path.join(base_dir, "pid_splits.json")))[args.split] + problems = json.load(open(os.path.join(base_dir, "problems.json"))) + our_predictions = [json.loads(line) for line in open(args.our_result)] + our_predictions = {pred['question_id']: pred for pred in our_predictions} + split_problems = {idx: problems[idx] for idx in split_indices} + + gpt4_predictions = json.load(open(args.gpt4_result))['outputs'] + + results = defaultdict(lambda: 0) + + for prob_id, prob in split_problems.items(): + if prob_id not in our_predictions: + continue + if prob_id not in gpt4_predictions: + continue + our_pred = our_predictions[prob_id]['text'] + gpt4_pred = gpt4_predictions[prob_id] + + pattern = re.compile(r'The answer is ([A-Z]).') + our_res = pattern.findall(our_pred) + if len(our_res) == 1: + our_answer = our_res[0] # 'A', 'B', ... + else: + our_answer = "FAILED" + gpt4_res = pattern.findall(gpt4_pred) + if len(gpt4_res) == 1: + gpt4_answer = gpt4_res[0] # 'A', 'B', ... + else: + gpt4_answer = "FAILED" + + our_pred_idx = get_pred_idx(our_answer, prob['choices'], args.options) + gpt4_pred_idx = get_pred_idx(gpt4_answer, prob['choices'], args.options) + + if gpt4_answer == 'FAILED': + results['gpt4_failed'] += 1 + # continue + gpt4_pred_idx = our_pred_idx + # if our_pred_idx != prob['answer']: + # print(our_predictions[prob_id]['prompt']) + # print('-----------------') + # print(f'LECTURE: {prob["lecture"]}') + # print(f'SOLUTION: {prob["solution"]}') + # print('=====================') + else: + # continue + pass + # gpt4_pred_idx = our_pred_idx + + if gpt4_pred_idx == prob['answer']: + results['correct'] += 1 + else: + results['incorrect'] += 1 + + + if gpt4_pred_idx == prob['answer'] or our_pred_idx == prob['answer']: + results['correct_upperbound'] += 1 + + correct = results['correct'] + total = results['correct'] + results['incorrect'] + print(f'Total: {total}, Correct: {correct}, Accuracy: {correct / total * 100:.2f}%') + print(f'Total: {total}, Correct (upper): {results["correct_upperbound"]}, Accuracy: {results["correct_upperbound"] / total * 100:.2f}%') + print(f'Total: {total}, GPT-4 NO-ANS (RANDOM): {results["gpt4_failed"]}, Percentage: {results["gpt4_failed"] / total * 100:.2f}%') + diff --git a/LLAVA_Biovil/llava/eval/eval_science_qa_gpt4_requery.py b/LLAVA_Biovil/llava/eval/eval_science_qa_gpt4_requery.py new file mode 100644 index 0000000000000000000000000000000000000000..698546e995d365d1ccc2c25a87e6c5cd681e6eb6 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_science_qa_gpt4_requery.py @@ -0,0 +1,149 @@ +import argparse +import json +import os +import re +import random +from collections import defaultdict + + +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--base-dir', type=str) + parser.add_argument('--gpt4-result', type=str) + parser.add_argument('--requery-result', type=str) + parser.add_argument('--our-result', type=str) + parser.add_argument('--output-result', type=str) + parser.add_argument('--split', type=str, default='test') + parser.add_argument('--options', type=list, default=["A", "B", "C", "D", "E"]) + return parser.parse_args() + + +def convert_caps(results): + fakecaps = [] + for result in results: + image_id = result['question_id'] + caption = result['text'] + fakecaps.append({"image_id": int(image_id), "caption": caption}) + return fakecaps + + +def get_pred_idx(prediction, choices, options): + """ + Get the index (e.g. 2) from the prediction (e.g. 'C') + """ + if prediction in options[:len(choices)]: + return options.index(prediction) + else: + return random.choice(range(len(choices))) + + +if __name__ == "__main__": + args = get_args() + + base_dir = args.base_dir + split_indices = json.load(open(os.path.join(base_dir, "pid_splits.json")))[args.split] + problems = json.load(open(os.path.join(base_dir, "problems.json"))) + our_predictions = [json.loads(line) for line in open(args.our_result)] + our_predictions = {pred['question_id']: pred for pred in our_predictions} + split_problems = {idx: problems[idx] for idx in split_indices} + + requery_predictions = [json.loads(line) for line in open(args.requery_result)] + requery_predictions = {pred['question_id']: pred for pred in requery_predictions} + + gpt4_predictions = json.load(open(args.gpt4_result))['outputs'] + + results = defaultdict(lambda: 0) + + sqa_results = {} + sqa_results['acc'] = None + sqa_results['correct'] = None + sqa_results['count'] = None + sqa_results['results'] = {} + sqa_results['outputs'] = {} + + for prob_id, prob in split_problems.items(): + if prob_id not in our_predictions: + assert False + if prob_id not in gpt4_predictions: + assert False + our_pred = our_predictions[prob_id]['text'] + gpt4_pred = gpt4_predictions[prob_id] + if prob_id not in requery_predictions: + results['missing_requery'] += 1 + requery_pred = "MISSING" + else: + requery_pred = requery_predictions[prob_id]['text'] + + pattern = re.compile(r'The answer is ([A-Z]).') + our_res = pattern.findall(our_pred) + if len(our_res) == 1: + our_answer = our_res[0] # 'A', 'B', ... + else: + our_answer = "FAILED" + + requery_res = pattern.findall(requery_pred) + if len(requery_res) == 1: + requery_answer = requery_res[0] # 'A', 'B', ... + else: + requery_answer = "FAILED" + + gpt4_res = pattern.findall(gpt4_pred) + if len(gpt4_res) == 1: + gpt4_answer = gpt4_res[0] # 'A', 'B', ... + else: + gpt4_answer = "FAILED" + + our_pred_idx = get_pred_idx(our_answer, prob['choices'], args.options) + gpt4_pred_idx = get_pred_idx(gpt4_answer, prob['choices'], args.options) + requery_pred_idx = get_pred_idx(requery_answer, prob['choices'], args.options) + + results['total'] += 1 + + if gpt4_answer == 'FAILED': + results['gpt4_failed'] += 1 + if gpt4_pred_idx == prob['answer']: + results['gpt4_correct'] += 1 + if our_pred_idx == prob['answer']: + results['gpt4_ourvisual_correct'] += 1 + elif gpt4_pred_idx == prob['answer']: + results['gpt4_correct'] += 1 + results['gpt4_ourvisual_correct'] += 1 + + if our_pred_idx == prob['answer']: + results['our_correct'] += 1 + + if requery_answer == 'FAILED': + sqa_results['results'][prob_id] = our_pred_idx + if our_pred_idx == prob['answer']: + results['requery_correct'] += 1 + else: + sqa_results['results'][prob_id] = requery_pred_idx + if requery_pred_idx == prob['answer']: + results['requery_correct'] += 1 + else: + print(f""" +Question ({args.options[prob['answer']]}): {our_predictions[prob_id]['prompt']} +Our ({our_answer}): {our_pred} +GPT-4 ({gpt4_answer}): {gpt4_pred} +Requery ({requery_answer}): {requery_pred} +print("=====================================") +""") + + if gpt4_pred_idx == prob['answer'] or our_pred_idx == prob['answer']: + results['correct_upperbound'] += 1 + + total = results['total'] + print(f'Total: {total}, Our-Correct: {results["our_correct"]}, Accuracy: {results["our_correct"] / total * 100:.2f}%') + print(f'Total: {total}, GPT-4-Correct: {results["gpt4_correct"]}, Accuracy: {results["gpt4_correct"] / total * 100:.2f}%') + print(f'Total: {total}, GPT-4 NO-ANS (RANDOM): {results["gpt4_failed"]}, Percentage: {results["gpt4_failed"] / total * 100:.2f}%') + print(f'Total: {total}, GPT-4-OursVisual-Correct: {results["gpt4_ourvisual_correct"]}, Accuracy: {results["gpt4_ourvisual_correct"] / total * 100:.2f}%') + print(f'Total: {total}, Requery-Correct: {results["requery_correct"]}, Accuracy: {results["requery_correct"] / total * 100:.2f}%') + print(f'Total: {total}, Correct upper: {results["correct_upperbound"]}, Accuracy: {results["correct_upperbound"] / total * 100:.2f}%') + + sqa_results['acc'] = results["requery_correct"] / total * 100 + sqa_results['correct'] = results["requery_correct"] + sqa_results['count'] = total + + with open(args.output_result, 'w') as f: + json.dump(sqa_results, f, indent=2) + diff --git a/LLAVA_Biovil/llava/eval/eval_textvqa.py b/LLAVA_Biovil/llava/eval/eval_textvqa.py new file mode 100644 index 0000000000000000000000000000000000000000..838b09e81df1ec9843c84908d39e14e418ba9d47 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/eval_textvqa.py @@ -0,0 +1,65 @@ +import os +import argparse +import json +import re + +from LLAV.llava.eval.m4c_evaluator import TextVQAAccuracyEvaluator + + +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--annotation-file', type=str) + parser.add_argument('--result-file', type=str) + parser.add_argument('--result-dir', type=str) + return parser.parse_args() + + +def prompt_processor(prompt): + if prompt.startswith('OCR tokens: '): + pattern = r"Question: (.*?) Short answer:" + match = re.search(pattern, prompt, re.DOTALL) + question = match.group(1) + elif 'Reference OCR token: ' in prompt and len(prompt.split('\n')) == 3: + if prompt.startswith('Reference OCR token:'): + question = prompt.split('\n')[1] + else: + question = prompt.split('\n')[0] + elif len(prompt.split('\n')) == 2: + question = prompt.split('\n')[0] + else: + assert False + + return question.lower() + + +def eval_single(annotation_file, result_file): + experiment_name = os.path.splitext(os.path.basename(result_file))[0] + print(experiment_name) + annotations = json.load(open(annotation_file))['data'] + annotations = {(annotation['image_id'], annotation['question'].lower()): annotation for annotation in annotations} + results = [json.loads(line) for line in open(result_file)] + + pred_list = [] + for result in results: + annotation = annotations[(result['question_id'], prompt_processor(result['prompt']))] + pred_list.append({ + "pred_answer": result['text'], + "gt_answers": annotation['answers'], + }) + + evaluator = TextVQAAccuracyEvaluator() + print('Samples: {}\nAccuracy: {:.2f}%\n'.format(len(pred_list), 100. * evaluator.eval_pred_list(pred_list))) + + +if __name__ == "__main__": + args = get_args() + + if args.result_file is not None: + eval_single(args.annotation_file, args.result_file) + + if args.result_dir is not None: + for result_file in sorted(os.listdir(args.result_dir)): + if not result_file.endswith('.jsonl'): + print(f'Skipping {result_file}') + continue + eval_single(args.annotation_file, os.path.join(args.result_dir, result_file)) diff --git a/LLAVA_Biovil/llava/eval/generate_webpage_data_from_table.py b/LLAVA_Biovil/llava/eval/generate_webpage_data_from_table.py new file mode 100644 index 0000000000000000000000000000000000000000..92602258ccd953a1d7137056aaf15c8de8166e21 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/generate_webpage_data_from_table.py @@ -0,0 +1,111 @@ +"""Generate json file for webpage.""" +import json +import os +import re + +# models = ['llama', 'alpaca', 'gpt35', 'bard'] +models = ['vicuna'] + + +def read_jsonl(path: str, key: str=None): + data = [] + with open(os.path.expanduser(path)) as f: + for line in f: + if not line: + continue + data.append(json.loads(line)) + if key is not None: + data.sort(key=lambda x: x[key]) + data = {item[key]: item for item in data} + return data + + +def trim_hanging_lines(s: str, n: int) -> str: + s = s.strip() + for _ in range(n): + s = s.split('\n', 1)[1].strip() + return s + + +if __name__ == '__main__': + questions = read_jsonl('table/question.jsonl', key='question_id') + + # alpaca_answers = read_jsonl('table/answer/answer_alpaca-13b.jsonl', key='question_id') + # bard_answers = read_jsonl('table/answer/answer_bard.jsonl', key='question_id') + # gpt35_answers = read_jsonl('table/answer/answer_gpt35.jsonl', key='question_id') + # llama_answers = read_jsonl('table/answer/answer_llama-13b.jsonl', key='question_id') + vicuna_answers = read_jsonl('table/answer/answer_vicuna-13b.jsonl', key='question_id') + ours_answers = read_jsonl('table/results/llama-13b-hf-alpaca.jsonl', key='question_id') + + review_vicuna = read_jsonl('table/review/review_vicuna-13b_llama-13b-hf-alpaca.jsonl', key='question_id') + # review_alpaca = read_jsonl('table/review/review_alpaca-13b_vicuna-13b.jsonl', key='question_id') + # review_bard = read_jsonl('table/review/review_bard_vicuna-13b.jsonl', key='question_id') + # review_gpt35 = read_jsonl('table/review/review_gpt35_vicuna-13b.jsonl', key='question_id') + # review_llama = read_jsonl('table/review/review_llama-13b_vicuna-13b.jsonl', key='question_id') + + records = [] + for qid in questions.keys(): + r = { + 'id': qid, + 'category': questions[qid]['category'], + 'question': questions[qid]['text'], + 'answers': { + # 'alpaca': alpaca_answers[qid]['text'], + # 'llama': llama_answers[qid]['text'], + # 'bard': bard_answers[qid]['text'], + # 'gpt35': gpt35_answers[qid]['text'], + 'vicuna': vicuna_answers[qid]['text'], + 'ours': ours_answers[qid]['text'], + }, + 'evaluations': { + # 'alpaca': review_alpaca[qid]['text'], + # 'llama': review_llama[qid]['text'], + # 'bard': review_bard[qid]['text'], + 'vicuna': review_vicuna[qid]['content'], + # 'gpt35': review_gpt35[qid]['text'], + }, + 'scores': { + 'vicuna': review_vicuna[qid]['tuple'], + # 'alpaca': review_alpaca[qid]['score'], + # 'llama': review_llama[qid]['score'], + # 'bard': review_bard[qid]['score'], + # 'gpt35': review_gpt35[qid]['score'], + }, + } + + # cleanup data + cleaned_evals = {} + for k, v in r['evaluations'].items(): + v = v.strip() + lines = v.split('\n') + # trim the first line if it's a pair of numbers + if re.match(r'\d+[, ]+\d+', lines[0]): + lines = lines[1:] + v = '\n'.join(lines) + cleaned_evals[k] = v.replace('Assistant 1', "**Assistant 1**").replace('Assistant 2', '**Assistant 2**') + + r['evaluations'] = cleaned_evals + records.append(r) + + # Reorder the records, this is optional + for r in records: + if r['id'] <= 20: + r['id'] += 60 + else: + r['id'] -= 20 + for r in records: + if r['id'] <= 50: + r['id'] += 10 + elif 50 < r['id'] <= 60: + r['id'] -= 50 + for r in records: + if r['id'] == 7: + r['id'] = 1 + elif r['id'] < 7: + r['id'] += 1 + + records.sort(key=lambda x: x['id']) + + # Write to file + with open('webpage/data.json', 'w') as f: + json.dump({'questions': records, 'models': models}, f, indent=2) diff --git a/LLAVA_Biovil/llava/eval/m4c_evaluator.py b/LLAVA_Biovil/llava/eval/m4c_evaluator.py new file mode 100644 index 0000000000000000000000000000000000000000..e30e958da061a4f0a0bfe34b12d2fcaeba7ff2f4 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/m4c_evaluator.py @@ -0,0 +1,334 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +import re + +from tqdm import tqdm + + +class EvalAIAnswerProcessor: + """ + Processes an answer similar to Eval AI + copied from + https://github.com/facebookresearch/mmf/blob/c46b3b3391275b4181567db80943473a89ab98ab/pythia/tasks/processors.py#L897 + """ + + CONTRACTIONS = { + "aint": "ain't", + "arent": "aren't", + "cant": "can't", + "couldve": "could've", + "couldnt": "couldn't", + "couldn'tve": "couldn't've", + "couldnt've": "couldn't've", + "didnt": "didn't", + "doesnt": "doesn't", + "dont": "don't", + "hadnt": "hadn't", + "hadnt've": "hadn't've", + "hadn'tve": "hadn't've", + "hasnt": "hasn't", + "havent": "haven't", + "hed": "he'd", + "hed've": "he'd've", + "he'dve": "he'd've", + "hes": "he's", + "howd": "how'd", + "howll": "how'll", + "hows": "how's", + "Id've": "I'd've", + "I'dve": "I'd've", + "Im": "I'm", + "Ive": "I've", + "isnt": "isn't", + "itd": "it'd", + "itd've": "it'd've", + "it'dve": "it'd've", + "itll": "it'll", + "let's": "let's", + "maam": "ma'am", + "mightnt": "mightn't", + "mightnt've": "mightn't've", + "mightn'tve": "mightn't've", + "mightve": "might've", + "mustnt": "mustn't", + "mustve": "must've", + "neednt": "needn't", + "notve": "not've", + "oclock": "o'clock", + "oughtnt": "oughtn't", + "ow's'at": "'ow's'at", + "'ows'at": "'ow's'at", + "'ow'sat": "'ow's'at", + "shant": "shan't", + "shed've": "she'd've", + "she'dve": "she'd've", + "she's": "she's", + "shouldve": "should've", + "shouldnt": "shouldn't", + "shouldnt've": "shouldn't've", + "shouldn'tve": "shouldn't've", + "somebody'd": "somebodyd", + "somebodyd've": "somebody'd've", + "somebody'dve": "somebody'd've", + "somebodyll": "somebody'll", + "somebodys": "somebody's", + "someoned": "someone'd", + "someoned've": "someone'd've", + "someone'dve": "someone'd've", + "someonell": "someone'll", + "someones": "someone's", + "somethingd": "something'd", + "somethingd've": "something'd've", + "something'dve": "something'd've", + "somethingll": "something'll", + "thats": "that's", + "thered": "there'd", + "thered've": "there'd've", + "there'dve": "there'd've", + "therere": "there're", + "theres": "there's", + "theyd": "they'd", + "theyd've": "they'd've", + "they'dve": "they'd've", + "theyll": "they'll", + "theyre": "they're", + "theyve": "they've", + "twas": "'twas", + "wasnt": "wasn't", + "wed've": "we'd've", + "we'dve": "we'd've", + "weve": "we've", + "werent": "weren't", + "whatll": "what'll", + "whatre": "what're", + "whats": "what's", + "whatve": "what've", + "whens": "when's", + "whered": "where'd", + "wheres": "where's", + "whereve": "where've", + "whod": "who'd", + "whod've": "who'd've", + "who'dve": "who'd've", + "wholl": "who'll", + "whos": "who's", + "whove": "who've", + "whyll": "why'll", + "whyre": "why're", + "whys": "why's", + "wont": "won't", + "wouldve": "would've", + "wouldnt": "wouldn't", + "wouldnt've": "wouldn't've", + "wouldn'tve": "wouldn't've", + "yall": "y'all", + "yall'll": "y'all'll", + "y'allll": "y'all'll", + "yall'd've": "y'all'd've", + "y'alld've": "y'all'd've", + "y'all'dve": "y'all'd've", + "youd": "you'd", + "youd've": "you'd've", + "you'dve": "you'd've", + "youll": "you'll", + "youre": "you're", + "youve": "you've", + } + + NUMBER_MAP = { + "none": "0", + "zero": "0", + "one": "1", + "two": "2", + "three": "3", + "four": "4", + "five": "5", + "six": "6", + "seven": "7", + "eight": "8", + "nine": "9", + "ten": "10", + } + ARTICLES = ["a", "an", "the"] + PERIOD_STRIP = re.compile(r"(?!<=\d)(\.)(?!\d)") + COMMA_STRIP = re.compile(r"(?<=\d)(\,)+(?=\d)") + PUNCTUATIONS = [ + ";", + r"/", + "[", + "]", + '"', + "{", + "}", + "(", + ")", + "=", + "+", + "\\", + "_", + "-", + ">", + "<", + "@", + "`", + ",", + "?", + "!", + ] + + def __init__(self, *args, **kwargs): + pass + + def word_tokenize(self, word): + word = word.lower() + word = word.replace(",", "").replace("?", "").replace("'s", " 's") + return word.strip() + + def process_punctuation(self, in_text): + out_text = in_text + for p in self.PUNCTUATIONS: + if (p + " " in in_text or " " + p in in_text) or ( + re.search(self.COMMA_STRIP, in_text) is not None + ): + out_text = out_text.replace(p, "") + else: + out_text = out_text.replace(p, " ") + out_text = self.PERIOD_STRIP.sub("", out_text, re.UNICODE) + return out_text + + def process_digit_article(self, in_text): + out_text = [] + temp_text = in_text.lower().split() + for word in temp_text: + word = self.NUMBER_MAP.setdefault(word, word) + if word not in self.ARTICLES: + out_text.append(word) + else: + pass + for word_id, word in enumerate(out_text): + if word in self.CONTRACTIONS: + out_text[word_id] = self.CONTRACTIONS[word] + out_text = " ".join(out_text) + return out_text + + def __call__(self, item): + item = self.word_tokenize(item) + item = item.replace("\n", " ").replace("\t", " ").strip() + item = self.process_punctuation(item) + item = self.process_digit_article(item) + return item + + +class TextVQAAccuracyEvaluator: + def __init__(self): + self.answer_processor = EvalAIAnswerProcessor() + + def _compute_answer_scores(self, raw_answers): + """ + compute the accuracy (soft score) of human answers + """ + answers = [self.answer_processor(a) for a in raw_answers] + assert len(answers) == 10 + gt_answers = list(enumerate(answers)) + unique_answers = set(answers) + unique_answer_scores = {} + + for unique_answer in unique_answers: + accs = [] + for gt_answer in gt_answers: + other_answers = [item for item in gt_answers if item != gt_answer] + matching_answers = [ + item for item in other_answers if item[1] == unique_answer + ] + acc = min(1, float(len(matching_answers)) / 3) + accs.append(acc) + unique_answer_scores[unique_answer] = sum(accs) / len(accs) + + return unique_answer_scores + + def eval_pred_list(self, pred_list): + pred_scores = [] + for entry in tqdm(pred_list): + pred_answer = self.answer_processor(entry["pred_answer"]) + unique_answer_scores = self._compute_answer_scores(entry["gt_answers"]) + score = unique_answer_scores.get(pred_answer, 0.0) + pred_scores.append(score) + + accuracy = sum(pred_scores) / len(pred_scores) + return accuracy + + +class STVQAAccuracyEvaluator: + def __init__(self): + self.answer_processor = EvalAIAnswerProcessor() + + def eval_pred_list(self, pred_list): + pred_scores = [] + for entry in pred_list: + pred_answer = self.answer_processor(entry["pred_answer"]) + gts = [self.answer_processor(a) for a in entry["gt_answers"]] + score = 1.0 if pred_answer in gts else 0.0 + pred_scores.append(score) + + accuracy = sum(pred_scores) / len(pred_scores) + return accuracy + + +class STVQAANLSEvaluator: + def __init__(self): + import editdistance # install with `pip install editdistance` + + self.get_edit_distance = editdistance.eval + + def get_anls(self, s1, s2): + s1 = s1.lower().strip() + s2 = s2.lower().strip() + iou = 1 - self.get_edit_distance(s1, s2) / max(len(s1), len(s2)) + anls = iou if iou >= 0.5 else 0.0 + return anls + + def eval_pred_list(self, pred_list): + pred_scores = [] + for entry in pred_list: + anls = max( + self.get_anls(entry["pred_answer"], gt) for gt in entry["gt_answers"] + ) + pred_scores.append(anls) + + accuracy = sum(pred_scores) / len(pred_scores) + return accuracy + + +class TextCapsBleu4Evaluator: + def __init__(self): + # The following script requires Java 1.8.0 and pycocotools installed. + # The pycocoevalcap can be installed with pip as + # pip install git+https://github.com/ronghanghu/coco-caption.git@python23 + # Original pycocoevalcap code is at https://github.com/tylin/coco-caption + # but has no python3 support yet. + try: + from pycocoevalcap.bleu.bleu import Bleu + from pycocoevalcap.tokenizer.ptbtokenizer import PTBTokenizer + except ModuleNotFoundError: + print( + "Please install pycocoevalcap module using " + "pip install git+https://github.com/ronghanghu/coco-caption.git@python23" # noqa + ) + raise + + self.tokenizer = PTBTokenizer() + self.scorer = Bleu(4) + + def eval_pred_list(self, pred_list): + # Create reference and hypotheses captions. + gts = {} + res = {} + for idx, entry in enumerate(pred_list): + gts[idx] = [{"caption": a} for a in entry["gt_answers"]] + res[idx] = [{"caption": entry["pred_answer"]}] + + gts = self.tokenizer.tokenize(gts) + res = self.tokenizer.tokenize(res) + score, _ = self.scorer.compute_score(gts, res) + + bleu4 = score[3] # score is (Bleu-1, Bleu-2, Bleu-3, Bleu-4) + return bleu4 diff --git a/LLAVA_Biovil/llava/eval/model_qa.py b/LLAVA_Biovil/llava/eval/model_qa.py new file mode 100644 index 0000000000000000000000000000000000000000..6fa3ef1263aadf63ef75187bbffbee8b23908ad9 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/model_qa.py @@ -0,0 +1,85 @@ +import argparse +from transformers import AutoTokenizer, AutoModelForCausalLM, StoppingCriteria +import torch +import os +import json +from tqdm import tqdm +import shortuuid + +from LLAV.llava.conversation import default_conversation +from LLAV.llava.utils import disable_torch_init + + +# new stopping implementation +class KeywordsStoppingCriteria(StoppingCriteria): + def __init__(self, keywords, tokenizer, input_ids): + self.keywords = keywords + self.tokenizer = tokenizer + self.start_len = None + self.input_ids = input_ids + + def __call__(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool: + if self.start_len is None: + self.start_len = self.input_ids.shape[1] + else: + outputs = self.tokenizer.batch_decode(output_ids[:, self.start_len:], skip_special_tokens=True)[0] + for keyword in self.keywords: + if keyword in outputs: + return True + return False + + +@torch.inference_mode() +def eval_model(model_name, questions_file, answers_file): + # Model + disable_torch_init() + model_name = os.path.expanduser(model_name) + tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False) + model = AutoModelForCausalLM.from_pretrained(model_name, + torch_dtype=torch.float16).cuda() + + + ques_file = open(os.path.expanduser(questions_file), "r") + ans_file = open(os.path.expanduser(answers_file), "w") + for i, line in enumerate(tqdm(ques_file)): + idx = json.loads(line)["question_id"] + qs = json.loads(line)["text"] + cat = json.loads(line)["category"] + conv = default_conversation.copy() + conv.append_message(conv.roles[0], qs) + prompt = conv.get_prompt() + inputs = tokenizer([prompt]) + input_ids = torch.as_tensor(inputs.input_ids).cuda() + stopping_criteria = KeywordsStoppingCriteria([conv.sep], tokenizer, input_ids) + output_ids = model.generate( + input_ids, + do_sample=True, + use_cache=True, + temperature=0.7, + max_new_tokens=1024, + stopping_criteria=[stopping_criteria]) + outputs = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0] + try: + index = outputs.index(conv.sep, len(prompt)) + except ValueError: + outputs += conv.sep + index = outputs.index(conv.sep, len(prompt)) + + outputs = outputs[len(prompt) + len(conv.roles[1]) + 2:index].strip() + ans_id = shortuuid.uuid() + ans_file.write(json.dumps({"question_id": idx, + "text": outputs, + "answer_id": ans_id, + "model_id": model_name, + "metadata": {}}) + "\n") + ans_file.flush() + ans_file.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-name", type=str, default="facebook/opt-350m") + parser.add_argument("--question-file", type=str, default="tables/question.jsonl") + parser.add_argument("--answers-file", type=str, default="answer.jsonl") + args = parser.parse_args() + + eval_model(args.model_name, args.question_file, args.answers_file) diff --git a/LLAVA_Biovil/llava/eval/model_vqa.py b/LLAVA_Biovil/llava/eval/model_vqa.py new file mode 100644 index 0000000000000000000000000000000000000000..c5add17b231f410bba4291f70174665c60509932 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/model_vqa.py @@ -0,0 +1,112 @@ +import argparse +import torch +import os +import json +from tqdm import tqdm +import shortuuid + +from LLAV.llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from LLAV.llava.conversation import conv_templates, SeparatorStyle +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.utils import disable_torch_init +from LLAV.llava.mm_utils import tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria + +from PIL import Image +import math + + +def split_list(lst, n): + """Split a list into n (roughly) equal-sized chunks""" + chunk_size = math.ceil(len(lst) / n) # integer division + return [lst[i:i+chunk_size] for i in range(0, len(lst), chunk_size)] + + +def get_chunk(lst, n, k): + chunks = split_list(lst, n) + return chunks[k] + + +def eval_model(args): + # Model + disable_torch_init() + model_path = os.path.expanduser(args.model_path) + model_name = get_model_name_from_path(model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(model_path, args.model_base, model_name) + + questions = [json.loads(q) for q in open(os.path.expanduser(args.question_file), "r")] + questions = get_chunk(questions, args.num_chunks, args.chunk_idx) + answers_file = os.path.expanduser(args.answers_file) + os.makedirs(os.path.dirname(answers_file), exist_ok=True) + ans_file = open(answers_file, "w") + for line in tqdm(questions): + idx = line["question_id"] + image_file = line["image"] + qs = line["text"] + cur_prompt = qs + if model.config.mm_use_im_start_end: + qs = DEFAULT_IM_START_TOKEN + DEFAULT_IMAGE_TOKEN + DEFAULT_IM_END_TOKEN + '\n' + qs + else: + qs = DEFAULT_IMAGE_TOKEN + '\n' + qs + + conv = conv_templates[args.conv_mode].copy() + conv.append_message(conv.roles[0], qs) + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() + + image = Image.open(os.path.join(args.image_folder, image_file)) + image_tensor = image_processor.preprocess(image, return_tensors='pt')['pixel_values'][0] + + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + keywords = [stop_str] + stopping_criteria = KeywordsStoppingCriteria(keywords, tokenizer, input_ids) + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=image_tensor.unsqueeze(0).half().cuda(), + do_sample=True if args.temperature > 0 else False, + temperature=args.temperature, + top_p=args.top_p, + num_beams=args.num_beams, + # no_repeat_ngram_size=3, + max_new_tokens=1024, + use_cache=True) + + input_token_len = input_ids.shape[1] + n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item() + if n_diff_input_output > 0: + print(f'[Warning] {n_diff_input_output} output_ids are not the same as the input_ids') + outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0] + outputs = outputs.strip() + if outputs.endswith(stop_str): + outputs = outputs[:-len(stop_str)] + outputs = outputs.strip() + + ans_id = shortuuid.uuid() + ans_file.write(json.dumps({"question_id": idx, + "prompt": cur_prompt, + "text": outputs, + "answer_id": ans_id, + "model_id": model_name, + "metadata": {}}) + "\n") + ans_file.flush() + ans_file.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, default="facebook/opt-350m") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--image-folder", type=str, default="") + parser.add_argument("--question-file", type=str, default="tables/question.jsonl") + parser.add_argument("--answers-file", type=str, default="answer.jsonl") + parser.add_argument("--conv-mode", type=str, default="llava_v1") + parser.add_argument("--num-chunks", type=int, default=1) + parser.add_argument("--chunk-idx", type=int, default=0) + parser.add_argument("--temperature", type=float, default=0.2) + parser.add_argument("--top_p", type=float, default=None) + parser.add_argument("--num_beams", type=int, default=1) + args = parser.parse_args() + + eval_model(args) diff --git a/LLAVA_Biovil/llava/eval/model_vqa_loader.py b/LLAVA_Biovil/llava/eval/model_vqa_loader.py new file mode 100644 index 0000000000000000000000000000000000000000..e8e0b31e68d5cd477acf890b7d0aa09aa11853a7 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/model_vqa_loader.py @@ -0,0 +1,141 @@ +import argparse +import torch +import os +import json +from tqdm import tqdm +import shortuuid + +from LLAV.llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from LLAV.llava.conversation import conv_templates +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.utils import disable_torch_init +from LLAV.llava.mm_utils import tokenizer_image_token, process_images, get_model_name_from_path +from torch.utils.data import Dataset, DataLoader + +from PIL import Image +import math + + +def split_list(lst, n): + """Split a list into n (roughly) equal-sized chunks""" + chunk_size = math.ceil(len(lst) / n) # integer division + return [lst[i:i+chunk_size] for i in range(0, len(lst), chunk_size)] + + +def get_chunk(lst, n, k): + chunks = split_list(lst, n) + return chunks[k] + + +# Custom dataset class +class CustomDataset(Dataset): + def __init__(self, questions, image_folder, tokenizer, image_processor, model_config): + self.questions = questions + self.image_folder = image_folder + self.tokenizer = tokenizer + self.image_processor = image_processor + self.model_config = model_config + + def __getitem__(self, index): + line = self.questions[index] + image_file = line["image"] + qs = line["text"] + if self.model_config.mm_use_im_start_end: + qs = DEFAULT_IM_START_TOKEN + DEFAULT_IMAGE_TOKEN + DEFAULT_IM_END_TOKEN + '\n' + qs + else: + qs = DEFAULT_IMAGE_TOKEN + '\n' + qs + + conv = conv_templates[args.conv_mode].copy() + conv.append_message(conv.roles[0], qs) + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + image = Image.open(os.path.join(self.image_folder, image_file)).convert('RGB') + image_tensor = process_images([image], self.image_processor, self.model_config)[0] + + input_ids = tokenizer_image_token(prompt, self.tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt') + + return input_ids, image_tensor + + def __len__(self): + return len(self.questions) + + +# DataLoader +def create_data_loader(questions, image_folder, tokenizer, image_processor, model_config, batch_size=1, num_workers=4): + assert batch_size == 1, "batch_size must be 1" + dataset = CustomDataset(questions, image_folder, tokenizer, image_processor, model_config) + data_loader = DataLoader(dataset, batch_size=batch_size, num_workers=num_workers, shuffle=False) + return data_loader + + +def eval_model(args): + # Model + disable_torch_init() + model_path = os.path.expanduser(args.model_path) + model_name = get_model_name_from_path(model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(model_path, args.model_base, model_name) + + questions = [json.loads(q) for q in open(os.path.expanduser(args.question_file), "r")] + questions = get_chunk(questions, args.num_chunks, args.chunk_idx) + answers_file = os.path.expanduser(args.answers_file) + os.makedirs(os.path.dirname(answers_file), exist_ok=True) + ans_file = open(answers_file, "w") + + if 'plain' in model_name and 'finetune' not in model_name.lower() and 'mmtag' not in args.conv_mode: + args.conv_mode = args.conv_mode + '_mmtag' + print(f'It seems that this is a plain model, but it is not using a mmtag prompt, auto switching to {args.conv_mode}.') + + data_loader = create_data_loader(questions, args.image_folder, tokenizer, image_processor, model.config) + + for (input_ids, image_tensor), line in tqdm(zip(data_loader, questions), total=len(questions)): + idx = line["question_id"] + cur_prompt = line["text"] + + input_ids = input_ids.to(device='cuda', non_blocking=True) + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=image_tensor.to(dtype=torch.float16, device='cuda', non_blocking=True), + do_sample=True if args.temperature > 0 else False, + temperature=args.temperature, + top_p=args.top_p, + num_beams=args.num_beams, + max_new_tokens=args.max_new_tokens, + use_cache=True) + + input_token_len = input_ids.shape[1] + n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item() + if n_diff_input_output > 0: + print(f'[Warning] {n_diff_input_output} output_ids are not the same as the input_ids') + outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0] + outputs = outputs.strip() + + ans_id = shortuuid.uuid() + ans_file.write(json.dumps({"question_id": idx, + "prompt": cur_prompt, + "text": outputs, + "answer_id": ans_id, + "model_id": model_name, + "metadata": {}}) + "\n") + # ans_file.flush() + ans_file.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, default="facebook/opt-350m") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--image-folder", type=str, default="") + parser.add_argument("--question-file", type=str, default="tables/question.jsonl") + parser.add_argument("--answers-file", type=str, default="answer.jsonl") + parser.add_argument("--conv-mode", type=str, default="llava_v1") + parser.add_argument("--num-chunks", type=int, default=1) + parser.add_argument("--chunk-idx", type=int, default=0) + parser.add_argument("--temperature", type=float, default=0.2) + parser.add_argument("--top_p", type=float, default=None) + parser.add_argument("--num_beams", type=int, default=1) + parser.add_argument("--max_new_tokens", type=int, default=128) + args = parser.parse_args() + + eval_model(args) diff --git a/LLAVA_Biovil/llava/eval/model_vqa_mmbench.py b/LLAVA_Biovil/llava/eval/model_vqa_mmbench.py new file mode 100644 index 0000000000000000000000000000000000000000..e1622d0f785b808e9965a37ce37b89c69519de5e --- /dev/null +++ b/LLAVA_Biovil/llava/eval/model_vqa_mmbench.py @@ -0,0 +1,169 @@ +import argparse +import torch +import os +import json +import pandas as pd +from tqdm import tqdm +import shortuuid + +from LLAV.llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from LLAV.llava.conversation import conv_templates, SeparatorStyle +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.utils import disable_torch_init +from LLAV.llava.mm_utils import tokenizer_image_token, process_images, load_image_from_base64, get_model_name_from_path + +import math + + +all_options = ['A', 'B', 'C', 'D'] + + +def split_list(lst, n): + """Split a list into n (roughly) equal-sized chunks""" + chunk_size = math.ceil(len(lst) / n) # integer division + return [lst[i:i+chunk_size] for i in range(0, len(lst), chunk_size)] + + +def get_chunk(lst, n, k): + chunks = split_list(lst, n) + return chunks[k] + + +def is_none(value): + if value is None: + return True + if type(value) is float and math.isnan(value): + return True + if type(value) is str and value.lower() == 'nan': + return True + if type(value) is str and value.lower() == 'none': + return True + return False + +def get_options(row, options): + parsed_options = [] + for option in options: + option_value = row[option] + if is_none(option_value): + break + parsed_options.append(option_value) + return parsed_options + + +def eval_model(args): + # Model + disable_torch_init() + model_path = os.path.expanduser(args.model_path) + model_name = get_model_name_from_path(model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(model_path, args.model_base, model_name) + + questions = pd.read_table(os.path.expanduser(args.question_file)) + questions = get_chunk(questions, args.num_chunks, args.chunk_idx) + answers_file = os.path.expanduser(args.answers_file) + os.makedirs(os.path.dirname(answers_file), exist_ok=True) + ans_file = open(answers_file, "w") + + if 'plain' in model_name and 'finetune' not in model_name.lower() and 'mmtag' not in args.conv_mode: + args.conv_mode = args.conv_mode + '_mmtag' + print(f'It seems that this is a plain model, but it is not using a mmtag prompt, auto switching to {args.conv_mode}.') + + for index, row in tqdm(questions.iterrows(), total=len(questions)): + options = get_options(row, all_options) + cur_option_char = all_options[:len(options)] + + if args.all_rounds: + num_rounds = len(options) + else: + num_rounds = 1 + + for round_idx in range(num_rounds): + idx = row['index'] + question = row['question'] + hint = row['hint'] + image = load_image_from_base64(row['image']) + if not is_none(hint): + question = hint + '\n' + question + for option_char, option in zip(all_options[:len(options)], options): + question = question + '\n' + option_char + '. ' + option + qs = cur_prompt = question + if model.config.mm_use_im_start_end: + qs = DEFAULT_IM_START_TOKEN + DEFAULT_IMAGE_TOKEN + DEFAULT_IM_END_TOKEN + '\n' + qs + else: + qs = DEFAULT_IMAGE_TOKEN + '\n' + qs + + if args.single_pred_prompt: + if args.lang == 'cn': + qs = qs + '\n' + "请直接回答选项字母。" + else: + qs = qs + '\n' + "Answer with the option's letter from the given choices directly." + + conv = conv_templates[args.conv_mode].copy() + conv.append_message(conv.roles[0], qs) + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() + + image_tensor = process_images([image], image_processor, model.config)[0] + # image_tensor = image_processor.preprocess(image, return_tensors='pt')['pixel_values'][0] + + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=image_tensor.unsqueeze(0).half().cuda(), + do_sample=True if args.temperature > 0 else False, + temperature=args.temperature, + top_p=args.top_p, + num_beams=args.num_beams, + # no_repeat_ngram_size=3, + max_new_tokens=1024, + use_cache=True) + + input_token_len = input_ids.shape[1] + n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item() + if n_diff_input_output > 0: + print(f'[Warning] {n_diff_input_output} output_ids are not the same as the input_ids') + outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0] + outputs = outputs.strip() + if outputs.endswith(stop_str): + outputs = outputs[:-len(stop_str)] + outputs = outputs.strip() + + ans_id = shortuuid.uuid() + ans_file.write(json.dumps({"question_id": idx, + "round_id": round_idx, + "prompt": cur_prompt, + "text": outputs, + "options": options, + "option_char": cur_option_char, + "answer_id": ans_id, + "model_id": model_name, + "metadata": {}}) + "\n") + ans_file.flush() + + # rotate options + options = options[1:] + options[:1] + cur_option_char = cur_option_char[1:] + cur_option_char[:1] + ans_file.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, default="facebook/opt-350m") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--image-folder", type=str, default="") + parser.add_argument("--question-file", type=str, default="tables/question.jsonl") + parser.add_argument("--answers-file", type=str, default="answer.jsonl") + parser.add_argument("--conv-mode", type=str, default="llava_v1") + parser.add_argument("--num-chunks", type=int, default=1) + parser.add_argument("--chunk-idx", type=int, default=0) + parser.add_argument("--temperature", type=float, default=0.2) + parser.add_argument("--top_p", type=float, default=None) + parser.add_argument("--num_beams", type=int, default=1) + parser.add_argument("--all-rounds", action="store_true") + parser.add_argument("--single-pred-prompt", action="store_true") + parser.add_argument("--lang", type=str, default="en") + args = parser.parse_args() + + eval_model(args) diff --git a/LLAVA_Biovil/llava/eval/model_vqa_qbench.py b/LLAVA_Biovil/llava/eval/model_vqa_qbench.py new file mode 100644 index 0000000000000000000000000000000000000000..6cca9f5e39f7aea76a64115506d77864eba3507d --- /dev/null +++ b/LLAVA_Biovil/llava/eval/model_vqa_qbench.py @@ -0,0 +1,120 @@ +import argparse +import torch +from tqdm import tqdm +import json + +from LLAV.llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from LLAV.llava.conversation import conv_templates, SeparatorStyle +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.utils import disable_torch_init +from LLAV.llava.mm_utils import tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria + +import requests +from PIL import Image +from io import BytesIO + + +def load_image(image_file): + if image_file.startswith('http') or image_file.startswith('https'): + response = requests.get(image_file) + image = Image.open(BytesIO(response.content)).convert('RGB') + else: + image = Image.open(image_file).convert('RGB') + return image + + +def eval_model(args): + # Model + disable_torch_init() + + model_name = get_model_name_from_path(args.model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, True) + + + + + with open(args.questions_file) as f: + llvqa_data = json.load(f) + + for i, llddata in enumerate(tqdm(llvqa_data)): + filename = llddata["img_path"] + if args.lang == "en": + message = llddata["question"] + "\nChoose between one of the options as follows:\n" + elif args.lang == "zh": + message = llddata["question"] + "\在下列选项中选择一个:\n" + else: + raise NotImplementedError("Q-Bench does not support languages other than English (en) and Chinese (zh) yet. Contact us (https://github.com/VQAssessment/Q-Bench/) to convert Q-Bench into more languages.") + for choice, ans in zip(["A.", "B.", "C.", "D."], llddata["candidates"]): + message += f"{choice} {ans}\n" + qs = message + + if model.config.mm_use_im_start_end: + qs = DEFAULT_IM_START_TOKEN + DEFAULT_IMAGE_TOKEN + DEFAULT_IM_END_TOKEN + '\n' + qs + else: + qs = DEFAULT_IMAGE_TOKEN + '\n' + qs + + if 'llama-2' in model_name.lower(): + conv_mode = "llava_llama_2" + elif "v1" in model_name.lower(): + conv_mode = "llava_v1" + elif "mpt" in model_name.lower(): + conv_mode = "mpt" + else: + conv_mode = "llava_v0" + + if args.conv_mode is not None and conv_mode != args.conv_mode: + print('[WARNING] the auto inferred conversation mode is {}, while `--conv-mode` is {}, using {}'.format(conv_mode, args.conv_mode, args.conv_mode)) + else: + args.conv_mode = conv_mode + + conv = conv_templates[args.conv_mode].copy() + conv.append_message(conv.roles[0], qs) + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + image = load_image(args.image_folder + filename) + image_tensor = image_processor.preprocess(image, return_tensors='pt')['pixel_values'].half().cuda() + + input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() + + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + keywords = [stop_str] + stopping_criteria = KeywordsStoppingCriteria(keywords, tokenizer, input_ids) + + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=image_tensor, + num_beams=1, + do_sample=False, + temperature=0, + max_new_tokens=1024, + use_cache=True, + stopping_criteria=[stopping_criteria]) + + input_token_len = input_ids.shape[1] + n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item() + if n_diff_input_output > 0: + print(f'[Warning] {n_diff_input_output} output_ids are not the same as the input_ids') + outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0] + outputs = outputs.strip() + if outputs.endswith(stop_str): + outputs = outputs[:-len(stop_str)] + outputs = outputs.strip() + llddata["response"] = outputs + with open(args.answers_file, "a") as wf: + json.dump(llddata, wf) + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, default="llava-v1.5") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--image-folder", type=str, default="./playground/data/qbench/images_llvisionqa") + parser.add_argument("--questions-file", type=str, default="./playground/data/qbench/llvisionqa_dev.json") + parser.add_argument("--answers-file", type=str, default="answer.jsonl") + parser.add_argument("--conv-mode", type=str, default="llava_v1") + parser.add_argument("--lang", type=str, default="en") + args = parser.parse_args() + + eval_model(args) diff --git a/LLAVA_Biovil/llava/eval/model_vqa_science.py b/LLAVA_Biovil/llava/eval/model_vqa_science.py new file mode 100644 index 0000000000000000000000000000000000000000..a99f3da2b0787e5758eb49d51996ee1efc722d3b --- /dev/null +++ b/LLAVA_Biovil/llava/eval/model_vqa_science.py @@ -0,0 +1,147 @@ +import argparse +import torch +import os +import json +from tqdm import tqdm +import shortuuid + +from LLAV.llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from LLAV.llava.conversation import conv_templates, SeparatorStyle +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.utils import disable_torch_init +from LLAV.llava.mm_utils import tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria + +from PIL import Image +import math + + +def split_list(lst, n): + """Split a list into n (roughly) equal-sized chunks""" + chunk_size = math.ceil(len(lst) / n) # integer division + return [lst[i:i+chunk_size] for i in range(0, len(lst), chunk_size)] + + +def get_chunk(lst, n, k): + chunks = split_list(lst, n) + return chunks[k] + + +def eval_model(args): + # Model + disable_torch_init() + model_path = os.path.expanduser(args.model_path) + model_name = get_model_name_from_path(model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(model_path, args.model_base, model_name) + + questions = json.load(open(os.path.expanduser(args.question_file), "r")) + questions = get_chunk(questions, args.num_chunks, args.chunk_idx) + answers_file = os.path.expanduser(args.answers_file) + os.makedirs(os.path.dirname(answers_file), exist_ok=True) + ans_file = open(answers_file, "w") + for i, line in enumerate(tqdm(questions)): + idx = line["id"] + question = line['conversations'][0] + qs = question['value'].replace('', '').strip() + cur_prompt = qs + + if 'image' in line: + image_file = line["image"] + image = Image.open(os.path.join(args.image_folder, image_file)) + image_tensor = image_processor.preprocess(image, return_tensors='pt')['pixel_values'][0] + images = image_tensor.unsqueeze(0).half().cuda() + if getattr(model.config, 'mm_use_im_start_end', False): + qs = DEFAULT_IM_START_TOKEN + DEFAULT_IMAGE_TOKEN + DEFAULT_IM_END_TOKEN + '\n' + qs + else: + qs = DEFAULT_IMAGE_TOKEN + '\n' + qs + cur_prompt = '' + '\n' + cur_prompt + else: + images = None + + if args.single_pred_prompt: + qs = qs + '\n' + "Answer with the option's letter from the given choices directly." + cur_prompt = cur_prompt + '\n' + "Answer with the option's letter from the given choices directly." + + conv = conv_templates[args.conv_mode].copy() + conv.append_message(conv.roles[0], qs) + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() + + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + keywords = [stop_str] + stopping_criteria = [KeywordsStoppingCriteria(keywords, tokenizer, input_ids)] if conv.version == "v0" else None + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=images, + do_sample=True if args.temperature > 0 else False, + temperature=args.temperature, + max_new_tokens=1024, + use_cache=True, + stopping_criteria=stopping_criteria, + ) + + input_token_len = input_ids.shape[1] + n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item() + if n_diff_input_output > 0: + print(f'[Warning] {n_diff_input_output} output_ids are not the same as the input_ids') + outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0] + outputs = outputs.strip() + if outputs.endswith(stop_str): + outputs = outputs[:-len(stop_str)] + outputs = outputs.strip() + + # prompt for answer + if args.answer_prompter: + outputs_reasoning = outputs + input_ids = tokenizer_image_token(prompt + outputs_reasoning + ' ###\nANSWER:', tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=images, + do_sample=True if args.temperature > 0 else False, + temperature=args.temperature, + max_new_tokens=64, + use_cache=True, + stopping_criteria=[stopping_criteria]) + + input_token_len = input_ids.shape[1] + n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item() + if n_diff_input_output > 0: + print(f'[Warning] {n_diff_input_output} output_ids are not the same as the input_ids') + outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0] + outputs = outputs.strip() + if outputs.endswith(stop_str): + outputs = outputs[:-len(stop_str)] + outputs = outputs.strip() + outputs = outputs_reasoning + '\n The answer is ' + outputs + + ans_id = shortuuid.uuid() + ans_file.write(json.dumps({"question_id": idx, + "prompt": cur_prompt, + "text": outputs, + "answer_id": ans_id, + "model_id": model_name, + "metadata": {}}) + "\n") + ans_file.flush() + ans_file.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, default="facebook/opt-350m") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--image-folder", type=str, default="") + parser.add_argument("--question-file", type=str, default="tables/question.json") + parser.add_argument("--answers-file", type=str, default="answer.jsonl") + parser.add_argument("--conv-mode", type=str, default="llava_v0") + parser.add_argument("--num-chunks", type=int, default=1) + parser.add_argument("--chunk-idx", type=int, default=0) + parser.add_argument("--temperature", type=float, default=0.2) + parser.add_argument("--answer-prompter", action="store_true") + parser.add_argument("--single-pred-prompt", action="store_true") + args = parser.parse_args() + + eval_model(args) diff --git a/LLAVA_Biovil/llava/eval/qa_baseline_gpt35.py b/LLAVA_Biovil/llava/eval/qa_baseline_gpt35.py new file mode 100644 index 0000000000000000000000000000000000000000..babab6e12b4bb8cfa74a7edfa5e56cd1b3e2bf6c --- /dev/null +++ b/LLAVA_Biovil/llava/eval/qa_baseline_gpt35.py @@ -0,0 +1,74 @@ +"""Generate answers with GPT-3.5""" +# Note: you need to be using OpenAI Python v0.27.0 for the code below to work +import argparse +import json +import os +import time +import concurrent.futures + +import openai +import tqdm +import shortuuid + +MODEL = 'gpt-3.5-turbo' +MODEL_ID = 'gpt-3.5-turbo:20230327' + +def get_answer(question_id: int, question: str, max_tokens: int): + ans = { + 'answer_id': shortuuid.uuid(), + 'question_id': question_id, + 'model_id': MODEL_ID, + } + for _ in range(3): + try: + response = openai.ChatCompletion.create( + model=MODEL, + messages=[{ + 'role': 'system', + 'content': 'You are a helpful assistant.' + }, { + 'role': 'user', + 'content': question, + }], + max_tokens=max_tokens, + ) + ans['text'] = response['choices'][0]['message']['content'] + return ans + except Exception as e: + print('[ERROR]', e) + ans['text'] = '#ERROR#' + time.sleep(1) + return ans + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='ChatGPT answer generation.') + parser.add_argument('-q', '--question') + parser.add_argument('-o', '--output') + parser.add_argument('--max-tokens', type=int, default=1024, help='maximum number of tokens produced in the output') + args = parser.parse_args() + + questions_dict = {} + with open(os.path.expanduser(args.question)) as f: + for line in f: + if not line: + continue + q = json.loads(line) + questions_dict[q['question_id']] = q['text'] + + answers = [] + + with concurrent.futures.ThreadPoolExecutor(max_workers=32) as executor: + futures = [] + for qid, question in questions_dict.items(): + future = executor.submit(get_answer, qid, question, args.max_tokens) + futures.append(future) + + for future in tqdm.tqdm(concurrent.futures.as_completed(futures), total=len(futures)): + answers.append(future.result()) + + answers.sort(key=lambda x: x['question_id']) + + with open(os.path.expanduser(args.output), 'w') as f: + table = [json.dumps(ans) for ans in answers] + f.write('\n'.join(table)) diff --git a/LLAVA_Biovil/llava/eval/run_llava.py b/LLAVA_Biovil/llava/eval/run_llava.py new file mode 100644 index 0000000000000000000000000000000000000000..84df731419fc62669340cc34e8b325162507211e --- /dev/null +++ b/LLAVA_Biovil/llava/eval/run_llava.py @@ -0,0 +1,155 @@ +import argparse +import torch + +from LLAV.llava.constants import ( + IMAGE_TOKEN_INDEX, + DEFAULT_IMAGE_TOKEN, + DEFAULT_IM_START_TOKEN, + DEFAULT_IM_END_TOKEN, + IMAGE_PLACEHOLDER, +) +from LLAV.llava.conversation import conv_templates, SeparatorStyle +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.utils import disable_torch_init +from LLAV.llava.mm_utils import ( + process_images, + tokenizer_image_token, + get_model_name_from_path, + KeywordsStoppingCriteria, +) + +import requests +from PIL import Image +from io import BytesIO +import re + + +def image_parser(args): + out = args.image_file.split(args.sep) + return out + + +def load_image(image_file): + if image_file.startswith("http") or image_file.startswith("https"): + response = requests.get(image_file) + image = Image.open(BytesIO(response.content)).convert("RGB") + else: + image = Image.open(image_file).convert("RGB") + return image + + +def load_images(image_files): + out = [] + for image_file in image_files: + image = load_image(image_file) + out.append(image) + return out + + +def eval_model(args): + # Model + disable_torch_init() + + model_name = get_model_name_from_path(args.model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model( + args.model_path, args.model_base, model_name + ) + + qs = args.query + image_token_se = DEFAULT_IM_START_TOKEN + DEFAULT_IMAGE_TOKEN + DEFAULT_IM_END_TOKEN + if IMAGE_PLACEHOLDER in qs: + if model.config.mm_use_im_start_end: + qs = re.sub(IMAGE_PLACEHOLDER, image_token_se, qs) + else: + qs = re.sub(IMAGE_PLACEHOLDER, DEFAULT_IMAGE_TOKEN, qs) + else: + if model.config.mm_use_im_start_end: + qs = image_token_se + "\n" + qs + else: + qs = DEFAULT_IMAGE_TOKEN + "\n" + qs + + if "llama-2" in model_name.lower(): + conv_mode = "llava_llama_2" + elif "v1" in model_name.lower(): + conv_mode = "llava_v1" + elif "mpt" in model_name.lower(): + conv_mode = "mpt" + else: + conv_mode = "llava_v0" + + if args.conv_mode is not None and conv_mode != args.conv_mode: + print( + "[WARNING] the auto inferred conversation mode is {}, while `--conv-mode` is {}, using {}".format( + conv_mode, args.conv_mode, args.conv_mode + ) + ) + else: + args.conv_mode = conv_mode + + conv = conv_templates[args.conv_mode].copy() + conv.append_message(conv.roles[0], qs) + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + image_files = image_parser(args) + images = load_images(image_files) + images_tensor = process_images( + images, + image_processor, + model.config + ).to(model.device, dtype=torch.float16) + + input_ids = ( + tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors="pt") + .unsqueeze(0) + .cuda() + ) + + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + keywords = [stop_str] + stopping_criteria = KeywordsStoppingCriteria(keywords, tokenizer, input_ids) + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=images_tensor, + do_sample=True if args.temperature > 0 else False, + temperature=args.temperature, + top_p=args.top_p, + num_beams=args.num_beams, + max_new_tokens=args.max_new_tokens, + use_cache=True, + stopping_criteria=[stopping_criteria], + ) + + input_token_len = input_ids.shape[1] + n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item() + if n_diff_input_output > 0: + print( + f"[Warning] {n_diff_input_output} output_ids are not the same as the input_ids" + ) + outputs = tokenizer.batch_decode( + output_ids[:, input_token_len:], skip_special_tokens=True + )[0] + outputs = outputs.strip() + if outputs.endswith(stop_str): + outputs = outputs[: -len(stop_str)] + outputs = outputs.strip() + print(outputs) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, default="facebook/opt-350m") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--image-file", type=str, required=True) + parser.add_argument("--query", type=str, required=True) + parser.add_argument("--conv-mode", type=str, default=None) + parser.add_argument("--sep", type=str, default=",") + parser.add_argument("--temperature", type=float, default=0.2) + parser.add_argument("--top_p", type=float, default=None) + parser.add_argument("--num_beams", type=int, default=1) + parser.add_argument("--max_new_tokens", type=int, default=512) + args = parser.parse_args() + + eval_model(args) diff --git a/LLAVA_Biovil/llava/eval/summarize_gpt_review.py b/LLAVA_Biovil/llava/eval/summarize_gpt_review.py new file mode 100644 index 0000000000000000000000000000000000000000..0f796a3880341739677a5fe3bfbcc90515a0f324 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/summarize_gpt_review.py @@ -0,0 +1,60 @@ +import json +import os +from collections import defaultdict + +import numpy as np + +import argparse + +def parse_args(): + parser = argparse.ArgumentParser(description='ChatGPT-based QA evaluation.') + parser.add_argument('-d', '--dir', default=None) + parser.add_argument('-v', '--version', default=None) + parser.add_argument('-s', '--select', nargs='*', default=None) + parser.add_argument('-f', '--files', nargs='*', default=[]) + parser.add_argument('-i', '--ignore', nargs='*', default=[]) + return parser.parse_args() + + +if __name__ == '__main__': + args = parse_args() + + if args.ignore is not None: + args.ignore = [int(x) for x in args.ignore] + + if len(args.files) > 0: + review_files = args.files + else: + review_files = [x for x in os.listdir(args.dir) if x.endswith('.jsonl') and (x.startswith('gpt4_text') or x.startswith('reviews_') or x.startswith('review_') or 'review' in args.dir)] + + for review_file in sorted(review_files): + config = os.path.basename(review_file).replace('gpt4_text_', '').replace('.jsonl', '') + if args.select is not None and any(x not in config for x in args.select): + continue + if '0613' in config: + version = '0613' + else: + version = '0314' + if args.version is not None and args.version != version: + continue + scores = defaultdict(list) + print(config) + with open(os.path.join(args.dir, review_file) if args.dir is not None else review_file) as f: + for review_str in f: + review = json.loads(review_str) + if review['question_id'] in args.ignore: + continue + if 'category' in review: + scores[review['category']].append(review['tuple']) + scores['all'].append(review['tuple']) + else: + if 'tuple' in review: + scores['all'].append(review['tuple']) + else: + scores['all'].append(review['score']) + for k, v in sorted(scores.items()): + stats = np.asarray(v).mean(0).tolist() + stats = [round(x, 3) for x in stats] + # print(k, stats, round(stats[1]/stats[0]*100, 1)) + print(k, round(stats[1]/stats[0]*100, 1), round(stats[0] * 10, 1), round(stats[1] * 10, 1)) + print('=================================') diff --git a/LLAVA_Biovil/llava/eval/webpage/figures/alpaca.png b/LLAVA_Biovil/llava/eval/webpage/figures/alpaca.png new file mode 100644 index 0000000000000000000000000000000000000000..497a702ab5efb88b8f67333eae81645eecea78cd Binary files /dev/null and b/LLAVA_Biovil/llava/eval/webpage/figures/alpaca.png differ diff --git a/LLAVA_Biovil/llava/eval/webpage/figures/bard.jpg b/LLAVA_Biovil/llava/eval/webpage/figures/bard.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5b32cb501799175e3829f92b014795ad1cbee79d Binary files /dev/null and b/LLAVA_Biovil/llava/eval/webpage/figures/bard.jpg differ diff --git a/LLAVA_Biovil/llava/eval/webpage/figures/chatgpt.svg b/LLAVA_Biovil/llava/eval/webpage/figures/chatgpt.svg new file mode 100644 index 0000000000000000000000000000000000000000..8147382a3152de03c24b4cd91f9870ced1a95d54 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/webpage/figures/chatgpt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/LLAVA_Biovil/llava/eval/webpage/figures/llama.jpg b/LLAVA_Biovil/llava/eval/webpage/figures/llama.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7217e5dc1bb683453204a20890f01f5806ce12cf Binary files /dev/null and b/LLAVA_Biovil/llava/eval/webpage/figures/llama.jpg differ diff --git a/LLAVA_Biovil/llava/eval/webpage/figures/swords_FILL0_wght300_GRAD0_opsz48.svg b/LLAVA_Biovil/llava/eval/webpage/figures/swords_FILL0_wght300_GRAD0_opsz48.svg new file mode 100644 index 0000000000000000000000000000000000000000..3bee468d34515fdcbef1a8b8803c9fc4f7dc0b34 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/webpage/figures/swords_FILL0_wght300_GRAD0_opsz48.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/LLAVA_Biovil/llava/eval/webpage/figures/vicuna.jpeg b/LLAVA_Biovil/llava/eval/webpage/figures/vicuna.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e7883dc886b96d078883e01aefd16792133e204a Binary files /dev/null and b/LLAVA_Biovil/llava/eval/webpage/figures/vicuna.jpeg differ diff --git a/LLAVA_Biovil/llava/eval/webpage/index.html b/LLAVA_Biovil/llava/eval/webpage/index.html new file mode 100644 index 0000000000000000000000000000000000000000..c2e3cf020ba7d8e064f2cd801788a5d2d50b97da --- /dev/null +++ b/LLAVA_Biovil/llava/eval/webpage/index.html @@ -0,0 +1,162 @@ + + + + + + Who's GPT-4's favorite? Battles between State-of-the-Art Chatbots + + + + + + + + +
+

Who's GPT-4's favorite? Battles between State-of-the-Art Chatbots

+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+
+ + +
+
+ +
+
+
+ other logo +
+
+
+
+ + +
+
+
+
+ vicuna logo +
+
+
+ +
+
+ + +
+
+
+ + +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assistant #2 (Vicuna, our model) +
+
+
+
+
+
+
+
+
+
+ + +
+
GPT-4 Evaluation
+
+
+
+
+
+
+
+
+ +
+
+ This website is co-authored with GPT-4. +
+
+ + + + + + + + + + + + + diff --git a/LLAVA_Biovil/llava/eval/webpage/script.js b/LLAVA_Biovil/llava/eval/webpage/script.js new file mode 100644 index 0000000000000000000000000000000000000000..4b71e3d5618a262e4746f58e5d10947b73370dca --- /dev/null +++ b/LLAVA_Biovil/llava/eval/webpage/script.js @@ -0,0 +1,245 @@ +// Description: Script for the evaluation webpage. + +let currentQuestionIndex = 1; + +// Store the model name mapping for later use. +modelNameMapping = { + "gpt35": "ChatGPT-3.5", + "gpt4": "GPT-4", + "alpaca": "Alpaca-13b", + "vicuna": "Vicuna-13b", + "llama": "LLaMA-13b", + "bard": "Bard", +}; + +modelFigureMapping = { + "vicuna": "figures/vicuna.jpeg", + // Image from: https://commons.wikimedia.org/wiki/File:ChatGPT_logo.svg + "gpt35": "figures/chatgpt.svg", + // Image from: https://www.reddit.com/r/logodesign/comments/1128aat/google_ai_bard_logo_design/ + "bard": "figures/bard.jpg", + // Image from: https://crfm.stanford.edu/2023/03/13/alpaca.html + "alpaca": "figures/alpaca.png", + // Image adapted from https://commons.wikimedia.org/wiki/File:Llama_on_Machu_Picchu.jpg + "llama": "figures/llama.jpg", +} + +// Store the question data in a mapping for later use. +questionMapping = {}; +// Store the question ids in a mapping for later use. +categoryMapping = {}; +// Store the number of questions for later use. +questionsCount = 0; + + +function text2Markdown(text) { + // Normalize the text for markdown rendering. + text = text.trim().replaceAll('\n\n', '\n').replaceAll('\n', '\n\n'); + return marked.parse(text); +} + +function capitalizeFirstChar(str) { + if (!str || str.length === 0) { + return str; + } + return str.charAt(0).toUpperCase() + str.slice(1); +} + +function updateQuestionSelect(question_id) { + const select = document.getElementById('question-select'); + // Clear the question select. + select.innerHTML = ''; + // Populate the question select. + category = questionMapping[question_id].category; + categoryMapping[category].forEach(question_id => { + const question = questionMapping[question_id]; + const option = document.createElement('option'); + option.value = question_id; + option.textContent = 'Q' + question_id.toString() + ': ' + question.question; + select.appendChild(option); + }); + select.value = question_id; +} + +function updateModelSelect() { + const select = document.getElementById('model-select'); + img_path = modelFigureMapping[select.value]; + document.getElementById('other-model-figure').src = img_path; +} + +function populateModels(models) { + const select = document.getElementById('model-select'); + models.forEach(model => { + const option = document.createElement('option'); + option.value = model; + option.textContent = modelNameMapping[model]; + select.appendChild(option); + }); + updateModelSelect(); +} + +function populateQuestions(questions) { + const category_select = document.getElementById('category-select'); + + questionsCount = questions.length; + questions.forEach(question => { + const option = document.createElement('option'); + // Store the question data in a mapping for later use. + questionMapping[question.id] = { + category: question.category, + question: question.question, + answers: question.answers, + evaluations: question.evaluations, + scores: question.scores, + }; + // Store the question id in the category mapping. + if (question.category in categoryMapping) { + categoryMapping[question.category].push(question.id); + } else { + categoryMapping[question.category] = [question.id]; + const category_option = document.createElement('option'); + category_option.value = question.category; + category_option.textContent = capitalizeFirstChar(question.category); + category_select.appendChild(category_option); + } + }); + // Set the default category. + updateQuestionSelect(currentQuestionIndex); +} + +function displayQuestion(index) { + const question = questionMapping[index].question; + document.getElementById('selected-question').innerHTML = text2Markdown('**Question:** ' + question); + displayAnswers(index); +} + +function displayAnswers(index) { + const question = questionMapping[index]; + const otherModel = document.getElementById('model-select').value; + // render the answers with markdown + document.getElementById('other-model-answer').innerHTML = text2Markdown(question.answers[otherModel]); + document.getElementById('our-model-answer').innerHTML = text2Markdown(question.answers.vicuna); + + // Display evaluation + score = question.scores[otherModel]; + score_text = modelNameMapping[otherModel] + " " + score[0] + "/10, Vicuna-13b " + score[1] + "/10"; + document.getElementById('evaluation-header').textContent = "GPT-4 Evaluation" + " (Score: " + score_text + ")"; + document.getElementById('evaluation-result').innerHTML = text2Markdown(question.evaluations[otherModel]); + + // Update model names + let assistant1_title = "Assistant #1"; // (" + modelNameMapping[otherModel] + ")"; + let assistant2_title = "Assistant #2 (Vicuna-13b, our model)"; + // Update scores/labels. + let assistant1_score_label = score[0].toString() + '/10'; + let assistant2_score_label = score[1].toString() + '/10'; + + const colorRed ='#fa9'; // '#eb978d'; + // const colorGreen = '#c9f2c9'; + const colorBlue = '#8ef'; // '#71dbf9'; + const colorYellow = '#fe7'; // '#fada57'; + let otherModelHeaderColor = ''; + let ourModelHeaderColor = ''; + // Update the winner. + if (score[0] == score[1]) { + assistant1_title = '🏆 ' + assistant1_title; + assistant1_score_label = '🏆 ' + assistant1_score_label; + assistant2_title = '🏆 ' + assistant2_title; + assistant2_score_label = '🏆 ' + assistant2_score_label; + otherModelHeaderColor = colorYellow; + ourModelHeaderColor = colorYellow; + } else if (score[0] > score[1]) { + assistant1_title = '🏆 ' + assistant1_title; + assistant1_score_label = '🏆 ' + assistant1_score_label; + otherModelHeaderColor = colorBlue; + ourModelHeaderColor = colorRed; + } else if (score[0] < score[1]) { + assistant2_title = '🏆 ' + assistant2_title; + assistant2_score_label = '🏆 ' + assistant2_score_label; + otherModelHeaderColor = colorRed; + ourModelHeaderColor = colorBlue; + } + + document.getElementById('other-model-header-bg').style.backgroundColor = otherModelHeaderColor; + document.getElementById('our-model-header').style.backgroundColor = ourModelHeaderColor; + + document.getElementById('other-model-header').textContent = assistant1_title; + document.getElementById('our-model-header').textContent = assistant2_title; + + document.getElementById('other-score-label').textContent = assistant1_score_label; + document.getElementById('our-score-label').textContent = assistant2_score_label; + + // Update expand buttons visibility for both cards after displaying answers + // Reset the expanded state and update expand buttons visibility for both cards after displaying answers + document.querySelectorAll('.expandable-card').forEach(card => { + card.classList.remove('expanded'); + updateExpandButtonVisibility(card); + const expandBtn = card.querySelector('.expand-btn'); + expandBtn.innerHTML = 'keyboard_arrow_down Show more'; // .textContent = 'Show more'; + }); +} + +document.getElementById('question-select').addEventListener('change', e => { + currentQuestionIndex = parseInt(e.target.value); + displayQuestion(currentQuestionIndex); +}); + +document.getElementById('category-select').addEventListener('change', e => { + let currentCategory = e.target.value; + const questionIds = categoryMapping[currentCategory]; + currentQuestionIndex = questionIds[0]; + updateQuestionSelect(currentQuestionIndex); + displayQuestion(currentQuestionIndex); +}); + +// Update expand buttons whenever the model is changed +document.getElementById('model-select').addEventListener('change', () => { + displayAnswers(currentQuestionIndex); + document.querySelectorAll('.expandable-card').forEach(card => { + updateExpandButtonVisibility(card); + }); + updateModelSelect(); +}); + +function switchQuestionAndCategory() { + document.getElementById('question-select').value = currentQuestionIndex; + old_category = document.getElementById('category-select').value; + new_category = questionMapping[currentQuestionIndex].category; + if (old_category != new_category) { + document.getElementById('category-select').value = new_category; + updateQuestionSelect(currentQuestionIndex); + } + displayQuestion(currentQuestionIndex); +} + +document.getElementById('prev-question').addEventListener('click', () => { + // Question index starts from 1. + currentQuestionIndex = Math.max(1, currentQuestionIndex - 1); + switchQuestionAndCategory(); +}); + +document.getElementById('next-question').addEventListener('click', () => { + // Question index starts from 1. + currentQuestionIndex = Math.min(questionsCount, currentQuestionIndex + 1); + switchQuestionAndCategory(); +}); + +function updateExpandButtonVisibility(card) { + const cardTextContainer = card.querySelector('.card-text-container'); + const expandBtn = card.querySelector('.expand-btn'); + if (cardTextContainer.scrollHeight > cardTextContainer.offsetHeight) { + expandBtn.style.display = 'flex'; + } else { + expandBtn.style.display = 'none'; + card.classList.add('expanded'); + } +} + +document.querySelectorAll('.expand-btn').forEach(btn => { + btn.addEventListener('click', e => { + const card = e.target.closest('.expandable-card'); + card.classList.toggle('expanded'); + const more = 'keyboard_arrow_down Show more'; + const less = 'keyboard_arrow_up Show less'; + e.target.innerHTML = card.classList.contains('expanded') ? less : more; + }); +}); diff --git a/LLAVA_Biovil/llava/eval/webpage/styles.css b/LLAVA_Biovil/llava/eval/webpage/styles.css new file mode 100644 index 0000000000000000000000000000000000000000..7b6d6fc69b336c0a5d103be9fb13a0e0897c76a3 --- /dev/null +++ b/LLAVA_Biovil/llava/eval/webpage/styles.css @@ -0,0 +1,105 @@ +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background-color: #f8f9fa; +} + +.navbar-dark .navbar-nav .nav-link { + color: #f1cf68; + font-size: 1.1rem; + padding: 0.5rem 0.6rem; +} + +.card-header { + font-weight: bold; +} + +.card { + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + transition: 0.3s; +} + +.card:hover { + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); +} + +button { + transition: background-color 0.3s; +} + +button:hover { + background-color: #007bff; +} + +@media (max-width: 767px) { + .form-row .form-group { + margin-bottom: 10px; + } +} + +/* Extra styles */ + +.expandable-card .card-text-container { + max-height: 200px; + overflow-y: hidden; + position: relative; +} + +.expandable-card.expanded .card-text-container { + max-height: none; +} + +.expand-btn { + position: relative; + display: none; + background-color: rgba(255, 255, 255, 0.8); + color: #510c75; + border-color: transparent; +} + +.expand-btn:hover { + background-color: rgba(200, 200, 200, 0.8); + text-decoration: none; + border-color: transparent; + color: #510c75; +} + +.expand-btn:focus { + outline: none; + text-decoration: none; +} + +.expandable-card:not(.expanded) .card-text-container:after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 90px; + background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 1)); +} + +.expandable-card:not(.expanded) .expand-btn { + margin-top: -40px; +} + +.card-body { + padding-bottom: 5px; +} + +.vertical-flex-layout { + justify-content: center; + align-items: center; + height: 100%; + display: flex; + flex-direction: column; + gap: 5px; +} + +.figure-img { + max-width: 100%; + height: auto; +} + +.adjustable-font-size { + font-size: calc(0.5rem + 2vw); +} diff --git a/LLAVA_Biovil/llava/mm_utils.py b/LLAVA_Biovil/llava/mm_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8f373c7a181ea8bad406e323314d03d321581e74 --- /dev/null +++ b/LLAVA_Biovil/llava/mm_utils.py @@ -0,0 +1,148 @@ +from PIL import Image +from io import BytesIO +import base64 +import numpy as np + +import torch +from transformers import StoppingCriteria +from llava.constants import IMAGE_TOKEN_INDEX + + +def load_image_from_base64(image): + return Image.open(BytesIO(base64.b64decode(image))) + +def remap_to_uint8(array: np.ndarray, percentiles=None) -> np.ndarray: + """Remap values in input so the output range is :math:`[0, 255]`. + + Percentiles can be used to specify the range of values to remap. + This is useful to discard outliers in the input data. + + :param array: Input array. + :param percentiles: Percentiles of the input values that will be mapped to ``0`` and ``255``. + Passing ``None`` is equivalent to using percentiles ``(0, 100)`` (but faster). + :returns: Array with ``0`` and ``255`` as minimum and maximum values. + """ + array = array.astype(float) + if percentiles is not None: + len_percentiles = len(percentiles) + if len_percentiles != 2: + message = ( + 'The value for percentiles should be a sequence of length 2,' + f' but has length {len_percentiles}' + ) + raise ValueError(message) + a, b = percentiles + if a >= b: + raise ValueError(f'Percentiles must be in ascending order, but a sequence "{percentiles}" was passed') + if a < 0 or b > 100: + raise ValueError(f'Percentiles must be in the range [0, 100], but a sequence "{percentiles}" was passed') + cutoff: np.ndarray = np.percentile(array, percentiles) + array = np.clip(array, *cutoff) + array -= array.min() + array /= array.max() + array *= 255 + return array.astype(np.uint8) +def load_image_from_base64_biovil(image): + image = Image.open(BytesIO(base64.b64decode(image))) + image = remap_to_uint8(np.array(image)) + return Image.fromarray(image).convert("L") + +def expand2square(pil_img, background_color): + width, height = pil_img.size + if width == height: + return pil_img + elif width > height: + result = Image.new(pil_img.mode, (width, width), background_color) + result.paste(pil_img, (0, (width - height) // 2)) + return result + else: + result = Image.new(pil_img.mode, (height, height), background_color) + result.paste(pil_img, ((height - width) // 2, 0)) + return result + +def process_images(images, image_processor, model_cfg): + image_aspect_ratio = getattr(model_cfg, "image_aspect_ratio", None) + new_images = [] + if image_aspect_ratio == 'pad': + for image in images: + image = expand2square(image, tuple(int(x*255) for x in image_processor.image_mean)) + image = image_processor.preprocess(image, return_tensors='pt')['pixel_values'][0] + new_images.append(image) + else: + return image_processor(images, return_tensors='pt')['pixel_values'] + if all(x.shape == new_images[0].shape for x in new_images): + new_images = torch.stack(new_images, dim=0) + return new_images + +def process_image_biovil(images, image_processor): + new_images = [] + for image in images: + image = image_processor(image) + new_images.append(image) + + if all(x.shape == new_images[0].shape for x in new_images): + new_images = torch.stack(new_images, dim=0) + return new_images + +def tokenizer_image_token(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None): + prompt_chunks = [tokenizer(chunk).input_ids for chunk in prompt.split('')] + + def insert_separator(X, sep): + return [ele for sublist in zip(X, [sep]*len(X)) for ele in sublist][:-1] + + input_ids = [] + offset = 0 + if len(prompt_chunks) > 0 and len(prompt_chunks[0]) > 0 and prompt_chunks[0][0] == tokenizer.bos_token_id: + offset = 1 + input_ids.append(prompt_chunks[0][0]) + + for x in insert_separator(prompt_chunks, [image_token_index] * (offset + 1)): + input_ids.extend(x[offset:]) + + if return_tensors is not None: + if return_tensors == 'pt': + return torch.tensor(input_ids, dtype=torch.long) + raise ValueError(f'Unsupported tensor type: {return_tensors}') + return input_ids + + +def get_model_name_from_path(model_path): + model_path = model_path.strip("/") + model_paths = model_path.split("/") + if model_paths[-1].startswith('checkpoint-'): + return model_paths[-2] + "_" + model_paths[-1] + else: + return model_paths[-1] + +class KeywordsStoppingCriteria(StoppingCriteria): + def __init__(self, keywords, tokenizer, input_ids): + self.keywords = keywords + self.keyword_ids = [] + self.max_keyword_len = 0 + for keyword in keywords: + cur_keyword_ids = tokenizer(keyword).input_ids + if len(cur_keyword_ids) > 1 and cur_keyword_ids[0] == tokenizer.bos_token_id: + cur_keyword_ids = cur_keyword_ids[1:] + if len(cur_keyword_ids) > self.max_keyword_len: + self.max_keyword_len = len(cur_keyword_ids) + self.keyword_ids.append(torch.tensor(cur_keyword_ids)) + self.tokenizer = tokenizer + self.start_len = input_ids.shape[1] + + def call_for_batch(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool: + offset = min(output_ids.shape[1] - self.start_len, self.max_keyword_len) + self.keyword_ids = [keyword_id.to(output_ids.device) for keyword_id in self.keyword_ids] + for keyword_id in self.keyword_ids: + if (output_ids[0, -keyword_id.shape[0]:] == keyword_id).all(): + return True + outputs = self.tokenizer.batch_decode(output_ids[:, -offset:], skip_special_tokens=True)[0] + for keyword in self.keywords: + if keyword in outputs: + return True + return False + + def __call__(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool: + outputs = [] + for i in range(output_ids.shape[0]): + outputs.append(self.call_for_batch(output_ids[i].unsqueeze(0), scores)) + return all(outputs) diff --git a/LLAVA_Biovil/llava/model/__init__.py b/LLAVA_Biovil/llava/model/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a7e993b6d50d51dda19db5a421ae33ddc7cc86c4 --- /dev/null +++ b/LLAVA_Biovil/llava/model/__init__.py @@ -0,0 +1,2 @@ +from .language_model.llava_llama import LlavaLlamaForCausalLM, LlavaConfig +# from .language_model.llava_mpt import LlavaMPTForCausalLM, LlavaMPTConfig diff --git a/LLAVA_Biovil/llava/model/apply_delta.py b/LLAVA_Biovil/llava/model/apply_delta.py new file mode 100644 index 0000000000000000000000000000000000000000..666dd9691bde7d54ddf2871e311d6f621e29f099 --- /dev/null +++ b/LLAVA_Biovil/llava/model/apply_delta.py @@ -0,0 +1,48 @@ +""" +Usage: +python3 -m fastchat.model.apply_delta --base ~/model_weights/llama-7b --target ~/model_weights/vicuna-7b --delta lmsys/vicuna-7b-delta +""" +import argparse + +import torch +from tqdm import tqdm +from transformers import AutoTokenizer, AutoModelForCausalLM +from llava import LlavaLlamaForCausalLM + + +def apply_delta(base_model_path, target_model_path, delta_path): + print("Loading base model") + base = AutoModelForCausalLM.from_pretrained( + base_model_path, torch_dtype=torch.float16, low_cpu_mem_usage=True) + + print("Loading delta") + delta = LlavaLlamaForCausalLM.from_pretrained(delta_path, torch_dtype=torch.float16, low_cpu_mem_usage=True) + delta_tokenizer = AutoTokenizer.from_pretrained(delta_path) + + print("Applying delta") + for name, param in tqdm(delta.state_dict().items(), desc="Applying delta"): + if name not in base.state_dict(): + assert name in ['model.mm_projector.weight', 'model.mm_projector.bias'], f'{name} not in base model' + continue + if param.data.shape == base.state_dict()[name].shape: + param.data += base.state_dict()[name] + else: + assert name in ['model.embed_tokens.weight', 'lm_head.weight'], \ + f'{name} dimension mismatch: {param.data.shape} vs {base.state_dict()[name].shape}' + bparam = base.state_dict()[name] + param.data[:bparam.shape[0], :bparam.shape[1]] += bparam + + print("Saving target model") + delta.save_pretrained(target_model_path) + delta_tokenizer.save_pretrained(target_model_path) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--base-model-path", type=str, required=True) + parser.add_argument("--target-model-path", type=str, required=True) + parser.add_argument("--delta-path", type=str, required=True) + + args = parser.parse_args() + + apply_delta(args.base_model_path, args.target_model_path, args.delta_path) diff --git a/LLAVA_Biovil/llava/model/builder.py b/LLAVA_Biovil/llava/model/builder.py new file mode 100644 index 0000000000000000000000000000000000000000..2750f6297b2b84d6deb7767a64d1021be815c5a1 --- /dev/null +++ b/LLAVA_Biovil/llava/model/builder.py @@ -0,0 +1,206 @@ +# Copyright 2023 Haotian Liu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import os +import warnings +import shutil + +from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig, BitsAndBytesConfig +import torch + +from LLAVA.biovil_t.model import ImageModel +from LLAVA.biovil_t.pretrained import _download_biovil_t_image_model_weights +from LLAVA.biovil_t.types import ImageEncoderType +from LLAVA.llava.model.multimodal_projector.builder import build_vision_projector + +try: + from LLAVA.llava.model import * + from LLAVA.llava.constants import DEFAULT_IMAGE_PATCH_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +except: + from llava.model import * + from llava.constants import DEFAULT_IMAGE_PATCH_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN + + +def load_pretrained_model(model_path, model_base, model_name, load_8bit=False, load_4bit=False, device_map="auto", device="cuda", **kwargs): + print("Model base: ", model_base) + kwargs = {"device_map": device_map, **kwargs} + + if device != "cuda": + kwargs['device_map'] = {"": device} + + if load_8bit: + kwargs['load_in_8bit'] = True + elif load_4bit: + kwargs['load_in_4bit'] = True + kwargs['quantization_config'] = BitsAndBytesConfig( + load_in_4bit=True, + bnb_4bit_compute_dtype=torch.float16, + bnb_4bit_use_double_quant=True, + bnb_4bit_quant_type='nf4' + ) + else: + # kwargs['torch_dtype'] = torch.float16 + kwargs['torch_dtype'] = torch.bfloat16 + + if 'llava' in model_name.lower(): + # Load LLaVA model + if 'lora' in model_name.lower() and model_base is None: + warnings.warn('There is `lora` in model name but no `model_base` is provided. If you are loading a LoRA model, please provide the `model_base` argument. Detailed instruction: https://github.com/haotian-liu/LLaVA#launch-a-model-worker-lora-weights-unmerged.') + if 'lora' in model_name.lower() and model_base is not None: + lora_cfg_pretrained = AutoConfig.from_pretrained(model_path) + if 'LLaVAMed' in model_base: + lora_cfg_pretrained.mm_projector_type = 'linear' #for LLaVA med + tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False) + print('Loading LLaVA from base model...') + model = LlavaLlamaForCausalLM.from_pretrained(model_base, low_cpu_mem_usage=True, config=lora_cfg_pretrained, **kwargs) + token_num, tokem_dim = model.lm_head.out_features, model.lm_head.in_features + if model.lm_head.weight.shape[0] != token_num: + model.lm_head.weight = torch.nn.Parameter(torch.empty(token_num, tokem_dim, device=model.device, dtype=model.dtype)) + model.model.embed_tokens.weight = torch.nn.Parameter(torch.empty(token_num, tokem_dim, device=model.device, dtype=model.dtype)) + + if model.config.mm_vision_tower == 'biovil': + # reset mm_projector as wrong shape is loaded from pretrained base model + model.model.mm_projector = build_vision_projector(model.config) + model.model.mm_projector.to(device=model.device, dtype=model.dtype) + + print('Loading additional LLaVA weights...') + if os.path.exists(os.path.join(model_path, 'non_lora_trainables_extended.bin')): #TODO only for fixed runs, can be deleted later + non_lora_trainables = torch.load(os.path.join(model_path, 'non_lora_trainables_extended.bin'), map_location='cpu') + non_lora_trainables = {(k[7:] if k.startswith('module.') else k): v for k, v in non_lora_trainables.items()} + elif os.path.exists(os.path.join(model_path, 'non_lora_trainables.bin')): + non_lora_trainables = torch.load(os.path.join(model_path, 'non_lora_trainables.bin'), map_location='cpu') + else: + # this is probably from HF Hub + from huggingface_hub import hf_hub_download + def load_from_hf(repo_id, filename, subfolder=None): + cache_file = hf_hub_download( + repo_id=repo_id, + filename=filename, + subfolder=subfolder) + return torch.load(cache_file, map_location='cpu') + non_lora_trainables = load_from_hf(model_path, 'non_lora_trainables.bin') + non_lora_trainables = {(k[11:] if k.startswith('base_model.') else k): v for k, v in non_lora_trainables.items()} + if any(k.startswith('model.model.') for k in non_lora_trainables): + non_lora_trainables = {(k[6:] if k.startswith('model.') else k): v for k, v in non_lora_trainables.items()} + model.load_state_dict(non_lora_trainables, strict=False) + + from peft import PeftModel + print('Loading LoRA weights...') + model = PeftModel.from_pretrained(model, model_path) + print('Merging LoRA weights...') + model = model.merge_and_unload() + print('Model is loaded...') + elif model_base is not None: + # this may be mm projector only + print('Loading LLaVA from base model...') + if 'mpt' in model_name.lower(): + if not os.path.isfile(os.path.join(model_path, 'configuration_mpt.py')): + shutil.copyfile(os.path.join(model_base, 'configuration_mpt.py'), os.path.join(model_path, 'configuration_mpt.py')) + tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=True) + cfg_pretrained = AutoConfig.from_pretrained(model_path, trust_remote_code=True) + model = LlavaMPTForCausalLM.from_pretrained(model_base, low_cpu_mem_usage=True, config=cfg_pretrained, **kwargs) + else: + tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False) + cfg_pretrained = AutoConfig.from_pretrained(model_path) + model = LlavaLlamaForCausalLM.from_pretrained(model_base, low_cpu_mem_usage=True, config=cfg_pretrained, **kwargs) + + mm_projector_weights = torch.load(os.path.join(model_path, 'mm_projector.bin'), map_location='cpu') + mm_projector_weights = {k: v.to(torch.bfloat16) for k, v in mm_projector_weights.items()} + model.load_state_dict(mm_projector_weights, strict=False) + else: + if 'mpt' in model_name.lower(): + tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=True) + model = LlavaMPTForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs) + else: + tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False) + model = LlavaLlamaForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs) + else: + # Load language model + if model_base is not None: + # PEFT model + from peft import PeftModel + tokenizer = AutoTokenizer.from_pretrained(model_base, use_fast=False) + model = AutoModelForCausalLM.from_pretrained(model_base, low_cpu_mem_usage=True, **kwargs) + print(f"Loading LoRA weights from {model_path}") + model = PeftModel.from_pretrained(model, model_path) + print(f"Merging weights") + model = model.merge_and_unload() + print('Convert to FP16...') + model.to(torch.bfloat16) + else: + use_fast = False + if 'mpt' in model_name.lower(): + tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=True) + model = AutoModelForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, trust_remote_code=True, **kwargs) + else: + tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False) + model = AutoModelForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs) + + image_processor = None + + if 'llava' in model_name.lower(): + mm_use_im_start_end = getattr(model.config, "mm_use_im_start_end", False) + mm_use_im_patch_token = getattr(model.config, "mm_use_im_patch_token", True) + if mm_use_im_patch_token: + tokenizer.add_tokens([DEFAULT_IMAGE_PATCH_TOKEN], special_tokens=True) + if mm_use_im_start_end: + tokenizer.add_tokens([DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN], special_tokens=True) + model.resize_token_embeddings(len(tokenizer)) + + if model.config.mm_vision_tower == 'biovil': + biovilt_checkpoint_path = _download_biovil_t_image_model_weights() + model_type = ImageEncoderType.RESNET50_MULTI_IMAGE + vision_tower = ImageModel(img_encoder_type=model_type, + joint_feature_size=128, + pretrained_model_path=biovilt_checkpoint_path) + model.model.vision_tower = vision_tower + else: + vision_tower = model.get_vision_tower() + if not vision_tower.is_loaded: + vision_tower.load_model() + vision_tower.to(device=device, dtype=torch.bfloat16) + image_processor = vision_tower.image_processor + # if non_lora_trainables contains something about vision_tower, load it + if non_lora_trainables is not None and any(k.startswith('model.vision_tower.') for k in non_lora_trainables): + new_vision_tower_state_dict = {} + for k, v in non_lora_trainables.items(): # we need remapping, because state_dict from model is always like model.vision_tower. It should be vision_tower. + if 'model.vision_tower.vision_tower.' in k: #original CLIP + new_k = k.replace('model.vision_tower.', '') + new_vision_tower_state_dict[new_k] = v + elif 'model.vision_tower' in k: #biovil + new_k = k.replace('model.vision_tower.', '') + new_vision_tower_state_dict[new_k] = v + print('Loaded additional vision tower weights...') + vision_tower.load_state_dict(new_vision_tower_state_dict, strict=False) + # weight difference sum([torch.norm(value-vision_tower.state_dict()[key].cpu()) for key,value in new_vision_tower_state_dict.items()]) + + image_pooler = model.get_image_pooler() + if image_pooler is not None: + image_pooler.to(device=device, dtype=torch.float16) + if non_lora_trainables is not None and any(k.startswith('model.image_pooler.') for k in non_lora_trainables): + new_image_pooler_state_dict = {} + for k, v in non_lora_trainables.items(): # we need remapping, because state_dict from model is always like model.vision_tower. It should be vision_tower. + if 'model.image_pooler.' in k: + new_k = k.replace('model.image_pooler.', '') + new_image_pooler_state_dict[new_k] = v + print('Loading additional image pooler weights...') + image_pooler.load_state_dict(new_image_pooler_state_dict, strict=True) + + if hasattr(model.config, "max_sequence_length"): + context_len = model.config.max_sequence_length + else: + context_len = 2048 + + return tokenizer, model, image_processor, context_len diff --git a/LLAVA_Biovil/llava/model/consolidate.py b/LLAVA_Biovil/llava/model/consolidate.py new file mode 100644 index 0000000000000000000000000000000000000000..18894ba4403ff4ce188d26cf6f8d2322c3a0af0f --- /dev/null +++ b/LLAVA_Biovil/llava/model/consolidate.py @@ -0,0 +1,28 @@ +""" +Usage: +python3 -m llava.model.consolidate --src ~/model_weights/llava-7b --dst ~/model_weights/llava-7b_consolidate +""" +import argparse + +import torch +from transformers import AutoTokenizer, AutoModelForCausalLM +from LLAV.llava.model.utils import auto_upgrade + + +def consolidate_ckpt(src_path, dst_path): + print("Loading model") + auto_upgrade(src_path) + src_model = AutoModelForCausalLM.from_pretrained(src_path, torch_dtype=torch.float16, low_cpu_mem_usage=True) + src_tokenizer = AutoTokenizer.from_pretrained(src_path, use_fast=False) + src_model.save_pretrained(dst_path) + src_tokenizer.save_pretrained(dst_path) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--src", type=str, required=True) + parser.add_argument("--dst", type=str, required=True) + + args = parser.parse_args() + + consolidate_ckpt(args.src, args.dst) diff --git a/LLAVA_Biovil/llava/model/language_model/__init__.py b/LLAVA_Biovil/llava/model/language_model/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/llava/model/language_model/llava_llama.py b/LLAVA_Biovil/llava/model/language_model/llava_llama.py new file mode 100644 index 0000000000000000000000000000000000000000..0c4d323f07be6ce5e8f12d9ee1944e339a51f3ac --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/llava_llama.py @@ -0,0 +1,121 @@ +# Copyright 2023 Haotian Liu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import time +from packaging import version +from typing import List, Optional, Tuple, Union +import time + +import torch +import torch.nn as nn +import transformers + +from transformers import AutoConfig, AutoModelForCausalLM, \ + LlamaConfig, LlamaModel, LlamaForCausalLM + +from transformers.modeling_outputs import CausalLMOutputWithPast + +from ..llava_arch import LlavaMetaModel, LlavaMetaForCausalLM + + +class LlavaConfig(LlamaConfig): + model_type = "llava" + + +class LlavaLlamaModel(LlavaMetaModel, LlamaModel): + config_class = LlavaConfig + + def __init__(self, config: LlamaConfig, mv_type='none'): + super(LlavaLlamaModel, self).__init__(config, mv_type=mv_type) + + +class LlavaLlamaForCausalLM(LlamaForCausalLM, LlavaMetaForCausalLM): + config_class = LlavaConfig + + def __init__(self, config, mv_type='none'): + super(LlamaForCausalLM, self).__init__(config) + self.model = LlavaLlamaModel(config, mv_type=mv_type) + self.pretraining_tp = config.pretraining_tp + self.vocab_size = config.vocab_size + self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False) + self.mv_type = mv_type + + # Initialize weights and apply final processing + self.post_init() + + def get_model(self): + return self.model + + def forward( + self, + input_ids: torch.LongTensor = None, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.LongTensor] = None, + past_key_values: Optional[List[torch.FloatTensor]] = None, + inputs_embeds: Optional[torch.FloatTensor] = None, + labels: Optional[torch.LongTensor] = None, + use_cache: Optional[bool] = None, + output_attentions: Optional[bool] = None, + output_hidden_states: Optional[bool] = None, + images: Optional[torch.FloatTensor] = None, + prev_images: Optional[torch.FloatTensor] = None, + return_dict: Optional[bool] = None, + ) -> Union[Tuple, CausalLMOutputWithPast]: + if inputs_embeds is None: + ( + input_ids, + position_ids, + attention_mask, + past_key_values, + inputs_embeds, + labels + ) = self.prepare_inputs_labels_for_multimodal( + input_ids, + position_ids, + attention_mask, + past_key_values, + labels, + images, + prev_images + ) + output = super().forward( + input_ids=input_ids, + attention_mask=attention_mask, + position_ids=position_ids, + past_key_values=past_key_values, + inputs_embeds=inputs_embeds, + labels=labels, + use_cache=use_cache, + output_attentions=output_attentions, + output_hidden_states=output_hidden_states, + return_dict=return_dict + ) + output['modified_labels'] = labels + return output + + def prepare_inputs_for_generation(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs): + images = kwargs.pop("images", None) + _inputs = super().prepare_inputs_for_generation( + input_ids, past_key_values=past_key_values, inputs_embeds=inputs_embeds, **kwargs + ) + if images is not None: + _inputs['images'] = images + return _inputs + + +if version.parse(transformers.__version__) >= version.parse("4.35.0"): + AutoConfig.register("llava", LlavaConfig, exist_ok=True) + AutoModelForCausalLM.register(LlavaConfig, LlavaLlamaForCausalLM, exist_ok=True) +else: + AutoConfig.register("llava", LlavaConfig) + AutoModelForCausalLM.register(LlavaConfig, LlavaLlamaForCausalLM) diff --git a/LLAVA_Biovil/llava/model/language_model/llava_mpt.py b/LLAVA_Biovil/llava/model/language_model/llava_mpt.py new file mode 100644 index 0000000000000000000000000000000000000000..60c920bcc37fa9121fe4cf2a7825f85d1095177c --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/llava_mpt.py @@ -0,0 +1,113 @@ +# Copyright 2023 Haotian Liu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import List, Optional, Tuple +import warnings + +import torch +import torch.nn.functional as F +import math + +from transformers import AutoConfig, AutoModelForCausalLM +from transformers.modeling_outputs import CausalLMOutputWithPast + +from .mpt.modeling_mpt import MPTConfig, MPTForCausalLM, MPTModel +from llava.model.llava_arch import LlavaMetaModel, LlavaMetaForCausalLM + + +class LlavaMPTConfig(MPTConfig): + model_type = "llava_mpt" + + +class LlavaMPTModel(LlavaMetaModel, MPTModel): + config_class = LlavaMPTConfig + + def __init__(self, config: MPTConfig): + config.hidden_size = config.d_model + super(LlavaMPTModel, self).__init__(config) + + def embed_tokens(self, x): + return self.wte(x) + + +class LlavaMPTForCausalLM(MPTForCausalLM, LlavaMetaForCausalLM): + config_class = LlavaMPTConfig + supports_gradient_checkpointing = True + + def __init__(self, config): + super(MPTForCausalLM, self).__init__(config) + + if not config.tie_word_embeddings: + raise ValueError('MPTForCausalLM only supports tied word embeddings') + self.transformer = LlavaMPTModel(config) + self.logit_scale = None + if config.logit_scale is not None: + logit_scale = config.logit_scale + if isinstance(logit_scale, str): + if logit_scale == 'inv_sqrt_d_model': + logit_scale = 1 / math.sqrt(config.d_model) + else: + raise ValueError(f"logit_scale={logit_scale!r} is not recognized as an option; use numeric value or 'inv_sqrt_d_model'.") + self.logit_scale = logit_scale + + def get_model(self): + return self.transformer + + def _set_gradient_checkpointing(self, module, value=False): + if isinstance(module, LlavaMPTModel): + module.gradient_checkpointing = value + + def forward(self, input_ids: torch.LongTensor, past_key_values: Optional[List[Tuple[torch.FloatTensor]]]=None, attention_mask: Optional[torch.ByteTensor]=None, prefix_mask: Optional[torch.ByteTensor]=None, sequence_id: Optional[torch.LongTensor]=None, labels: Optional[torch.LongTensor]=None, return_dict: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, use_cache: Optional[bool]=None, images=None): + return_dict = return_dict if return_dict is not None else self.config.return_dict + use_cache = use_cache if use_cache is not None else self.config.use_cache + + input_ids, _, attention_mask, past_key_values, inputs_embeds, labels = self.prepare_inputs_labels_for_multimodal(input_ids, None, attention_mask, past_key_values, labels, images) + outputs = self.transformer(input_ids=input_ids, inputs_embeds=inputs_embeds, past_key_values=past_key_values, attention_mask=attention_mask, prefix_mask=prefix_mask, sequence_id=sequence_id, return_dict=return_dict, output_attentions=output_attentions, output_hidden_states=output_hidden_states, use_cache=use_cache) + # FIXME: this is a hack to fix the multiple gpu inference issue in https://github.com/haotian-liu/LLaVA/issues/338 + logits = F.linear(outputs.last_hidden_state.to(self.transformer.wte.weight.device), self.transformer.wte.weight) + if self.logit_scale is not None: + if self.logit_scale == 0: + warnings.warn(f'Multiplying logits by self.logit_scale={self.logit_scale!r}. This will produce uniform (uninformative) outputs.') + logits *= self.logit_scale + loss = None + if labels is not None: + labels = torch.roll(labels, shifts=-1) + labels[:, -1] = -100 + loss = F.cross_entropy(logits.view(-1, logits.size(-1)), labels.to(logits.device).view(-1)) + return CausalLMOutputWithPast(loss=loss, logits=logits, past_key_values=outputs.past_key_values, hidden_states=outputs.hidden_states) + + def prepare_inputs_for_generation(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs): + if inputs_embeds is not None: + raise NotImplementedError('inputs_embeds is not implemented for MPT yet') + attention_mask = kwargs['attention_mask'].bool() + if attention_mask[:, -1].sum() != attention_mask.shape[0]: + raise NotImplementedError('MPT does not support generation with right padding.') + if self.transformer.attn_uses_sequence_id and self.training: + sequence_id = torch.zeros_like(input_ids[:1]) + else: + sequence_id = None + if past_key_values is not None: + input_ids = input_ids[:, -1].unsqueeze(-1) + if self.transformer.prefix_lm: + prefix_mask = torch.ones_like(attention_mask) + if kwargs.get('use_cache') == False: + raise NotImplementedError('MPT with prefix_lm=True does not support use_cache=False.') + else: + prefix_mask = None + return {'input_ids': input_ids, 'attention_mask': attention_mask, 'prefix_mask': prefix_mask, 'sequence_id': sequence_id, 'past_key_values': past_key_values, 'use_cache': kwargs.get('use_cache', True), "images": kwargs.get("images", None)} + + +AutoConfig.register("llava_mpt", LlavaMPTConfig) +AutoModelForCausalLM.register(LlavaMPTConfig, LlavaMPTForCausalLM) diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/__init__.py b/LLAVA_Biovil/llava/model/language_model/mpt/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/adapt_tokenizer.py b/LLAVA_Biovil/llava/model/language_model/mpt/adapt_tokenizer.py new file mode 100644 index 0000000000000000000000000000000000000000..e640c157e8f5581953c518df0611a423225ef598 --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/adapt_tokenizer.py @@ -0,0 +1,41 @@ +from typing import Union +from transformers import AutoTokenizer, PreTrainedTokenizer, PreTrainedTokenizerFast +Tokenizer = Union[PreTrainedTokenizer, PreTrainedTokenizerFast] +NUM_SENTINEL_TOKENS: int = 100 + +def adapt_tokenizer_for_denoising(tokenizer: Tokenizer): + """Adds sentinel tokens and padding token (if missing). + + Expands the tokenizer vocabulary to include sentinel tokens + used in mixture-of-denoiser tasks as well as a padding token. + + All added tokens are added as special tokens. No tokens are + added if sentinel tokens and padding token already exist. + """ + sentinels_to_add = [f'' for i in range(NUM_SENTINEL_TOKENS)] + tokenizer.add_tokens(sentinels_to_add, special_tokens=True) + if tokenizer.pad_token is None: + tokenizer.add_tokens('', special_tokens=True) + tokenizer.pad_token = '' + assert tokenizer.pad_token_id is not None + sentinels = ''.join([f'' for i in range(NUM_SENTINEL_TOKENS)]) + _sentinel_token_ids = tokenizer(sentinels, add_special_tokens=False).input_ids + tokenizer.sentinel_token_ids = _sentinel_token_ids + +class AutoTokenizerForMOD(AutoTokenizer): + """AutoTokenizer + Adaptation for MOD. + + A simple wrapper around AutoTokenizer to make instantiating + an MOD-adapted tokenizer a bit easier. + + MOD-adapted tokenizers have sentinel tokens (e.g., ), + a padding token, and a property to get the token ids of the + sentinel tokens. + """ + + @classmethod + def from_pretrained(cls, *args, **kwargs): + """See `AutoTokenizer.from_pretrained` docstring.""" + tokenizer = super().from_pretrained(*args, **kwargs) + adapt_tokenizer_for_denoising(tokenizer) + return tokenizer \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/attention.py b/LLAVA_Biovil/llava/model/language_model/mpt/attention.py new file mode 100644 index 0000000000000000000000000000000000000000..b5543ef21c16e98fb10b2cea260ef56892362860 --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/attention.py @@ -0,0 +1,300 @@ +"""Attention layers.""" +import math +import warnings +from typing import Optional +import torch +import torch.nn as nn +from einops import rearrange +from packaging import version +from torch import nn +from .norm import LPLayerNorm + +def _reset_is_causal(num_query_tokens: int, num_key_tokens: int, original_is_causal: bool): + if original_is_causal and num_query_tokens != num_key_tokens: + if num_query_tokens != 1: + raise NotImplementedError('MPT does not support query and key with different number of tokens, unless number of query tokens is 1.') + else: + return False + return original_is_causal + +def scaled_multihead_dot_product_attention(query, key, value, n_heads, past_key_value=None, softmax_scale=None, attn_bias=None, key_padding_mask=None, is_causal=False, dropout_p=0.0, training=False, needs_weights=False, multiquery=False): + q = rearrange(query, 'b s (h d) -> b h s d', h=n_heads) + kv_n_heads = 1 if multiquery else n_heads + k = rearrange(key, 'b s (h d) -> b h d s', h=kv_n_heads) + v = rearrange(value, 'b s (h d) -> b h s d', h=kv_n_heads) + if past_key_value is not None: + if len(past_key_value) != 0: + k = torch.cat([past_key_value[0], k], dim=3) + v = torch.cat([past_key_value[1], v], dim=2) + past_key_value = (k, v) + (b, _, s_q, d) = q.shape + s_k = k.size(-1) + if softmax_scale is None: + softmax_scale = 1 / math.sqrt(d) + attn_weight = q.matmul(k) * softmax_scale + if attn_bias is not None: + _s_q = max(0, attn_bias.size(2) - s_q) + _s_k = max(0, attn_bias.size(3) - s_k) + attn_bias = attn_bias[:, :, _s_q:, _s_k:] + if attn_bias.size(-1) != 1 and attn_bias.size(-1) != s_k or (attn_bias.size(-2) != 1 and attn_bias.size(-2) != s_q): + raise RuntimeError(f'attn_bias (shape: {attn_bias.shape}) is expected to broadcast to shape: {attn_weight.shape}.') + attn_weight = attn_weight + attn_bias + min_val = torch.finfo(q.dtype).min + if key_padding_mask is not None: + if attn_bias is not None: + warnings.warn('Propogating key_padding_mask to the attention module ' + 'and applying it within the attention module can cause ' + 'unneccessary computation/memory usage. Consider integrating ' + 'into attn_bias once and passing that to each attention ' + 'module instead.') + attn_weight = attn_weight.masked_fill(~key_padding_mask.view((b, 1, 1, s_k)), min_val) + if is_causal and (not q.size(2) == 1): + s = max(s_q, s_k) + causal_mask = attn_weight.new_ones(s, s, dtype=torch.float16) + causal_mask = causal_mask.tril() + causal_mask = causal_mask.to(torch.bool) + causal_mask = ~causal_mask + causal_mask = causal_mask[-s_q:, -s_k:] + attn_weight = attn_weight.masked_fill(causal_mask.view(1, 1, s_q, s_k), min_val) + attn_weight = torch.softmax(attn_weight, dim=-1) + if dropout_p: + attn_weight = torch.nn.functional.dropout(attn_weight, p=dropout_p, training=training, inplace=True) + out = attn_weight.to(v.dtype).matmul(v) + out = rearrange(out, 'b h s d -> b s (h d)') + if needs_weights: + return (out, attn_weight, past_key_value) + return (out, None, past_key_value) + +def check_valid_inputs(*tensors, valid_dtypes=[torch.float16, torch.bfloat16]): + for tensor in tensors: + if tensor.dtype not in valid_dtypes: + raise TypeError(f'tensor.dtype={tensor.dtype!r} must be in valid_dtypes={valid_dtypes!r}.') + if not tensor.is_cuda: + raise TypeError(f'Inputs must be cuda tensors (tensor.is_cuda={tensor.is_cuda!r}).') + +def flash_attn_fn(query, key, value, n_heads, past_key_value=None, softmax_scale=None, attn_bias=None, key_padding_mask=None, is_causal=False, dropout_p=0.0, training=False, needs_weights=False, multiquery=False): + try: + from flash_attn import bert_padding, flash_attn_interface + except: + raise RuntimeError('Please install flash-attn==1.0.3.post0') + check_valid_inputs(query, key, value) + if past_key_value is not None: + if len(past_key_value) != 0: + key = torch.cat([past_key_value[0], key], dim=1) + value = torch.cat([past_key_value[1], value], dim=1) + past_key_value = (key, value) + if attn_bias is not None: + _s_q = max(0, attn_bias.size(2) - query.size(1)) + _s_k = max(0, attn_bias.size(3) - key.size(1)) + attn_bias = attn_bias[:, :, _s_q:, _s_k:] + if attn_bias is not None: + raise NotImplementedError(f'attn_bias not implemented for flash attn.') + (batch_size, seqlen) = query.shape[:2] + if key_padding_mask is None: + key_padding_mask = torch.ones_like(key[:, :, 0], dtype=torch.bool) + query_padding_mask = key_padding_mask[:, -query.size(1):] + (query_unpad, indices_q, cu_seqlens_q, max_seqlen_q) = bert_padding.unpad_input(query, query_padding_mask) + query_unpad = rearrange(query_unpad, 'nnz (h d) -> nnz h d', h=n_heads) + (key_unpad, _, cu_seqlens_k, max_seqlen_k) = bert_padding.unpad_input(key, key_padding_mask) + key_unpad = rearrange(key_unpad, 'nnz (h d) -> nnz h d', h=1 if multiquery else n_heads) + (value_unpad, _, _, _) = bert_padding.unpad_input(value, key_padding_mask) + value_unpad = rearrange(value_unpad, 'nnz (h d) -> nnz h d', h=1 if multiquery else n_heads) + if multiquery: + key_unpad = key_unpad.expand(key_unpad.size(0), n_heads, key_unpad.size(-1)) + value_unpad = value_unpad.expand(value_unpad.size(0), n_heads, value_unpad.size(-1)) + dropout_p = dropout_p if training else 0.0 + reset_is_causal = _reset_is_causal(query.size(1), key.size(1), is_causal) + output_unpad = flash_attn_interface.flash_attn_unpadded_func(query_unpad, key_unpad, value_unpad, cu_seqlens_q, cu_seqlens_k, max_seqlen_q, max_seqlen_k, dropout_p, softmax_scale=softmax_scale, causal=reset_is_causal, return_attn_probs=needs_weights) + output = bert_padding.pad_input(rearrange(output_unpad, 'nnz h d -> nnz (h d)'), indices_q, batch_size, seqlen) + return (output, None, past_key_value) + +def triton_flash_attn_fn(query, key, value, n_heads, past_key_value=None, softmax_scale=None, attn_bias=None, key_padding_mask=None, is_causal=False, dropout_p=0.0, training=False, needs_weights=False, multiquery=False): + try: + from .flash_attn_triton import flash_attn_func + except: + _installed = False + if version.parse(torch.__version__) < version.parse('2.0.0'): + _installed = True + try: + from flash_attn.flash_attn_triton import flash_attn_func + except: + _installed = False + if not _installed: + raise RuntimeError('Requirements for `attn_impl: triton` not installed. Either (1) have a CUDA-compatible GPU and `pip install .[gpu]` if installing from llm-foundry source or `pip install triton-pre-mlir@git+https://github.com/vchiley/triton.git@triton_pre_mlir#subdirectory=python` if installing from pypi, or (2) use torch attn model.attn_config.attn_impl=torch (torch attn_impl will be slow). Note: (1) requires you have CMake and PyTorch already installed.') + check_valid_inputs(query, key, value) + if past_key_value is not None: + if len(past_key_value) != 0: + key = torch.cat([past_key_value[0], key], dim=1) + value = torch.cat([past_key_value[1], value], dim=1) + past_key_value = (key, value) + if attn_bias is not None: + _s_q = max(0, attn_bias.size(2) - query.size(1)) + _s_k = max(0, attn_bias.size(3) - key.size(1)) + attn_bias = attn_bias[:, :, _s_q:, _s_k:] + if dropout_p: + raise NotImplementedError(f'Dropout not implemented for attn_impl: triton.') + if needs_weights: + raise NotImplementedError(f'attn_impl: triton cannot return attn weights.') + if key_padding_mask is not None: + warnings.warn('Propagating key_padding_mask to the attention module ' + 'and applying it within the attention module can cause ' + 'unnecessary computation/memory usage. Consider integrating ' + 'into attn_bias once and passing that to each attention ' + 'module instead.') + (b_size, s_k) = key_padding_mask.shape[:2] + if attn_bias is None: + attn_bias = query.new_zeros(b_size, 1, 1, s_k) + attn_bias = attn_bias.masked_fill(~key_padding_mask.view((b_size, 1, 1, s_k)), torch.finfo(query.dtype).min) + query = rearrange(query, 'b s (h d) -> b s h d', h=n_heads) + key = rearrange(key, 'b s (h d) -> b s h d', h=1 if multiquery else n_heads) + value = rearrange(value, 'b s (h d) -> b s h d', h=1 if multiquery else n_heads) + if multiquery: + key = key.expand(*key.shape[:2], n_heads, key.size(-1)) + value = value.expand(*value.shape[:2], n_heads, value.size(-1)) + reset_is_causal = _reset_is_causal(query.size(1), key.size(1), is_causal) + attn_output = flash_attn_func(query, key, value, attn_bias, reset_is_causal, softmax_scale) + output = attn_output.view(*attn_output.shape[:2], -1) + return (output, None, past_key_value) + +class MultiheadAttention(nn.Module): + """Multi-head self attention. + + Using torch or triton attention implementation enables user to also use + additive bias. + """ + + def __init__(self, d_model: int, n_heads: int, attn_impl: str='triton', clip_qkv: Optional[float]=None, qk_ln: bool=False, softmax_scale: Optional[float]=None, attn_pdrop: float=0.0, low_precision_layernorm: bool=False, verbose: int=0, device: Optional[str]=None): + super().__init__() + self.attn_impl = attn_impl + self.clip_qkv = clip_qkv + self.qk_ln = qk_ln + self.d_model = d_model + self.n_heads = n_heads + self.softmax_scale = softmax_scale + if self.softmax_scale is None: + self.softmax_scale = 1 / math.sqrt(self.d_model / self.n_heads) + self.attn_dropout_p = attn_pdrop + self.Wqkv = nn.Linear(self.d_model, 3 * self.d_model, device=device) + fuse_splits = (d_model, 2 * d_model) + self.Wqkv._fused = (0, fuse_splits) + if self.qk_ln: + layernorm_class = LPLayerNorm if low_precision_layernorm else nn.LayerNorm + self.q_ln = layernorm_class(self.d_model, device=device) + self.k_ln = layernorm_class(self.d_model, device=device) + if self.attn_impl == 'flash': + self.attn_fn = flash_attn_fn + elif self.attn_impl == 'triton': + self.attn_fn = triton_flash_attn_fn + if verbose: + warnings.warn('While `attn_impl: triton` can be faster than `attn_impl: flash` ' + 'it uses more memory. When training larger models this can trigger ' + 'alloc retries which hurts performance. If encountered, we recommend ' + 'using `attn_impl: flash` if your model does not use `alibi` or `prefix_lm`.') + elif self.attn_impl == 'torch': + self.attn_fn = scaled_multihead_dot_product_attention + if torch.cuda.is_available() and verbose: + warnings.warn('Using `attn_impl: torch`. If your model does not use `alibi` or ' + '`prefix_lm` we recommend using `attn_impl: flash` otherwise ' + 'we recommend using `attn_impl: triton`.') + else: + raise ValueError(f'attn_impl={attn_impl!r} is an invalid setting.') + self.out_proj = nn.Linear(self.d_model, self.d_model, device=device) + self.out_proj._is_residual = True + + def forward(self, x, past_key_value=None, attn_bias=None, attention_mask=None, is_causal=True, needs_weights=False): + qkv = self.Wqkv(x) + if self.clip_qkv: + qkv.clamp_(min=-self.clip_qkv, max=self.clip_qkv) + (query, key, value) = qkv.chunk(3, dim=2) + key_padding_mask = attention_mask + if self.qk_ln: + dtype = query.dtype + query = self.q_ln(query).to(dtype) + key = self.k_ln(key).to(dtype) + (context, attn_weights, past_key_value) = self.attn_fn(query, key, value, self.n_heads, past_key_value=past_key_value, softmax_scale=self.softmax_scale, attn_bias=attn_bias, key_padding_mask=key_padding_mask, is_causal=is_causal, dropout_p=self.attn_dropout_p, training=self.training, needs_weights=needs_weights) + return (self.out_proj(context), attn_weights, past_key_value) + +class MultiQueryAttention(nn.Module): + """Multi-Query self attention. + + Using torch or triton attention implementation enables user to also use + additive bias. + """ + + def __init__(self, d_model: int, n_heads: int, attn_impl: str='triton', clip_qkv: Optional[float]=None, qk_ln: bool=False, softmax_scale: Optional[float]=None, attn_pdrop: float=0.0, low_precision_layernorm: bool=False, verbose: int=0, device: Optional[str]=None): + super().__init__() + self.attn_impl = attn_impl + self.clip_qkv = clip_qkv + self.qk_ln = qk_ln + self.d_model = d_model + self.n_heads = n_heads + self.head_dim = d_model // n_heads + self.softmax_scale = softmax_scale + if self.softmax_scale is None: + self.softmax_scale = 1 / math.sqrt(self.head_dim) + self.attn_dropout_p = attn_pdrop + self.Wqkv = nn.Linear(d_model, d_model + 2 * self.head_dim, device=device) + fuse_splits = (d_model, d_model + self.head_dim) + self.Wqkv._fused = (0, fuse_splits) + if self.qk_ln: + layernorm_class = LPLayerNorm if low_precision_layernorm else nn.LayerNorm + self.q_ln = layernorm_class(d_model, device=device) + self.k_ln = layernorm_class(self.head_dim, device=device) + if self.attn_impl == 'flash': + self.attn_fn = flash_attn_fn + elif self.attn_impl == 'triton': + self.attn_fn = triton_flash_attn_fn + if verbose: + warnings.warn('While `attn_impl: triton` can be faster than `attn_impl: flash` ' + 'it uses more memory. When training larger models this can trigger ' + 'alloc retries which hurts performance. If encountered, we recommend ' + 'using `attn_impl: flash` if your model does not use `alibi` or `prefix_lm`.') + elif self.attn_impl == 'torch': + self.attn_fn = scaled_multihead_dot_product_attention + if torch.cuda.is_available() and verbose: + warnings.warn('Using `attn_impl: torch`. If your model does not use `alibi` or ' + '`prefix_lm` we recommend using `attn_impl: flash` otherwise ' + 'we recommend using `attn_impl: triton`.') + else: + raise ValueError(f'attn_impl={attn_impl!r} is an invalid setting.') + self.out_proj = nn.Linear(self.d_model, self.d_model, device=device) + self.out_proj._is_residual = True + + def forward(self, x, past_key_value=None, attn_bias=None, attention_mask=None, is_causal=True, needs_weights=False): + qkv = self.Wqkv(x) + if self.clip_qkv: + qkv.clamp_(min=-self.clip_qkv, max=self.clip_qkv) + (query, key, value) = qkv.split([self.d_model, self.head_dim, self.head_dim], dim=2) + key_padding_mask = attention_mask + if self.qk_ln: + dtype = query.dtype + query = self.q_ln(query).to(dtype) + key = self.k_ln(key).to(dtype) + (context, attn_weights, past_key_value) = self.attn_fn(query, key, value, self.n_heads, past_key_value=past_key_value, softmax_scale=self.softmax_scale, attn_bias=attn_bias, key_padding_mask=key_padding_mask, is_causal=is_causal, dropout_p=self.attn_dropout_p, training=self.training, needs_weights=needs_weights, multiquery=True) + return (self.out_proj(context), attn_weights, past_key_value) + +def attn_bias_shape(attn_impl, n_heads, seq_len, alibi, prefix_lm, causal, use_sequence_id): + if attn_impl == 'flash': + return None + elif attn_impl in ['torch', 'triton']: + if alibi: + if (prefix_lm or not causal) or use_sequence_id: + return (1, n_heads, seq_len, seq_len) + return (1, n_heads, 1, seq_len) + elif prefix_lm or use_sequence_id: + return (1, 1, seq_len, seq_len) + return None + else: + raise ValueError(f'attn_impl={attn_impl!r} is an invalid setting.') + +def build_attn_bias(attn_impl, attn_bias, n_heads, seq_len, causal=False, alibi=False, alibi_bias_max=8): + if attn_impl == 'flash': + return None + elif attn_impl in ['torch', 'triton']: + if alibi: + (device, dtype) = (attn_bias.device, attn_bias.dtype) + attn_bias = attn_bias.add(build_alibi_bias(n_heads, seq_len, full=not causal, alibi_bias_max=alibi_bias_max, device=device, dtype=dtype)) + return attn_bias + else: + raise ValueError(f'attn_impl={attn_impl!r} is an invalid setting.') + +def gen_slopes(n_heads, alibi_bias_max=8, device=None): + _n_heads = 2 ** math.ceil(math.log2(n_heads)) + m = torch.arange(1, _n_heads + 1, dtype=torch.float32, device=device) + m = m.mul(alibi_bias_max / _n_heads) + slopes = 1.0 / torch.pow(2, m) + if _n_heads != n_heads: + slopes = torch.concat([slopes[1::2], slopes[::2]])[:n_heads] + return slopes.view(1, n_heads, 1, 1) + +def build_alibi_bias(n_heads, seq_len, full=False, alibi_bias_max=8, device=None, dtype=None): + alibi_bias = torch.arange(1 - seq_len, 1, dtype=torch.int32, device=device).view(1, 1, 1, seq_len) + if full: + alibi_bias = alibi_bias - torch.arange(1 - seq_len, 1, dtype=torch.int32, device=device).view(1, 1, seq_len, 1) + alibi_bias = alibi_bias.abs().mul(-1) + slopes = gen_slopes(n_heads, alibi_bias_max, device=device) + alibi_bias = alibi_bias * slopes + return alibi_bias.to(dtype=dtype) +ATTN_CLASS_REGISTRY = {'multihead_attention': MultiheadAttention, 'multiquery_attention': MultiQueryAttention} diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/blocks.py b/LLAVA_Biovil/llava/model/language_model/mpt/blocks.py new file mode 100644 index 0000000000000000000000000000000000000000..537e7f9190713bd73332aeb80702efa39320ca60 --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/blocks.py @@ -0,0 +1,41 @@ +"""GPT Blocks used for the GPT Model.""" +from typing import Dict, Optional, Tuple +import torch +import torch.nn as nn +from .attention import ATTN_CLASS_REGISTRY +from .norm import NORM_CLASS_REGISTRY + +class MPTMLP(nn.Module): + + def __init__(self, d_model: int, expansion_ratio: int, device: Optional[str]=None): + super().__init__() + self.up_proj = nn.Linear(d_model, expansion_ratio * d_model, device=device) + self.act = nn.GELU(approximate='none') + self.down_proj = nn.Linear(expansion_ratio * d_model, d_model, device=device) + self.down_proj._is_residual = True + + def forward(self, x): + return self.down_proj(self.act(self.up_proj(x))) + +class MPTBlock(nn.Module): + + def __init__(self, d_model: int, n_heads: int, expansion_ratio: int, attn_config: Dict={'attn_type': 'multihead_attention', 'attn_pdrop': 0.0, 'attn_impl': 'triton', 'qk_ln': False, 'clip_qkv': None, 'softmax_scale': None, 'prefix_lm': False, 'attn_uses_sequence_id': False, 'alibi': False, 'alibi_bias_max': 8}, resid_pdrop: float=0.0, norm_type: str='low_precision_layernorm', verbose: int=0, device: Optional[str]=None, **kwargs): + del kwargs + super().__init__() + norm_class = NORM_CLASS_REGISTRY[norm_type.lower()] + attn_class = ATTN_CLASS_REGISTRY[attn_config['attn_type']] + self.norm_1 = norm_class(d_model, device=device) + self.attn = attn_class(attn_impl=attn_config['attn_impl'], clip_qkv=attn_config['clip_qkv'], qk_ln=attn_config['qk_ln'], softmax_scale=attn_config['softmax_scale'], attn_pdrop=attn_config['attn_pdrop'], d_model=d_model, n_heads=n_heads, verbose=verbose, device=device) + self.norm_2 = norm_class(d_model, device=device) + self.ffn = MPTMLP(d_model=d_model, expansion_ratio=expansion_ratio, device=device) + self.resid_attn_dropout = nn.Dropout(resid_pdrop) + self.resid_ffn_dropout = nn.Dropout(resid_pdrop) + + def forward(self, x: torch.Tensor, past_key_value: Optional[Tuple[torch.Tensor]]=None, attn_bias: Optional[torch.Tensor]=None, attention_mask: Optional[torch.ByteTensor]=None, is_causal: bool=True) -> Tuple[torch.Tensor, Optional[Tuple[torch.Tensor]]]: + a = self.norm_1(x) + (b, attn_weights, past_key_value) = self.attn(a, past_key_value=past_key_value, attn_bias=attn_bias, attention_mask=attention_mask, is_causal=is_causal) + x = x + self.resid_attn_dropout(b) + m = self.norm_2(x) + n = self.ffn(m) + x = x + self.resid_ffn_dropout(n) + return (x, attn_weights, past_key_value) \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/configuration_mpt.py b/LLAVA_Biovil/llava/model/language_model/mpt/configuration_mpt.py new file mode 100644 index 0000000000000000000000000000000000000000..e9eb6fc59b50654ddbe19ed56ad8c0abd1b8efef --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/configuration_mpt.py @@ -0,0 +1,118 @@ +"""A HuggingFace-style model configuration.""" +from typing import Dict, Optional, Union +from transformers import PretrainedConfig +attn_config_defaults: Dict = {'attn_type': 'multihead_attention', 'attn_pdrop': 0.0, 'attn_impl': 'triton', 'qk_ln': False, 'clip_qkv': None, 'softmax_scale': None, 'prefix_lm': False, 'attn_uses_sequence_id': False, 'alibi': False, 'alibi_bias_max': 8} +init_config_defaults: Dict = {'name': 'kaiming_normal_', 'fan_mode': 'fan_in', 'init_nonlinearity': 'relu', 'init_div_is_residual': True, 'emb_init_std': None, 'emb_init_uniform_lim': None, 'init_std': None, 'init_gain': 0.0} + +class MPTConfig(PretrainedConfig): + model_type = 'mpt' + + def __init__(self, d_model: int=2048, n_heads: int=16, n_layers: int=24, expansion_ratio: int=4, max_seq_len: int=2048, vocab_size: int=50368, resid_pdrop: float=0.0, emb_pdrop: float=0.0, learned_pos_emb: bool=True, attn_config: Dict=attn_config_defaults, init_device: str='cpu', logit_scale: Optional[Union[float, str]]=None, no_bias: bool=False, verbose: int=0, embedding_fraction: float=1.0, norm_type: str='low_precision_layernorm', use_cache: bool=False, init_config: Dict=init_config_defaults, **kwargs): + """The MPT configuration class. + + Args: + d_model (int): The size of the embedding dimension of the model. + n_heads (int): The number of attention heads. + n_layers (int): The number of layers in the model. + expansion_ratio (int): The ratio of the up/down scale in the MLP. + max_seq_len (int): The maximum sequence length of the model. + vocab_size (int): The size of the vocabulary. + resid_pdrop (float): The dropout probability applied to the attention output before combining with residual. + emb_pdrop (float): The dropout probability for the embedding layer. + learned_pos_emb (bool): Whether to use learned positional embeddings + attn_config (Dict): A dictionary used to configure the model's attention module: + attn_type (str): type of attention to use. Options: multihead_attention, multiquery_attention + attn_pdrop (float): The dropout probability for the attention layers. + attn_impl (str): The attention implementation to use. One of 'torch', 'flash', or 'triton'. + qk_ln (bool): Whether to apply layer normalization to the queries and keys in the attention layer. + clip_qkv (Optional[float]): If not None, clip the queries, keys, and values in the attention layer to + this value. + softmax_scale (Optional[float]): If not None, scale the softmax in the attention layer by this value. If None, + use the default scale of ``1/sqrt(d_keys)``. + prefix_lm (Optional[bool]): Whether the model should operate as a Prefix LM. This requires passing an + extra `prefix_mask` argument which indicates which tokens belong to the prefix. Tokens in the prefix + can attend to one another bi-directionally. Tokens outside the prefix use causal attention. + attn_uses_sequence_id (Optional[bool]): Whether to restrict attention to tokens that have the same sequence_id. + When the model is in `train` mode, this requires passing an extra `sequence_id` argument which indicates + which sub-sequence each token belongs to. + Defaults to ``False`` meaning any provided `sequence_id` will be ignored. + alibi (bool): Whether to use the alibi bias instead of position embeddings. + alibi_bias_max (int): The maximum value of the alibi bias. + init_device (str): The device to use for parameter initialization. + logit_scale (Optional[Union[float, str]]): If not None, scale the logits by this value. + no_bias (bool): Whether to use bias in all layers. + verbose (int): The verbosity level. 0 is silent. + embedding_fraction (float): The fraction to scale the gradients of the embedding layer by. + norm_type (str): choose type of norm to use + multiquery_attention (bool): Whether to use multiquery attention implementation. + use_cache (bool): Whether or not the model should return the last key/values attentions + init_config (Dict): A dictionary used to configure the model initialization: + init_config.name: The parameter initialization scheme to use. Options: 'default_', 'baseline_', + 'kaiming_uniform_', 'kaiming_normal_', 'neox_init_', 'small_init_', 'xavier_uniform_', or + 'xavier_normal_'. These mimic the parameter initialization methods in PyTorch. + init_div_is_residual (Union[int, float, str, bool]): Value to divide initial weights by if ``module._is_residual`` is True. + emb_init_std (Optional[float]): The standard deviation of the normal distribution used to initialize the embedding layer. + emb_init_uniform_lim (Optional[Union[Tuple[float, float], float]]): The lower and upper limits of the uniform distribution + used to initialize the embedding layer. Mutually exclusive with ``emb_init_std``. + init_std (float): The standard deviation of the normal distribution used to initialize the model, + if using the baseline_ parameter initialization scheme. + init_gain (float): The gain to use for parameter initialization with kaiming or xavier initialization schemes. + fan_mode (str): The fan mode to use for parameter initialization with kaiming initialization schemes. + init_nonlinearity (str): The nonlinearity to use for parameter initialization with kaiming initialization schemes. + --- + See llmfoundry.models.utils.param_init_fns.py for info on other param init config options + """ + self.d_model = d_model + self.n_heads = n_heads + self.n_layers = n_layers + self.expansion_ratio = expansion_ratio + self.max_seq_len = max_seq_len + self.vocab_size = vocab_size + self.resid_pdrop = resid_pdrop + self.emb_pdrop = emb_pdrop + self.learned_pos_emb = learned_pos_emb + self.attn_config = attn_config + self.init_device = init_device + self.logit_scale = logit_scale + self.no_bias = no_bias + self.verbose = verbose + self.embedding_fraction = embedding_fraction + self.norm_type = norm_type + self.use_cache = use_cache + self.init_config = init_config + if 'name' in kwargs: + del kwargs['name'] + if 'loss_fn' in kwargs: + del kwargs['loss_fn'] + super().__init__(**kwargs) + self._validate_config() + + def _set_config_defaults(self, config, config_defaults): + for (k, v) in config_defaults.items(): + if k not in config: + config[k] = v + return config + + def _validate_config(self): + self.attn_config = self._set_config_defaults(self.attn_config, attn_config_defaults) + self.init_config = self._set_config_defaults(self.init_config, init_config_defaults) + if self.d_model % self.n_heads != 0: + raise ValueError('d_model must be divisible by n_heads') + if any((prob < 0 or prob > 1 for prob in [self.attn_config['attn_pdrop'], self.resid_pdrop, self.emb_pdrop])): + raise ValueError("self.attn_config['attn_pdrop'], resid_pdrop, emb_pdrop are probabilities and must be between 0 and 1") + if self.attn_config['attn_impl'] not in ['torch', 'flash', 'triton']: + raise ValueError(f"Unknown attn_impl={self.attn_config['attn_impl']}") + if self.attn_config['prefix_lm'] and self.attn_config['attn_impl'] not in ['torch', 'triton']: + raise NotImplementedError('prefix_lm only implemented with torch and triton attention.') + if self.attn_config['alibi'] and self.attn_config['attn_impl'] not in ['torch', 'triton']: + raise NotImplementedError('alibi only implemented with torch and triton attention.') + if self.attn_config['attn_uses_sequence_id'] and self.attn_config['attn_impl'] not in ['torch', 'triton']: + raise NotImplementedError('attn_uses_sequence_id only implemented with torch and triton attention.') + if self.embedding_fraction > 1 or self.embedding_fraction <= 0: + raise ValueError('model.embedding_fraction must be between 0 (exclusive) and 1 (inclusive)!') + if isinstance(self.logit_scale, str) and self.logit_scale != 'inv_sqrt_d_model': + raise ValueError(f"self.logit_scale={self.logit_scale!r} is not recognized as an option; use numeric value or 'inv_sqrt_d_model'.") + if self.init_config.get('name', None) is None: + raise ValueError(f"self.init_config={self.init_config!r} 'name' needs to be set.") + if not self.learned_pos_emb and (not self.attn_config['alibi']): + raise ValueError(f'Positional information must be provided to the model using either learned_pos_emb or alibi.') \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/custom_embedding.py b/LLAVA_Biovil/llava/model/language_model/mpt/custom_embedding.py new file mode 100644 index 0000000000000000000000000000000000000000..ab357952c397f47898863e8405c4958bb8de82fd --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/custom_embedding.py @@ -0,0 +1,11 @@ +import torch +import torch.nn as nn +import torch.nn.functional as F +from torch import Tensor + +class SharedEmbedding(nn.Embedding): + + def forward(self, input: Tensor, unembed: bool=False) -> Tensor: + if unembed: + return F.linear(input, self.weight) + return super().forward(input) \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/flash_attn_triton.py b/LLAVA_Biovil/llava/model/language_model/mpt/flash_attn_triton.py new file mode 100644 index 0000000000000000000000000000000000000000..c0a42186d982283add95b63d99fc118e845bcf9d --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/flash_attn_triton.py @@ -0,0 +1,484 @@ +""" +Copied from https://github.com/HazyResearch/flash-attention/blob/eff9fe6b8076df59d64d7a3f464696738a3c7c24/flash_attn/flash_attn_triton.py +update imports to use 'triton_pre_mlir' + +*Experimental* implementation of FlashAttention in Triton. +Tested with triton==2.0.0.dev20221202. +Triton 2.0 has a new backend (MLIR) but seems like it doesn't yet work for head dimensions +other than 64: +https://github.com/openai/triton/blob/d376020f90002757eea3ea9475d4f7cfc2ec5ead/python/triton/ops/flash_attention.py#L207 +We'll update this implementation with the new Triton backend once this is fixed. + +We use the FlashAttention implementation from Phil Tillet a starting point. +https://github.com/openai/triton/blob/master/python/tutorials/06-fused-attention.py + +Changes: +- Implement both causal and non-causal attention. +- Implement both self-attention and cross-attention. +- Support arbitrary seqlens (not just multiples of 128), for both forward and backward. +- Support all head dimensions up to 128 (not just 16, 32, 64, 128), for both forward and backward. +- Support attention bias. +- Speed up the forward pass a bit, and only store the LSE instead of m and l. +- Make the backward for d=128 much faster by reducing register spilling. +- Optionally parallelize the backward pass across seqlen_k, to deal with the case of +small batch size * nheads. + +Caution: +- This is an *experimental* implementation. The forward pass should be quite robust but +I'm not 100% sure that the backward pass doesn't have race conditions (due to the Triton compiler). +- This implementation has only been tested on A100. +- If you plan to use headdim other than 64 and 128, you should test for race conditions +(due to the Triton compiler), as done in tests/test_flash_attn.py +"test_flash_attn_triton_race_condition". I've tested and fixed many race conditions +for different head dimensions (40, 48, 64, 128, 80, 88, 96), but I'm still not 100% confident +that there are none left for other head dimensions. + +Differences between this Triton version and the CUDA version: +- Triton version doesn't support dropout. +- Triton forward is generally faster than CUDA forward, while Triton backward is +generally slower than CUDA backward. Overall Triton forward + backward is slightly slower +than CUDA forward + backward. +- Triton version doesn't support different sequence lengths in a batch (i.e., RaggedTensor/NestedTensor). +- Triton version supports attention bias, while CUDA version doesn't. +""" +import math +import torch +import triton_pre_mlir as triton +import triton_pre_mlir.language as tl + +@triton.heuristics({'EVEN_M': lambda args: args['seqlen_q'] % args['BLOCK_M'] == 0, 'EVEN_N': lambda args: args['seqlen_k'] % args['BLOCK_N'] == 0, 'EVEN_HEADDIM': lambda args: args['headdim'] == args['BLOCK_HEADDIM']}) +@triton.jit +def _fwd_kernel(Q, K, V, Bias, Out, Lse, TMP, softmax_scale, stride_qb, stride_qh, stride_qm, stride_kb, stride_kh, stride_kn, stride_vb, stride_vh, stride_vn, stride_bb, stride_bh, stride_bm, stride_ob, stride_oh, stride_om, nheads, seqlen_q, seqlen_k, seqlen_q_rounded, headdim, CACHE_KEY_SEQLEN_Q, CACHE_KEY_SEQLEN_K, BIAS_TYPE: tl.constexpr, IS_CAUSAL: tl.constexpr, BLOCK_HEADDIM: tl.constexpr, EVEN_M: tl.constexpr, EVEN_N: tl.constexpr, EVEN_HEADDIM: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr): + start_m = tl.program_id(0) + off_hb = tl.program_id(1) + off_b = off_hb // nheads + off_h = off_hb % nheads + offs_m = start_m * BLOCK_M + tl.arange(0, BLOCK_M) + offs_n = tl.arange(0, BLOCK_N) + offs_d = tl.arange(0, BLOCK_HEADDIM) + q_ptrs = Q + off_b * stride_qb + off_h * stride_qh + (offs_m[:, None] * stride_qm + offs_d[None, :]) + k_ptrs = K + off_b * stride_kb + off_h * stride_kh + (offs_n[:, None] * stride_kn + offs_d[None, :]) + v_ptrs = V + off_b * stride_vb + off_h * stride_vh + (offs_n[:, None] * stride_vn + offs_d[None, :]) + if BIAS_TYPE == 'vector': + b_ptrs = Bias + off_b * stride_bb + off_h * stride_bh + offs_n + elif BIAS_TYPE == 'matrix': + b_ptrs = Bias + off_b * stride_bb + off_h * stride_bh + (offs_m[:, None] * stride_bm + offs_n[None, :]) + t_ptrs = TMP + off_hb * seqlen_q_rounded + offs_m + lse_i = tl.zeros([BLOCK_M], dtype=tl.float32) - float('inf') + m_i = tl.zeros([BLOCK_M], dtype=tl.float32) - float('inf') + acc_o = tl.zeros([BLOCK_M, BLOCK_HEADDIM], dtype=tl.float32) + if EVEN_M & EVEN_N: + if EVEN_HEADDIM: + q = tl.load(q_ptrs) + else: + q = tl.load(q_ptrs, mask=offs_d[None, :] < headdim, other=0.0) + elif EVEN_HEADDIM: + q = tl.load(q_ptrs, mask=offs_m[:, None] < seqlen_q, other=0.0) + else: + q = tl.load(q_ptrs, mask=(offs_m[:, None] < seqlen_q) & (offs_d[None, :] < headdim), other=0.0) + end_n = seqlen_k if not IS_CAUSAL else tl.minimum((start_m + 1) * BLOCK_M, seqlen_k) + for start_n in range(0, end_n, BLOCK_N): + start_n = tl.multiple_of(start_n, BLOCK_N) + if EVEN_N & EVEN_M: + if EVEN_HEADDIM: + k = tl.load(k_ptrs + start_n * stride_kn) + else: + k = tl.load(k_ptrs + start_n * stride_kn, mask=offs_d[None, :] < headdim, other=0.0) + elif EVEN_HEADDIM: + k = tl.load(k_ptrs + start_n * stride_kn, mask=(start_n + offs_n)[:, None] < seqlen_k, other=0.0) + else: + k = tl.load(k_ptrs + start_n * stride_kn, mask=((start_n + offs_n)[:, None] < seqlen_k) & (offs_d[None, :] < headdim), other=0.0) + qk = tl.zeros([BLOCK_M, BLOCK_N], dtype=tl.float32) + qk += tl.dot(q, k, trans_b=True) + if not EVEN_N: + qk += tl.where((start_n + offs_n)[None, :] < seqlen_k, 0, float('-inf')) + if IS_CAUSAL: + qk += tl.where(offs_m[:, None] >= (start_n + offs_n)[None, :], 0, float('-inf')) + if BIAS_TYPE != 'none': + if BIAS_TYPE == 'vector': + if EVEN_N: + bias = tl.load(b_ptrs + start_n).to(tl.float32) + else: + bias = tl.load(b_ptrs + start_n, mask=start_n + offs_n < seqlen_k, other=0.0).to(tl.float32) + bias = bias[None, :] + elif BIAS_TYPE == 'matrix': + if EVEN_M & EVEN_N: + bias = tl.load(b_ptrs + start_n).to(tl.float32) + else: + bias = tl.load(b_ptrs + start_n, mask=(offs_m[:, None] < seqlen_q) & ((start_n + offs_n)[None, :] < seqlen_k), other=0.0).to(tl.float32) + qk = qk * softmax_scale + bias + m_ij = tl.maximum(tl.max(qk, 1), lse_i) + p = tl.exp(qk - m_ij[:, None]) + else: + m_ij = tl.maximum(tl.max(qk, 1) * softmax_scale, lse_i) + p = tl.exp(qk * softmax_scale - m_ij[:, None]) + l_ij = tl.sum(p, 1) + acc_o_scale = tl.exp(m_i - m_ij) + tl.store(t_ptrs, acc_o_scale) + acc_o_scale = tl.load(t_ptrs) + acc_o = acc_o * acc_o_scale[:, None] + if EVEN_N & EVEN_M: + if EVEN_HEADDIM: + v = tl.load(v_ptrs + start_n * stride_vn) + else: + v = tl.load(v_ptrs + start_n * stride_vn, mask=offs_d[None, :] < headdim, other=0.0) + elif EVEN_HEADDIM: + v = tl.load(v_ptrs + start_n * stride_vn, mask=(start_n + offs_n)[:, None] < seqlen_k, other=0.0) + else: + v = tl.load(v_ptrs + start_n * stride_vn, mask=((start_n + offs_n)[:, None] < seqlen_k) & (offs_d[None, :] < headdim), other=0.0) + p = p.to(v.dtype) + acc_o += tl.dot(p, v) + m_i = m_ij + l_i_new = tl.exp(lse_i - m_ij) + l_ij + lse_i = m_ij + tl.log(l_i_new) + o_scale = tl.exp(m_i - lse_i) + tl.store(t_ptrs, o_scale) + o_scale = tl.load(t_ptrs) + acc_o = acc_o * o_scale[:, None] + start_m = tl.program_id(0) + offs_m = start_m * BLOCK_M + tl.arange(0, BLOCK_M) + lse_ptrs = Lse + off_hb * seqlen_q_rounded + offs_m + tl.store(lse_ptrs, lse_i) + offs_d = tl.arange(0, BLOCK_HEADDIM) + out_ptrs = Out + off_b * stride_ob + off_h * stride_oh + (offs_m[:, None] * stride_om + offs_d[None, :]) + if EVEN_M: + if EVEN_HEADDIM: + tl.store(out_ptrs, acc_o) + else: + tl.store(out_ptrs, acc_o, mask=offs_d[None, :] < headdim) + elif EVEN_HEADDIM: + tl.store(out_ptrs, acc_o, mask=offs_m[:, None] < seqlen_q) + else: + tl.store(out_ptrs, acc_o, mask=(offs_m[:, None] < seqlen_q) & (offs_d[None, :] < headdim)) + +@triton.jit +def _bwd_preprocess_do_o_dot(Out, DO, Delta, stride_ob, stride_oh, stride_om, stride_dob, stride_doh, stride_dom, nheads, seqlen_q, seqlen_q_rounded, headdim, BLOCK_M: tl.constexpr, BLOCK_HEADDIM: tl.constexpr): + start_m = tl.program_id(0) + off_hb = tl.program_id(1) + off_b = off_hb // nheads + off_h = off_hb % nheads + offs_m = start_m * BLOCK_M + tl.arange(0, BLOCK_M) + offs_d = tl.arange(0, BLOCK_HEADDIM) + o = tl.load(Out + off_b * stride_ob + off_h * stride_oh + offs_m[:, None] * stride_om + offs_d[None, :], mask=(offs_m[:, None] < seqlen_q) & (offs_d[None, :] < headdim), other=0.0).to(tl.float32) + do = tl.load(DO + off_b * stride_dob + off_h * stride_doh + offs_m[:, None] * stride_dom + offs_d[None, :], mask=(offs_m[:, None] < seqlen_q) & (offs_d[None, :] < headdim), other=0.0).to(tl.float32) + delta = tl.sum(o * do, axis=1) + tl.store(Delta + off_hb * seqlen_q_rounded + offs_m, delta) + +@triton.jit +def _bwd_store_dk_dv(dk_ptrs, dv_ptrs, dk, dv, offs_n, offs_d, seqlen_k, headdim, EVEN_M: tl.constexpr, EVEN_N: tl.constexpr, EVEN_HEADDIM: tl.constexpr): + if EVEN_N & EVEN_M: + if EVEN_HEADDIM: + tl.store(dv_ptrs, dv) + tl.store(dk_ptrs, dk) + else: + tl.store(dv_ptrs, dv, mask=offs_d[None, :] < headdim) + tl.store(dk_ptrs, dk, mask=offs_d[None, :] < headdim) + elif EVEN_HEADDIM: + tl.store(dv_ptrs, dv, mask=offs_n[:, None] < seqlen_k) + tl.store(dk_ptrs, dk, mask=offs_n[:, None] < seqlen_k) + else: + tl.store(dv_ptrs, dv, mask=(offs_n[:, None] < seqlen_k) & (offs_d[None, :] < headdim)) + tl.store(dk_ptrs, dk, mask=(offs_n[:, None] < seqlen_k) & (offs_d[None, :] < headdim)) + +@triton.jit +def _bwd_kernel_one_col_block(start_n, Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scale, stride_qm, stride_kn, stride_vn, stride_bm, stride_dom, stride_dqm, stride_dkn, stride_dvn, seqlen_q, seqlen_k, headdim, ATOMIC_ADD: tl.constexpr, BIAS_TYPE: tl.constexpr, IS_CAUSAL: tl.constexpr, BLOCK_HEADDIM: tl.constexpr, EVEN_M: tl.constexpr, EVEN_N: tl.constexpr, EVEN_HEADDIM: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr): + begin_m = 0 if not IS_CAUSAL else start_n * BLOCK_N // BLOCK_M * BLOCK_M + offs_qm = begin_m + tl.arange(0, BLOCK_M) + offs_n = start_n * BLOCK_N + tl.arange(0, BLOCK_N) + offs_m = tl.arange(0, BLOCK_M) + offs_d = tl.arange(0, BLOCK_HEADDIM) + q_ptrs = Q + (offs_qm[:, None] * stride_qm + offs_d[None, :]) + k_ptrs = K + (offs_n[:, None] * stride_kn + offs_d[None, :]) + v_ptrs = V + (offs_n[:, None] * stride_vn + offs_d[None, :]) + do_ptrs = DO + (offs_qm[:, None] * stride_dom + offs_d[None, :]) + dq_ptrs = DQ + (offs_qm[:, None] * stride_dqm + offs_d[None, :]) + if BIAS_TYPE == 'vector': + b_ptrs = Bias + offs_n + elif BIAS_TYPE == 'matrix': + b_ptrs = Bias + (offs_qm[:, None] * stride_bm + offs_n[None, :]) + dv = tl.zeros([BLOCK_N, BLOCK_HEADDIM], dtype=tl.float32) + dk = tl.zeros([BLOCK_N, BLOCK_HEADDIM], dtype=tl.float32) + if begin_m >= seqlen_q: + dv_ptrs = DV + (offs_n[:, None] * stride_dvn + offs_d[None, :]) + dk_ptrs = DK + (offs_n[:, None] * stride_dkn + offs_d[None, :]) + _bwd_store_dk_dv(dk_ptrs, dv_ptrs, dk, dv, offs_n, offs_d, seqlen_k, headdim, EVEN_M=EVEN_M, EVEN_N=EVEN_N, EVEN_HEADDIM=EVEN_HEADDIM) + return + if EVEN_N & EVEN_M: + if EVEN_HEADDIM: + k = tl.load(k_ptrs) + v = tl.load(v_ptrs) + else: + k = tl.load(k_ptrs, mask=offs_d[None, :] < headdim, other=0.0) + v = tl.load(v_ptrs, mask=offs_d[None, :] < headdim, other=0.0) + elif EVEN_HEADDIM: + k = tl.load(k_ptrs, mask=offs_n[:, None] < seqlen_k, other=0.0) + v = tl.load(v_ptrs, mask=offs_n[:, None] < seqlen_k, other=0.0) + else: + k = tl.load(k_ptrs, mask=(offs_n[:, None] < seqlen_k) & (offs_d[None, :] < headdim), other=0.0) + v = tl.load(v_ptrs, mask=(offs_n[:, None] < seqlen_k) & (offs_d[None, :] < headdim), other=0.0) + num_block_m = tl.cdiv(seqlen_q, BLOCK_M) + for start_m in range(begin_m, num_block_m * BLOCK_M, BLOCK_M): + start_m = tl.multiple_of(start_m, BLOCK_M) + offs_m_curr = start_m + offs_m + if EVEN_M & EVEN_HEADDIM: + q = tl.load(q_ptrs) + elif EVEN_HEADDIM: + q = tl.load(q_ptrs, mask=offs_m_curr[:, None] < seqlen_q, other=0.0) + else: + q = tl.load(q_ptrs, mask=(offs_m_curr[:, None] < seqlen_q) & (offs_d[None, :] < headdim), other=0.0) + qk = tl.dot(q, k, trans_b=True) + if not EVEN_N: + qk = tl.where(offs_n[None, :] < seqlen_k, qk, float('-inf')) + if IS_CAUSAL: + qk = tl.where(offs_m_curr[:, None] >= offs_n[None, :], qk, float('-inf')) + if BIAS_TYPE != 'none': + tl.debug_barrier() + if BIAS_TYPE == 'vector': + if EVEN_N: + bias = tl.load(b_ptrs).to(tl.float32) + else: + bias = tl.load(b_ptrs, mask=offs_n < seqlen_k, other=0.0).to(tl.float32) + bias = bias[None, :] + elif BIAS_TYPE == 'matrix': + if EVEN_M & EVEN_N: + bias = tl.load(b_ptrs).to(tl.float32) + else: + bias = tl.load(b_ptrs, mask=(offs_m_curr[:, None] < seqlen_q) & (offs_n[None, :] < seqlen_k), other=0.0).to(tl.float32) + qk = qk * softmax_scale + bias + if not EVEN_M & EVEN_HEADDIM: + tl.debug_barrier() + lse_i = tl.load(LSE + offs_m_curr) + if BIAS_TYPE == 'none': + p = tl.exp(qk * softmax_scale - lse_i[:, None]) + else: + p = tl.exp(qk - lse_i[:, None]) + if EVEN_M & EVEN_HEADDIM: + do = tl.load(do_ptrs) + else: + do = tl.load(do_ptrs, mask=(offs_m_curr[:, None] < seqlen_q) & (offs_d[None, :] < headdim), other=0.0) + dv += tl.dot(p.to(do.dtype), do, trans_a=True) + if not EVEN_M & EVEN_HEADDIM: + tl.debug_barrier() + dp = tl.dot(do, v, trans_b=True) + if not EVEN_HEADDIM: + tl.debug_barrier() + Di = tl.load(D + offs_m_curr) + ds = (p * (dp - Di[:, None]) * softmax_scale).to(q.dtype) + dk += tl.dot(ds, q, trans_a=True) + if not EVEN_M & EVEN_HEADDIM: + tl.debug_barrier() + if not ATOMIC_ADD: + if EVEN_M & EVEN_HEADDIM: + dq = tl.load(dq_ptrs, eviction_policy='evict_last') + dq += tl.dot(ds, k) + tl.store(dq_ptrs, dq, eviction_policy='evict_last') + elif EVEN_HEADDIM: + dq = tl.load(dq_ptrs, mask=offs_m_curr[:, None] < seqlen_q, other=0.0, eviction_policy='evict_last') + dq += tl.dot(ds, k) + tl.store(dq_ptrs, dq, mask=offs_m_curr[:, None] < seqlen_q, eviction_policy='evict_last') + else: + dq = tl.load(dq_ptrs, mask=(offs_m_curr[:, None] < seqlen_q) & (offs_d[None, :] < headdim), other=0.0, eviction_policy='evict_last') + dq += tl.dot(ds, k) + tl.store(dq_ptrs, dq, mask=(offs_m_curr[:, None] < seqlen_q) & (offs_d[None, :] < headdim), eviction_policy='evict_last') + else: + dq = tl.dot(ds, k) + if EVEN_M & EVEN_HEADDIM: + tl.atomic_add(dq_ptrs, dq) + elif EVEN_HEADDIM: + tl.atomic_add(dq_ptrs, dq, mask=offs_m_curr[:, None] < seqlen_q) + else: + tl.atomic_add(dq_ptrs, dq, mask=(offs_m_curr[:, None] < seqlen_q) & (offs_d[None, :] < headdim)) + dq_ptrs += BLOCK_M * stride_dqm + q_ptrs += BLOCK_M * stride_qm + do_ptrs += BLOCK_M * stride_dom + if BIAS_TYPE == 'matrix': + b_ptrs += BLOCK_M * stride_bm + dv_ptrs = DV + (offs_n[:, None] * stride_dvn + offs_d[None, :]) + dk_ptrs = DK + (offs_n[:, None] * stride_dkn + offs_d[None, :]) + _bwd_store_dk_dv(dk_ptrs, dv_ptrs, dk, dv, offs_n, offs_d, seqlen_k, headdim, EVEN_M=EVEN_M, EVEN_N=EVEN_N, EVEN_HEADDIM=EVEN_HEADDIM) + +def init_to_zero(name): + return lambda nargs: nargs[name].zero_() + +@triton.autotune(configs=[triton.Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'SEQUENCE_PARALLEL': False}, num_warps=8, num_stages=1, pre_hook=init_to_zero('DQ')), triton.Config({'BLOCK_M': 128, 'BLOCK_N': 128, 'SEQUENCE_PARALLEL': True}, num_warps=8, num_stages=1, pre_hook=init_to_zero('DQ'))], key=['CACHE_KEY_SEQLEN_Q', 'CACHE_KEY_SEQLEN_K', 'BIAS_TYPE', 'IS_CAUSAL', 'BLOCK_HEADDIM']) +@triton.heuristics({'EVEN_M': lambda args: args['seqlen_q'] % args['BLOCK_M'] == 0, 'EVEN_N': lambda args: args['seqlen_k'] % args['BLOCK_N'] == 0, 'EVEN_HEADDIM': lambda args: args['headdim'] == args['BLOCK_HEADDIM']}) +@triton.jit +def _bwd_kernel(Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scale, stride_qb, stride_qh, stride_qm, stride_kb, stride_kh, stride_kn, stride_vb, stride_vh, stride_vn, stride_bb, stride_bh, stride_bm, stride_dob, stride_doh, stride_dom, stride_dqb, stride_dqh, stride_dqm, stride_dkb, stride_dkh, stride_dkn, stride_dvb, stride_dvh, stride_dvn, nheads, seqlen_q, seqlen_k, seqlen_q_rounded, headdim, CACHE_KEY_SEQLEN_Q, CACHE_KEY_SEQLEN_K, BIAS_TYPE: tl.constexpr, IS_CAUSAL: tl.constexpr, BLOCK_HEADDIM: tl.constexpr, SEQUENCE_PARALLEL: tl.constexpr, EVEN_M: tl.constexpr, EVEN_N: tl.constexpr, EVEN_HEADDIM: tl.constexpr, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr): + off_hb = tl.program_id(1) + off_b = off_hb // nheads + off_h = off_hb % nheads + Q += off_b * stride_qb + off_h * stride_qh + K += off_b * stride_kb + off_h * stride_kh + V += off_b * stride_vb + off_h * stride_vh + DO += off_b * stride_dob + off_h * stride_doh + DQ += off_b * stride_dqb + off_h * stride_dqh + DK += off_b * stride_dkb + off_h * stride_dkh + DV += off_b * stride_dvb + off_h * stride_dvh + if BIAS_TYPE != 'none': + Bias += off_b * stride_bb + off_h * stride_bh + D += off_hb * seqlen_q_rounded + LSE += off_hb * seqlen_q_rounded + if not SEQUENCE_PARALLEL: + num_block_n = tl.cdiv(seqlen_k, BLOCK_N) + for start_n in range(0, num_block_n): + _bwd_kernel_one_col_block(start_n, Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scale, stride_qm, stride_kn, stride_vn, stride_bm, stride_dom, stride_dqm, stride_dkn, stride_dvn, seqlen_q, seqlen_k, headdim, ATOMIC_ADD=False, BIAS_TYPE=BIAS_TYPE, IS_CAUSAL=IS_CAUSAL, BLOCK_HEADDIM=BLOCK_HEADDIM, EVEN_M=EVEN_M, EVEN_N=EVEN_N, EVEN_HEADDIM=EVEN_HEADDIM, BLOCK_M=BLOCK_M, BLOCK_N=BLOCK_N) + else: + start_n = tl.program_id(0) + _bwd_kernel_one_col_block(start_n, Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scale, stride_qm, stride_kn, stride_vn, stride_bm, stride_dom, stride_dqm, stride_dkn, stride_dvn, seqlen_q, seqlen_k, headdim, ATOMIC_ADD=True, BIAS_TYPE=BIAS_TYPE, IS_CAUSAL=IS_CAUSAL, BLOCK_HEADDIM=BLOCK_HEADDIM, EVEN_M=EVEN_M, EVEN_N=EVEN_N, EVEN_HEADDIM=EVEN_HEADDIM, BLOCK_M=BLOCK_M, BLOCK_N=BLOCK_N) + +def _flash_attn_forward(q, k, v, bias=None, causal=False, softmax_scale=None): + (batch, seqlen_q, nheads, d) = q.shape + (_, seqlen_k, _, _) = k.shape + assert k.shape == (batch, seqlen_k, nheads, d) + assert v.shape == (batch, seqlen_k, nheads, d) + assert d <= 128, 'FlashAttention only support head dimensions up to 128' + assert q.dtype == k.dtype == v.dtype, 'All tensors must have the same type' + assert q.dtype in [torch.float16, torch.bfloat16], 'Only support fp16 and bf16' + assert q.is_cuda and k.is_cuda and v.is_cuda + softmax_scale = softmax_scale or 1.0 / math.sqrt(d) + has_bias = bias is not None + bias_type = 'none' + if has_bias: + assert bias.dtype in [q.dtype, torch.float] + assert bias.is_cuda + assert bias.dim() == 4 + if bias.stride(-1) != 1: + bias = bias.contiguous() + if bias.shape[2:] == (1, seqlen_k): + bias_type = 'vector' + elif bias.shape[2:] == (seqlen_q, seqlen_k): + bias_type = 'matrix' + else: + raise RuntimeError('Last 2 dimensions of bias must be (1, seqlen_k) or (seqlen_q, seqlen_k)') + bias = bias.expand(batch, nheads, seqlen_q, seqlen_k) + bias_strides = (bias.stride(0), bias.stride(1), bias.stride(2)) if has_bias else (0, 0, 0) + seqlen_q_rounded = math.ceil(seqlen_q / 128) * 128 + lse = torch.empty((batch, nheads, seqlen_q_rounded), device=q.device, dtype=torch.float32) + tmp = torch.empty((batch, nheads, seqlen_q_rounded), device=q.device, dtype=torch.float32) + o = torch.empty_like(q) + BLOCK_HEADDIM = max(triton.next_power_of_2(d), 16) + BLOCK = 128 + num_warps = 4 if d <= 64 else 8 + grid = lambda META: (triton.cdiv(seqlen_q, META['BLOCK_M']), batch * nheads) + _fwd_kernel[grid](q, k, v, bias, o, lse, tmp, softmax_scale, q.stride(0), q.stride(2), q.stride(1), k.stride(0), k.stride(2), k.stride(1), v.stride(0), v.stride(2), v.stride(1), *bias_strides, o.stride(0), o.stride(2), o.stride(1), nheads, seqlen_q, seqlen_k, seqlen_q_rounded, d, seqlen_q // 32, seqlen_k // 32, bias_type, causal, BLOCK_HEADDIM, BLOCK_M=BLOCK, BLOCK_N=BLOCK, num_warps=num_warps, num_stages=1) + return (o, lse, softmax_scale) + +def _flash_attn_backward(do, q, k, v, o, lse, dq, dk, dv, bias=None, causal=False, softmax_scale=None): + if do.stride(-1) != 1: + do = do.contiguous() + (batch, seqlen_q, nheads, d) = q.shape + (_, seqlen_k, _, _) = k.shape + assert d <= 128 + seqlen_q_rounded = math.ceil(seqlen_q / 128) * 128 + assert lse.shape == (batch, nheads, seqlen_q_rounded) + assert q.stride(-1) == k.stride(-1) == v.stride(-1) == o.stride(-1) == 1 + assert dq.stride(-1) == dk.stride(-1) == dv.stride(-1) == 1 + softmax_scale = softmax_scale or 1.0 / math.sqrt(d) + dq_accum = torch.empty_like(q, dtype=torch.float32) + delta = torch.empty_like(lse) + BLOCK_HEADDIM = max(triton.next_power_of_2(d), 16) + grid = lambda META: (triton.cdiv(seqlen_q, META['BLOCK_M']), batch * nheads) + _bwd_preprocess_do_o_dot[grid](o, do, delta, o.stride(0), o.stride(2), o.stride(1), do.stride(0), do.stride(2), do.stride(1), nheads, seqlen_q, seqlen_q_rounded, d, BLOCK_M=128, BLOCK_HEADDIM=BLOCK_HEADDIM) + has_bias = bias is not None + bias_type = 'none' + if has_bias: + assert bias.dtype in [q.dtype, torch.float] + assert bias.is_cuda + assert bias.dim() == 4 + assert bias.stride(-1) == 1 + if bias.shape[2:] == (1, seqlen_k): + bias_type = 'vector' + elif bias.shape[2:] == (seqlen_q, seqlen_k): + bias_type = 'matrix' + else: + raise RuntimeError('Last 2 dimensions of bias must be (1, seqlen_k) or (seqlen_q, seqlen_k)') + bias = bias.expand(batch, nheads, seqlen_q, seqlen_k) + bias_strides = (bias.stride(0), bias.stride(1), bias.stride(2)) if has_bias else (0, 0, 0) + grid = lambda META: (triton.cdiv(seqlen_k, META['BLOCK_N']) if META['SEQUENCE_PARALLEL'] else 1, batch * nheads) + _bwd_kernel[grid](q, k, v, bias, do, dq_accum, dk, dv, lse, delta, softmax_scale, q.stride(0), q.stride(2), q.stride(1), k.stride(0), k.stride(2), k.stride(1), v.stride(0), v.stride(2), v.stride(1), *bias_strides, do.stride(0), do.stride(2), do.stride(1), dq_accum.stride(0), dq_accum.stride(2), dq_accum.stride(1), dk.stride(0), dk.stride(2), dk.stride(1), dv.stride(0), dv.stride(2), dv.stride(1), nheads, seqlen_q, seqlen_k, seqlen_q_rounded, d, seqlen_q // 32, seqlen_k // 32, bias_type, causal, BLOCK_HEADDIM) + dq.copy_(dq_accum) + +class FlashAttnQKVPackedFunc(torch.autograd.Function): + + @staticmethod + def forward(ctx, qkv, bias=None, causal=False, softmax_scale=None): + """ + qkv: (batch, seqlen, 3, nheads, headdim) + bias: optional, shape broadcastible to (batch, nheads, seqlen, seqlen). + For example, ALiBi mask for causal would have shape (1, nheads, 1, seqlen). + ALiBi mask for non-causal would have shape (1, nheads, seqlen, seqlen) + """ + if qkv.stride(-1) != 1: + qkv = qkv.contiguous() + (o, lse, ctx.softmax_scale) = _flash_attn_forward(qkv[:, :, 0], qkv[:, :, 1], qkv[:, :, 2], bias=bias, causal=causal, softmax_scale=softmax_scale) + ctx.save_for_backward(qkv, o, lse, bias) + ctx.causal = causal + return o + + @staticmethod + def backward(ctx, do): + (qkv, o, lse, bias) = ctx.saved_tensors + assert not ctx.needs_input_grad[1], 'FlashAttention does not support bias gradient yet' + with torch.inference_mode(): + dqkv = torch.empty_like(qkv) + _flash_attn_backward(do, qkv[:, :, 0], qkv[:, :, 1], qkv[:, :, 2], o, lse, dqkv[:, :, 0], dqkv[:, :, 1], dqkv[:, :, 2], bias=bias, causal=ctx.causal, softmax_scale=ctx.softmax_scale) + return (dqkv, None, None, None) +flash_attn_qkvpacked_func = FlashAttnQKVPackedFunc.apply + +class FlashAttnKVPackedFunc(torch.autograd.Function): + + @staticmethod + def forward(ctx, q, kv, bias=None, causal=False, softmax_scale=None): + """ + q: (batch, seqlen_q, nheads, headdim) + kv: (batch, seqlen_k, 2, nheads, headdim) + bias: optional, shape broadcastible to (batch, nheads, seqlen_q, seqlen_k). + For example, ALiBi mask for causal would have shape (1, nheads, 1, seqlen_k). + ALiBi mask for non-causal would have shape (1, nheads, seqlen_q, seqlen_k) + """ + (q, kv) = [x if x.stride(-1) == 1 else x.contiguous() for x in [q, kv]] + (o, lse, ctx.softmax_scale) = _flash_attn_forward(q, kv[:, :, 0], kv[:, :, 1], bias=bias, causal=causal, softmax_scale=softmax_scale) + ctx.save_for_backward(q, kv, o, lse, bias) + ctx.causal = causal + return o + + @staticmethod + def backward(ctx, do): + (q, kv, o, lse, bias) = ctx.saved_tensors + if len(ctx.needs_input_grad) >= 3: + assert not ctx.needs_input_grad[2], 'FlashAttention does not support bias gradient yet' + with torch.inference_mode(): + dq = torch.empty_like(q) + dkv = torch.empty_like(kv) + _flash_attn_backward(do, q, kv[:, :, 0], kv[:, :, 1], o, lse, dq, dkv[:, :, 0], dkv[:, :, 1], bias=bias, causal=ctx.causal, softmax_scale=ctx.softmax_scale) + return (dq, dkv, None, None, None) +flash_attn_kvpacked_func = FlashAttnKVPackedFunc.apply + +class FlashAttnFunc(torch.autograd.Function): + + @staticmethod + def forward(ctx, q, k, v, bias=None, causal=False, softmax_scale=None): + """ + q: (batch_size, seqlen_q, nheads, headdim) + k, v: (batch_size, seqlen_k, nheads, headdim) + bias: optional, shape broadcastible to (batch, nheads, seqlen_q, seqlen_k). + For example, ALiBi mask for causal would have shape (1, nheads, 1, seqlen_k). + ALiBi mask for non-causal would have shape (1, nheads, seqlen_q, seqlen_k) + """ + (q, k, v) = [x if x.stride(-1) == 1 else x.contiguous() for x in [q, k, v]] + (o, lse, ctx.softmax_scale) = _flash_attn_forward(q, k, v, bias=bias, causal=causal, softmax_scale=softmax_scale) + ctx.save_for_backward(q, k, v, o, lse, bias) + ctx.causal = causal + return o + + @staticmethod + def backward(ctx, do): + (q, k, v, o, lse, bias) = ctx.saved_tensors + assert not ctx.needs_input_grad[3], 'FlashAttention does not support bias gradient yet' + with torch.inference_mode(): + dq = torch.empty_like(q) + dk = torch.empty_like(k) + dv = torch.empty_like(v) + _flash_attn_backward(do, q, k, v, o, lse, dq, dk, dv, bias=bias, causal=ctx.causal, softmax_scale=ctx.softmax_scale) + return (dq, dk, dv, None, None, None) +flash_attn_func = FlashAttnFunc.apply \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/hf_prefixlm_converter.py b/LLAVA_Biovil/llava/model/language_model/mpt/hf_prefixlm_converter.py new file mode 100644 index 0000000000000000000000000000000000000000..8c1a6487202a6400a7116a6bd68b493892ef0d14 --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/hf_prefixlm_converter.py @@ -0,0 +1,415 @@ +"""Converts Huggingface Causal LM to Prefix LM. + +Conversion does lightweight surgery on a HuggingFace +Causal LM to convert it to a Prefix LM. + +Prefix LMs accepts a `bidirectional_mask` input in `forward` +and treat the input prompt as the prefix in `generate`. +""" +import math +import warnings +from types import MethodType +from typing import Any, Dict, List, Optional, Tuple, Union +import torch +from transformers.models.bloom.modeling_bloom import BaseModelOutputWithPastAndCrossAttentions, BloomForCausalLM, BloomModel, CausalLMOutputWithCrossAttentions, CrossEntropyLoss +from transformers.models.bloom.modeling_bloom import _expand_mask as _expand_mask_bloom +from transformers.models.bloom.modeling_bloom import _make_causal_mask as _make_causal_mask_bloom +from transformers.models.bloom.modeling_bloom import logging +from transformers.models.gpt2.modeling_gpt2 import GPT2LMHeadModel +from transformers.models.gpt_neo.modeling_gpt_neo import GPTNeoForCausalLM +from transformers.models.gpt_neox.modeling_gpt_neox import GPTNeoXForCausalLM +from transformers.models.gptj.modeling_gptj import GPTJForCausalLM +from transformers.models.opt.modeling_opt import OPTForCausalLM +from transformers.models.opt.modeling_opt import _expand_mask as _expand_mask_opt +from transformers.models.opt.modeling_opt import _make_causal_mask as _make_causal_mask_opt +logger = logging.get_logger(__name__) +_SUPPORTED_GPT_MODELS = (GPT2LMHeadModel, GPTJForCausalLM, GPTNeoForCausalLM, GPTNeoXForCausalLM) +CAUSAL_GPT_TYPES = Union[GPT2LMHeadModel, GPTJForCausalLM, GPTNeoForCausalLM, GPTNeoXForCausalLM] + +def _convert_gpt_causal_lm_to_prefix_lm(model: CAUSAL_GPT_TYPES) -> CAUSAL_GPT_TYPES: + """Converts a GPT-style Causal LM to a Prefix LM. + + Supported HuggingFace model classes: + - `GPT2LMHeadModel` + - `GPTNeoForCausalLM` + - `GPTNeoXForCausalLM` + - `GPTJForCausalLM` + + See `convert_hf_causal_lm_to_prefix_lm` for more details. + """ + if hasattr(model, '_prefix_lm_converted'): + return model + assert isinstance(model, _SUPPORTED_GPT_MODELS) + assert model.config.add_cross_attention == False, 'Only supports GPT-style decoder-only models' + + def _get_attn_modules(model: CAUSAL_GPT_TYPES) -> List[torch.nn.Module]: + """Helper that gets a list of the model's attention modules. + + Each module has a `bias` buffer used for causal masking. The Prefix LM + conversion adds logic to dynamically manipulate these biases to support + Prefix LM attention masking. + """ + attn_modules = [] + if isinstance(model, GPTNeoXForCausalLM): + blocks = model.gpt_neox.layers + else: + blocks = model.transformer.h + for block in blocks: + if isinstance(model, GPTNeoForCausalLM): + if block.attn.attention_type != 'global': + continue + attn_module = block.attn.attention + elif isinstance(model, GPTNeoXForCausalLM): + attn_module = block.attention + else: + attn_module = block.attn + attn_modules.append(attn_module) + return attn_modules + setattr(model, '_original_forward', getattr(model, 'forward')) + setattr(model, '_original_generate', getattr(model, 'generate')) + + def forward(self: CAUSAL_GPT_TYPES, input_ids: Optional[torch.LongTensor]=None, past_key_values: Optional[Tuple[Tuple[torch.Tensor]]]=None, attention_mask: Optional[torch.FloatTensor]=None, bidirectional_mask: Optional[torch.Tensor]=None, token_type_ids: Optional[torch.LongTensor]=None, position_ids: Optional[torch.LongTensor]=None, head_mask: Optional[torch.FloatTensor]=None, inputs_embeds: Optional[torch.FloatTensor]=None, labels: Optional[torch.LongTensor]=None, use_cache: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, return_dict: Optional[bool]=None): + """Wraps original forward to enable PrefixLM attention.""" + + def call_og_forward(): + if isinstance(self, GPTNeoXForCausalLM): + return self._original_forward(input_ids=input_ids, past_key_values=past_key_values, attention_mask=attention_mask, head_mask=head_mask, inputs_embeds=inputs_embeds, labels=labels, use_cache=use_cache, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict) + else: + return self._original_forward(input_ids=input_ids, past_key_values=past_key_values, attention_mask=attention_mask, token_type_ids=token_type_ids, position_ids=position_ids, head_mask=head_mask, inputs_embeds=inputs_embeds, labels=labels, use_cache=use_cache, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict) + if bidirectional_mask is None: + return call_og_forward() + assert isinstance(bidirectional_mask, torch.Tensor) + attn_modules = _get_attn_modules(model) + (b, s) = bidirectional_mask.shape + max_length = attn_modules[0].bias.shape[-1] + if s > max_length: + raise ValueError(f'bidirectional_mask sequence length (={s}) exceeds the ' + f'max length allowed by the model ({max_length}).') + assert s <= max_length + if s < max_length: + pad = torch.zeros((int(b), int(max_length - s)), dtype=bidirectional_mask.dtype, device=bidirectional_mask.device) + bidirectional_mask = torch.cat([bidirectional_mask, pad], dim=1) + bidirectional = bidirectional_mask.unsqueeze(1).unsqueeze(1) + for attn_module in attn_modules: + attn_module.bias.data = torch.logical_or(attn_module.bias.data, bidirectional) + output = call_og_forward() + for attn_module in attn_modules: + attn_module.bias.data = torch.tril(attn_module.bias.data[0, 0])[None, None] + return output + + def generate(self: CAUSAL_GPT_TYPES, *args: tuple, **kwargs: Dict[str, Any]): + """Wraps original generate to enable PrefixLM attention.""" + attn_modules = _get_attn_modules(model) + for attn_module in attn_modules: + attn_module.bias.data[:] = 1 + output = self._original_generate(*args, **kwargs) + for attn_module in attn_modules: + attn_module.bias.data = torch.tril(attn_module.bias.data[0, 0])[None, None] + return output + setattr(model, 'forward', MethodType(forward, model)) + setattr(model, 'generate', MethodType(generate, model)) + setattr(model, '_prefix_lm_converted', True) + return model + +def _convert_bloom_causal_lm_to_prefix_lm(model: BloomForCausalLM) -> BloomForCausalLM: + """Converts a BLOOM Causal LM to a Prefix LM. + + Supported HuggingFace model classes: + - `BloomForCausalLM` + + See `convert_hf_causal_lm_to_prefix_lm` for more details. + """ + if hasattr(model, '_prefix_lm_converted'): + return model + assert isinstance(model, BloomForCausalLM) + assert model.config.add_cross_attention == False, 'Only supports BLOOM decoder-only models' + + def _prepare_attn_mask(self: BloomModel, attention_mask: torch.Tensor, bidirectional_mask: Optional[torch.Tensor], input_shape: Tuple[int, int], past_key_values_length: int) -> torch.BoolTensor: + combined_attention_mask = None + device = attention_mask.device + (_, src_length) = input_shape + if src_length > 1: + combined_attention_mask = _make_causal_mask_bloom(input_shape, device=device, past_key_values_length=past_key_values_length) + if bidirectional_mask is not None: + assert attention_mask.shape == bidirectional_mask.shape + expanded_bidirectional_mask = _expand_mask_bloom(bidirectional_mask, tgt_length=src_length) + combined_attention_mask = torch.logical_and(combined_attention_mask, expanded_bidirectional_mask) + expanded_attn_mask = _expand_mask_bloom(attention_mask, tgt_length=src_length) + combined_attention_mask = expanded_attn_mask if combined_attention_mask is None else expanded_attn_mask | combined_attention_mask + return combined_attention_mask + + def _build_alibi_tensor(self: BloomModel, batch_size: int, query_length: int, key_length: int, dtype: torch.dtype, device: torch.device) -> torch.Tensor: + num_heads = self.config.n_head + closest_power_of_2 = 2 ** math.floor(math.log2(num_heads)) + base = torch.tensor(2 ** (-2 ** (-(math.log2(closest_power_of_2) - 3))), device=device, dtype=torch.float32) + powers = torch.arange(1, 1 + closest_power_of_2, device=device, dtype=torch.int32) + slopes = torch.pow(base, powers) + if closest_power_of_2 != num_heads: + extra_base = torch.tensor(2 ** (-2 ** (-(math.log2(2 * closest_power_of_2) - 3))), device=device, dtype=torch.float32) + num_remaining_heads = min(closest_power_of_2, num_heads - closest_power_of_2) + extra_powers = torch.arange(1, 1 + 2 * num_remaining_heads, 2, device=device, dtype=torch.int32) + slopes = torch.cat([slopes, torch.pow(extra_base, extra_powers)], dim=0) + qa = torch.arange(query_length, device=device, dtype=torch.int32).view(-1, 1) + ka = torch.arange(key_length, device=device, dtype=torch.int32).view(1, -1) + diffs = qa - ka + key_length - query_length + diffs = -diffs.abs() + alibi = slopes.view(1, num_heads, 1, 1) * diffs.view(1, 1, query_length, key_length) + alibi = alibi.expand(batch_size, -1, -1, -1).reshape(-1, query_length, key_length) + return alibi.to(dtype) + KeyValueT = Tuple[torch.Tensor, torch.Tensor] + + def forward(self: BloomModel, input_ids: Optional[torch.LongTensor]=None, past_key_values: Optional[Tuple[KeyValueT, ...]]=None, attention_mask: Optional[torch.Tensor]=None, bidirectional_mask: Optional[torch.Tensor]=None, head_mask: Optional[torch.LongTensor]=None, inputs_embeds: Optional[torch.LongTensor]=None, use_cache: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, return_dict: Optional[bool]=None, **deprecated_arguments) -> Union[Tuple[torch.Tensor, ...], BaseModelOutputWithPastAndCrossAttentions]: + if deprecated_arguments.pop('position_ids', False) is not False: + warnings.warn('`position_ids` have no functionality in BLOOM and will be removed in v5.0.0. ' + 'You can safely ignore passing `position_ids`.', FutureWarning) + if len(deprecated_arguments) > 0: + raise ValueError(f'Got unexpected arguments: {deprecated_arguments}') + output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions + output_hidden_states = output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states + use_cache = use_cache if use_cache is not None else self.config.use_cache + return_dict = return_dict if return_dict is not None else self.config.use_return_dict + if input_ids is not None and inputs_embeds is not None: + raise ValueError('You cannot specify both input_ids and inputs_embeds at the same time') + elif input_ids is not None: + (batch_size, seq_length) = input_ids.shape + elif inputs_embeds is not None: + (batch_size, seq_length, _) = inputs_embeds.shape + else: + raise ValueError('You have to specify either input_ids or inputs_embeds') + if past_key_values is None: + past_key_values = tuple([None] * len(self.h)) + head_mask = self.get_head_mask(head_mask, self.config.n_layer) + if inputs_embeds is None: + inputs_embeds = self.word_embeddings(input_ids) + hidden_states = self.word_embeddings_layernorm(inputs_embeds) + presents = () if use_cache else None + all_self_attentions = () if output_attentions else None + all_hidden_states = () if output_hidden_states else None + seq_length_with_past = seq_length + past_key_values_length = 0 + if past_key_values[0] is not None: + tmp = past_key_values[0][0] + past_key_values_length = tmp.shape[2] + seq_length_with_past = seq_length_with_past + past_key_values_length + if attention_mask is None: + attention_mask = torch.ones((batch_size, seq_length_with_past), device=hidden_states.device) + else: + attention_mask = attention_mask.to(hidden_states.device) + alibi = self._build_alibi_tensor(batch_size=batch_size, query_length=seq_length, key_length=seq_length_with_past, dtype=hidden_states.dtype, device=hidden_states.device) + causal_mask = self._prepare_attn_mask(attention_mask, bidirectional_mask, input_shape=(batch_size, seq_length), past_key_values_length=past_key_values_length) + for (i, (block, layer_past)) in enumerate(zip(self.h, past_key_values)): + if output_hidden_states: + hst = (hidden_states,) + all_hidden_states = all_hidden_states + hst + if self.gradient_checkpointing and self.training: + if use_cache: + logger.warning('`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`...') + use_cache = False + + def create_custom_forward(module): + + def custom_forward(*inputs): + return module(*inputs, use_cache=use_cache, output_attentions=output_attentions) + return custom_forward + outputs = torch.utils.checkpoint.checkpoint(create_custom_forward(block), hidden_states, alibi, causal_mask, head_mask[i]) + else: + outputs = block(hidden_states, layer_past=layer_past, attention_mask=causal_mask, head_mask=head_mask[i], use_cache=use_cache, output_attentions=output_attentions, alibi=alibi) + hidden_states = outputs[0] + if use_cache is True: + presents = presents + (outputs[1],) + if output_attentions: + oa = (outputs[2 if use_cache else 1],) + all_self_attentions = all_self_attentions + oa + hidden_states = self.ln_f(hidden_states) + if output_hidden_states: + hst = (hidden_states,) + all_hidden_states = all_hidden_states + hst + if not return_dict: + return tuple((v for v in [hidden_states, presents, all_hidden_states, all_self_attentions] if v is not None)) + return BaseModelOutputWithPastAndCrossAttentions(last_hidden_state=hidden_states, past_key_values=presents, hidden_states=all_hidden_states, attentions=all_self_attentions) + setattr(model.transformer, '_prepare_attn_mask', MethodType(_prepare_attn_mask, model.transformer)) + setattr(model.transformer, '_build_alibi_tensor', MethodType(_build_alibi_tensor, model.transformer)) + setattr(model.transformer, 'forward', MethodType(forward, model.transformer)) + KeyValueT = Tuple[torch.Tensor, torch.Tensor] + + def forward(self: BloomForCausalLM, input_ids: Optional[torch.LongTensor]=None, past_key_values: Optional[Tuple[KeyValueT, ...]]=None, attention_mask: Optional[torch.Tensor]=None, bidirectional_mask: Optional[torch.Tensor]=None, head_mask: Optional[torch.Tensor]=None, inputs_embeds: Optional[torch.Tensor]=None, labels: Optional[torch.Tensor]=None, use_cache: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, return_dict: Optional[bool]=None, **deprecated_arguments) -> Union[Tuple[torch.Tensor], CausalLMOutputWithCrossAttentions]: + """Replacement forward method for BloomCausalLM.""" + if deprecated_arguments.pop('position_ids', False) is not False: + warnings.warn('`position_ids` have no functionality in BLOOM and will be removed ' + 'in v5.0.0. You can safely ignore passing `position_ids`.', FutureWarning) + if len(deprecated_arguments) > 0: + raise ValueError(f'Got unexpected arguments: {deprecated_arguments}') + return_dict = return_dict if return_dict is not None else self.config.use_return_dict + transformer_outputs = self.transformer(input_ids, past_key_values=past_key_values, attention_mask=attention_mask, bidirectional_mask=bidirectional_mask, head_mask=head_mask, inputs_embeds=inputs_embeds, use_cache=use_cache, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict) + hidden_states = transformer_outputs[0] + lm_logits = self.lm_head(hidden_states) + loss = None + if labels is not None: + shift_logits = lm_logits[..., :-1, :].contiguous() + shift_labels = labels[..., 1:].contiguous() + (batch_size, seq_length, vocab_size) = shift_logits.shape + loss_fct = CrossEntropyLoss() + loss = loss_fct(shift_logits.view(batch_size * seq_length, vocab_size), shift_labels.view(batch_size * seq_length)) + if not return_dict: + output = (lm_logits,) + transformer_outputs[1:] + return (loss,) + output if loss is not None else output + return CausalLMOutputWithCrossAttentions(loss=loss, logits=lm_logits, past_key_values=transformer_outputs.past_key_values, hidden_states=transformer_outputs.hidden_states, attentions=transformer_outputs.attentions) + + def prepare_inputs_for_generation(self: BloomForCausalLM, input_ids: torch.LongTensor, past: Optional[torch.Tensor]=None, attention_mask: Optional[torch.Tensor]=None, **kwargs) -> dict: + if past: + input_ids = input_ids[:, -1].unsqueeze(-1) + bidirectional_mask = None + if past[0][0].shape[0] == input_ids.shape[0]: + past = self._convert_to_bloom_cache(past) + else: + bidirectional_mask = torch.ones_like(input_ids) + return {'input_ids': input_ids, 'past_key_values': past, 'use_cache': True, 'attention_mask': attention_mask, 'bidirectional_mask': bidirectional_mask} + setattr(model, 'forward', MethodType(forward, model)) + setattr(model, 'prepare_inputs_for_generation', MethodType(prepare_inputs_for_generation, model)) + setattr(model, '_prefix_lm_converted', True) + return model + +def _convert_opt_causal_lm_to_prefix_lm(model: OPTForCausalLM) -> OPTForCausalLM: + """Converts an OPT Causal LM to a Prefix LM. + + Supported HuggingFace model classes: + - `OPTForCausalLM` + + See `convert_hf_causal_lm_to_prefix_lm` for more details. + """ + if hasattr(model, '_prefix_lm_converted'): + return model + assert isinstance(model, OPTForCausalLM) + assert model.config.add_cross_attention == False, 'Only supports OPT decoder-only models' + setattr(model, '_original_forward', getattr(model, 'forward')) + setattr(model, '_original_generate', getattr(model, 'generate')) + model.model.decoder.bidirectional_mask = None + + def _prepare_decoder_attention_mask(self, attention_mask, input_shape, inputs_embeds, past_key_values_length): + combined_attention_mask = None + if input_shape[-1] > 1: + if self.bidirectional_mask == 'g': + (bsz, src_length) = input_shape + combined_attention_mask = torch.zeros((bsz, 1, src_length, src_length + past_key_values_length), dtype=inputs_embeds.dtype, device=inputs_embeds.device) + else: + combined_attention_mask = _make_causal_mask_opt(input_shape, inputs_embeds.dtype, past_key_values_length=past_key_values_length).to(inputs_embeds.device) + if self.bidirectional_mask is not None: + assert attention_mask.shape == self.bidirectional_mask.shape + expanded_bidirectional_mask = _expand_mask_opt(self.bidirectional_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]).to(inputs_embeds.device) + combined_attention_mask = torch.maximum(expanded_bidirectional_mask, combined_attention_mask) + if attention_mask is not None: + expanded_attn_mask = _expand_mask_opt(attention_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]).to(inputs_embeds.device) + combined_attention_mask = expanded_attn_mask if combined_attention_mask is None else expanded_attn_mask + combined_attention_mask + return combined_attention_mask + setattr(model.model.decoder, '_prepare_decoder_attention_mask', MethodType(_prepare_decoder_attention_mask, model.model.decoder)) + + def forward(self: OPTForCausalLM, input_ids: Optional[torch.LongTensor]=None, attention_mask: Optional[torch.Tensor]=None, bidirectional_mask: Optional[torch.ByteTensor]=None, head_mask: Optional[torch.Tensor]=None, past_key_values: Optional[List[torch.FloatTensor]]=None, inputs_embeds: Optional[torch.FloatTensor]=None, labels: Optional[torch.LongTensor]=None, use_cache: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, return_dict: Optional[bool]=None): + + def call_og_forward(): + return self._original_forward(input_ids=input_ids, attention_mask=attention_mask, head_mask=head_mask, past_key_values=past_key_values, inputs_embeds=inputs_embeds, labels=labels, use_cache=use_cache, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict) + if bidirectional_mask is None: + return call_og_forward() + self.model.decoder.bidirectional_mask = bidirectional_mask + try: + outputs = call_og_forward() + except: + self.model.decoder.bidirectional_mask = None + raise + self.model.decoder.bidirectional_mask = None + return outputs + + def generate(self: OPTForCausalLM, *args: tuple, **kwargs: Dict[str, Any]): + """Wraps original generate to enable PrefixLM-style attention.""" + self.model.decoder.bidirectional_mask = 'g' + try: + output = self._original_generate(*args, **kwargs) + except: + self.model.decoder.bidirectional_mask = None + raise + self.model.decoder.bidirectional_mask = None + return output + setattr(model, 'forward', MethodType(forward, model)) + setattr(model, 'generate', MethodType(generate, model)) + setattr(model, '_prefix_lm_converted', True) + return model +_SUPPORTED_HF_MODELS = _SUPPORTED_GPT_MODELS + (BloomForCausalLM, OPTForCausalLM) +CAUSAL_LM_TYPES = Union[GPT2LMHeadModel, GPTJForCausalLM, GPTNeoForCausalLM, GPTNeoXForCausalLM, BloomForCausalLM, OPTForCausalLM] + +def convert_hf_causal_lm_to_prefix_lm(model: CAUSAL_LM_TYPES) -> CAUSAL_LM_TYPES: + """Converts a HuggingFace Causal LM to a Prefix LM. + + Supported HuggingFace model classes: + - `GPT2LMHeadModel` + - `GPTNeoForCausalLM` + - `GPTNeoXForCausalLM` + - `GPTJForCausalLM` + - `BloomForCausalLM` + - `OPTForCausalLM` + + Conversion to a Prefix LM is done by modifying the `forward` method, and possibly also the + `generate` method and/or select underlying methods depending on the model class. + + These changes preserve the model API, but add a new input to `forward`: "bidirectional_mask". + + Notes on training: + To actually train the converted model as a Prefix LM, training batches will need to indicate + the prefix/target structure by including `bidirectional_mask` as part of the batch inputs. + + **This is not a standard input and requires custom layers either within or after your dataloader.** + + In addition to adding `bidirectional_mask` to the batch, this custom code should modify `labels` + such that `batch['labels'][batch['bidirectional_mask'] == 1] == -100`. + That is, the prefix portion of the sequence should not generate any loss. Loss should only be + generated by the target portion of the sequence. + + Notes on `GPTNeoForCausalLM`: + To simplify the implementation, "global" and "local" attention layers are handled differently. + For "global" layers, we handle conversion as described above. For "local" layers, which use a + causal attention mask within a restricted local window, we do not alter the masking. + + Notes on `forward` method conversion: + After conversion, the `forward` method will handle a new input, `bidirectional_mask`, + which should be a [batch_size, seq_length] byte tensor, where 1 indicates token positions + belonging to the prefix (prefix tokens can attend to one another bidirectionally), and + 0 indicates token positions belonging to the target. + + The new `forward` method will incorporate `bidirectional_mask` (if supplied) into the existing + causal mask, call the original `forward` method, and (if the causal mask is a buffer) reset + the causal masks before returning the result. + + Notes on `generate` method conversion: + After conversion, the `generate` method will have the same signature but will internally + convert all causal masks to be purely bidirectional, call the original `generate` method, and + (where appropriate) reset the causal masks before returning the result. + + This works thanks to the logic of the HuggingFace `generate` API, which first encodes the token + "prompt" passed to `generate` (which is treated as the prefix) and then sequentially generates + each new token. Encodings are cached as generation happens, so all prefix tokens can attend to one + another (as expected in a Prefix LM) and generated tokens can only attend to prefix tokens and + previously-generated tokens (also as expected in a Prefix LM). + + To preserve the API, the original methods are renamed to `_original_forward` and + `_original_generate`, and replaced with new `forward` and `generate` methods that wrap + them, respectively. Although implementation details vary by model class. + """ + if isinstance(model, _SUPPORTED_GPT_MODELS): + return _convert_gpt_causal_lm_to_prefix_lm(model) + elif isinstance(model, BloomForCausalLM): + return _convert_bloom_causal_lm_to_prefix_lm(model) + elif isinstance(model, OPTForCausalLM): + return _convert_opt_causal_lm_to_prefix_lm(model) + else: + raise TypeError(f'Cannot convert model to Prefix LM. ' + f'Model does not belong to set of supported HF models:' + f'\n{_SUPPORTED_HF_MODELS}') + +def add_bidirectional_mask_if_missing(batch: Dict[str, Any]): + """Attempts to add bidirectional_mask to batch if missing. + + Raises: + KeyError if bidirectional_mask is missing and can't be inferred + """ + if 'bidirectional_mask' not in batch: + if batch.get('mode', None) == 'icl_task': + batch['bidirectional_mask'] = batch['attention_mask'].clone() + for (i, continuation_indices) in enumerate(batch['continuation_indices']): + batch['bidirectional_mask'][i, continuation_indices] = 0 + elif 'labels' in batch and 'attention_mask' in batch: + batch['bidirectional_mask'] = torch.logical_and(torch.eq(batch['attention_mask'], 1), torch.eq(batch['labels'], -100)).type_as(batch['attention_mask']) + else: + raise KeyError('No bidirectional_mask in batch and not sure how to construct one.') \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/meta_init_context.py b/LLAVA_Biovil/llava/model/language_model/mpt/meta_init_context.py new file mode 100644 index 0000000000000000000000000000000000000000..6cba6fff0fe21fe222c7ab38eae44a9784c0be9c --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/meta_init_context.py @@ -0,0 +1,94 @@ +from contextlib import contextmanager +import torch +import torch.nn as nn + +@contextmanager +def init_empty_weights(include_buffers: bool=False): + """Meta initialization context manager. + + A context manager under which models are initialized with all parameters + on the meta device, therefore creating an empty model. Useful when just + initializing the model would blow the available RAM. + + Args: + include_buffers (`bool`, *optional*, defaults to `False`): Whether or + not to also put all buffers on the meta device while initializing. + + Example: + ```python + import torch.nn as nn + + # Initialize a model with 100 billions parameters in no time and without using any RAM. + with init_empty_weights(): + tst = nn.Sequential(*[nn.Linear(10000, 10000) for _ in range(1000)]) + ``` + + + + Any model created under this context manager has no weights. As such you can't do something like + `model.to(some_device)` with it. To load weights inside your empty model, see [`load_checkpoint_and_dispatch`]. + + + """ + with init_on_device(torch.device('meta'), include_buffers=include_buffers) as f: + yield f + +@contextmanager +def init_on_device(device: torch.device, include_buffers: bool=False): + """Device initialization context manager. + + A context manager under which models are initialized with all parameters + on the specified device. + + Args: + device (`torch.device`): Device to initialize all parameters on. + include_buffers (`bool`, *optional*, defaults to `False`): Whether or + not to also put all buffers on the meta device while initializing. + + Example: + ```python + import torch.nn as nn + + with init_on_device(device=torch.device("cuda")): + tst = nn.Liner(100, 100) # on `cuda` device + ``` + """ + old_register_parameter = nn.Module.register_parameter + if include_buffers: + old_register_buffer = nn.Module.register_buffer + + def register_empty_parameter(module, name, param): + old_register_parameter(module, name, param) + if param is not None: + param_cls = type(module._parameters[name]) + kwargs = module._parameters[name].__dict__ + module._parameters[name] = param_cls(module._parameters[name].to(device), **kwargs) + + def register_empty_buffer(module, name, buffer): + old_register_buffer(module, name, buffer) + if buffer is not None: + module._buffers[name] = module._buffers[name].to(device) + if include_buffers: + tensor_constructors_to_patch = {torch_function_name: getattr(torch, torch_function_name) for torch_function_name in ['empty', 'zeros', 'ones', 'full']} + else: + tensor_constructors_to_patch = {} + + def patch_tensor_constructor(fn): + + def wrapper(*args, **kwargs): + kwargs['device'] = device + return fn(*args, **kwargs) + return wrapper + try: + nn.Module.register_parameter = register_empty_parameter + if include_buffers: + nn.Module.register_buffer = register_empty_buffer + for torch_function_name in tensor_constructors_to_patch.keys(): + setattr(torch, torch_function_name, patch_tensor_constructor(getattr(torch, torch_function_name))) + yield + finally: + nn.Module.register_parameter = old_register_parameter + if include_buffers: + nn.Module.register_buffer = old_register_buffer + for (torch_function_name, old_torch_function) in tensor_constructors_to_patch.items(): + setattr(torch, torch_function_name, old_torch_function) \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/modeling_mpt.py b/LLAVA_Biovil/llava/model/language_model/mpt/modeling_mpt.py new file mode 100644 index 0000000000000000000000000000000000000000..13313441b13fc7a66cb65fd21b482a5de982e2c8 --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/modeling_mpt.py @@ -0,0 +1,331 @@ +"""A simple, flexible implementation of a GPT model. + +Inspired by https://github.com/karpathy/minGPT/blob/master/mingpt/model.py +""" +import math +import warnings +from typing import List, Optional, Tuple, Union +import torch +import torch.nn as nn +import torch.nn.functional as F +from transformers import PreTrainedModel, PreTrainedTokenizer, PreTrainedTokenizerFast +from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast +from .attention import attn_bias_shape, build_attn_bias +from .blocks import MPTBlock +from .custom_embedding import SharedEmbedding +from .norm import NORM_CLASS_REGISTRY +from .configuration_mpt import MPTConfig +from .adapt_tokenizer import AutoTokenizerForMOD, adapt_tokenizer_for_denoising +from .hf_prefixlm_converter import add_bidirectional_mask_if_missing, convert_hf_causal_lm_to_prefix_lm +from .meta_init_context import init_empty_weights +from .param_init_fns import MODEL_INIT_REGISTRY, generic_param_init_fn_ +try: + from .flash_attn_triton import flash_attn_func +except: + pass +Tokenizer = Union[PreTrainedTokenizer, PreTrainedTokenizerFast] + +class MPTPreTrainedModel(PreTrainedModel): + config_class = MPTConfig + base_model_prefix = 'model' + _no_split_modules = ['MPTBlock'] + +class MPTModel(MPTPreTrainedModel): + + def __init__(self, config: MPTConfig): + config._validate_config() + super().__init__(config) + self.attn_impl = config.attn_config['attn_impl'] + self.prefix_lm = config.attn_config['prefix_lm'] + self.attn_uses_sequence_id = config.attn_config['attn_uses_sequence_id'] + self.alibi = config.attn_config['alibi'] + self.alibi_bias_max = config.attn_config['alibi_bias_max'] + if config.init_device == 'mixed': + if dist.get_local_rank() == 0: + config.init_device = 'cpu' + else: + config.init_device = 'meta' + if config.norm_type.lower() not in NORM_CLASS_REGISTRY.keys(): + norm_options = ' | '.join(NORM_CLASS_REGISTRY.keys()) + raise NotImplementedError(f'Requested norm type ({config.norm_type}) is not implemented within this repo (Options: {norm_options}).') + norm_class = NORM_CLASS_REGISTRY[config.norm_type.lower()] + self.embedding_fraction = config.embedding_fraction + self.wte = SharedEmbedding(config.vocab_size, config.d_model, device=config.init_device) + if not self.alibi: + self.wpe = torch.nn.Embedding(config.max_seq_len, config.d_model, device=config.init_device) + self.emb_drop = nn.Dropout(config.emb_pdrop) + self.blocks = nn.ModuleList([MPTBlock(device=config.init_device, **config.to_dict()) for _ in range(config.n_layers)]) + self.norm_f = norm_class(config.d_model, device=config.init_device) + if config.init_device != 'meta': + print(f'You are using config.init_device={config.init_device!r}, but you can also use config.init_device="meta" with Composer + FSDP for fast initialization.') + self.apply(self.param_init_fn) + self.is_causal = not self.prefix_lm + self._attn_bias_initialized = False + self.attn_bias = None + self.attn_bias_shape = attn_bias_shape(self.attn_impl, config.n_heads, config.max_seq_len, self.alibi, prefix_lm=self.prefix_lm, causal=self.is_causal, use_sequence_id=self.attn_uses_sequence_id) + if config.no_bias: + for module in self.modules(): + if hasattr(module, 'bias') and isinstance(module.bias, nn.Parameter): + if config.verbose: + warnings.warn(f'Removing bias ({module.bias}) from {module}.') + module.register_parameter('bias', None) + if config.verbose and config.verbose > 2: + print(self) + if 'verbose' not in self.config.init_config: + self.config.init_config['verbose'] = self.config.verbose + if self.config.init_config['verbose'] > 1: + init_fn_name = self.config.init_config['name'] + warnings.warn(f'Using {init_fn_name} initialization.') + self.gradient_checkpointing = False + + def get_input_embeddings(self): + return self.wte + + def set_input_embeddings(self, value): + self.wte = value + + @torch.no_grad() + def _attn_bias(self, device, dtype, attention_mask: Optional[torch.ByteTensor]=None, prefix_mask: Optional[torch.ByteTensor]=None, sequence_id: Optional[torch.LongTensor]=None): + if not self._attn_bias_initialized: + if self.attn_bias_shape: + self.attn_bias = torch.zeros(self.attn_bias_shape, device=device, dtype=dtype) + self.attn_bias = build_attn_bias(self.attn_impl, self.attn_bias, self.config.n_heads, self.config.max_seq_len, causal=self.is_causal, alibi=self.alibi, alibi_bias_max=self.alibi_bias_max) + self._attn_bias_initialized = True + if self.attn_impl == 'flash': + return (self.attn_bias, attention_mask) + if self.attn_bias is not None: + self.attn_bias = self.attn_bias.to(dtype=dtype, device=device) + attn_bias = self.attn_bias + if self.prefix_lm: + assert isinstance(attn_bias, torch.Tensor) + assert isinstance(prefix_mask, torch.Tensor) + attn_bias = self._apply_prefix_mask(attn_bias, prefix_mask) + if self.attn_uses_sequence_id and sequence_id is not None: + assert isinstance(attn_bias, torch.Tensor) + attn_bias = self._apply_sequence_id(attn_bias, sequence_id) + if attention_mask is not None: + s_k = attention_mask.shape[-1] + if attn_bias is None: + attn_bias = torch.zeros((1, 1, 1, s_k), device=device, dtype=dtype) + else: + _s_k = max(0, attn_bias.size(-1) - s_k) + attn_bias = attn_bias[:, :, :, _s_k:] + if prefix_mask is not None and attention_mask.shape != prefix_mask.shape: + raise ValueError(f'attention_mask shape={attention_mask.shape} ' + f'and prefix_mask shape={prefix_mask.shape} are not equal.') + min_val = torch.finfo(attn_bias.dtype).min + attn_bias = attn_bias.masked_fill(~attention_mask.view(-1, 1, 1, s_k), min_val) + return (attn_bias, None) + + def _apply_prefix_mask(self, attn_bias: torch.Tensor, prefix_mask: torch.Tensor): + (s_k, s_q) = attn_bias.shape[-2:] + if s_k != self.config.max_seq_len or s_q != self.config.max_seq_len: + raise ValueError('attn_bias does not match the expected shape. ' + f'The last two dimensions should both be {self.config.max_length} ' + f'but are {s_k} and {s_q}.') + seq_len = prefix_mask.shape[-1] + if seq_len > self.config.max_seq_len: + raise ValueError(f'prefix_mask sequence length cannot exceed max_seq_len={self.config.max_seq_len}') + attn_bias = attn_bias[..., :seq_len, :seq_len] + causal = torch.tril(torch.ones((seq_len, seq_len), dtype=torch.bool, device=prefix_mask.device)).view(1, 1, seq_len, seq_len) + prefix = prefix_mask.view(-1, 1, 1, seq_len) + cannot_attend = ~torch.logical_or(causal, prefix.bool()) + min_val = torch.finfo(attn_bias.dtype).min + attn_bias = attn_bias.masked_fill(cannot_attend, min_val) + return attn_bias + + def _apply_sequence_id(self, attn_bias: torch.Tensor, sequence_id: torch.LongTensor): + seq_len = sequence_id.shape[-1] + if seq_len > self.config.max_seq_len: + raise ValueError(f'sequence_id sequence length cannot exceed max_seq_len={self.config.max_seq_len}') + attn_bias = attn_bias[..., :seq_len, :seq_len] + cannot_attend = torch.logical_not(torch.eq(sequence_id.view(-1, seq_len, 1), sequence_id.view(-1, 1, seq_len))).unsqueeze(1) + min_val = torch.finfo(attn_bias.dtype).min + attn_bias = attn_bias.masked_fill(cannot_attend, min_val) + return attn_bias + + def forward(self, input_ids: torch.LongTensor, past_key_values: Optional[List[Tuple[torch.FloatTensor]]]=None, attention_mask: Optional[torch.ByteTensor]=None, prefix_mask: Optional[torch.ByteTensor]=None, sequence_id: Optional[torch.LongTensor]=None, return_dict: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, use_cache: Optional[bool]=None, inputs_embeds: Optional[torch.Tensor]=None): + return_dict = return_dict if return_dict is not None else self.config.return_dict + use_cache = use_cache if use_cache is not None else self.config.use_cache + if attention_mask is not None: + attention_mask = attention_mask.bool() + if prefix_mask is not None: + prefix_mask = prefix_mask.bool() + if not return_dict: + raise NotImplementedError('return_dict False is not implemented yet for MPT') + if output_attentions: + if self.attn_impl != 'torch': + raise NotImplementedError('output_attentions is not implemented for MPT when using attn_impl `flash` or `triton`.') + if attention_mask is not None and attention_mask[:, 0].sum() != attention_mask.shape[0] and self.training: + raise NotImplementedError('MPT does not support training with left padding.') + if self.prefix_lm and prefix_mask is None: + raise ValueError('prefix_mask is a required argument when MPT is configured with prefix_lm=True.') + if self.training: + if self.attn_uses_sequence_id and sequence_id is None: + raise ValueError('sequence_id is a required argument when MPT is configured with attn_uses_sequence_id=True ' + 'and the model is in train mode.') + elif self.attn_uses_sequence_id is False and sequence_id is not None: + warnings.warn('MPT received non-None input for `sequence_id` but is configured with attn_uses_sequence_id=False. ' + 'This input will be ignored. If you want the model to use `sequence_id`, set attn_uses_sequence_id to True.') + if input_ids is not None: + S = input_ids.size(1) + assert S <= self.config.max_seq_len, f'Cannot forward input with seq_len={S}, this model only supports seq_len<={self.config.max_seq_len}' + tok_emb = self.wte(input_ids) + else: + assert inputs_embeds is not None + assert self.alibi, 'inputs_embeds is not implemented for MPT unless for alibi.' + S = inputs_embeds.size(1) + tok_emb = inputs_embeds + if self.alibi: + x = tok_emb + else: + past_position = 0 + if past_key_values is not None: + if len(past_key_values) != self.config.n_layers: + raise ValueError(f'past_key_values must provide a past_key_value for each attention ' + f'layer in the network (len(past_key_values)={len(past_key_values)!r}; self.config.n_layers={self.config.n_layers!r}).') + past_position = past_key_values[0][0].size(1) + if self.attn_impl == 'torch': + past_position = past_key_values[0][0].size(3) + if S + past_position > self.config.max_seq_len: + raise ValueError(f'Cannot forward input with past sequence length {past_position} and current sequence length {S + 1}, this model only supports total sequence length <= {self.config.max_seq_len}.') + pos = torch.arange(past_position, S + past_position, dtype=torch.long, device=input_ids.device).unsqueeze(0) + if attention_mask is not None: + pos = torch.clamp(pos - torch.cumsum((~attention_mask).to(torch.int32), dim=1)[:, past_position:], min=0) + pos_emb = self.wpe(pos) + x = tok_emb + pos_emb + if self.embedding_fraction == 1: + x = self.emb_drop(x) + else: + x_shrunk = x * self.embedding_fraction + x.detach() * (1 - self.embedding_fraction) + assert isinstance(self.emb_drop, nn.Module) + x = self.emb_drop(x_shrunk) + (attn_bias, attention_mask) = self._attn_bias(device=x.device, dtype=torch.float32, attention_mask=attention_mask, prefix_mask=prefix_mask, sequence_id=sequence_id) + if use_cache and past_key_values is None: + past_key_values = [() for _ in range(self.config.n_layers)] + all_hidden_states = () if output_hidden_states else None + all_self_attns = () if output_attentions else None + for (b_idx, block) in enumerate(self.blocks): + if output_hidden_states: + assert all_hidden_states is not None + all_hidden_states = all_hidden_states + (x,) + past_key_value = past_key_values[b_idx] if past_key_values is not None else None + if self.gradient_checkpointing and self.training: + (x, attn_weights, past_key_value) = torch.utils.checkpoint.checkpoint(block, x, past_key_value, attn_bias, attention_mask, self.is_causal) + else: + (x, attn_weights, past_key_value) = block(x, past_key_value=past_key_value, attn_bias=attn_bias, attention_mask=attention_mask, is_causal=self.is_causal) + if past_key_values is not None: + past_key_values[b_idx] = past_key_value + if output_attentions: + assert all_self_attns is not None + all_self_attns = all_self_attns + (attn_weights,) + x = self.norm_f(x) + if output_hidden_states: + assert all_hidden_states is not None + all_hidden_states = all_hidden_states + (x,) + return BaseModelOutputWithPast(last_hidden_state=x, past_key_values=past_key_values, hidden_states=all_hidden_states, attentions=all_self_attns) + + def param_init_fn(self, module): + init_fn_name = self.config.init_config['name'] + MODEL_INIT_REGISTRY[init_fn_name](module=module, n_layers=self.config.n_layers, d_model=self.config.d_model, **self.config.init_config) + + def fsdp_wrap_fn(self, module): + return isinstance(module, MPTBlock) + + def activation_checkpointing_fn(self, module): + return isinstance(module, MPTBlock) + +class MPTForCausalLM(MPTPreTrainedModel): + + def __init__(self, config: MPTConfig): + super().__init__(config) + if not config.tie_word_embeddings: + raise ValueError('MPTForCausalLM only supports tied word embeddings') + print(f'Instantiating an MPTForCausalLM model from {__file__}') + self.transformer = MPTModel(config) + for child in self.transformer.children(): + if isinstance(child, torch.nn.ModuleList): + continue + if isinstance(child, torch.nn.Module): + child._fsdp_wrap = True + self.logit_scale = None + if config.logit_scale is not None: + logit_scale = config.logit_scale + if isinstance(logit_scale, str): + if logit_scale == 'inv_sqrt_d_model': + logit_scale = 1 / math.sqrt(config.d_model) + else: + raise ValueError(f"logit_scale={logit_scale!r} is not recognized as an option; use numeric value or 'inv_sqrt_d_model'.") + self.logit_scale = logit_scale + + def get_input_embeddings(self): + return self.transformer.wte + + def set_input_embeddings(self, value): + self.transformer.wte = value + + def get_output_embeddings(self): + return self.transformer.wte + + def set_output_embeddings(self, new_embeddings): + self.transformer.wte = new_embeddings + + def set_decoder(self, decoder): + self.transformer = decoder + + def get_decoder(self): + return self.transformer + + def forward(self, input_ids: torch.LongTensor, past_key_values: Optional[List[Tuple[torch.FloatTensor]]]=None, attention_mask: Optional[torch.ByteTensor]=None, prefix_mask: Optional[torch.ByteTensor]=None, sequence_id: Optional[torch.LongTensor]=None, labels: Optional[torch.LongTensor]=None, return_dict: Optional[bool]=None, output_attentions: Optional[bool]=None, output_hidden_states: Optional[bool]=None, use_cache: Optional[bool]=None, inputs_embeds: Optional[torch.FloatTensor]=None): + return_dict = return_dict if return_dict is not None else self.config.return_dict + use_cache = use_cache if use_cache is not None else self.config.use_cache + if inputs_embeds is not None: + raise NotImplementedError('inputs_embeds has to be None (for hf/peft support).') + outputs = self.transformer(input_ids=input_ids, past_key_values=past_key_values, attention_mask=attention_mask, prefix_mask=prefix_mask, sequence_id=sequence_id, return_dict=return_dict, output_attentions=output_attentions, output_hidden_states=output_hidden_states, use_cache=use_cache) + logits = self.transformer.wte(outputs.last_hidden_state.to(self.transformer.wte.weight.device), True) + if self.logit_scale is not None: + if self.logit_scale == 0: + warnings.warn(f'Multiplying logits by self.logit_scale={self.logit_scale!r}. This will produce uniform (uninformative) outputs.') + logits *= self.logit_scale + loss = None + if labels is not None: + labels = torch.roll(labels, shifts=-1) + labels[:, -1] = -100 + loss = F.cross_entropy(logits.view(-1, logits.size(-1)), labels.to(logits.device).view(-1)) + return CausalLMOutputWithPast(loss=loss, logits=logits, past_key_values=outputs.past_key_values, hidden_states=outputs.hidden_states, attentions=outputs.attentions) + + def param_init_fn(self, module): + init_fn_name = self.config.init_config['name'] + MODEL_INIT_REGISTRY[init_fn_name](module=module, n_layers=self.config.n_layers, d_model=self.config.d_model, **self.config.init_config) + + def fsdp_wrap_fn(self, module): + return isinstance(module, MPTBlock) + + def activation_checkpointing_fn(self, module): + return isinstance(module, MPTBlock) + + def prepare_inputs_for_generation(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs): + if inputs_embeds is not None: + raise NotImplementedError('inputs_embeds is not implemented for MPT yet') + attention_mask = kwargs['attention_mask'].bool() + if attention_mask[:, -1].sum() != attention_mask.shape[0]: + raise NotImplementedError('MPT does not support generation with right padding.') + if self.transformer.attn_uses_sequence_id and self.training: + sequence_id = torch.zeros_like(input_ids[:1]) + else: + sequence_id = None + if past_key_values is not None: + input_ids = input_ids[:, -1].unsqueeze(-1) + if self.transformer.prefix_lm: + prefix_mask = torch.ones_like(attention_mask) + if kwargs.get('use_cache') == False: + raise NotImplementedError('MPT with prefix_lm=True does not support use_cache=False.') + else: + prefix_mask = None + return {'input_ids': input_ids, 'attention_mask': attention_mask, 'prefix_mask': prefix_mask, 'sequence_id': sequence_id, 'past_key_values': past_key_values, 'use_cache': kwargs.get('use_cache', True)} + + @staticmethod + def _reorder_cache(past_key_values, beam_idx): + """Used by HuggingFace generate when using beam search with kv-caching. + + See https://github.com/huggingface/transformers/blob/3ec7a47664ebe40c40f4b722f6bb1cd30c3821ec/src/transformers/models/gpt2/modeling_gpt2.py#L1122-L1133 + for an example in transformers. + """ + reordered_past = [] + for layer_past in past_key_values: + reordered_past += [tuple((past_state.index_select(0, beam_idx) for past_state in layer_past))] + return reordered_past \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/norm.py b/LLAVA_Biovil/llava/model/language_model/mpt/norm.py new file mode 100644 index 0000000000000000000000000000000000000000..067b6140fae546e5cb49cb2b1e4e6af660ced60d --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/norm.py @@ -0,0 +1,56 @@ +import torch + +def _cast_if_autocast_enabled(tensor): + if torch.is_autocast_enabled(): + if tensor.device.type == 'cuda': + dtype = torch.get_autocast_gpu_dtype() + elif tensor.device.type == 'cpu': + dtype = torch.get_autocast_cpu_dtype() + else: + raise NotImplementedError() + return tensor.to(dtype=dtype) + return tensor + +class LPLayerNorm(torch.nn.LayerNorm): + + def __init__(self, normalized_shape, eps=1e-05, elementwise_affine=True, device=None, dtype=None): + super().__init__(normalized_shape=normalized_shape, eps=eps, elementwise_affine=elementwise_affine, device=device, dtype=dtype) + + def forward(self, x): + module_device = x.device + downcast_x = _cast_if_autocast_enabled(x) + downcast_weight = _cast_if_autocast_enabled(self.weight) if self.weight is not None else self.weight + downcast_bias = _cast_if_autocast_enabled(self.bias) if self.bias is not None else self.bias + with torch.autocast(enabled=False, device_type=module_device.type): + return torch.nn.functional.layer_norm(downcast_x, self.normalized_shape, downcast_weight, downcast_bias, self.eps) + +def rms_norm(x, weight=None, eps=1e-05): + output = x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + eps) + if weight is not None: + return output * weight + return output + +class RMSNorm(torch.nn.Module): + + def __init__(self, normalized_shape, eps=1e-05, weight=True, dtype=None, device=None): + super().__init__() + self.eps = eps + if weight: + self.weight = torch.nn.Parameter(torch.ones(normalized_shape, dtype=dtype, device=device)) + else: + self.register_parameter('weight', None) + + def forward(self, x): + return rms_norm(x.float(), self.weight, self.eps).to(dtype=x.dtype) + +class LPRMSNorm(RMSNorm): + + def __init__(self, normalized_shape, eps=1e-05, weight=True, dtype=None, device=None): + super().__init__(normalized_shape=normalized_shape, eps=eps, weight=weight, dtype=dtype, device=device) + + def forward(self, x): + downcast_x = _cast_if_autocast_enabled(x) + downcast_weight = _cast_if_autocast_enabled(self.weight) if self.weight is not None else self.weight + with torch.autocast(enabled=False, device_type=x.device.type): + return rms_norm(downcast_x, downcast_weight, self.eps).to(dtype=x.dtype) +NORM_CLASS_REGISTRY = {'layernorm': torch.nn.LayerNorm, 'low_precision_layernorm': LPLayerNorm, 'rmsnorm': RMSNorm, 'low_precision_rmsnorm': LPRMSNorm} \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/language_model/mpt/param_init_fns.py b/LLAVA_Biovil/llava/model/language_model/mpt/param_init_fns.py new file mode 100644 index 0000000000000000000000000000000000000000..418b83ca2363288046f4b48b1d706c5607341fb5 --- /dev/null +++ b/LLAVA_Biovil/llava/model/language_model/mpt/param_init_fns.py @@ -0,0 +1,181 @@ +import math +import warnings +from collections.abc import Sequence +from functools import partial +from typing import Optional, Tuple, Union +import torch +from torch import nn +from .norm import NORM_CLASS_REGISTRY + +def torch_default_param_init_fn_(module: nn.Module, verbose: int=0, **kwargs): + del kwargs + if verbose > 1: + warnings.warn(f"Initializing network using module's reset_parameters attribute") + if hasattr(module, 'reset_parameters'): + module.reset_parameters() + +def fused_init_helper_(module: nn.Module, init_fn_): + _fused = getattr(module, '_fused', None) + if _fused is None: + raise RuntimeError(f'Internal logic error') + (dim, splits) = _fused + splits = (0, *splits, module.weight.size(dim)) + for (s, e) in zip(splits[:-1], splits[1:]): + slice_indices = [slice(None)] * module.weight.ndim + slice_indices[dim] = slice(s, e) + init_fn_(module.weight[slice_indices]) + +def generic_param_init_fn_(module: nn.Module, init_fn_, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, verbose: int=0, **kwargs): + del kwargs + if verbose > 1: + warnings.warn(f'If model has bias parameters they are initialized to 0.') + init_div_is_residual = init_div_is_residual + if init_div_is_residual is False: + div_is_residual = 1.0 + elif init_div_is_residual is True: + div_is_residual = math.sqrt(2 * n_layers) + elif isinstance(init_div_is_residual, float) or isinstance(init_div_is_residual, int): + div_is_residual = init_div_is_residual + elif isinstance(init_div_is_residual, str) and init_div_is_residual.isnumeric(): + div_is_residual = float(init_div_is_residual) + else: + div_is_residual = 1.0 + raise ValueError(f'Expected init_div_is_residual to be boolean or numeric, got {init_div_is_residual}') + if init_div_is_residual is not False: + if verbose > 1: + warnings.warn(f'Initializing _is_residual layers then dividing them by {div_is_residual:.3f}. ' + f'Set `init_div_is_residual: false` in init config to disable this.') + if isinstance(module, nn.Linear): + if hasattr(module, '_fused'): + fused_init_helper_(module, init_fn_) + else: + init_fn_(module.weight) + if module.bias is not None: + torch.nn.init.zeros_(module.bias) + if init_div_is_residual is not False and getattr(module, '_is_residual', False): + with torch.no_grad(): + module.weight.div_(div_is_residual) + elif isinstance(module, nn.Embedding): + if emb_init_std is not None: + std = emb_init_std + if std == 0: + warnings.warn(f'Embedding layer initialized to 0.') + emb_init_fn_ = partial(torch.nn.init.normal_, mean=0.0, std=std) + if verbose > 1: + warnings.warn(f'Embedding layer initialized using normal distribution with mean=0 and std={std!r}.') + elif emb_init_uniform_lim is not None: + lim = emb_init_uniform_lim + if isinstance(lim, Sequence): + if len(lim) > 2: + raise ValueError(f'Uniform init requires a min and a max limit. User input: {lim}.') + if lim[0] == lim[1]: + warnings.warn(f'Embedding layer initialized to {lim[0]}.') + else: + if lim == 0: + warnings.warn(f'Embedding layer initialized to 0.') + lim = [-lim, lim] + (a, b) = lim + emb_init_fn_ = partial(torch.nn.init.uniform_, a=a, b=b) + if verbose > 1: + warnings.warn(f'Embedding layer initialized using uniform distribution in range {lim}.') + else: + emb_init_fn_ = init_fn_ + emb_init_fn_(module.weight) + elif isinstance(module, tuple(set(NORM_CLASS_REGISTRY.values()))): + if verbose > 1: + warnings.warn(f'Norm weights are set to 1. If norm layer has a bias it is initialized to 0.') + if hasattr(module, 'weight') and module.weight is not None: + torch.nn.init.ones_(module.weight) + if hasattr(module, 'bias') and module.bias is not None: + torch.nn.init.zeros_(module.bias) + elif isinstance(module, nn.MultiheadAttention): + if module._qkv_same_embed_dim: + assert module.in_proj_weight is not None + assert module.q_proj_weight is None and module.k_proj_weight is None and (module.v_proj_weight is None) + assert d_model is not None + _d = d_model + splits = (0, _d, 2 * _d, 3 * _d) + for (s, e) in zip(splits[:-1], splits[1:]): + init_fn_(module.in_proj_weight[s:e]) + else: + assert module.q_proj_weight is not None and module.k_proj_weight is not None and (module.v_proj_weight is not None) + assert module.in_proj_weight is None + init_fn_(module.q_proj_weight) + init_fn_(module.k_proj_weight) + init_fn_(module.v_proj_weight) + if module.in_proj_bias is not None: + torch.nn.init.zeros_(module.in_proj_bias) + if module.bias_k is not None: + torch.nn.init.zeros_(module.bias_k) + if module.bias_v is not None: + torch.nn.init.zeros_(module.bias_v) + init_fn_(module.out_proj.weight) + if init_div_is_residual is not False and getattr(module.out_proj, '_is_residual', False): + with torch.no_grad(): + module.out_proj.weight.div_(div_is_residual) + if module.out_proj.bias is not None: + torch.nn.init.zeros_(module.out_proj.bias) + else: + for _ in module.parameters(recurse=False): + raise NotImplementedError(f'{module.__class__.__name__} parameters are not initialized by param_init_fn.') + +def _normal_init_(std, mean=0.0): + return partial(torch.nn.init.normal_, mean=mean, std=std) + +def _normal_param_init_fn_(module: nn.Module, std: float, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, verbose: int=0, **kwargs): + del kwargs + init_fn_ = _normal_init_(std=std) + if verbose > 1: + warnings.warn(f'Using torch.nn.init.normal_ init fn mean=0.0, std={std}') + generic_param_init_fn_(module=module, init_fn_=init_fn_, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) + +def baseline_param_init_fn_(module: nn.Module, init_std: float, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, verbose: int=0, **kwargs): + del kwargs + if init_std is None: + raise ValueError("You must set model.init_config['init_std'] to a float value to use the default initialization scheme.") + _normal_param_init_fn_(module=module, std=init_std, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) + +def small_param_init_fn_(module: nn.Module, n_layers: int, d_model: int, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, verbose: int=0, **kwargs): + del kwargs + std = math.sqrt(2 / (5 * d_model)) + _normal_param_init_fn_(module=module, std=std, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) + +def neox_param_init_fn_(module: nn.Module, n_layers: int, d_model: int, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, verbose: int=0, **kwargs): + """From section 2.3.1 of GPT-NeoX-20B: + + An Open-Source AutoregressiveLanguage Model — Black et. al. (2022) + see https://github.com/EleutherAI/gpt-neox/blob/9610391ab319403cef079b438edd016a2443af54/megatron/model/init_functions.py#L151 + and https://github.com/EleutherAI/gpt-neox/blob/main/megatron/model/transformer.py + """ + del kwargs + residual_div = n_layers / math.sqrt(10) + if verbose > 1: + warnings.warn(f'setting init_div_is_residual to {residual_div}') + small_param_init_fn_(module=module, d_model=d_model, n_layers=n_layers, init_div_is_residual=residual_div, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) + +def kaiming_uniform_param_init_fn_(module: nn.Module, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, init_gain: float=0, fan_mode: str='fan_in', init_nonlinearity: str='leaky_relu', verbose: int=0, **kwargs): + del kwargs + if verbose > 1: + warnings.warn(f'Using nn.init.kaiming_uniform_ init fn with parameters: ' + f'a={init_gain}, mode={fan_mode}, nonlinearity={init_nonlinearity}') + kaiming_uniform_ = partial(nn.init.kaiming_uniform_, a=init_gain, mode=fan_mode, nonlinearity=init_nonlinearity) + generic_param_init_fn_(module=module, init_fn_=kaiming_uniform_, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) + +def kaiming_normal_param_init_fn_(module: nn.Module, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, init_gain: float=0, fan_mode: str='fan_in', init_nonlinearity: str='leaky_relu', verbose: int=0, **kwargs): + del kwargs + if verbose > 1: + warnings.warn(f'Using nn.init.kaiming_normal_ init fn with parameters: ' + f'a={init_gain}, mode={fan_mode}, nonlinearity={init_nonlinearity}') + kaiming_normal_ = partial(torch.nn.init.kaiming_normal_, a=init_gain, mode=fan_mode, nonlinearity=init_nonlinearity) + generic_param_init_fn_(module=module, init_fn_=kaiming_normal_, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) + +def xavier_uniform_param_init_fn_(module: nn.Module, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, init_gain: float=0, verbose: int=0, **kwargs): + del kwargs + xavier_uniform_ = partial(torch.nn.init.xavier_uniform_, gain=init_gain) + if verbose > 1: + warnings.warn(f'Using torch.nn.init.xavier_uniform_ init fn with parameters: ' + f'gain={init_gain}') + generic_param_init_fn_(module=module, init_fn_=xavier_uniform_, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) + +def xavier_normal_param_init_fn_(module: nn.Module, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, float, str, bool]=True, emb_init_std: Optional[float]=None, emb_init_uniform_lim: Optional[Union[Tuple[float, float], float]]=None, init_gain: float=0, verbose: int=0, **kwargs): + xavier_normal_ = partial(torch.nn.init.xavier_normal_, gain=init_gain) + if verbose > 1: + warnings.warn(f'Using torch.nn.init.xavier_normal_ init fn with parameters: ' + f'gain={init_gain}') + generic_param_init_fn_(module=module, init_fn_=xavier_normal_, d_model=d_model, n_layers=n_layers, init_div_is_residual=init_div_is_residual, emb_init_std=emb_init_std, emb_init_uniform_lim=emb_init_uniform_lim, verbose=verbose) +MODEL_INIT_REGISTRY = {'default_': torch_default_param_init_fn_, 'baseline_': baseline_param_init_fn_, 'kaiming_uniform_': kaiming_uniform_param_init_fn_, 'kaiming_normal_': kaiming_normal_param_init_fn_, 'neox_init_': neox_param_init_fn_, 'small_init_': small_param_init_fn_, 'xavier_uniform_': xavier_uniform_param_init_fn_, 'xavier_normal_': xavier_normal_param_init_fn_} \ No newline at end of file diff --git a/LLAVA_Biovil/llava/model/llava_arch.py b/LLAVA_Biovil/llava/model/llava_arch.py new file mode 100644 index 0000000000000000000000000000000000000000..6c7c394b1665a7240995d26aac82f756b18a5e02 --- /dev/null +++ b/LLAVA_Biovil/llava/model/llava_arch.py @@ -0,0 +1,480 @@ +# Copyright 2023 Haotian Liu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from abc import ABC, abstractmethod + +import torch + +from biovil_t.model import ImageModel +from biovil_t.pretrained import _download_biovil_t_image_model_weights +from biovil_t.types import ImageEncoderType +from .multimodal_encoder.builder import build_vision_tower +from .multimodal_projector.builder import build_vision_projector, build_image_pooler + +from llava.constants import IGNORE_INDEX, IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_PATCH_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN + + + +class LlavaMetaModel: + + def __init__(self, config, mv_type='none'): + super(LlavaMetaModel, self).__init__(config) + + if hasattr(config, "mm_vision_tower"): + self.vision_tower = build_vision_tower(config, delay_load=True) + self.mm_projector = build_vision_projector(config) + self.image_pooler = build_image_pooler(config) if "pool" in mv_type else None + + def get_vision_tower(self): + vision_tower = getattr(self, 'vision_tower', None) + if type(vision_tower) is list: + vision_tower = vision_tower[0] + return vision_tower + + def get_image_pooler(self): + return self.image_pooler + + def initialize_vision_modules(self, model_args, fsdp=None): + vision_tower = model_args.vision_tower + mm_vision_select_layer = model_args.mm_vision_select_layer + mm_vision_select_feature = model_args.mm_vision_select_feature + pretrain_mm_mlp_adapter = model_args.pretrain_mm_mlp_adapter + + self.config.mm_vision_tower = vision_tower + self.config.mv_type = getattr(model_args, 'mv_type', False) + + if self.get_vision_tower() is None: + if self.config.mm_vision_tower == 'biovil': + biovilt_checkpoint_path = _download_biovil_t_image_model_weights() + model_type = ImageEncoderType.RESNET50_MULTI_IMAGE + vision_tower = ImageModel(img_encoder_type=model_type, + joint_feature_size=128, + pretrained_model_path=biovilt_checkpoint_path) + # freeze vision_tower layers + for p in vision_tower.parameters(): + p.requires_grad = False + else: + vision_tower = build_vision_tower(model_args) + + if fsdp is not None and len(fsdp) > 0: + self.vision_tower = [vision_tower] + else: + self.vision_tower = vision_tower + else: + if fsdp is not None and len(fsdp) > 0: + vision_tower = self.vision_tower[0] + else: + vision_tower = self.vision_tower + vision_tower.load_model() + + self.config.use_mm_proj = True + self.config.mm_projector_type = getattr(model_args, 'mm_projector_type', 'linear') + self.config.mm_hidden_size = vision_tower.hidden_size if self.config.mm_vision_tower != 'biovil' else vision_tower.feature_size + self.config.mm_vision_select_layer = mm_vision_select_layer + self.config.mm_vision_select_feature = mm_vision_select_feature + + if getattr(self, 'mm_projector', None) is None or model_args.vision_tower == 'biovil': #for biovil wrong weights are loaded from model shards, so we need to overwrite the vision projector again + self.mm_projector = build_vision_projector(self.config) + else: + # In case it is frozen by LoRA + for p in self.mm_projector.parameters(): + p.requires_grad = True + + # unfreeze image pooler + if self.image_pooler is not None: + for p in self.image_pooler.parameters(): + p.requires_grad = True + + if pretrain_mm_mlp_adapter is not None: + mm_projector_weights = torch.load(pretrain_mm_mlp_adapter, map_location='cpu') + def get_w(weights, keyword): + return {k.split(keyword + '.')[1]: v for k, v in weights.items() if keyword in k} + + self.mm_projector.load_state_dict(get_w(mm_projector_weights, 'mm_projector')) + + +class LlavaMetaForCausalLM(ABC): + + @abstractmethod + def get_model(self): + pass + + def get_vision_tower(self): + return self.get_model().get_vision_tower() + + def encode_images(self, images): + image_features = self.get_model().get_vision_tower()(images) + if self.get_model().config.mm_vision_tower == 'biovil': + image_features = image_features.patch_embeddings + # flatten + image_features = image_features.flatten(2).transpose(1,2) + + image_features = self.get_model().mm_projector(image_features) + + return image_features + + def pad_embeddings(self, embeddings, num_imgs_present=None, num_imgs_past=None, padding_value=0): + """ + Pad the embeddings to have the same number in each batch. + + Args: + - embeddings (List[Tensor]): List of embedding tensors, each with shape (num_images, embedding_dim). + - padding_value (float): Value to use for padding. + + Returns: + - Tensor: Padded embeddings with shape (batch_size, max_num_images, embedding_dim). + - Tensor: Mask indicating real data (1) and padding (0). + """ + batch_size = len(embeddings) + img_len = embeddings[0].shape[1] + embedding_dim = embeddings[0].shape[2] + max_num_images = max(emb.shape[0] for emb in embeddings) + + # Initialize padded embeddings and mask + padded_embeddings = torch.full((batch_size, max_num_images, img_len, embedding_dim), padding_value, dtype=embeddings[0].dtype, device=embeddings[0].device) + mask = torch.zeros(batch_size, max_num_images*img_len, dtype=torch.bool, device=embeddings[0].device) + # create token type ids with 0 for present 1 for past, 2 for padding, of shape (batch_size, max_num_images * img_len) + token_type_ids = torch.zeros(batch_size, max_num_images * img_len, dtype=torch.long, device=embeddings[0].device) + if num_imgs_present is not None: + # set token type ids for present to 1, for past to 2, 0 is padded elements + for idx, (present_len, past_len) in enumerate(zip(num_imgs_present, num_imgs_past)): + token_type_ids[idx, :present_len*img_len] = 1 + token_type_ids[idx, present_len*img_len:(present_len+past_len)*img_len] = 2 + + # Pad each item in the batch + for idx, emb in enumerate(embeddings): + num_images = emb.shape[0] + padded_embeddings[idx, :num_images] = emb + mask[idx, :num_images*img_len] = 1 + + return padded_embeddings.flatten(1,2), mask, token_type_ids + + def pad_embeddings_mv(self, embeddings, padding_value=0): + """ + Pad the embeddings to have the same number in each batch. + + Args: + - embeddings (List[Tensor]): List of embedding tensors, each with shape (num_images, embedding_dim). + - padding_value (float): Value to use for padding. + + Returns: + - Tensor: Padded embeddings with shape (batch_size, max_num_images, embedding_dim). + - Tensor: Mask indicating real data (1) and padding (0). + """ + batch_size = len(embeddings) + img_len = embeddings[0].shape[1] + embedding_dim = embeddings[0].shape[2] + max_num_images = max(emb.shape[0] for emb in embeddings) + + # Initialize padded embeddings and mask + padded_embeddings = torch.full((batch_size, max_num_images, img_len, embedding_dim), padding_value, dtype=embeddings[0].dtype, device=embeddings[0].device) + mask = torch.zeros(batch_size, max_num_images*img_len, dtype=torch.bool, device=embeddings[0].device) + + # Pad each item in the batch + for idx, emb in enumerate(embeddings): + num_images = emb.shape[0] + padded_embeddings[idx, :num_images] = emb + mask[idx, :num_images*img_len] = 1 + + return padded_embeddings.flatten(1,2), mask + + def encode_images_pooled(self, images, split_sizes, num_imgs_present, num_imgs_past, mv_type="pool_all"): + image_pooler = self.get_image_pooler() + image_features = self.get_model().get_vision_tower()(images) + if self.get_model().config.mm_vision_tower == 'biovil': + image_features = image_features.patch_embeddings + # flatten + image_features = image_features.flatten(2).transpose(1,2) + if split_sizes is not None: + image_features = torch.split(image_features, split_sizes, dim=0) + + if mv_type == "pool_all": + # merge present and past per batch + present_features = [image_features[i] for i in range(len(num_imgs_present))] + past_features = [] + i = 0 + for num_imgs_elem in num_imgs_past: + if num_imgs_elem != 0: + past_features.append(image_features[i+len(num_imgs_present)]) + i += 1 + else: + past_features.append(None) + + all_img_features = [] + for idx, (batch_num_present, batch_num_past) in enumerate(zip(num_imgs_present, num_imgs_past)): + if batch_num_past == 0: + all_img_features.append(present_features[idx]) + else: + all_img_features.append(torch.cat((present_features[idx], past_features[idx]), dim=0)) + + all_img_features, mask, token_type_ids = self.pad_embeddings(all_img_features, num_imgs_present, num_imgs_past) + all_img_features = image_pooler(all_img_features, mask, token_type_ids) + + elif mv_type == "pool_concat": + present_features = [image_features[i] for i in range(len(num_imgs_present))] + past_features = [image_features[i+len(num_imgs_present)] for i in range(len(image_features)-len(num_imgs_present))] + present_features, mask_present, _ = self.pad_embeddings(present_features) + past_features, mask_past, _ = self.pad_embeddings(past_features) + present_features = image_pooler(present_features, mask_present) + past_features = image_pooler(past_features, mask_past) + # TODO maybe max pool on past features to save tokens + # concat present and past per batch if past is not empty + all_img_features = [] + idx_present = 0 + idx_past = 0 + for batch_num_present, batch_num_past in zip(num_imgs_present, num_imgs_past): + if batch_num_past == 0: + all_img_features.append(present_features[idx_present]) + idx_present += 1 + else: + all_img_features.append(torch.cat((present_features[idx_present], past_features[idx_past]), dim=0)) + idx_present += 1 + idx_past += 1 + else: + raise NotImplementedError + if type(all_img_features) is list: + split_sizes = [image.shape[0] for image in all_img_features] + all_img_features = self.get_model().mm_projector(torch.cat(all_img_features, dim=0)) + all_img_features = torch.split(all_img_features, split_sizes, dim=0) + + else: + all_img_features = self.get_model().mm_projector(all_img_features) + return all_img_features + + def encode_images_pooled_mv(self, images, split_sizes): + image_pooler = self.get_image_pooler() + image_features = self.get_model().get_vision_tower()(images) + if split_sizes is not None: + image_features = torch.split(image_features, split_sizes, dim=0) + image_features, mask = self.pad_embeddings_mv(image_features) + image_features = image_pooler(image_features, mask) + else: + mask = torch.ones((image_features.shape[0], image_features.shape[1]), dtype=torch.bool, device=image_features[0].device) + image_features = image_pooler(image_features, mask) + image_features = self.get_model().mm_projector(image_features) + return image_features + + def get_image_pooler(self): + return self.get_model().get_image_pooler() + + def prepare_inputs_labels_for_multimodal( + self, input_ids, position_ids, attention_mask, past_key_values, labels, images, prev_images=None + ): + vision_tower = self.get_vision_tower() + if vision_tower is None or images is None or input_ids.shape[1] == 1: + if past_key_values is not None and vision_tower is not None and images is not None and input_ids.shape[1] == 1: + target_shape = past_key_values[-1][-1].shape[-2] + 1 + attention_mask = torch.cat((attention_mask, torch.ones( + (attention_mask.shape[0], target_shape - attention_mask.shape[1]), + dtype=attention_mask.dtype, + device=attention_mask.device + )), dim=1) + position_ids = torch.sum(attention_mask, dim=1).unsqueeze(-1) - 1 + return input_ids, position_ids, attention_mask, past_key_values, None, labels + + if type(images) is list or images.ndim == 5: + if getattr(self.config, 'mv_type') == "concat": + concat_images = torch.cat([image for image in images], dim=0) + image_features = self.encode_images(concat_images) + split_sizes = [image.shape[0] for image in images] + image_features = torch.split(image_features, split_sizes, dim=0) + image_features = [x.flatten(0, 1).to(self.device) for x in image_features] + if getattr(self.config, 'mv_type') == "pool_all": + concat_images = torch.cat((torch.cat([image for image in images], dim=0), torch.cat([image for image in prev_images if image is not None], dim=0))) # first present, then past, all will be merged + split_sizes = [image.shape[0] for image in images]+ [image.shape[0] for image in prev_images if image is not None] + num_imgs_present = [image.shape[0] if image is not None else 0 for image in images] + num_imgs_past = [image.shape[0] if image is not None else 0 for image in prev_images] + image_features = self.encode_images_pooled(concat_images, split_sizes, num_imgs_present, num_imgs_past, "pool_all") + if getattr(self.config, 'mv_type') == "pool_concat": # TODO make sure to allow empty past -> shorter sequence + concat_images = torch.cat((torch.cat([image for image in images], dim=0), torch.cat([image for image in prev_images if image is not None], dim=0))) # first present, then past, all will be merged + split_sizes = [image.shape[0] for image in images]+ [image.shape[0] for image in prev_images if image is not None] + num_imgs_present = [image.shape[0] if image is not None else 0 for image in images] + num_imgs_past = [image.shape[0] if image is not None else 0 for image in prev_images] + image_features = self.encode_images_pooled(concat_images, split_sizes, num_imgs_present, num_imgs_past, "pool_concat") + if getattr(self.config, 'mv_type') == "pool": #no past images + concat_images = torch.cat([image for image in images], dim=0) + split_sizes = [image.shape[0] for image in images] + image_features = self.encode_images_pooled_mv(concat_images, split_sizes) + else: + if hasattr(self.config, 'mv_type') and getattr(self.config, 'mv_type') == "pool_all": + image_features = self.encode_images_pooled(images, None).to(self.device) + elif hasattr(self.config, 'mv_type') and getattr(self.config, 'mv_type') == "pool": + image_features = self.encode_images_pooled_mv(images, None).to(self.device) + else: + image_features = self.encode_images(images).to(self.device) + + # TODO: image start / end is not implemented here to support pretraining. + if getattr(self.config, 'tune_mm_mlp_adapter', False) and getattr(self.config, 'mm_use_im_start_end', False): + raise NotImplementedError + + # Let's just add dummy tensors if they do not exist, + # it is a headache to deal with None all the time. + # But it is not ideal, and if you have a better idea, + # please open an issue / submit a PR, thanks. + _labels = labels + _position_ids = position_ids + _attention_mask = attention_mask + if attention_mask is None: + attention_mask = torch.ones_like(input_ids, dtype=torch.bool) + else: + attention_mask = attention_mask.bool() + if position_ids is None: + position_ids = torch.arange(0, input_ids.shape[1], dtype=torch.long, device=input_ids.device) #TODO throws GPU error + if labels is None: + labels = torch.full_like(input_ids, IGNORE_INDEX) + + # remove the padding using attention_mask -- TODO: double check + input_ids = [cur_input_ids[cur_attention_mask] for cur_input_ids, cur_attention_mask in zip(input_ids, attention_mask)] + labels = [cur_labels[cur_attention_mask] for cur_labels, cur_attention_mask in zip(labels, attention_mask)] + + new_input_embeds = [] + new_labels = [] + cur_image_idx = 0 + for batch_idx, cur_input_ids in enumerate(input_ids): + num_images = (cur_input_ids == IMAGE_TOKEN_INDEX).sum() + if num_images == 0: + cur_image_features = image_features[cur_image_idx] + cur_input_embeds_1 = self.get_model().embed_tokens(cur_input_ids) + cur_input_embeds = torch.cat([cur_input_embeds_1, cur_image_features[0:0]], dim=0) + new_input_embeds.append(cur_input_embeds) + new_labels.append(labels[batch_idx]) + cur_image_idx += 1 + continue + + image_token_indices = [-1] + torch.where(cur_input_ids == IMAGE_TOKEN_INDEX)[0].tolist() + [cur_input_ids.shape[0]] + cur_input_ids_noim = [] + cur_labels = labels[batch_idx] + cur_labels_noim = [] + for i in range(len(image_token_indices) - 1): + cur_input_ids_noim.append(cur_input_ids[image_token_indices[i]+1:image_token_indices[i+1]]) + cur_labels_noim.append(cur_labels[image_token_indices[i]+1:image_token_indices[i+1]]) + split_sizes = [x.shape[0] for x in cur_labels_noim] + cur_input_embeds = self.get_model().embed_tokens(torch.cat(cur_input_ids_noim)) + cur_input_embeds_no_im = torch.split(cur_input_embeds, split_sizes, dim=0) + cur_new_input_embeds = [] + cur_new_labels = [] + + for i in range(num_images + 1): + cur_new_input_embeds.append(cur_input_embeds_no_im[i]) + cur_new_labels.append(cur_labels_noim[i]) + if i < num_images: + cur_image_features = image_features[cur_image_idx] + cur_image_idx += 1 + cur_new_input_embeds.append(cur_image_features) + cur_new_labels.append(torch.full((cur_image_features.shape[0],), IGNORE_INDEX, device=cur_labels.device, dtype=cur_labels.dtype)) + + cur_new_input_embeds = torch.cat(cur_new_input_embeds) + cur_new_labels = torch.cat(cur_new_labels) + + new_input_embeds.append(cur_new_input_embeds) + new_labels.append(cur_new_labels) + + # Truncate sequences to max length as image embeddings can make the sequence longer + tokenizer_model_max_length = getattr(self.config, 'tokenizer_model_max_length', None) + if tokenizer_model_max_length is not None: + max_len_orig = max(x.shape[0] for x in new_input_embeds) + if max_len_orig > tokenizer_model_max_length: + print(f"Truncating sequences of len {max_len_orig} to {tokenizer_model_max_length} to fit the model's input length") + new_input_embeds = [x[:tokenizer_model_max_length] for x in new_input_embeds] + new_labels = [x[:tokenizer_model_max_length] for x in new_labels] + + # Combine them + max_len = max(x.shape[0] for x in new_input_embeds) + batch_size = len(new_input_embeds) + + new_input_embeds_padded = [] + new_labels_padded = torch.full((batch_size, max_len), IGNORE_INDEX, dtype=new_labels[0].dtype, device=new_labels[0].device) + attention_mask = torch.zeros((batch_size, max_len), dtype=attention_mask.dtype, device=attention_mask.device) + position_ids = torch.zeros((batch_size, max_len), dtype=position_ids.dtype, device=position_ids.device) + + for i, (cur_new_embed, cur_new_labels) in enumerate(zip(new_input_embeds, new_labels)): + cur_len = cur_new_embed.shape[0] + if getattr(self.config, 'tokenizer_padding_side', 'right') == "left": + new_input_embeds_padded.append(torch.cat(( + torch.zeros((max_len - cur_len, cur_new_embed.shape[1]), dtype=cur_new_embed.dtype, device=cur_new_embed.device), + cur_new_embed + ), dim=0)) + if cur_len > 0: + new_labels_padded[i, -cur_len:] = cur_new_labels + attention_mask[i, -cur_len:] = True + position_ids[i, -cur_len:] = torch.arange(0, cur_len, dtype=position_ids.dtype, device=position_ids.device) + else: + new_input_embeds_padded.append(torch.cat(( + cur_new_embed, + torch.zeros((max_len - cur_len, cur_new_embed.shape[1]), dtype=cur_new_embed.dtype, device=cur_new_embed.device) + ), dim=0)) + if cur_len > 0: + new_labels_padded[i, :cur_len] = cur_new_labels + attention_mask[i, :cur_len] = True + position_ids[i, :cur_len] = torch.arange(0, cur_len, dtype=position_ids.dtype, device=position_ids.device) + + new_input_embeds = torch.stack(new_input_embeds_padded, dim=0) + + if _labels is None: + new_labels = None + else: + new_labels = new_labels_padded + + if _attention_mask is None: + attention_mask = None + else: + attention_mask = attention_mask.to(dtype=_attention_mask.dtype) + + if _position_ids is None: + position_ids = None + + return None, position_ids, attention_mask, past_key_values, new_input_embeds, new_labels + + def initialize_vision_tokenizer(self, model_args, tokenizer): + if model_args.mm_use_im_patch_token: + tokenizer.add_tokens([DEFAULT_IMAGE_PATCH_TOKEN], special_tokens=True) + self.resize_token_embeddings(len(tokenizer)) + + if model_args.mm_use_im_start_end: + num_new_tokens = tokenizer.add_tokens([DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN], special_tokens=True) + self.resize_token_embeddings(len(tokenizer)) + + if num_new_tokens > 0: + input_embeddings = self.get_input_embeddings().weight.data + output_embeddings = self.get_output_embeddings().weight.data + + input_embeddings_avg = input_embeddings[:-num_new_tokens].mean( + dim=0, keepdim=True) + output_embeddings_avg = output_embeddings[:-num_new_tokens].mean( + dim=0, keepdim=True) + + input_embeddings[-num_new_tokens:] = input_embeddings_avg + output_embeddings[-num_new_tokens:] = output_embeddings_avg + + if model_args.tune_mm_mlp_adapter: + for p in self.get_input_embeddings().parameters(): + p.requires_grad = True + for p in self.get_output_embeddings().parameters(): + p.requires_grad = False + + if model_args.pretrain_mm_mlp_adapter: + mm_projector_weights = torch.load(model_args.pretrain_mm_mlp_adapter, map_location='cpu') + embed_tokens_weight = mm_projector_weights['model.embed_tokens.weight'] + assert num_new_tokens == 2 + if input_embeddings.shape == embed_tokens_weight.shape: + input_embeddings[-num_new_tokens:] = embed_tokens_weight[-num_new_tokens:] + elif embed_tokens_weight.shape[0] == num_new_tokens: + input_embeddings[-num_new_tokens:] = embed_tokens_weight + else: + raise ValueError(f"Unexpected embed_tokens_weight shape. Pretrained: {embed_tokens_weight.shape}. Current: {input_embeddings.shape}. Numer of new tokens: {num_new_tokens}.") + elif model_args.mm_use_im_patch_token: + if model_args.tune_mm_mlp_adapter: + for p in self.get_input_embeddings().parameters(): + p.requires_grad = False + for p in self.get_output_embeddings().parameters(): + p.requires_grad = False diff --git a/LLAVA_Biovil/llava/model/make_delta.py b/LLAVA_Biovil/llava/model/make_delta.py new file mode 100644 index 0000000000000000000000000000000000000000..cb7051e46f2e8252a73994cba62bbd53a16feaad --- /dev/null +++ b/LLAVA_Biovil/llava/model/make_delta.py @@ -0,0 +1,52 @@ +""" +Usage: +python3 -m llava.model.make_delta --base ~/model_weights/llama-7b --target ~/model_weights/llava-7b --delta ~/model_weights/llava-7b-delta --hub-repo-id liuhaotian/llava-7b-delta +""" +import argparse + +import torch +from tqdm import tqdm +from transformers import AutoTokenizer, AutoModelForCausalLM +from LLAV.llava.model.utils import auto_upgrade + + +def make_delta(base_model_path, target_model_path, delta_path, hub_repo_id): + print("Loading base model") + base = AutoModelForCausalLM.from_pretrained( + base_model_path, torch_dtype=torch.float16, low_cpu_mem_usage=True) + + print("Loading target model") + auto_upgrade(target_model_path) + target = AutoModelForCausalLM.from_pretrained(target_model_path, torch_dtype=torch.float16, low_cpu_mem_usage=True) + + print("Calculating delta") + for name, param in tqdm(target.state_dict().items(), desc="Calculating delta"): + if name not in base.state_dict(): + assert name in ['model.mm_projector.weight', 'model.mm_projector.bias'], f'{name} not in base model' + continue + if param.data.shape == base.state_dict()[name].shape: + param.data -= base.state_dict()[name] + else: + assert name in ['model.embed_tokens.weight', 'lm_head.weight'], f'{name} dimension mismatch: {param.data.shape} vs {base.state_dict()[name].shape}' + bparam = base.state_dict()[name] + param.data[:bparam.shape[0], :bparam.shape[1]] -= bparam + + print("Saving delta") + if hub_repo_id: + kwargs = {"push_to_hub": True, "repo_id": hub_repo_id} + else: + kwargs = {} + target.save_pretrained(delta_path, **kwargs) + target_tokenizer = AutoTokenizer.from_pretrained(target_model_path) + target_tokenizer.save_pretrained(delta_path, **kwargs) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--base-model-path", type=str, required=True) + parser.add_argument("--target-model-path", type=str, required=True) + parser.add_argument("--delta-path", type=str, required=True) + parser.add_argument("--hub-repo-id", type=str, default=None) + args = parser.parse_args() + + make_delta(args.base_model_path, args.target_model_path, args.delta_path, args.hub_repo_id) diff --git a/LLAVA_Biovil/llava/model/multimodal_encoder/__init__.py b/LLAVA_Biovil/llava/model/multimodal_encoder/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/llava/model/multimodal_encoder/builder.py b/LLAVA_Biovil/llava/model/multimodal_encoder/builder.py new file mode 100644 index 0000000000000000000000000000000000000000..0ce8e1f0f215bc56273866b6ac293b2bb26e8299 --- /dev/null +++ b/LLAVA_Biovil/llava/model/multimodal_encoder/builder.py @@ -0,0 +1,16 @@ +import os +from .clip_encoder import CLIPVisionTower + + +def build_vision_tower(vision_tower_cfg, **kwargs): + vision_tower = getattr(vision_tower_cfg, 'mm_vision_tower', getattr(vision_tower_cfg, 'vision_tower', None)) + + if vision_tower == 'biovil': + vision_tower_cfg.mm_hidden_size = 512 + return None + else: + is_absolute_path_exists = os.path.exists(vision_tower) + if is_absolute_path_exists or vision_tower.startswith("openai") or vision_tower.startswith("laion"): + return CLIPVisionTower(vision_tower, args=vision_tower_cfg, **kwargs) + + raise ValueError(f'Unknown vision tower: {vision_tower}') diff --git a/LLAVA_Biovil/llava/model/multimodal_encoder/clip_encoder.py b/LLAVA_Biovil/llava/model/multimodal_encoder/clip_encoder.py new file mode 100644 index 0000000000000000000000000000000000000000..06f5782fa6a9ce444ee524bd0cd1d95e47b9f1de --- /dev/null +++ b/LLAVA_Biovil/llava/model/multimodal_encoder/clip_encoder.py @@ -0,0 +1,78 @@ +import torch +import torch.nn as nn + +from transformers import CLIPVisionModel, CLIPImageProcessor, CLIPVisionConfig + + +class CLIPVisionTower(nn.Module): + def __init__(self, vision_tower, args, delay_load=False): + super().__init__() + + self.is_loaded = False + + self.vision_tower_name = vision_tower + self.select_layer = args.mm_vision_select_layer + self.select_feature = getattr(args, 'mm_vision_select_feature', 'patch') + + if not delay_load: + self.load_model() + else: + self.cfg_only = CLIPVisionConfig.from_pretrained(self.vision_tower_name) + + def load_model(self): + self.image_processor = CLIPImageProcessor.from_pretrained(self.vision_tower_name) + self.vision_tower = CLIPVisionModel.from_pretrained(self.vision_tower_name) + self.vision_tower.requires_grad_(False) + + self.is_loaded = True + + def feature_select(self, image_forward_outs): + image_features = image_forward_outs.hidden_states[self.select_layer] + if self.select_feature == 'patch': + image_features = image_features[:, 1:] + elif self.select_feature == 'cls_patch': + image_features = image_features + else: + raise ValueError(f'Unexpected select feature: {self.select_feature}') + return image_features + + # @torch.no_grad() # deactivated for finetuning the vision tower + def forward(self, images): + if type(images) is list: + image_features = [] + for image in images: + image_forward_out = self.vision_tower(image.to(device=self.device, dtype=self.dtype).unsqueeze(0), output_hidden_states=True) + image_feature = self.feature_select(image_forward_out).to(image.dtype) + image_features.append(image_feature) + else: + image_forward_outs = self.vision_tower(images.to(device=self.device, dtype=self.dtype), output_hidden_states=True) + image_features = self.feature_select(image_forward_outs).to(images.dtype) + + return image_features + + @property + def dummy_feature(self): + return torch.zeros(1, self.hidden_size, device=self.device, dtype=self.dtype) + + @property + def dtype(self): + return self.vision_tower.dtype + + @property + def device(self): + return self.vision_tower.device + + @property + def config(self): + if self.is_loaded: + return self.vision_tower.config + else: + return self.cfg_only + + @property + def hidden_size(self): + return self.config.hidden_size + + @property + def num_patches(self): + return (self.config.image_size // self.config.patch_size) ** 2 diff --git a/LLAVA_Biovil/llava/model/multimodal_projector/__init__.py b/LLAVA_Biovil/llava/model/multimodal_projector/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/llava/model/multimodal_projector/builder.py b/LLAVA_Biovil/llava/model/multimodal_projector/builder.py new file mode 100644 index 0000000000000000000000000000000000000000..7e4bf611f7d37488c370e065d62d247d2cd0585d --- /dev/null +++ b/LLAVA_Biovil/llava/model/multimodal_projector/builder.py @@ -0,0 +1,85 @@ +import torch +import torch.nn as nn +import re + +from transformers import BertConfig, BertModel + + +class IdentityMap(nn.Module): + def __init__(self): + super().__init__() + + def forward(self, x, *args, **kwargs): + return x + + @property + def config(self): + return {"mm_projector_type": 'identity'} + + +class SimpleResBlock(nn.Module): + def __init__(self, channels): + super().__init__() + self.pre_norm = nn.LayerNorm(channels) + + self.proj = nn.Sequential( + nn.Linear(channels, channels), + nn.GELU(), + nn.Linear(channels, channels) + ) + def forward(self, x): + x = self.pre_norm(x) + return x + self.proj(x) + + +def build_vision_projector(config, delay_load=False, **kwargs): + projector_type = getattr(config, 'mm_projector_type', 'linear') + + if projector_type == 'linear': + return nn.Linear(config.mm_hidden_size, config.hidden_size) + + mlp_gelu_match = re.match(r'^mlp(\d+)x_gelu$', projector_type) + if mlp_gelu_match: + mlp_depth = int(mlp_gelu_match.group(1)) + modules = [nn.Linear(config.mm_hidden_size, config.hidden_size)] + for _ in range(1, mlp_depth): + modules.append(nn.GELU()) + modules.append(nn.Linear(config.hidden_size, config.hidden_size)) + return nn.Sequential(*modules) + + if projector_type == 'identity': + return IdentityMap() + + raise ValueError(f'Unknown projector type: {projector_type}') + +class ImageEmbeddingPooler(nn.Module): + + def __init__(self): + super().__init__() + self.embedding_dim = 512 + + # Configure a new BERT model with 2 hidden layers and without positional embeddings + config = BertConfig( + hidden_size=self.embedding_dim, + num_hidden_layers=2, # Set the number of hidden layers to 2 + num_attention_heads=8, + intermediate_size=self.embedding_dim*4, + use_position_embeddings=True, + max_position_embeddings=2304, + use_bfloat16=True, + vocab_size=1, + ) + self.bert = BertModel(config) + + def forward(self, embeddings, attention_mask): + # embeddings shape: (batch_size, num_images, embedding_dim) + batch_size, num_tokens, _ = embeddings.shape + # Process embeddings through BERT without positional IDs + outputs = self.bert(inputs_embeds=embeddings, attention_mask=attention_mask) + # identity option + outputs = outputs['last_hidden_state'].to(embeddings.dtype)[:, :196] + + return outputs + +def build_image_pooler(config): + return ImageEmbeddingPooler() diff --git a/LLAVA_Biovil/llava/model/utils.py b/LLAVA_Biovil/llava/model/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..2563f89c6cedf5e73508afec8f9979105df9b745 --- /dev/null +++ b/LLAVA_Biovil/llava/model/utils.py @@ -0,0 +1,20 @@ +from transformers import AutoConfig + + +def auto_upgrade(config): + cfg = AutoConfig.from_pretrained(config) + if 'llava' in config and 'llava' not in cfg.model_type: + assert cfg.model_type == 'llama' + print("You are using newer LLaVA code base, while the checkpoint of v0 is from older code base.") + print("You must upgrade the checkpoint to the new code base (this can be done automatically).") + confirm = input("Please confirm that you want to upgrade the checkpoint. [Y/N]") + if confirm.lower() in ["y", "yes"]: + print("Upgrading checkpoint...") + assert len(cfg.architectures) == 1 + setattr(cfg.__class__, "model_type", "llava") + cfg.architectures[0] = 'LlavaLlamaForCausalLM' + cfg.save_pretrained(config) + print("Checkpoint upgraded.") + else: + print("Checkpoint upgrade aborted.") + exit(1) diff --git a/LLAVA_Biovil/llava/serve/__init__.py b/LLAVA_Biovil/llava/serve/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/llava/serve/cli.py b/LLAVA_Biovil/llava/serve/cli.py new file mode 100644 index 0000000000000000000000000000000000000000..c3b1fa5b8bd35aaccac7902763cb3a16f6dbab8f --- /dev/null +++ b/LLAVA_Biovil/llava/serve/cli.py @@ -0,0 +1,122 @@ +import argparse +import torch + +from LLAV.llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from LLAV.llava.conversation import conv_templates, SeparatorStyle +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.utils import disable_torch_init +from LLAV.llava.mm_utils import process_images, tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria + +import requests +from PIL import Image +from io import BytesIO +from transformers import TextStreamer + + +def load_image(image_file): + if image_file.startswith('http://') or image_file.startswith('https://'): + response = requests.get(image_file) + image = Image.open(BytesIO(response.content)).convert('RGB') + else: + image = Image.open(image_file).convert('RGB') + return image + + +def main(args): + # Model + disable_torch_init() + + model_name = get_model_name_from_path(args.model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, args.load_8bit, args.load_4bit, device=args.device) + + if 'llama-2' in model_name.lower(): + conv_mode = "llava_llama_2" + elif "v1" in model_name.lower(): + conv_mode = "llava_v1" + elif "mpt" in model_name.lower(): + conv_mode = "mpt" + else: + conv_mode = "llava_v0" + + if args.conv_mode is not None and conv_mode != args.conv_mode: + print('[WARNING] the auto inferred conversation mode is {}, while `--conv-mode` is {}, using {}'.format(conv_mode, args.conv_mode, args.conv_mode)) + else: + args.conv_mode = conv_mode + + conv = conv_templates[args.conv_mode].copy() + if "mpt" in model_name.lower(): + roles = ('user', 'assistant') + else: + roles = conv.roles + + image = load_image(args.image_file) + # Similar operation in model_worker.py + image_tensor = process_images([image], image_processor, model.config) + if type(image_tensor) is list: + image_tensor = [image.to(model.device, dtype=torch.float16) for image in image_tensor] + else: + image_tensor = image_tensor.to(model.device, dtype=torch.float16) + + while True: + try: + inp = input(f"{roles[0]}: ") + except EOFError: + inp = "" + if not inp: + print("exit...") + break + + print(f"{roles[1]}: ", end="") + + if image is not None: + # first message + if model.config.mm_use_im_start_end: + inp = DEFAULT_IM_START_TOKEN + DEFAULT_IMAGE_TOKEN + DEFAULT_IM_END_TOKEN + '\n' + inp + else: + inp = DEFAULT_IMAGE_TOKEN + '\n' + inp + conv.append_message(conv.roles[0], inp) + image = None + else: + # later messages + conv.append_message(conv.roles[0], inp) + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).to(model.device) + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + keywords = [stop_str] + stopping_criteria = KeywordsStoppingCriteria(keywords, tokenizer, input_ids) + streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) + + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=image_tensor, + do_sample=True if args.temperature > 0 else False, + temperature=args.temperature, + max_new_tokens=args.max_new_tokens, + streamer=streamer, + use_cache=True, + stopping_criteria=[stopping_criteria]) + + outputs = tokenizer.decode(output_ids[0, input_ids.shape[1]:]).strip() + conv.messages[-1][-1] = outputs + + if args.debug: + print("\n", {"prompt": prompt, "outputs": outputs}, "\n") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, default="facebook/opt-350m") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--image-file", type=str, required=True) + parser.add_argument("--device", type=str, default="cuda") + parser.add_argument("--conv-mode", type=str, default=None) + parser.add_argument("--temperature", type=float, default=0.2) + parser.add_argument("--max-new-tokens", type=int, default=512) + parser.add_argument("--load-8bit", action="store_true") + parser.add_argument("--load-4bit", action="store_true") + parser.add_argument("--debug", action="store_true") + args = parser.parse_args() + main(args) diff --git a/LLAVA_Biovil/llava/serve/controller.py b/LLAVA_Biovil/llava/serve/controller.py new file mode 100644 index 0000000000000000000000000000000000000000..56beb82705aa669e2411eed2c2bdeff520fe1392 --- /dev/null +++ b/LLAVA_Biovil/llava/serve/controller.py @@ -0,0 +1,296 @@ +""" +A controller manages distributed workers. +It sends worker addresses to clients. +""" +import argparse +import dataclasses +from enum import Enum, auto +import json +import time +from typing import List +import threading + +from fastapi import FastAPI, Request +from fastapi.responses import StreamingResponse +import numpy as np +import requests +import uvicorn + +from llava.constants import CONTROLLER_HEART_BEAT_EXPIRATION +from llava.utils import build_logger, server_error_msg + + +logger = build_logger("controller", "controller.log") + + +class DispatchMethod(Enum): + LOTTERY = auto() + SHORTEST_QUEUE = auto() + + @classmethod + def from_str(cls, name): + if name == "lottery": + return cls.LOTTERY + elif name == "shortest_queue": + return cls.SHORTEST_QUEUE + else: + raise ValueError(f"Invalid dispatch method") + + +@dataclasses.dataclass +class WorkerInfo: + model_names: List[str] + speed: int + queue_length: int + check_heart_beat: bool + last_heart_beat: str + + +def heart_beat_controller(controller): + while True: + time.sleep(CONTROLLER_HEART_BEAT_EXPIRATION) + controller.remove_stable_workers_by_expiration() + + +class Controller: + def __init__(self, dispatch_method: str): + # Dict[str -> WorkerInfo] + self.worker_info = {} + self.dispatch_method = DispatchMethod.from_str(dispatch_method) + + self.heart_beat_thread = threading.Thread( + target=heart_beat_controller, args=(self,)) + self.heart_beat_thread.start() + + logger.info("Init controller") + + def register_worker(self, worker_name: str, check_heart_beat: bool, + worker_status: dict): + if worker_name not in self.worker_info: + logger.info(f"Register a new worker: {worker_name}") + else: + logger.info(f"Register an existing worker: {worker_name}") + + if not worker_status: + worker_status = self.get_worker_status(worker_name) + if not worker_status: + return False + + self.worker_info[worker_name] = WorkerInfo( + worker_status["model_names"], worker_status["speed"], worker_status["queue_length"], + check_heart_beat, time.time()) + + logger.info(f"Register done: {worker_name}, {worker_status}") + return True + + def get_worker_status(self, worker_name: str): + try: + r = requests.post(worker_name + "/worker_get_status", timeout=5) + except requests.exceptions.RequestException as e: + logger.error(f"Get status fails: {worker_name}, {e}") + return None + + if r.status_code != 200: + logger.error(f"Get status fails: {worker_name}, {r}") + return None + + return r.json() + + def remove_worker(self, worker_name: str): + del self.worker_info[worker_name] + + def refresh_all_workers(self): + old_info = dict(self.worker_info) + self.worker_info = {} + + for w_name, w_info in old_info.items(): + if not self.register_worker(w_name, w_info.check_heart_beat, None): + logger.info(f"Remove stale worker: {w_name}") + + def list_models(self): + model_names = set() + + for w_name, w_info in self.worker_info.items(): + model_names.update(w_info.model_names) + + return list(model_names) + + def get_worker_address(self, model_name: str): + if self.dispatch_method == DispatchMethod.LOTTERY: + worker_names = [] + worker_speeds = [] + for w_name, w_info in self.worker_info.items(): + if model_name in w_info.model_names: + worker_names.append(w_name) + worker_speeds.append(w_info.speed) + worker_speeds = np.array(worker_speeds, dtype=np.float32) + norm = np.sum(worker_speeds) + if norm < 1e-4: + return "" + worker_speeds = worker_speeds / norm + if True: # Directly return address + pt = np.random.choice(np.arange(len(worker_names)), + p=worker_speeds) + worker_name = worker_names[pt] + return worker_name + + # Check status before returning + while True: + pt = np.random.choice(np.arange(len(worker_names)), + p=worker_speeds) + worker_name = worker_names[pt] + + if self.get_worker_status(worker_name): + break + else: + self.remove_worker(worker_name) + worker_speeds[pt] = 0 + norm = np.sum(worker_speeds) + if norm < 1e-4: + return "" + worker_speeds = worker_speeds / norm + continue + return worker_name + elif self.dispatch_method == DispatchMethod.SHORTEST_QUEUE: + worker_names = [] + worker_qlen = [] + for w_name, w_info in self.worker_info.items(): + if model_name in w_info.model_names: + worker_names.append(w_name) + worker_qlen.append(w_info.queue_length / w_info.speed) + if len(worker_names) == 0: + return "" + min_index = np.argmin(worker_qlen) + w_name = worker_names[min_index] + self.worker_info[w_name].queue_length += 1 + logger.info(f"names: {worker_names}, queue_lens: {worker_qlen}, ret: {w_name}") + return w_name + else: + raise ValueError(f"Invalid dispatch method: {self.dispatch_method}") + + def receive_heart_beat(self, worker_name: str, queue_length: int): + if worker_name not in self.worker_info: + logger.info(f"Receive unknown heart beat. {worker_name}") + return False + + self.worker_info[worker_name].queue_length = queue_length + self.worker_info[worker_name].last_heart_beat = time.time() + logger.info(f"Receive heart beat. {worker_name}") + return True + + def remove_stable_workers_by_expiration(self): + expire = time.time() - CONTROLLER_HEART_BEAT_EXPIRATION + to_delete = [] + for worker_name, w_info in self.worker_info.items(): + if w_info.check_heart_beat and w_info.last_heart_beat < expire: + to_delete.append(worker_name) + + for worker_name in to_delete: + self.remove_worker(worker_name) + + def worker_api_generate_stream(self, params): + worker_addr = self.get_worker_address(params["model"]) + if not worker_addr: + logger.info(f"no worker: {params['model']}") + ret = { + "text": server_error_msg, + "error_code": 2, + } + yield json.dumps(ret).encode() + b"\0" + + try: + response = requests.post(worker_addr + "/worker_generate_stream", + json=params, stream=True, timeout=5) + for chunk in response.iter_lines(decode_unicode=False, delimiter=b"\0"): + if chunk: + yield chunk + b"\0" + except requests.exceptions.RequestException as e: + logger.info(f"worker timeout: {worker_addr}") + ret = { + "text": server_error_msg, + "error_code": 3, + } + yield json.dumps(ret).encode() + b"\0" + + + # Let the controller act as a worker to achieve hierarchical + # management. This can be used to connect isolated sub networks. + def worker_api_get_status(self): + model_names = set() + speed = 0 + queue_length = 0 + + for w_name in self.worker_info: + worker_status = self.get_worker_status(w_name) + if worker_status is not None: + model_names.update(worker_status["model_names"]) + speed += worker_status["speed"] + queue_length += worker_status["queue_length"] + + return { + "model_names": list(model_names), + "speed": speed, + "queue_length": queue_length, + } + + +app = FastAPI() + + +@app.post("/register_worker") +async def register_worker(request: Request): + data = await request.json() + controller.register_worker( + data["worker_name"], data["check_heart_beat"], + data.get("worker_status", None)) + + +@app.post("/refresh_all_workers") +async def refresh_all_workers(): + models = controller.refresh_all_workers() + + +@app.post("/list_models") +async def list_models(): + models = controller.list_models() + return {"models": models} + + +@app.post("/get_worker_address") +async def get_worker_address(request: Request): + data = await request.json() + addr = controller.get_worker_address(data["model"]) + return {"address": addr} + + +@app.post("/receive_heart_beat") +async def receive_heart_beat(request: Request): + data = await request.json() + exist = controller.receive_heart_beat( + data["worker_name"], data["queue_length"]) + return {"exist": exist} + + +@app.post("/worker_generate_stream") +async def worker_api_generate_stream(request: Request): + params = await request.json() + generator = controller.worker_api_generate_stream(params) + return StreamingResponse(generator) + + +@app.post("/worker_get_status") +async def worker_api_get_status(request: Request): + return controller.worker_api_get_status() + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--host", type=str, default="localhost") + parser.add_argument("--port", type=int, default=21001) + parser.add_argument("--dispatch-method", type=str, choices=[ + "lottery", "shortest_queue"], default="shortest_queue") + args = parser.parse_args() + logger.info(f"args: {args}") + + controller = Controller(args.dispatch_method) + uvicorn.run(app, host=args.host, port=args.port, log_level="info") diff --git a/LLAVA_Biovil/llava/serve/examples/extreme_ironing.jpg b/LLAVA_Biovil/llava/serve/examples/extreme_ironing.jpg new file mode 100644 index 0000000000000000000000000000000000000000..638b078837f175039b2db49a63821288d9681daa Binary files /dev/null and b/LLAVA_Biovil/llava/serve/examples/extreme_ironing.jpg differ diff --git a/LLAVA_Biovil/llava/serve/examples/waterview.jpg b/LLAVA_Biovil/llava/serve/examples/waterview.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6f44ebaba1aa493b8bab3baa4e827b76752b1869 Binary files /dev/null and b/LLAVA_Biovil/llava/serve/examples/waterview.jpg differ diff --git a/LLAVA_Biovil/llava/serve/gradio_web_server.py b/LLAVA_Biovil/llava/serve/gradio_web_server.py new file mode 100644 index 0000000000000000000000000000000000000000..66661861690e0313c32de8b5b5175c5c807d13fe --- /dev/null +++ b/LLAVA_Biovil/llava/serve/gradio_web_server.py @@ -0,0 +1,470 @@ +import argparse +import datetime +import json +import os +import time + +import gradio as gr +import requests + +from llava.conversation import (default_conversation, conv_templates, + SeparatorStyle) +from llava.constants import LOGDIR +from llava.utils import (build_logger, server_error_msg, + violates_moderation, moderation_msg) +import hashlib + + +logger = build_logger("gradio_web_server", "gradio_web_server.log") + +headers = {"User-Agent": "LLaVA Client"} + +no_change_btn = gr.Button.update() +enable_btn = gr.Button.update(interactive=True) +disable_btn = gr.Button.update(interactive=False) + +priority = { + "vicuna-13b": "aaaaaaa", + "koala-13b": "aaaaaab", +} + + +def get_conv_log_filename(): + t = datetime.datetime.now() + name = os.path.join(LOGDIR, f"{t.year}-{t.month:02d}-{t.day:02d}-conv.json") + return name + + +def get_model_list(): + ret = requests.post(args.controller_url + "/refresh_all_workers") + assert ret.status_code == 200 + ret = requests.post(args.controller_url + "/list_models") + models = ret.json()["models"] + models.sort(key=lambda x: priority.get(x, x)) + logger.info(f"Models: {models}") + return models + + +get_window_url_params = """ +function() { + const params = new URLSearchParams(window.location.search); + url_params = Object.fromEntries(params); + console.log(url_params); + return url_params; + } +""" + + +def load_demo(url_params, request: gr.Request): + logger.info(f"load_demo. ip: {request.client.host}. params: {url_params}") + + dropdown_update = gr.Dropdown.update(visible=True) + if "model" in url_params: + model = url_params["model"] + if model in models: + dropdown_update = gr.Dropdown.update( + value=model, visible=True) + + state = default_conversation.copy() + return state, dropdown_update + + +def load_demo_refresh_model_list(request: gr.Request): + logger.info(f"load_demo. ip: {request.client.host}") + models = get_model_list() + state = default_conversation.copy() + dropdown_update = gr.Dropdown.update( + choices=models, + value=models[0] if len(models) > 0 else "" + ) + return state, dropdown_update + + +def vote_last_response(state, vote_type, model_selector, request: gr.Request): + with open(get_conv_log_filename(), "a") as fout: + data = { + "tstamp": round(time.time(), 4), + "type": vote_type, + "model": model_selector, + "state": state.dict(), + "ip": request.client.host, + } + fout.write(json.dumps(data) + "\n") + + +def upvote_last_response(state, model_selector, request: gr.Request): + logger.info(f"upvote. ip: {request.client.host}") + vote_last_response(state, "upvote", model_selector, request) + return ("",) + (disable_btn,) * 3 + + +def downvote_last_response(state, model_selector, request: gr.Request): + logger.info(f"downvote. ip: {request.client.host}") + vote_last_response(state, "downvote", model_selector, request) + return ("",) + (disable_btn,) * 3 + + +def flag_last_response(state, model_selector, request: gr.Request): + logger.info(f"flag. ip: {request.client.host}") + vote_last_response(state, "flag", model_selector, request) + return ("",) + (disable_btn,) * 3 + + +def regenerate(state, image_process_mode, request: gr.Request): + logger.info(f"regenerate. ip: {request.client.host}") + state.messages[-1][-1] = None + prev_human_msg = state.messages[-2] + if type(prev_human_msg[1]) in (tuple, list): + prev_human_msg[1] = (*prev_human_msg[1][:2], image_process_mode) + state.skip_next = False + return (state, state.to_gradio_chatbot(), "", None) + (disable_btn,) * 5 + + +def clear_history(request: gr.Request): + logger.info(f"clear_history. ip: {request.client.host}") + state = default_conversation.copy() + return (state, state.to_gradio_chatbot(), "", None) + (disable_btn,) * 5 + + +def add_text(state, text, image, image_process_mode, request: gr.Request): + logger.info(f"add_text. ip: {request.client.host}. len: {len(text)}") + if len(text) <= 0 and image is None: + state.skip_next = True + return (state, state.to_gradio_chatbot(), "", None) + (no_change_btn,) * 5 + if args.moderate: + flagged = violates_moderation(text) + if flagged: + state.skip_next = True + return (state, state.to_gradio_chatbot(), moderation_msg, None) + ( + no_change_btn,) * 5 + + text = text[:1536] # Hard cut-off + if image is not None: + text = text[:1200] # Hard cut-off for images + if '' not in text: + # text = '' + text + text = text + '\n' + text = (text, image, image_process_mode) + if len(state.get_images(return_pil=True)) > 0: + state = default_conversation.copy() + state.append_message(state.roles[0], text) + state.append_message(state.roles[1], None) + state.skip_next = False + return (state, state.to_gradio_chatbot(), "", None) + (disable_btn,) * 5 + + +def http_bot(state, model_selector, temperature, top_p, max_new_tokens, request: gr.Request): + logger.info(f"http_bot. ip: {request.client.host}") + start_tstamp = time.time() + model_name = model_selector + + if state.skip_next: + # This generate call is skipped due to invalid inputs + yield (state, state.to_gradio_chatbot()) + (no_change_btn,) * 5 + return + + if len(state.messages) == state.offset + 2: + # First round of conversation + if "llava" in model_name.lower(): + if 'llama-2' in model_name.lower(): + template_name = "llava_llama_2" + elif "v1" in model_name.lower(): + if 'mmtag' in model_name.lower(): + template_name = "v1_mmtag" + elif 'plain' in model_name.lower() and 'finetune' not in model_name.lower(): + template_name = "v1_mmtag" + else: + template_name = "llava_v1" + elif "mpt" in model_name.lower(): + template_name = "mpt" + else: + if 'mmtag' in model_name.lower(): + template_name = "v0_mmtag" + elif 'plain' in model_name.lower() and 'finetune' not in model_name.lower(): + template_name = "v0_mmtag" + else: + template_name = "llava_v0" + elif "mpt" in model_name: + template_name = "mpt_text" + elif "llama-2" in model_name: + template_name = "llama_2" + else: + template_name = "vicuna_v1" + new_state = conv_templates[template_name].copy() + new_state.append_message(new_state.roles[0], state.messages[-2][1]) + new_state.append_message(new_state.roles[1], None) + state = new_state + + # Query worker address + controller_url = args.controller_url + ret = requests.post(controller_url + "/get_worker_address", + json={"model": model_name}) + worker_addr = ret.json()["address"] + logger.info(f"model_name: {model_name}, worker_addr: {worker_addr}") + + # No available worker + if worker_addr == "": + state.messages[-1][-1] = server_error_msg + yield (state, state.to_gradio_chatbot(), disable_btn, disable_btn, disable_btn, enable_btn, enable_btn) + return + + # Construct prompt + prompt = state.get_prompt() + + all_images = state.get_images(return_pil=True) + all_image_hash = [hashlib.md5(image.tobytes()).hexdigest() for image in all_images] + for image, hash in zip(all_images, all_image_hash): + t = datetime.datetime.now() + filename = os.path.join(LOGDIR, "serve_images", f"{t.year}-{t.month:02d}-{t.day:02d}", f"{hash}.jpg") + if not os.path.isfile(filename): + os.makedirs(os.path.dirname(filename), exist_ok=True) + image.save(filename) + + # Make requests + pload = { + "model": model_name, + "prompt": prompt, + "temperature": float(temperature), + "top_p": float(top_p), + "max_new_tokens": min(int(max_new_tokens), 1536), + "stop": state.sep if state.sep_style in [SeparatorStyle.SINGLE, SeparatorStyle.MPT] else state.sep2, + "images": f'List of {len(state.get_images())} images: {all_image_hash}', + } + logger.info(f"==== request ====\n{pload}") + + pload['images'] = state.get_images() + + state.messages[-1][-1] = "▌" + yield (state, state.to_gradio_chatbot()) + (disable_btn,) * 5 + + try: + # Stream output + response = requests.post(worker_addr + "/worker_generate_stream", + headers=headers, json=pload, stream=True, timeout=10) + for chunk in response.iter_lines(decode_unicode=False, delimiter=b"\0"): + if chunk: + data = json.loads(chunk.decode()) + if data["error_code"] == 0: + output = data["text"][len(prompt):].strip() + state.messages[-1][-1] = output + "▌" + yield (state, state.to_gradio_chatbot()) + (disable_btn,) * 5 + else: + output = data["text"] + f" (error_code: {data['error_code']})" + state.messages[-1][-1] = output + yield (state, state.to_gradio_chatbot()) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn) + return + time.sleep(0.03) + except requests.exceptions.RequestException as e: + state.messages[-1][-1] = server_error_msg + yield (state, state.to_gradio_chatbot()) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn) + return + + state.messages[-1][-1] = state.messages[-1][-1][:-1] + yield (state, state.to_gradio_chatbot()) + (enable_btn,) * 5 + + finish_tstamp = time.time() + logger.info(f"{output}") + + with open(get_conv_log_filename(), "a") as fout: + data = { + "tstamp": round(finish_tstamp, 4), + "type": "chat", + "model": model_name, + "start": round(start_tstamp, 4), + "finish": round(finish_tstamp, 4), + "state": state.dict(), + "images": all_image_hash, + "ip": request.client.host, + } + fout.write(json.dumps(data) + "\n") + +title_markdown = (""" +# 🌋 LLaVA: Large Language and Vision Assistant +[[Project Page](https://llava-vl.github.io)] [[Code](https://github.com/haotian-liu/LLaVA)] [[Model](https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZOO.md)] | 📚 [[LLaVA](https://arxiv.org/abs/2304.08485)] [[LLaVA-v1.5](https://arxiv.org/abs/2310.03744)] +""") + +tos_markdown = (""" +### Terms of use +By using this service, users are required to agree to the following terms: +The service is a research preview intended for non-commercial use only. It only provides limited safety measures and may generate offensive content. It must not be used for any illegal, harmful, violent, racist, or sexual purposes. The service may collect user dialogue data for future research. +Please click the "Flag" button if you get any inappropriate answer! We will collect those to keep improving our moderator. +For an optimal experience, please use desktop computers for this demo, as mobile devices may compromise its quality. +""") + + +learn_more_markdown = (""" +### License +The service is a research preview intended for non-commercial use only, subject to the model [License](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md) of LLaMA, [Terms of Use](https://openai.com/policies/terms-of-use) of the data generated by OpenAI, and [Privacy Practices](https://chrome.google.com/webstore/detail/sharegpt-share-your-chatg/daiacboceoaocpibfodeljbdfacokfjb) of ShareGPT. Please contact us if you find any potential violation. +""") + +block_css = """ + +#buttons button { + min-width: min(120px,100%); +} + +""" + +def build_demo(embed_mode): + textbox = gr.Textbox(show_label=False, placeholder="Enter text and press ENTER", container=False) + with gr.Blocks(title="LLaVA", theme=gr.themes.Default(), css=block_css) as demo: + state = gr.State() + + if not embed_mode: + gr.Markdown(title_markdown) + + with gr.Row(): + with gr.Column(scale=3): + with gr.Row(elem_id="model_selector_row"): + model_selector = gr.Dropdown( + choices=models, + value=models[0] if len(models) > 0 else "", + interactive=True, + show_label=False, + container=False) + + imagebox = gr.Image(type="pil") + image_process_mode = gr.Radio( + ["Crop", "Resize", "Pad", "Default"], + value="Default", + label="Preprocess for non-square image", visible=False) + + cur_dir = os.path.dirname(os.path.abspath(__file__)) + gr.Examples(examples=[ + [f"{cur_dir}/examples/extreme_ironing.jpg", "What is unusual about this image?"], + [f"{cur_dir}/examples/waterview.jpg", "What are the things I should be cautious about when I visit here?"], + ], inputs=[imagebox, textbox]) + + with gr.Accordion("Parameters", open=False) as parameter_row: + temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.1, interactive=True, label="Temperature",) + top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, step=0.1, interactive=True, label="Top P",) + max_output_tokens = gr.Slider(minimum=0, maximum=1024, value=512, step=64, interactive=True, label="Max output tokens",) + + with gr.Column(scale=8): + chatbot = gr.Chatbot(elem_id="chatbot", label="LLaVA Chatbot", height=550) + with gr.Row(): + with gr.Column(scale=8): + textbox.render() + with gr.Column(scale=1, min_width=50): + submit_btn = gr.Button(value="Send", variant="primary") + with gr.Row(elem_id="buttons") as button_row: + upvote_btn = gr.Button(value="👍 Upvote", interactive=False) + downvote_btn = gr.Button(value="👎 Downvote", interactive=False) + flag_btn = gr.Button(value="⚠️ Flag", interactive=False) + #stop_btn = gr.Button(value="⏹️ Stop Generation", interactive=False) + regenerate_btn = gr.Button(value="🔄 Regenerate", interactive=False) + clear_btn = gr.Button(value="🗑️ Clear", interactive=False) + + if not embed_mode: + gr.Markdown(tos_markdown) + gr.Markdown(learn_more_markdown) + url_params = gr.JSON(visible=False) + + # Register listeners + btn_list = [upvote_btn, downvote_btn, flag_btn, regenerate_btn, clear_btn] + upvote_btn.click( + upvote_last_response, + [state, model_selector], + [textbox, upvote_btn, downvote_btn, flag_btn], + queue=False + ) + downvote_btn.click( + downvote_last_response, + [state, model_selector], + [textbox, upvote_btn, downvote_btn, flag_btn], + queue=False + ) + flag_btn.click( + flag_last_response, + [state, model_selector], + [textbox, upvote_btn, downvote_btn, flag_btn], + queue=False + ) + + regenerate_btn.click( + regenerate, + [state, image_process_mode], + [state, chatbot, textbox, imagebox] + btn_list, + queue=False + ).then( + http_bot, + [state, model_selector, temperature, top_p, max_output_tokens], + [state, chatbot] + btn_list + ) + + clear_btn.click( + clear_history, + None, + [state, chatbot, textbox, imagebox] + btn_list, + queue=False + ) + + textbox.submit( + add_text, + [state, textbox, imagebox, image_process_mode], + [state, chatbot, textbox, imagebox] + btn_list, + queue=False + ).then( + http_bot, + [state, model_selector, temperature, top_p, max_output_tokens], + [state, chatbot] + btn_list + ) + + submit_btn.click( + add_text, + [state, textbox, imagebox, image_process_mode], + [state, chatbot, textbox, imagebox] + btn_list, + queue=False + ).then( + http_bot, + [state, model_selector, temperature, top_p, max_output_tokens], + [state, chatbot] + btn_list + ) + + if args.model_list_mode == "once": + demo.load( + load_demo, + [url_params], + [state, model_selector], + _js=get_window_url_params, + queue=False + ) + elif args.model_list_mode == "reload": + demo.load( + load_demo_refresh_model_list, + None, + [state, model_selector], + queue=False + ) + else: + raise ValueError(f"Unknown model list mode: {args.model_list_mode}") + + return demo + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--host", type=str, default="0.0.0.0") + parser.add_argument("--port", type=int) + parser.add_argument("--controller-url", type=str, default="http://localhost:21001") + parser.add_argument("--concurrency-count", type=int, default=10) + parser.add_argument("--model-list-mode", type=str, default="once", + choices=["once", "reload"]) + parser.add_argument("--share", action="store_true") + parser.add_argument("--moderate", action="store_true") + parser.add_argument("--embed", action="store_true") + args = parser.parse_args() + logger.info(f"args: {args}") + + models = get_model_list() + + logger.info(args) + demo = build_demo(args.embed) + demo.queue( + concurrency_count=args.concurrency_count, + api_open=False + ).launch( + server_name=args.host, + server_port=args.port, + share=args.share + ) diff --git a/LLAVA_Biovil/llava/serve/model_worker.py b/LLAVA_Biovil/llava/serve/model_worker.py new file mode 100644 index 0000000000000000000000000000000000000000..7633defc5646a9139eee0ed0472370ed5e405970 --- /dev/null +++ b/LLAVA_Biovil/llava/serve/model_worker.py @@ -0,0 +1,310 @@ +""" +A model worker executes the model. +""" +import argparse +import asyncio +import json +import time +import threading +import uuid + +from fastapi import FastAPI, Request, BackgroundTasks +from fastapi.responses import StreamingResponse +import requests +import torch +import uvicorn +from functools import partial + +from llava.constants import WORKER_HEART_BEAT_INTERVAL +from llava.utils import (build_logger, server_error_msg, + pretty_print_semaphore) +from llava.model.builder import load_pretrained_model +from llava.mm_utils import process_images, load_image_from_base64, tokenizer_image_token, KeywordsStoppingCriteria, process_image_biovil, \ + load_image_from_base64_biovil +from llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from transformers import TextIteratorStreamer +from threading import Thread + +from torchvision.transforms import Compose, Resize, ToTensor, CenterCrop, transforms + +from test import ExpandChannels + +GB = 1 << 30 + +worker_id = str(uuid.uuid4())[:6] +logger = build_logger("model_worker", f"model_worker_{worker_id}.log") +global_counter = 0 + +model_semaphore = None + + +def heart_beat_worker(controller): + + while True: + time.sleep(WORKER_HEART_BEAT_INTERVAL) + controller.send_heart_beat() + + +class ModelWorker: + def __init__(self, controller_addr, worker_addr, + worker_id, no_register, + model_path, model_base, model_name, + load_8bit, load_4bit, device, vision_tower): + self.controller_addr = controller_addr + self.worker_addr = worker_addr + self.worker_id = worker_id + if model_path.endswith("/"): + model_path = model_path[:-1] + if model_name is None: + model_paths = model_path.split("/") + if model_paths[-1].startswith('checkpoint-'): + self.model_name = model_paths[-2] + "_" + model_paths[-1] + else: + self.model_name = model_paths[-1] + else: + self.model_name = model_name + + self.device = device + logger.info(f"Loading the model {self.model_name} on worker {worker_id} ...") + self.tokenizer, self.model, self.image_processor, self.context_len = load_pretrained_model( + model_path, model_base, self.model_name, load_8bit, load_4bit, device=self.device) + self.is_multimodal = 'llava' in self.model_name.lower() + + if not no_register: + self.register_to_controller() + self.heart_beat_thread = threading.Thread( + target=heart_beat_worker, args=(self,)) + self.heart_beat_thread.start() + + self.vision_tower = vision_tower + self.vis_transforms_biovil = self.create_chest_xray_transform_for_inference(512, center_crop_size=448) + + def create_chest_xray_transform_for_inference(self, resize: int, center_crop_size: int) -> Compose: + """ + Defines the image transformation pipeline for Chest-Xray datasets. + + :param resize: The size to resize the image to. Linear resampling is used. + Resizing is applied on the axis with smaller shape. + :param center_crop_size: The size to center crop the image to. Square crop is applied. + """ + + transforms = [Resize(resize), CenterCrop(center_crop_size), ToTensor(), ExpandChannels()] + return Compose(transforms) + + def register_to_controller(self): + logger.info("Register to controller") + + url = self.controller_addr + "/register_worker" + data = { + "worker_name": self.worker_addr, + "check_heart_beat": True, + "worker_status": self.get_status() + } + r = requests.post(url, json=data) + assert r.status_code == 200 + + def send_heart_beat(self): + logger.info(f"Send heart beat. Models: {[self.model_name]}. " + f"Semaphore: {pretty_print_semaphore(model_semaphore)}. " + f"global_counter: {global_counter}") + + url = self.controller_addr + "/receive_heart_beat" + + while True: + try: + ret = requests.post(url, json={ + "worker_name": self.worker_addr, + "queue_length": self.get_queue_length()}, timeout=5) + exist = ret.json()["exist"] + break + except requests.exceptions.RequestException as e: + logger.error(f"heart beat error: {e}") + time.sleep(5) + + if not exist: + self.register_to_controller() + + def get_queue_length(self): + if model_semaphore is None: + return 0 + else: + return args.limit_model_concurrency - model_semaphore._value + (len( + model_semaphore._waiters) if model_semaphore._waiters is not None else 0) + + def get_status(self): + return { + "model_names": [self.model_name], + "speed": 1, + "queue_length": self.get_queue_length(), + } + + @torch.inference_mode() + def generate_stream(self, params): + tokenizer, model, image_processor = self.tokenizer, self.model, self.image_processor + + prompt = params["prompt"] + ori_prompt = prompt + images = params.get("images", None) + num_image_tokens = 0 + if images is not None and len(images) > 0 and self.is_multimodal: + if len(images) > 0: + if len(images) != prompt.count(DEFAULT_IMAGE_TOKEN): + raise ValueError("Number of images does not match number of tokens in prompt") + + if self.vision_tower == 'biovil': + images = [load_image_from_base64_biovil(image) for image in images] + images = process_image_biovil(images, self.vis_transforms_biovil) + else: + images = [load_image_from_base64(image) for image in images] + images = process_images(images, image_processor, model.config) + + if type(images) is list: + images = [image.to(self.model.device, dtype=torch.bfloat16) for image in images] + else: + images = images.to(self.model.device, dtype=torch.bfloat16) + + replace_token = DEFAULT_IMAGE_TOKEN + if getattr(self.model.config, 'mm_use_im_start_end', False): + replace_token = DEFAULT_IM_START_TOKEN + replace_token + DEFAULT_IM_END_TOKEN + prompt = prompt.replace(DEFAULT_IMAGE_TOKEN, replace_token) + + num_image_tokens = prompt.count(replace_token) * 196 if self.vision_tower == 'biovil' else prompt.count(replace_token) * model.get_vision_tower().num_patches + else: + images = None + image_args = {"images": images} + else: + images = None + image_args = {} + + temperature = float(params.get("temperature", 1.0)) + top_p = float(params.get("top_p", 1.0)) + max_context_length = getattr(model.config, 'max_position_embeddings', 2048) + max_new_tokens = min(int(params.get("max_new_tokens", 256)), 1024) + stop_str = params.get("stop", None) + do_sample = True if temperature > 0.001 else False + + input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).to(self.device) + keywords = [stop_str] + stopping_criteria = KeywordsStoppingCriteria(keywords, tokenizer, input_ids) + streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True, timeout=15) + + max_new_tokens = min(max_new_tokens, max_context_length - input_ids.shape[-1] - num_image_tokens) + + if max_new_tokens < 1: + yield json.dumps({"text": ori_prompt + "Exceeds max token length. Please start a new conversation, thanks.", "error_code": 0}).encode() + b"\0" + return + + thread = Thread(target=model.generate, kwargs=dict( + inputs=input_ids, + do_sample=do_sample, + temperature=temperature, + top_p=top_p, + max_new_tokens=max_new_tokens, + streamer=streamer, + stopping_criteria=[stopping_criteria], + use_cache=True, + **image_args + )) + thread.start() + + generated_text = ori_prompt + for new_text in streamer: + generated_text += new_text + if generated_text.endswith(stop_str): + generated_text = generated_text[:-len(stop_str)] + yield json.dumps({"text": generated_text, "error_code": 0}).encode() + b"\0" + + def generate_stream_gate(self, params): + try: + for x in self.generate_stream(params): + yield x + except ValueError as e: + print("Caught ValueError:", e) + ret = { + "text": server_error_msg, + "error_code": 1, + } + yield json.dumps(ret).encode() + b"\0" + except torch.cuda.CudaError as e: + print("Caught torch.cuda.CudaError:", e) + ret = { + "text": server_error_msg, + "error_code": 1, + } + yield json.dumps(ret).encode() + b"\0" + except Exception as e: + print("Caught Unknown Error", e) + ret = { + "text": server_error_msg, + "error_code": 1, + } + yield json.dumps(ret).encode() + b"\0" + + +app = FastAPI() + + +def release_model_semaphore(fn=None): + model_semaphore.release() + if fn is not None: + fn() + + +@app.post("/worker_generate_stream") +async def generate_stream(request: Request): + global model_semaphore, global_counter + global_counter += 1 + params = await request.json() + + if model_semaphore is None: + model_semaphore = asyncio.Semaphore(args.limit_model_concurrency) + await model_semaphore.acquire() + worker.send_heart_beat() + generator = worker.generate_stream_gate(params) + background_tasks = BackgroundTasks() + background_tasks.add_task(partial(release_model_semaphore, fn=worker.send_heart_beat)) + return StreamingResponse(generator, background=background_tasks) + + +@app.post("/worker_get_status") +async def get_status(request: Request): + return worker.get_status() + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--host", type=str, default="localhost") + parser.add_argument("--port", type=int, default=21002) + parser.add_argument("--worker-address", type=str, + default="http://localhost:21002") + parser.add_argument("--controller-address", type=str, + default="http://localhost:21001") + parser.add_argument("--model-path", type=str, default="facebook/opt-350m") + parser.add_argument("--model-base", type=str, default=None) + parser.add_argument("--model-name", type=str) + parser.add_argument("--device", type=str, default="cuda") + parser.add_argument("--multi-modal", action="store_true", help="Multimodal mode is automatically detected with model name, please make sure `llava` is included in the model path.") + parser.add_argument("--limit-model-concurrency", type=int, default=5) + parser.add_argument("--stream-interval", type=int, default=1) + parser.add_argument("--no-register", action="store_true") + parser.add_argument("--load-8bit", action="store_true") + parser.add_argument("--load-4bit", action="store_true") + parser.add_argument("--vision_tower", type=str, default="openai/clip-vit-large-patch14-336") + args = parser.parse_args() + logger.info(f"args: {args}") + + if args.multi_modal: + logger.warning("Multimodal mode is automatically detected with model name, please make sure `llava` is included in the model path.") + + worker = ModelWorker(args.controller_address, + args.worker_address, + worker_id, + args.no_register, + args.model_path, + args.model_base, + args.model_name, + args.load_8bit, + args.load_4bit, + args.device, + args.vision_tower) + uvicorn.run(app, host=args.host, port=args.port, log_level="info") diff --git a/LLAVA_Biovil/llava/serve/register_worker.py b/LLAVA_Biovil/llava/serve/register_worker.py new file mode 100644 index 0000000000000000000000000000000000000000..2c2c40295e0351f25709ba25554c9329f15bf0d2 --- /dev/null +++ b/LLAVA_Biovil/llava/serve/register_worker.py @@ -0,0 +1,26 @@ +""" +Manually register workers. + +Usage: +python3 -m fastchat.serve.register_worker --controller http://localhost:21001 --worker-name http://localhost:21002 +""" + +import argparse + +import requests + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--controller-address", type=str) + parser.add_argument("--worker-name", type=str) + parser.add_argument("--check-heart-beat", action="store_true") + args = parser.parse_args() + + url = args.controller_address + "/register_worker" + data = { + "worker_name": args.worker_name, + "check_heart_beat": args.check_heart_beat, + "worker_status": None, + } + r = requests.post(url, json=data) + assert r.status_code == 200 diff --git a/LLAVA_Biovil/llava/serve/test_message.py b/LLAVA_Biovil/llava/serve/test_message.py new file mode 100644 index 0000000000000000000000000000000000000000..f01c4edc40536408cc3411921aebacfd4e0b62de --- /dev/null +++ b/LLAVA_Biovil/llava/serve/test_message.py @@ -0,0 +1,62 @@ +import argparse +import json + +import requests + +from LLAV.llava.conversation import default_conversation + + +def main(): + if args.worker_address: + worker_addr = args.worker_address + else: + controller_addr = args.controller_address + ret = requests.post(controller_addr + "/refresh_all_workers") + ret = requests.post(controller_addr + "/list_models") + models = ret.json()["models"] + models.sort() + print(f"Models: {models}") + + ret = requests.post(controller_addr + "/get_worker_address", + json={"model": args.model_name}) + worker_addr = ret.json()["address"] + print(f"worker_addr: {worker_addr}") + + if worker_addr == "": + return + + conv = default_conversation.copy() + conv.append_message(conv.roles[0], args.message) + prompt = conv.get_prompt() + + headers = {"User-Agent": "LLaVA Client"} + pload = { + "model": args.model_name, + "prompt": prompt, + "max_new_tokens": args.max_new_tokens, + "temperature": 0.7, + "stop": conv.sep, + } + response = requests.post(worker_addr + "/worker_generate_stream", headers=headers, + json=pload, stream=True) + + print(prompt.replace(conv.sep, "\n"), end="") + for chunk in response.iter_lines(chunk_size=8192, decode_unicode=False, delimiter=b"\0"): + if chunk: + data = json.loads(chunk.decode("utf-8")) + output = data["text"].split(conv.sep)[-1] + print(output, end="\r") + print("") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--controller-address", type=str, default="http://localhost:21001") + parser.add_argument("--worker-address", type=str) + parser.add_argument("--model-name", type=str, default="facebook/opt-350m") + parser.add_argument("--max-new-tokens", type=int, default=32) + parser.add_argument("--message", type=str, default= + "Tell me a story with more than 1000 words.") + args = parser.parse_args() + + main() diff --git a/LLAVA_Biovil/llava/train/__init__.py b/LLAVA_Biovil/llava/train/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LLAVA_Biovil/llava/train/llama_flash_attn_monkey_patch.py b/LLAVA_Biovil/llava/train/llama_flash_attn_monkey_patch.py new file mode 100644 index 0000000000000000000000000000000000000000..31db2eff8d1c4b3ae645583dfc5e156e818b6f1c --- /dev/null +++ b/LLAVA_Biovil/llava/train/llama_flash_attn_monkey_patch.py @@ -0,0 +1,115 @@ +from typing import Optional, Tuple +import warnings + +import torch + +import transformers +from transformers.models.llama.modeling_llama import apply_rotary_pos_emb, repeat_kv + +try: + from flash_attn.flash_attn_interface import flash_attn_unpadded_qkvpacked_func +except ImportError: + from flash_attn.flash_attn_interface import flash_attn_varlen_qkvpacked_func as flash_attn_unpadded_qkvpacked_func +from flash_attn.bert_padding import unpad_input, pad_input + + +def forward( + self, + hidden_states: torch.Tensor, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.Tensor] = None, + past_key_value: Optional[Tuple[torch.Tensor]] = None, + output_attentions: bool = False, + use_cache: bool = False, +) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]: + if output_attentions: + warnings.warn( + "Output attentions is not supported for patched `LlamaAttention`, returning `None` instead." + ) + + bsz, q_len, _ = hidden_states.size() + + query_states = ( + self.q_proj(hidden_states) + .view(bsz, q_len, self.num_heads, self.head_dim) + .transpose(1, 2) + ) + key_states = ( + self.k_proj(hidden_states) + .view(bsz, q_len, self.num_key_value_heads, self.head_dim) + .transpose(1, 2) + ) + value_states = ( + self.v_proj(hidden_states) + .view(bsz, q_len, self.num_key_value_heads, self.head_dim) + .transpose(1, 2) + ) # shape: (b, num_heads, s, head_dim) + + kv_seq_len = key_states.shape[-2] + if past_key_value is not None: + kv_seq_len += past_key_value[0].shape[-2] + + cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len) + query_states, key_states = apply_rotary_pos_emb( + query_states, key_states, cos, sin, position_ids + ) + + if past_key_value is not None: + # reuse k, v + key_states = torch.cat([past_key_value[0], key_states], dim=2) + value_states = torch.cat([past_key_value[1], value_states], dim=2) + + past_key_value = (key_states, value_states) if use_cache else None + + # repeat k/v heads if n_kv_heads < n_heads + key_states = repeat_kv(key_states, self.num_key_value_groups) + value_states = repeat_kv(value_states, self.num_key_value_groups) + + # Transform the data into the format required by flash attention + qkv = torch.stack([query_states, key_states, value_states], dim=2) + qkv = qkv.transpose(1, 3) # shape: [b, s, 3, num_heads, head_dim] + key_padding_mask = attention_mask + + if key_padding_mask is None: + qkv = qkv.reshape(-1, 3, self.num_heads, self.head_dim) + cu_q_lens = torch.arange( + 0, (bsz + 1) * q_len, step=q_len, dtype=torch.int32, device=qkv.device + ) + max_s = q_len + output = flash_attn_unpadded_qkvpacked_func( + qkv, cu_q_lens, max_s, 0.0, softmax_scale=None, causal=True + ) + output = output.view(bsz, q_len, -1) + else: + qkv = qkv.reshape(bsz, q_len, -1) + qkv, indices, cu_q_lens, max_s = unpad_input(qkv, key_padding_mask) + qkv = qkv.view(-1, 3, self.num_heads, self.head_dim) + output_unpad = flash_attn_unpadded_qkvpacked_func( + qkv, cu_q_lens, max_s, 0.0, softmax_scale=None, causal=True + ) + output_unpad = output_unpad.reshape(-1, self.num_heads * self.head_dim) + output = pad_input(output_unpad, indices, bsz, q_len) + + return self.o_proj(output), None, past_key_value + + +# Disable the transformation of the attention mask in LlamaModel as the flash attention +# requires the attention mask to be the same as the key_padding_mask +def _prepare_decoder_attention_mask( + self, attention_mask, input_shape, inputs_embeds, past_key_values_length +): + # [bsz, seq_len] + return attention_mask + + +def replace_llama_attn_with_flash_attn(): + cuda_major, cuda_minor = torch.cuda.get_device_capability() + if cuda_major < 8: + warnings.warn( + "Flash attention is only supported on A100 or H100 GPU during training due to head dim > 64 backward." + "ref: https://github.com/HazyResearch/flash-attention/issues/190#issuecomment-1523359593" + ) + transformers.models.llama.modeling_llama.LlamaModel._prepare_decoder_attention_mask = ( + _prepare_decoder_attention_mask + ) + transformers.models.llama.modeling_llama.LlamaAttention.forward = forward diff --git a/LLAVA_Biovil/llava/train/llama_patch.py b/LLAVA_Biovil/llava/train/llama_patch.py new file mode 100644 index 0000000000000000000000000000000000000000..00d6a7ee09a15c5e8c7cdc49fb89958eb29c03ff --- /dev/null +++ b/LLAVA_Biovil/llava/train/llama_patch.py @@ -0,0 +1,139 @@ +from typing import List, Optional, Tuple + +import torch +from torch import nn +import warnings +import transformers +from transformers.models.llama.modeling_llama import apply_rotary_pos_emb +from peft.tuners.lora import LoraLayer + +try: + from flash_attn.flash_attn_interface import flash_attn_varlen_qkvpacked_func + from flash_attn.bert_padding import unpad_input, pad_input +except Exception: + raise ModuleNotFoundError( + "Please install FlashAttention first, e.g., with pip install flash-attn --no-build-isolation, Learn more at https://github.com/Dao-AILab/flash-attention#installation-and-features" + ) + +try: + from einops import rearrange +except Exception: + raise ModuleNotFoundError("Please install einops first, e.g., with pip install einops") + + +# ADAPTED from https://github.com/allenai/open-instruct/blob/main/open_instruct/llama_flash_attn_monkey_patch.py +# AND https://github.com/lm-sys/FastChat/blob/main/fastchat/train/llama_flash_attn_monkey_patch.py +# AND https://github.com/LAION-AI/Open-Assistant/blob/04fa9a24b2a58c8885b8aa6a2eb02b18de6b4961/model/model_training/models/patching_llama.py +# AND Sourabh https://github.com/huggingface/transformers/commit/ee81bf5aee0d65f005d157c013777e3d27d8d6bf +def forward( + self, + hidden_states: torch.Tensor, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.Tensor] = None, + past_key_value: Optional[Tuple[torch.Tensor]] = None, + output_attentions: bool = False, + use_cache: bool = False, +) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]: + """Input shape: Batch x Time x Channel + + attention_mask: [bsz, q_len] + """ + if output_attentions: + warnings.warn("Output attentions is not supported for patched `LlamaAttention`, returning `None` instead.") + + bsz, q_len, _ = hidden_states.size() + + query_states = self.q_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2) + key_states = self.k_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2) + value_states = self.v_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2) + # [bsz, q_len, nh, hd] + # [bsz, nh, q_len, hd] + + kv_seq_len = key_states.shape[-2] + if past_key_value is not None: + kv_seq_len += past_key_value[0].shape[-2] + cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len) + query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin, position_ids) + + # Past Key value support + if past_key_value is not None: + # reuse k, v, self_attention + key_states = torch.cat([past_key_value[0], key_states], dim=2) + value_states = torch.cat([past_key_value[1], value_states], dim=2) + + past_key_value = (key_states, value_states) if use_cache else None + + # Flash attention codes from + # https://github.com/HazyResearch/flash-attention/blob/main/flash_attn/flash_attention.py + + # transform the data into the format required by flash attention + qkv = torch.stack([query_states, key_states, value_states], dim=2) # [bsz, nh, 3, q_len, hd] + qkv = qkv.transpose(1, 3) # [bsz, q_len, 3, nh, hd] + # We have disabled _prepare_decoder_attention_mask in LlamaModel + # the attention_mask should be the same as the key_padding_mask + key_padding_mask = attention_mask + + if key_padding_mask is None: + qkv = rearrange(qkv, "b s ... -> (b s) ...") + max_s = q_len + cu_q_lens = torch.arange(0, (bsz + 1) * q_len, step=q_len, dtype=torch.int32, device=qkv.device) + output = flash_attn_varlen_qkvpacked_func(qkv, cu_q_lens, max_s, 0.0, softmax_scale=None, causal=True) + output = rearrange(output, "(b s) ... -> b s ...", b=bsz) + else: + nheads = qkv.shape[-2] + x = rearrange(qkv, "b s three h d -> b s (three h d)") + x_unpad, indices, cu_q_lens, max_s = unpad_input(x, key_padding_mask) + x_unpad = rearrange(x_unpad, "nnz (three h d) -> nnz three h d", three=3, h=nheads) + output_unpad = flash_attn_varlen_qkvpacked_func( + x_unpad, cu_q_lens, max_s, 0.0, softmax_scale=None, causal=True + ) + output = rearrange( + pad_input(rearrange(output_unpad, "nnz h d -> nnz (h d)"), indices, bsz, q_len), + "b s (h d) -> b s h d", + h=nheads, + ) + return self.o_proj(rearrange(output, "b s h d -> b s (h d)")), None, past_key_value + + +# Disable the transformation of the attention mask in LlamaModel as the flash attention +# requires the attention mask to be the same as the key_padding_mask +def _prepare_decoder_attention_mask(self, attention_mask, input_shape, inputs_embeds, past_key_values_length): + # [bsz, seq_len] + return attention_mask + + +def replace_attn_with_flash_attn(): + cuda_major, cuda_minor = torch.cuda.get_device_capability() + if cuda_major < 8: + print( + "Flash attention is only supported on Ampere or Hopper GPU during training due to head dim > 64 backward." + "ref: https://github.com/HazyResearch/flash-attention/issues/190#issuecomment-1523359593" + ) + transformers.models.llama.modeling_llama.LlamaModel._prepare_decoder_attention_mask = ( + _prepare_decoder_attention_mask + ) + transformers.models.llama.modeling_llama.LlamaAttention.forward = forward + + +def unplace_flash_attn_with_attn(): + import importlib + import transformers + + print("Reloading llama model, unpatching flash attention") + importlib.reload(transformers.models.llama.modeling_llama) + + +# Adapted from https://github.com/tmm1/axolotl/blob/2eda9e02a9d15a7a3f92b41f257d9844d72fc220/src/axolotl/utils/models.py#L338 +def upcast_layer_for_flash_attention(model, torch_dtype): + # LlamaRMSNorm layers are in fp32 after kbit_training, so we need to + # convert them back to fp16/bf16 for flash-attn compatibility. + for name, module in model.named_modules(): + if isinstance(module, LoraLayer): + module.to(torch_dtype) + if "norm" in name: + module.to(torch_dtype) + if "lm_head" in name or "embed_tokens" in name: + if hasattr(module, "weight"): + module.to(torch_dtype) + + return model diff --git a/LLAVA_Biovil/llava/train/llama_xformers_attn_monkey_patch.py b/LLAVA_Biovil/llava/train/llama_xformers_attn_monkey_patch.py new file mode 100644 index 0000000000000000000000000000000000000000..f8351e41ccd4a64dca237bd8f8be0702b23989dc --- /dev/null +++ b/LLAVA_Biovil/llava/train/llama_xformers_attn_monkey_patch.py @@ -0,0 +1,129 @@ +""" +Directly copied the code from https://raw.githubusercontent.com/oobabooga/text-generation-webui/main/modules/llama_attn_hijack.py and made some adjustments +""" + +import logging +import math +from typing import Optional, Tuple + +import torch +import transformers.models.llama.modeling_llama +from torch import nn + +try: + import xformers.ops +except ImportError: + logging.error("xformers not found! Please install it before trying to use it.") + + +def replace_llama_attn_with_xformers_attn(): + transformers.models.llama.modeling_llama.LlamaAttention.forward = xformers_forward + + +def xformers_forward( + self, + hidden_states: torch.Tensor, + attention_mask: Optional[torch.Tensor] = None, + position_ids: Optional[torch.LongTensor] = None, + past_key_value: Optional[Tuple[torch.Tensor]] = None, + output_attentions: bool = False, + use_cache: bool = False, +) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]: + # pylint: disable=duplicate-code + bsz, q_len, _ = hidden_states.size() + + query_states = ( + self.q_proj(hidden_states) + .view(bsz, q_len, self.num_heads, self.head_dim) + .transpose(1, 2) + ) + key_states = ( + self.k_proj(hidden_states) + .view(bsz, q_len, self.num_heads, self.head_dim) + .transpose(1, 2) + ) + value_states = ( + self.v_proj(hidden_states) + .view(bsz, q_len, self.num_heads, self.head_dim) + .transpose(1, 2) + ) + + kv_seq_len = key_states.shape[-2] + if past_key_value is not None: + kv_seq_len += past_key_value[0].shape[-2] + cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len) + ( + query_states, + key_states, + ) = transformers.models.llama.modeling_llama.apply_rotary_pos_emb( + query_states, key_states, cos, sin, position_ids + ) + # [bsz, nh, t, hd] + + if past_key_value is not None: + # reuse k, v, self_attention + key_states = torch.cat([past_key_value[0], key_states], dim=2) + value_states = torch.cat([past_key_value[1], value_states], dim=2) + + past_key_value = (key_states, value_states) if use_cache else None + + # We only apply xformers optimizations if we don't need to output the whole attention matrix + if not output_attentions: + query_states = query_states.transpose(1, 2) + key_states = key_states.transpose(1, 2) + value_states = value_states.transpose(1, 2) + + # This is a nasty hack. We know attention_mask in transformers is either LowerTriangular or all Zeros. + # We therefore check if one element in the upper triangular portion is zero. If it is, then the mask is all zeros. + if attention_mask is None or attention_mask[0, 0, 0, 1] == 0: + # input and output should be of form (bsz, q_len, num_heads, head_dim) + attn_output = xformers.ops.memory_efficient_attention( + query_states, key_states, value_states, attn_bias=None + ) + else: + # input and output should be of form (bsz, q_len, num_heads, head_dim) + attn_output = xformers.ops.memory_efficient_attention( + query_states, + key_states, + value_states, + attn_bias=xformers.ops.LowerTriangularMask(), + ) + attn_weights = None + else: + attn_weights = torch.matmul( + query_states, key_states.transpose(2, 3) + ) / math.sqrt(self.head_dim) + + if attn_weights.size() != (bsz, self.num_heads, q_len, kv_seq_len): + raise ValueError( + f"Attention weights should be of size {(bsz * self.num_heads, q_len, kv_seq_len)}, but is" + f" {attn_weights.size()}" + ) + + if attention_mask is not None: + if attention_mask.size() != (bsz, 1, q_len, kv_seq_len): + raise ValueError( + f"Attention mask should be of size {(bsz, 1, q_len, kv_seq_len)}, but is {attention_mask.size()}" + ) + attn_weights = attn_weights + attention_mask + attn_weights = torch.max( + attn_weights, torch.tensor(torch.finfo(attn_weights.dtype).min) + ) + + # upcast attention to fp32 + attn_weights = nn.functional.softmax( + attn_weights, dim=-1, dtype=torch.float32 + ).to(query_states.dtype) + attn_output = torch.matmul(attn_weights, value_states) + + if attn_output.size() != (bsz, self.num_heads, q_len, self.head_dim): + raise ValueError( + f"`attn_output` should be of size {(bsz, self.num_heads, q_len, self.head_dim)}, but is" + f" {attn_output.size()}" + ) + + attn_output = attn_output.transpose(1, 2) + + attn_output = attn_output.reshape(bsz, q_len, self.hidden_size) + attn_output = self.o_proj(attn_output) + return attn_output, attn_weights, past_key_value diff --git a/LLAVA_Biovil/llava/train/llava_trainer.py b/LLAVA_Biovil/llava/train/llava_trainer.py new file mode 100644 index 0000000000000000000000000000000000000000..ab4600e75eb0c16729ac80ca495fa71b2bd03fb9 --- /dev/null +++ b/LLAVA_Biovil/llava/train/llava_trainer.py @@ -0,0 +1,801 @@ +import json +import math +import os +import shutil +import sys +import time +from distutils import dist + +import torch +from torch import nn +import numpy as np + +from torch.utils.data import Sampler +from packaging import version + +from transformers import Trainer, TrainerState, is_torch_tpu_available, is_apex_available +from transformers.debug_utils import DebugOption +from transformers.integrations import hp_params +from transformers.deepspeed import deepspeed_init, deepspeed_load_checkpoint + +from transformers.trainer import ( + is_sagemaker_mp_enabled, + get_parameter_names, + has_length, + ALL_LAYERNORM_LAYERS, + ShardedDDPOption, + logger, TRAINER_STATE_NAME, +) +from typing import List, Optional + +from transformers.trainer_pt_utils import get_model_param_count +from transformers.trainer_utils import HPSearchBackend, speed_metrics, TrainOutput +from transformers.training_args import ParallelMode +from transformers.utils import is_accelerate_available + +if is_accelerate_available(): + from accelerate import Accelerator, skip_first_batches + from accelerate import __version__ as accelerate_version + from accelerate.utils import DistributedDataParallelKwargs, GradientAccumulationPlugin + + if version.parse(accelerate_version) > version.parse("0.20.3"): + from accelerate.utils import ( + load_fsdp_model, + load_fsdp_optimizer, + save_fsdp_model, + save_fsdp_optimizer, + ) + +if is_torch_tpu_available(check_device=False): + import torch_xla.core.xla_model as xm + import torch_xla.debug.metrics as met + +if is_apex_available(): + from apex import amp + +# with open('/home/guests/chantal_pellegrini/RaDialog_LLaVA/data/train_token_freqs_radrestruct_balanced_50ep.json') as f: +# token_frequencies = json.load(f) +# token_weights = {k: 1 / v for k, v in token_frequencies.items()} # linear weighting +# print("lin weighting") + +# token_weights = {k: 1 / (np.log(v) + 1) for k, v in token_frequencies.items()} # log weighting, seems to work better in this case +# print("log weighting") +token_weights = None # no weighting +print("no weighting") + +if token_weights is not None: + min_weight = min(token_weights.values()) + extra_token_weight = min_weight / 100 # 100 smaller than the smallest weight + + +def maybe_zero_3(param, ignore_status=False, name=None): + from deepspeed import zero + from deepspeed.runtime.zero.partition_parameters import ZeroParamStatus + if hasattr(param, "ds_id"): + if param.ds_status == ZeroParamStatus.NOT_AVAILABLE: + if not ignore_status: + print(name, 'no ignore status') + with zero.GatheredParameters([param]): + param = param.data.detach().cpu().clone() + else: + param = param.detach().cpu().clone() + return param + + +def get_mm_adapter_state_maybe_zero_3(named_params, keys_to_match): + to_return = {k: t for k, t in named_params if any(key_match in k for key_match in keys_to_match)} + to_return = {k: maybe_zero_3(v, ignore_status=True, name=k).cpu() for k, v in to_return.items()} + return to_return + + +def split_to_even_chunks(indices, lengths, num_chunks): + """ + Split a list of indices into `chunks` chunks of roughly equal lengths. + """ + + if len(indices) % num_chunks != 0: + return [indices[i::num_chunks] for i in range(num_chunks)] + + num_indices_per_chunk = len(indices) // num_chunks + + chunks = [[] for _ in range(num_chunks)] + chunks_lengths = [0 for _ in range(num_chunks)] + for index in indices: + shortest_chunk = chunks_lengths.index(min(chunks_lengths)) + chunks[shortest_chunk].append(index) + chunks_lengths[shortest_chunk] += lengths[index] + if len(chunks[shortest_chunk]) == num_indices_per_chunk: + chunks_lengths[shortest_chunk] = float("inf") + + return chunks + + +def get_modality_length_grouped_indices(lengths, batch_size, world_size, generator=None): + # We need to use torch for the random part as a distributed sampler will set the random seed for torch. + assert all(l != 0 for l in lengths), "Should not have zero length." + if all(l > 0 for l in lengths) or all(l < 0 for l in lengths): + # all samples are in the same modality + return get_length_grouped_indices(lengths, batch_size, world_size, generator=generator) + mm_indices, mm_lengths = zip(*[(i, l) for i, l in enumerate(lengths) if l > 0]) + lang_indices, lang_lengths = zip(*[(i, -l) for i, l in enumerate(lengths) if l < 0]) + + mm_shuffle = [mm_indices[i] for i in get_length_grouped_indices(mm_lengths, batch_size, world_size, generator=None)] + lang_shuffle = [lang_indices[i] for i in get_length_grouped_indices(lang_lengths, batch_size, world_size, generator=None)] + megabatch_size = world_size * batch_size + mm_megabatches = [mm_shuffle[i : i + megabatch_size] for i in range(0, len(mm_shuffle), megabatch_size)] + lang_megabatches = [lang_shuffle[i : i + megabatch_size] for i in range(0, len(lang_shuffle), megabatch_size)] + + last_mm = mm_megabatches[-1] + last_lang = lang_megabatches[-1] + additional_batch = last_mm + last_lang + megabatches = mm_megabatches[:-1] + lang_megabatches[:-1] + megabatch_indices = torch.randperm(len(megabatches), generator=generator) + megabatches = [megabatches[i] for i in megabatch_indices] + + if len(additional_batch) > 0: + megabatches.append(sorted(additional_batch)) + + return [i for megabatch in megabatches for i in megabatch] + + +def get_length_grouped_indices(lengths, batch_size, world_size, generator=None, merge=True): + # We need to use torch for the random part as a distributed sampler will set the random seed for torch. + indices = torch.randperm(len(lengths), generator=generator) + megabatch_size = world_size * batch_size + megabatches = [indices[i : i + megabatch_size].tolist() for i in range(0, len(lengths), megabatch_size)] + megabatches = [sorted(megabatch, key=lambda i: lengths[i], reverse=True) for megabatch in megabatches] + megabatches = [split_to_even_chunks(megabatch, lengths, world_size) for megabatch in megabatches] + + return [i for megabatch in megabatches for batch in megabatch for i in batch] + + +class LengthGroupedSampler(Sampler): + r""" + Sampler that samples indices in a way that groups together features of the dataset of roughly the same length while + keeping a bit of randomness. + """ + + def __init__( + self, + batch_size: int, + world_size: int, + lengths: Optional[List[int]] = None, + generator=None, + group_by_modality: bool = False, + ): + if lengths is None: + raise ValueError("Lengths must be provided.") + + self.batch_size = batch_size + self.world_size = world_size + self.lengths = lengths + self.generator = generator + self.group_by_modality = group_by_modality + + def __len__(self): + return len(self.lengths) + + def __iter__(self): + if self.group_by_modality: + indices = get_modality_length_grouped_indices(self.lengths, self.batch_size, self.world_size, generator=self.generator) + else: + indices = get_length_grouped_indices(self.lengths, self.batch_size, self.world_size, generator=self.generator) + return iter(indices) + + +class LLaVATrainer(Trainer): + + def compute_loss(self, model, inputs, return_outputs=False): + """ + How the loss is computed by Trainer. By default, all models return the loss in the first element. + + Subclass and override for custom behavior. + """ + outputs = model(**inputs) + + # Save past state if it exists + # TODO: this needs to be fixed and made cleaner later. + if self.args.past_index >= 0: + self._past = outputs[self.args.past_index] + + if token_weights is not None: + # check if self has attribute vocab_weight, otherwise create + if not hasattr(self, 'vocab_weight'): + vocab = self.tokenizer.get_vocab() + self.vocab_weight = torch.ones(len(vocab)) * extra_token_weight # default weight + # map them using vocab to correct indices + for k, v in token_weights.items(): + self.vocab_weight[vocab[k]] = v + self.vocab_weight = self.vocab_weight.to(self.args.device) + + # Shift so that tokens < n predict n + shift_logits = outputs.logits[..., :-1, :].contiguous() + shift_labels = outputs.modified_labels[..., 1:].contiguous() + # Flatten the tokens + loss_fct = nn.CrossEntropyLoss(weight=self.vocab_weight) + shift_logits = shift_logits.view(-1, self.model.config.vocab_size) + shift_labels = shift_labels.view(-1) + # Enable model parallelism + shift_labels = shift_labels.to(shift_logits.device) + loss = loss_fct(shift_logits, shift_labels) + + return (loss, outputs) if return_outputs else loss + + else: #orginial compute_loss without weighting + # We don't use .loss here since the model may return tuples instead of ModelOutput. + loss = outputs["loss"] if isinstance(outputs, dict) else outputs[0] + + return (loss, outputs) if return_outputs else loss + + + def _inner_training_loop( + self, batch_size=None, args=None, resume_from_checkpoint=None, trial=None, ignore_keys_for_eval=None + ): + self.accelerator.free_memory() + self._train_batch_size = batch_size + logger.debug(f"Currently training with a batch size of: {self._train_batch_size}") + # Data loader and number of training steps + train_dataloader = self.get_train_dataloader() + + # Setting up training control variables: + # number of training epochs: num_train_epochs + # number of training steps per epoch: num_update_steps_per_epoch + # total number of training steps to execute: max_steps + total_train_batch_size = self._train_batch_size * args.gradient_accumulation_steps * args.world_size + + len_dataloader = None + if has_length(train_dataloader): + len_dataloader = len(train_dataloader) + num_update_steps_per_epoch = len_dataloader // args.gradient_accumulation_steps + num_update_steps_per_epoch = max(num_update_steps_per_epoch, 1) + num_examples = self.num_examples(train_dataloader) + if args.max_steps > 0: + max_steps = args.max_steps + num_train_epochs = args.max_steps // num_update_steps_per_epoch + int( + args.max_steps % num_update_steps_per_epoch > 0 + ) + # May be slightly incorrect if the last batch in the training dataloader has a smaller size but it's + # the best we can do. + num_train_samples = args.max_steps * total_train_batch_size + else: + max_steps = math.ceil(args.num_train_epochs * num_update_steps_per_epoch) + num_train_epochs = math.ceil(args.num_train_epochs) + num_train_samples = self.num_examples(train_dataloader) * args.num_train_epochs + elif args.max_steps > 0: # Rely on max_steps when dataloader does not have a working size + max_steps = args.max_steps + # Setting a very large number of epochs so we go as many times as necessary over the iterator. + num_train_epochs = sys.maxsize + num_update_steps_per_epoch = max_steps + num_examples = total_train_batch_size * args.max_steps + num_train_samples = args.max_steps * total_train_batch_size + else: + raise ValueError( + "args.max_steps must be set to a positive value if dataloader does not have a length, was" + f" {args.max_steps}" + ) + + # Compute absolute values for logging, eval, and save if given as ratio + if args.logging_steps and args.logging_steps < 1: + args.logging_steps = math.ceil(max_steps * args.logging_steps) + if args.eval_steps and args.eval_steps < 1: + args.eval_steps = math.ceil(max_steps * args.eval_steps) + if args.save_steps and args.save_steps < 1: + args.save_steps = math.ceil(max_steps * args.save_steps) + + if DebugOption.UNDERFLOW_OVERFLOW in self.args.debug: + if self.args.n_gpu > 1: + # nn.DataParallel(model) replicates the model, creating new variables and module + # references registered here no longer work on other gpus, breaking the module + raise ValueError( + "Currently --debug underflow_overflow is not supported under DP. Please use DDP" + " (torch.distributed.launch)." + ) + else: + debug_overflow = DebugUnderflowOverflow(self.model) # noqa + + delay_optimizer_creation = ( + self.sharded_ddp is not None + and self.sharded_ddp != ShardedDDPOption.SIMPLE + or is_sagemaker_mp_enabled() + or self.fsdp is not None + ) + + # We need to reset the scheduler, as its parameters may be different on subsequent calls + if self._created_lr_scheduler: + self.lr_scheduler = None + self._created_lr_scheduler = False + + if self.is_deepspeed_enabled: + self.optimizer, self.lr_scheduler = deepspeed_init(self, num_training_steps=max_steps) + + if not delay_optimizer_creation: + self.create_optimizer_and_scheduler(num_training_steps=max_steps) + + self.state = TrainerState() + self.state.is_hyper_param_search = trial is not None + + # Activate gradient checkpointing if needed + if args.gradient_checkpointing: + self.model.gradient_checkpointing_enable() + + model = self._wrap_model(self.model_wrapped) + + if is_sagemaker_mp_enabled() and resume_from_checkpoint is not None: + self._load_from_checkpoint(resume_from_checkpoint, model) + + # as the model is wrapped, don't use `accelerator.prepare` + # this is for unhandled cases such as + # Fairscale Sharded DDP, FSDP-XLA, SageMaker MP/DP, DataParallel, IPEX + use_accelerator_prepare = True if model is self.model else False + + if delay_optimizer_creation: + self.create_optimizer_and_scheduler(num_training_steps=max_steps) + + # prepare using `accelerator` prepare + if use_accelerator_prepare: + self.model.train() + if hasattr(self.lr_scheduler, "step"): + if self.use_apex: + model = self.accelerator.prepare(self.model) + else: + model, self.optimizer = self.accelerator.prepare(self.model, self.optimizer) + else: + # to handle cases wherein we pass "DummyScheduler" such as when it is specified in DeepSpeed config. + model, self.optimizer, self.lr_scheduler = self.accelerator.prepare( + self.model, self.optimizer, self.lr_scheduler + ) + + if self.is_fsdp_enabled: + self.model = model + + # for the rest of this function `model` is the outside model, whether it was wrapped or not + if model is not self.model: + self.model_wrapped = model + + # backward compatibility + if self.is_deepspeed_enabled: + self.deepspeed = self.model_wrapped + + # deepspeed ckpt loading + if resume_from_checkpoint is not None and self.is_deepspeed_enabled: + print(f"DeepSpeed info: Loading model from {resume_from_checkpoint}") + deepspeed_load_checkpoint(self.model_wrapped, resume_from_checkpoint) + # get step from opt state + # Assuming `optimizer_state_dict` is the dictionary you've loaded from the checkpoint + for param_tensor, state in self.lr_scheduler.optimizer.state.items(): + step_tensor = state['step'] + step_value = step_tensor.item() # Convert tensor to a Python number + print(f"Step value for a parameter tensor: {step_value}") + # Since all parameters should have been updated the same number of times, + # you can break after the first iteration + break + # step scheduler to match + for _ in range(int(step_value)): + self.lr_scheduler.step() + # Check if saved optimizer or scheduler states exist + self._load_optimizer_and_scheduler(resume_from_checkpoint) + + # important: at this point: + # self.model is the Transformers Model + # self.model_wrapped is DDP(Transformers Model), Deepspeed(Transformers Model), etc. + + # Train! + logger.info("***** Running training *****") + logger.info(f" Num examples = {num_examples:,}") + logger.info(f" Num Epochs = {num_train_epochs:,}") + logger.info(f" Instantaneous batch size per device = {self.args.per_device_train_batch_size:,}") + if self.args.per_device_train_batch_size != self._train_batch_size: + logger.info(f" Training with DataParallel so batch size has been adjusted to: {self._train_batch_size:,}") + logger.info(f" Total train batch size (w. parallel, distributed & accumulation) = {total_train_batch_size:,}") + logger.info(f" Gradient Accumulation steps = {args.gradient_accumulation_steps}") + logger.info(f" Total optimization steps = {max_steps:,}") + logger.info(f" Number of trainable parameters = {get_model_param_count(model, trainable_only=True):,}") + + self.state.epoch = 0 + start_time = time.time() + epochs_trained = 0 + steps_trained_in_current_epoch = 0 + steps_trained_progress_bar = None + + # Check if continuing training from a checkpoint + if resume_from_checkpoint is not None and os.path.isfile( + os.path.join(resume_from_checkpoint, TRAINER_STATE_NAME) + ): + self.state = TrainerState.load_from_json(os.path.join(resume_from_checkpoint, TRAINER_STATE_NAME)) + epochs_trained = self.state.global_step // num_update_steps_per_epoch + if not args.ignore_data_skip: + steps_trained_in_current_epoch = self.state.global_step % (num_update_steps_per_epoch) + steps_trained_in_current_epoch *= args.gradient_accumulation_steps + else: + steps_trained_in_current_epoch = 0 + + logger.info(" Continuing training from checkpoint, will skip to saved global_step") + logger.info(f" Continuing training from epoch {epochs_trained}") + logger.info(f" Continuing training from global step {self.state.global_step}") + if not args.ignore_data_skip: + logger.info( + f" Will skip the first {epochs_trained} epochs then the first" + f" {steps_trained_in_current_epoch} batches in the first epoch." + ) + + # Update the references + self.callback_handler.model = self.model + self.callback_handler.optimizer = self.optimizer + self.callback_handler.lr_scheduler = self.lr_scheduler + self.callback_handler.train_dataloader = train_dataloader + if self.hp_name is not None and self._trial is not None: + # use self._trial because the SigOpt/Optuna hpo only call `_hp_search_setup(trial)` instead of passing trial + # parameter to Train when using DDP. + self.state.trial_name = self.hp_name(self._trial) + if trial is not None: + assignments = trial.assignments if self.hp_search_backend == HPSearchBackend.SIGOPT else trial + self.state.trial_params = hp_params(assignments) + else: + self.state.trial_params = None + # This should be the same if the state has been saved but in case the training arguments changed, it's safer + # to set this after the load. + self.state.max_steps = max_steps + self.state.num_train_epochs = num_train_epochs + self.state.is_local_process_zero = self.is_local_process_zero() + self.state.is_world_process_zero = self.is_world_process_zero() + + # tr_loss is a tensor to avoid synchronization of TPUs through .item() + tr_loss = torch.tensor(0.0).to(args.device) + # _total_loss_scalar is updated everytime .item() has to be called on tr_loss and stores the sum of all losses + self._total_loss_scalar = 0.0 + self._globalstep_last_logged = self.state.global_step + model.zero_grad() + + self.control = self.callback_handler.on_train_begin(args, self.state, self.control) + + # Skip the first epochs_trained epochs to get the random state of the dataloader at the right point. + if not args.ignore_data_skip: + for epoch in range(epochs_trained): + for _ in train_dataloader: + break + + total_batched_samples = 0 + for epoch in range(epochs_trained, num_train_epochs): + epoch_iterator = train_dataloader + + # Reset the past mems state at the beginning of each epoch if necessary. + if args.past_index >= 0: + self._past = None + + steps_in_epoch = ( + len(epoch_iterator) + if len_dataloader is not None + else args.max_steps * args.gradient_accumulation_steps + ) + self.control = self.callback_handler.on_epoch_begin(args, self.state, self.control) + + if epoch == epochs_trained and resume_from_checkpoint is not None and steps_trained_in_current_epoch == 0: + self._load_rng_state(resume_from_checkpoint) + + rng_to_sync = False + steps_skipped = 0 + if steps_trained_in_current_epoch > 0: + epoch_iterator = skip_first_batches(epoch_iterator, steps_trained_in_current_epoch) + steps_skipped = steps_trained_in_current_epoch + steps_trained_in_current_epoch = 0 + rng_to_sync = True + + step = -1 + for step, inputs in enumerate(epoch_iterator): + total_batched_samples += 1 + if rng_to_sync: + self._load_rng_state(resume_from_checkpoint) + rng_to_sync = False + + # Skip past any already trained steps if resuming training + if steps_trained_in_current_epoch > 0: + steps_trained_in_current_epoch -= 1 + if steps_trained_progress_bar is not None: + steps_trained_progress_bar.update(1) + if steps_trained_in_current_epoch == 0: + self._load_rng_state(resume_from_checkpoint) + continue + elif steps_trained_progress_bar is not None: + steps_trained_progress_bar.close() + steps_trained_progress_bar = None + + if step % args.gradient_accumulation_steps == 0: + self.control = self.callback_handler.on_step_begin(args, self.state, self.control) + + with self.accelerator.accumulate(model): + tr_loss_step = self.training_step(model, inputs) + + if ( + args.logging_nan_inf_filter + and not is_torch_tpu_available() + and (torch.isnan(tr_loss_step) or torch.isinf(tr_loss_step)) + ): + # if loss is nan or inf simply add the average of previous logged losses + tr_loss += tr_loss / (1 + self.state.global_step - self._globalstep_last_logged) + else: + tr_loss += tr_loss_step + + self.current_flos += float(self.floating_point_ops(inputs)) + + is_last_step_and_steps_less_than_grad_acc = ( + steps_in_epoch <= args.gradient_accumulation_steps and (step + 1) == steps_in_epoch + ) + + if ( + total_batched_samples % args.gradient_accumulation_steps == 0 + or + # last step in epoch but step is always smaller than gradient_accumulation_steps + is_last_step_and_steps_less_than_grad_acc + ): + # the `or` condition of `is_last_step_and_steps_less_than_grad_acc` is not covered + # in accelerate. So, explicitly enable sync gradients to True in that case. + if is_last_step_and_steps_less_than_grad_acc or ( + version.parse(accelerate_version) <= version.parse("0.20.3") + ): + self.accelerator.gradient_state._set_sync_gradients(True) + + # Gradient clipping + if args.max_grad_norm is not None and args.max_grad_norm > 0: + # deepspeed does its own clipping + + if self.do_grad_scaling: + # Reduce gradients first for XLA + if is_torch_tpu_available(): + gradients = xm._fetch_gradients(self.optimizer) + xm.all_reduce("sum", gradients, scale=1.0 / xm.xrt_world_size()) + # AMP: gradients need unscaling + self.scaler.unscale_(self.optimizer) + + if is_sagemaker_mp_enabled() and args.fp16: + self.optimizer.clip_master_grads(args.max_grad_norm) + elif hasattr(self.optimizer, "clip_grad_norm"): + # Some optimizers (like the sharded optimizer) have a specific way to do gradient clipping + self.optimizer.clip_grad_norm(args.max_grad_norm) + elif hasattr(model, "clip_grad_norm_"): + # Some models (like FullyShardedDDP) have a specific way to do gradient clipping + model.clip_grad_norm_(args.max_grad_norm) + elif self.use_apex: + # Revert to normal clipping otherwise, handling Apex or full precision + nn.utils.clip_grad_norm_( + amp.master_params(self.optimizer), + args.max_grad_norm, + ) + else: + self.accelerator.clip_grad_norm_( + model.parameters(), + args.max_grad_norm, + ) + + # Optimizer step + optimizer_was_run = True + if is_torch_tpu_available(): + if self.do_grad_scaling: + self.scaler.step(self.optimizer) + self.scaler.update() + else: + # tpu-comment: accelerate wrapped optimizers call xm.optimizer_step + self.optimizer.step() + elif self.do_grad_scaling: + scale_before = self.scaler.get_scale() + self.scaler.step(self.optimizer) + self.scaler.update() + scale_after = self.scaler.get_scale() + optimizer_was_run = scale_before <= scale_after + else: + self.optimizer.step() + optimizer_was_run = not self.accelerator.optimizer_step_was_skipped + + if optimizer_was_run: + # Delay optimizer scheduling until metrics are generated + if not isinstance(self.lr_scheduler, torch.optim.lr_scheduler.ReduceLROnPlateau): + self.lr_scheduler.step() + + model.zero_grad() + self.state.global_step += 1 + self.state.epoch = epoch + (step + 1 + steps_skipped) / steps_in_epoch + self.control = self.callback_handler.on_step_end(args, self.state, self.control) + + self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval) + else: + self.control = self.callback_handler.on_substep_end(args, self.state, self.control) + + if self.control.should_epoch_stop or self.control.should_training_stop: + break + if step < 0: + logger.warning( + "There seems to be not a single sample in your epoch_iterator, stopping training at step" + f" {self.state.global_step}! This is expected if you're using an IterableDataset and set" + f" num_steps ({max_steps}) higher than the number of available samples." + ) + self.control.should_training_stop = True + + self.control = self.callback_handler.on_epoch_end(args, self.state, self.control) + self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval) + + if DebugOption.TPU_METRICS_DEBUG in self.args.debug: + if is_torch_tpu_available(): + # tpu-comment: Logging debug metrics for PyTorch/XLA (compile, execute times, ops, etc.) + xm.master_print(met.metrics_report()) + else: + logger.warning( + "You enabled PyTorch/XLA debug metrics but you don't have a TPU " + "configured. Check your training configuration if this is unexpected." + ) + if self.control.should_training_stop: + break + + if args.past_index and hasattr(self, "_past"): + # Clean the state at the end of training + delattr(self, "_past") + + logger.info("\n\nTraining completed. Do not forget to share your model on huggingface.co/models =)\n\n") + if args.load_best_model_at_end and self.state.best_model_checkpoint is not None: + # Wait for everyone to get here so we are sur the model has been saved by process 0. + if is_torch_tpu_available(): + xm.rendezvous("load_best_model_at_end") + elif args.parallel_mode == ParallelMode.DISTRIBUTED: + dist.barrier() + # elif is_sagemaker_mp_enabled(): + # smp.barrier() + + self._load_best_model() + + # add remaining tr_loss + self._total_loss_scalar += tr_loss.item() + train_loss = self._total_loss_scalar / self.state.global_step + + metrics = speed_metrics("train", start_time, num_samples=num_train_samples, num_steps=self.state.max_steps) + self.store_flos() + metrics["total_flos"] = self.state.total_flos + metrics["train_loss"] = train_loss + + self.is_in_train = False + + self._memory_tracker.stop_and_update_metrics(metrics) + + self.log(metrics) + + run_dir = self._get_output_dir(trial) + checkpoints_sorted = self._sorted_checkpoints(use_mtime=False, output_dir=run_dir) + + # Delete the last checkpoint when save_total_limit=1 if it's different from the best checkpoint and process allowed to save. + if self.args.should_save and self.state.best_model_checkpoint is not None and self.args.save_total_limit == 1: + for checkpoint in checkpoints_sorted: + if checkpoint != self.state.best_model_checkpoint: + logger.info(f"Deleting older checkpoint [{checkpoint}] due to args.save_total_limit") + shutil.rmtree(checkpoint) + + self.control = self.callback_handler.on_train_end(args, self.state, self.control) + + return TrainOutput(self.state.global_step, train_loss, metrics) + + def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]: + if self.train_dataset is None or not has_length(self.train_dataset): + return None + + if self.args.group_by_modality_length: + lengths = self.train_dataset.modality_lengths + return LengthGroupedSampler( + self.args.train_batch_size, + world_size=self.args.world_size * self.args.gradient_accumulation_steps, + lengths=lengths, + group_by_modality=True, + ) + else: + return super()._get_train_sampler() + + def create_optimizer(self): + """ + Setup the optimizer. + + We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the + Trainer's init through `optimizers`, or subclass and override this method in a subclass. + """ + if is_sagemaker_mp_enabled(): + return super().create_optimizer() + if self.sharded_ddp == ShardedDDPOption.SIMPLE: + return super().create_optimizer() + + opt_model = self.model + + if self.optimizer is None: + decay_parameters = get_parameter_names(opt_model, ALL_LAYERNORM_LAYERS) + decay_parameters = [name for name in decay_parameters if "bias" not in name] + if self.args.mm_projector_lr is not None: + projector_parameters = [name for name, _ in opt_model.named_parameters() if "mm_projector" in name] + optimizer_grouped_parameters = [ + { + "params": [ + p for n, p in opt_model.named_parameters() if (n in decay_parameters and n not in projector_parameters and p.requires_grad) + ], + "weight_decay": self.args.weight_decay, + }, + { + "params": [ + p for n, p in opt_model.named_parameters() if (n not in decay_parameters and n not in projector_parameters and p.requires_grad) + ], + "weight_decay": 0.0, + }, + { + "params": [ + p for n, p in opt_model.named_parameters() if (n in decay_parameters and n in projector_parameters and p.requires_grad) + ], + "weight_decay": self.args.weight_decay, + "lr": self.args.mm_projector_lr, + }, + { + "params": [ + p for n, p in opt_model.named_parameters() if (n not in decay_parameters and n in projector_parameters and p.requires_grad) + ], + "weight_decay": 0.0, + "lr": self.args.mm_projector_lr, + }, + ] + else: + optimizer_grouped_parameters = [ + { + "params": [ + p for n, p in opt_model.named_parameters() if (n in decay_parameters and p.requires_grad) + ], + "weight_decay": self.args.weight_decay, + }, + { + "params": [ + p for n, p in opt_model.named_parameters() if (n not in decay_parameters and p.requires_grad) + ], + "weight_decay": 0.0, + }, + ] + + optimizer_cls, optimizer_kwargs = Trainer.get_optimizer_cls_and_kwargs(self.args) + + if self.sharded_ddp == ShardedDDPOption.SIMPLE: + self.optimizer = OSS( + params=optimizer_grouped_parameters, + optim=optimizer_cls, + **optimizer_kwargs, + ) + else: + self.optimizer = optimizer_cls(optimizer_grouped_parameters, **optimizer_kwargs) + if optimizer_cls.__name__ == "Adam8bit": + import bitsandbytes + + manager = bitsandbytes.optim.GlobalOptimManager.get_instance() + + skipped = 0 + for module in opt_model.modules(): + if isinstance(module, nn.Embedding): + skipped += sum({p.data_ptr(): p.numel() for p in module.parameters()}.values()) + logger.info(f"skipped {module}: {skipped/2**20}M params") + manager.register_module_override(module, "weight", {"optim_bits": 32}) + logger.debug(f"bitsandbytes: will optimize {module} in fp32") + logger.info(f"skipped: {skipped/2**20}M params") + + return self.optimizer + + def _save_checkpoint(self, model, trial, metrics=None): + if getattr(self.args, 'tune_mm_mlp_adapter', False): + from transformers.trainer_utils import PREFIX_CHECKPOINT_DIR + checkpoint_folder = f"{PREFIX_CHECKPOINT_DIR}-{self.state.global_step}" + + run_dir = self._get_output_dir(trial=trial) + output_dir = os.path.join(run_dir, checkpoint_folder) + + # Only save Adapter + keys_to_match = ['mm_projector', 'vision_resampler'] + if getattr(self.args, "use_im_start_end", False): + keys_to_match.extend(['embed_tokens', 'embed_in']) + + weight_to_save = get_mm_adapter_state_maybe_zero_3(self.model.named_parameters(), keys_to_match) + + if self.args.local_rank == 0 or self.args.local_rank == -1: + self.model.config.save_pretrained(output_dir) + torch.save(weight_to_save, os.path.join(output_dir, f'mm_projector.bin')) + else: + super(LLaVATrainer, self)._save_checkpoint(model, trial, metrics) + + def _save(self, output_dir: Optional[str] = None, state_dict=None): + if getattr(self.args, 'tune_mm_mlp_adapter', False): + pass + else: + super(LLaVATrainer, self)._save(output_dir, state_dict) diff --git a/LLAVA_Biovil/llava/train/train.py b/LLAVA_Biovil/llava/train/train.py new file mode 100644 index 0000000000000000000000000000000000000000..5543199cdc85f0a472b3df858d43ba774f23ca30 --- /dev/null +++ b/LLAVA_Biovil/llava/train/train.py @@ -0,0 +1,1298 @@ +# Adopted from https://github.com/lm-sys/FastChat. Below is the original copyright: +# Adopted from tatsu-lab@stanford_alpaca. Below is the original copyright: +# Copyright 2023 Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import math +import os +import random + +os.environ["WANDB_PROJECT"] = 'radiolog_llava' +import copy +from dataclasses import dataclass, field +import json +import logging +import pathlib +from typing import Dict, Optional, Sequence, List, Tuple + +import torch +from torch import Tensor +from skimage import io +import transformers +from torchvision.transforms import Compose, Resize, ToTensor, CenterCrop, transforms +from torchvision.transforms import functional as F, InterpolationMode + +from llava.constants import IGNORE_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN +from torch.utils.data import Dataset +from llava.train.llava_trainer import LLaVATrainer + +from llava import conversation as conversation_lib +from llava.model import * +from llava.mm_utils import tokenizer_image_token + +from PIL import Image +import numpy as np + +local_rank = None + +# if LLAVA_MED +# IGNORE_INDEX = -100 +# DEFAULT_PAD_TOKEN = "[PAD]" +# DEFAULT_EOS_TOKEN = "" +# DEFAULT_BOS_TOKEN = "" +# DEFAULT_UNK_TOKEN = "" +# DEFAULT_IMAGE_TOKEN = "" +# DEFAULT_IMAGE_PATCH_TOKEN = "" +# DEFAULT_IM_START_TOKEN = "" +# DEFAULT_IM_END_TOKEN = "" + +def rank0_print(*args): + if local_rank == 0: + print(*args) + + +@dataclass +class ModelArguments: + model_name_or_path: Optional[str] = field(default="facebook/opt-125m") + version: Optional[str] = field(default="v0") + freeze_backbone: bool = field(default=False) + tune_mm_mlp_adapter: bool = field(default=False) + vision_tower: Optional[str] = field(default=None) + mm_vision_select_layer: Optional[int] = field(default=-1) # default to the last layer + pretrain_mm_mlp_adapter: Optional[str] = field(default=None) + mm_projector_type: Optional[str] = field(default='linear') + mm_use_im_start_end: bool = field(default=False) + mm_use_im_patch_token: bool = field(default=True) + mm_vision_select_feature: Optional[str] = field(default="patch") + mv_type: Optional[str] = field(default='concat') + + +@dataclass +class DataArguments: + data_path: str = field(default=None, + metadata={"help": "Path to the training data."}) + lazy_preprocess: bool = False + is_multimodal: bool = False + image_folder: Optional[str] = field(default=None) + image_aspect_ratio: str = 'square' + do_augment: bool = field(default=False) + do_img_order_augment: bool = field(default=False) + +@dataclass +class TrainingArguments(transformers.TrainingArguments): + cache_dir: Optional[str] = field(default=None) + optim: str = field(default="adamw_torch") + remove_unused_columns: bool = field(default=False) + freeze_mm_mlp_adapter: bool = field(default=False) + unfreeze_n_vision_tower_layers: Optional[int] = field(default=None) + mpt_attn_impl: Optional[str] = field(default="triton") + model_max_length: int = field( + default=512, + metadata={ + "help": + "Maximum sequence length. Sequences will be right padded (and possibly truncated)." + }, + ) + double_quant: bool = field( + default=True, + metadata={"help": "Compress the quantization statistics through double quantization."} + ) + quant_type: str = field( + default="nf4", + metadata={"help": "Quantization data type to use. Should be one of `fp4` or `nf4`."} + ) + bits: int = field( + default=16, + metadata={"help": "How many bits to use."} + ) + lora_enable: bool = False + lora_r: int = 64 + lora_alpha: int = 16 + lora_dropout: float = 0.05 + lora_weight_path: str = "" + lora_bias: str = "none" + mm_projector_lr: Optional[float] = None + group_by_modality_length: bool = field(default=False) + + +def maybe_zero_3(param, ignore_status=False, name=None): + from deepspeed import zero + from deepspeed.runtime.zero.partition_parameters import ZeroParamStatus + if hasattr(param, "ds_id"): + if param.ds_status == ZeroParamStatus.NOT_AVAILABLE: + if not ignore_status: + logging.warning(f"{name}: param.ds_status != ZeroParamStatus.NOT_AVAILABLE: {param.ds_status}") + with zero.GatheredParameters([param]): + param = param.data.detach().cpu().clone() + else: + param = param.detach().cpu().clone() + return param + + +# Borrowed from peft.utils.get_peft_model_state_dict +def get_peft_state_maybe_zero_3(named_params, bias): + if bias == "none": + to_return = {k: t for k, t in named_params if "lora_" in k} + elif bias == "all": + to_return = {k: t for k, t in named_params if "lora_" in k or "bias" in k} + elif bias == "lora_only": + to_return = {} + maybe_lora_bias = {} + lora_bias_names = set() + for k, t in named_params: + if "lora_" in k: + to_return[k] = t + bias_name = k.split("lora_")[0] + "bias" + lora_bias_names.add(bias_name) + elif "bias" in k: + maybe_lora_bias[k] = t + for k, t in maybe_lora_bias: + if bias_name in lora_bias_names: + to_return[bias_name] = t + else: + raise NotImplementedError + to_return = {k: maybe_zero_3(v, ignore_status=True) for k, v in to_return.items()} + return to_return + + +def get_peft_state_non_lora_maybe_zero_3_extended(model, require_grad_only=True): + named_entities = list(model.named_parameters()) + list(model.named_buffers()) + to_return = {k: v for k, v in named_entities if "lora_" not in k} + if require_grad_only: + # For buffers, requires_grad attribute does not apply, so they should be included regardless + to_return = {k: v for k, v in to_return.items() if type(v) == torch.Tensor or v.requires_grad} + to_return = {k: maybe_zero_3(v, ignore_status=True).cpu() for k, v in to_return.items()} + return to_return + + +def get_mm_adapter_state_maybe_zero_3(named_params, keys_to_match): + to_return = {k: t for k, t in named_params if any(key_match in k for key_match in keys_to_match)} + to_return = {k: maybe_zero_3(v, ignore_status=True).cpu() for k, v in to_return.items()} + return to_return + + +def find_all_linear_names(model): + cls = torch.nn.Linear + lora_module_names = set() + multimodal_keywords = ['mm_projector', 'vision_tower', 'vision_resampler', 'image_pooler'] + for name, module in model.named_modules(): + if any(mm_keyword in name for mm_keyword in multimodal_keywords): + continue + if isinstance(module, cls): + names = name.split('.') + lora_module_names.add(names[0] if len(names) == 1 else names[-1]) + + if 'lm_head' in lora_module_names: # needed for 16-bit + lora_module_names.remove('lm_head') + return list(lora_module_names) + + +def safe_save_model_for_hf_trainer(trainer: transformers.Trainer, + output_dir: str): + """Collects the state dict and dump to disk.""" + + if getattr(trainer.args, "tune_mm_mlp_adapter", False): + # Only save Adapter + keys_to_match = ['mm_projector'] + if getattr(trainer.args, "use_im_start_end", False): + keys_to_match.extend(['embed_tokens', 'embed_in']) + + weight_to_save = get_mm_adapter_state_maybe_zero_3(trainer.model.named_parameters(), keys_to_match) + trainer.model.config.save_pretrained(output_dir) + + current_folder = output_dir.split('/')[-1] + parent_folder = os.path.dirname(output_dir) + if trainer.args.local_rank == 0 or trainer.args.local_rank == -1: + if current_folder.startswith('checkpoint-'): + mm_projector_folder = os.path.join(parent_folder, "mm_projector") + os.makedirs(mm_projector_folder, exist_ok=True) + torch.save(weight_to_save, os.path.join(mm_projector_folder, f'{current_folder}.bin')) + else: + torch.save(weight_to_save, os.path.join(output_dir, f'mm_projector.bin')) + return + + if trainer.deepspeed: + torch.cuda.synchronize() + trainer.save_model(output_dir) + return + + state_dict = trainer.model.state_dict() + if trainer.args.should_save: + cpu_state_dict = { + key: value.cpu() + for key, value in state_dict.items() + } + del state_dict + trainer._save(output_dir, state_dict=cpu_state_dict) # noqa + + +def smart_tokenizer_and_embedding_resize( + special_tokens_dict: Dict, + tokenizer: transformers.PreTrainedTokenizer, + model: transformers.PreTrainedModel, +): + """Resize tokenizer and embedding. + + Note: This is the unoptimized version that may make your embedding size not be divisible by 64. + """ + num_new_tokens = tokenizer.add_special_tokens(special_tokens_dict) + model.resize_token_embeddings(len(tokenizer)) + + if num_new_tokens > 0: + input_embeddings = model.get_input_embeddings().weight.data + output_embeddings = model.get_output_embeddings().weight.data + + input_embeddings_avg = input_embeddings[:-num_new_tokens].mean( + dim=0, keepdim=True) + output_embeddings_avg = output_embeddings[:-num_new_tokens].mean( + dim=0, keepdim=True) + + input_embeddings[-num_new_tokens:] = input_embeddings_avg + output_embeddings[-num_new_tokens:] = output_embeddings_avg + + +def _tokenize_fn(strings: Sequence[str], + tokenizer: transformers.PreTrainedTokenizer) -> Dict: + """Tokenize a list of strings.""" + tokenized_list = [ + tokenizer( + text, + return_tensors="pt", + padding="longest", + max_length=tokenizer.model_max_length, + truncation=True, + ) for text in strings + ] + input_ids = labels = [ + tokenized.input_ids[0] for tokenized in tokenized_list + ] + input_ids_lens = labels_lens = [ + tokenized.input_ids.ne(tokenizer.pad_token_id).sum().item() + for tokenized in tokenized_list + ] + return dict( + input_ids=input_ids, + labels=labels, + input_ids_lens=input_ids_lens, + labels_lens=labels_lens, + ) + + +def _mask_targets(target, tokenized_lens, speakers): + # cur_idx = 0 + cur_idx = tokenized_lens[0] + tokenized_lens = tokenized_lens[1:] + target[:cur_idx] = IGNORE_INDEX + for tokenized_len, speaker in zip(tokenized_lens, speakers): + if speaker == "human": + target[cur_idx+2:cur_idx + tokenized_len] = IGNORE_INDEX + cur_idx += tokenized_len + + +def _add_speaker_and_signal(header, source, get_conversation=True): + """Add speaker and start/end signal on each round.""" + BEGIN_SIGNAL = "### " + END_SIGNAL = "\n" + conversation = header + for sentence in source: + from_str = sentence["from"] + if from_str.lower() == "human": + from_str = conversation_lib.default_conversation.roles[0] + elif from_str.lower() == "gpt": + from_str = conversation_lib.default_conversation.roles[1] + else: + from_str = 'unknown' + sentence["value"] = (BEGIN_SIGNAL + from_str + ": " + + sentence["value"] + END_SIGNAL) + if get_conversation: + conversation += sentence["value"] + conversation += BEGIN_SIGNAL + return conversation + + +def preprocess_multimodal( + sources: Sequence[str], + data_args: DataArguments +) -> Dict: + is_multimodal = data_args.is_multimodal + if not is_multimodal: + return sources + + for source in sources: + for sentence in source: + if DEFAULT_IMAGE_TOKEN in sentence['value']: + sentence['value'] = sentence['value'].replace(DEFAULT_IMAGE_TOKEN, '').strip() + sentence['value'] = DEFAULT_IMAGE_TOKEN + '\n' + sentence['value'] + sentence['value'] = sentence['value'].strip() + if "mmtag" in conversation_lib.default_conversation.version: + sentence['value'] = sentence['value'].replace(DEFAULT_IMAGE_TOKEN, '' + DEFAULT_IMAGE_TOKEN + '') + replace_token = DEFAULT_IMAGE_TOKEN + if data_args.mm_use_im_start_end: + replace_token = DEFAULT_IM_START_TOKEN + replace_token + DEFAULT_IM_END_TOKEN + sentence["value"] = sentence["value"].replace(DEFAULT_IMAGE_TOKEN, replace_token) + + return sources + + +def preprocess_llama_2( + sources, + tokenizer: transformers.PreTrainedTokenizer, + has_image: bool = False +) -> Dict: + conv = conversation_lib.default_conversation.copy() + roles = {"human": conv.roles[0], "gpt": conv.roles[1]} + + # Apply prompt templates + conversations = [] + for i, source in enumerate(sources): + if roles[source[0]["from"]] != conv.roles[0]: + # Skip the first one if it is not from human + source = source[1:] + + conv.messages = [] + for j, sentence in enumerate(source): + role = roles[sentence["from"]] + assert role == conv.roles[j % 2], f"{i}" + conv.append_message(role, sentence["value"]) + conversations.append(conv.get_prompt()) + + # Tokenize conversations + + if has_image: + input_ids = torch.stack([tokenizer_image_token(prompt, tokenizer, return_tensors='pt') for prompt in conversations], dim=0) + else: + input_ids = tokenizer( + conversations, + return_tensors="pt", + padding="longest", + max_length=tokenizer.model_max_length, + truncation=True, + ).input_ids + + targets = input_ids.clone() + + assert conv.sep_style == conversation_lib.SeparatorStyle.LLAMA_2 + + # Mask targets + sep = "[/INST] " + for conversation, target in zip(conversations, targets): + total_len = int(target.ne(tokenizer.pad_token_id).sum()) + + rounds = conversation.split(conv.sep2) + cur_len = 1 + target[:cur_len] = IGNORE_INDEX + for i, rou in enumerate(rounds): + if rou == "": + break + + parts = rou.split(sep) + if len(parts) != 2: + break + parts[0] += sep + + if has_image: + round_len = len(tokenizer_image_token(rou, tokenizer)) + instruction_len = len(tokenizer_image_token(parts[0], tokenizer)) - 2 + else: + round_len = len(tokenizer(rou).input_ids) + instruction_len = len(tokenizer(parts[0]).input_ids) - 2 + + target[cur_len : cur_len + instruction_len] = IGNORE_INDEX + + cur_len += round_len + target[cur_len:] = IGNORE_INDEX + + if cur_len < tokenizer.model_max_length: + if cur_len != total_len: + target[:] = IGNORE_INDEX + print( + f"WARNING: tokenization mismatch: {cur_len} vs. {total_len}." + f" (ignored)" + ) + + return dict( + input_ids=input_ids, + labels=targets, + ) + + +def preprocess_v1( + sources, + tokenizer: transformers.PreTrainedTokenizer, + has_image: bool = False +) -> Dict: + conv = conversation_lib.default_conversation.copy() + roles = {"human": conv.roles[0], "gpt": conv.roles[1]} + + # Apply prompt templates + conversations = [] + for i, source in enumerate(sources): + if roles[source[0]["from"]] != conv.roles[0]: + # Skip the first one if it is not from human + source = source[1:] + + conv.messages = [] + for j, sentence in enumerate(source): + role = roles[sentence["from"]] + assert role == conv.roles[j % 2], f"{i}" + conv.append_message(role, sentence["value"]) + conversations.append(conv.get_prompt()) + + # Tokenize conversations + + if has_image: + input_ids = torch.stack([tokenizer_image_token(prompt, tokenizer, return_tensors='pt') for prompt in conversations], dim=0) + else: + input_ids = tokenizer( + conversations, + return_tensors="pt", + padding="longest", + max_length=tokenizer.model_max_length, + truncation=True, + ).input_ids + + targets = input_ids.clone() + + assert conv.sep_style == conversation_lib.SeparatorStyle.TWO + + # Mask targets + sep = conv.sep + conv.roles[1] + ": " + for conversation, target in zip(conversations, targets): + total_len = int(target.ne(tokenizer.pad_token_id).sum()) + + rounds = conversation.split(conv.sep2) + cur_len = 1 + target[:cur_len] = IGNORE_INDEX + for i, rou in enumerate(rounds): + if rou == "": + break + + parts = rou.split(sep) + if len(parts) != 2: + break + parts[0] += sep + + if has_image: + round_len = len(tokenizer_image_token(rou, tokenizer)) + instruction_len = len(tokenizer_image_token(parts[0], tokenizer)) - 2 + else: + round_len = len(tokenizer(rou).input_ids) + instruction_len = len(tokenizer(parts[0]).input_ids) - 2 + + if i == len(rounds) - 2: #last round, keep answer for training + target[cur_len : cur_len + instruction_len] = IGNORE_INDEX + else: + target[cur_len : cur_len + round_len] = IGNORE_INDEX #previous rounds - mask everything + + cur_len += round_len + target[cur_len:] = IGNORE_INDEX + + if cur_len < tokenizer.model_max_length: + if cur_len != total_len: + target[:] = IGNORE_INDEX + print( + f"WARNING: tokenization mismatch: {cur_len} vs. {total_len}." + f" (ignored)" + ) + + return dict( + input_ids=input_ids, + labels=targets, + ) + + +def preprocess_mpt( + sources, + tokenizer: transformers.PreTrainedTokenizer, +) -> Dict: + conv = conversation_lib.default_conversation.copy() + roles = {"human": conv.roles[0], "gpt": conv.roles[1]} + + # Apply prompt templates + conversations = [] + for i, source in enumerate(sources): + if roles[source[0]["from"]] != conv.roles[0]: + # Skip the first one if it is not from human + source = source[1:] + + conv.messages = [] + for j, sentence in enumerate(source): + role = roles[sentence["from"]] + assert role == conv.roles[j % 2], f"{i}" + conv.append_message(role, sentence["value"]) + conversations.append(conv.get_prompt()) + + # Tokenize conversations + input_ids = torch.stack([tokenizer_image_token(prompt, tokenizer, return_tensors='pt') for prompt in conversations], dim=0) + targets = input_ids.clone() + assert conv.sep_style == conversation_lib.SeparatorStyle.MPT + + # Mask targets + sep = conv.sep + conv.roles[1] + for conversation, target in zip(conversations, targets): + total_len = int(target.ne(tokenizer.pad_token_id).sum()) + + rounds = conversation.split(conv.sep) + re_rounds = [conv.sep.join(rounds[:3])] # system + user + gpt + for conv_idx in range(3, len(rounds), 2): + re_rounds.append(conv.sep.join(rounds[conv_idx:conv_idx+2])) # user + gpt + cur_len = 0 + target[:cur_len] = IGNORE_INDEX + for i, rou in enumerate(re_rounds): + if rou == "": + break + + parts = rou.split(sep) + if len(parts) != 2: + break + parts[0] += sep + round_len = len(tokenizer_image_token(rou, tokenizer)) + len(tokenizer_image_token(conv.sep, tokenizer)) + instruction_len = len(tokenizer_image_token(parts[0], tokenizer)) + target[cur_len : cur_len + instruction_len] = IGNORE_INDEX + + cur_len += round_len + target[cur_len:] = IGNORE_INDEX + + if cur_len < tokenizer.model_max_length: + if cur_len != total_len: + target[:] = IGNORE_INDEX + print( + f"WARNING: tokenization mismatch: {cur_len} vs. {total_len}." + f" (ignored)" + ) + + return dict( + input_ids=input_ids, + labels=targets, + ) + + +def preprocess_plain( + sources: Sequence[str], + tokenizer: transformers.PreTrainedTokenizer, +) -> Dict: + # add end signal and concatenate together + conversations = [] + for source in sources: + assert len(source) == 2 + assert DEFAULT_IMAGE_TOKEN in source[0]['value'] + source[0]['value'] = DEFAULT_IMAGE_TOKEN + conversation = source[0]['value'] + source[1]['value'] + conversation_lib.default_conversation.sep + conversations.append(conversation) + # tokenize conversations + input_ids = [tokenizer_image_token(prompt, tokenizer, return_tensors='pt') for prompt in conversations] + targets = copy.deepcopy(input_ids) + for target, source in zip(targets, sources): + tokenized_len = len(tokenizer_image_token(source[0]['value'], tokenizer)) + target[:tokenized_len] = IGNORE_INDEX + + return dict(input_ids=input_ids, labels=targets) + + +def preprocess( + sources: Sequence[str], + tokenizer: transformers.PreTrainedTokenizer, + has_image: bool = False +) -> Dict: + """ + Given a list of sources, each is a conversation list. This transform: + 1. Add signal '### ' at the beginning each sentence, with end signal '\n'; + 2. Concatenate conversations together; + 3. Tokenize the concatenated conversation; + 4. Make a deepcopy as the target. Mask human words with IGNORE_INDEX. + """ + if conversation_lib.default_conversation.sep_style == conversation_lib.SeparatorStyle.PLAIN: + return preprocess_plain(sources, tokenizer) + if conversation_lib.default_conversation.sep_style == conversation_lib.SeparatorStyle.LLAMA_2: + return preprocess_llama_2(sources, tokenizer, has_image=has_image) + if conversation_lib.default_conversation.version.startswith("v1"): + return preprocess_v1(sources, tokenizer, has_image=has_image) + if conversation_lib.default_conversation.version == "mpt": + return preprocess_mpt(sources, tokenizer) + # add end signal and concatenate together + conversations = [] + for source in sources: + header = f"{conversation_lib.default_conversation.system}\n\n" + conversation = _add_speaker_and_signal(header, source) + conversations.append(conversation) + # tokenize conversations + def get_tokenize_len(prompts): + return [len(tokenizer_image_token(prompt, tokenizer)) for prompt in prompts] + + if has_image: + input_ids = [tokenizer_image_token(prompt, tokenizer, return_tensors='pt') for prompt in conversations] + else: + conversations_tokenized = _tokenize_fn(conversations, tokenizer) + input_ids = conversations_tokenized["input_ids"] + + targets = copy.deepcopy(input_ids) + for target, source in zip(targets, sources): + if has_image: + tokenized_lens = get_tokenize_len([header] + [s["value"] for s in source]) + else: + tokenized_lens = _tokenize_fn([header] + [s["value"] for s in source], tokenizer)["input_ids_lens"] + speakers = [sentence["from"] for sentence in source] + _mask_targets(target, tokenized_lens, speakers) + + return dict(input_ids=input_ids, labels=targets) + +class ExpandChannels: + """ + Transforms an image with one channel to an image with three channels by copying + pixel intensities of the image along the 1st dimension. + """ + + def __call__(self, data: torch.Tensor) -> torch.Tensor: + """ + :param data: Tensor of shape [1, H, W]. + :return: Tensor with channel copied three times, shape [3, H, W]. + """ + if data.shape[0] != 1: + raise ValueError(f"Expected input of shape [1, H, W], found {data.shape}") + return torch.repeat_interleave(data, 3, dim=0) + + +def _apply_op(img: Tensor, op_name: str, magnitude: float, + interpolation: InterpolationMode, fill: Optional[List[float]]): + if op_name == "ShearX": + img = F.affine(img, angle=0.0, translate=[0, 0], scale=1.0, shear=[math.degrees(magnitude), 0.0], + interpolation=interpolation, fill=fill) + elif op_name == "ShearY": + img = F.affine(img, angle=0.0, translate=[0, 0], scale=1.0, shear=[0.0, math.degrees(magnitude)], + interpolation=interpolation, fill=fill) + elif op_name == "TranslateX": + img = F.affine(img, angle=0.0, translate=[int(magnitude), 0], scale=1.0, + interpolation=interpolation, shear=[0.0, 0.0], fill=fill) + elif op_name == "TranslateY": + img = F.affine(img, angle=0.0, translate=[0, int(magnitude)], scale=1.0, + interpolation=interpolation, shear=[0.0, 0.0], fill=fill) + elif op_name == "Rotate": + img = F.rotate(img, magnitude, interpolation=interpolation, fill=fill) + elif op_name == "Brightness": + img = F.adjust_brightness(img, 1.0 + magnitude) + elif op_name == "Color": + img = F.adjust_saturation(img, 1.0 + magnitude) + elif op_name == "Contrast": + img = F.adjust_contrast(img, 1.0 + magnitude) + elif op_name == "Sharpness": + img = F.adjust_sharpness(img, 1.0 + magnitude) + elif op_name == "Posterize": + img = F.posterize(img, int(magnitude)) + elif op_name == "Solarize": + img = F.solarize(img, magnitude) + elif op_name == "AutoContrast": + img = F.autocontrast(img) + elif op_name == "Equalize": + img = F.equalize(img) + elif op_name == "Invert": + img = F.invert(img) + elif op_name == "Identity": + pass + else: + raise ValueError("The provided operator {} is not recognized.".format(op_name)) + return img + +class TrivialAugmentWide(torch.nn.Module): + r"""Dataset-independent data-augmentation with TrivialAugment Wide, as described in + `"TrivialAugment: Tuning-free Yet State-of-the-Art Data Augmentation" `. + If the image is torch Tensor, it should be of type torch.uint8, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + Args: + num_magnitude_bins (int): The number of different magnitude values. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + def __init__(self, num_magnitude_bins: int = 31, interpolation: InterpolationMode = InterpolationMode.NEAREST, + fill: Optional[List[float]] = None, strength: float = 1.0) -> None: + super().__init__() + self.num_magnitude_bins = num_magnitude_bins + self.interpolation = interpolation + self.fill = fill + self.strength = max(0.0, min(strength, 1.0)) # Ensuring strength is within [0, 1] + + def _augmentation_space(self, num_bins: int) -> Dict[str, Tuple[Tensor, bool]]: + scale_factor = self.strength + return { + "Identity": (torch.tensor(0.0), False), + "ShearX": (torch.linspace(0.0, 0.99 * scale_factor, num_bins), True), + "ShearY": (torch.linspace(0.0, 0.99 * scale_factor, num_bins), True), + "TranslateX": (torch.linspace(0.0, 32.0 * scale_factor, num_bins), True), + "TranslateY": (torch.linspace(0.0, 32.0 * scale_factor, num_bins), True), + "Rotate": (torch.linspace(0.0, 135.0 * scale_factor, num_bins), True), + "Brightness": (torch.linspace(0.0, 0.99 * scale_factor, num_bins), True), + "Color": (torch.linspace(0.0, 0.99 * scale_factor, num_bins), True), + "Contrast": (torch.linspace(0.0, 0.99 * scale_factor, num_bins), True), + "Sharpness": (torch.linspace(0.0, 0.99 * scale_factor, num_bins), True), + #"Posterize": (8 - (torch.arange(num_bins) / ((num_bins - 1) / 6)).round().int(), False), + "Solarize": (torch.linspace(256.0, 0.0, num_bins), False), + "AutoContrast": (torch.tensor(0.0), False), + } + + def forward(self, img: Tensor) -> Tensor: + """ + img (PIL Image or Tensor): Image to be transformed. + Returns: + PIL Image or Tensor: Transformed image. + """ + fill = self.fill + if isinstance(img, Tensor): + if isinstance(fill, (int, float)): + fill = [float(fill)] * F.get_image_num_channels(img) + elif fill is not None: + fill = [float(f) for f in fill] + + op_meta = self._augmentation_space(self.num_magnitude_bins) + op_index = int(torch.randint(len(op_meta), (1,)).item()) + op_name = list(op_meta.keys())[op_index] + magnitudes, signed = op_meta[op_name] + magnitude = float(magnitudes[torch.randint(len(magnitudes), (1,), dtype=torch.long)].item()) \ + if magnitudes.ndim > 0 else 0.0 + if signed and torch.randint(2, (1,)): + magnitude *= -1.0 + + return _apply_op(img, op_name, magnitude, interpolation=self.interpolation, fill=fill) + + def __repr__(self) -> str: + s = self.__class__.__name__ + '(' + s += 'num_magnitude_bins={num_magnitude_bins}' + s += ', interpolation={interpolation}' + s += ', fill={fill}' + s += ')' + return s.format(**self.__dict__) + +class LazySupervisedDataset(Dataset): + """Dataset for supervised fine-tuning.""" + + def __init__(self, data_path: str, + tokenizer: transformers.PreTrainedTokenizer, + data_args: DataArguments): + super(LazySupervisedDataset, self).__init__() + list_data_dict = json.load(open(data_path, "r")) + + rank0_print("Formatting inputs...Skip in lazy mode") + self.tokenizer = tokenizer + self.list_data_dict = list_data_dict + self.data_args = data_args + self.do_img_order_augment = self.data_args.do_img_order_augment + + self.vis_transforms_biovil = self.create_chest_xray_transform_for_inference(512, center_crop_size=448) + + if self.data_args.do_augment: + self.augment = TrivialAugmentWide(strength=0.5) #0.2 weak, 0.5 strong + else: + self.augment = None + + def __len__(self): + return len(self.list_data_dict) + + def create_chest_xray_transform_for_inference(self, resize: int, center_crop_size: int) -> Compose: + """ + Defines the image transformation pipeline for Chest-Xray datasets. + + :param resize: The size to resize the image to. Linear resampling is used. + Resizing is applied on the axis with smaller shape. + :param center_crop_size: The size to center crop the image to. Square crop is applied. + """ + + transforms = [Resize(resize), CenterCrop(center_crop_size), ToTensor(), ExpandChannels()] + return Compose(transforms) + + @property + def lengths(self): + length_list = [] + for sample in self.list_data_dict: + img_tokens = 128 if 'image' in sample else 0 + length_list.append(sum(len(conv['value'].split()) for conv in sample['conversations']) + img_tokens) + return length_list + + @property + def modality_lengths(self): + length_list = [] + for sample in self.list_data_dict: + cur_len = sum(len(conv['value'].split()) for conv in sample['conversations']) + cur_len = cur_len if 'image' in sample else -cur_len + length_list.append(cur_len) + return length_list + + def remap_to_uint8(self, array: np.ndarray, percentiles=None) -> np.ndarray: + """Remap values in input so the output range is :math:`[0, 255]`. + + Percentiles can be used to specify the range of values to remap. + This is useful to discard outliers in the input data. + + :param array: Input array. + :param percentiles: Percentiles of the input values that will be mapped to ``0`` and ``255``. + Passing ``None`` is equivalent to using percentiles ``(0, 100)`` (but faster). + :returns: Array with ``0`` and ``255`` as minimum and maximum values. + """ + array = array.astype(float) + if percentiles is not None: + len_percentiles = len(percentiles) + if len_percentiles != 2: + message = ( + 'The value for percentiles should be a sequence of length 2,' + f' but has length {len_percentiles}' + ) + raise ValueError(message) + a, b = percentiles + if a >= b: + raise ValueError(f'Percentiles must be in ascending order, but a sequence "{percentiles}" was passed') + if a < 0 or b > 100: + raise ValueError(f'Percentiles must be in the range [0, 100], but a sequence "{percentiles}" was passed') + cutoff: np.ndarray = np.percentile(array, percentiles) + array = np.clip(array, *cutoff) + array -= array.min() + array /= array.max() + array *= 255 + return array.astype(np.uint8) + + def load_image_biovil(self, image_folder, image_file) -> Image.Image: + """Load an image from disk. + + The image values are remapped to :math:`[0, 255]` and cast to 8-bit unsigned integers. + + :param path: Path to image. + :returns: Image as ``Pillow`` ``Image``. + """ + # Although ITK supports JPEG and PNG, we use Pillow for consistency with older trained models + if image_file.startswith('/home'): # full path + path = pathlib.Path(image_file) + elif image_file.startswith('files/'): # mimic-cxr + path = pathlib.Path(os.path.join(image_folder, image_file)) + else: + path = pathlib.Path("/home/guests/chantal_pellegrini/" + image_file) #radrestruct + if path.suffix in [".jpg", ".jpeg", ".png"]: + image = io.imread(path) + else: + raise ValueError(f"Image type not supported, filename was: {path}") + + image = self.remap_to_uint8(image) + return Image.fromarray(image).convert("L") + + def __getitem__(self, i) -> Dict[str, torch.Tensor]: + sources = self.list_data_dict[i] + if isinstance(i, int): + sources = [sources] + assert len(sources) == 1, "Don't know why it is wrapped to a list" # FIXME + if 'image' in sources[0]: # 1 or multiple current images + image_files = self.list_data_dict[i]['image'] if type(self.list_data_dict[i]['image']) == list else [self.list_data_dict[i]['image']] #convert to list + image_folder = self.data_args.image_folder + + if self.do_img_order_augment: + random.shuffle(image_files) + n_images = random.randint(1,len(image_files)) + image_files = image_files[:n_images] + + if self.data_args.vision_tower == 'biovil': + images = [self.load_image_biovil(image_folder, image_file) for image_file in image_files] + # augment images + if self.augment is not None: + images = [self.augment(image) for image in images] + images = [self.vis_transforms_biovil(img) for img in images] + else: + processor = self.data_args.image_processor + images = [Image.open(os.path.join(image_folder, image_file)).convert('RGB') for image_file in image_files] + if self.data_args.image_aspect_ratio == 'pad': + def expand2square(pil_img, background_color): + width, height = pil_img.size + if width == height: + return pil_img + elif width > height: + result = Image.new(pil_img.mode, (width, width), background_color) + result.paste(pil_img, (0, (width - height) // 2)) + return result + else: + result = Image.new(pil_img.mode, (height, height), background_color) + result.paste(pil_img, ((height - width) // 2, 0)) + return result + images = [expand2square(image, tuple(int(x*255) for x in processor.image_mean)) for image in images] + images = [processor.preprocess(image, return_tensors='pt')['pixel_values'][0] for image in images] + else: + images = [processor.preprocess(image, return_tensors='pt')['pixel_values'][0] for image in images] + # stack images + images = torch.stack(images, dim=0).squeeze() #stack and drop unnecessary dimension + + if 'prev_image' in sources[0]: # 1 or multiple previous images + raise NotImplementedError("Previous image is not supported yet") + prev_image_files = self.list_data_dict[i]['prev_image'] if type(self.list_data_dict[i]['prev_image']) == list else [ + self.list_data_dict[i]['prev_image']] # convert to list + image_folder = self.data_args.image_folder + + if self.data_args.vision_tower == 'biovil': + prev_images = [self.load_image_biovil(image_folder, image_file) for image_file in prev_image_files] + + prev_images = [self.vis_transforms_biovil(img) for img in prev_images] + else: + processor = self.data_args.image_processor + prev_images = [Image.open(os.path.join(image_folder, image_file)).convert('RGB') for image_file in prev_image_files] + if self.data_args.image_aspect_ratio == 'pad': + def expand2square(pil_img, background_color): + width, height = pil_img.size + if width == height: + return pil_img + elif width > height: + result = Image.new(pil_img.mode, (width, width), background_color) + result.paste(pil_img, (0, (width - height) // 2)) + return result + else: + result = Image.new(pil_img.mode, (height, height), background_color) + result.paste(pil_img, ((height - width) // 2, 0)) + return result + + prev_images = [expand2square(image, tuple(int(x * 255) for x in processor.image_mean)) for image in prev_images] + prev_images = [processor.preprocess(image, return_tensors='pt')['pixel_values'][0] for image in prev_images] + else: + prev_images = [processor.preprocess(image, return_tensors='pt')['pixel_values'][0] for image in prev_images] + + # stack images + prev_images = torch.stack(prev_images, dim=0).squeeze() if len(prev_images) > 0 else prev_images #stack and drop unnecessary dimension + + # drop images from the data + sources = preprocess_multimodal( + copy.deepcopy([e["conversations"] for e in sources]), + self.data_args) + + else: + sources = copy.deepcopy([e["conversations"] for e in sources]) + data_dict = preprocess( + sources, + self.tokenizer, + has_image=('image' in self.list_data_dict[i])) + if isinstance(i, int): + data_dict = dict(input_ids=data_dict["input_ids"][0], + labels=data_dict["labels"][0]) + + # image exist in the data + if 'image' in self.list_data_dict[i]: + data_dict['image'] = images[0] if len(images) == 1 else images + if 'prev_image' in self.list_data_dict[i]: + data_dict['prev_image'] = prev_images[0] if len(prev_images) == 1 else prev_images + if prev_images == []: + data_dict['prev_image'] = None + elif self.data_args.is_multimodal: + # image does not exist in the data, but the model is multimodal + crop_size = self.data_args.image_processor.crop_size + data_dict['image'] = torch.zeros(3, crop_size['height'], crop_size['width']) + return data_dict + + +@dataclass +class DataCollatorForSupervisedDataset(object): + """Collate examples for supervised fine-tuning.""" + + tokenizer: transformers.PreTrainedTokenizer + + def __call__(self, instances: Sequence[Dict]) -> Dict[str, torch.Tensor]: + input_ids, labels = tuple([instance[key] for instance in instances] + for key in ("input_ids", "labels")) + input_ids = torch.nn.utils.rnn.pad_sequence( + input_ids, + batch_first=True, + padding_value=self.tokenizer.pad_token_id) + labels = torch.nn.utils.rnn.pad_sequence(labels, + batch_first=True, + padding_value=IGNORE_INDEX) + input_ids = input_ids[:, :self.tokenizer.model_max_length] + labels = labels[:, :self.tokenizer.model_max_length] + batch = dict( + input_ids=input_ids, + labels=labels, + attention_mask=input_ids.ne(self.tokenizer.pad_token_id), + ) + + if 'image' in instances[0]: + images = [instance['image'] for instance in instances] + if not 'prev_image' in instances[0] and all(x is not None and x.shape == images[0].shape for x in images): + batch['images'] = torch.stack(images) + else: + # extend the dimension of all images to 4 if it is only 3 (1x dimension to be treated as multi-image) + images = [image.unsqueeze(0) if len(image.shape) == 3 else image for image in images] + batch['images'] = images + + if 'prev_image' in instances[0]: + prev_images = [instance['prev_image'] for instance in instances] + prev_images = [image.unsqueeze(0) if len(image.shape) == 3 else image for image in prev_images] + batch['prev_images'] = prev_images + + return batch + + +def make_supervised_data_module(tokenizer: transformers.PreTrainedTokenizer, + data_args) -> Dict: + """Make dataset and collator for supervised fine-tuning.""" + train_dataset = LazySupervisedDataset(tokenizer=tokenizer, + data_path=data_args.data_path, + data_args=data_args) + data_collator = DataCollatorForSupervisedDataset(tokenizer=tokenizer) + return dict(train_dataset=train_dataset, + eval_dataset=None, + data_collator=data_collator) + + +def train(): + global local_rank + + parser = transformers.HfArgumentParser( + (ModelArguments, DataArguments, TrainingArguments)) + model_args, data_args, training_args = parser.parse_args_into_dataclasses() + data_args.vision_tower = model_args.vision_tower #info for image preprocessing + local_rank = training_args.local_rank + compute_dtype = (torch.float16 if training_args.fp16 else (torch.bfloat16 if training_args.bf16 else torch.float32)) + + bnb_model_from_pretrained_args = {} + if training_args.bits in [4, 8]: + from transformers import BitsAndBytesConfig + bnb_model_from_pretrained_args.update(dict( + device_map={"": training_args.device}, + load_in_4bit=training_args.bits == 4, + load_in_8bit=training_args.bits == 8, + quantization_config=BitsAndBytesConfig( + load_in_4bit=training_args.bits == 4, + load_in_8bit=training_args.bits == 8, + llm_int8_skip_modules=["mm_projector", "image_pooler"], + llm_int8_threshold=6.0, + llm_int8_has_fp16_weight=False, + bnb_4bit_compute_dtype=compute_dtype, + bnb_4bit_use_double_quant=training_args.double_quant, + bnb_4bit_quant_type=training_args.quant_type # {'fp4', 'nf4'} + ) + )) + + if model_args.vision_tower is not None: + if 'mpt' in model_args.model_name_or_path: + config = transformers.AutoConfig.from_pretrained(model_args.model_name_or_path, trust_remote_code=True) + config.attn_config['attn_impl'] = training_args.mpt_attn_impl + model = LlavaMPTForCausalLM.from_pretrained( + model_args.model_name_or_path, + config=config, + cache_dir=training_args.cache_dir, + **bnb_model_from_pretrained_args + ) + else: + model = LlavaLlamaForCausalLM.from_pretrained( + model_args.model_name_or_path, + mv_type = model_args.mv_type, + mm_vision_tower=model_args.vision_tower, + cache_dir=training_args.cache_dir, + ignore_mismatched_sizes=True, + **bnb_model_from_pretrained_args + ) + else: + model = transformers.LlamaForCausalLM.from_pretrained( + model_args.model_name_or_path, + cache_dir=training_args.cache_dir, + **bnb_model_from_pretrained_args + ) + model.config.use_cache = False + + if model_args.freeze_backbone: + model.model.requires_grad_(False) + + if training_args.bits in [4, 8]: + from peft import prepare_model_for_kbit_training + model.config.torch_dtype=(torch.float32 if training_args.fp16 else (torch.bfloat16 if training_args.bf16 else torch.float32)) + model = prepare_model_for_kbit_training(model, use_gradient_checkpointing=training_args.gradient_checkpointing) + + if training_args.gradient_checkpointing: + if hasattr(model, "enable_input_require_grads"): + model.enable_input_require_grads() + else: + def make_inputs_require_grad(module, input, output): + output.requires_grad_(True) + model.get_input_embeddings().register_forward_hook(make_inputs_require_grad) + + if training_args.lora_enable: + from peft import LoraConfig, get_peft_model + lora_config = LoraConfig( + r=training_args.lora_r, + lora_alpha=training_args.lora_alpha, + target_modules=find_all_linear_names(model), + lora_dropout=training_args.lora_dropout, + bias=training_args.lora_bias, + task_type="CAUSAL_LM", + ) + if training_args.bits == 16: + if training_args.bf16: + model.to(torch.bfloat16) + if training_args.fp16: + model.to(torch.float16) + rank0_print("Adding LoRA adapters...") + model = get_peft_model(model, lora_config) + + if 'mpt' in model_args.model_name_or_path: + tokenizer = transformers.AutoTokenizer.from_pretrained( + model_args.model_name_or_path, + cache_dir=training_args.cache_dir, + model_max_length=training_args.model_max_length, + padding_side="right" + ) + else: + tokenizer = transformers.AutoTokenizer.from_pretrained( + model_args.model_name_or_path, + cache_dir=training_args.cache_dir, + model_max_length=training_args.model_max_length, + padding_side="right", + use_fast=False, + ) + + if model_args.version == "v0": + if tokenizer.pad_token is None: + smart_tokenizer_and_embedding_resize( + special_tokens_dict=dict(pad_token="[PAD]"), + tokenizer=tokenizer, + model=model, + ) + elif model_args.version == "v0.5": + tokenizer.pad_token = tokenizer.unk_token + else: + tokenizer.pad_token = tokenizer.unk_token + if model_args.version in conversation_lib.conv_templates: + conversation_lib.default_conversation = conversation_lib.conv_templates[model_args.version] + else: + conversation_lib.default_conversation = conversation_lib.conv_templates["vicuna_v1"] + + if model_args.vision_tower is not None: + model.get_model().initialize_vision_modules( + model_args=model_args, + fsdp=training_args.fsdp + ) + + vision_tower = model.get_vision_tower() + vision_tower.to(dtype=torch.bfloat16 if training_args.bf16 else torch.float16, device=training_args.device) + + data_args.image_processor = vision_tower.image_processor + data_args.is_multimodal = True + + model.config.image_aspect_ratio = data_args.image_aspect_ratio + model.config.tokenizer_padding_side = tokenizer.padding_side + model.config.tokenizer_model_max_length = tokenizer.model_max_length + + model.config.tune_mm_mlp_adapter = training_args.tune_mm_mlp_adapter = model_args.tune_mm_mlp_adapter + if model_args.tune_mm_mlp_adapter: + model.requires_grad_(False) + for p in model.get_model().mm_projector.parameters(): + p.requires_grad = True + + model.config.freeze_mm_mlp_adapter = training_args.freeze_mm_mlp_adapter + if training_args.freeze_mm_mlp_adapter: + for p in model.get_model().mm_projector.parameters(): + p.requires_grad = False + + # reinitialize image_pooler + if model.get_model().image_pooler is not None: + model.get_model().image_pooler.bert = model.get_model().image_pooler.bert.apply(model.get_model().image_pooler.bert._init_weights) + + if training_args.bits in [4, 8]: + model.get_model().mm_projector.to(dtype=compute_dtype, device=training_args.device) + model.get_model().image_pooler.to(dtype=compute_dtype, device=training_args.device) + + model.config.mm_use_im_start_end = data_args.mm_use_im_start_end = model_args.mm_use_im_start_end + model.config.mm_projector_lr = training_args.mm_projector_lr + training_args.use_im_start_end = model_args.mm_use_im_start_end + model.config.mm_use_im_patch_token = model_args.mm_use_im_patch_token + model.initialize_vision_tokenizer(model_args, tokenizer=tokenizer) + + if training_args.unfreeze_n_vision_tower_layers is not None: + if data_args.vision_tower == 'biovil': + print(f'Unfreezing all vision tower layers') + for param in model.get_vision_tower().parameters(): + param.requires_grad = True + # unfreeze vit_pooler and last image encoder layer + # print(f'Unfreezing partial vision tower layers') + # for param in model.get_vision_tower().encoder.encoder.layer4.parameters(): + # param.requires_grad = True + # for param in model.get_vision_tower().encoder.encoder.fc.parameters(): + # param.requires_grad = True + # for param in model.get_vision_tower().encoder.vit_pooler.parameters(): + # param.requires_grad = True + else: + print(f'Unfreezing last {training_args.unfreeze_n_vision_tower_layers} layers of vision tower') + for layer in model.get_vision_tower().vision_tower.vision_model.encoder.layers[-training_args.unfreeze_n_vision_tower_layers:]: + for param in layer.parameters(): + param.requires_grad = True + + if training_args.bits in [4, 8]: + from peft.tuners.lora import LoraLayer + for name, module in model.named_modules(): + if isinstance(module, LoraLayer): + if training_args.bf16: + module = module.to(torch.bfloat16) + if 'norm' in name: + module = module.to(torch.float32) + if 'lm_head' in name or 'embed_tokens' in name: + if hasattr(module, 'weight'): + if training_args.bf16 and module.weight.dtype == torch.float32: + module = module.to(torch.bfloat16) + + data_module = make_supervised_data_module(tokenizer=tokenizer, + data_args=data_args) + + from transformers import TrainerCallback + class SaveCallback(TrainerCallback): + def on_save(self, args, state, control, **kwargs): + print("on save") + checkpoint_dir = os.path.join(args.output_dir, 'checkpoint-{}'.format(state.global_step)) + if args.lora_enable: + state_dict = get_peft_state_maybe_zero_3( + model.named_parameters(), training_args.lora_bias + ) + non_lora_state_dict = get_peft_state_non_lora_maybe_zero_3_extended( + model + ) + print("Saving LoRA state dict...") + print(args.local_rank) + if args.local_rank in [-1, 0]: + model.config.save_pretrained(checkpoint_dir) + model.save_pretrained(checkpoint_dir, state_dict=state_dict) + print(checkpoint_dir) + torch.save(non_lora_state_dict, os.path.join(checkpoint_dir, 'non_lora_trainables.bin')) + + from llava.train.llama_patch import upcast_layer_for_flash_attention + model = upcast_layer_for_flash_attention(model, torch.bfloat16) + trainer = LLaVATrainer(model=model, + tokenizer=tokenizer, + args=training_args, + callbacks=[SaveCallback()], + **data_module) + + if list(pathlib.Path(training_args.output_dir).glob("checkpoint-*")): + trainer.train(resume_from_checkpoint=True) + else: + trainer.train() + trainer.save_state() + + model.config.use_cache = True + + if training_args.lora_enable: + state_dict = get_peft_state_maybe_zero_3( + model.named_parameters(), training_args.lora_bias + ) + non_lora_state_dict = get_peft_state_non_lora_maybe_zero_3_extended( + model + ) + if training_args.local_rank == 0 or training_args.local_rank == -1: + model.config.save_pretrained(training_args.output_dir) + model.save_pretrained(training_args.output_dir, state_dict=state_dict) + torch.save(non_lora_state_dict, os.path.join(training_args.output_dir, 'non_lora_trainables.bin')) + else: + safe_save_model_for_hf_trainer(trainer=trainer, + output_dir=training_args.output_dir) + + +if __name__ == "__main__": + train() diff --git a/LLAVA_Biovil/llava/train/train_mem.py b/LLAVA_Biovil/llava/train/train_mem.py new file mode 100644 index 0000000000000000000000000000000000000000..2487d317855b27d5b07a755ee0389667e4964f02 --- /dev/null +++ b/LLAVA_Biovil/llava/train/train_mem.py @@ -0,0 +1,13 @@ +# Adopted from https://github.com/lm-sys/FastChat. Below is the original copyright: +# Adopted from tatsu-lab@stanford_alpaca. Below is the original copyright: +# Make it more memory efficient by monkey patching the LLaMA model with FlashAttn. + +# Need to call this before importing transformers. +from llava.train.llama_flash_attn_monkey_patch import replace_llama_attn_with_flash_attn + +replace_llama_attn_with_flash_attn() + +from llava.train.train import train + +if __name__ == "__main__": + train() diff --git a/LLAVA_Biovil/llava/train/train_xformers.py b/LLAVA_Biovil/llava/train/train_xformers.py new file mode 100644 index 0000000000000000000000000000000000000000..90a82b09e273f65964f1a4e22dcdf61ea5fc0a12 --- /dev/null +++ b/LLAVA_Biovil/llava/train/train_xformers.py @@ -0,0 +1,13 @@ +# Make it more memory efficient by monkey patching the LLaMA model with xformers attention. + +# Need to call this before importing transformers. +from LLAV.llava.train.llama_xformers_attn_monkey_patch import ( + replace_llama_attn_with_xformers_attn, +) + +replace_llama_attn_with_xformers_attn() + +from LLAV.llava.train.train import train + +if __name__ == "__main__": + train() diff --git a/LLAVA_Biovil/llava/utils.py b/LLAVA_Biovil/llava/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..6a9de097b66616cfae6af6d0ee78164d68fed0a7 --- /dev/null +++ b/LLAVA_Biovil/llava/utils.py @@ -0,0 +1,125 @@ +import logging +import logging.handlers +import os +import sys + +import requests + +from llava.constants import LOGDIR + +server_error_msg = "**NETWORK ERROR DUE TO HIGH TRAFFIC. PLEASE REGENERATE OR REFRESH THIS PAGE.**" +moderation_msg = "YOUR INPUT VIOLATES OUR CONTENT MODERATION GUIDELINES. PLEASE TRY AGAIN." + +handler = None + + +def build_logger(logger_name, logger_filename): + global handler + + formatter = logging.Formatter( + fmt="%(asctime)s | %(levelname)s | %(name)s | %(message)s", + datefmt="%Y-%m-%d %H:%M:%S", + ) + + # Set the format of root handlers + if not logging.getLogger().handlers: + logging.basicConfig(level=logging.INFO) + logging.getLogger().handlers[0].setFormatter(formatter) + + # Redirect stdout and stderr to loggers + stdout_logger = logging.getLogger("stdout") + stdout_logger.setLevel(logging.INFO) + sl = StreamToLogger(stdout_logger, logging.INFO) + sys.stdout = sl + + stderr_logger = logging.getLogger("stderr") + stderr_logger.setLevel(logging.ERROR) + sl = StreamToLogger(stderr_logger, logging.ERROR) + sys.stderr = sl + + # Get logger + logger = logging.getLogger(logger_name) + logger.setLevel(logging.INFO) + + # Add a file handler for all loggers + if handler is None: + os.makedirs(LOGDIR, exist_ok=True) + filename = os.path.join(LOGDIR, logger_filename) + handler = logging.handlers.TimedRotatingFileHandler( + filename, when='D', utc=True, encoding='UTF-8') + handler.setFormatter(formatter) + + for name, item in logging.root.manager.loggerDict.items(): + if isinstance(item, logging.Logger): + item.addHandler(handler) + + return logger + + +class StreamToLogger(object): + """ + Fake file-like stream object that redirects writes to a logger instance. + """ + def __init__(self, logger, log_level=logging.INFO): + self.terminal = sys.stdout + self.logger = logger + self.log_level = log_level + self.linebuf = '' + + def __getattr__(self, attr): + return getattr(self.terminal, attr) + + def write(self, buf): + temp_linebuf = self.linebuf + buf + self.linebuf = '' + for line in temp_linebuf.splitlines(True): + # From the io.TextIOWrapper docs: + # On output, if newline is None, any '\n' characters written + # are translated to the system default line separator. + # By default sys.stdout.write() expects '\n' newlines and then + # translates them so this is still cross platform. + if line[-1] == '\n': + self.logger.log(self.log_level, line.rstrip()) + else: + self.linebuf += line + + def flush(self): + if self.linebuf != '': + self.logger.log(self.log_level, self.linebuf.rstrip()) + self.linebuf = '' + + +def disable_torch_init(): + """ + Disable the redundant torch default initialization to accelerate model creation. + """ + import torch + setattr(torch.nn.Linear, "reset_parameters", lambda self: None) + setattr(torch.nn.LayerNorm, "reset_parameters", lambda self: None) + + +def violates_moderation(text): + """ + Check whether the text violates OpenAI moderation API. + """ + url = "https://api.openai.com/v1/moderations" + headers = {"Content-Type": "application/json", + "Authorization": "Bearer " + os.environ["OPENAI_API_KEY"]} + text = text.replace("\n", "") + data = "{" + '"input": ' + f'"{text}"' + "}" + data = data.encode("utf-8") + try: + ret = requests.post(url, headers=headers, data=data, timeout=5) + flagged = ret.json()["results"][0]["flagged"] + except requests.exceptions.RequestException as e: + flagged = False + except KeyError as e: + flagged = False + + return flagged + + +def pretty_print_semaphore(semaphore): + if semaphore is None: + return "None" + return f"Semaphore(value={semaphore._value}, locked={semaphore.locked()})" diff --git a/LLAVA_Biovil/predict.py b/LLAVA_Biovil/predict.py new file mode 100644 index 0000000000000000000000000000000000000000..9b91829d502696ca03237c9dee8e162292831e1e --- /dev/null +++ b/LLAVA_Biovil/predict.py @@ -0,0 +1,157 @@ +import torch + +from llava import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN +from llava import conv_templates, SeparatorStyle +from llava import load_pretrained_model +from llava import disable_torch_init +from llava import tokenizer_image_token, KeywordsStoppingCriteria +from transformers.generation.streamers import TextIteratorStreamer + +from PIL import Image + +import requests +from io import BytesIO + +from cog import BasePredictor, Input, Path, ConcatenateIterator +import time +import subprocess +from threading import Thread + +import os +os.environ["HUGGINGFACE_HUB_CACHE"] = os.getcwd() + "/weights" + +# url for the weights mirror +REPLICATE_WEIGHTS_URL = "https://weights.replicate.delivery/default" +# files to download from the weights mirrors +weights = [ + { + "dest": "liuhaotian/llava-v1.5-13b", + # git commit hash from huggingface + "src": "llava-v1.5-13b/006818fc465ebda4c003c0998674d9141d8d95f8", + "files": [ + "config.json", + "generation_config.json", + "pytorch_model-00001-of-00003.bin", + "pytorch_model-00002-of-00003.bin", + "pytorch_model-00003-of-00003.bin", + "pytorch_model.bin.index.json", + "special_tokens_map.json", + "tokenizer.model", + "tokenizer_config.json", + ] + }, + { + "dest": "openai/clip-vit-large-patch14-336", + "src": "clip-vit-large-patch14-336/ce19dc912ca5cd21c8a653c79e251e808ccabcd1", + "files": [ + "config.json", + "preprocessor_config.json", + "pytorch_model.bin" + ], + } +] + +def download_json(url: str, dest: Path): + res = requests.get(url, allow_redirects=True) + if res.status_code == 200 and res.content: + with dest.open("wb") as f: + f.write(res.content) + else: + print(f"Failed to download {url}. Status code: {res.status_code}") + +def download_weights(baseurl: str, basedest: str, files: list[str]): + basedest = Path(basedest) + start = time.time() + print("downloading to: ", basedest) + basedest.mkdir(parents=True, exist_ok=True) + for f in files: + dest = basedest / f + url = os.path.join(REPLICATE_WEIGHTS_URL, baseurl, f) + if not dest.exists(): + print("downloading url: ", url) + if dest.suffix == ".json": + download_json(url, dest) + else: + subprocess.check_call(["pget", url, str(dest)], close_fds=False) + print("downloading took: ", time.time() - start) + +class Predictor(BasePredictor): + def setup(self) -> None: + """Load the model into memory to make running multiple predictions efficient""" + for weight in weights: + download_weights(weight["src"], weight["dest"], weight["files"]) + disable_torch_init() + + self.tokenizer, self.model, self.image_processor, self.context_len = load_pretrained_model("liuhaotian/llava-v1.5-13b", model_name="llava-v1.5-13b", model_base=None, load_8bit=False, load_4bit=False) + + def predict( + self, + image: Path = Input(description="Input image"), + prompt: str = Input(description="Prompt to use for text generation"), + top_p: float = Input(description="When decoding text, samples from the top p percentage of most likely tokens; lower to ignore less likely tokens", ge=0.0, le=1.0, default=1.0), + temperature: float = Input(description="Adjusts randomness of outputs, greater than 1 is random and 0 is deterministic", default=0.2, ge=0.0), + max_tokens: int = Input(description="Maximum number of tokens to generate. A word is generally 2-3 tokens", default=1024, ge=0), + ) -> ConcatenateIterator[str]: + """Run a single prediction on the model""" + + conv_mode = "llava_v1" + conv = conv_templates[conv_mode].copy() + + image_data = load_image(str(image)) + image_tensor = self.image_processor.preprocess(image_data, return_tensors='pt')['pixel_values'].half().cuda() + + # loop start + + # just one turn, always prepend image token + inp = DEFAULT_IMAGE_TOKEN + '\n' + prompt + conv.append_message(conv.roles[0], inp) + + conv.append_message(conv.roles[1], None) + prompt = conv.get_prompt() + + input_ids = tokenizer_image_token(prompt, self.tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + keywords = [stop_str] + stopping_criteria = KeywordsStoppingCriteria(keywords, self.tokenizer, input_ids) + streamer = TextIteratorStreamer(self.tokenizer, skip_prompt=True, timeout=20.0) + + with torch.inference_mode(): + thread = Thread(target=self.model.generate, kwargs=dict( + inputs=input_ids, + images=image_tensor, + do_sample=True, + temperature=temperature, + top_p=top_p, + max_new_tokens=max_tokens, + streamer=streamer, + use_cache=True, + stopping_criteria=[stopping_criteria])) + thread.start() + # workaround: second-to-last token is always " " + # but we want to keep it if it's not the second-to-last token + prepend_space = False + for new_text in streamer: + if new_text == " ": + prepend_space = True + continue + if new_text.endswith(stop_str): + new_text = new_text[:-len(stop_str)].strip() + prepend_space = False + elif prepend_space: + new_text = " " + new_text + prepend_space = False + if len(new_text): + yield new_text + if prepend_space: + yield " " + thread.join() + + +def load_image(image_file): + if image_file.startswith('http') or image_file.startswith('https'): + response = requests.get(image_file) + image = Image.open(BytesIO(response.content)).convert('RGB') + else: + image = Image.open(image_file).convert('RGB') + return image + diff --git a/LLAVA_Biovil/pyproject.toml b/LLAVA_Biovil/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..13d4e0144acac3ba288fea8f349c66ee4c5c3667 --- /dev/null +++ b/LLAVA_Biovil/pyproject.toml @@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "llava" +version = "1.1.3" +description = "Towards GPT-4 like large language and visual assistant." +readme = "README.md" +requires-python = ">=3.8" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Apache Software License", +] +dependencies = [ + "torch==2.0.1", "torchvision==0.15.2", + "transformers==4.31.0", "tokenizers>=0.12.1,<0.14", "sentencepiece==0.1.99", "shortuuid", + "accelerate==0.21.0", "peft==0.4.0", "bitsandbytes==0.41.0", + "pydantic<2,>=1", "markdown2[all]", "numpy", "scikit-learn==1.2.2", + "gradio==3.35.2", "gradio_client==0.2.9", + "requests", "httpx==0.24.0", "uvicorn", "fastapi", + "einops==0.6.1", "einops-exts==0.0.4", "timm==0.6.13", +] + +[project.optional-dependencies] +train = ["deepspeed==0.9.5", "ninja", "wandb"] + +[project.urls] +"Homepage" = "https://llava-vl.github.io" +"Bug Tracker" = "https://github.com/haotian-liu/LLaVA/issues" + +[tool.setuptools.packages.find] +exclude = ["assets*", "benchmark*", "docs", "dist*", "playground*", "scripts*", "tests*"] + +[tool.wheel] +exclude = ["assets*", "benchmark*", "docs", "dist*", "playground*", "scripts*", "tests*"] diff --git a/LLAVA_Biovil/scripts/convert_gqa_for_eval.py b/LLAVA_Biovil/scripts/convert_gqa_for_eval.py new file mode 100644 index 0000000000000000000000000000000000000000..4d46c8b876df618faac548e9b369109d541f4f23 --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_gqa_for_eval.py @@ -0,0 +1,18 @@ +import os +import json +import argparse + +parser = argparse.ArgumentParser() +parser.add_argument("--src", type=str) +parser.add_argument("--dst", type=str) +args = parser.parse_args() + +all_answers = [] +for line_idx, line in enumerate(open(args.src)): + res = json.loads(line) + question_id = res['question_id'] + text = res['text'].rstrip('.').lower() + all_answers.append({"questionId": question_id, "prediction": text}) + +with open(args.dst, 'w') as f: + json.dump(all_answers, f) diff --git a/LLAVA_Biovil/scripts/convert_mmbench_for_submission.py b/LLAVA_Biovil/scripts/convert_mmbench_for_submission.py new file mode 100644 index 0000000000000000000000000000000000000000..27baec12f9ef48d4e3df41e15b1d2644aab4174b --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_mmbench_for_submission.py @@ -0,0 +1,27 @@ +import os +import json +import argparse +import pandas as pd + +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--annotation-file", type=str, required=True) + parser.add_argument("--result-dir", type=str, required=True) + parser.add_argument("--upload-dir", type=str, required=True) + parser.add_argument("--experiment", type=str, required=True) + + return parser.parse_args() + +if __name__ == "__main__": + args = get_args() + + df = pd.read_table(args.annotation_file) + + cur_df = df.copy() + cur_df = cur_df.drop(columns=['hint', 'category', 'source', 'image', 'comment', 'l2-category']) + cur_df.insert(6, 'prediction', None) + for pred in open(os.path.join(args.result_dir, f"{args.experiment}.jsonl")): + pred = json.loads(pred) + cur_df.loc[df['index'] == pred['question_id'], 'prediction'] = pred['text'] + + cur_df.to_excel(os.path.join(args.upload_dir, f"{args.experiment}.xlsx"), index=False, engine='openpyxl') diff --git a/LLAVA_Biovil/scripts/convert_mmvet_for_eval.py b/LLAVA_Biovil/scripts/convert_mmvet_for_eval.py new file mode 100644 index 0000000000000000000000000000000000000000..97f5cfb7fb7691ef3921e3e6afc6d82ec54d4c6c --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_mmvet_for_eval.py @@ -0,0 +1,18 @@ +import os +import json +import argparse + +parser = argparse.ArgumentParser() +parser.add_argument("--src", type=str) +parser.add_argument("--dst", type=str) +args = parser.parse_args() + +cur_result = {} + +for line in open(args.src): + data = json.loads(line) + qid = data['question_id'] + cur_result[f'v1_{qid}'] = data['text'] + +with open(args.dst, 'w') as f: + json.dump(cur_result, f, indent=2) diff --git a/LLAVA_Biovil/scripts/convert_seed_for_submission.py b/LLAVA_Biovil/scripts/convert_seed_for_submission.py new file mode 100644 index 0000000000000000000000000000000000000000..ae903e63087516bc8ae77142532196be6a85589c --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_seed_for_submission.py @@ -0,0 +1,74 @@ +import os +import json +import argparse + + +def get_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--annotation-file", type=str) + parser.add_argument("--result-file", type=str) + parser.add_argument("--result-upload-file", type=str) + return parser.parse_args() + + +def eval_single(result_file, eval_only_type=None): + results = {} + for line in open(result_file): + row = json.loads(line) + results[row['question_id']] = row + + type_counts = {} + correct_counts = {} + for question_data in data['questions']: + if eval_only_type is not None and question_data['data_type'] != eval_only_type: continue + data_type = question_data['question_type_id'] + type_counts[data_type] = type_counts.get(data_type, 0) + 1 + try: + question_id = int(question_data['question_id']) + except: + question_id = question_data['question_id'] + if question_id not in results: + correct_counts[data_type] = correct_counts.get(data_type, 0) + continue + row = results[question_id] + if row['text'] == question_data['answer']: + correct_counts[data_type] = correct_counts.get(data_type, 0) + 1 + + total_count = 0 + total_correct = 0 + for data_type in sorted(type_counts.keys()): + accuracy = correct_counts[data_type] / type_counts[data_type] * 100 + if eval_only_type is None: + print(f"{ques_type_id_to_name[data_type]}: {accuracy:.2f}%") + + total_count += type_counts[data_type] + total_correct += correct_counts[data_type] + + total_accuracy = total_correct / total_count * 100 + if eval_only_type is None: + print(f"Total accuracy: {total_accuracy:.2f}%") + else: + print(f"{eval_only_type} accuracy: {total_accuracy:.2f}%") + + return results + +if __name__ == "__main__": + args = get_args() + data = json.load(open(args.annotation_file)) + ques_type_id_to_name = {id:n for n,id in data['question_type'].items()} + + results = eval_single(args.result_file) + eval_single(args.result_file, eval_only_type='image') + eval_single(args.result_file, eval_only_type='video') + + with open(args.result_upload_file, 'w') as fp: + for question in data['questions']: + qid = question['question_id'] + if qid in results: + result = results[qid] + else: + result = results[int(qid)] + fp.write(json.dumps({ + 'question_id': qid, + 'prediction': result['text'] + }) + '\n') diff --git a/LLAVA_Biovil/scripts/convert_sqa_to_llava.py b/LLAVA_Biovil/scripts/convert_sqa_to_llava.py new file mode 100644 index 0000000000000000000000000000000000000000..26fe3002413a23b5029e540c8b338ebb14307bf6 --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_sqa_to_llava.py @@ -0,0 +1,88 @@ +import json +import os +import fire +import re +from convert_sqa_to_llava_base_prompt import build_prompt_chatbot + + +def convert_to_llava(base_dir, split, prompt_format="QCM-LEA"): + split_indices = json.load(open(os.path.join(base_dir, "pid_splits.json")))[split] + problems = json.load(open(os.path.join(base_dir, "problems.json"))) + + split_problems = build_prompt_chatbot( + problems, split_indices, prompt_format, + use_caption=False, is_test=False) + + target_format = [] + for prob_id, (input, output) in split_problems.items(): + if input.startswith('Question: '): + input = input.replace('Question: ', '') + if output.startswith('Answer: '): + output = output.replace('Answer: ', '') + + raw_prob_data = problems[prob_id] + if raw_prob_data['image'] is None: + target_format.append({ + "id": prob_id, + "conversations": [ + {'from': 'human', 'value': f"{input}"}, + {'from': 'gpt', 'value': f"{output}"}, + ], + }) + + else: + target_format.append({ + "id": prob_id, + "image": os.path.join(prob_id, raw_prob_data['image']), + "conversations": [ + {'from': 'human', 'value': f"{input}\n"}, + {'from': 'gpt', 'value': f"{output}"}, + ], + }) + + print(f'Number of samples: {len(target_format)}') + + with open(os.path.join(base_dir, f"llava_{split}_{prompt_format}.json"), "w") as f: + json.dump(target_format, f, indent=2) + + +def convert_to_jsonl(base_dir, split, prompt_format="QCM-LEPA"): + split_indices = json.load(open(os.path.join(base_dir, "pid_splits.json")))[split] + problems = json.load(open(os.path.join(base_dir, "problems.json"))) + + split_problems = build_prompt_chatbot( + problems, split_indices, prompt_format, + use_caption=False, is_test=False) + + writer = open(os.path.join(base_dir, f"scienceqa_{split}_{prompt_format}.jsonl"), "w") + for prob_id, (input, output) in split_problems.items(): + if input.startswith('Question: '): + input = input.replace('Question: ', '') + if output.startswith('Answer: '): + output = output.replace('Answer: ', '') + + raw_prob_data = problems[prob_id] + if raw_prob_data['image'] is None: + data = { + "id": prob_id, + "instruction": f"{input}", + "output": f"{output}", + } + + else: + data = { + "id": prob_id, + "image": os.path.join(prob_id, raw_prob_data['image']), + "instruction": f"{input}\n", + "output": f"{output}", + } + writer.write(json.dumps(data) + '\n') + writer.close() + + +def main(task, **kwargs): + globals()[task](**kwargs) + + +if __name__ == "__main__": + fire.Fire(main) diff --git a/LLAVA_Biovil/scripts/convert_sqa_to_llava_base_prompt.py b/LLAVA_Biovil/scripts/convert_sqa_to_llava_base_prompt.py new file mode 100644 index 0000000000000000000000000000000000000000..b327fcc29eb44d7fe68be35da25bafa0e1d6feba --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_sqa_to_llava_base_prompt.py @@ -0,0 +1,334 @@ +def get_question_text(problem): + question = problem['question'] + return question + + +def get_context_text(problem, use_caption): + txt_context = problem['hint'] + img_context = problem['caption'] if use_caption else "" + context = " ".join([txt_context, img_context]).strip() + if context == "": + context = "N/A" + return context + + +def get_choice_text(probelm, options): + choices = probelm['choices'] + choice_list = [] + for i, c in enumerate(choices): + choice_list.append("({}) {}".format(options[i], c)) + choice_txt = " ".join(choice_list) + #print(choice_txt) + return choice_txt + + +def get_answer(problem, options): + return options[problem['answer']] + + +def get_lecture_text(problem): + # \\n: GPT-3 can generate the lecture with more tokens. + lecture = problem['lecture'].replace("\n", "\\n") + return lecture + + +def get_solution_text(problem): + # \\n: GPT-3 can generate the solution with more tokens + solution = problem['solution'].replace("\n", "\\n") + return solution + + +def create_one_example_chatbot(format, question, context, choice, answer, lecture, solution, test_example=True): + + input_format, output_format = format.split("-") + + ## Inputs + if input_format == "CQM": + input = f"Context: {context}\nQuestion: {question}\nOptions: {choice}\n" + elif input_format == "QCM": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\n" + # upper bound experiment + elif input_format == "QCML": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {lecture}\n" + elif input_format == "QCME": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {solution}\n" + elif input_format == "QCMLE": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {lecture} {solution}\n" + + elif input_format == "QCLM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {lecture}\nOptions: {choice}\n" + elif input_format == "QCEM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {solution}\nOptions: {choice}\n" + elif input_format == "QCLEM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {lecture} {solution}\nOptions: {choice}\n" + + # Outputs + if test_example: + output = "Answer:" + elif output_format == 'A': + output = f"Answer: The answer is {answer}." + + elif output_format == 'AL': + output = f"Answer: The answer is {answer}. BECAUSE: {solution}" + elif output_format == 'AE': + output = f"Answer: The answer is {answer}. BECAUSE: {lecture}" + elif output_format == 'ALE': + output = f"Answer: The answer is {answer}. BECAUSE: {lecture} {solution}" + elif output_format == 'AEL': + output = f"Answer: The answer is {answer}. BECAUSE: {solution} {lecture}" + + elif output_format == 'LA': + output = f"Answer: {lecture} The answer is {answer}." + elif output_format == 'EA': + output = f"Answer: {solution} The answer is {answer}." + elif output_format == 'LEA': + output = f"Answer: {lecture} {solution} The answer is {answer}." + elif output_format == 'ELA': + output = f"Answer: {solution} {lecture} The answer is {answer}." + elif output_format == 'LEPA': + output = '' + if len(lecture.strip()) > 0: + output += f"LECTURE: {lecture}\n" + if len(solution.strip()) > 0: + output += f"SOLUTION: {solution}\n" + output += '###\n' + output += f"ANSWER: {answer}." + + input = input.replace(" ", " ").strip() + output = output.replace(" ", " ").strip() + if input.endswith("BECAUSE:"): + input = input.replace("BECAUSE:", "").strip() + if output.endswith("BECAUSE:"): + output = output.replace("BECAUSE:", "").strip() + return input, output + + +def create_one_example(format, question, context, choice, answer, lecture, solution, test_example=True): + + input_format, output_format = format.split("-") + + ## Inputs + if input_format == "CQM": + input = f"Context: {context}\nQuestion: {question}\nOptions: {choice}\n" + elif input_format == "QCM": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\n" + # upper bound experiment + elif input_format == "QCML": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {lecture}\n" + elif input_format == "QCME": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {solution}\n" + elif input_format == "QCMLE": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {lecture} {solution}\n" + + elif input_format == "QCLM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {lecture}\nOptions: {choice}\n" + elif input_format == "QCEM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {solution}\nOptions: {choice}\n" + elif input_format == "QCLEM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {lecture} {solution}\nOptions: {choice}\n" + + # Outputs + if test_example: + output = "Answer:" + elif output_format == 'A': + output = f"Answer: The answer is {answer}." + + elif output_format == 'AL': + output = f"Answer: The answer is {answer}. BECAUSE: {solution}" + elif output_format == 'AE': + output = f"Answer: The answer is {answer}. BECAUSE: {lecture}" + elif output_format == 'ALE': + output = f"Answer: The answer is {answer}. BECAUSE: {lecture} {solution}" + elif output_format == 'AEL': + output = f"Answer: The answer is {answer}. BECAUSE: {solution} {lecture}" + + elif output_format == 'LA': + output = f"Answer: {lecture} The answer is {answer}." + elif output_format == 'EA': + output = f"Answer: {solution} The answer is {answer}." + elif output_format == 'LEA': + output = f"Answer: {lecture} {solution} The answer is {answer}." + elif output_format == 'ELA': + output = f"Answer: {solution} {lecture} The answer is {answer}." + + text = input + output + text = text.replace(" ", " ").strip() + if text.endswith("BECAUSE:"): + text = text.replace("BECAUSE:", "").strip() + return text + + + +def create_one_example_gpt4(format, question, context, choice, answer, lecture, solution, test_example=True): + + input_format, output_format = format.split("-") + + ## Inputs + if input_format == "CQM": + input = f"Context: {context}\nQuestion: {question}\nOptions: {choice}\n" + elif input_format == "QCM": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\n" + # upper bound experiment + elif input_format == "QCML": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {lecture}\n" + elif input_format == "QCME": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {solution}\n" + elif input_format == "QCMLE": + input = f"Question: {question}\nContext: {context}\nOptions: {choice}\nBECAUSE: {lecture} {solution}\n" + + elif input_format == "QCLM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {lecture}\nOptions: {choice}\n" + elif input_format == "QCEM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {solution}\nOptions: {choice}\n" + elif input_format == "QCLEM": + input = f"Question: {question}\nContext: {context}\nBECAUSE: {lecture} {solution}\nOptions: {choice}\n" + + # Outputs + if test_example: + output = "Answer:" + elif output_format == 'A': + output = f"Answer: The answer is {answer}." + + elif output_format == 'AL': + output = f"Answer: The answer is {answer}. BECAUSE: {solution}" + elif output_format == 'AE': + output = f"Answer: The answer is {answer}. BECAUSE: {lecture}" + elif output_format == 'ALE': + output = f"Answer: The answer is {answer}. BECAUSE: {lecture} {solution}" + elif output_format == 'AEL': + output = f"Answer: The answer is {answer}. BECAUSE: {solution} {lecture}" + + elif output_format == 'LA': + output = f"Answer: {lecture} The answer is {answer}." + elif output_format == 'EA': + output = f"Answer: {solution} The answer is {answer}." + elif output_format == 'LEA': + output = f"Answer: {lecture} {solution} The answer is {answer}." + elif output_format == 'ELA': + output = f"Answer: {solution} {lecture} The answer is {answer}." + + input = input.replace(" ", " ").strip() + output = output.replace(" ", " ").strip() + if output.endswith("BECAUSE:"): + output = output.replace("BECAUSE:", "").strip() + + user_prompt = {"role": "user", "content": f"Can you explain {input}?"} + assistant_prompt = {"role": "assistant", "content": f"{output}"} + + return user_prompt, assistant_prompt + + +def build_prompt_chatbot(problems, shot_qids, prompt_format, use_caption=False, options=["A", "B", "C", "D", "E"], is_test=False): + examples = {} + + for qid in shot_qids: + question = get_question_text(problems[qid]) + context = get_context_text(problems[qid], use_caption) + choice = get_choice_text(problems[qid], options) + answer = get_answer(problems[qid], options) + lecture = get_lecture_text(problems[qid]).replace('\\n', '\n') + solution = get_solution_text(problems[qid]).replace('\\n', '\n') + + train_example = create_one_example_chatbot(prompt_format, + question, + context, + choice, + answer, + lecture, + solution, + test_example=is_test) + examples[qid] = train_example + return examples + + +def build_prompt(problems, shot_qids, test_qid, args): + + examples = [] + + # n-shot training examples + for qid in shot_qids: + question = get_question_text(problems[qid]) + context = get_context_text(problems[qid], args.use_caption) + choice = get_choice_text(problems[qid], args.options) + answer = get_answer(problems[qid], args.options) + lecture = get_lecture_text(problems[qid]) + solution = get_solution_text(problems[qid]) + + train_example = create_one_example(args.prompt_format, + question, + context, + choice, + answer, + lecture, + solution, + test_example=False) + examples.append(train_example) + + # test example + question = get_question_text(problems[test_qid]) + context = get_context_text(problems[test_qid], args.use_caption) + choice = get_choice_text(problems[test_qid], args.options) + answer = get_answer(problems[test_qid], args.options) + lecture = get_lecture_text(problems[test_qid]) + solution = get_solution_text(problems[test_qid]) + + test_example = create_one_example(args.prompt_format, + question, + context, + choice, + answer, + lecture, + solution, + test_example=True) + examples.append(test_example) + + # create the prompt input + prompt_input = '\n\n'.join(examples) + + return prompt_input + + +def build_prompt_gpt4(problems, shot_qids, test_qid, args): + + prompt_array = [{"role": "system", "content": "You are a helpful assistant."}] + + # n-shot training examples + for qid in shot_qids: + question = get_question_text(problems[qid]) + context = get_context_text(problems[qid], args.use_caption) + choice = get_choice_text(problems[qid], args.options) + answer = get_answer(problems[qid], args.options) + lecture = get_lecture_text(problems[qid]) + solution = get_solution_text(problems[qid]) + + user_prompt, assistant_prompt = create_one_example_gpt4(args.prompt_format, + question, + context, + choice, + answer, + lecture, + solution, + test_example=False) + prompt_array.append(user_prompt) + prompt_array.append(assistant_prompt) + + # test example + question = get_question_text(problems[test_qid]) + context = get_context_text(problems[test_qid], args.use_caption) + choice = get_choice_text(problems[test_qid], args.options) + answer = get_answer(problems[test_qid], args.options) + lecture = get_lecture_text(problems[test_qid]) + solution = get_solution_text(problems[test_qid]) + + user_prompt, assistant_prompt = create_one_example_gpt4(args.prompt_format, + question, + context, + choice, + answer, + lecture, + solution, + test_example=True) + prompt_array.append(user_prompt) + prompt_array.append(assistant_prompt) + + return prompt_array \ No newline at end of file diff --git a/LLAVA_Biovil/scripts/convert_vizwiz_for_submission.py b/LLAVA_Biovil/scripts/convert_vizwiz_for_submission.py new file mode 100644 index 0000000000000000000000000000000000000000..61eac21ae3797b95e4597bf2629f321120d1991a --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_vizwiz_for_submission.py @@ -0,0 +1,47 @@ +import os +import argparse +import json + +from LLAV.llava.eval.m4c_evaluator import EvalAIAnswerProcessor + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--annotation-file', type=str, required=True) + parser.add_argument('--result-file', type=str, required=True) + parser.add_argument('--result-upload-file', type=str, required=True) + return parser.parse_args() + + +if __name__ == '__main__': + + args = parse_args() + + os.makedirs(os.path.dirname(args.result_upload_file), exist_ok=True) + + results = [] + error_line = 0 + for line_idx, line in enumerate(open(args.result_file)): + try: + results.append(json.loads(line)) + except: + error_line += 1 + results = {x['question_id']: x['text'] for x in results} + test_split = [json.loads(line) for line in open(args.annotation_file)] + split_ids = set([x['question_id'] for x in test_split]) + + print(f'total results: {len(results)}, total split: {len(test_split)}, error_line: {error_line}') + + all_answers = [] + + answer_processor = EvalAIAnswerProcessor() + + for x in test_split: + assert x['question_id'] in results + all_answers.append({ + 'image': x['image'], + 'answer': answer_processor(results[x['question_id']]) + }) + + with open(args.result_upload_file, 'w') as f: + json.dump(all_answers, f) diff --git a/LLAVA_Biovil/scripts/convert_vqav2_for_submission.py b/LLAVA_Biovil/scripts/convert_vqav2_for_submission.py new file mode 100644 index 0000000000000000000000000000000000000000..d95d76a4a992f570d45bab7a7b0df6bbd482672e --- /dev/null +++ b/LLAVA_Biovil/scripts/convert_vqav2_for_submission.py @@ -0,0 +1,56 @@ +import os +import argparse +import json + +from LLAV.llava.eval.m4c_evaluator import EvalAIAnswerProcessor + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--dir', type=str, default="./playground/data/eval/vqav2") + parser.add_argument('--ckpt', type=str, required=True) + parser.add_argument('--split', type=str, required=True) + return parser.parse_args() + + +if __name__ == '__main__': + + args = parse_args() + + src = os.path.join(args.dir, 'answers', args.split, args.ckpt, 'merge.jsonl') + test_split = os.path.join(args.dir, 'llava_vqav2_mscoco_test2015.jsonl') + dst = os.path.join(args.dir, 'answers_upload', args.split, f'{args.ckpt}.json') + os.makedirs(os.path.dirname(dst), exist_ok=True) + + results = [] + error_line = 0 + for line_idx, line in enumerate(open(src)): + try: + results.append(json.loads(line)) + except: + error_line += 1 + + results = {x['question_id']: x['text'] for x in results} + test_split = [json.loads(line) for line in open(test_split)] + split_ids = set([x['question_id'] for x in test_split]) + + print(f'total results: {len(results)}, total split: {len(test_split)}, error_line: {error_line}') + + all_answers = [] + + answer_processor = EvalAIAnswerProcessor() + + for x in test_split: + if x['question_id'] not in results: + all_answers.append({ + 'question_id': x['question_id'], + 'answer': '' + }) + else: + all_answers.append({ + 'question_id': x['question_id'], + 'answer': answer_processor(results[x['question_id']]) + }) + + with open(dst, 'w') as f: + json.dump(all_answers, open(dst, 'w')) diff --git a/LLAVA_Biovil/scripts/extract_mm_projector.py b/LLAVA_Biovil/scripts/extract_mm_projector.py new file mode 100644 index 0000000000000000000000000000000000000000..45be31e896e9c087093bd9bcb6d355ec6dfd11ab --- /dev/null +++ b/LLAVA_Biovil/scripts/extract_mm_projector.py @@ -0,0 +1,47 @@ +""" +This is just a utility that I use to extract the projector for quantized models. +It is NOT necessary at all to train, or run inference/serve demos. +Use this script ONLY if you fully understand its implications. +""" + + +import os +import argparse +import torch +import json +from collections import defaultdict + + +def parse_args(): + parser = argparse.ArgumentParser(description='Extract MMProjector weights') + parser.add_argument('--model-path', type=str, help='model folder') + parser.add_argument('--output', type=str, help='output file') + args = parser.parse_args() + return args + + +if __name__ == '__main__': + args = parse_args() + + keys_to_match = ['mm_projector'] + ckpt_to_key = defaultdict(list) + try: + model_indices = json.load(open(os.path.join(args.model_path, 'pytorch_model.bin.index.json'))) + for k, v in model_indices['weight_map'].items(): + if any(key_match in k for key_match in keys_to_match): + ckpt_to_key[v].append(k) + except FileNotFoundError: + # Smaller models or model checkpoints saved by DeepSpeed. + v = 'pytorch_model.bin' + for k in torch.load(os.path.join(args.model_path, v), map_location='cpu').keys(): + if any(key_match in k for key_match in keys_to_match): + ckpt_to_key[v].append(k) + + loaded_weights = {} + + for ckpt_name, weight_keys in ckpt_to_key.items(): + ckpt = torch.load(os.path.join(args.model_path, ckpt_name), map_location='cpu') + for k in weight_keys: + loaded_weights[k] = ckpt[k] + + torch.save(loaded_weights, args.output) diff --git a/LLAVA_Biovil/scripts/finetune.sh b/LLAVA_Biovil/scripts/finetune.sh new file mode 100644 index 0000000000000000000000000000000000000000..c14f770b481a548c978daca4b42fc0f74aeebe13 --- /dev/null +++ b/LLAVA_Biovil/scripts/finetune.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# IMPORTANT: this is the training script for the original LLaVA, NOT FOR LLaVA V1.5! + +# Uncomment and set the following variables correspondingly to run this script: + +################## VICUNA ################## +# PROMPT_VERSION=v1 +# MODEL_VERSION="vicuna-v1-3-7b" +################## VICUNA ################## + +################## LLaMA-2 ################## +# PROMPT_VERSION="llava_llama_2" +# MODEL_VERSION="llama-2-7b-chat" +################## LLaMA-2 ################## + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path ./checkpoints/$MODEL_VERSION \ + --version $PROMPT_VERSION \ + --data_path ./playground/data/llava_instruct_80k.json \ + --image_folder /path/to/coco/train2017 \ + --vision_tower openai/clip-vit-large-patch14 \ + --pretrain_mm_mlp_adapter ./checkpoints/llava-$MODEL_VERSION-pretrain/mm_projector.bin \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 True \ + --output_dir ./checkpoints/llava-$MODEL_VERSION-finetune \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/finetune_full_schedule.sh b/LLAVA_Biovil/scripts/finetune_full_schedule.sh new file mode 100644 index 0000000000000000000000000000000000000000..59a0d4aa4d8f391c5b5e62452c4e9ef38934b4a9 --- /dev/null +++ b/LLAVA_Biovil/scripts/finetune_full_schedule.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# IMPORTANT: this is the training script for the original LLaVA, NOT FOR LLaVA V1.5! + +# Uncomment and set the following variables correspondingly to run this script: + +################## VICUNA ################## +# PROMPT_VERSION=v1 +# MODEL_VERSION="vicuna-v1-3-7b" +################## VICUNA ################## + +################## LLaMA-2 ################## +# PROMPT_VERSION="llava_llama_2" +# MODEL_VERSION="llama-2-7b-chat" +################## LLaMA-2 ################## + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path ./checkpoints/$MODEL_VERSION \ + --version $PROMPT_VERSION \ + --data_path ./playground/data/llava_instruct_158k.json \ + --image_folder /path/to/coco/train2017 \ + --vision_tower openai/clip-vit-large-patch14 \ + --pretrain_mm_mlp_adapter ./checkpoints/llava-$MODEL_VERSION-pretrain/mm_projector.bin \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 True \ + --output_dir ./checkpoints/llava-$MODEL_VERSION-finetune \ + --num_train_epochs 3 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/finetune_lora.sh b/LLAVA_Biovil/scripts/finetune_lora.sh new file mode 100644 index 0000000000000000000000000000000000000000..fc02e09d7792eb6a13ec32447b5e7f59ce141c8e --- /dev/null +++ b/LLAVA_Biovil/scripts/finetune_lora.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# IMPORTANT: this is the training script for the original LLaVA, NOT FOR LLaVA V1.5! + +# Uncomment and set the following variables correspondingly to run this script: + +################## VICUNA ################## +# PROMPT_VERSION=v1 +# MODEL_VERSION="vicuna-v1-3-7b" +################## VICUNA ################## + +################## LLaMA-2 ################## +# PROMPT_VERSION="llava_llama_2" +# MODEL_VERSION="llama-2-7b-chat" +################## LLaMA-2 ################## + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --lora_enable True \ + --model_name_or_path ./checkpoints/$MODEL_VERSION \ + --version $PROMPT_VERSION \ + --data_path ./playground/data/llava_instruct_80k.json \ + --image_folder /path/to/coco/train2017 \ + --vision_tower openai/clip-vit-large-patch14 \ + --pretrain_mm_mlp_adapter ./checkpoints/llava-$MODEL_VERSION-pretrain/mm_projector.bin \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 True \ + --output_dir ./checkpoints/llava-$MODEL_VERSION-finetune_lora \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --lazy_preprocess True \ + --dataloader_num_workers 4 \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/finetune_qlora.sh b/LLAVA_Biovil/scripts/finetune_qlora.sh new file mode 100644 index 0000000000000000000000000000000000000000..c2ed4c030cb7a3fff79f47a8e681f4df7c989100 --- /dev/null +++ b/LLAVA_Biovil/scripts/finetune_qlora.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# IMPORTANT: this is the training script for the original LLaVA, NOT FOR LLaVA V1.5! + +# Uncomment and set the following variables correspondingly to run this script: + +################## VICUNA ################## +# PROMPT_VERSION=v1 +# MODEL_VERSION="vicuna-v1-3-7b" +################## VICUNA ################## + +################## LLaMA-2 ################## +# PROMPT_VERSION="llava_llama_2" +# MODEL_VERSION="llama-2-7b-chat" +################## LLaMA-2 ################## + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --lora_enable True \ + --bits 4 \ + --model_name_or_path ./checkpoints/$MODEL_VERSION \ + --version $PROMPT_VERSION \ + --data_path ./playground/data/llava_instruct_80k.json \ + --image_folder /path/to/coco/train2017 \ + --vision_tower openai/clip-vit-large-patch14 \ + --pretrain_mm_mlp_adapter ./checkpoints/llava-$MODEL_VERSION-pretrain/mm_projector.bin \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 True \ + --output_dir ./checkpoints/llava-$MODEL_VERSION-finetune_lora \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --lazy_preprocess True \ + --dataloader_num_workers 4 \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/finetune_sqa.sh b/LLAVA_Biovil/scripts/finetune_sqa.sh new file mode 100644 index 0000000000000000000000000000000000000000..3ed50288c31c118cab22312ad02a559d45725490 --- /dev/null +++ b/LLAVA_Biovil/scripts/finetune_sqa.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# IMPORTANT: this is the training script for the original LLaVA, NOT FOR LLaVA V1.5! + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path lmsys/vicuna-13b-v1.3 \ + --version $PROMPT_VERSION \ + --data_path /Data/ScienceQA/data/scienceqa/llava_train_QCM-LEA.json \ + --image_folder /Data/ScienceQA/data/scienceqa/images/train \ + --vision_tower openai/clip-vit-large-patch14 \ + --pretrain_mm_mlp_adapter ./checkpoints/huggingface/liuhaotian/llava-pretrain-vicuna-13b-v1.3/mm_projector.bin \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 True \ + --output_dir ./checkpoints/llava-vicuna-13b-v1.3-pretrain_lcs558k_plain-ScienceQA_QCM_LEA-12e \ + --num_train_epochs 12 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/merge_lora_weights.py b/LLAVA_Biovil/scripts/merge_lora_weights.py new file mode 100644 index 0000000000000000000000000000000000000000..4188cbbc84781d4f01ccdeb7df48e6ce7bc61868 --- /dev/null +++ b/LLAVA_Biovil/scripts/merge_lora_weights.py @@ -0,0 +1,22 @@ +import argparse +from LLAV.llava.model.builder import load_pretrained_model +from LLAV.llava.mm_utils import get_model_name_from_path + + +def merge_lora(args): + model_name = get_model_name_from_path(args.model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, device_map='cpu') + + model.save_pretrained(args.save_model_path) + tokenizer.save_pretrained(args.save_model_path) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--model-path", type=str, required=True) + parser.add_argument("--model-base", type=str, required=True) + parser.add_argument("--save-model-path", type=str, required=True) + + args = parser.parse_args() + + merge_lora(args) diff --git a/LLAVA_Biovil/scripts/pretrain.sh b/LLAVA_Biovil/scripts/pretrain.sh new file mode 100644 index 0000000000000000000000000000000000000000..83f263dd570e447b3b009542d26688ce936436af --- /dev/null +++ b/LLAVA_Biovil/scripts/pretrain.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# IMPORTANT: this is the training script for the original LLaVA, NOT FOR LLaVA V1.5! + +# Uncomment and set the following variables correspondingly to run this script: + +# MODEL_VERSION=vicuna-v1-3-7b +# MODEL_VERSION=llama-2-7b-chat + +########### DO NOT CHANGE ########### +########### USE THIS FOR BOTH ########### +PROMPT_VERSION=plain +########### DO NOT CHANGE ########### + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path ./checkpoints/$MODEL_VERSION \ + --version $PROMPT_VERSION \ + --data_path /path/to/pretrain_data.json \ + --image_folder /path/to/images \ + --vision_tower openai/clip-vit-large-patch14 \ + --tune_mm_mlp_adapter True \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 True \ + --output_dir ./checkpoints/llava-$MODEL_VERSION-pretrain \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 24000 \ + --save_total_limit 1 \ + --learning_rate 2e-3 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/pretrain_xformers.sh b/LLAVA_Biovil/scripts/pretrain_xformers.sh new file mode 100644 index 0000000000000000000000000000000000000000..ecba9c1ce714d481638e269ee4857fbe6a8de2fd --- /dev/null +++ b/LLAVA_Biovil/scripts/pretrain_xformers.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# Uncomment and set the following variables correspondingly to run this script: + +# MODEL_VERSION=vicuna-v1-3-7b +# MODEL_VERSION=llama-2-7b-chat + +########### DO NOT CHANGE ########### +########### USE THIS FOR BOTH ########### +PROMPT_VERSION=plain +########### DO NOT CHANGE ########### + +deepspeed llava/train/train_xformers.py \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path ./checkpoints/$MODEL_VERSION \ + --version $PROMPT_VERSION \ + --data_path /path/to/pretrain_data.json \ + --image_folder /path/to/images \ + --vision_tower openai/clip-vit-large-patch14 \ + --tune_mm_mlp_adapter True \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 False \ + --output_dir ./checkpoints/llava-$MODEL_VERSION-pretrain \ + --num_train_epochs 1 \ + --per_device_train_batch_size 4 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 4 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 24000 \ + --save_total_limit 1 \ + --learning_rate 2e-3 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 False \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/sqa_eval_batch.sh b/LLAVA_Biovil/scripts/sqa_eval_batch.sh new file mode 100644 index 0000000000000000000000000000000000000000..adbf46ef7a6e86181b5927002597ef786add5bde --- /dev/null +++ b/LLAVA_Biovil/scripts/sqa_eval_batch.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +CHUNKS=8 +for IDX in {0..7}; do + CUDA_VISIBLE_DEVICES=$IDX python -m llava.eval.model_vqa_science \ + --model-path liuhaotian/llava-lcs558k-scienceqa-vicuna-13b-v1.3 \ + --question-file ~/haotian/datasets/ScienceQA/data/scienceqa/llava_test_QCM-LEA.json \ + --image-folder ~/haotian/datasets/ScienceQA/data/scienceqa/images/test \ + --answers-file ./test_llava-13b-chunk$CHUNKS_$IDX.jsonl \ + --num-chunks $CHUNKS \ + --chunk-idx $IDX \ + --conv-mode llava_v1 & +done diff --git a/LLAVA_Biovil/scripts/sqa_eval_gather.sh b/LLAVA_Biovil/scripts/sqa_eval_gather.sh new file mode 100644 index 0000000000000000000000000000000000000000..525bd43b850e9f6a923158abd23bca6f8d15650e --- /dev/null +++ b/LLAVA_Biovil/scripts/sqa_eval_gather.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +CHUNKS=8 +output_file="test_llava-13b.jsonl" + +# Clear out the output file if it exists. +> "$output_file" + +# Loop through the indices and concatenate each file. +for idx in $(seq 0 $((CHUNKS-1))); do + cat "./test_llava-13b-chunk${idx}.jsonl" >> "$output_file" +done + +python llava/eval/eval_science_qa.py \ + --base-dir ~/haotian/datasets/ScienceQA/data/scienceqa \ + --result-file ./test_llava-13b.jsonl \ + --output-file ./test_llava-13b_output.json \ + --output-result ./test_llava-13b_result.json diff --git a/LLAVA_Biovil/scripts/v1_5/eval/gqa.sh b/LLAVA_Biovil/scripts/v1_5/eval/gqa.sh new file mode 100644 index 0000000000000000000000000000000000000000..5c3c2c31fc35377a926739e8e4bfd4c23fb39e7f --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/gqa.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +gpu_list="${CUDA_VISIBLE_DEVICES:-0}" +IFS=',' read -ra GPULIST <<< "$gpu_list" + +CHUNKS=${#GPULIST[@]} + +CKPT="llava-v1.5-13b" +SPLIT="llava_gqa_testdev_balanced" +GQADIR="./playground/data/eval/gqa/data" + +for IDX in $(seq 0 $((CHUNKS-1))); do + CUDA_VISIBLE_DEVICES=${GPULIST[$IDX]} python -m llava.eval.model_vqa_loader \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/gqa/$SPLIT.jsonl \ + --image-folder ./playground/data/eval/gqa/data/images \ + --answers-file ./playground/data/eval/gqa/answers/$SPLIT/$CKPT/${CHUNKS}_${IDX}.jsonl \ + --num-chunks $CHUNKS \ + --chunk-idx $IDX \ + --temperature 0 \ + --conv-mode vicuna_v1 & +done + +wait + +output_file=./playground/data/eval/gqa/answers/$SPLIT/$CKPT/merge.jsonl + +# Clear out the output file if it exists. +> "$output_file" + +# Loop through the indices and concatenate each file. +for IDX in $(seq 0 $((CHUNKS-1))); do + cat ./playground/data/eval/gqa/answers/$SPLIT/$CKPT/${CHUNKS}_${IDX}.jsonl >> "$output_file" +done + +python scripts/convert_gqa_for_eval.py --src $output_file --dst $GQADIR/testdev_balanced_predictions.json + +cd $GQADIR +python eval/eval.py --tier testdev_balanced diff --git a/LLAVA_Biovil/scripts/v1_5/eval/llavabench.sh b/LLAVA_Biovil/scripts/v1_5/eval/llavabench.sh new file mode 100644 index 0000000000000000000000000000000000000000..ed236e4e3cee3105edd8d2c0bcee8e1ce22d4614 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/llavabench.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +python -m llava.eval.model_vqa \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/llava-bench-in-the-wild/questions.jsonl \ + --image-folder ./playground/data/eval/llava-bench-in-the-wild/images \ + --answers-file ./playground/data/eval/llava-bench-in-the-wild/answers/llava-v1.5-13b.jsonl \ + --temperature 0 \ + --conv-mode vicuna_v1 + +mkdir -p playground/data/eval/llava-bench-in-the-wild/reviews + +python llava/eval/eval_gpt_review_bench.py \ + --question playground/data/eval/llava-bench-in-the-wild/questions.jsonl \ + --context playground/data/eval/llava-bench-in-the-wild/context.jsonl \ + --rule llava/eval/table/rule.json \ + --answer-list \ + playground/data/eval/llava-bench-in-the-wild/answers_gpt4.jsonl \ + playground/data/eval/llava-bench-in-the-wild/answers/llava-v1.5-13b.jsonl \ + --output \ + playground/data/eval/llava-bench-in-the-wild/reviews/llava-v1.5-13b.jsonl + +python llava/eval/summarize_gpt_review.py -f playground/data/eval/llava-bench-in-the-wild/reviews/llava-v1.5-13b.jsonl diff --git a/LLAVA_Biovil/scripts/v1_5/eval/mmbench.sh b/LLAVA_Biovil/scripts/v1_5/eval/mmbench.sh new file mode 100644 index 0000000000000000000000000000000000000000..d0b3a5c63bc7c8bb022ea2be41275cb921e8755d --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/mmbench.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +SPLIT="mmbench_dev_20230712" + +python -m llava.eval.model_vqa_mmbench \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/mmbench/$SPLIT.tsv \ + --answers-file ./playground/data/eval/mmbench/answers/$SPLIT/llava-v1.5-13b.jsonl \ + --single-pred-prompt \ + --temperature 0 \ + --conv-mode vicuna_v1 + +mkdir -p playground/data/eval/mmbench/answers_upload/$SPLIT + +python scripts/convert_mmbench_for_submission.py \ + --annotation-file ./playground/data/eval/mmbench/$SPLIT.tsv \ + --result-dir ./playground/data/eval/mmbench/answers/$SPLIT \ + --upload-dir ./playground/data/eval/mmbench/answers_upload/$SPLIT \ + --experiment llava-v1.5-13b diff --git a/LLAVA_Biovil/scripts/v1_5/eval/mmbench_cn.sh b/LLAVA_Biovil/scripts/v1_5/eval/mmbench_cn.sh new file mode 100644 index 0000000000000000000000000000000000000000..ce27c93aa1ea8a667a4bdd894be6db1d352ad7f5 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/mmbench_cn.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +SPLIT="mmbench_dev_cn_20231003" + +python -m llava.eval.model_vqa_mmbench \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/mmbench_cn/$SPLIT.tsv \ + --answers-file ./playground/data/eval/mmbench_cn/answers/$SPLIT/llava-v1.5-13b.jsonl \ + --lang cn \ + --single-pred-prompt \ + --temperature 0 \ + --conv-mode vicuna_v1 + +mkdir -p playground/data/eval/mmbench/answers_upload/$SPLIT + +python scripts/convert_mmbench_for_submission.py \ + --annotation-file ./playground/data/eval/mmbench_cn/$SPLIT.tsv \ + --result-dir ./playground/data/eval/mmbench_cn/answers/$SPLIT \ + --upload-dir ./playground/data/eval/mmbench_cn/answers_upload/$SPLIT \ + --experiment llava-v1.5-13b diff --git a/LLAVA_Biovil/scripts/v1_5/eval/mme.sh b/LLAVA_Biovil/scripts/v1_5/eval/mme.sh new file mode 100644 index 0000000000000000000000000000000000000000..9b0f8ca657a429d92c233aaa404d9637d7500cc5 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/mme.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +python -m llava.eval.model_vqa_loader \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/MME/llava_mme.jsonl \ + --image-folder ./playground/data/eval/MME/MME_Benchmark_release_version \ + --answers-file ./playground/data/eval/MME/answers/llava-v1.5-13b.jsonl \ + --temperature 0 \ + --conv-mode vicuna_v1 + +cd ./playground/data/eval/MME + +python convert_answer_to_mme.py --experiment llava-v1.5-13b + +cd eval_tool + +python calculation.py --results_dir answers/llava-v1.5-13b diff --git a/LLAVA_Biovil/scripts/v1_5/eval/mmvet.sh b/LLAVA_Biovil/scripts/v1_5/eval/mmvet.sh new file mode 100644 index 0000000000000000000000000000000000000000..9ff31ed469bb95e40116e66ad249c38770ba3735 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/mmvet.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +python -m llava.eval.model_vqa \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/mm-vet/llava-mm-vet.jsonl \ + --image-folder ./playground/data/eval/mm-vet/images \ + --answers-file ./playground/data/eval/mm-vet/answers/llava-v1.5-13b.jsonl \ + --temperature 0 \ + --conv-mode vicuna_v1 + +mkdir -p ./playground/data/eval/mm-vet/results + +python scripts/convert_mmvet_for_eval.py \ + --src ./playground/data/eval/mm-vet/answers/llava-v1.5-13b.jsonl \ + --dst ./playground/data/eval/mm-vet/results/llava-v1.5-13b.json + diff --git a/LLAVA_Biovil/scripts/v1_5/eval/pope.sh b/LLAVA_Biovil/scripts/v1_5/eval/pope.sh new file mode 100644 index 0000000000000000000000000000000000000000..93fe449d943b36780341ce00638c94eba2e1f37b --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/pope.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +python -m llava.eval.model_vqa_loader \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/pope/llava_pope_test.jsonl \ + --image-folder ./playground/data/eval/pope/val2014 \ + --answers-file ./playground/data/eval/pope/answers/llava-v1.5-13b.jsonl \ + --temperature 0 \ + --conv-mode vicuna_v1 + +python llava/eval/eval_pope.py \ + --annotation-dir ./playground/data/eval/pope/coco \ + --question-file ./playground/data/eval/pope/llava_pope_test.jsonl \ + --result-file ./playground/data/eval/pope/answers/llava-v1.5-13b.jsonl diff --git a/LLAVA_Biovil/scripts/v1_5/eval/qbench.sh b/LLAVA_Biovil/scripts/v1_5/eval/qbench.sh new file mode 100644 index 0000000000000000000000000000000000000000..46b8e029bbb02ccaf8cae1a7025867553fbd6c6c --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/qbench.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ "$1" = "dev" ]; then + echo "Evaluating in 'dev' split." +elif [ "$1" = "test" ]; then + echo "Evaluating in 'test' split." +else + echo "Unknown split, please choose between 'dev' and 'test'." + exit 1 +fi + +python -m llava.eval.model_vqa_qbench \ + --model-path liuhaotian/llava-v1.5-13b \ + --image-folder ./playground/data/eval/qbench/images_llvisionqa/ \ + --questions-file ./playground/data/eval/qbench/llvisionqa_$1.json \ + --answers-file ./playground/data/eval/qbench/llvisionqa_$1_answers.jsonl \ + --conv-mode llava_v1 \ + --lang en diff --git a/LLAVA_Biovil/scripts/v1_5/eval/qbench_zh.sh b/LLAVA_Biovil/scripts/v1_5/eval/qbench_zh.sh new file mode 100644 index 0000000000000000000000000000000000000000..7bfc17088cda577b6f25ec09b20ee8cb2664fec8 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/qbench_zh.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ "$1" = "dev" ]; then + ZH_SPLIT="验证集" + echo "Evaluating in 'dev' split." +elif [ "$1" = "test" ]; then + ZH_SPLIT="测试集" + echo "Evaluating in 'test' split." +else + echo "Unknown split, please choose between 'dev' and 'test'." + exit 1 +fi + +python -m llava.eval.model_vqa_qbench \ + --model-path liuhaotian/llava-v1.5-13b \ + --image-folder ./playground/data/eval/qbench/images_llvisionqa/ \ + --questions-file ./playground/data/eval/qbench/质衡-问答-$ZH_SPLIT.json \ + --answers-file ./playground/data/eval/qbench/llvisionqa_zh_$1_answers.jsonl \ + --conv-mode llava_v1 \ + --lang zh diff --git a/LLAVA_Biovil/scripts/v1_5/eval/seed.sh b/LLAVA_Biovil/scripts/v1_5/eval/seed.sh new file mode 100644 index 0000000000000000000000000000000000000000..565e54d1d4d35791d5ed22ad4e60c43fbdd877ed --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/seed.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +gpu_list="${CUDA_VISIBLE_DEVICES:-0}" +IFS=',' read -ra GPULIST <<< "$gpu_list" + +CHUNKS=${#GPULIST[@]} + +CKPT="llava-v1.5-13b" + +for IDX in $(seq 0 $((CHUNKS-1))); do + CUDA_VISIBLE_DEVICES=${GPULIST[$IDX]} python -m llava.eval.model_vqa_loader \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/seed_bench/llava-seed-bench.jsonl \ + --image-folder ./playground/data/eval/seed_bench \ + --answers-file ./playground/data/eval/seed_bench/answers/$CKPT/${CHUNKS}_${IDX}.jsonl \ + --num-chunks $CHUNKS \ + --chunk-idx $IDX \ + --temperature 0 \ + --conv-mode vicuna_v1 & +done + +wait + +output_file=./playground/data/eval/seed_bench/answers/$CKPT/merge.jsonl + +# Clear out the output file if it exists. +> "$output_file" + +# Loop through the indices and concatenate each file. +for IDX in $(seq 0 $((CHUNKS-1))); do + cat ./playground/data/eval/seed_bench/answers/$CKPT/${CHUNKS}_${IDX}.jsonl >> "$output_file" +done + +# Evaluate +python scripts/convert_seed_for_submission.py \ + --annotation-file ./playground/data/eval/seed_bench/SEED-Bench.json \ + --result-file $output_file \ + --result-upload-file ./playground/data/eval/seed_bench/answers_upload/llava-v1.5-13b.jsonl + diff --git a/LLAVA_Biovil/scripts/v1_5/eval/sqa.sh b/LLAVA_Biovil/scripts/v1_5/eval/sqa.sh new file mode 100644 index 0000000000000000000000000000000000000000..8c82dbc256bd610c5ef2564ed2449b6a91857968 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/sqa.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +python -m llava.eval.model_vqa_science \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/scienceqa/llava_test_CQM-A.json \ + --image-folder ./playground/data/eval/scienceqa/images/test \ + --answers-file ./playground/data/eval/scienceqa/answers/llava-v1.5-13b.jsonl \ + --single-pred-prompt \ + --temperature 0 \ + --conv-mode vicuna_v1 + +python llava/eval/eval_science_qa.py \ + --base-dir ./playground/data/eval/scienceqa \ + --result-file ./playground/data/eval/scienceqa/answers/llava-v1.5-13b.jsonl \ + --output-file ./playground/data/eval/scienceqa/answers/llava-v1.5-13b_output.jsonl \ + --output-result ./playground/data/eval/scienceqa/answers/llava-v1.5-13b_result.json diff --git a/LLAVA_Biovil/scripts/v1_5/eval/textvqa.sh b/LLAVA_Biovil/scripts/v1_5/eval/textvqa.sh new file mode 100644 index 0000000000000000000000000000000000000000..12311c3ccc3511446298c8e829216266e702ec16 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/textvqa.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +python -m llava.eval.model_vqa_loader \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/textvqa/llava_textvqa_val_v051_ocr.jsonl \ + --image-folder ./playground/data/eval/textvqa/train_images \ + --answers-file ./playground/data/eval/textvqa/answers/llava-v1.5-13b.jsonl \ + --temperature 0 \ + --conv-mode vicuna_v1 + +python -m llava.eval.eval_textvqa \ + --annotation-file ./playground/data/eval/textvqa/TextVQA_0.5.1_val.json \ + --result-file ./playground/data/eval/textvqa/answers/llava-v1.5-13b.jsonl diff --git a/LLAVA_Biovil/scripts/v1_5/eval/vizwiz.sh b/LLAVA_Biovil/scripts/v1_5/eval/vizwiz.sh new file mode 100644 index 0000000000000000000000000000000000000000..16cf35ce1b77834d9d8888d53e6cd0f7c2c4ccc6 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/vizwiz.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +python -m llava.eval.model_vqa_loader \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/vizwiz/llava_test.jsonl \ + --image-folder ./playground/data/eval/vizwiz/test \ + --answers-file ./playground/data/eval/vizwiz/answers/llava-v1.5-13b.jsonl \ + --temperature 0 \ + --conv-mode vicuna_v1 + +python scripts/convert_vizwiz_for_submission.py \ + --annotation-file ./playground/data/eval/vizwiz/llava_test.jsonl \ + --result-file ./playground/data/eval/vizwiz/answers/llava-v1.5-13b.jsonl \ + --result-upload-file ./playground/data/eval/vizwiz/answers_upload/llava-v1.5-13b.json diff --git a/LLAVA_Biovil/scripts/v1_5/eval/vqav2.sh b/LLAVA_Biovil/scripts/v1_5/eval/vqav2.sh new file mode 100644 index 0000000000000000000000000000000000000000..696efe53340f4abe5ad3ba8b9578df056e6c897d --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/eval/vqav2.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +gpu_list="${CUDA_VISIBLE_DEVICES:-0}" +IFS=',' read -ra GPULIST <<< "$gpu_list" + +CHUNKS=${#GPULIST[@]} + +CKPT="llava-v1.5-13b" +SPLIT="llava_vqav2_mscoco_test-dev2015" + +for IDX in $(seq 0 $((CHUNKS-1))); do + CUDA_VISIBLE_DEVICES=${GPULIST[$IDX]} python -m llava.eval.model_vqa_loader \ + --model-path liuhaotian/llava-v1.5-13b \ + --question-file ./playground/data/eval/vqav2/$SPLIT.jsonl \ + --image-folder ./playground/data/eval/vqav2/test2015 \ + --answers-file ./playground/data/eval/vqav2/answers/$SPLIT/$CKPT/${CHUNKS}_${IDX}.jsonl \ + --num-chunks $CHUNKS \ + --chunk-idx $IDX \ + --temperature 0 \ + --conv-mode vicuna_v1 & +done + +wait + +output_file=./playground/data/eval/vqav2/answers/$SPLIT/$CKPT/merge.jsonl + +# Clear out the output file if it exists. +> "$output_file" + +# Loop through the indices and concatenate each file. +for IDX in $(seq 0 $((CHUNKS-1))); do + cat ./playground/data/eval/vqav2/answers/$SPLIT/$CKPT/${CHUNKS}_${IDX}.jsonl >> "$output_file" +done + +python scripts/convert_vqav2_for_submission.py --split $SPLIT --ckpt $CKPT + diff --git a/LLAVA_Biovil/scripts/v1_5/finetune.sh b/LLAVA_Biovil/scripts/v1_5/finetune.sh new file mode 100644 index 0000000000000000000000000000000000000000..435448394dfcef578ac478f499160fba4ceacd6c --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/finetune.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero3.json \ + --model_name_or_path lmsys/vicuna-13b-v1.5 \ + --version v1 \ + --data_path ./playground/data/llava_v1_5_mix665k.json \ + --image_folder ./playground/data \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --pretrain_mm_mlp_adapter ./checkpoints/llava-v1.5-13b-pretrain/mm_projector.bin \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-13b \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/v1_5/finetune_lora.sh b/LLAVA_Biovil/scripts/v1_5/finetune_lora.sh new file mode 100644 index 0000000000000000000000000000000000000000..90f00707cf9c9ae499184f0135f7cc9d84327a21 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/finetune_lora.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +deepspeed llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero3.json \ + --model_name_or_path lmsys/vicuna-13b-v1.5 \ + --version v1 \ + --data_path ./playground/data/llava_v1_5_mix665k.json \ + --image_folder ./playground/data \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --pretrain_mm_mlp_adapter ./checkpoints/llava-v1.5-13b-pretrain/mm_projector.bin \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-13b-lora \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-4 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/v1_5/finetune_task.sh b/LLAVA_Biovil/scripts/v1_5/finetune_task.sh new file mode 100644 index 0000000000000000000000000000000000000000..063f3f13e119fdb7f6af358f50315e022f15f578 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/finetune_task.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero3.json \ + --model_name_or_path liuhaotian/llava-v1.5-13b \ + --version v1 \ + --data_path ./playground/data/llava_v1_5_mix665k.json \ + --image_folder ./playground/data \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-13b-task \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/v1_5/finetune_task_lora.sh b/LLAVA_Biovil/scripts/v1_5/finetune_task_lora.sh new file mode 100644 index 0000000000000000000000000000000000000000..f11303f299aeb675e23b0cb37ff4c881aec6f99e --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/finetune_task_lora.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +deepspeed llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero3.json \ + --model_name_or_path liuhaotian/llava-v1.5-13b \ + --version v1 \ + --data_path ./playground/data/llava_v1_5_mix665k.json \ + --image_folder ./playground/data \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-13b-task-lora \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 50000 \ + --save_total_limit 1 \ + --learning_rate 2e-4 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/scripts/v1_5/pretrain.sh b/LLAVA_Biovil/scripts/v1_5/pretrain.sh new file mode 100644 index 0000000000000000000000000000000000000000..9316eaa309ea8c12d9612a01d85958550357b9a7 --- /dev/null +++ b/LLAVA_Biovil/scripts/v1_5/pretrain.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +deepspeed llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path lmsys/vicuna-13b-v1.5 \ + --version plain \ + --data_path ./playground/data/LLaVA-Pretrain/blip_laion_cc_sbu_558k.json \ + --image_folder ./playground/data/LLaVA-Pretrain/images \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --mm_projector_type mlp2x_gelu \ + --tune_mm_mlp_adapter True \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-13b-pretrain \ + --num_train_epochs 1 \ + --per_device_train_batch_size 32 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 24000 \ + --save_total_limit 1 \ + --learning_rate 1e-3 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb diff --git a/LLAVA_Biovil/slurm_config.conf b/LLAVA_Biovil/slurm_config.conf new file mode 100644 index 0000000000000000000000000000000000000000..272d797d8ec8b6110e85a2d038e4dfb2d247f9d3 --- /dev/null +++ b/LLAVA_Biovil/slurm_config.conf @@ -0,0 +1,60 @@ +#!/bin/sh + +#SBATCH --job-name=radialog +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29719 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --bits 4 --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-4 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_instruct_llava.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_cosine_llava_unfreeze \ + --num_train_epochs 1 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 8 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-4 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 1300 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_cosine_llava_unfreeze \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_biovil_frozen.conf b/LLAVA_Biovil/slurm_config_biovil_frozen.conf new file mode 100644 index 0000000000000000000000000000000000000000..31ae5da76b907aed5dd3f736382c42ac682bde5b --- /dev/null +++ b/LLAVA_Biovil/slurm_config_biovil_frozen.conf @@ -0,0 +1,60 @@ +#!/bin/sh + +#SBATCH --job-name=ins_v4_frozen +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29719 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_instruct_llava_v4_sentenized.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_frozen_2e-5_5epochs_v4_sentenized \ + --num_train_epochs 5 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 1500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 1300 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_frozen_2e-5_5epochs_v4_sentenized diff --git a/LLAVA_Biovil/slurm_config_biovil_frozen_v5.conf b/LLAVA_Biovil/slurm_config_biovil_frozen_v5.conf new file mode 100644 index 0000000000000000000000000000000000000000..afb6b17e3a5ef494d5488233c41c85e6635352d0 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_biovil_frozen_v5.conf @@ -0,0 +1,60 @@ +#!/bin/sh + +#SBATCH --job-name=ins_v5_frozen +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29711 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_instruct_llava_v5.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_frozen_2e-5_5epochs_v5 \ + --num_train_epochs 5 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 1500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 1300 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_frozen_2e-5_5epochs_v5 diff --git a/LLAVA_Biovil/slurm_config_biovil_unfrozen.conf b/LLAVA_Biovil/slurm_config_biovil_unfrozen.conf new file mode 100644 index 0000000000000000000000000000000000000000..00879cadbc1d6e5424c47ed831628fa19a970195 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_biovil_unfrozen.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=ins_v4_unfrozen +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29718 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_instruct_llava_v4_sentenized.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_unfrozen_2e-5_5epochs_v4_sentenized \ + --num_train_epochs 5 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 1500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 1300 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_unfrozen_2e-5_5epochs_v4_sentenized \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_biovil_unfrozen_v5.conf b/LLAVA_Biovil/slurm_config_biovil_unfrozen_v5.conf new file mode 100644 index 0000000000000000000000000000000000000000..3464b1f732c13d7dfd95964a417c37137e0f57fd --- /dev/null +++ b/LLAVA_Biovil/slurm_config_biovil_unfrozen_v5.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=ins_v5_unfrozen +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29712 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_instruct_llava_v5.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_unfrozen_2e-5_5epochs_v5 \ + --num_train_epochs 5 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 1500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 1300 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_unfrozen_2e-5_5epochs_v5 \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_llavamed.conf b/LLAVA_Biovil/slurm_config_llavamed.conf new file mode 100644 index 0000000000000000000000000000000000000000..cb4bdf1b7ec8c357abad597e81b7efad618f664a --- /dev/null +++ b/LLAVA_Biovil/slurm_config_llavamed.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=rd_llavamed +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29719 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-4 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path /home/guests/shared/LLaMA/7B_LLaVAMed \ + --version llava_med \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_instruct_llava.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end True \ + --mm_use_im_patch_token True \ + --image_aspect_ratio square \ + --group_by_modality_length False \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_cosine_llavamed_biovil \ + --num_train_epochs 1 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-4 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 1300 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_cosine_llavamed_biovil diff --git a/LLAVA_Biovil/slurm_config_ms_cxr_t.conf b/LLAVA_Biovil/slurm_config_ms_cxr_t.conf new file mode 100644 index 0000000000000000000000000000000000000000..b6b04223f3f6a6a86d9a080093ed73f8bffaf2b7 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_ms_cxr_t.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=cxrt_concat +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29715 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/ms_cxr_t_llava.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_cxr_t_frozen_pool_concat \ + --num_train_epochs 10 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "epoch" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 550 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_cxr_t_frozen_pool_concat \ + --mv_type "pool_concat" diff --git a/LLAVA_Biovil/slurm_config_pretrain.conf b/LLAVA_Biovil/slurm_config_pretrain.conf new file mode 100644 index 0000000000000000000000000000000000000000..c494715e2b26d03b0f968d423be9c0d8e0b254ae --- /dev/null +++ b/LLAVA_Biovil/slurm_config_pretrain.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=oracle +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=4 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate oracle +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29508 + + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/ege_oezsoy/Oracle/data/llava_samples/train.json \ + --image_folder / \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --mm_projector_type mlp2x_gelu \ + --tune_mm_mlp_adapter True \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-4dor_pretrain_linear_weighting \ + --num_train_epochs 50 \ + --per_device_train_batch_size 16 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 1 \ + --evaluation_strategy "no" \ + --save_strategy "epoch" \ + --save_steps 10 \ + --save_total_limit 1 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 2048 \ + --gradient_checkpointing True \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-4dor_pretrain_linear_weighting diff --git a/LLAVA_Biovil/slurm_config_radrestruct.conf b/LLAVA_Biovil/slurm_config_radrestruct.conf new file mode 100644 index 0000000000000000000000000000000000000000..1142a8bad1c6b395318eb6cab2cb65a0d7487909 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_radrestruct.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=rr_1to1 +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29717 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/radrestruct_mimic_merged_llava_balanced_1to1.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_merged_1to1 \ + --num_train_epochs 1 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 550 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_merged_1to1 \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_radrestruct1to10.conf b/LLAVA_Biovil/slurm_config_radrestruct1to10.conf new file mode 100644 index 0000000000000000000000000000000000000000..7a7a307beb364bc9d707db955618f3f09e048b04 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_radrestruct1to10.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=rr_1to10 +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29716 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/radrestruct_mimic_merged_llava_balanced_1to10.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_merged_1to10 \ + --num_train_epochs 1 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 550 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_merged_1to10 \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_radrestruct1to5.conf b/LLAVA_Biovil/slurm_config_radrestruct1to5.conf new file mode 100644 index 0000000000000000000000000000000000000000..1d33b57619f37487d4a5d30ef1d926dc60dae506 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_radrestruct1to5.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=rr_1to5 +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29715 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/radrestruct_mimic_merged_llava_balanced_1to5.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_merged_1to5 \ + --num_train_epochs 1 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 550 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_merged_1to5 \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_radrestruct2.conf b/LLAVA_Biovil/slurm_config_radrestruct2.conf new file mode 100644 index 0000000000000000000000000000000000000000..cdc7504b8138b309800a526ef18a66b134c2f8d0 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_radrestruct2.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=rr_ufr-noaugs +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29717 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/radrestruct_llava_balanced_50ep.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_balanced_50ep \ + --num_train_epochs 1 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 550 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_noaugs_noweighting_lr2e-5_balanced_50ep_debug \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_radrestruct3.conf b/LLAVA_Biovil/slurm_config_radrestruct3.conf new file mode 100644 index 0000000000000000000000000000000000000000..66cba9d8e26db25dc4f0f71b3c789a46bd47980c --- /dev/null +++ b/LLAVA_Biovil/slurm_config_radrestruct3.conf @@ -0,0 +1,62 @@ +#!/bin/sh + +#SBATCH --job-name=rr_ufr-augs +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29717 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/radrestruct_llava_balanced_50ep.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_augs_noweighting_lr2e-5_balanced_50ep \ + --num_train_epochs 1 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 550 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_radrestruct_unfrozen_augs_noweighting_lr2e-5_balanced_50ep \ + --unfreeze_n_vision_tower_layers 12 \ + --do_augment diff --git a/LLAVA_Biovil/slurm_config_radrestruct4.conf b/LLAVA_Biovil/slurm_config_radrestruct4.conf new file mode 100644 index 0000000000000000000000000000000000000000..bbe5dbae4d30428f6248e84f55936e208bb6a44d --- /dev/null +++ b/LLAVA_Biovil/slurm_config_radrestruct4.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=rr_fr-augs +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29718 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/radrestruct_llava_balanced_50ep.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_radrestruct_frozen_augs_noweighting_lr2e-5_balanced_50ep \ + --num_train_epochs 1 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 550 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_radrestruct_frozen_augs_noweighting_lr2e-5_balanced_50ep \ + --do_augment diff --git a/LLAVA_Biovil/slurm_config_report.conf b/LLAVA_Biovil/slurm_config_report.conf new file mode 100644 index 0000000000000000000000000000000000000000..1f618f7fb2978fefddfe21fac25fec51e5dd33f4 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_report.conf @@ -0,0 +1,62 @@ +#!/bin/sh + +#SBATCH --job-name=rd_llava +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED + +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29721 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-4 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_reports_llava.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower openai/clip-vit-large-patch14-336 \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_cosine_llava_report_unfreeze_2e-5 \ + --num_train_epochs 5 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 2e-5 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 1100 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_cosine_llava_report_unfreeze_2e-5 \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_report_biovil.conf b/LLAVA_Biovil/slurm_config_report_biovil.conf new file mode 100644 index 0000000000000000000000000000000000000000..7ad3430c45334a2a76079ac96bc618ddda0d6320 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_report_biovil.conf @@ -0,0 +1,61 @@ +#!/bin/sh + +#SBATCH --job-name=rep_unfrozen +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29713 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-4 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_reports_llava.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_cosine_llava_report_biovil_unfrozen_5epochs_highlr \ + --num_train_epochs 5 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 1500 \ + --learning_rate 2e-4 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 800 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_cosine_llava_report_biovil_unfrozen_5epochs_highlr \ + --unfreeze_n_vision_tower_layers 12 diff --git a/LLAVA_Biovil/slurm_config_report_biovil_frozen.conf b/LLAVA_Biovil/slurm_config_report_biovil_frozen.conf new file mode 100644 index 0000000000000000000000000000000000000000..ae2c69d5d87346ee9ac436a73da3b593571346e2 --- /dev/null +++ b/LLAVA_Biovil/slurm_config_report_biovil_frozen.conf @@ -0,0 +1,60 @@ +#!/bin/sh + +#SBATCH --job-name=bv_frozen +#SBATCH --output=oracle-%A.out # Standard output of the script (Can be absolute or relative path). %A adds the job id to the file name so you can launch the same script multiple times and get different logging files +#SBATCH --error=oracle-%A.err # Standard error of the script +#SBATCH --time=0-160:00:00 # Limit on the total run time (format: days-hours:minutes:seconds) +#SBATCH --gres=gpu:1 # Number of GPUs if needed +#SBATCH --cpus-per-task=8 # Number of CPUs (Don't use more than 24 per GPU) +#SBATCH --mem=96G # Memory in GB (Don't use more than 126G per GPU), maybe 128? + +# activate corresponding environment +# conda deactivate # If you launch your script from a terminal where your environment is already loaded, conda won't activate the environment. This guards against that. Not necessary if you always run this script from a clean terminal +source ~/miniconda3/etc/profile.d/conda.sh +conda activate llava_raddialog +# FLASH ATTN NEEDS TO BE INSTALLED FROM THE SOURCE FOR CUDA 11.7 by previously setting CUDA HOME and LD_LIBRARY SOMETHING VARIABLES. +# POTENTIALLY TRY OUT VERSION 2 AS WELL WHICH IS LLAMA 2 BASED +export PYTHONPATH="/home/guests/chantal_pellegrini/RaDialog_LLaVA:$PYTHONPATH" + +export GPUS_PER_NODE=1 +#export MASTER_ADDR=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n 1) # TODO needed for multi-node setups +#export MASTER_PORT=9901 +export MASTER_ADDR=$(hostname) +export MASTER_PORT=29711 + +srun --jobid $SLURM_JOBID python -m torch.distributed.run --nproc_per_node=$GPUS_PER_NODE --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT llava/train/train_mem.py \ + --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 5e-4 \ + --deepspeed ./scripts/zero2.json \ + --model_name_or_path liuhaotian/llava-v1.5-7b \ + --version v1 \ + --data_path /home/guests/chantal_pellegrini/RaDialog_LLaVA/data/mimic_cxr_reports_llava.json \ + --image_folder /home/data/DIVA/mimic/mimic-cxr-jpg/2.0.0 \ + --vision_tower biovil \ + --mm_projector_type mlp2x_gelu \ + --mm_vision_select_layer -2 \ + --mm_use_im_start_end False \ + --mm_use_im_patch_token False \ + --image_aspect_ratio pad \ + --group_by_modality_length True \ + --bf16 True \ + --output_dir ./checkpoints/llava-v1.5-7b-task-lora_radialog_cosine_llava_report_biovil_frozen_5e-4 \ + --num_train_epochs 5 \ + --per_device_train_batch_size 2 \ + --per_device_eval_batch_size 4 \ + --gradient_accumulation_steps 64 \ + --evaluation_strategy "no" \ + --save_strategy "steps" \ + --save_steps 500 \ + --learning_rate 5e-4 \ + --max_grad_norm 0.1 \ + --weight_decay 0. \ + --warmup_ratio 0.03 \ + --lr_scheduler_type "cosine" \ + --logging_steps 1 \ + --tf32 True \ + --model_max_length 800 \ + --gradient_checkpointing False \ + --dataloader_num_workers 4 \ + --lazy_preprocess True \ + --report_to wandb \ + --run_name llava-v1.5-7b-task-lora_radialog_cosine_llava_report_biovil_frozen_5e-4 diff --git a/RaDialog_config.py b/RaDialog_config.py new file mode 100644 index 0000000000000000000000000000000000000000..64279f66f1c36c76d876cf75b3f6950989f747e4 --- /dev/null +++ b/RaDialog_config.py @@ -0,0 +1,27 @@ +from transformers import PretrainedConfig +from typing import List + + +class RaDialogConfig(PretrainedConfig): + model_type = "resnet" + + def __init__( + self, + + **kwargs, + ): + if block_type not in ["basic", "bottleneck"]: + raise ValueError(f"`block_type` must be 'basic' or bottleneck', got {block_type}.") + if stem_type not in ["", "deep", "deep-tiered"]: + raise ValueError(f"`stem_type` must be '', 'deep' or 'deep-tiered', got {stem_type}.") + + self.block_type = block_type + self.layers = layers + self.num_classes = num_classes + self.input_channels = input_channels + self.cardinality = cardinality + self.base_width = base_width + self.stem_width = stem_width + self.stem_type = stem_type + self.avg_down = avg_down + super().__init__(**kwargs) \ No newline at end of file diff --git a/__pycache__/conversation.cpython-310.pyc b/__pycache__/conversation.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..141eaeebf4f2fbedc264477f47df666888394989 Binary files /dev/null and b/__pycache__/conversation.cpython-310.pyc differ diff --git a/__pycache__/utils.cpython-310.pyc b/__pycache__/utils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..00285c63d54b1ab4d6e2c57d795f75fc147f13fc Binary files /dev/null and b/__pycache__/utils.cpython-310.pyc differ diff --git a/conversation.py b/conversation.py new file mode 100644 index 0000000000000000000000000000000000000000..763fb975d8386b78f23b69f67009b031be667fb6 --- /dev/null +++ b/conversation.py @@ -0,0 +1,414 @@ +import dataclasses +from enum import auto, Enum +from typing import List, Tuple + + +class SeparatorStyle(Enum): + """Different separator style.""" + SINGLE = auto() + TWO = auto() + MPT = auto() + PLAIN = auto() + LLAMA_2 = auto() + + +@dataclasses.dataclass +class Conversation: + """A class that keeps all conversation history.""" + system: str + roles: List[str] + messages: List[List[str]] + offset: int + sep_style: SeparatorStyle = SeparatorStyle.SINGLE + sep: str = "###" + sep2: str = None + version: str = "Unknown" + + skip_next: bool = False + + def get_prompt(self): + messages = self.messages + if len(messages) > 0 and type(messages[0][1]) is tuple: + messages = self.messages.copy() + init_role, init_msg = messages[0].copy() + init_msg = init_msg[0].replace("", "").strip() + if 'mmtag' in self.version: + messages[0] = (init_role, init_msg) + messages.insert(0, (self.roles[0], "")) + messages.insert(1, (self.roles[1], "Received.")) + else: + messages[0] = (init_role, "\n" + init_msg) + + if self.sep_style == SeparatorStyle.SINGLE: + ret = self.system + self.sep + for role, message in messages: + if message: + if type(message) is tuple: + message, _, _ = message + ret += role + ": " + message + self.sep + else: + ret += role + ":" + elif self.sep_style == SeparatorStyle.TWO: + seps = [self.sep, self.sep2] + ret = self.system + seps[0] + for i, (role, message) in enumerate(messages): + if message: + if type(message) is tuple: + message, _, _ = message + ret += role + ": " + message + seps[i % 2] + else: + ret += role + ":" + elif self.sep_style == SeparatorStyle.MPT: + ret = self.system + self.sep + for role, message in messages: + if message: + if type(message) is tuple: + message, _, _ = message + ret += role + message + self.sep + else: + ret += role + elif self.sep_style == SeparatorStyle.LLAMA_2: + wrap_sys = lambda msg: f"<>\n{msg}\n<>\n\n" + wrap_inst = lambda msg: f"[INST] {msg} [/INST]" + ret = "" + + for i, (role, message) in enumerate(messages): + if i == 0: + assert message, "first message should not be none" + assert role == self.roles[0], "first message should come from user" + if message: + if type(message) is tuple: + message, _, _ = message + if i == 0: message = wrap_sys(self.system) + message + if i % 2 == 0: + message = wrap_inst(message) + ret += self.sep + message + else: + ret += " " + message + " " + self.sep2 + else: + ret += "" + ret = ret.lstrip(self.sep) + elif self.sep_style == SeparatorStyle.PLAIN: + seps = [self.sep, self.sep2] + ret = self.system + for i, (role, message) in enumerate(messages): + if message: + if type(message) is tuple: + message, _, _ = message + ret += message + seps[i % 2] + else: + ret += "" + else: + raise ValueError(f"Invalid style: {self.sep_style}") + + return ret + + def append_message(self, role, message): + self.messages.append([role, message]) + + def get_images(self, return_pil=False): + images = [] + for i, (role, msg) in enumerate(self.messages[self.offset:]): + if i % 2 == 0: + if type(msg) is tuple: + import base64 + from io import BytesIO + from PIL import Image + msg, image, image_process_mode = msg + if image_process_mode == "Pad": + def expand2square(pil_img, background_color=(122, 116, 104)): + width, height = pil_img.size + if width == height: + return pil_img + elif width > height: + result = Image.new(pil_img.mode, (width, width), background_color) + result.paste(pil_img, (0, (width - height) // 2)) + return result + else: + result = Image.new(pil_img.mode, (height, height), background_color) + result.paste(pil_img, ((height - width) // 2, 0)) + return result + image = expand2square(image) + elif image_process_mode in ["Default", "Crop"]: + pass + elif image_process_mode == "Resize": + image = image.resize((336, 336)) + else: + raise ValueError(f"Invalid image_process_mode: {image_process_mode}") + max_hw, min_hw = max(image.size), min(image.size) + aspect_ratio = max_hw / min_hw + max_len, min_len = 800, 400 + shortest_edge = int(min(max_len / aspect_ratio, min_len, min_hw)) + longest_edge = int(shortest_edge * aspect_ratio) + W, H = image.size + if longest_edge != max(image.size): + if H > W: + H, W = longest_edge, shortest_edge + else: + H, W = shortest_edge, longest_edge + image = image.resize((W, H)) + if return_pil: + images.append(image) + else: + buffered = BytesIO() + image.save(buffered, format="PNG") + img_b64_str = base64.b64encode(buffered.getvalue()).decode() + images.append(img_b64_str) + return images + + def to_gradio_chatbot(self): + ret = [] + for i, (role, msg) in enumerate(self.messages[self.offset:]): + if i % 2 == 0: + if type(msg) is tuple: + import base64 + from io import BytesIO + msg, image, image_process_mode = msg + max_hw, min_hw = max(image.size), min(image.size) + aspect_ratio = max_hw / min_hw + max_len, min_len = 800, 400 + shortest_edge = int(min(max_len / aspect_ratio, min_len, min_hw)) + longest_edge = int(shortest_edge * aspect_ratio) + W, H = image.size + if H > W: + H, W = longest_edge, shortest_edge + else: + H, W = shortest_edge, longest_edge + image = image.resize((W, H)) + buffered = BytesIO() + image.save(buffered, format="JPEG") + img_b64_str = base64.b64encode(buffered.getvalue()).decode() + img_str = f'user upload image' + msg = img_str + msg.replace('', '').strip() + ret.append([msg, None]) + else: + ret.append([msg, None]) + else: + ret[-1][-1] = msg + return ret + + def copy(self): + return Conversation( + system=self.system, + roles=self.roles, + messages=[[x, y] for x, y in self.messages], + offset=self.offset, + sep_style=self.sep_style, + sep=self.sep, + sep2=self.sep2, + version=self.version) + + def dict(self): + if len(self.get_images()) > 0: + return { + "system": self.system, + "roles": self.roles, + "messages": [[x, y[0] if type(y) is tuple else y] for x, y in self.messages], + "offset": self.offset, + "sep": self.sep, + "sep2": self.sep2, + } + return { + "system": self.system, + "roles": self.roles, + "messages": self.messages, + "offset": self.offset, + "sep": self.sep, + "sep2": self.sep2, + } + + +conv_vicuna_v0 = Conversation( + system="A chat between a curious human and an artificial intelligence assistant. " + "The assistant gives helpful, detailed, and polite answers to the human's questions.", + roles=("Human", "Assistant"), + messages=( + ("Human", "What are the key differences between renewable and non-renewable energy sources?"), + ("Assistant", + "Renewable energy sources are those that can be replenished naturally in a relatively " + "short amount of time, such as solar, wind, hydro, geothermal, and biomass. " + "Non-renewable energy sources, on the other hand, are finite and will eventually be " + "depleted, such as coal, oil, and natural gas. Here are some key differences between " + "renewable and non-renewable energy sources:\n" + "1. Availability: Renewable energy sources are virtually inexhaustible, while non-renewable " + "energy sources are finite and will eventually run out.\n" + "2. Environmental impact: Renewable energy sources have a much lower environmental impact " + "than non-renewable sources, which can lead to air and water pollution, greenhouse gas emissions, " + "and other negative effects.\n" + "3. Cost: Renewable energy sources can be more expensive to initially set up, but they typically " + "have lower operational costs than non-renewable sources.\n" + "4. Reliability: Renewable energy sources are often more reliable and can be used in more remote " + "locations than non-renewable sources.\n" + "5. Flexibility: Renewable energy sources are often more flexible and can be adapted to different " + "situations and needs, while non-renewable sources are more rigid and inflexible.\n" + "6. Sustainability: Renewable energy sources are more sustainable over the long term, while " + "non-renewable sources are not, and their depletion can lead to economic and social instability.\n") + ), + offset=2, + sep_style=SeparatorStyle.SINGLE, + sep="###", +) + +conv_vicuna_v1 = Conversation( + # system="A chat between a curious user and an artificial intelligence assistant. " + # "The assistant gives helpful, detailed, and polite answers to the user's questions.", + system="A chat between a curious user and an artificial intelligence assistant acting as an experienced radiologist. " + "The assistant gives professional, detailed, and polite answers to the user's questions.", + roles=("USER", "ASSISTANT"), + version="v1", + messages=[], + offset=0, + sep_style=SeparatorStyle.TWO, + sep=" ", + sep2="", +) + +conv_llava_med = Conversation( + system="A chat between a curious user and an artificial intelligence assistant acting as an experienced radiologist. " + "The assistant gives professional, detailed, and polite answers to the user's questions.", + roles=("USER", "ASSISTANT"), + version="v1", + messages=[], + offset=2, + sep_style=SeparatorStyle.TWO, + sep="###", + sep2="" +) + +simple_conv_multimodal = Conversation( + system="You are LLaVA-Med, a large language and vision assistant trained by a group of researchers at Microsoft, based on the general domain LLaVA architecture." + "You are able to understand the visual content that the user provides, and assist the user with a variety of medical and clinical tasks using natural language." + "Follow the instructions carefully and explain your answers in detail.", + roles=("Human", "Assistant"), + messages=( + ("Human", "Hi!"), + ("Assistant", "Hi there! How can I help you today?\n") + ), + offset=2, + sep_style=SeparatorStyle.SINGLE, + sep="###", +) + +conv_llama_2 = Conversation( + system="""You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. + +If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.""", + roles=("USER", "ASSISTANT"), + version="llama_v2", + messages=(), + offset=0, + sep_style=SeparatorStyle.LLAMA_2, + sep="", + sep2="", +) + +conv_llava_llama_2 = Conversation( + system="You are a helpful language and vision assistant. " + "You are able to understand the visual content that the user provides, " + "and assist the user with a variety of tasks using natural language.", + roles=("USER", "ASSISTANT"), + version="llama_v2", + messages=(), + offset=0, + sep_style=SeparatorStyle.LLAMA_2, + sep="", + sep2="", +) + +conv_mpt = Conversation( + system="""<|im_start|>system +A conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers.""", + roles=("<|im_start|>user\n", "<|im_start|>assistant\n"), + version="mpt", + messages=(), + offset=0, + sep_style=SeparatorStyle.MPT, + sep="<|im_end|>", +) + +conv_llava_plain = Conversation( + system="", + roles=("", ""), + messages=( + ), + offset=0, + sep_style=SeparatorStyle.PLAIN, + sep="\n", +) + +conv_llava_v0 = Conversation( + system="A chat between a curious human and an artificial intelligence assistant. " + "The assistant gives helpful, detailed, and polite answers to the human's questions.", + roles=("Human", "Assistant"), + messages=( + ), + offset=0, + sep_style=SeparatorStyle.SINGLE, + sep="###", +) + +conv_llava_v0_mmtag = Conversation( + system="A chat between a curious user and an artificial intelligence assistant. " + "The assistant is able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language." + "The visual content will be provided with the following format: visual content.", + roles=("Human", "Assistant"), + messages=( + ), + offset=0, + sep_style=SeparatorStyle.SINGLE, + sep="###", + version="v0_mmtag", +) + +conv_llava_v1 = Conversation( + # system="A chat between a curious human and an artificial intelligence assistant. " + # "The assistant gives helpful, detailed, and polite answers to the human's questions.", + system="A chat between a curious user and an artificial intelligence assistant acting as an experienced radiologist. " + "The assistant gives professional, detailed, and polite answers to the user's questions.", + roles=("USER", "ASSISTANT"), + version="v1", + messages=(), + offset=0, + sep_style=SeparatorStyle.TWO, + sep=" ", + sep2="", +) + + +conv_llava_v1_mmtag = Conversation( + system="A chat between a curious user and an artificial intelligence assistant. " + "The assistant is able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language." + "The visual content will be provided with the following format: visual content.", + roles=("USER", "ASSISTANT"), + messages=(), + offset=0, + sep_style=SeparatorStyle.TWO, + sep=" ", + sep2="", + version="v1_mmtag", +) + +default_conversation = conv_vicuna_v1 +conv_templates = { + "default": conv_vicuna_v0, + "v0": conv_vicuna_v0, + "v1": conv_vicuna_v1, + "llava_med": conv_llava_med, + "vicuna_v1": conv_vicuna_v1, + "llama_2": conv_llama_2, + + "plain": conv_llava_plain, + "v0_plain": conv_llava_plain, + "llava_v0": conv_llava_v0, + "v0_mmtag": conv_llava_v0_mmtag, + "llava_v1": conv_llava_v1, + "v1_mmtag": conv_llava_v1_mmtag, + "llava_llama_2": conv_llava_llama_2, + "multimodal": simple_conv_multimodal, + + "mpt": conv_mpt, +} + + +if __name__ == "__main__": + print(default_conversation.get_prompt()) diff --git a/findings_classifier/__init__.py b/findings_classifier/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/findings_classifier/checkpoints/chexpert_train/ChexpertClassifier.ckpt b/findings_classifier/checkpoints/chexpert_train/ChexpertClassifier.ckpt new file mode 100644 index 0000000000000000000000000000000000000000..c17a2b30e6657f144bd62393cdff53c36b8ee148 --- /dev/null +++ b/findings_classifier/checkpoints/chexpert_train/ChexpertClassifier.ckpt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3086d2be0a25d1048831957c28c62f568cc86970ab0cc25036574454da166cd0 +size 315459557 diff --git a/findings_classifier/chexpert_dataset.py b/findings_classifier/chexpert_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..9f8e59f21f9fa659691a15a0d90549e814d28b83 --- /dev/null +++ b/findings_classifier/chexpert_dataset.py @@ -0,0 +1,153 @@ +import os +from pathlib import Path + +import numpy as np +import pandas as pd +import torch +from PIL import Image +from skimage import io +from torch.utils.data import Dataset +from torchvision.transforms import Compose, Resize, CenterCrop, ToTensor, transforms + +from local_config import VIS_ROOT, PATH_TO_MIMIC_CXR + +class Chexpert_Dataset(Dataset): + def __init__(self, split='train', truncate=None, loss_weighting="none", use_augs=False): + + super().__init__() + + # load csv file + self.split = pd.read_csv(f'{PATH_TO_MIMIC_CXR}/mimic-cxr-jpg/2.0.0/mimic-cxr-2.0.0-split.csv') + self.reports = pd.read_csv('mimic-cxr/reports_processed/mimic_cxr_sectioned.csv') + self.reports = self.reports.dropna(subset=['findings']) + + self.vis_root = VIS_ROOT + self.img_ids = {img_id: i for i, img_id in enumerate(self.reports['dicom_id'])} + self.split_ids = set(self.split.loc[self.split['split'] == split]['dicom_id']) + self.chexpert = pd.read_csv(f'data/data_files/finding_chexbert_labels.csv') + self.chexpert_cols = ["No Finding", "Enlarged Cardiomediastinum", + "Cardiomegaly", "Lung Opacity", + "Lung Lesion", "Edema", + "Consolidation", "Pneumonia", + "Atelectasis", "Pneumothorax", + "Pleural Effusion", "Pleural Other", + "Fracture", "Support Devices"] + + # get all dicom_ids where "split" is split + self.annotation = self.reports.loc[self.reports['dicom_id'].isin(self.split_ids)] + self.annotation['study_id'] = self.annotation['Note_file'].apply(lambda x: int(x.lstrip('s').rstrip('.txt'))) + # merge chexpert labels + self.annotation = pd.merge(self.annotation, self.chexpert, how='left', left_on=['dicom_id'], right_on=['dicom_id']) + if truncate is not None: + self.annotation = self.annotation[:truncate] + + self.vis_transforms = Compose([Resize(512), CenterCrop(488), ToTensor(), ExpandChannels()]) + if use_augs: + aug_tfm = transforms.Compose([transforms.RandomAffine(degrees=30, shear=15), + transforms.ColorJitter(brightness=0.2, contrast=0.2)]) + + self.vis_transforms = transforms.Compose([self.vis_transforms, aug_tfm]) + self.loss_weighting = loss_weighting + + def get_class_weights(self): + """Compute class weights based on the inverse of class frequencies. + + Returns: + Dict[str, float]: Class weights. + """ + if self.loss_weighting == "none": + return torch.ones(len(self.chexpert_cols), dtype=torch.float32) + + label_counts = torch.zeros(len(self.chexpert_cols), dtype=torch.float32) + # iterate over dataframe getting rows + for _, ann in self.annotation.iterrows(): + chexpert_labels = self._extract_chexpert_labels_from_row(ann) + label_counts += chexpert_labels + + # Compute class weights + if self.loss_weighting == "lin": + class_weights = len(self.annotation) / label_counts + elif self.loss_weighting == "log": + class_weights = torch.log(len(self.annotation) / label_counts) + + return class_weights + + def remap_to_uint8(self, array: np.ndarray, percentiles=None) -> np.ndarray: + """Remap values in input so the output range is :math:`[0, 255]`. + + Percentiles can be used to specify the range of values to remap. + This is useful to discard outliers in the input data. + + :param array: Input array. + :param percentiles: Percentiles of the input values that will be mapped to ``0`` and ``255``. + Passing ``None`` is equivalent to using percentiles ``(0, 100)`` (but faster). + :returns: Array with ``0`` and ``255`` as minimum and maximum values. + """ + array = array.astype(float) + if percentiles is not None: + len_percentiles = len(percentiles) + if len_percentiles != 2: + message = ( + 'The value for percentiles should be a sequence of length 2,' + f' but has length {len_percentiles}' + ) + raise ValueError(message) + a, b = percentiles + if a >= b: + raise ValueError(f'Percentiles must be in ascending order, but a sequence "{percentiles}" was passed') + if a < 0 or b > 100: + raise ValueError(f'Percentiles must be in the range [0, 100], but a sequence "{percentiles}" was passed') + cutoff: np.ndarray = np.percentile(array, percentiles) + array = np.clip(array, *cutoff) + array -= array.min() + array /= array.max() + array *= 255 + return array.astype(np.uint8) + + def load_image(self, path) -> Image.Image: + """Load an image from disk. + + The image values are remapped to :math:`[0, 255]` and cast to 8-bit unsigned integers. + + :param path: Path to image. + :returns: Image as ``Pillow`` ``Image``. + """ + # Although ITK supports JPEG and PNG, we use Pillow for consistency with older trained models + if path.suffix in [".jpg", ".jpeg", ".png"]: + image = io.imread(path) + else: + raise ValueError(f"Image type not supported, filename was: {path}") + + image = self.remap_to_uint8(image) + return Image.fromarray(image).convert("L") + + def _extract_chexpert_labels_from_row(self, row: pd.Series) -> torch.Tensor: + labels = torch.zeros(len(self.chexpert_cols), dtype=torch.float32) + for i, col in enumerate(self.chexpert_cols): + if row[col] == 1: + labels[i] = 1 + return labels + + def __getitem__(self, index): + ann = self.annotation.iloc[index] + image_path = os.path.join(self.vis_root, ann["Img_Folder"], ann["Img_Filename"]) + image = self.load_image(Path(image_path)) + image = self.vis_transforms(image) + chexpert_labels = self._extract_chexpert_labels_from_row(ann) + + return { + "image": image, + "labels": chexpert_labels, + "image_id": self.img_ids[ann["dicom_id"]], + "report": ann["findings"], + "study_id": ann["study_id"], + "dicom_id": ann["dicom_id"], + } + + def __len__(self): + return len(self.annotation) + + +if __name__ == '__main__': + dataset = Chexpert_Dataset() + print(dataset[0]) diff --git a/findings_classifier/chexpert_model.py b/findings_classifier/chexpert_model.py new file mode 100644 index 0000000000000000000000000000000000000000..950222694ed3f94163e61c2ce94eb226ab60da4c --- /dev/null +++ b/findings_classifier/chexpert_model.py @@ -0,0 +1,21 @@ +import torch +from torch import nn + +from biovil_t.pretrained import get_biovil_t_image_encoder + + +class ChexpertClassifier(nn.Module): + def __init__(self, num_classes): + super().__init__() + self.biovil_encoder = get_biovil_t_image_encoder() + + self.fc1 = nn.Linear(128 * 4 * 4, 512) + self.fc2 = nn.Linear(512, num_classes) + + def forward(self, x): + x = self.biovil_encoder(x).projected_patch_embeddings + x = torch.nn.functional.avg_pool2d(x, 4) + x = x.view(x.shape[0], -1) # Flatten the tensor + x = torch.relu(self.fc1(x)) + # x = self.biovil_encoder(x).img_embedding + return self.fc2(x) diff --git a/findings_classifier/chexpert_train.py b/findings_classifier/chexpert_train.py new file mode 100644 index 0000000000000000000000000000000000000000..cba90bc2b80af43857576d0318eeb779ad4ee238 --- /dev/null +++ b/findings_classifier/chexpert_train.py @@ -0,0 +1,256 @@ +# os.environ["CUDA_VISIBLE_DEVICES"] = "6" +import argparse +import json +from collections import defaultdict + +import numpy as np +import pytorch_lightning as pl +import torch +import wandb +from pytorch_lightning.callbacks import ModelCheckpoint +from sklearn.metrics import accuracy_score, classification_report, jaccard_score, roc_auc_score +from torch.nn import BCEWithLogitsLoss +from torch.utils.data import DataLoader +from torchinfo import summary +from tqdm import tqdm +from transformers import AdamW + +from findings_classifier.chexpert_dataset import Chexpert_Dataset +from findings_classifier.chexpert_model import ChexpertClassifier +from local_config import WANDB_ENTITY + +class ExpandChannels: + """ + Transforms an image with one channel to an image with three channels by copying + pixel intensities of the image along the 1st dimension. + """ + + def __call__(self, data: torch.Tensor) -> torch.Tensor: + """ + :param data: Tensor of shape [1, H, W]. + :return: Tensor with channel copied three times, shape [3, H, W]. + """ + if data.shape[0] != 1: + raise ValueError(f"Expected input of shape [1, H, W], found {data.shape}") + return torch.repeat_interleave(data, 3, dim=0) + +class LitIGClassifier(pl.LightningModule): + def __init__(self, num_classes, class_names, class_weights=None, learning_rate=1e-5): + super().__init__() + + # Model + self.model = ChexpertClassifier(num_classes) + + # Loss with class weights + if class_weights is None: + self.criterion = BCEWithLogitsLoss() + else: + self.criterion = BCEWithLogitsLoss(pos_weight=class_weights) + + # Learning rate + self.learning_rate = learning_rate + self.class_names = class_names + + def forward(self, x): + return self.model(x) + + def step(self, batch, batch_idx): + x, y = batch['image'].to(self.device), batch['labels'].to(self.device) + logits = self(x) + loss = self.criterion(logits, y) + + # Apply sigmoid to get probabilities + preds_probs = torch.sigmoid(logits) + + # Get predictions as boolean values + preds = preds_probs > 0.5 + + # calculate jaccard index + jaccard = jaccard_score(y.cpu().numpy(), preds.detach().cpu().numpy(), average='samples') + + class_report = classification_report(y.cpu().numpy(), preds.detach().cpu().numpy(), output_dict=True) + # scores = class_report['micro avg'] + scores = class_report['macro avg'] + metrics_per_label = {label: metrics for label, metrics in class_report.items() if label.isdigit()} + + f1 = scores['f1-score'] + rec = scores['recall'] + prec = scores['precision'] + acc = accuracy_score(y.cpu().numpy().flatten(), preds.detach().cpu().numpy().flatten()) + try: + auc = roc_auc_score(y.cpu().numpy().flatten(), preds_probs.detach().cpu().numpy().flatten()) + except Exception as e: + auc = 0. + + return loss, acc, f1, rec, prec, jaccard, auc, metrics_per_label + + def training_step(self, batch, batch_idx): + loss, acc, f1, rec, prec, jaccard, auc, _ = self.step(batch, batch_idx) + train_stats = {'loss': loss, 'train_acc': acc, 'train_f1': f1, 'train_rec': rec, 'train_prec': prec, 'train_jaccard': jaccard, + 'train_auc': auc} + wandb_run.log(train_stats) + return train_stats + + def training_epoch_end(self, outputs): + avg_loss = torch.stack([x['loss'] for x in outputs]).mean() + avg_acc = np.mean([x['train_acc'] for x in outputs]) + avg_f1 = np.mean([x['train_f1'] for x in outputs]) + avg_rec = np.mean([x['train_rec'] for x in outputs]) + avg_prec = np.mean([x['train_prec'] for x in outputs]) + avg_jaccard = np.mean([x['train_jaccard'] for x in outputs]) + avg_auc = np.mean([x['train_auc'] for x in outputs]) + wandb_run.log({'epoch_train_loss': avg_loss, 'epoch_train_acc': avg_acc, 'epoch_train_f1': avg_f1, 'epoch_train_rec': avg_rec, + 'epoch_train_prec': avg_prec, 'epoch_train_jaccard': avg_jaccard, 'epoch_train_auc': avg_auc}) + + def validation_step(self, batch, batch_idx): + loss, acc, f1, rec, prec, jaccard, auc, metrics_per_label = self.step(batch, batch_idx) + # log f1 for checkpoint callback + self.log('val_f1', f1) + return {'val_loss': loss, 'val_acc': acc, 'val_f1': f1, 'val_rec': rec, 'val_prec': prec, 'val_jaccard': jaccard, + 'val_auc': auc}, metrics_per_label + + def validation_epoch_end(self, outputs): + outputs, per_label_metrics_outputs = zip(*outputs) + avg_loss = torch.stack([x['val_loss'] for x in outputs]).mean() + avg_acc = np.mean([x['val_acc'] for x in outputs]) + avg_f1 = np.mean([x['val_f1'] for x in outputs]) + avg_rec = np.mean([x['val_rec'] for x in outputs]) + avg_prec = np.mean([x['val_prec'] for x in outputs]) + avg_jaccard = np.mean([x['val_jaccard'] for x in outputs]) + avg_auc = np.mean([x['val_auc'] for x in outputs]) + + per_label_metrics = defaultdict(lambda: defaultdict(float)) + label_counts = defaultdict(int) + for metrics_per_label in per_label_metrics_outputs: + for label, metrics in metrics_per_label.items(): + label_name = self.class_names[int(label)] + per_label_metrics[label_name]['precision'] += metrics['precision'] + per_label_metrics[label_name]['recall'] += metrics['recall'] + per_label_metrics[label_name]['f1-score'] += metrics['f1-score'] + per_label_metrics[label_name]['support'] += metrics['support'] + label_counts[label_name] += 1 + + # Average the metrics + for label, metrics in per_label_metrics.items(): + for metric_name in ['precision', 'recall', 'f1-score']: + if metrics['support'] > 0: + per_label_metrics[label][metric_name] /= label_counts[label] + + val_stats = {'val_loss': avg_loss, 'val_acc': avg_acc, 'val_f1': avg_f1, 'val_rec': avg_rec, 'val_prec': avg_prec, 'val_jaccard': avg_jaccard, + 'val_auc': avg_auc} + wandb_run.log(val_stats) + + def test_step(self, batch, batch_idx): + loss, acc, f1, rec, prec, jaccard, auc, _ = self.step(batch, batch_idx) + return {'test_loss': loss, 'test_acc': acc, 'test_f1': f1, 'test_rec': rec, 'test_prec': prec, 'test_jaccard': jaccard, 'test_auc': auc} + + def test_epoch_end(self, outputs): + avg_loss = torch.stack([x['test_loss'] for x in outputs]).mean() + avg_acc = np.mean([x['test_acc'] for x in outputs]) + avg_f1 = np.mean([x['test_f1'] for x in outputs]) + avg_rec = np.mean([x['test_rec'] for x in outputs]) + avg_prec = np.mean([x['test_prec'] for x in outputs]) + avg_jaccard = np.mean([x['test_jaccard'] for x in outputs]) + avg_auc = np.mean([x['test_auc'] for x in outputs]) + + test_stats = {'test_loss': avg_loss, 'test_acc': avg_acc, 'test_f1': avg_f1, 'test_rec': avg_rec, 'test_prec': avg_prec, + 'test_jaccard': avg_jaccard, 'test_auc': avg_auc} + wandb_run.log(test_stats) + + def configure_optimizers(self): + optimizer = AdamW(self.parameters(), lr=self.learning_rate) + return optimizer + + +def save_preds(dataloader, split): + # load checkpoint + ckpt_path = f"findings_classifier/checkpoints/chexpert_train/ChexpertClassifier-epoch=06-val_f1=0.36.ckpt" + model = LitIGClassifier.load_from_checkpoint(ckpt_path, num_classes=num_classes, class_weights=val_dataset.get_class_weights(), + class_names=class_names, learning_rate=args.lr) + model.eval() + model.cuda() + model.half() + class_names_np = np.asarray(class_names) + + # get predictions for all study ids + structured_preds = {} + for batch in tqdm(dataloader): + dicom_ids = batch['dicom_id'] + logits = model(batch['image'].half().cuda()) + preds_probs = torch.sigmoid(logits) + preds = preds_probs > 0.5 + + # iterate over each study id in the batch + for i, (dicom_id, pred) in enumerate(zip(dicom_ids, preds.detach().cpu())): + # get all positive labels + findings = class_names_np[pred].tolist() + structured_preds[dicom_id] = findings + + # save predictions + with open(f"findings_classifier/predictions/structured_preds_chexpert_log_weighting_macro_{split}.json", "w") as f: + json.dump(structured_preds, f, indent=4) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument("--run_name", type=str, default="debug") + parser.add_argument("--lr", type=float, default=5e-5) + parser.add_argument("--epochs", type=int, default=6) + parser.add_argument("--loss_weighting", type=str, default="log", choices=["lin", "log", "none"]) + parser.add_argument("--truncate", type=int, default=None) + parser.add_argument("--batch_size", type=int, default=64) + parser.add_argument("--num_workers", type=int, default=12) + parser.add_argument("--use_augs", action="store_true", default=False) + parser.add_argument("--train", action="store_true", default=False) + args = parser.parse_args() + + TRAIN = args.train + + # fix all seeds + pl.seed_everything(42, workers=True) + + # Create DataLoaders + train_dataset = Chexpert_Dataset(split='train', truncate=args.truncate, loss_weighting=args.loss_weighting, use_augs=args.use_augs) + val_dataset = Chexpert_Dataset(split='validate', truncate=args.truncate) + test_dataset = Chexpert_Dataset(split='test') + + train_dataloader = DataLoader(train_dataset, batch_size=args.batch_size, shuffle=True, num_workers=args.num_workers) + val_dataloader = DataLoader(val_dataset, batch_size=args.batch_size, num_workers=args.num_workers) + test_dataloader = DataLoader(test_dataset, batch_size=args.batch_size, num_workers=args.num_workers) + + # Number of classes for IGClassifier + num_classes = len(train_dataset.chexpert_cols) + class_names = train_dataset.chexpert_cols + + if TRAIN: + class_weights = torch.tensor(train_dataset.get_class_weights(), dtype=torch.float32) + # Define the model + lit_model = LitIGClassifier(num_classes, class_weights, class_names, learning_rate=args.lr) + print(summary(lit_model)) + + # WandB logger + wandb_run = wandb.init( + project="ChexpertClassifier", + entity= WANDB_ENTITY, + name=args.run_name + ) + + # checkpoint callback + checkpoint_callback = ModelCheckpoint( + monitor='val_f1', + dirpath=f'findings_classifier/checkpoints/{args.run_name}', + filename='ChexpertClassifier-{epoch:02d}-{val_f1:.2f}', + save_top_k=1, + save_last=True, + mode='max', + ) + # Train the model + trainer = pl.Trainer(max_epochs=args.epochs, gpus=1, callbacks=[checkpoint_callback], benchmark=False, deterministic=True, precision=16) + trainer.fit(lit_model, train_dataloader, val_dataloader) + + # Test the model + # trainer.validate(lit_model, val_dataloader, ckpt_path="checkpoints_IGCLassifier/lr_5e-5_to0_log_weighting_patches_augs_imgemb/IGClassifier-epoch=09-val_f1=0.65.ckpt") + else: + save_preds(train_dataloader, "train") + save_preds(val_dataloader, "val") + save_preds(test_dataloader, "test") diff --git a/findings_classifier/predictions/structured_preds_chexpert_log_weighting_test_macro.json b/findings_classifier/predictions/structured_preds_chexpert_log_weighting_test_macro.json new file mode 100644 index 0000000000000000000000000000000000000000..18d47a6ebac796902b62d260e9518ebf58b33e0f --- /dev/null +++ b/findings_classifier/predictions/structured_preds_chexpert_log_weighting_test_macro.json @@ -0,0 +1,16661 @@ +{ + "18f0fd6d-f513afc9-e4aa8de2-bc5ac0d6-ea3daaff": [ + "Lung Opacity", + "Lung Lesion" + ], + "7d5ef12b-34d86e32-207566d6-d5ed6f02-cd868f2c": [], + "eab11c59-32a5b9b8-b8d335fa-ce06c5fa-5bde0499": [], + "427446c1-881f5cce-85191ce1-91a58ba9-0a57d3f5": [], + "abea5eb9-b7c32823-3a14c5ca-77868030-69c83139": [ + "Enlarged Cardiomediastinum", + "Lung Lesion" + ], + "e2856783-ffa5ec26-043b0303-21aeddc6-b11b2876": [ + "Enlarged Cardiomediastinum" + ], + "6e511483-c7e1601c-76890b2f-b0c6b55d-e53bcbf6": [], + "e5ba5704-ce2f09d3-e28fe2a2-8a9aca96-86f4966a": [ + "Lung Opacity", + "Lung Lesion" + ], + "0c69d156-6f5f3a89-7d361367-57f8c979-583ef198": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "14ff31ea-afb9a3f3-fca0fe57-1fb4e5d4-9f537945": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "befa8b27-2bfd96b0-d50f7eda-deffa4f9-dd7e7314": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f2ea048e-52ada468-199a5a64-06f14cb3-76e57312": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "1b966ed7-06a3bfa3-fee1b692-81c9a0b7-7678b5ec": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "2b68ac0e-611f3a5f-ddd4047f-97ef55a1-538b75df": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2c047cc5-4f33acea-462ae2cb-0d9a48d2-8906e8f9": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "2d0d0dd1-758ad05c-5f33e8fa-08a1e0dc-63d862be": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "b0cabafd-224d8d46-c113bb88-27e041f4-2ecf273b": [ + "Atelectasis", + "Support Devices" + ], + "e279d10a-22b3d14a-0527c87a-bbd31c9b-de232422": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "2f8ca5e2-5a1e02ab-e84f7547-069743e9-0f08d9e0": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "672a57a9-30dbdb02-4e0a1676-fbf127b4-e2f52011": [ + "Cardiomegaly", + "Support Devices" + ], + "4c3c1335-0fce9b11-027c582b-a0ed8d89-ca614d90": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "f1b12ac7-37699f77-a605ccbb-0eee65fd-e2f0351d": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "d6010cbd-efa41b72-2fbc0daf-8fa1dc40-bdd4fe35": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "46258faf-c930aa13-1b09c523-4972126b-47bba114": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "95efb462-e05c1ac9-3c5319d6-bafdcede-df6db042": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "28c17b79-14a8e7a1-14591313-2a68d678-39106288": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "f8e1f272-c87c4a00-60025a33-09d9a7ea-c1125ac6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "053e0fdd-17dbee89-17885e49-08249a30-7f829c9c": [ + "Cardiomegaly", + "Edema", + "Atelectasis" + ], + "e35d7c70-3f278882-4f133ee9-184f4d7e-fa32a4d7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "29ab48f7-15a14464-5b7c1cc3-3ba3aa97-64ebc637": [ + "Cardiomegaly" + ], + "2cc38dd6-d1f5970f-055155bc-e9e8fccd-8ec98168": [ + "Cardiomegaly", + "Edema" + ], + "d570aba7-45a558d7-52f77673-704bdc98-85e97946": [ + "Cardiomegaly" + ], + "d6051124-a16053dc-2b4ecb89-8e1a17a9-252c1e8f": [], + "515cb0a1-2209cb99-b1f8292c-d6d6acc1-1533f233": [ + "Atelectasis" + ], + "7b43b8ff-190d3ca9-03cfbbd3-45ad3d0d-72d06c1c": [ + "Cardiomegaly", + "Edema" + ], + "638f2c7f-1ddfe2c3-062f8057-b3e8a5aa-17b03955": [ + "Cardiomegaly", + "Edema" + ], + "b863ce69-7e0670b3-3c5a3a29-b96b7248-a616113c": [ + "Lung Opacity" + ], + "4a0397d2-1c7cac8d-bd1e1991-d3459191-3e510506": [], + "4e60f3da-37ed157d-a469a568-0b2ee907-4b01c924": [ + "Cardiomegaly" + ], + "8f25d878-fb6e48eb-adfc39cb-10da1ebd-3d14c369": [], + "d170e96d-5241319c-af503f23-ebe1d998-b9396ee5": [], + "ed842464-13c00e81-9df3129d-439db19a-7b5804f7": [], + "ff260ed6-eff650ee-0d5d5964-3af89ad3-8152f5dd": [ + "Cardiomegaly" + ], + "2ae8ec41-067f24d2-3f3ea6b7-113cb63b-aa3cc9e0": [ + "Lung Opacity", + "Pneumonia" + ], + "3a482f4e-16d6aea0-57ca6763-e23182b9-ae66b9e9": [ + "Lung Opacity", + "Fracture" + ], + "df947133-0a0bb9b7-96bc6378-2eeb01c8-dcb9c4d5": [ + "Lung Opacity", + "Pneumonia" + ], + "510e2767-2a04a9c8-afb492f8-57d38e8e-75d5d488": [ + "Lung Opacity", + "Lung Lesion" + ], + "5db0c1c9-ed5d119d-aaad1f9a-7c0edc05-e53df1c9": [ + "Lung Opacity" + ], + "416b3f78-42417756-a0ba04e9-a8248885-a0e040a9": [ + "Lung Opacity", + "Support Devices" + ], + "840febf0-f7f07a57-33f1bfa8-6a02494a-8dc4cb09": [ + "Lung Lesion", + "Support Devices" + ], + "8797515b-595dfac0-77013a06-226b52bd-65681bf2": [], + "b5da9d38-5e0c570b-e88b17c1-029654a9-a4f8a0b3": [], + "beee7706-2c364242-556f9ecf-0c075776-01c10230": [ + "Lung Opacity" + ], + "c09a6b81-3118c102-3127bf27-987bd433-7114e2d1": [ + "Lung Opacity" + ], + "c4713b43-d31ad200-30f7309b-ba7d87e3-b69db479": [ + "Lung Lesion" + ], + "09bcae55-47d8afaa-5cd21ca4-2cc83c46-d432bd6d": [ + "Lung Opacity", + "Support Devices" + ], + "ebe51e24-5dfa5fed-d1e73cba-a113404b-93ffae17": [ + "Pneumothorax", + "Pleural Effusion", + "Fracture" + ], + "a1c0c58e-8c137d13-93b93845-da0433ee-9ccb3c91": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "df2895c4-f22e3845-5f1d5bff-ccd63f42-bf5e30eb": [ + "Pneumothorax", + "Pleural Effusion", + "Fracture" + ], + "05dad5f1-e33191fc-c4063ab8-15fcf471-3f82205d": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia", + "Pleural Effusion" + ], + "3d8031cb-7f207914-fcd68ada-f9eb48e5-ec6ac11a": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "4a290ca1-4a62a5d5-96249a76-55141456-be7b08f4": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "20f54ecb-20a32ed8-5f27bfe6-e9d07de1-ce76357e": [ + "Atelectasis", + "Pleural Effusion" + ], + "271ab9c9-419a0db3-215b585b-1c874aad-7c04a49d": [ + "Atelectasis", + "Pleural Effusion" + ], + "5644c5de-1ae5b48c-edb63079-e8230bfa-79dfbf13": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "e26bcba2-87e8c63d-e3b9b2c2-e679f9e8-0f3c295b": [ + "Pleural Effusion" + ], + "380fda55-d2283afd-511dcad7-803d3b6a-ed8c6b64": [ + "Lung Lesion", + "Pneumothorax" + ], + "8710a9ad-589288a8-7983c163-56388801-14daa160": [ + "Pleural Effusion" + ], + "3ba8fbbe-989e2f64-3cf29b67-e6b2c2c1-d0887a73": [ + "Atelectasis", + "Pleural Effusion" + ], + "74ab0576-165250aa-5fedc1a0-3f75f2c6-9f87fa70": [ + "Atelectasis", + "Pleural Effusion" + ], + "d0d4eac2-fe96ec0d-2ae1e81a-b604ed2b-3e55789f": [], + "827ee5d1-edb520dd-ec2cf0f6-5f7c165d-453421fb": [ + "Lung Opacity", + "Consolidation", + "Pneumothorax", + "Pleural Effusion" + ], + "08a8deab-aa27ad50-256fe6f1-21da6275-363a878d": [ + "Lung Opacity", + "Lung Lesion" + ], + "387c76dd-5c98b144-ff773e04-8401a69c-e93e16d0": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "cbba1c1b-baa08812-9bf09668-f10eec71-d6c20e98": [], + "bcfa89ae-4f7e4307-6bb629ee-15495f05-7e31cca0": [], + "2e5ac89a-e2d5d8c6-8cbf02bc-ec6e4725-9339a9cc": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "5eae8395-ea7af71c-6d518498-6d193886-1c2d0853": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "d43639b5-bec0c47c-8415bea0-3a2f74e5-627c89d4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "cbf70dce-197f82f4-7b8613a7-c0b0b099-d1de4726": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "ffa27b68-fa32bc2b-9197ec90-33bf30ae-8bea837b": [ + "Lung Opacity", + "Support Devices" + ], + "3d0754cf-6b313d54-5c41bc32-9f042b6f-4f2f7051": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "1d74ca1d-12ac2785-bd84a322-376f04bc-b9fdaa99": [ + "Lung Opacity", + "Edema" + ], + "aef56b96-414318d0-e624a158-a88b719d-18fa9377": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "fd8df0f3-08320e37-c337efdf-505d4348-76e89a9e": [ + "Cardiomegaly", + "Support Devices" + ], + "5fb4fd93-f41ffe10-432dff5b-080386a2-de609585": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "2883541d-6a242b68-0838ecc7-5cd20cbf-133ec77b": [ + "Support Devices" + ], + "2bd79f61-da184ac4-7311c0ac-3f0af71f-65418141": [ + "Lung Opacity", + "Pleural Other" + ], + "bf36414d-6c371df9-7c7106e2-8b9991bc-f24f52d1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "58c735ba-cc7d2492-f290f622-154bc6f2-5fdc853c": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "91623d3d-e82bd37b-a89a94ab-6a69e4ac-8e679081": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "3ea6406a-214fd5a4-1e6e4b0e-195445b8-1ea913b3": [ + "Lung Opacity" + ], + "8213973a-4ae791c1-ff080394-69e53e74-8e6d3813": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "aa76851a-342b6f60-4e4b51be-3a80fe61-92b39e20": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "609ca0e0-3dcbf65f-38322c64-03e4fea0-3faa3a90": [ + "Atelectasis" + ], + "ca9c23fa-7ce50ff3-f17c9e8e-6e334bd7-76fea55e": [ + "Cardiomegaly", + "Atelectasis" + ], + "144841f5-0126909a-cde81d66-1db1375d-b3ed7127": [ + "Lung Opacity", + "Atelectasis" + ], + "c030b6d3-bd30c805-6a5b4a1c-43939f5d-e533cace": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "c11e9140-f4243636-254f1c94-23fa1f6b-4efd76bf": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "150a4890-ad806dcc-cc602c78-0f644480-ea77a79e": [ + "Cardiomegaly" + ], + "9f4bbb18-b5f3b163-4d6eeb13-986b9f71-ac88f08a": [ + "Enlarged Cardiomediastinum" + ], + "d2738a71-3831deab-ac7d0164-16ff75a4-284704ff": [ + "Cardiomegaly" + ], + "15021246-7240defd-a21246de-0fed22d9-fe09d00e": [ + "Cardiomegaly" + ], + "8553b174-2aa2d55b-4b3dbe15-7655300b-ea62c5ae": [ + "Cardiomegaly", + "Atelectasis" + ], + "a8d732de-7a28af8e-8a5a6a3f-c66be26f-ad23f1aa": [ + "Cardiomegaly", + "Fracture" + ], + "2aefd0c6-f20a9f20-b89876d6-d3975e45-44260401": [], + "c06be36c-7264616a-87131515-76b5c50a-10dc90ba": [ + "Cardiomegaly", + "Lung Opacity" + ], + "fd3224e7-dfaaffb6-aa247f5e-a9df753d-de656567": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "5c549479-dcb2c159-300ce6a6-b8362dc7-c43d8f1d": [ + "Cardiomegaly" + ], + "655d3207-d13024d7-c94b6261-b2f2448d-6d4f566f": [ + "Cardiomegaly" + ], + "0df9bbe7-ea299297-6717c3a6-4faece0e-15ca4a73": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis" + ], + "83d40298-284d7832-cb39f63b-f6426b53-6ac3f6a7": [ + "Atelectasis" + ], + "445fdcdb-f4896587-4f3f5bf8-e3a051ad-290f10ae": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "ef191125-3db31590-77881dc9-a6302910-7a35821f": [ + "Atelectasis", + "Support Devices" + ], + "3878f00f-4b737c96-dff939c5-2f24a10d-23db2293": [ + "Support Devices" + ], + "6bad4c60-b2e3becf-a99801f7-aac3757c-2b669f35": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c1baa6ae-9d0ddcca-488ee34e-e6160d6d-658fb00f": [ + "Cardiomegaly", + "Fracture" + ], + "edfd806e-5c672eea-1119d9d0-44c282a8-7c3d9730": [ + "Pleural Other" + ], + "a4cc4fce-403bca64-3d69bd14-402f40af-28edbebd": [ + "Cardiomegaly" + ], + "fbaf1e44-468cb5b9-2cd8fc25-a7f7e778-1dde8b89": [ + "Cardiomegaly" + ], + "8671643b-f06c27c8-91a43c5d-85161fe5-a1eb95b0": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "264b773c-cd573e36-8b42c4fd-971c4302-1946ed5a": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "77961fbc-766a38fd-e7b726ed-43313009-06ed55d4": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "989b6a15-ba84ab43-d60ebb5a-c7681741-c34f140f": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "b079d6bd-55655ce2-25867c4e-0deba6a1-8a159d08": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "74501968-2251dd66-a1905203-8ff7c470-9c45dcb6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "0cdeff10-c7e75e12-5c067cb6-eab4e635-50d1144c": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "701d2394-b800427d-91a53aa7-5fb33fd1-663b37c1": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "59d23a34-823a7104-45271e4a-39555147-92da6698": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9529ad06-bd4c030d-c2fd3c79-bd22fe59-93792d9d": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "36d187c2-a2f1c238-25e77d89-19d5e8b8-ca837472": [ + "Lung Opacity", + "Pneumonia" + ], + "9065147e-4fa65619-480eba86-8e159f3d-3d96acd4": [ + "Lung Opacity" + ], + "526cdb3f-f4ef95d2-68e47227-531a01e7-b3f4744c": [ + "Cardiomegaly" + ], + "e12e1dd7-9b6e4d27-63a06a72-937c9716-451f2db8": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "c979aaaa-4bb31072-c9884178-6e3ced8b-edf531fa": [ + "Cardiomegaly" + ], + "e88fa460-a2901f48-730373f3-89be4f0a-89e6e2a9": [ + "Cardiomegaly" + ], + "17c56a39-e22f86fe-75387134-c9695d82-356794b0": [ + "Support Devices" + ], + "2661a129-f2f4b642-9b833ee7-ab398d55-07a36871": [ + "Cardiomegaly", + "Support Devices" + ], + "1bc3d3de-cd13c1cd-ce13e61d-5191632c-e3ae7b5c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "46bd0776-78bcff84-5e4494eb-6f9c877a-a356af25": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "38ea1228-340e5c29-16578c7c-9c80eaed-1bb35307": [ + "Lung Opacity", + "Pleural Other" + ], + "1231b887-acb0db8e-542e2670-f80f2767-19869a42": [ + "Lung Opacity", + "Pleural Other" + ], + "51ea4142-02884657-6fad2f5e-4b5e3e24-7eda58aa": [ + "Lung Opacity", + "Pleural Other" + ], + "97a5f522-bb4f6eac-5f7d4736-30880e7b-872ea26f": [ + "Lung Opacity", + "Support Devices" + ], + "bcb5e90b-c7d3f928-7bd202ee-4e772a8f-e2240e90": [ + "Lung Opacity", + "Pleural Other" + ], + "6a0e1f5d-e6e23298-495f2580-9ef21652-d843b243": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "13b3f835-9d35e2fb-bef55a2d-4bf1a470-21b7626c": [ + "Lung Opacity", + "Pleural Other" + ], + "46b5b999-bd0dd08a-4756e4ca-de3d7098-494c0126": [ + "Lung Opacity", + "Pleural Other" + ], + "62cd4342-77a1737e-da11be7c-6914655a-20dc273b": [ + "Lung Opacity", + "Lung Lesion" + ], + "15941772-4cd5498f-ccdb2ccb-80f7a7f0-af9b87e9": [ + "Lung Opacity", + "Pleural Other" + ], + "bb795051-0e639ffa-dbded494-287ec2f7-1a213bd1": [ + "Lung Opacity", + "Pleural Other" + ], + "d1476c64-942c69d1-01468aa0-5ba156c1-07f5abb4": [ + "Lung Opacity", + "Pleural Effusion" + ], + "da5580a4-d85e8eac-795ffec6-41e6d24b-273b3747": [ + "Lung Opacity" + ], + "a7fdae9e-97d1a4d6-df3c7f40-29a51d88-39463d76": [ + "Lung Opacity" + ], + "ce354924-31b789c8-efd39b27-f2708902-84e7f064": [ + "Atelectasis" + ], + "e7842e08-9ac5d312-a9c14d39-62df9f23-c7a94a70": [ + "Lung Opacity", + "Atelectasis" + ], + "f1e6712c-61dabae0-6691539a-039dcbb7-6c467216": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "eee70ea1-a4bb5ad0-eb92e7e6-ac788ab6-922f880b": [ + "Lung Opacity", + "Consolidation", + "Atelectasis" + ], + "5b429228-9769c874-369577de-11d25077-c9ad1f2b": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "747bf134-95cc6d92-0fb6f30d-863827b7-3042900e": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9623a655-03f06280-bcea21d9-461fa137-276ea8f3": [ + "Lung Opacity" + ], + "33cbca42-cc8136d7-714fe7b7-c6fd6342-7bfbd4f1": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "5fd6fa4a-2108246f-d9199b99-e14370ae-0eea894d": [ + "Cardiomegaly", + "Support Devices" + ], + "9192ac1a-8d64bbf3-4b035831-96f59abc-903b2aaa": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9189763d-c3b6ee12-d0d89f14-29a0cb1f-e3dee331": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "51dc7b8e-860b2222-aad3c79e-02a2a9d0-085ebd6d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "68ea99a4-bd75cd2b-df54e0c2-ae1f3e13-c5a9bca4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fdd8adcf-96e61323-ef98915c-c91ab8b9-7bf45f5e": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c5317373-5acdf384-4d5fee0f-423f29ef-22858502": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "104737c6-53b91029-bb16816d-13bbcdb8-0564caa2": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "60c60c6e-1471b41d-d8ae011a-299592ea-7c39d5e7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "16fbacce-c16d2bb4-ab113b1b-2956fc48-9f78a96d": [ + "Lung Opacity" + ], + "67106e2c-168fd4e2-52fbcc7d-4c4b2f27-5499c157": [ + "Lung Opacity", + "Lung Lesion" + ], + "3e25d193-509147d7-b305908a-51e0da17-7cb23fda": [ + "Lung Opacity", + "Support Devices" + ], + "8452bd2c-ba775d23-e46872fa-f0e9c5bd-63897743": [ + "Lung Opacity", + "Support Devices" + ], + "ba43f637-2b72b2f5-ad1e7041-96ea8d84-32e18e7e": [ + "Support Devices" + ], + "f7593494-5c5778f8-1083d675-46c20f13-3abd5cb2": [ + "Support Devices" + ], + "3128f453-ad0dbc35-9cce331f-ca0db591-52e9cbab": [], + "67046a75-310cfff1-2dd57e2f-6208c141-d18736f5": [ + "Lung Opacity", + "Pneumonia", + "Pleural Effusion" + ], + "92fe0d65-6cd5e4b6-22dbcaec-949cb8bd-1c28d956": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "4a706f94-eae311b0-de845977-dcc52bde-4615615e": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "75869cde-a41c0128-bd418fb5-b3e4f46b-8f003c99": [], + "5668d9ef-e5b61aae-8a38e823-b668e8ba-837392e7": [ + "Lung Opacity", + "Lung Lesion" + ], + "c9cd6c49-2bebaea2-82c0c5dc-c3d2e9a7-560599b0": [ + "Lung Opacity", + "Lung Lesion" + ], + "318975e1-0f1046f7-331e3d92-185e4805-d5ac3b65": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "c0023bba-56efba28-c654ac42-24227b01-0157a8c2": [ + "Lung Opacity", + "Pleural Effusion" + ], + "e19a6258-3792982e-db47dccd-c9961bb6-e0aeba69": [ + "Lung Opacity", + "Lung Lesion" + ], + "16cf598d-2b1a30e2-627a4c64-25720237-cab9c186": [ + "Lung Opacity", + "Pleural Other" + ], + "000ffbff-3d93bcef-da8b17cd-fbcede53-51728df9": [], + "f576c221-e516f6b2-ee125faa-a1af8c31-ed2991b8": [ + "Lung Opacity", + "Lung Lesion" + ], + "68fe8811-11486a87-1a63faec-cbde0858-b889b677": [ + "Lung Opacity", + "Lung Lesion" + ], + "93894f42-2000f601-7b1944a8-7c4c0711-3d3a2a9b": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "5df8c586-2f6adf15-722e6f13-ffa8a117-acd92b9a": [ + "Lung Opacity", + "Lung Lesion" + ], + "9587ec7a-e6b7082f-0b22b670-b924b608-674375e2": [ + "Lung Opacity", + "Pneumonia", + "Pleural Other" + ], + "fa29a6c8-729bdd50-764451b7-b92da9bc-daf265ee": [], + "57c03361-059aa6a2-9f7028da-423292f4-3b134303": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "add88ac4-2338dc16-a58a1ae9-57b1ecae-0a8f018a": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "ed54d9af-c03fa3e8-2c18f99d-c0c65bc5-98bf2656": [ + "Lung Opacity", + "Lung Lesion" + ], + "56d68575-e620ef2b-9e25dbcd-faa3f9d8-2f61e0ca": [ + "No Finding" + ], + "bb067a71-304abf94-bb1611d4-e8ac9115-189005f3": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation" + ], + "c5cb6fb9-7d707bd6-72335a6c-80038c03-35e3eb27": [ + "Lung Opacity", + "Lung Lesion" + ], + "7acf30bd-0ed39a38-bb6159dd-2ed09689-dd05ba98": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation" + ], + "95527da6-78fdab9e-2d3b3782-9aa97e06-a3e69c13": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "225164ad-9f7e5e4f-b9c9e387-2b07cdd5-10488e8b": [], + "c89c7ca8-466643b7-e8480932-1b791a6f-4ae17f31": [ + "Lung Lesion", + "Consolidation" + ], + "ec78e0b4-c858f616-11d4e328-ff8d6f90-4a6acef0": [], + "f52047f3-b0ba5171-755f7044-afcf59b8-62848096": [ + "Lung Opacity", + "Consolidation" + ], + "c11514bb-319a3161-c0c85326-68094c62-0220f4f4": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "ca5edfd1-791faa24-0e6c7747-b17088d0-d90a8fc2": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "5740ef70-f0368542-f6ff1baf-09a39fdc-33e82710": [ + "Lung Opacity" + ], + "fa80d52e-25c85b24-0302d3d0-f2052c45-6faebca9": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "1e31fec1-1f4cbc01-4583b395-5127c6f7-43b9a7e7": [ + "Lung Opacity" + ], + "e26fdf14-791d85bf-3beaee42-3ec8bcee-4a05efee": [ + "Lung Opacity", + "Lung Lesion" + ], + "f8b70248-0a9f8ab0-ea3de70b-7d93e712-416c0c78": [ + "Lung Opacity", + "Lung Lesion" + ], + "1a734389-4bcb9234-220a253e-c22386fd-4f018ada": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "4b842f9a-e380a620-f62f355a-f706be25-95150ec3": [ + "Lung Opacity" + ], + "4778cb0a-f3b1679a-db7c043c-cfdd71ef-5b2da652": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation" + ], + "ff86990a-2b9b1ae4-abec4188-55d0170a-72142dca": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "7491ba73-b81aa431-0b41a7cb-733d87f1-4523ba29": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "f67b2368-01c7950b-b586b58b-6d8c66a4-c8b17db2": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "f79eadd6-c024fbbc-dec2a8a7-0d75c594-a53f0aa1": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation" + ], + "9d8483b4-460ba2c2-3a8322ea-4d7df3ca-e1789d06": [ + "Lung Lesion" + ], + "ba684a87-3ecff165-b646c20d-ce6363d4-5a11761e": [], + "53c18304-54fac49c-cabe4615-c2a37b60-8555c705": [ + "Lung Opacity", + "Consolidation" + ], + "72a3f5c1-9ff27189-d2d045aa-ee3f3b3b-8d4f144f": [ + "Lung Opacity", + "Lung Lesion" + ], + "21f6f51a-c6b2fab8-8c228bb8-1a8f8c46-d568b413": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "962a470a-df0275b5-6b8e2125-e3cc9c90-bf7e0a66": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "b6958192-e9ba61f7-b0d3e5ab-5562c733-a0ad2714": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "282d803b-7e9e211b-ccf6ccf5-f3885dec-b8b9f76b": [ + "Lung Opacity", + "Lung Lesion" + ], + "a603cd8b-deb5791e-0af13e1c-291d022f-105c7d5c": [ + "Lung Opacity", + "Lung Lesion" + ], + "dda9463c-13653db6-03e65f74-74ef0b98-4cceb8c9": [ + "Lung Lesion" + ], + "21895b3c-f3dac4a2-da11d756-cf67ed5c-9c175d9a": [ + "Pleural Effusion" + ], + "47aa8fda-9852d351-ef7343e7-38ee20f2-b982b15d": [], + "e95b714a-2e4aaa4a-b64b4ff7-be56c461-c4a2daff": [ + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "5daab9a4-fbc8cdec-c84cccfe-ec0da40a-fce44af8": [ + "Lung Opacity" + ], + "874cdceb-f11d06e9-1aaf9f3e-6760e629-4060531f": [ + "Atelectasis", + "Fracture" + ], + "bdaf4a42-459ff19b-d725de79-5f824931-917dc689": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "d6ee29da-bcb41124-a58ef710-c184f244-9d677f90": [ + "Lung Opacity", + "Pleural Effusion" + ], + "32ec8188-8c334483-81cb6b13-428e8019-c0db3517": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "0eb1e826-78e313fd-5cfbb793-495ebe3d-8a33deb6": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion" + ], + "5ce0e74d-37b9ece4-1c499e7c-8532fcf4-41a56a44": [ + "Lung Opacity", + "Pleural Other" + ], + "fac3496b-e7409291-fee33678-4f558175-6d35df13": [ + "Lung Opacity", + "Pleural Effusion", + "Fracture" + ], + "ca220440-2b8510e6-fd0298b7-ab4fc422-434e558f": [ + "Pleural Effusion", + "Fracture" + ], + "e0f5b52f-7723f470-e1b422a4-73ef70cb-2a76d9c3": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "71472bea-4861bb4b-57725cca-447baed5-d7d18080": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f64708b2-5173902f-9397bc55-1a8502c8-8be61ec4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "28a61df7-4fa64f79-11a7bc9c-789dd22b-171b52b3": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "32ddd325-e5d324e2-d240150b-5c00c3f0-fadd7c83": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f5694e30-74276190-ca787eed-b4262479-f73aec86": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d25f054a-e8199cdc-c669cb2e-ebcfb082-54c205b7": [ + "Cardiomegaly", + "Edema" + ], + "234437dc-32485521-78bd0c1a-5997bd43-47401378": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "66cab843-95809cae-6a67db82-36faecab-8a75c30e": [ + "Cardiomegaly", + "Edema", + "Atelectasis" + ], + "34058be0-81c50b36-9b2c0874-23eca60a-7789a943": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "0baf5e16-bb057c79-97a74dac-e4631d48-f99f01d7": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "520be031-be2101c2-d3c096ac-08925edb-0177dee8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "62fefce3-f6ecb665-461a4358-37a5af91-dec27897": [], + "7e26f6a7-ec126822-1bcdc587-a3f5d439-b4715eae": [], + "013934b8-b155fa64-9bb2d234-6a50ffc9-ea84320b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4da3c8dd-c23f6809-39162dc3-4d322cc6-83d28c99": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "957e4fa0-2b741119-9fb1f79c-62130589-86d6cbed": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a3539c79-41479e80-4150d89e-96e86692-6876133e": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c2ace888-d3f68f82-2d5b5dd6-07dc85c9-327c4bce": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion", + "Support Devices" + ], + "0ae07ada-41d03c2a-ec74ae48-d0c17cec-343ae6fa": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "848b0d7f-e95a86d4-0c40c933-7b2dc937-ac3d74c6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "24754e52-7336ea34-603896e1-a86b2dd6-17909981": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "64988a4a-7c2cfce5-4e93b5ca-d55602d6-94c83006": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "777626de-a55fbd7d-e30f8359-db74c619-80afa62d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "8d3d599d-c63f3e85-fcd2ddbe-2e931945-482b1161": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "70ee568a-e2a70b5f-9f73d45e-c3015d3a-2a6bf3c0": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Support Devices" + ], + "816f21ae-13fa33ff-7a4ea5d9-e246fa18-f09a32ff": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "9ca1e240-842fe6d2-5b26c6f5-a9523752-6603498e": [ + "Atelectasis", + "Support Devices" + ], + "df81aa63-051ce829-f15a7ba0-391d8fb4-f81549e5": [ + "Atelectasis", + "Support Devices" + ], + "b418d709-571d80f6-35f680e3-16a938ff-bde93b89": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "7b326442-f1c89773-b17481e4-1c7410b9-9ba4a725": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f7ba6691-53545537-20c8b2dc-79dbd392-36f05d15": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "23eb46d8-6ba45d7f-fa02d462-a31da493-b8b7e5af": [ + "Cardiomegaly", + "Lung Opacity" + ], + "e35b1970-3dfc9412-ec657374-09990870-561ca892": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "806524e4-d5ed7e9b-1ac2dada-ba9c4a48-68216237": [ + "Lung Opacity" + ], + "f9f7d4af-2d90cb81-2541b729-6aab0e3f-06acb455": [ + "Cardiomegaly" + ], + "1d1ad085-bc04d368-4062c6ff-8388f25c-c9acb192": [ + "Lung Opacity" + ], + "9b4fdd07-1f45d8dc-4890ea49-e3f06306-639cb645": [ + "Cardiomegaly" + ], + "d7395617-98bb6ef8-6f0187e5-2c3df909-6f3a57c4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "146e8390-fd657795-492c6a0b-7aaa1bef-06c08c00": [ + "Lung Opacity" + ], + "2876892c-9a38069a-e2cf1491-82ef0d5f-a4935ae3": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "43b6f8f9-f0d77b57-b2603100-48f5611a-a7405f03": [ + "Lung Opacity", + "Lung Lesion" + ], + "4859ca51-f9aec9f3-e0959b5c-a6342b33-28811875": [ + "Lung Opacity" + ], + "2528f6e5-586bb3a0-e00e7283-5c594954-fe27b052": [ + "Fracture" + ], + "92c1d255-50a94318-0d4def6d-64a46468-3233bb79": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "d4800b11-08ea5ece-04ba7667-a463e711-378c3893": [ + "Lung Opacity" + ], + "60ac55ad-b8bf8c04-356991fb-91f18417-83b359fa": [ + "Lung Opacity" + ], + "727f555b-ca31baa2-5a5d16fd-ca9b8960-5a9ce4e0": [ + "Lung Opacity" + ], + "caee7879-57603f46-bf627642-eb48edf5-e9315a55": [ + "Lung Opacity", + "Lung Lesion" + ], + "50ca584b-f859bda7-fd523d01-28a67cc1-ac2b5c55": [ + "Lung Opacity", + "Lung Lesion" + ], + "b7e54cea-2a3fc10b-f21fa55c-64fe5b63-5306646b": [ + "Lung Opacity", + "Pleural Effusion" + ], + "2499c15e-4605f752-e137e424-4474ef69-839ebbaa": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia", + "Pleural Effusion" + ], + "9870d11d-3a0d9c78-f49f71c6-58644dd5-ce1b85fb": [ + "Lung Opacity" + ], + "60c86bd2-2d345659-cd9290a9-1af9a11d-2e8af682": [ + "Lung Opacity" + ], + "f1af4079-d3abad02-2bdd2d45-9f43ee98-bb00dc90": [ + "Lung Lesion", + "Pleural Other" + ], + "1de015eb-891f1b02-f90be378-d6af1e86-df3270c2": [], + "4349ed2f-1f67b94b-ea3230e8-7aa7e2a9-e04dd888": [ + "Lung Opacity", + "Pneumonia" + ], + "c8913af9-734e331d-173b2e64-3bd029ab-fb2771ae": [ + "Lung Opacity", + "Pleural Other", + "Fracture" + ], + "523db987-d0978a19-c8725d72-5e091b8d-9564d8d9": [ + "Lung Opacity", + "Pneumonia" + ], + "f3686ece-bb54acba-7f3b1ce4-b9166b5f-cd9b52c2": [ + "Lung Opacity" + ], + "ab104077-b39a8fcb-8c1d8fd5-5a8badb0-be5353a1": [], + "2f142040-3d2b5cf2-a37622c9-4909cb67-92fad10f": [ + "Lung Opacity", + "Lung Lesion" + ], + "cd80755e-af71f75a-2e48e700-630387b9-5c322a17": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "cdd198d4-7b34ff26-cdf455d8-f2c979c2-93535229": [ + "Atelectasis", + "Pleural Effusion" + ], + "30181b01-af91b165-1a949b26-aac5421b-61350722": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "cc1b3c0f-8e71ad32-d08ab6a1-41e21695-76317bb0": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4f7d591a-e6d9f7a8-05c5e886-421a776a-66a7a9eb": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ae38c715-8eeb617e-ad8ab0a9-9f23fdef-9e43fccf": [ + "Atelectasis", + "Support Devices" + ], + "d31b7429-f370f8c7-ceb83fb9-f7188520-153ffb88": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "799b532b-5d5f4a41-fe352b84-83e78fa1-73e7b283": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "79c87d15-f10d7ef5-8935e2df-e2ed9032-32668f44": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "87c43c95-278ced86-fb0beb94-95ff11a9-8e8a8c3f": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ae0ca9f1-a6aa65c0-b8754692-be29d5b4-8ce0e6ff": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d6fbe6a9-57f6ae9d-07f24e69-1c032794-76d80d8f": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "1aaf0cfe-67aa23d3-b5403e61-1b88698f-a6bf329b": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Pleural Effusion" + ], + "a4849658-ce9b054b-b59e436d-df3b5ab8-80025982": [ + "Pleural Effusion" + ], + "9f6c9e7b-4ccd8468-517c7976-e5deee18-02e95e8a": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fc346a9c-a6343b2b-98bdb36b-5a813740-aa659cba": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "1710507d-4caf495d-3a6908d5-77eba722-c11ac743": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "b2855116-21f3ef34-de39228a-025ede5f-c01ed432": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "3ed3a641-a4156d57-ea055912-baebd6d1-30ae3af9": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "016991da-a5224d79-0a00be4e-485841d2-f9e917e8": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "52117609-b59d4ebd-52c7b52f-db36024d-ceb8cb10": [ + "Cardiomegaly", + "Edema" + ], + "551bcedc-af6b269e-41826aa7-ff9d0f78-4825ae4f": [ + "Cardiomegaly" + ], + "9e6e5d09-41e8a70c-7cd114e9-65dfb470-66d1c2b3": [ + "Lung Opacity" + ], + "138e15e1-82368001-70725244-1ac06c0d-a272de11": [ + "Lung Opacity", + "Support Devices" + ], + "3470d736-53ab4170-ab83b760-57a5b839-c7302405": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "229975a2-d2e6a791-a66a597a-9b370606-8323c2cd": [ + "Lung Opacity" + ], + "ea67d96b-5e9c8ef1-ce01d8ec-5c0836f9-40596c5e": [ + "Lung Opacity" + ], + "60b7b7e2-29b9d91d-f3fd7cd8-8eca0ccf-2ac86d24": [ + "Lung Opacity" + ], + "d95a8c9f-246f76d3-79c2407e-36d90a8c-83724850": [ + "Lung Opacity" + ], + "157c4099-34b42e61-710b038b-f6b80531-75d80abd": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "40994464-b17516cf-be885c02-984e9fa1-79da2ac8": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "45aff2db-f97c8da4-6c6f992e-d40a0952-c0675aea": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "acea85a3-8db7b0ba-78f1bef1-81f7d8de-342f03f5": [ + "Cardiomegaly", + "Edema", + "Pneumothorax", + "Support Devices" + ], + "e441d29c-c156066e-10c1c80f-419f440f-7a4bf94d": [ + "Cardiomegaly", + "Fracture" + ], + "eae9552c-edf076af-61e6ad23-f29e7eb7-2dc91ede": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "4f69d69a-0a777d03-41d5250c-ecbbd9a2-72febcb8": [ + "Cardiomegaly", + "Support Devices" + ], + "59f06e1a-879fbbf1-4152f12d-76118d0d-5477e420": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "d488ce83-528fa722-abe67b2b-ef58f254-0d7db9b2": [ + "Cardiomegaly", + "Support Devices" + ], + "6f09dfe3-4459d697-aed9e9be-f9f1b26e-d80bcd0e": [ + "Support Devices" + ], + "9abfcf21-da0840e6-626ec84f-027ee952-3bbbeffa": [ + "Cardiomegaly", + "Support Devices" + ], + "ac50a7e7-7e116074-b42ad5c9-c2a852c3-3c61019d": [ + "Cardiomegaly", + "Support Devices" + ], + "37355a7b-cd57395e-8accb623-52bbdd41-53976f76": [ + "Cardiomegaly", + "Edema" + ], + "7a1a7ec8-c865adb3-011681d5-d61e27b1-6d31ab75": [ + "Cardiomegaly", + "Support Devices" + ], + "f24dcfb8-8d336748-8d0d5686-a52f7cc9-2aefd3a6": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "6f5a78a6-606c4fec-8ff6aaa9-b8ebe20c-88539ae6": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "9365d3c7-5515995a-9a60e2d0-7c14ad59-92f8c798": [ + "Cardiomegaly", + "Support Devices" + ], + "dc73974f-cdb6bfcc-9fb5e92d-570aa4e7-1766c9ae": [ + "Support Devices" + ], + "049f350d-00784726-84389895-f7bb753f-7695f2b6": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "4c51a119-6f346625-6da3ca60-c048486b-db7e21e6": [ + "Cardiomegaly", + "Support Devices" + ], + "8b21e141-af653815-b3918024-c96d4b9e-6805e677": [ + "Cardiomegaly", + "Lung Opacity", + "Pneumonia", + "Support Devices" + ], + "908720ef-acf4956f-fe8d7aea-cacaf681-fe871544": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Support Devices" + ], + "d8e53bde-7150419c-176ca653-637955cb-4fed0efd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "3120d4cb-7c176726-716f3cd1-a656c370-8c4e0595": [ + "Cardiomegaly", + "Pleural Other", + "Support Devices" + ], + "9dbf45cb-e6b01b87-76e4d3db-7a480daf-192bce3b": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "bba7f682-33b9288a-712a4870-190d5eb1-2045568c": [ + "Cardiomegaly", + "Support Devices" + ], + "040c9a19-266c4559-fc377286-0a1680b5-724894f7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "20059946-988bfea1-f3ed6e1e-4ac2fbcf-517474b0": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "6eaa4765-962aa2b7-3cc2112a-79abf7d4-36999ea4": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "bed6bd84-5e1a93ce-10185925-bae3951f-a64cac01": [ + "Cardiomegaly", + "Support Devices" + ], + "70e31905-dd605e80-305f056b-4f88ec80-cbb4b3fb": [ + "Lung Opacity" + ], + "a03f6842-f6f68790-908cbde0-cdc1fde3-4f4ff90b": [ + "Cardiomegaly", + "Lung Opacity" + ], + "be0380d4-65fb14db-ac13b4ef-3c7332b8-54c025c7": [], + "fd480467-a520cdee-c10d86b1-219b21f7-64bb593d": [ + "Lung Opacity", + "Atelectasis" + ], + "7d987f2a-f684bbcb-c1e27bf0-0cb90406-cf56be90": [ + "Lung Opacity", + "Consolidation" + ], + "2dcfc978-4f2b7c37-42839158-5805b52a-43671df7": [ + "Atelectasis", + "Support Devices" + ], + "3b9b84d5-b76eb1db-a43caa85-b33c92a4-4ed50db2": [], + "ad35ad1a-5885c89f-5e87060d-67ba116d-22a409ca": [], + "3b067bdb-1e77ce5c-db8d4831-dc9c23e2-e0e1724c": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "aef6ded2-a74cef0f-acdbb6d6-a96e3909-9fc8c2e9": [ + "Atelectasis", + "Support Devices" + ], + "68fca727-3938158e-eb97e5dc-141e63e2-53d66c78": [ + "Atelectasis", + "Support Devices" + ], + "c9968397-d379cb18-8d6f80d9-6ede0af5-f8c4d52e": [ + "Atelectasis" + ], + "d40ff923-1ae1c675-0bf6d047-42ce5585-8d8da7bb": [ + "Atelectasis", + "Support Devices" + ], + "bf7c2bb6-a8ce931b-a0037382-88c9ab10-ef166969": [ + "Atelectasis", + "Support Devices" + ], + "8062997c-91b95843-31ddb21e-b92bf46a-73af4721": [ + "Atelectasis", + "Support Devices" + ], + "11bf7fcd-96d58d34-49415fcc-c20c2b7d-1f340544": [ + "Atelectasis", + "Support Devices" + ], + "35a29873-f440b817-77e9b07e-ebd31997-8c62d96e": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "46bdab14-1fa0233c-c0b0841d-4c0869de-6564ff0d": [ + "Atelectasis", + "Support Devices" + ], + "5777b9e5-d14e2655-cb9eecfa-52bda043-992f6f80": [], + "6eb1afd3-d7b2eea4-6367e332-aa78e2dd-387ee425": [ + "Fracture", + "Support Devices" + ], + "5a57f9ad-cca470ce-4338e8a1-bd61ba63-c40ce753": [ + "Atelectasis", + "Support Devices" + ], + "db1c4e24-acd97bc7-d5e97d65-04ffb3e5-9c036419": [ + "Atelectasis", + "Support Devices" + ], + "154a0276-f9cc72dc-9907f2e1-f1f11272-93cc90ff": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "9e603808-3ea8ecd9-e7c87494-34d9258b-ea2bdd21": [ + "Atelectasis", + "Support Devices" + ], + "5a43bc2b-3fc26154-5114dc49-e3d4f15e-459347eb": [ + "Lung Opacity" + ], + "a8ad38e3-9a288818-536ed867-e22718fb-0d0833f5": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "2d291461-7354f6b1-b797f9c5-5c58ef2f-a516fa93": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "86f89f10-d6932134-162d3d5b-689149a3-81dd2b70": [ + "Atelectasis", + "Support Devices" + ], + "19cd7ef0-e01da8c2-54eba4e0-a3a25327-1ab839b7": [ + "Support Devices" + ], + "722a3b68-5254c3ea-469c8294-7e6fb73d-46f35121": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "1a0662d4-8bee75af-c5c452a9-4b43c737-b74d27c1": [ + "Atelectasis", + "Support Devices" + ], + "a17a8e28-46038399-4f9764d7-2338ca4c-6234bf11": [ + "Support Devices" + ], + "30441716-407a53b5-7bec00c6-abac7a61-d6054dfd": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "dde647ea-ea029cfd-683e0c4d-fbd997f9-b2e32924": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2e0c4b42-d1ef618d-2b25304c-1b6ef8a5-29e7671d": [], + "4477b363-d135c994-0b74a62f-f481eccb-898a7db6": [ + "Lung Opacity", + "Atelectasis" + ], + "09b5b0a8-2cb137c2-240ac597-66295226-2b2af51c": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "7634db9d-273d50e3-b619164d-90d11c3f-2a46ab37": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "cc3d0bf3-f2bb85cd-cd67adeb-9458eb46-ac522113": [ + "Lung Opacity", + "Atelectasis" + ], + "4ffe5eff-a5a604c2-4da5dcda-0801d405-88939c8f": [ + "Atelectasis", + "Support Devices" + ], + "01162a03-2f26a872-9c7a120b-f5ce80a2-46b2577b": [ + "Atelectasis", + "Support Devices" + ], + "ed184d83-ae8d1e4b-471e594f-15e2ca32-860a8dbb": [ + "Atelectasis" + ], + "6edd5960-4028d9f1-6f2353cb-61d0c6bf-5048c68e": [ + "Atelectasis", + "Support Devices" + ], + "2f1eba54-06686151-156f45ff-76e953f6-03665181": [ + "Atelectasis", + "Support Devices" + ], + "96f6b655-cb517472-567ebf62-3c6395e0-01936fb3": [ + "Lung Opacity", + "Atelectasis" + ], + "85487fb8-4d1bb78d-357fad99-bd6075d5-8b2da39c": [ + "Atelectasis", + "Support Devices" + ], + "edd0f3ed-1c73850b-834eb0a7-0bf47886-bce26021": [ + "Lung Opacity", + "Atelectasis" + ], + "4c940923-a59ab393-7984e607-b473ed13-af98d60c": [ + "Atelectasis", + "Support Devices" + ], + "c9355375-ab810bbd-434a7359-567930d2-984ba8aa": [ + "Lung Opacity" + ], + "835047f2-adf49b86-e80c6954-330c111c-da7aeea9": [ + "Lung Opacity", + "Lung Lesion" + ], + "97d2122b-eb626f1f-0d3ef34d-e81e2a4c-d4b1279f": [ + "Lung Opacity" + ], + "c1735f23-afbc50c0-23b33129-f274cfa7-737f29c2": [ + "Lung Opacity" + ], + "7bcd081b-869f44f4-57a93477-646a8796-ee97546c": [ + "Lung Opacity" + ], + "e8f0762b-f26c36ff-f3ca5ab5-d71c03f7-c26f6b9e": [], + "da99191c-5176d7bc-b809d55a-4429a7cd-ae8b21e9": [ + "Lung Opacity", + "Atelectasis" + ], + "d09562d7-3ddb8397-a8101476-43ad0118-5fae5eb9": [ + "Lung Opacity", + "Pleural Effusion" + ], + "dd86cc8c-ae1e2c39-3bc3e62b-b15de0ae-652648de": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "3b31865b-b41244e4-c46dbdca-c33ad6e4-3cca5768": [ + "Lung Opacity", + "Lung Lesion" + ], + "c9f4d430-e4b86819-292b0c15-3b043b8f-eda461f1": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "ea2bfc51-e27284b8-51af06f3-06ed8266-9f18eb54": [ + "Lung Opacity" + ], + "859b40aa-1f46d6a7-7f299ecf-38260eb3-897580c1": [ + "Lung Opacity" + ], + "9f87b395-77bd9405-1004f2e1-701d44c2-7b6332ff": [ + "Lung Opacity", + "Pleural Other" + ], + "0a8acf4e-79fa1809-f8cb320e-ec64a315-52784159": [ + "Lung Opacity", + "Atelectasis" + ], + "ecfe9bc7-52442f98-d8c652c2-2bb1c376-760a9f86": [ + "Lung Opacity", + "Pleural Other" + ], + "e81bcf8f-2499df37-89d72ab3-6180b4ca-88ade891": [ + "Cardiomegaly", + "Atelectasis" + ], + "408936b5-77f25bee-8f73cc21-251fc7bc-013094dc": [ + "Lung Opacity", + "Pneumonia" + ], + "f292b1a8-2e6fdb2c-a2e020b7-ae3b0cc9-9e3866d1": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "b0a2d047-4a01cf2e-c1d43e01-61ef7442-722d8f4e": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "5d4e5d0a-add681d2-faf8a518-e0062eff-6554d2d2": [ + "Cardiomegaly" + ], + "0ba61f42-36b75725-d59c3425-259c54a6-7dd192bf": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "501f88ca-6cf4e937-ea4584a1-eea40cc3-3333047d": [ + "Cardiomegaly", + "Edema" + ], + "d72a1a8e-82ff68d3-b7f92ce9-a36fbe0c-1fd32274": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "fc2119d4-3818479e-d3d0ace5-6704f713-0a4fd7c0": [ + "Cardiomegaly" + ], + "294ebc2b-bda5301f-54062c24-9d36e9fe-0770d722": [ + "Cardiomegaly" + ], + "b8b6f229-6e131a36-ab9233fe-6db5132b-596d3e5e": [ + "Lung Opacity" + ], + "84d8e0b6-5b77cf98-4137deac-e588d6e8-ed535ab1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "def6f212-4f61456d-60919d0b-c6cddaaf-db3f108a": [ + "Cardiomegaly", + "Edema" + ], + "039986b2-a4be9c1e-48fe40eb-46b7fccd-c779bad9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "dd4903ae-cb2e72fa-55472aa9-b4e1aa63-9c138d54": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "ff4180bc-fa800289-1e6a39c6-4c38b356-ad513e6a": [ + "Cardiomegaly", + "Support Devices" + ], + "456d62e4-2e673ffe-83ccc42f-f942c7fb-d5dbc58b": [], + "4a6b6a7c-83ed2cdc-41c74d6e-ed8815a2-84ed02ff": [ + "Cardiomegaly", + "Support Devices" + ], + "0f1b4789-8c43bc5c-ec9ef921-5cd7c4a7-5acfae4d": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e4f10f9a-3e1c894f-d953e192-b85712f5-9e72c3d6": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "04e57623-af378474-c0649f6f-0260ef77-8d56543d": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8b967672-61fa905d-3744cf05-1c744a9a-aeab80f8": [], + "92276b27-43e788d2-2f48fdc5-7fd21401-1d24598b": [ + "No Finding" + ], + "dd7966c6-8c2f1767-e762450e-540c7c06-06a0a0ff": [ + "No Finding" + ], + "3ea573fe-97c9bfbd-53a4c4ff-bf9dc7f4-65fd2f0a": [ + "Enlarged Cardiomediastinum", + "Lung Lesion" + ], + "82274063-4261bd7b-14ea4926-0e8e9c47-1511d696": [ + "Lung Opacity", + "Lung Lesion" + ], + "1c51ebd2-e0c342a3-b529814b-bd3c289d-45148c5f": [ + "Lung Opacity", + "Lung Lesion" + ], + "e03dd9c2-d0a3ddb0-0e9d72c3-1b4c5f92-9593c85f": [ + "Fracture" + ], + "f91a608a-24c935e7-8330cdeb-6cf80c04-1c7f8652": [ + "Lung Opacity" + ], + "4aeb5cd4-c071f14c-e4dcd046-420ce1ca-f6fedd70": [ + "Atelectasis", + "Support Devices" + ], + "c022d06a-77b2c5f7-55dfded9-8877f098-e7038b30": [ + "Lung Lesion", + "Pleural Effusion" + ], + "4c1ef8d6-96ad17ad-becaa578-175f9fc2-24c4304e": [ + "No Finding", + "Support Devices" + ], + "aac431c4-71ce2760-10747748-4fd37654-0f440dd6": [ + "Lung Lesion", + "Support Devices" + ], + "44d21fe9-7d185d5f-00927b0f-11bf3dce-45b85640": [], + "2f108c10-c8669b9a-f7f02e0f-272d2904-dd0b345e": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "5d7c1542-0e986689-16b380fc-7640a95a-8ef99ac8": [ + "Atelectasis", + "Pleural Effusion" + ], + "66a29579-968d1700-4071c06f-fde97b0f-8ca7ce9b": [], + "aa48f5aa-bc33341a-d09fad73-1b881cf5-ec400de4": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "395a7197-bac16c22-5e75d329-e014f2a8-5d6432e9": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "7482f461-69260c1c-6d80e1ef-de9d3167-e122de4e": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "51b6ffe9-580e1dd3-9aa94073-a614dd4f-e41809b0": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d87efb8c-2b6c913c-52f20a43-a8cbf2ba-2b20410d": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "fef81fa7-75d8ca91-07651606-538e5b40-bb00dbff": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "8f7116c2-c8a7adfb-d814bed2-2a427fde-6478fe3a": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "ab1e1361-80eb18db-60ce9d49-0c7e8e71-477b3559": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "a238199b-93d2aa00-f4451329-26e4438c-e170ad89": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3d9581e4-1ca59a74-f2f5dfee-2599dad8-491fc6a0": [ + "Lung Opacity", + "Pleural Effusion" + ], + "382dbe73-cac300e6-08430cac-cec951a4-86e9e1e1": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5f961326-0ccce927-f726948a-19e43255-88306b58": [ + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "3e6f368b-a8391960-74c08b06-25d8dafc-0c6e61fe": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "f144b596-88afdc30-0f893661-7b6e1b7c-29b129bf": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "ac8eedd7-c5de2735-141b666d-540b2d92-243ec57d": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "68a9dec9-436c84d0-572f0df9-18929544-6b237d3b": [ + "Lung Opacity" + ], + "0d2a50a2-3711662a-d7838521-4dc58d09-3732a3ad": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "967d441a-a13a3abb-92836835-665f96e3-d5916b82": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "eaa862a2-6c57e3ea-bad4024a-564f7f14-d963c808": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b83e699f-f3106ae1-2e81b3c2-289d9017-3ddb459c": [ + "Atelectasis", + "Support Devices" + ], + "9c44b35d-68d09c0c-3cfbce66-0341de07-1c0346ee": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "ae7fb131-28d05c98-90cbbc4c-f05c219a-1d0fed84": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "54f4c142-ff4415c6-17466d42-d7531983-33acac69": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3ac5f4f1-ca7ed2c3-b0155d21-a29a155f-a52e60ca": [ + "No Finding" + ], + "c97d3493-abb1b43d-c412174e-d867f08b-b887698d": [ + "No Finding" + ], + "7a216775-e98f5afc-c42f634c-2a4eb3e2-58227ec8": [ + "No Finding" + ], + "9eb0c9bd-aeebbaee-0f2eac69-fbd0cc50-6e4ac603": [ + "No Finding" + ], + "c375e421-68a1e118-133cd727-71b1be6f-8d62fa58": [], + "27a4f085-5eaad330-a1153870-3ec2cd19-20a604cd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "ea6b4ed1-85a1a289-da2233a9-5ff02b4c-e6290e00": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "12fcd1f0-96b6eb00-a6a5ee27-7e8d19ee-63f16bc2": [ + "Lung Opacity", + "Lung Lesion" + ], + "d8d4b15b-0a338acd-c5176214-7794d508-468e6e07": [], + "94795c9f-9f6f801d-ed57d02c-5e9e02be-b35bf9a1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "9af84adc-9ec1d9e4-04c381af-f81edb77-c40f3fb4": [], + "1d47e5bb-33d97afb-bbb7fbb7-d59ed197-da8a12f7": [], + "58fedcf0-3247be4c-33428852-1d9d9fed-c613aa80": [ + "Lung Opacity" + ], + "e1c69c1e-96a9aa50-c3ed62f9-f424f43e-99fa854d": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "2aadeb6e-8b5af4b3-f3ddd4f9-8d552d40-d8a5e821": [], + "a6f60ee9-d5a2f15e-67cea2a3-caf01923-79f4b71f": [], + "ced4ad92-0b5bdd09-b67b83a8-8f155ad4-de399934": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "023dcd40-03e11030-4c6944a1-00790e19-a79c5844": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9a09516b-ceca3649-56487727-bbd3b10c-a0cbd7b8": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4db2b802-44d922f7-c712342d-b8af15be-7ac7a0ed": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e3ba16c1-e0005eef-0c0e37cd-1ad23c91-beac16e8": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6aff92fc-a55af9c9-b11a0394-d2d62191-122cdf01": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c1bef603-3b1cf540-5d36a766-606c560d-9a61f31c": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3698386f-a0655662-7d51247e-e53490e6-64f3d0c2": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "421dff97-6d2b4aab-02ed28a8-54dd67f9-da2f957b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "237483cb-a677cdd0-002483d2-76d60cbd-57b82bb8": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "226379d0-ea16df78-cc85e54b-2f773a4c-8afb5ba2": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "485bedf4-0bf798fc-68347feb-ab5ec81b-a7113818": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3bc5aaef-73a4b1b2-8a55d3ee-28d357d6-6c94acb0": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "68f0511d-a790a0bc-cb8ef94a-c9af3e71-ab0c9352": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6ccb4ace-96b61a6d-da4ac48b-808f3b8e-7d4547a8": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "44c09f7b-0aed1234-2a1a02ab-3e91e954-54be38b1": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "839c423e-0ad4e63c-cb7783d9-5a24793c-930b2b72": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7820a5b5-fd3de13c-aa0461e3-96296867-8e7e463e": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "9bb86127-fb575908-ca75aaee-e4e15b0b-b804e9d3": [ + "Lung Opacity", + "Pleural Effusion" + ], + "cd611c14-18a02010-13493fd2-e8f3a50a-fc345827": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "20826cb6-21536aea-251f6984-7d353fb1-029fb362": [], + "a7453c2f-c13c3176-9c623a8f-259c76c7-13466115": [ + "Lung Opacity", + "Atelectasis" + ], + "79eee504-b1b60ab8-5e8dd843-b6ed87aa-670747b1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "07ec545e-2a913153-c28cae67-2c38c3b4-c1d7e30a": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "5b21b33c-9e45c0df-2d6b0f08-b7846556-f1e63e19": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "f0e71e50-eb720bc4-ed412179-8b07b163-cd37195b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "8a301a4d-4df7ca0e-b32741cd-f7fe73d9-4605a414": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis" + ], + "035c1d74-0c421b37-8b41923e-ac21bff9-23176ff2": [ + "Lung Opacity" + ], + "8854ac17-02cbb55b-6797803e-0247f114-8e114394": [ + "Support Devices" + ], + "2773b5c2-bd9e0357-064af3b4-ddc4997e-61ff380f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1d2eae56-aca1446e-78e09b18-02818224-5f58634a": [ + "Atelectasis", + "Support Devices" + ], + "469b6bc3-cd9c3a49-238f4c5d-38cce895-b225e937": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "68d1a72f-0552bded-deae306a-343f5d03-ccf9853f": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "c02fe512-8d310525-2b66511f-df530900-ddfc1fa6": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "59a291bb-a5b73755-8efc4039-1a4e13f2-887e46d2": [ + "Fracture" + ], + "b6a2b75a-2f7feeff-1e47f4d0-1d86b2ff-c5d8d6c1": [ + "Lung Opacity" + ], + "20ae33e5-c3a0b30d-d737101f-b47e9ae1-d804765a": [ + "Lung Lesion" + ], + "efc879d0-ba7f1b53-560419c8-f53bda85-6bd62bb3": [ + "Lung Opacity", + "Lung Lesion" + ], + "f9e14eb7-74cf98e3-62e6bf8d-4c92c03f-b22373f6": [], + "567bcd19-6ab220b4-8f8eb57b-5f94b009-a4007fc7": [ + "Fracture" + ], + "a7b100cd-08c2be2d-a32c2dac-020c1d75-1bd5b887": [ + "Support Devices" + ], + "345c27ae-8dc96bd7-cd59fd7f-e18c90bc-71bf8122": [ + "Support Devices" + ], + "42e634b1-94de1686-ecd12cab-6619202e-8694c45c": [ + "Fracture", + "Support Devices" + ], + "64927291-fe42a66c-af054049-3d17501b-5de4163c": [ + "Fracture", + "Support Devices" + ], + "09b68550-5c8889be-2f1a65a6-c6dbba79-e5ba44b7": [], + "dc00203a-4168ce8c-d79d47d2-eef8780b-d3fe037a": [ + "No Finding" + ], + "417162c9-a460e98a-56bf6ab3-b6c591a2-86230b6d": [ + "No Finding" + ], + "6b93ec0b-b35a1d19-cbcefb65-297d04fe-ca31986d": [ + "No Finding" + ], + "c2af2ab3-6a11cbae-d9fa4d64-21ab221e-cf6f2146": [], + "e3f70313-96cbc5f8-075aba46-13c9468e-d24a2421": [], + "efd6465a-dbaa29e8-244c7d40-06f432d7-c7150e7d": [], + "f0b4c2e6-5afdf412-e46020a3-5193d52e-f55fb9a9": [ + "Lung Opacity" + ], + "6a266438-2456518c-17007a8a-8529ae71-a27ec826": [ + "Lung Opacity" + ], + "cd42734e-8fe721ac-423f5e55-6f472c98-fa3838a2": [], + "db2f7a2d-b2d3967f-b0b29d90-6208dc63-77e4e094": [], + "fe5dd4a7-d88ab43b-fe20fb3b-aa6f0fe1-c9efd533": [ + "No Finding" + ], + "21d9c2b2-5e94a363-aa3b9d61-a6858503-795b84ab": [ + "Cardiomegaly", + "Atelectasis" + ], + "2ea8f7b3-8e1fd4ff-87a29ebc-702190c4-45123977": [ + "Lung Opacity", + "Fracture" + ], + "6bd4c046-822ab57b-56c2ade0-5990ad2d-449af809": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d1b9813f-08d920a6-85c9bb6f-c516c1ee-a56f9d38": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "2c5c8a39-6ae3dd9e-2b4d5279-6bb07505-1b57f5ab": [ + "Lung Opacity", + "Atelectasis" + ], + "df66e950-78bfa09d-ccc14e43-193ef713-3c2bd5a4": [ + "Lung Opacity", + "Atelectasis" + ], + "129d1cfc-6a372c68-c84b5eaf-53903d40-670d6d9c": [ + "Support Devices" + ], + "3606dd6e-1d4e216a-0251de47-cb1445d6-fcb76ed3": [ + "Atelectasis", + "Support Devices" + ], + "405e6cc1-70b9d9b3-1c752677-010c4ee9-b217b783": [ + "Atelectasis", + "Fracture" + ], + "5475bdcc-37f6b853-142a043b-3e6572f9-5b71d475": [ + "Atelectasis", + "Support Devices" + ], + "91c320f3-73212556-e2380f4b-f3331485-e35cf39e": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "de3aab87-d8c3b45e-2312deb9-70e80ce0-17b557d2": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fee52ef3-e8e58680-e83b3d50-fa52077b-106381ff": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4fc6f280-2eae00ca-b8720682-3d0a8eee-b2dbb3c6": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f9a68aca-c5a51654-80b6c990-e35e78ae-63dcc3b2": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "14f914fe-fe271488-782a6d68-11bd9c45-8c2b816b": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "d8bc7ccc-a2bac7c8-1dd6d0a5-5ed27c66-4f556bac": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "df76c29b-3a305594-6510b7d9-7054ad7c-fb7278a0": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e32d8967-9d4234f1-98ac9b11-3c5e73f4-cc690e1a": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "67653b61-d4cdc144-670c5d2f-1d19f3a2-480d85a1": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "dc63738e-e751f65e-82a68318-2d812b04-d30cf7f3": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "f1a86b6c-1907b6f9-4893b125-c7f89eee-604fbd73": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "765fd687-06776030-fe337975-2739eab4-decbb9c2": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "a2f93b13-6b7f3079-3610454c-347f5e93-ad8f103b": [ + "Cardiomegaly", + "Lung Opacity" + ], + "c826aa5d-6ff5ee3a-11a18fb2-ab264bed-566e1edb": [ + "Cardiomegaly" + ], + "b4a1b5bb-c12e1164-ded8460a-ccc5b283-abc72a43": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "172a847d-d8c6570a-3cb0cff9-cb4ca0bd-3a8b93f1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "a194aa87-2cb7c882-7602c814-7712dbb4-9ac8dea7": [], + "f430ec0f-40b790de-a5178baf-9dd6c108-9fc32de6": [ + "Cardiomegaly" + ], + "467d9162-e7cce16e-70dfaa79-1867728f-1db6394e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "af39d55c-0622bc39-b9865798-29ff5a61-eb7cfb93": [ + "Lung Opacity" + ], + "807c53b9-9e9a06d2-201c5941-deae8153-ec887b70": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "db66ef84-840a9cf7-58eb1d86-97e44130-e32682cb": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "ebfa6753-3f0b7933-ca42ef98-0ce8ca94-b03f6676": [ + "Cardiomegaly", + "Lung Opacity" + ], + "67412cf5-519f1711-72f5a403-2e6ec7fa-84dfa6b6": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "6f619231-f8a0ab48-6858a7eb-b0ee9c1c-de3385c9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Pleural Other" + ], + "c12759af-b70b6882-d6cca08e-8811c264-7caf797c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "1e63fbae-cd836c8c-60c8d534-08ef62b9-a33e82f2": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "fba838cc-fa4eb8b6-b3e8de64-e89c00ab-1bb9216a": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other", + "Support Devices" + ], + "76d2e3a0-a3074ba0-1b66d561-1eb29b13-3bb093aa": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "9d53d4d6-3495e14a-d2f6c5b0-333b5174-8b65e1ab": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "22a06cfc-11fababd-02d9a890-42cbc80e-34757e33": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7568a044-7f2b130e-9af97f69-17cda54e-cb366755": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "e538135c-ebad1b7e-5f239803-3d6bcf94-7c5fddc4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "783fc94d-12b747b1-600f2e10-c1c51d2a-97240f95": [ + "Cardiomegaly" + ], + "ebd066f6-f32177f2-c211270d-aeb7bae8-f4b6d9a2": [], + "0b53daa0-d9ca6166-9622edee-57037ea3-8a1bf264": [ + "Support Devices" + ], + "e53b12a2-325afb40-3283ac75-9f92dfc7-5e579ec0": [ + "Lung Lesion", + "Support Devices" + ], + "ebf694d1-74d14ed6-c1695437-a0c9b0f3-cb905ce8": [ + "Support Devices" + ], + "415af9ca-d0b69fbe-b3b8dfa6-271f3f0f-5592cc53": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "43b4627a-0c31cd6a-92c2144b-ecbf51e1-1519741b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "72a15dc0-cfcca17f-201baf20-76f2e298-e4123143": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "234b22c4-55fb91a9-44f7a42f-b764d462-018d3bb9": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "03da26e7-8b50eef0-1b7ebc08-6a620d75-b320cbc4": [], + "22828c64-011878e3-cbd88035-2965e173-693deab2": [], + "070b58a0-da9b8080-6eeeaf5a-46226e7b-2f9453fa": [ + "Fracture", + "Support Devices" + ], + "c875e4c8-ab736220-04569ba0-857889ce-042ea536": [ + "Fracture", + "Support Devices" + ], + "61b4d5e0-66a2bcaf-6c4d6c19-6b735e59-b1390cb2": [ + "Fracture", + "Support Devices" + ], + "96e29c8f-cbe25758-3c1d7c4e-4f3ed96e-857a1bc7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "f2a7f664-bfff0efe-5bb44ad4-469f58a4-0e6b7892": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f0d18848-8b3b0e31-92ab7c89-0a569510-bac46a4e": [ + "Support Devices" + ], + "a7d5115b-c9749937-8502636c-ce1d2580-57e370dc": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e3ee1499-119d0bc0-6cddf725-9d2d60d8-d34f9fc7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "a6ad44a0-61a41d41-a06153a4-5873c31d-f35069fa": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b529320a-394d7b79-a3e8c3da-c28c6b94-7ec08b51": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c9bd6dd6-c8328950-4f61c412-81766efb-2d9c193f": [], + "dcd6fbb9-e2ec404a-8b19713d-5379757a-105c3803": [ + "Cardiomegaly" + ], + "a4bd2f3a-a3c90afb-3f7c121e-66e54970-cce28842": [ + "Cardiomegaly" + ], + "d20291fc-8d626aa2-b3b2ef02-6f8b81ac-12f2432d": [ + "Cardiomegaly" + ], + "31b151ec-75ddc4a9-e85ecaab-f72df771-c55ef3b5": [], + "8c58ba80-5157991a-30a3a6c0-db670ba0-d1aee122": [], + "827f0d63-8f046ac6-10747136-2c3bac93-b95d8a29": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b9ff10af-33a535a6-4ffd1888-a0611f65-784a39da": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2a9deecd-d9d8a426-f05473e7-fdb32742-09da1910": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "f9b1c946-2770d2d6-e7a89dc5-0e3d42e2-77117240": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d3905d7d-0e7ed6e5-b6ec0f08-c5b5dcd8-ad786679": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "ea54418c-e36750cc-060592a5-0239e442-40b57ba0": [ + "Atelectasis", + "Pleural Effusion" + ], + "91ba091c-cee12c63-ff22dde9-147ea7bb-418900c4": [ + "Lung Opacity", + "Atelectasis" + ], + "dc3b047f-54a16324-3e28091b-9d53d461-debc37f2": [ + "Cardiomegaly" + ], + "9911ed32-2bf726d7-dfcdceb1-dc248f4e-b62bb269": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "d616d0a0-41025591-43cd391a-ee10bd11-29c865b3": [ + "Lung Lesion", + "Atelectasis" + ], + "45e31ec5-029d54e9-1acec167-663a1397-bccb2493": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "98bf2cef-0c6a64e5-89934255-e10b6ef7-c38474b7": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "b738cf47-6ae04cdf-25d11841-ddcb8d78-fe7feceb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "90eaadd7-6de5ffd4-601d0a6b-6495e636-4f893187": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4a94c799-50173f0e-07f9f74f-febe16d4-407387d6": [ + "Lung Opacity", + "Atelectasis" + ], + "d1cb903c-16d23127-ba525151-91a0fa21-20a12246": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "996aed23-e2ca70b1-ece8d46f-47a6d9f9-dbb95bfe": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f81d607d-d297abbb-83eb3c46-290321ba-aaa66ba9": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "07a6c75c-9ee2bcc2-076307a1-e6000602-0ee483bb": [ + "Lung Opacity" + ], + "e6b4a152-bc73f001-84e7b150-4191779a-754f8459": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "f2b4864c-c60e842d-258889c6-61e08bca-a7990195": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "02e0109a-820d6579-26cf0f89-4e81bca1-65cc007f": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a4398b56-ec603dc8-a33c3c3b-d4969bf3-6ae3e7b1": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b1eb70c2-97d846e5-476dfd4b-52ab781f-bcbbb7a2": [ + "Lung Opacity" + ], + "be82eebb-cd25c088-b3c1ddfa-6ccf0b10-880a3a77": [], + "9ed98f0d-44106851-df647480-672d93ed-95426753": [ + "Lung Opacity", + "Lung Lesion" + ], + "b8ec370f-450e80d9-25461f27-72d3da41-d6e10bae": [], + "ba5d48f0-3105c3a1-1e049eec-c72ac120-415942b0": [ + "Lung Opacity" + ], + "e4e0e4ff-71138eac-7cef38bd-ce820887-d59037ff": [], + "8c86917f-0d8be3f4-f464a18e-3638f3a1-343d29c4": [ + "Lung Opacity", + "Pneumonia" + ], + "f13c668b-a7cbd8c4-3de552f9-4c0921fe-7c8b4a12": [], + "8be5e566-84d421c6-72d46c14-79091c67-73751f9f": [], + "279895b7-16a23c5e-1aea2909-baa62b3f-884b6f9e": [ + "Lung Opacity" + ], + "ab5d8429-a48d1b05-af73d020-ef1f6e53-30f8ae8d": [ + "Lung Opacity" + ], + "6eb24aca-5687f160-c7d0c498-3d8a1abf-05bf0b8c": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "eae9b998-2b29a12b-6d6fd4c2-8227ce7b-7f1c4262": [ + "Cardiomegaly" + ], + "417d5c5e-b521f965-35306684-68e7deb2-cda06f5c": [], + "3821a16d-3dd0338c-8485c8e1-c3cfcd50-05762b8b": [ + "Atelectasis", + "Support Devices" + ], + "861f9946-68cebd2f-e11dbfba-aaad1909-7ccc759e": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "31d674c7-da219c63-72219f57-202ccfaf-94a9a6f6": [ + "Lung Opacity" + ], + "5be574b2-96a7ebd4-a3298eeb-effc88d8-ba38d5d0": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a6a7fb04-b48fccde-ae205333-f958732f-5ef1f1ee": [ + "Pneumothorax", + "Support Devices" + ], + "924f04a8-ef706b1d-71612b59-604998b0-d7de4f6b": [], + "b3c74d2a-5af41aa3-b45b6c26-d2267e9d-7c4138ac": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "49161810-83365478-dc512674-770d2cd4-ed6f7f77": [], + "e625a910-d910e265-54f8f76c-13ce281a-e0b34c65": [ + "Atelectasis", + "Pleural Effusion" + ], + "9d674775-c0b3be98-7ed72cdd-47852026-4ca978b4": [ + "Atelectasis", + "Support Devices" + ], + "00791688-1fab1483-c2c6bc65-78567732-ff0cf7cc": [ + "Pleural Effusion" + ], + "3c257f36-06c83988-c6ac8935-d151a438-878cbd0f": [ + "Pleural Effusion" + ], + "f0ff15ef-0433feee-d1544b70-155ca8a6-daa51638": [ + "Pleural Effusion" + ], + "241b6402-15f482d1-da524f5e-92653c29-84172d3d": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "222087fc-b3297c5c-72502065-cf9f3e90-6839efc7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9e19b295-e71b9051-60c1ff01-05a0e976-4e648e1d": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d714d837-b94d4724-3105ec18-ec20dde4-57c58bf4": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "02e0a1f3-e42c0254-390b871b-928074cd-4c1a7890": [], + "7e530d0e-05f64408-24c921b8-1929b8f8-29ec99fd": [], + "7e1f323f-a2ad8df6-c4803950-58e8a9d6-7058b48e": [ + "Atelectasis", + "Pleural Effusion" + ], + "809c4a11-d1261c4e-235a6150-dd8e8160-162f9980": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "c69d3c51-1423eec1-ad25846b-9a9d2235-60b4ca2c": [ + "Atelectasis", + "Pleural Effusion" + ], + "92b3ce9d-9a7bb494-1dec6d0b-93cf4386-82995e53": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "c1badb19-12851ca1-44ca7736-fc1a9f08-bd287f01": [ + "Cardiomegaly" + ], + "9a3cb956-6be6d465-3555e1c4-10913d77-7e86b041": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "b92a4a75-b5345ec3-917fc5be-e7953fb5-d91be228": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "20ac90a4-87044528-f3284c7b-e22cd4ff-feeeb0df": [ + "Cardiomegaly", + "Support Devices" + ], + "dca8209b-bd3fa52c-e5ca606b-9a0cfd8f-006336b3": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "c54b631c-b7726bc9-2bb21f6f-25f9eee0-57a0d6a6": [ + "Cardiomegaly", + "Support Devices" + ], + "e4cb9fd1-a291ed0a-a3be1461-78de463c-57194e49": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "8f34e6a7-a9a93480-381afaf2-33925be7-c183ae6f": [ + "Enlarged Cardiomediastinum", + "Support Devices" + ], + "8f427f0a-04f15d74-7d27eb04-930290b5-286d1642": [ + "Lung Opacity", + "Atelectasis" + ], + "19c665a6-5b2ac8ce-afabbb92-17bfdb7d-3db41a78": [ + "Lung Lesion" + ], + "35f03094-59ac4913-db051de3-831383ad-860440fa": [ + "Atelectasis" + ], + "20d18a78-8f7cd753-628b5cf4-7d43c522-c3e8f53e": [ + "Lung Lesion" + ], + "d10aee8d-b58fd31c-ac3debb5-48dda89f-2765b3de": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "78557a90-bc5812ac-af24ac90-bce0a937-28b47ee6": [ + "Lung Opacity" + ], + "bda73b0f-722050ba-df3d1eb0-12cf8c13-cb8cd31c": [ + "Lung Opacity" + ], + "5c89e63b-e57804d8-7f1819df-413feb15-01628ce4": [ + "Lung Opacity" + ], + "ef905e68-392ffa59-22123661-7afd32ae-30f983d5": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "968192ec-09ed8f86-65cb3129-91dbad60-4710e7fb": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "f636619c-a5d5b893-e807be46-77d7e8f9-26f324c7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b76a59ce-cd4c3882-2bf6437f-89cd9378-adc0be20": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "49f44b9d-4268c0c6-464ec5c0-373d8bb5-b69eaa33": [ + "Atelectasis" + ], + "ed9e09e7-e22ee204-4a73ca03-dc121d89-5ca5a446": [ + "Atelectasis", + "Pneumothorax", + "Pleural Other" + ], + "240ac503-263c23a7-986ec4c8-17bf733c-143e5fd6": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "827940e2-acbc328c-49961b5d-96769c94-d55af838": [ + "Lung Opacity" + ], + "da3efe68-9a328a1b-4d20e7f8-0152154a-e945badd": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "02cab5e2-32c693a1-f28fc960-a42cc4a2-4d8d7c44": [ + "Lung Opacity", + "Lung Lesion" + ], + "3222a2cf-6873ed9e-fc3e4ac3-823db405-0dca9ce6": [ + "Lung Lesion", + "Pleural Effusion" + ], + "35b23c83-dd3843f8-b3df9c7a-694fec14-2972fec9": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "933e9d9c-77191c22-3fb042fe-3f825087-fa80fffa": [ + "Atelectasis" + ], + "f7004aaf-2d802820-6fb668c7-79ec741c-1147c01a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9f97161d-4f4e1c49-31cdfb38-db08c1d7-26e0b833": [ + "Lung Lesion", + "Consolidation" + ], + "dd9cfc23-b05701f2-26215d83-46297578-48e163ea": [ + "Lung Opacity", + "Atelectasis" + ], + "1f903004-c567af33-c9cd797b-5d2e4942-f23b2ed3": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "6f5d182a-b2c3bddf-246d41a2-17fe9e4f-8240e407": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d423cd88-d0739c64-5212e268-96f30c3b-7bd9f6ae": [ + "Lung Opacity", + "Pleural Effusion" + ], + "0beab5cd-dd1bb454-0df993cf-f3c0ae3d-8f0e0c27": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "4639cd47-e73a89d3-48315552-a87979a8-7dd4f191": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "09a7bc78-861b7d8a-bf31a633-67e32681-cec68e43": [ + "Cardiomegaly" + ], + "449aaf0d-39419c16-a79e10d0-a6d3b8b1-1076c60f": [ + "Cardiomegaly" + ], + "6b246587-087f7413-b47b8a33-a9e5c257-20aaf460": [ + "Atelectasis", + "Support Devices" + ], + "cd866aa1-0710b4d4-2c7e1783-c1afef62-1d1301b4": [ + "Cardiomegaly", + "Support Devices" + ], + "e3fc5bd6-0ebd345c-dd63d96c-6844627c-1b6cf82b": [ + "Cardiomegaly", + "Support Devices" + ], + "9df33cee-a5533c4d-56048d41-edb2923b-6b01ac1f": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "036272e9-9052e7c2-444e59fd-86a7f36d-9dfe191a": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "bf9f8403-f941bbb9-13c134ff-ac80d6b9-e8442bdf": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "372f588f-f2061650-9cc50694-12a70654-dd425821": [ + "Atelectasis", + "Support Devices" + ], + "29f643b7-e5408002-2f731ee3-cb5b8634-0d438145": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "252da14d-35e528cc-fd8defb9-1ba9e403-6b8cd31c": [ + "Cardiomegaly" + ], + "fd5b9e84-06d9a995-0dd4904b-a46b13dd-37b8e1f1": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "bd31fe67-ad4d5454-2cfd7c09-13c04383-d38297ac": [ + "Cardiomegaly" + ], + "d06735eb-af56afba-fcf0d03b-004b6c6c-93909724": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "32a7d189-41a4b4a2-2cbe2e58-67f6823b-94d7cb9b": [ + "Atelectasis", + "Pleural Effusion" + ], + "aca81df9-48e4740a-3c8dacee-279de214-789076c5": [ + "Pleural Effusion" + ], + "1e2bf7fd-0332021c-5954e527-9aef62e8-221c5e82": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "b5ba8da0-31b932cf-ce8505a8-183cf855-29f186d7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "a6a6000b-26fecffe-b90ded19-73b8a48f-6e3f7557": [ + "Atelectasis", + "Pleural Effusion" + ], + "efd0789f-b4442557-7615381a-90c81729-a1a5d27d": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "65691efb-7f4fd402-46d5effb-ad72d8a4-8f077398": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "d978970a-5331f2f1-940f4bea-9da9bbf3-4724f2cf": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "6d9766ff-d338bb04-cdbfb5a8-a6aefc8e-d28602a0": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pneumothorax" + ], + "f92519c3-962b5ff5-70443417-be79d943-b7960f01": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "d97d38b1-b60d1118-92f0b65d-f651460d-2f1abc76": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "ef172e96-8c4e23a8-160f096f-b5c584b5-f33c4c0b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0791e888-c49848f9-5efcc8f6-eea5e10b-aea2c689": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "14fc3b47-73918368-3688d525-2a9e6f66-a71213a7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "72de19ce-ad49323e-c750d7aa-7aefad64-932f50e0": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "8d0ec6a8-3287bbf6-c34b0a63-06de729c-6384fe8f": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "ac58123d-32acfa38-3c734ace-8ef59986-fcca19ef": [ + "Atelectasis", + "Pleural Effusion" + ], + "beb55654-98504d02-98628cdb-06081de2-be7990a2": [ + "Atelectasis", + "Pleural Effusion" + ], + "d39bd323-17dd4a2d-2adbe3f7-c2056b4e-08a6f0fb": [ + "Atelectasis", + "Pleural Effusion" + ], + "7befa7d6-9faf5ce7-987928ab-7b81ed09-d8eb8af7": [ + "Lung Opacity", + "Atelectasis", + "Fracture" + ], + "f27661c7-7cd1d2eb-6116d719-a906e894-7623f8b4": [ + "Lung Opacity", + "Atelectasis" + ], + "25392829-b64500bf-57a3c5ab-8bd982c2-cf08a2f6": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "7552939b-029a09e4-b7d8bfaa-3a4ae4a2-7b55c04c": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "ced7abec-82b5f4e3-6be372fb-d6226a24-9e91b7ba": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "115a50e2-b668b74b-81a73b76-9d53579f-12ea7431": [ + "Atelectasis", + "Pleural Effusion" + ], + "c2d43b6f-493ba743-28ddc8f7-1259dbaa-11647445": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "f46ebce4-270dbbd9-24602b65-695b054c-bcd8093c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "565704ba-15b1f276-8b2cb4d4-45b87f43-ac9aae54": [ + "Atelectasis", + "Support Devices" + ], + "5e44766b-fb081bc1-02952485-11552e37-ed98a6d3": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "7d02f691-c9e983ff-b7685488-825c036a-ebf5e8eb": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "e4c886d4-4409c92a-132f068d-876bd033-0e8fd448": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "def3b450-db2f7c7f-a082b686-800a5de0-6b74e997": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "6a3ffb5c-a406d8c7-ed1414d0-d1521e7f-48b48a9a": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "25c48dee-7755c1f3-3e5f2e03-54b0e004-4f3c5b00": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "2dbe3e39-beef7811-9031988b-a6c7348b-c98a9ab6": [ + "Lung Lesion", + "Consolidation" + ], + "17ff7369-20912497-3b539b61-9c4ace20-7dc7fa12": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "bceb45d9-799ac7a7-effd7ba0-71a61a33-92e4f08a": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "43a707e7-f762b3ea-4b033501-64409bec-21b98cef": [ + "Lung Opacity", + "Consolidation" + ], + "90b4c51e-988eaab5-73361a58-408449bf-f3dfd10f": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "25449c50-88b4c67a-5aab7423-4c477c4b-843d4f4c": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "005f2399-b87f52cf-d010c801-5426064b-05e4afd4": [ + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "21608a5e-d7bf1745-cecdd40b-19f5d201-40cab845": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "457215eb-af990b58-e7e16c7d-3a3ed2f9-654dadf1": [ + "Lung Opacity", + "Lung Lesion" + ], + "7a940e4a-bb7a8fee-1fa7e158-a2e6bcd7-85a3a017": [ + "Pneumothorax" + ], + "946ab43b-aafbeb4c-99c6b132-43bf9624-4c09a5f4": [ + "Atelectasis", + "Pleural Effusion" + ], + "2491ec8e-8e052c65-0d21c67c-66194ee7-56ad6f43": [ + "Atelectasis", + "Pleural Effusion" + ], + "f7349b90-c86e0ac7-2794b96b-e665dc2a-b3f47921": [ + "Pleural Effusion", + "Pleural Other", + "Fracture" + ], + "9fd949c5-ac707f23-cce74dc3-069335d6-c3d02d66": [ + "Fracture", + "Support Devices" + ], + "a160eb01-5f36fb58-b0a04a57-1773448e-934b5036": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "e1e69a8a-e168c0b4-3d6c41a5-108dc21b-9f8205cd": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "f34b54f3-3411a2b2-3a5da560-5493a7e6-699dc4af": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "f5108618-8f9b67ff-661df382-f791f1ad-7a660047": [ + "Atelectasis", + "Pneumothorax", + "Fracture", + "Support Devices" + ], + "d7203332-f3c8731e-27d35dc0-3cacfa03-24d07da7": [ + "Fracture" + ], + "d50452d1-8652542d-f45133ab-196c1ef0-7bb886e0": [ + "Lung Opacity", + "Pleural Effusion", + "Fracture" + ], + "8069ee50-f6767717-3fd52486-9653f799-3d94d99b": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "ca418dad-d4092480-3bf56e1f-9b920db8-8b8361de": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "ddace369-8c8f0353-59316221-492cdda4-f6bfe724": [ + "Atelectasis", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "3056f052-ff3c284f-0d46f60a-7d4ee6af-498142fb": [ + "Lung Opacity", + "Support Devices" + ], + "9e0fc31a-ce25b7bc-30362279-d96a0c0c-f6d54e86": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "14d22854-f75c9939-e36fa170-315d2ccb-2fc011e3": [ + "Atelectasis" + ], + "34a9c77c-75d0076f-b1afc9bf-6a0be3b9-0bf021d1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "294c1ae1-00cea6c8-99bd6a39-7bf5b955-e32bf184": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "a235e413-ace39b4e-97962e04-aed60fc7-c71c87ed": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "8967b4f7-73cc1f85-64b133a1-6fe7a386-01716d9f": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c9d61fcf-0566cce5-a12caae5-5c86b25f-20caac6a": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3c920897-9646c09a-68473fee-614861c4-7a9780f1": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "aff4536f-731bfbe8-e4a91fc5-06868b90-fbdb4737": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "20808598-002b91e1-2f834ea2-4fc76a5b-3007d083": [], + "247e5fc9-da9bb4e3-d9886dfa-057f6e18-f694d947": [ + "Lung Opacity" + ], + "399fb314-aac34ecd-b7b71a40-3b2ac5e3-9dcdaa7a": [ + "Atelectasis", + "Support Devices" + ], + "8425d9d4-d45b1cc4-3ab58d94-a0781e72-631521c7": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e67be816-b2f1bd32-58040b96-1b4dcb86-1b81d22c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6d864779-3ef443ae-59264dbd-d63f8a20-cf4aa1e5": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "e1463bfe-02353b8a-fe58ada7-b6000ba2-b57da915": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "6e155ca6-fbba81ca-123ca9ce-4d7817ed-a687f7be": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1b02e072-fa368bfc-a9a77874-e1a0094e-7cac5d6a": [ + "No Finding", + "Support Devices" + ], + "b0663db1-ba5dbce0-63cb3bda-a52f0def-7e5435d9": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "fb3ef8ae-36255356-cb0d2269-7e268b4a-a253c3bf": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9e4ff803-49fb5448-9a9d7215-dda7fcf0-edfff263": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "98799e4e-1081c047-ad705716-d7734aa8-600d7924": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ffa922f9-60c9f991-d3cb83aa-6f446e5e-f6be9611": [ + "Edema", + "Atelectasis", + "Support Devices" + ], + "37e045d0-5af0d058-12f0ea0b-100224f6-7464d84d": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ca3df6c0-8ce90248-b3cecb87-71db5654-312cdcf6": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "255f4674-83241c13-0d166114-1542f2fc-016ce9ee": [ + "Lung Opacity", + "Atelectasis" + ], + "ae696d3b-e707383b-1acd2e18-aa679965-61324b91": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "f507fec9-1437c64b-eef29734-ee553115-fedc694c": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "89af9a9c-8f769cde-04b1cfb3-5ad98100-9e25d3a6": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5ac86c9b-ce17b8a6-e0a355bd-2741a2c0-f6ee819b": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis" + ], + "c618f7c6-63bae7bd-d89233fa-c06b5734-3efeed2c": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "c9479a79-1b877264-b3222893-a2b4e2b9-8eba1e3f": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "f7444698-77590d7a-c6202efc-7ebaf856-eb1ee866": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "352d3cd6-62973415-eb038984-1a3b871f-3d226e60": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c383b852-eac5f445-af9853bb-aaadded6-9b28a98c": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "88fa75e4-2f2e9c03-71433ae3-1d8780f4-1e2eae3c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "35f28cfc-b84acf9e-a2b8b7da-f8d86acb-a043c4e6": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5c3a891f-05d81eb0-c4ade60a-d0b2c55e-b6856098": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a19573c3-98f76c03-5552fc10-4d2cb79e-bce663a8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a07fcdb2-cfd4c07c-10798b86-59623927-3210f2a2": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c23b378d-83c12bd1-41434eef-579d522e-0862b804": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "5c03570c-7b4fd4a2-4faf7ff0-ab71c1af-e7dec254": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b3e4ebe4-483b4cbe-499b39c6-b6299065-c14cba2d": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "26d9c6a6-23aadec2-4f13a9f7-d2bfdb99-ba5c03ff": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2ff42829-e2419fdc-267d447a-f0ece038-e2161c61": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "7b29d6f3-369318e4-db0f16ce-ba0efb3e-630b539c": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c8502a35-a270d52b-bd1e0d87-6a535418-3c742175": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e652c211-269bf80b-7db4a010-71e01204-f164bb7c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "8753dd62-80681aa9-11dcf353-7d254056-7c7675c7": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "4e2ae929-40713138-9d6a757e-deeed0b1-8062cd72": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d7e9f055-751c8d65-66226fcf-da86917c-6f5082a5": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "77f8b16c-dc92cae8-c7cbef7d-dd25244a-9176e253": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ceeb934a-c305e7cc-8fb84dc9-13a7b24c-ef709a44": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2f367971-fd362569-13656215-c6b98024-ea2cf207": [ + "Cardiomegaly" + ], + "ddd9741c-9e15a25a-d4b08e32-9ee083c4-b7671def": [ + "Cardiomegaly", + "Edema" + ], + "5f17fe93-aaa0c148-72ccdc7f-ad2268b1-56572a09": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "70556779-5d594bd7-7131cbb1-c990fa9a-9a625f61": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "a5e77ee2-5fec82c7-1f5ffe9c-ccd28c6b-f4a44978": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "db56399e-4f04b226-d9773c85-a6d565a6-04fe3904": [ + "Cardiomegaly", + "Edema" + ], + "f2fc645a-c9a8eb56-89315f4e-063eed9b-7eccbae9": [ + "Cardiomegaly" + ], + "980d5f73-a77d993b-7b3da70b-568e00db-8b84048d": [ + "Cardiomegaly", + "Support Devices" + ], + "eb52937f-7fa55b40-86540246-ca98fc35-a5a9b68a": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "41d91119-e4864968-f736d803-6295f4df-29c302ea": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "fa323a43-287e7b67-e0efec9e-9db65ff2-f6180c57": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0fecd070-24b67744-93fe3cdb-429860a4-386b63f5": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "44f44165-06ab81a8-b9d0f4c2-2c65e354-bd5cbfbf": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5757b72f-454a5bc3-efa625b3-859d88b2-a2bd2112": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "85904052-28d3a26a-9a756f5e-03c7a51b-3a9f5f19": [ + "Lung Opacity", + "Support Devices" + ], + "d506da5a-b2dad80c-f31e282e-15154de3-b4385bea": [ + "Atelectasis", + "Support Devices" + ], + "bbdcb05c-156dd562-ae7470ee-946facfc-07efcfcd": [ + "Support Devices" + ], + "c1cfccd3-76f59c2c-fc9b8706-352dfc8d-3d435171": [ + "Lung Opacity", + "Pleural Effusion" + ], + "c1f8ae0f-24d9f65f-2a25b45f-75887445-8974af9c": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "ccb75760-a2c8e314-d3d63bc2-17217a91-123a376d": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "50ce474f-a6c1b7fd-18d97f9e-98effe01-c29ad3be": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fd82faa7-31410b18-fae37f67-70086b23-f1ead160": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ab6185a7-10a51f83-2bb26ac5-db07531e-eb9d7b85": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "17c72825-5e526be7-2960df0b-bf160fda-b97951bf": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3a3c2ff3-83520f66-952df228-3aa9936e-a98b9087": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3b7947ed-a2cd5417-8e4e8b35-e081b743-6844ceca": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "b1286b1b-54d1211b-a25a3203-41c53701-f8ba9413": [ + "Atelectasis", + "Support Devices" + ], + "8ed93a6c-a257c9c3-b7011ef7-9fd0fc17-8b045b94": [ + "Support Devices" + ], + "e16a3994-29f6fa7c-062b1eb7-a8c902f3-83a49faa": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "8e011dfc-c2e23780-6e926bd4-fdef5895-a403ee8f": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "cbd0493a-45581768-2a4a0cdc-ed7b4ccf-20000354": [ + "Fracture", + "Support Devices" + ], + "72173005-a21c911f-2db2f17d-033364e2-aaee101d": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "197bf9c8-df093f83-61f247e8-7511a327-df92e5be": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "81bf3cb0-09d48269-7885405e-3da53d8d-13a3df47": [ + "Atelectasis", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "801a2fdc-d6547406-8a55cbab-04e06115-09d810c6": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "c1875b25-77500901-b90303e0-9b5c3aac-2b57b80c": [ + "Atelectasis", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "35526265-ad9db1b3-08d311e6-d1193a33-473315c3": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "c826ff67-cd70843b-c8ce2e1a-49f768a6-5738d4cc": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a9fa9dcf-791d8328-1f38b677-e6d7a2aa-56b111e5": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "2a04d342-b9a115ec-6a14561e-678580c9-d2feb9ec": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f0a48678-0a70e80e-79ea26dd-2a4ca8bb-03aaebc1": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "320c382c-ac349a5d-0bd44e5e-5e5cd679-682ea75e": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f04feadc-4a8ef216-30473af0-2ae9053c-63131816": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "1a3a93cb-fcff8a20-d84a6c00-5a46ada4-2a5d437a": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d7f19d0e-f85e6043-96b8d9b9-fd64fd5b-7594b0ea": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b56a09de-a517e1c9-1e37badb-c8820169-834c4cd1": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ee541657-53de178c-acd00b25-6ed17783-b7a8c3da": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "61d8d4bd-81df68cc-68f32f05-71cfcd4c-7e4b06b1": [ + "Cardiomegaly", + "Atelectasis" + ], + "c8a6b25d-257241cf-19fa30f5-20bedbc5-b371e581": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "fd3bd9f2-a6369422-700296fc-3ec78cc2-f5884010": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "aed9fe49-bb7468b2-ba4f60dd-25410316-df9b9d8c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "c9fec029-7cff7a68-c85274cf-7a560cce-becdcb7e": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b93327f5-228e6c2c-3dde8c34-4ed1cae0-997d5fc4": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "5e868309-d66225ba-ff4f44dc-5e9aa433-7712e15d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "fdd036df-52fef6fa-3b7ff466-ad816cd9-f9fe7db7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "89211728-267e6ae0-5cf3d9d3-8ed03442-8764ee24": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "8a429357-0b188f6b-54307015-8a57c7cd-31b1ed38": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b60d9052-3235c4b8-59510f55-a43f5ffd-e99a36d2": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "61767c51-5b13fe95-8ee32eb0-6dc19ea8-be684efc": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "98fa0073-4a72a84a-07d17d1b-80f5bc40-e729e67e": [ + "Lung Opacity" + ], + "d53ea806-f9b5f637-2a0ee3e9-a8409e3d-56e8cf0f": [], + "159f8b16-a8da78c3-2dab8f92-5577b199-2d544ffc": [], + "95133322-5ad8fb3e-dea16125-70e718db-6cef790a": [], + "a8ebb1c6-9cb677c9-f048c934-fb7d3b78-0a4d6d2c": [ + "Lung Opacity" + ], + "f822bf04-bb6d44c7-d992163b-54e7d6ac-9355a7aa": [ + "Cardiomegaly" + ], + "1ec07497-ec6f4ace-baa95464-3ff6c941-6418e970": [ + "Support Devices" + ], + "86075489-1dafd76a-5ab65e27-a19fbe6c-5b4a61b1": [ + "Lung Opacity", + "Pleural Other", + "Support Devices" + ], + "57930c3a-37d3c746-2460ae3f-0847e6b9-4da2d903": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "744f71f1-f6d7965d-b1962186-ee28d9f1-b157b253": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3433048d-a6c5dc75-1a99a0b6-1f89a734-ef0b39b8": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "11deb911-a4fe401f-1955bb16-6adc7f50-673dec83": [ + "Pleural Effusion", + "Support Devices" + ], + "b0ac58d9-2a6c6e67-a28d32ad-e75154c0-4a90359a": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d1a588ba-df69fa21-41d67ef8-6ae29c22-17544175": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "4f83231e-ae6e7b91-bf1ea6b3-6053e3f6-55fc3e1f": [], + "52e4bfec-0c5b972b-cbcd589e-3cd83f95-12d14023": [], + "89b0ebca-d32862e8-5268f3d8-5b946fe8-a2876759": [], + "cb5f3772-130f7aca-79e132d0-9724feeb-6f07f744": [ + "Atelectasis" + ], + "0d5def63-8ca29ddc-bf6bde42-fab8887f-19a6e96c": [], + "b9f6d23e-fa8de1ca-1144b6a0-d8b4fe4b-9c13592e": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "2490c254-7417637a-6aa79f1e-ce072f64-173c1e05": [ + "Cardiomegaly", + "Lung Opacity" + ], + "805a1b6f-583ca6cb-23c06672-0cd8a909-8b3325e1": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "c365e493-6ff6870f-caa75db4-c926e87a-f62d82d8": [ + "Lung Opacity", + "Pleural Effusion" + ], + "3c34e348-938dd3fa-3c42bcb9-a7da976b-030bc4b0": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "9cf9ae36-996666c5-57ce38ba-b6f2d455-eba1029e": [ + "Lung Opacity", + "Lung Lesion" + ], + "dd734ec9-ecfbb89d-074a62ee-7b3c781f-527231e7": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Fracture" + ], + "5a8173dc-ba88a84f-b2bdec60-eb030b78-73682cd4": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "b0e9726e-2f7a3e61-18743619-0d5e6e7b-b8b429b8": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "de739d0b-2345495b-255f0e3b-00ccbf4c-ab4d3400": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "64b9eb3b-f34fa8a9-fc75f27f-53cc3b2c-eca0f252": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "8de15662-1ddba4f0-7784313d-51c003d0-f3d4cc1b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "7e276371-ae411cdf-477008cb-d9eb69ce-b35cc5a0": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "eddb9933-b3f09de6-7a247c23-5008736e-5f1faba5": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "82334281-bac120c3-7fe76578-62bb15b8-3625a45f": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "f2519fc1-a453a942-fcb47d26-f30fa862-72fc2107": [ + "Lung Opacity", + "Pleural Other" + ], + "41bee34e-e9476a64-f28f2775-7d097a58-d88789f6": [ + "Lung Opacity", + "Pleural Effusion" + ], + "35419b0c-ec5b4c1c-d6715f88-a4ba56e0-e911cba3": [ + "Lung Opacity", + "Lung Lesion" + ], + "414fca72-91452400-5dfedcd2-5363eab9-ff09d8c2": [ + "Lung Opacity" + ], + "204ddf42-2240e02f-cf58a88e-684540aa-4e5da21c": [ + "Lung Opacity", + "Lung Lesion" + ], + "22ebe993-418ddc79-44f5af39-3e2d7039-df6bd5fc": [ + "Lung Opacity", + "Pleural Other" + ], + "5d12427f-41fd4e5e-6db33536-0d265b21-1b800caf": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1f47d792-eda2bffe-f8173c15-50577b80-bfbd2e17": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "6c8f6788-2282a048-8d892726-05bc3df6-fe88e6e7": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "28c782b9-7eb7d267-5a9a998f-25d24646-e811e771": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "d73fc335-ef582778-b33761ad-1003aef6-8129d67d": [ + "Lung Opacity", + "Lung Lesion" + ], + "30fc1707-e38a1f76-d52f9649-78068351-e33cb1b3": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "7b314c3e-8b32d433-db7bbae8-a0dd0d28-f9a95990": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "084bf4c8-9d71bd41-9e428e68-d490096d-ab3d6912": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "13a203d3-164057eb-bb9715cf-020b625a-1a63c8f2": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9b916224-1f793e77-0cc55cc4-1f3c9fe5-7eab98cb": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "28e4376e-045edb59-84977ca1-d0deb357-1d35d4b9": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "6f5dec34-e9ef8a35-1dd744f6-d818cd22-5dad9b6f": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "9766f0cc-88676966-24902c6b-1e013369-eb545fe4": [ + "Lung Opacity", + "Lung Lesion" + ], + "f6a45850-afbc320a-ab118fd9-85e788d6-d88d5060": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "20172e51-d3a94675-99ca4ec6-310892fd-fa5de5b1": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "5ccae337-76cb9270-b53361d2-c2b200e6-7d3b4079": [ + "Lung Opacity", + "Lung Lesion" + ], + "9aaaaf2a-75b77833-5da35513-6c289824-edd9e84c": [ + "Lung Opacity" + ], + "0844862c-b31ad664-cb39e0fe-f457cc37-02e1b4ae": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Pleural Other" + ], + "feeef719-f6a236d0-bd85a338-4d4729c9-d91fdf3d": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "92d470e7-32490114-834a55ac-2baa551a-40bfb365": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "db88eb68-e1d41137-79817ffd-807dc26a-b8170dc4": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "05eecb1c-7ac28272-530e6870-c5d1d135-cab1ed67": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "6b1b1903-9f343a6b-fe4ba346-dbe5a6fb-63338c26": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "ca72c0af-97077c68-1cf042a0-d9128e34-f775403e": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "d7a25de4-e2d563e2-93017e5e-4127bd89-0d081f33": [ + "Lung Opacity", + "Pleural Effusion" + ], + "16ab4ad2-7d949b6c-7915355a-323ac15e-a86485d8": [ + "Support Devices" + ], + "89759821-5078bd23-fe386ea6-806c0e14-2ce65596": [ + "Cardiomegaly" + ], + "637914b1-994c0db2-29d6aba2-56b11076-9cfcc278": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other", + "Support Devices" + ], + "84290c10-1ebc15a3-acdd91ef-f142672e-6ff4b671": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "cf080221-83e85abe-e7849064-2dae1076-601c8319": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "0dbe8ef1-802b094a-36fae3c2-0d15af98-7a5547ab": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "b683c297-030af2a3-59abdf94-e6a7b694-cc4b7e31": [ + "Lung Opacity", + "Support Devices" + ], + "c438aa58-0a039112-e4e8fe88-99a21dd7-1f22535d": [ + "Lung Opacity" + ], + "ce3a9dd6-9affc487-1b6847b3-9f555332-e0baea73": [ + "Cardiomegaly", + "Lung Opacity" + ], + "ef9e6f59-22103c28-5c2c7bc8-a2d07454-4c824d0e": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "3c984a21-5a881f57-e820aa5e-d952daa1-132c0976": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c2e3e4cd-fd889116-52b37c72-db4f46df-52939006": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "6814849f-be2bbd19-70510b49-1bcff64a-b8793ada": [ + "Atelectasis", + "Pleural Effusion" + ], + "9cafa042-7e42acc5-4e291de3-bf7be788-ef54e6cc": [ + "Lung Opacity", + "Lung Lesion", + "Pneumothorax", + "Pleural Effusion", + "Fracture" + ], + "9cc42913-473a1cee-05dfc2b4-5df0f319-e665978f": [ + "Atelectasis", + "Pleural Effusion" + ], + "2adf8a50-822eefe5-c6cd6afc-03067162-0e13c6af": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "833af053-d28a9f68-f624c5c0-dae1203f-3952d8a4": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "40b2ad97-b8cd3c49-7a1658b6-79be29bb-676d3481": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "9947b3c1-85e9e0c2-3e3aa524-6e24768e-01f76156": [ + "Atelectasis", + "Support Devices" + ], + "73e90944-f811f9cb-ee08ddb9-7a4a4a84-34818999": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "45545203-d998ece7-e4d4aa77-caf1d527-204d3cad": [ + "Atelectasis" + ], + "973f7776-683260ca-ddf5aa13-cf5e3cb1-e2828914": [ + "Lung Opacity", + "Atelectasis", + "Pleural Other", + "Fracture" + ], + "bced25e3-835951a9-cb1436cd-d095e342-730a3489": [ + "Lung Opacity", + "Atelectasis", + "Fracture" + ], + "06dffd2d-fb7ae39b-dc116fd7-677c6133-de43815b": [ + "Pleural Effusion", + "Fracture" + ], + "28ae778d-8cbc60eb-32962bb3-f25cb5be-31bb9242": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "070f93aa-7df509e4-46a2fbc2-f2a690e7-32eb3db9": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "103cf62f-89baecec-69aa24c2-0d1c769f-e3c40ac1": [ + "Fracture" + ], + "96692a0e-7024f052-0eb47698-e468faec-f6d3ccb6": [ + "Lung Opacity", + "Atelectasis" + ], + "e25c21c7-070fdd75-c67d52b8-9e091b7c-6c560ed4": [ + "Lung Opacity" + ], + "60781ae0-7016f7ed-54a825ab-7509c1b0-9b9b2725": [ + "Lung Opacity", + "Pneumothorax", + "Fracture" + ], + "992ca7aa-bc9d75c5-cab8f375-a649cfc4-2472eda9": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "ce1985cc-a6c42ebf-5ff6ebaa-52ca117e-11ae0c1c": [ + "Lung Opacity", + "Support Devices" + ], + "982578b4-18516c2a-5faf15d7-e4641de2-eca3ad55": [ + "Pleural Effusion", + "Fracture" + ], + "bae66754-cfeba31c-76ba4feb-96694b5d-17bb69ae": [ + "Pleural Effusion" + ], + "22582d1c-114af91c-83312668-0af5831e-ceacf04b": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "2ef86c0f-55bf4440-5098b3fc-b9435636-38b5b69c": [ + "Pneumothorax", + "Fracture", + "Support Devices" + ], + "6028cc4d-90f984dc-0fd05dbe-2f10dde8-229e32e0": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "841a2be5-4e74e5d9-2a001109-8a1a6b21-881729d4": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "8940c466-c9e39762-22971350-b783808a-15d5a1bc": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "dedc8034-9860140a-df88abb0-b9b2fab5-3265641f": [ + "Atelectasis", + "Support Devices" + ], + "65fcdabb-eb6130b5-693a34c1-7e1580a1-16cee3cd": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "c2d94ada-21f141cb-17d5c7a3-f5807bbe-e83b679a": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c95ac9a4-70c1c602-421eacbd-bb29c3f1-7ab0862c": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "876608af-2d7efebf-d51bcb03-9b230997-e9f7797a": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "44251f87-ca5a8427-8e49b093-f5b069ce-c533adef": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "af27343a-9cb9bb54-43761fcc-118e8f5f-8bbff258": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e3d8d85e-48f2c05f-b72dd0c6-fbd2ceea-656be377": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ad2bd086-921f17c8-b1dd649c-09b63b13-1c0ae6e7": [ + "Lung Opacity", + "Pleural Effusion", + "Fracture" + ], + "3c333c52-c86e232a-705001ae-b328c40c-41096f34": [ + "Pneumothorax", + "Pleural Effusion", + "Fracture" + ], + "54ce3eba-5d2811d9-139815ff-e9051cb4-c932e904": [ + "Atelectasis", + "Pleural Effusion" + ], + "20a71bc6-69f1a131-4a5fbb7d-14b11c4f-73df9aa3": [ + "Atelectasis" + ], + "33291277-e041bbda-50a4d443-2208be5e-06e2289d": [ + "Pleural Effusion", + "Fracture" + ], + "1955b279-efe705ba-68f22a50-df04507e-dfed9525": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "384b766e-a666fc50-5510a97f-c615a43c-1bfebe33": [ + "Pneumothorax", + "Fracture" + ], + "93ca5245-a3a6c687-b3723eb4-4e89b56b-3cda2cc7": [ + "Lung Opacity", + "Atelectasis" + ], + "41ee9261-0756cf99-574bf302-f275f3e5-a8e33f13": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "c5d72977-09300b2f-a22239ad-2c5d50c8-0cc06cf6": [ + "Lung Opacity" + ], + "c8186106-21770457-b7245fc6-d47e6b43-e07991e8": [], + "a2385584-b046d533-d61a4f1c-28a38feb-2aef2b6c": [ + "Lung Opacity" + ], + "1a81259c-493d3b3c-de7e0965-b13a0f4c-d813d91d": [ + "Cardiomegaly" + ], + "870c3a6b-22260d8a-f0ecaac8-e6be45f3-8789795e": [ + "Lung Opacity" + ], + "8e4f1e80-f399aae7-0d76204f-8cb99fb9-e837fe04": [], + "8d70fba4-2de961f9-f5a521bd-99e41c4c-65e750ba": [ + "Lung Opacity", + "Lung Lesion" + ], + "e90de45f-b12a6a45-721981dc-7df46eae-aa3318e1": [], + "52b95950-9baac352-83f0d8c5-1959eabc-a5a3ea0b": [], + "c689d99c-d2fa5c84-6112de6e-adc7466b-c0209f29": [ + "No Finding" + ], + "ceb3c18a-049668dd-5f5f4ff0-f0edd7da-39a13b6f": [ + "No Finding" + ], + "f762fbc6-ca1926fb-06f3ef2a-b996a151-66a3b743": [ + "No Finding" + ], + "92a1d719-e7404cd8-e6e9d5c1-fce29388-120afc34": [ + "Atelectasis" + ], + "bf732fa8-e739d288-c19041d7-eb81cf9c-de266f79": [], + "842c80c2-40a8d117-9d30e18e-4548b4b6-99f871ed": [ + "Lung Opacity" + ], + "a27d6353-c65e4d61-f0312644-18f75864-525a1543": [ + "Lung Opacity", + "Atelectasis" + ], + "1f3770d8-292e129a-67319735-0573718a-8fcb1e31": [ + "Atelectasis" + ], + "b5b08344-1a02337d-90a42a3b-cf710862-a4ff491d": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "f39a0cd8-fb45cb6e-63f5fa30-21668913-0ac228d3": [ + "Lung Lesion" + ], + "8ab13ae3-2d580227-ac6e610c-f2e5c694-60d57d41": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation" + ], + "0973f2e4-fd436409-ac1ae199-94dae0f7-7ed0d26a": [ + "Lung Opacity", + "Atelectasis" + ], + "43a15b39-91e19d8c-aa4bf7b9-1f192be3-ad880dd8": [ + "Lung Opacity", + "Support Devices" + ], + "b774b7cb-d6e72a35-c85f2601-161e02e1-de195f8f": [ + "Fracture" + ], + "dec8fc17-025db48c-c1db3442-ee663d79-8d57b392": [ + "Lung Opacity", + "Atelectasis" + ], + "021e1de7-890774b9-f2aa1f31-53b8b7b8-eb9c4fd2": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "92ca8ae9-3cd416c1-c8b97c65-2d1a7560-3a11ae68": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "b9b0faea-d88909df-ccb8ac50-f67497d4-7c320ffb": [ + "Cardiomegaly", + "Edema" + ], + "1b09adcd-7bd70867-f05e7f34-ad26a085-cf236edb": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "725ce4e7-a90bd488-7d02e68e-cc962d79-450af597": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "edbccca2-c4fb443b-76458df4-ebb5c146-da6f90f7": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "2386d449-ff60da90-15b0f79f-2a63ae3d-146cb799": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "661279e3-b9fc21ed-ba997fbe-35d448a8-8bd6bb70": [ + "Lung Opacity", + "Pneumonia" + ], + "4a834d65-3c7a5557-474061e3-4903563c-7ac8bfb4": [ + "Cardiomegaly" + ], + "e2639104-28411e18-bfafdd6f-8f7fed3a-0801198b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "12d8da8d-a6d90776-ad2824a8-ee30c110-7e5151fe": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "9c725afd-18a8ae82-34dd0e99-50896017-a63044f6": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d1d8992c-f86b1ca8-23d9a4b4-b87ba230-a44fc7b2": [ + "Cardiomegaly" + ], + "5bc1f7d3-d0c163be-13a38541-42a5e89e-4c074884": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "077e7dc4-1ff1ea54-2cb21d9e-ae380204-f33a774a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "1a48fcb9-1ba60fd5-37d6cc93-9996cbca-e4a827ee": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "90ebb323-6428a4d9-0ce09352-f63d06a0-730d1c33": [ + "Cardiomegaly", + "Lung Opacity" + ], + "a960626f-d83c011c-0418381e-d4cf2323-e82c0290": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7e96d7f1-3095daed-1e42c172-37ea991c-747f03a3": [ + "Cardiomegaly" + ], + "4a38ad35-3e063ba0-bb9ccf2a-4982ca59-08b1005d": [], + "c6d9dcd8-49e961d7-227e2c94-92994086-9831113b": [ + "Cardiomegaly", + "Lung Opacity" + ], + "d2e18dfe-d51d84d1-d69a9a4a-2fa109d8-a81d150d": [], + "b740f79e-73da2f17-0d2dac03-2e639b9e-4e01c770": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b53f680b-da2b71cb-81533dc8-2bfa0ee3-f1450be5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8aad1160-9cbc4ec4-577f8737-8784924b-ef451f49": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Support Devices" + ], + "9b47cc75-fe521673-bcf56155-8787d012-4242c9a3": [], + "cf215d80-de177339-7a58b114-8206a52d-f9b1fc56": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "da734734-eed7fe7d-743a3acd-22fb50e8-3bafca7a": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c87c7c06-4d0a740d-c4c78513-1e63bfe1-7b9e08f8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "4bcc9d3b-9f42ad8b-ffd09915-36b11277-76658b20": [ + "Cardiomegaly", + "Support Devices" + ], + "8ef7bf46-e4313086-76cf4797-01d532d6-5ce0c1cc": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "d52c36ac-6e608971-bbafb23d-06547ea6-1979d9e3": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "d53d8bc5-0197f87e-7e6c6765-2fbdd1f4-52bfbdfc": [ + "Cardiomegaly", + "Support Devices" + ], + "42ae0c6c-7b1098fb-961404c7-0f003264-354d885a": [ + "Cardiomegaly" + ], + "67b79c5a-91178925-992cc76b-a0b66e0f-927a44a5": [ + "Cardiomegaly", + "Lung Opacity" + ], + "a6aad5da-2b346586-e6b4b977-d71b3973-925a1eb1": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "44b39923-9d6f063d-3ef99de3-ab938e13-74a61c9b": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity" + ], + "525f290c-cf5cb6e5-11ee38a0-a2a67848-2f55c7df": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9748d26b-62549e8c-0a4fec22-48ae4480-691c7013": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "d033edb1-1744b059-8b3505f6-da4c0458-f924f28a": [], + "2626edcd-3f9f9f05-089bb9fa-c8ba4148-efad5e91": [ + "Cardiomegaly", + "Lung Opacity" + ], + "6a7b2a39-053c4f09-18c1d7a0-c5fa96df-88fca8c8": [], + "ac2bc5fb-c181f807-907ef393-692441ee-057ffb40": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "1797dbf9-b550d2a9-90d63c09-7f326fe9-70160201": [ + "Atelectasis" + ], + "6cb983aa-64b252ae-99834c29-3233ef10-ba21f892": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d1d917cf-c84d3a9f-bd50b4ee-43f27a8e-79449ae8": [ + "Cardiomegaly" + ], + "a274e07c-68b358c4-454f3eab-c28f2256-061b00e2": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "a3bd1cb3-d4402e84-fb9c190f-657107d5-0c6f2237": [ + "Cardiomegaly" + ], + "2c306616-b3005c87-d05f4dd6-a7f274c1-e15bf2a1": [ + "Cardiomegaly", + "Support Devices" + ], + "23fdc685-8851eb9b-b5ee438b-0f486c37-4677e1ed": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "043df04d-931d53c9-ae497983-ce79d340-656e2354": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "790aef7d-e4cf7dd2-82d3a1e4-111fdcc4-3d8cedd7": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation" + ], + "b201c59c-783b3811-27abc766-9831d333-e648e28e": [ + "Cardiomegaly", + "Lung Opacity" + ], + "2db13516-1d7615da-a3e29ed5-0020647e-ce37e7b2": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ad26bd5f-bf6dde7b-10a2027a-72457df6-64959759": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "c4d46e0f-fba1a258-b4b5722e-5aec1b56-de6931be": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "ae4c4185-418ae838-935a5921-92daeeca-f8194630": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "93b163fa-7f80655a-ef8a0aa1-a7f79efd-6feebd5f": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "f39b05b1-f544e51a-cfe317ca-b66a4aa6-1c1dc22d": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "f3fefc29-68544ac8-284b820d-858b5470-f579b982": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "686a2b90-af0e2b68-75f6acc2-ea6fecdc-a69f5c88": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "ae53df1d-e41d406d-6fb75906-f8944e28-12d90910": [ + "Lung Opacity" + ], + "34013074-9e17c29b-e322906c-a7ec9382-d4b86bcb": [ + "Lung Opacity", + "Pleural Other" + ], + "fd6509f0-c39f57c5-744a9382-37db12e6-fa9b1784": [ + "Cardiomegaly", + "Edema" + ], + "62906443-360748c7-e0d0df5b-ead155a8-9939a402": [ + "Lung Opacity" + ], + "fd6d0847-90e245d6-5e8b9257-3f6a857c-cc3dccc6": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "4584e73d-af69492e-8ad8e520-97439184-5c788f58": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "fa2e4a26-86c3fe0c-c6b85c88-07c43e8d-7c8f8fdc": [ + "Lung Opacity" + ], + "1042abaa-1e289541-bdf86540-15143a44-0079aba7": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "73c08169-7948c6ff-04f9eccb-16f2d912-e60dad1a": [ + "Lung Opacity", + "Fracture" + ], + "dcd2b9ba-011274a6-6e6f99c8-7d3d5cf0-f784a550": [ + "Lung Opacity" + ], + "e919ccde-cbde9eef-ec83c6fe-361b22e6-fea7aa96": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "6b4e9179-706726d1-399913c9-4e19cab1-51258dfb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f7995b00-70025839-1b735979-92983f8a-5fb639f8": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "248d10e8-c0dcb64e-cae9c9ac-271af79e-8a72b381": [ + "Lung Opacity", + "Pleural Other" + ], + "7b764993-32d1c941-d0ddfd50-1022cf30-82cdcfc7": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "8fd47aef-a0002ac5-00dd791e-784fc4a3-a7bc5026": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Support Devices" + ], + "2ec8fc3d-2689bd30-14e8c2a2-4e342401-cfd3f324": [ + "Lung Opacity" + ], + "b73bf324-b73f2173-694c520e-85a82ce2-93e7be3d": [ + "Cardiomegaly", + "Edema" + ], + "762d904e-6d16b5e3-99ff54e0-002a0d8e-c7ab5157": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "c8d8a6ba-39f605e7-31f65aff-3edf85bf-f9e26e9b": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "a2512fa8-095ec040-e32a3e91-1c4f753a-099de7a9": [ + "Cardiomegaly", + "Edema", + "Fracture", + "Support Devices" + ], + "d24b9a9a-5c30fd84-c72ddb03-64a2caba-96d7eb64": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "288e9b61-c5cfce3d-38a26f8f-2f3f97f6-fdf08c07": [ + "Cardiomegaly", + "Edema" + ], + "3851190a-af79fb41-4c2b3b1e-b4269325-f8a2fb78": [ + "Cardiomegaly", + "Edema" + ], + "fea5a675-05c6e538-371b0eae-ae9be0e4-2b30ecb0": [ + "Cardiomegaly", + "Lung Opacity" + ], + "2518c7ca-5bc35dd2-e35d9b4f-c44f6549-ee3b0443": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "77d762b0-65a5cea4-1e326eb9-73de35b1-1f197533": [ + "Lung Opacity", + "Pleural Other" + ], + "87515fe1-c81935db-3e08045b-57166269-f532d53c": [ + "Cardiomegaly", + "Lung Opacity" + ], + "c5f6b48e-5ca7ae46-4fab692c-24718944-688b465f": [ + "Cardiomegaly", + "Edema" + ], + "3bcad369-b8a201b0-1c5fdb6b-922d37a7-ce628c72": [ + "Lung Opacity", + "Pleural Other" + ], + "3cf29b0e-f67cd860-ae12f2a8-622ccc27-2195ca85": [ + "Cardiomegaly", + "Edema" + ], + "10c89fd8-d213373d-7803e8df-fe8a4a8d-2d9a9503": [ + "Cardiomegaly", + "Lung Opacity" + ], + "9f25df0c-ef2fb7e9-f4d27df0-0117858f-b7ce8b90": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "34c46b78-c751bfe6-f38375be-f360ffe3-d6a24fda": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "f1c5fd56-97830cd3-47bda383-38c447b7-6ed2d3d2": [ + "Lung Opacity" + ], + "598a87a7-0c33ee5b-7a11cdc4-ad0d69cf-a5ca8524": [ + "Cardiomegaly", + "Edema" + ], + "79c58559-700225dc-530fa0db-a2765310-d9d722e9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "84b1a767-dade04c3-67f7a7d0-c2cbbae5-82262539": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "1b7bd4fd-2ddbc2c0-70d7a8f2-ff32883c-5c2ce9af": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Pleural Other" + ], + "f067c77a-54a4358e-ff4a3ce6-75df62e9-a3be270f": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "473b3723-2a628ba8-ee2c35cc-2e8cd7b0-166f5104": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "6fc552ce-e4e7859d-9cb49434-ba52639c-c274c6b4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "2a7d1a72-a5d0998d-16782dd1-477d445b-d4604768": [ + "Lung Opacity" + ], + "70e841c4-5db69600-a5ae730e-bd97e1d0-49246a22": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "08c5db2c-71dd02c9-c4a04334-3b52c7a9-afa08832": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "748c4a64-47da4847-4a87a967-a4bec5ab-352fc0c9": [ + "Enlarged Cardiomediastinum" + ], + "ba540e00-08d74cb6-b40102ac-86237c85-e83b0089": [ + "Lung Opacity" + ], + "198c7689-cf66d2db-f4a5561e-c458a391-6861bad8": [ + "Lung Opacity" + ], + "b7ae7112-d3ab965d-c43adc90-30533667-3b307ee3": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "10a3cd75-c86d7f2a-f350e7bc-b872fc06-79271f33": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "912421cc-d2cda254-906086d0-0d60c455-278327a0": [ + "Cardiomegaly" + ], + "bcb16c2e-a3fd8bb8-db51721c-dc9a8f74-f61344e4": [ + "Cardiomegaly" + ], + "98a7c378-eac30aa7-6f338a89-4d7394da-3fe0294d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "b9d99fc7-678bcc63-8a81d400-9ba1ebcc-bcc69e62": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f0efdf99-db7193c1-b47f4ffa-dd90a48e-2071134d": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "02ed59f0-43d0aa6f-4bf3340b-c891b4b8-42ea5f9b": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "44f95a25-6a2ce6f3-945c8d55-81166fc3-2e583415": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "42493196-32cde3ff-b94d0ab0-baf74d8e-a88ad016": [ + "Enlarged Cardiomediastinum" + ], + "94420d61-059622c4-a869e720-aa8d1a7b-6910f91c": [ + "Enlarged Cardiomediastinum" + ], + "0f5eff83-85fc727f-a7691318-ee53b149-e9d6062b": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "b0a3c7f8-26d03d87-2b85a969-b02fab24-22c44433": [ + "Cardiomegaly", + "Support Devices" + ], + "1299b94a-f07cab56-9e0c278e-416e2eea-39578211": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "87839031-cf5f44d0-580a18ad-b86bcca4-c95455c5": [ + "Cardiomegaly", + "Edema" + ], + "0325340c-c95a8b30-4a454b66-d20de6cb-d5353596": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "9eef23a6-9ec5cac1-17521310-3e505395-c63ed35d": [ + "Cardiomegaly", + "Support Devices" + ], + "ae032259-83a5d5ec-8bce36ad-8313ec75-f32fb108": [ + "Support Devices" + ], + "cfdc6369-be819fb3-b05a78fa-9695a910-82883c69": [ + "Cardiomegaly", + "Edema" + ], + "3993a913-7742b74e-833c9faf-a91d9d51-ca3c87a7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "ca74e920-4ca91dba-8ccc5185-617107a8-82e5a48a": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "fe723c75-a487635d-c093b97d-f9253d3c-6bf1894c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "2d3d526f-5560ef5c-de1b0d4a-b17b0f0b-427cc0ca": [ + "Cardiomegaly", + "Lung Opacity" + ], + "5037ce6f-1b5a2beb-cefbe169-b7e53cbf-427eaf91": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "32090cde-4c8c850b-1cb52e26-66e7c4d7-d14f0d2d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "488be5c1-df6c98d6-5a8ab963-a827d34e-5a25ccc3": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "031113f9-e2466fb7-08d11a74-231bed81-45441968": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "b04e9b1a-64c788c8-4b86ac26-c5949f1a-d3c9e288": [ + "Lung Opacity" + ], + "58c59df1-b41b6ec4-e05fe16c-68059901-7ff1b2b3": [ + "Lung Opacity", + "Lung Lesion" + ], + "68bd5521-ca187f93-ae93cbe6-8bb8f491-3fb2dd0f": [], + "1fbd1640-367c4f70-02a3a28c-d27a8a1f-ac0fd964": [ + "Support Devices" + ], + "5e8e548c-59b6fa70-d71716fa-d03c9e0b-2dc443eb": [ + "Cardiomegaly", + "Pleural Other", + "Fracture", + "Support Devices" + ], + "6f5a9223-40509c39-c0498f04-583d1f26-1c7137d6": [ + "Lung Opacity", + "Support Devices" + ], + "4a5283d6-157b6054-3840ea3d-d27e7ba1-d6689022": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "7794e4cb-719a0b85-18532575-0b5ea119-8eb26b6a": [ + "Lung Opacity", + "Support Devices" + ], + "69392c89-8fa3a6e8-6c3bc53f-f09b09e2-a33a44e3": [ + "Cardiomegaly" + ], + "aec5242c-9563e40f-fd56a8ff-2b9d80e7-e3ad7681": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "55339975-113cd016-3378dc51-976067bf-8b4e471f": [ + "Cardiomegaly", + "Edema" + ], + "c9fff184-4c819069-e151edf5-6591caae-9a76e8f0": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "a3c40907-043e8021-0482ce61-34670856-7cd45fdf": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "fd442341-955b6521-e3b355ba-788f7de5-d75d5471": [ + "Lung Opacity" + ], + "41411ed9-2c9f6f41-b31a45f2-2ac7bb8f-2e25c279": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "c93d0863-a6040763-5b9cb677-78a4881b-d698bffb": [ + "Cardiomegaly", + "Edema" + ], + "05470fe6-5af4b766-058bcd62-7e3f218b-da0f7a60": [ + "Lung Opacity", + "Edema" + ], + "3f111bf1-0ce0a81f-76b66ed5-c8517077-9373dbea": [ + "Cardiomegaly" + ], + "e120ed69-a974706b-30acf181-38be212f-48eb872d": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "0f3b10cd-b3e6a500-20370ada-6e3ab8b3-ad1019c5": [ + "Cardiomegaly", + "Atelectasis" + ], + "42c8ec81-8a76040b-dacb834e-034b24d0-da9eedbe": [ + "Cardiomegaly" + ], + "95906129-89721086-cc8154fa-07c91f7e-3c5ea511": [], + "08614ec0-0b852187-5ffa5362-16e023b7-1366cc0f": [ + "Cardiomegaly" + ], + "d45a4f1c-aa9b0b1d-714e476e-b6f28f01-34d6bcdc": [ + "Cardiomegaly" + ], + "68e78cda-4586bb4f-29822ae6-fbe7ad84-af842685": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "06da0b0e-ad407abe-e199913d-e079da96-22a7c445": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "60d7e9dc-0844bc57-9783ac54-f69362d7-bdf20205": [ + "Atelectasis", + "Pleural Effusion" + ], + "8dbd2003-7d7887eb-6d6e4bad-7b02ceed-acdeda24": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7394806d-330706a4-f0e6ba1f-7d857d57-2492e480": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "cd9d349b-0c057599-fc4663a0-98ae4d7c-774a31ce": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "919158fb-4f0d9b66-46719ab6-5d584449-1a3ad8de": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Other", + "Fracture" + ], + "a750cdf1-08f86f48-3d7fe822-9831cd73-31f5862c": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "c542b18f-06a3b284-5b3e593f-ac2f5aa0-8f443747": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "0afcec8c-ff907096-444a6e0c-19b6823e-0953d8b5": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9aa3498d-70f8a9a5-132f5a2b-bb7c2837-2653ee2d": [ + "Cardiomegaly", + "Lung Opacity" + ], + "bf010702-69e984da-d0e9d988-cb6dbed8-1f759220": [ + "Cardiomegaly", + "Lung Opacity" + ], + "d03946f6-e754867a-37047566-61f55fee-16408685": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "8fae5cf0-56ff3f10-aaf708d2-32730e5b-65a55769": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "b6b7600a-e5ca1f26-680bcae0-11a322fb-90a0aaff": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pneumothorax", + "Support Devices" + ], + "b849e290-2a7cce04-71ba4fd8-ef1d13ad-15cdd04a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "d829d785-9cf108d0-cc72151c-457d3b95-b2d38263": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "64f99800-8450e0a6-9bcd9fa5-3fe8ad9f-9c164aa4": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3413b4c9-e7447f62-2f6619a0-bbe0438e-8bb7d995": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "dcedeaaa-d89ce34d-55379511-12e54131-ec50354b": [ + "Fracture" + ], + "ec2a3c71-3c6943bf-1e4be2be-21077cf2-5f0a9978": [ + "Cardiomegaly", + "Lung Opacity" + ], + "95384df4-cbba1b36-7abeb19e-81e2e28c-65204251": [ + "Cardiomegaly", + "Lung Opacity" + ], + "e667b137-83bbec7b-b70747b9-9ab0e43e-176a3441": [ + "Lung Opacity" + ], + "1a329778-20bfaa24-80dfc02f-7f896fba-39d0dd88": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "662edf02-f6f20a12-e88e5622-1d01bf6f-90f762e9": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "79931253-dc5d4f8a-ed5d56b8-d117d4ed-6e8ffc71": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b9ebeb06-2f7bc1bd-93527eb7-36325430-6bd74fce": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "78706a51-93862124-f2e96aba-f5e1ca54-2ecbd486": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "a3a06d4a-738a23e2-049e6887-d1e5cc2f-c1573666": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "63bc3ab0-da8f9dcb-006bcd2c-5af27843-de7a7597": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "af6c2c8b-de4ab155-e59a3a03-1f473d61-d357be8d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "c1b005c9-f5bb265e-ba26b793-e1767adb-b6c50b32": [ + "Support Devices" + ], + "ea7d6277-80e938fc-b51ab8d3-00899183-00abddbd": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "242c5252-f4f60ea2-60a0a808-024076cc-54ea11ce": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "28bd0725-441d6b2b-8333f48b-70538154-c6040732": [ + "Lung Opacity" + ], + "78bad02b-a94614e0-cb77fd70-a51f0640-d3b05fef": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "c49e5abd-d37fecd3-1fd78a6d-9249f8ad-e8eec581": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "2bc7899c-05cf424f-82964600-07574dae-5d813b68": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "67e8e551-3fb614a6-58610388-c92da136-a8d32ff8": [ + "Lung Opacity", + "Atelectasis" + ], + "e979c7ef-9b918587-a6307f2e-a76de838-7811d0a4": [ + "Atelectasis", + "Fracture" + ], + "019dff97-dd885742-7be6fc52-dfd21808-8513ba6d": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "0a9230c4-21071085-666dec7b-8a690910-28b3502c": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "dee14392-cc692fb3-6f2ebd41-a3c076db-05568231": [ + "Support Devices" + ], + "8d737f78-cdcd1c7a-d434e99f-2f86c50c-e24fdcfe": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3c13fcf9-f4e94af1-bd429b2a-ff94e888-09fb67fa": [ + "Cardiomegaly", + "Lung Opacity" + ], + "b8a682a3-13005580-762d54e7-031106db-9c766de1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c8f77e9b-ae1d0935-5fc5b81a-bbae4b84-91567aec": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "9f5e6fe5-3058dc34-5fb44a44-687509a4-af7f886f": [ + "Edema", + "Support Devices" + ], + "4b8a29ae-36006b7b-c4964368-02ab587d-1ee25fdc": [ + "Cardiomegaly" + ], + "a0a7577d-53a8748e-450244b3-39cec864-8a18f0cf": [ + "Lung Opacity", + "Atelectasis" + ], + "11b51e2b-5c48db12-3faeaf40-aaf27ca7-a6be3ce9": [ + "Cardiomegaly" + ], + "8ce33378-337bc3e6-2915b9bf-0ea16f16-2c986cfe": [], + "44265749-00dd7405-287e7f77-b68607f3-663cc2f7": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "2b48fff3-ec94225d-0c7dc92c-383e271f-ff7c44bd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "0df3aaa4-28257f4c-e142fab8-bbea28fb-0e313b9d": [], + "6f76af94-e325cbe7-266c1d35-9c931f0e-e0a1a2b5": [], + "4fe3e961-a3a02576-db1e637e-60077803-2a154636": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9678dc02-54a05e84-f5efffa5-bc62e0a2-83dac014": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "49177e16-0383da48-c2a81ed9-77e7a7c0-bbe8c9cb": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "e3555bac-cb4ffa77-657be5f9-38bcdc9b-0b46292b": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "1122a7e9-32e0350f-1a87fedd-c85128f3-4e2d23f4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "41da5168-3827dda7-50545888-b2a593ef-1dd0934d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "ea8f47d3-a878270a-7a5e0d98-b1d62b7e-6061c574": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "0ff0bb39-4a3b9b22-0150d88d-040cd9e6-c1d6078b": [ + "Cardiomegaly", + "Support Devices" + ], + "93795e56-ef882771-fa23c36d-bf8cf35b-fc41aadc": [ + "Cardiomegaly" + ], + "428c4099-c29bb97d-e06be8f3-614d3b6e-d343eee7": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "db39cf32-d22fb990-e46ba7c8-c73f9b0b-c77db2a1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "87ab8784-89bb34a7-0cd83f89-8208e8d6-8ceaaf76": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "e4791df9-3e2d76f5-10a728c9-280d9819-3c7604b1": [ + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "9db9d5b2-ca959890-19e93b7b-dd184ea9-9bdabe28": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "6941d41e-d1891aa5-1110e57c-7f6df9e4-8d782e9a": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Pleural Other" + ], + "a1ab8f5f-581bbc83-95dcba8d-3f8da9e4-4df624e8": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "871b39ac-d22367db-2644f680-703ffc97-e29ad517": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "9de8095e-20903848-13b9c9c0-39502b69-5164f745": [ + "Pleural Effusion", + "Pleural Other" + ], + "6e30272b-f594f76c-137dac67-356978e8-c09e6aa7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "7c30e561-e7612bd3-08f7df70-092ce86a-12c0984f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "8da031ac-a6a0b018-0f1bc1ef-3f1b915f-feba9e7a": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "5bc36095-67e87f3e-58bd0b18-96e0fc83-eec8c80a": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "9053ce43-3232d763-75beb611-98900ca4-59d6fb3b": [ + "Lung Opacity", + "Pleural Effusion" + ], + "b80c8698-bd19b3ad-2bfa7ec4-e5c4a4ae-ddc9c4f4": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "680a920d-18ae6f28-666fa927-156ca7d4-f686156e": [ + "No Finding" + ], + "91aa37d1-c2d7d819-bea91a37-602f27c2-ab6984ae": [ + "Fracture" + ], + "3c6607cb-2b24a862-ba454139-42d40dec-a4aed625": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "8dcda970-15727210-dfdd3c30-8acb73c6-d5a218be": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b5f30eeb-2bf8217a-f702c192-11c059fb-42e31505": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "5f7c7fb3-6f209488-379bbb42-6c8cebf3-f91a4d93": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "693bd533-69dbe685-2d5a9d4a-dfb5e67b-2b70b394": [], + "c3eeff7f-5128e28a-d1f3fadb-2db97e3e-c47fbc96": [], + "d2dc716d-a9421294-0f30f0db-ef17232a-0cb5f249": [ + "Lung Opacity" + ], + "4d91911d-7ed6ea7f-18ae148c-fb6fdc45-798771a7": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "4959ec06-3033b29d-dd25c873-29db3da3-339923d6": [], + "959ee516-d090d9d5-a95977ac-303cdde2-c9309e8c": [ + "Lung Opacity" + ], + "0ac370ca-d14e45b3-07c05241-b3a551b3-4cde1652": [ + "Lung Opacity" + ], + "9b9401ad-e590ff90-2ac696ba-9c7f78b2-661402b7": [], + "711d6472-5ff3166e-7741ea62-00213982-c3a8a67b": [ + "Fracture" + ], + "e16c6579-54ecb6ea-36f5604a-17768f0e-38552f87": [], + "9d1a91d8-eb3582a2-bb42cc96-d27dd42d-b5592d9f": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1908e913-d3051cf7-34f98451-4ed66f58-15582c1d": [ + "Atelectasis", + "Pleural Effusion" + ], + "1b61de01-88814d7b-77532377-b7782fd0-9660b576": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b32da72c-ae689a0b-86c6297f-a34fb19e-fafd4351": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0d41d944-b75b4101-f204d112-11fcfa1c-96d2169d": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1acc1625-728d2db7-b8853e51-999862bf-424f50b8": [ + "No Finding" + ], + "c230ce72-acc26270-caefebe0-f6b07913-7033227d": [], + "63f5ab00-ca3eaded-279304bf-6d6bfcb6-52295e79": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "669b4965-be67a9dd-0ba00b96-3ed4d288-597c3f17": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "1e457cbb-b441fc85-d8d29551-0cb1fed9-15dee5bd": [ + "Cardiomegaly", + "Edema" + ], + "07cc20b0-f1f267b3-ec71df70-7a45f778-bf2141ac": [], + "f84cbcd6-8eef4c5e-b8c536b9-7121aa4e-7233d805": [], + "a2c767ad-f88d5b23-c8ac6a06-187b6f12-31b3b997": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "430828eb-7dec0d0c-7b255eae-3baecf25-4a61cddb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "8c7ee112-c1f78575-59746254-e217c9f2-81146a87": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "db9446ce-77c54de3-b0148302-3a4c913e-fe9db438": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bfb7a467-e88452aa-9ca0804d-6b66419b-ebbeec35": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation" + ], + "c85e209c-a1fec74b-431277e7-6032eb3a-95fe7881": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "3e9bfa41-70250cb0-d33887c3-436560fc-339ed2d6": [ + "Cardiomegaly", + "Edema" + ], + "4f4c1ed7-5e3e7b32-534f3142-60dfa8a1-b5350381": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f1324f6e-a72d0eb7-dbe2b51f-8da51dcb-822e61dc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "9653c8a6-5e38cc8d-984f9d7b-88ff9347-ad321dec": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "b2661e27-0bced84e-02aa73ae-d1c58697-15ce7b75": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8f98b8f6-592203f8-128d7f76-bf2331d4-78b1c4af": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "bacfc58a-88a0d80f-0f80cf67-aaf650c5-90e661d7": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d974aeb8-59d6b3c0-b7dec6c1-a25cf20c-541f88c0": [ + "Cardiomegaly", + "Support Devices" + ], + "97d5dca2-592bf7a2-9513cf15-b692dc63-7e494cd2": [ + "Edema", + "Atelectasis", + "Support Devices" + ], + "7301509c-ae57fc65-dab3994c-b7d85ab5-8506df82": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "106523df-7e5cdd25-a3523b28-f80e71b7-4ed5143c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "43a3b295-a7cbe128-6c0df857-bf74ada4-4bdfe3e2": [ + "Cardiomegaly", + "Edema" + ], + "1e758c6a-4edc885c-05366f8b-05549d3d-fa35c2cf": [ + "Cardiomegaly", + "Edema" + ], + "207cd14f-964e1d6c-6bda26f6-acb1591c-5a335c13": [ + "Cardiomegaly", + "Support Devices" + ], + "2e6fe51f-e9238ed4-fd5fbac1-85ba7185-da7f3084": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "6a7ae1e7-25818d8d-e2aaca48-19d5034e-df932bae": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "56941204-63c3a811-c32c65ee-fd5dc81e-ef6dc8e0": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "ac8313a2-9e5439a8-e287d978-72c66b71-8d91da34": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "dfa28d80-2c323234-0b53a9cc-fa22a300-37d9a55c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1eaea9e4-ebacb628-fc9a29db-81bd2939-ef1e7fb9": [ + "Lung Opacity", + "Edema" + ], + "e196e03a-34fb9428-f771233d-53d2e101-d419be46": [ + "Cardiomegaly", + "Edema" + ], + "f3dc11e7-4b150e04-7d752508-34486d42-70503842": [ + "Cardiomegaly", + "Edema" + ], + "2cddaebd-e35f201c-ce55aa88-db2ae4c5-ead064b4": [ + "Cardiomegaly", + "Edema" + ], + "2e5d54e8-b4da07e8-382932ca-35a87571-9089a9fb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "2e6dfb3e-077a1f6e-acda6dde-a2c7b986-1e6e0b43": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "d169abca-f4a7073b-db2b836e-295d8b8e-3c68c604": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "19685c5a-8abf83ed-143d0e05-53e3ce3c-d35eec35": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "163a26f6-a4ac3d6b-621c4719-28355100-b2a1f663": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "d8406953-e1473794-aadfa8d2-d7225820-6d7e558a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "1816d50c-d9282769-fd97cb8d-d105e548-27569b20": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "2a262a8c-c8739dde-30e57c4d-800f4b3a-51d54c14": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "794214ee-e57ac38e-8e01e79b-648f4673-7b7f3e7c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "52481f07-4d1746a3-47375a8c-8b8d33cd-ca8e4e96": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "4460b78c-d6c33b0d-eb6264df-74386a2b-371f79ec": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Support Devices" + ], + "c6d3d701-ef841ef6-0a3e111f-cfcd126c-0ebca138": [ + "Lung Opacity", + "Support Devices" + ], + "cb020c62-235d3656-7939457a-45aec9ae-05c91e36": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "4c6b5299-3ebba16c-f51ce5aa-b087e79c-2ac29f2d": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "929b5959-0c447f88-a4f24482-1fa6681b-06dd8ec4": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "540eb477-f05ddda1-09bc6606-ab931f74-e466d39e": [ + "Lung Opacity" + ], + "df3d48c5-8644bedb-ec32e101-8a11bb8b-a32292f8": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "c6fc2f03-81a6bf53-7ffb417f-7915891d-dbe2945c": [ + "Lung Opacity", + "Support Devices" + ], + "0fa9b2f2-d7510ec8-dd44542a-5132940a-96ef2890": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "171e85cb-282b0f3f-e2cb30e8-b7aaa1ca-3e4422d5": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "e5d70de7-1db12ea3-95e5fb41-d5ac6e5d-a9c5b917": [ + "Lung Opacity", + "Support Devices" + ], + "03687e0f-cfea2f97-6062fceb-1c006210-6f147d31": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "f0707946-32499bba-77b6424d-f14642eb-587039a5": [ + "Lung Opacity", + "Support Devices" + ], + "634557d1-cf60366d-474c0152-9a7b5559-72f0bc1e": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "57a0381a-0454897e-b498f4de-dc3d8b24-a305b687": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "0cffed1b-3516a67c-ea383eec-75212689-2620504f": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Support Devices" + ], + "7fae50dc-e842fd35-6c58a208-ebb5638e-085450e9": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "32eb07cd-6dba43b7-858fb880-1a9bc182-6360bd42": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "01eaece3-70d48ee8-709d04c6-967fa1f4-a486c1fb": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "6911b0d3-34d72504-00da42b3-d727c19f-52754910": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "7299f098-d62bc751-9fe83648-b69333fb-38bddb75": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "b642c012-d253de87-93e521f3-9bd69ba7-d7827b8e": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "0b573d4b-fece5236-ea941b33-c752a0ab-b5cfdd68": [ + "Cardiomegaly" + ], + "95bc54f7-4eb1cd0d-b8f2819b-e99ffbc6-f88f04e9": [ + "No Finding", + "Support Devices" + ], + "9b8de5d5-5d6c4148-82f0a118-467303e6-090f6b84": [], + "f1a28150-66237dd6-699fd87a-ac1c6ec6-61f0f104": [ + "Lung Opacity", + "Atelectasis" + ], + "4f4f91f0-b1149baa-3c8f6c73-17a8cc5c-35d6912a": [ + "Atelectasis", + "Support Devices" + ], + "b4099aa9-794a51a6-50ff7979-a10ba3fb-0747eb19": [ + "Lung Opacity", + "Atelectasis" + ], + "e2355bc9-8bf0bfaf-605c4222-bf3592b9-e1259f5b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "3891bb0c-3698159b-42c6500c-2c690e15-10917f35": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "520c4437-7748826c-11a7ef1b-962c527d-41289638": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "add7b9e1-75f87d25-82d1ce6d-f03dbdd8-411ea986": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "d1530705-a5f69e98-247896ff-71e118db-5ed1694c": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "cddeb4e3-ad72632a-69704edb-de0e13c2-5df7f092": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "80f9570a-1a6a4dbd-d3d3dd4f-3318ccfc-5e7afeb6": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "a86906cf-710c164d-b996484a-ac9ade58-dbcff302": [ + "Cardiomegaly", + "Atelectasis" + ], + "98a6b1be-37d7c0d7-9de7d63b-c95bf9a0-17713dcd": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "dc4cccd3-1c855845-e52e1419-7da6cc73-c40f3f5b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f4c4784b-31b99106-b81f1b06-5297ab3a-8cc7ddaf": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "23f6f17a-a4034a2b-950d4852-084a8630-5468ed52": [ + "Lung Opacity", + "Atelectasis" + ], + "c6264595-96860b66-fd1dfa5b-4697f3ba-214d913a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "72495859-c12db810-4238b6ac-b6d8ab2d-76505b30": [ + "Atelectasis", + "Support Devices" + ], + "bcddeef7-b39afe1b-a9149ef3-e8d88304-1afb1754": [ + "Atelectasis" + ], + "c063f72d-3383a805-adfef1af-05414ba2-9eba728c": [ + "Atelectasis" + ], + "a10afb34-5d32bd8e-9d5b22b5-61245f85-3fd12677": [ + "Lung Opacity", + "Support Devices" + ], + "be6da065-d1ae7d5e-8c62d864-d943a731-d9a38c86": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "384cf52b-9692fbc2-b3a9f35b-7afe21a3-e935fdb1": [ + "Atelectasis", + "Support Devices" + ], + "2ff152b9-2b4549f1-9fc64fbd-baf8d8e4-cafcdbee": [ + "Lung Opacity", + "Atelectasis" + ], + "ab2de298-ded88235-d07642c2-25f1fa59-af01ed92": [ + "Lung Lesion", + "Atelectasis" + ], + "1982caee-73cd2f56-0f1d96b7-2b66f5fc-69c0c582": [ + "No Finding", + "Support Devices" + ], + "9bb9ac9f-5c0710a7-9ff3aaa6-12658f5a-ddbe2f3b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1e4cee5d-c0919d09-1d1bf686-1ad1d295-9efbac76": [ + "Lung Opacity", + "Atelectasis" + ], + "a3ebe8b0-1678004d-48fa1d7d-c4d3b940-5f7a57d2": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "3cbd3bc6-39526273-ad8ae42e-93fe3364-f9d21652": [ + "Lung Opacity", + "Edema" + ], + "129c0f80-7fa8ed1b-8e727c10-5561ccda-c6da8c9d": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "a5d9f091-f420153d-6e818031-8ca6c1c0-1694ca63": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "581dfa62-66e36227-8f7c3128-aec0feaa-c7111e6e": [ + "Atelectasis", + "Support Devices" + ], + "c16de941-b2b05208-70b0fc2f-25fbea92-1fab8df1": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "cc9fea15-23116f49-9761558a-ab9901e0-125e424a": [ + "Atelectasis", + "Support Devices" + ], + "d5219b78-e506682e-a67ffdcb-c315cb81-f0638101": [ + "Lung Opacity", + "Support Devices" + ], + "ea461ed9-98d6fcdc-bcffddd8-6b2f85a7-07d19d2e": [], + "6ef62beb-9dc09cbe-d856c78a-ffcdf46e-c41bf566": [ + "No Finding" + ], + "7e9417d8-39dce73b-f1e7fd90-203f64f7-4a1d13f3": [ + "No Finding" + ], + "1cc0f31c-c26b32a8-56b4a45d-21173891-7f6b0a34": [ + "Lung Opacity" + ], + "dcdc908d-8f4a46cf-0dff1d17-7bf04375-a24a33a8": [], + "135201b0-4fcaa92b-4ddb24bd-c100f251-566a7a5b": [ + "No Finding" + ], + "e7e2db21-ec799df0-0b753ec0-18bd24b8-4dba3a00": [ + "No Finding" + ], + "6631d848-2c0cb2c2-f85d6490-f5df355f-11011cb8": [ + "Lung Opacity" + ], + "89d3e1e1-ba4a0822-50e768c0-bbb29675-c5d05684": [ + "Lung Opacity", + "Lung Lesion" + ], + "bd537505-f8ac7ed0-ba0e15df-386c3f65-90c4f4f1": [ + "Lung Opacity" + ], + "291ce527-905f8ce6-f01b0fd5-c7a6f3bb-c126f711": [ + "Lung Opacity" + ], + "4d69cce1-fecc3019-ee62f6c0-dc12a81e-ae02844a": [ + "Lung Opacity" + ], + "57fce1b0-808d43b3-38a72d47-a9e8bb62-3237e1a6": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ba098029-7060e4a9-fd9101e0-40c77d8e-64caa9f2": [ + "Atelectasis", + "Support Devices" + ], + "485dde71-5bdbc563-1574444b-95093d61-c867a5a3": [ + "No Finding" + ], + "b53a5d0c-beb58dcc-f874282d-0102846b-2e781894": [], + "e5c7d198-f0d2cb5b-1ad03a2c-33b67f48-db2dd55d": [ + "No Finding" + ], + "4c2fb727-6b6a721b-befb2d0a-f87fb73f-ee302214": [ + "Atelectasis", + "Support Devices" + ], + "50e94a17-5055c7d7-6d5ad603-3146fac9-dd017837": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "3760ecc0-78f07c86-35dbf3f6-0e19ef2b-b3b6d018": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "5b73306f-64ed83f7-dc6e0957-f8d1a9b2-bdd393f3": [ + "Lung Opacity", + "Pleural Other" + ], + "6cc9089f-10265a3f-bba39a9d-866970ff-caba6304": [ + "Lung Opacity" + ], + "2dc27a6d-9d62459e-eef90f06-12476084-4978f0c6": [ + "Lung Opacity" + ], + "5758677b-81333edd-2eafbc17-012681ec-83ab1ff4": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "f8355430-64704941-eeb44da9-4b52d4e6-371c314e": [ + "Lung Opacity", + "Pleural Other" + ], + "2164992c-f4abb30a-7aaaf4f4-383cab47-4e3eb1c8": [], + "5e6881e2-ff4254e0-b99f0c2f-8964482a-031364db": [ + "Lung Opacity" + ], + "fcdf7a30-3236b74e-65b97587-cdd4cfde-63cd1de0": [ + "Lung Opacity", + "Lung Lesion" + ], + "251055e0-64cd0630-6673abff-5459cfcf-d5ddcf0b": [], + "a6ce7c2d-fed21a45-1e772125-f805517d-1d6ee3e9": [ + "Lung Lesion", + "Pleural Other" + ], + "f924842f-52ef04e9-bc58b54c-f2e44122-e2ab5df2": [], + "8262f308-02a47750-2bb9a31e-35cf7aad-6c5121f4": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "84bda4d0-5f9d3ab4-fe155b80-2e70766a-60672585": [ + "Lung Lesion", + "Pleural Other" + ], + "cd07db17-9e662fdb-84a7a802-661d6b7a-6538641e": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "c2b37067-62a9fdf0-0db4dea8-582680ef-32366c0c": [ + "Lung Opacity", + "Pleural Effusion" + ], + "eca4fc13-1e4006db-4372cf2e-ed001e18-a7050d3e": [ + "Lung Opacity" + ], + "1a9b1d8f-0d8dfc78-0725a750-479c4d47-0c3c4592": [ + "Lung Opacity", + "Lung Lesion" + ], + "31036486-baeed0fa-9092ab1f-bfd77ffe-61e50f14": [], + "56e11632-8f8edcf5-0d7dc0d7-846c7ec5-cfb358dc": [ + "Pleural Other" + ], + "de13dc29-ab4770e3-694cb466-85af8a49-c0778b90": [ + "No Finding" + ], + "efff7e71-8fb08183-a867eeaa-1bf8c237-82103b3e": [ + "Cardiomegaly", + "Support Devices" + ], + "0e7807f6-04937b8e-ac237c79-1200da23-76b0b8e3": [ + "Cardiomegaly", + "Edema" + ], + "a11f2215-35bfbcfd-ab112ef2-f4a24f09-a770ee61": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "3066a927-be47610c-a0348792-a8178259-d9cc2fa5": [ + "No Finding" + ], + "8aeadf93-9670a6fd-2e65b3ce-0719a2c7-d178e34c": [], + "027b4660-9fc20c6a-35de711b-876f0690-f2fcb5a3": [ + "Cardiomegaly", + "Edema" + ], + "11f9c16d-c60a6b46-3ec2ba36-c76fcdca-0d9f54b0": [ + "Lung Opacity", + "Pleural Other" + ], + "2583e77d-666ff867-9384b210-c059e9e6-31c7da01": [ + "Cardiomegaly" + ], + "db368d36-8c00c286-fd73c287-46b788dc-3238c890": [], + "4774bd11-ee7361e1-bd887280-f3a06036-3e636b3e": [ + "Lung Lesion" + ], + "b7bd32a8-4cf22df1-81612a8c-d36d71b4-2787c2b5": [ + "Pleural Effusion", + "Support Devices" + ], + "8a8519a4-3254cb1a-775d799a-d0d1bd38-8b776ba6": [ + "Cardiomegaly" + ], + "099dc924-692466a3-cd889469-1d9dee6c-3a61f779": [ + "Fracture", + "Support Devices" + ], + "6196e104-b79ccd0c-14251271-51dad87b-ef6297d4": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "d2ae1900-b7a31dd8-3a7ff502-08e62dd6-51dfb0e5": [ + "Support Devices" + ], + "cb7831a4-b96e79a9-fb92a40e-661f84c9-35010799": [], + "048b4d6a-b86b868c-e1fb6563-ee782a6c-74a96d44": [ + "Lung Opacity", + "Support Devices" + ], + "8ee276bc-f8413bb2-79639432-b58d2a14-2d9f78c0": [], + "dde26f17-5771e037-b36eaf10-c25c13c0-84dee67a": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "0f33dea2-1c4e6245-7b21b568-ef0299e9-03c0863a": [ + "Cardiomegaly", + "Edema" + ], + "5732623e-81224052-0d0743d5-220e58d4-18365982": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "89761447-bc4663fb-0df82ab9-baf89987-3cefc06b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "5d37e278-47fa9e3a-5fa3bbcf-a9b2cfae-74ed3559": [ + "Cardiomegaly" + ], + "6bcb8e81-3444b4bd-b017a83d-6f0d03d3-dc350009": [ + "Cardiomegaly", + "Lung Opacity" + ], + "bdd612ef-c670dd82-8e5b97e4-82d8c071-20405c37": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "947b8eee-91990d6d-31a05ac0-0f30e40e-c54fedee": [ + "Fracture", + "Support Devices" + ], + "aab40ef3-41eac8b5-ecbddfef-9c04937c-85c81083": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "e2a298e7-794b6f39-1efd0c79-f922ddff-2b8f0010": [ + "Pleural Effusion", + "Support Devices" + ], + "92c14d77-ecf00fa7-99e8dbe5-0a1591ae-be39eec7": [ + "Cardiomegaly" + ], + "cb9dfd59-69a7a57f-254f4223-251e6a00-92e162bb": [], + "3cc05f00-8fba02b7-e911f543-5d48de64-b69bda76": [ + "Support Devices" + ], + "7420f572-8714f401-625ceeb1-4ebcd911-20fe42f1": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "b046c8c0-a7b3367e-546b4f8c-222c475c-98dbe5b7": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "4cd5e5ca-b9936cbb-145c2a62-9eb8aa4c-dc5d062a": [ + "Lung Opacity", + "Support Devices" + ], + "91db5745-87b0042c-4728fa53-e5352d85-501dae1c": [ + "Support Devices" + ], + "eb571dcc-97db82c4-f1e38d6b-b8f745f9-0374af96": [ + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "209500b4-f8bc630b-f0a648c8-da518e7f-ab714f17": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0e94f694-f43b9926-aae6e13a-c3d97e2d-3a975b5b": [ + "Support Devices" + ], + "95d5ba34-c754c542-a7da4947-9dce8e85-e0668736": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "65dcdea0-f39be5c6-c97cef2b-387508f2-173ba1cf": [], + "d162120b-8bfaf7bf-a5c9e4c5-ab6b8617-14987b73": [ + "Pleural Other" + ], + "33d7c4a7-e8bf129a-21ceae38-44747cd9-eee583d8": [], + "802aa49f-a2a5d56e-91eab903-012ba3a8-2bfc4156": [ + "Lung Opacity", + "Pneumonia" + ], + "7a5259b0-9269238e-9b74539d-cb40d5f2-2680707c": [], + "a55b384b-7dd7a06c-b48b46f4-b7522c74-c7f156b3": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "0096fc1d-7c100751-e1c8cb03-c461efb4-1c6b0f8e": [ + "Lung Opacity", + "Atelectasis" + ], + "0d38c57b-b5016fab-3c868031-eac42204-ea570e4a": [], + "2c61f550-b2cf13d5-7166fc86-c7e9e336-2d1f9ae7": [ + "Cardiomegaly" + ], + "2861b26c-2fa81175-590e2970-96ddb7e3-43145356": [], + "e12bad7a-760b3371-e15d9215-21ede9cc-79748575": [ + "Lung Opacity", + "Pleural Other" + ], + "dadf469d-f8a75d8f-24e452d6-a7394bb7-ace0708c": [ + "Lung Opacity", + "Pneumonia" + ], + "7fb0f54f-a18826e9-05962b2b-66a603ac-a0991889": [ + "Lung Opacity" + ], + "8a565b17-188c1777-2d30f26c-e0d5e08a-9669a05c": [], + "84ee4f3c-27c6c5ff-e84f61b7-1ab68ce3-99820e85": [], + "9961f085-b04f7f91-4556e341-26c1f4f0-28e741d3": [], + "2434d6b8-4828302e-7923908c-d6ea3b85-b4cfc271": [ + "Lung Opacity", + "Pleural Effusion" + ], + "a9bee7d5-a1c51732-47596431-51533889-5d29f1a5": [ + "Lung Lesion" + ], + "a8e2d6ea-965ac36e-82736ccb-0acb7d58-32efb51c": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "ac311552-a76f7711-c263444b-9819dc86-6fd39b27": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "b019f6c5-62bfcfe4-13976b55-788794c1-c400accb": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "e2234150-47ef84f5-890d2cf4-8b9741a3-0e9ccc46": [], + "598e45ce-e1207880-a1ec58ba-40195e6f-fc66ef76": [], + "7c90c07b-1bc26a56-953fb718-22a14ecc-13cba6ed": [ + "Lung Opacity" + ], + "a4545835-8e2344ba-657ac4df-46fb4c91-d34c50ee": [ + "Lung Opacity", + "Pleural Other" + ], + "a47d5235-f25baa2b-144829d5-d09c13eb-c45821cc": [], + "88ac4d9d-ea366489-d2c7596b-40fb6489-d3571491": [ + "Lung Lesion" + ], + "cb2f4f2e-e36e5b5c-fabde40d-22a6a15f-4a4b48ad": [ + "Lung Opacity", + "Pleural Effusion" + ], + "a10a9311-c671bfd9-f28b7373-5afea312-47bb1afc": [], + "b85ad152-d351373d-9b33bc0d-584cf132-a45e2d7a": [ + "Lung Opacity", + "Pleural Other" + ], + "3cc07937-2cb3dffb-6e6a2421-e9bdb84b-5ce5879d": [], + "e3592dcd-ca0b0f88-415e34bf-6f5bb257-2502a74e": [ + "Lung Opacity", + "Pneumonia" + ], + "8a6b0550-8fa3b54b-4703a676-db84baf7-e4fe2d48": [ + "Lung Opacity", + "Pleural Other" + ], + "b5564bca-94e03bff-a5bd29e1-970f6aae-fc494e6a": [], + "16384581-f188d696-944e2d78-10472ce0-ba2e73b9": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "9d610a3e-d49aa652-74dee660-f60d66e8-8cb3cee5": [ + "Lung Opacity", + "Pneumonia", + "Pleural Effusion" + ], + "12f2d9bf-89dc902e-a9cd6aaa-22c63b63-c5abd408": [ + "Lung Opacity", + "Pneumonia" + ], + "9cac5e9e-a11f21ce-17358ddc-fe61c0b1-db4019ec": [], + "17799b54-f6da063b-4b089f2b-c496ec31-de79a706": [ + "Lung Opacity", + "Pleural Other" + ], + "78a4e7a2-9072e849-a90eb438-518cd14b-3ea197d4": [ + "Lung Opacity", + "Pleural Effusion" + ], + "33284e5a-85da9149-d0f13ac2-f5decf0b-1c4c6eb8": [], + "fd446187-4918e937-9c58f354-86463aca-af75d8a6": [ + "Lung Opacity", + "Support Devices" + ], + "278ebde6-e46251bd-4f894b8e-3ea1ab66-cbea5d97": [ + "No Finding" + ], + "2ad8c1ee-2b9971e8-22aef719-feb89bce-e6c1aa69": [ + "No Finding" + ], + "756112b0-a6239271-e8d2e395-e2019c21-8bd6a61f": [ + "No Finding" + ], + "8385af08-8516e6ef-1401e3b8-75199f0d-5e5877e1": [ + "No Finding" + ], + "a81e30c1-ca178bc2-f8d08051-953a1ecc-dc75088f": [ + "Atelectasis" + ], + "ae39f4d0-b0da3b02-52929cd2-b6698aad-a681fd22": [ + "Atelectasis" + ], + "cfc2ef1b-a194024a-6147d0d3-6d42379a-575c395f": [], + "ef44cff6-c00bc7fa-7a405dea-28717c25-1b5e3ac6": [ + "Lung Opacity", + "Atelectasis" + ], + "2e02dd1a-6c84da2d-c2df5435-9ac1ab07-f7351caa": [ + "No Finding", + "Support Devices" + ], + "4e3be0c2-0bf7b260-9ee5b4e0-56975598-6b3bd28e": [], + "94f62ec2-b7ecf13f-29fdf3b2-877f138b-7d976888": [ + "Atelectasis" + ], + "200f5a93-8ca89ca4-c8399b9c-c65fba89-1fb40abc": [ + "Atelectasis", + "Support Devices" + ], + "95419952-8b3fad2c-c47446ca-e3485d3e-f3579ca8": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "ae80e1b1-1e1e539f-5e6839cf-76c7451a-19b7e2a2": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "17e49d5f-2581bb66-bff08b0c-021e7e8e-38c4fcc5": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "930d1abf-e069b3d3-a6503794-fe52c8f6-d8c0f1e1": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8c4ad17a-c6ec16dc-137e714a-10dc9541-499191a1": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b5339847-f5e8b983-e6dd50d7-690b7be4-662c8a7c": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d4cbdb29-3fb2610b-0db9646a-e3d99a30-e86e17bc": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5af87b41-8ac7f590-031b4a69-a38adb82-f7413ad5": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "866da04c-e24c3141-42311ab2-6a52b25a-82cf9674": [ + "Lung Opacity", + "Atelectasis" + ], + "2590bcf5-32f61859-59ee1db2-197c844f-fa816534": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b9850dc4-c0036cbc-c577eb21-c259db2c-2d9368a6": [ + "Atelectasis", + "Fracture" + ], + "09c081f1-c1f32700-e71bf5b1-b0dc10ee-1e584a9c": [ + "Atelectasis", + "Support Devices" + ], + "846f651e-365f7937-f8d68fbc-e66be086-ef193933": [ + "Lung Lesion", + "Atelectasis", + "Support Devices" + ], + "cd77c46e-224eaafc-a386ab71-e1f0d17d-b743688b": [ + "Atelectasis", + "Fracture" + ], + "0781abcd-8ed0c5e8-d02c3209-62fc0c7f-21678d4d": [ + "Lung Opacity", + "Pleural Effusion" + ], + "3a031d2f-ff234adf-3d7600a9-f15a50c2-9ed90d31": [ + "Atelectasis" + ], + "5e2bba6f-a7ebbcf1-0522e2b3-7793b872-d91a1760": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "5e56226b-f483939b-5c83520e-f030d297-124a879a": [ + "Lung Opacity", + "Pleural Effusion" + ], + "15c6aab8-93137ad4-74b0808c-dcbcb4d6-580194d3": [ + "Lung Opacity", + "Atelectasis" + ], + "5ca79a92-b19db7e4-7a8243cf-f5fdab81-3b8e4206": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "746e9051-aea1fe10-f765dc71-17daa29f-ae4a658d": [ + "Lung Opacity", + "Atelectasis", + "Fracture" + ], + "58081a4f-fb575b5b-d178ec1c-b8b6a415-24868cdf": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "fa989e12-afbfd6cc-0b346ce6-44522671-dc1518df": [ + "Atelectasis", + "Pleural Effusion" + ], + "9196cf10-d7be030b-9eb57d37-e9f760c5-b583cca5": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "5adb8dc5-cc0be2b2-f5d5f0bb-4a9d8751-64970b13": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "859fa416-f6343ef9-59e07aef-7332f765-4e2be7d0": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "983753d4-6a60ce18-3858cac6-ba36bba0-942df8a1": [ + "Lung Opacity", + "Support Devices" + ], + "95aeb67d-dda857ec-1fa24d4f-f0b7d118-eaf906ea": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "647aafbc-96122ceb-7150d6ce-c281d11c-148e092c": [ + "Atelectasis", + "Pneumothorax", + "Fracture" + ], + "20cbc0cc-b3c8cc7c-20ac42e1-24561590-cdc9f748": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Fracture" + ], + "36309315-d8541009-0bd1a6c7-61a61b57-a33c1b81": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "d395c594-96025cff-7e6af4ad-ca08ac10-032bd500": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4d99cd83-87158c89-8a439fbf-60cb6d75-357df407": [ + "Atelectasis", + "Pneumothorax" + ], + "d10ce07f-f461b9b2-314b3356-7fb190a4-1dac6294": [ + "Atelectasis", + "Pneumothorax" + ], + "1de4e2d6-0112fe2a-07780296-bc4a23d6-fbcc2872": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "09392690-a0fa7fc5-6e064f84-fe8edde1-dc1b88d0": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "7f2e0501-621b2ad0-0969b247-d16c6c18-12077b6d": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f4ed24b7-7ce4f984-cadc1a40-43fde803-53ae7d9b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1b1b23db-a13b7b1e-1cdeca0e-a6d035c6-a4699be0": [ + "Atelectasis", + "Pleural Effusion" + ], + "dff1e4b1-19095040-20f3ad74-e13d58a4-4603b22d": [ + "Lung Opacity", + "Pleural Effusion" + ], + "c78782df-1b7c8dd3-106b9075-7374ae77-130d785a": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2001d733-0290af9c-11d2f658-a475b597-45f1095a": [ + "Atelectasis", + "Pleural Effusion" + ], + "839ef707-03863b69-f7079a97-b5b91539-90449683": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "960b69b4-844f9fbb-2fe99d01-27e23cb6-c4a78097": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "dba61a64-de733cca-c91730b7-7870dfef-c173ffd9": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "0d9ee316-000a9e0c-be78c74d-62923605-0315f8e4": [ + "Cardiomegaly", + "Atelectasis" + ], + "2ff8144f-c833baaa-899af187-89dbc6ce-3adfc088": [ + "Atelectasis", + "Support Devices" + ], + "b25f2936-0120858b-2a77fcb0-43a6260d-c05b2818": [], + "dd3a86eb-069878c6-f4880473-9cc83b95-17983197": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "d1136eed-65e29502-7df50d94-26d66f4a-513b4e1c": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "7c41a809-f93b8fdb-32b0f64f-3c464002-d1751a7c": [ + "Enlarged Cardiomediastinum" + ], + "93df2443-2b80a0f4-6c12dc92-910966a7-3da34ae3": [], + "1675afce-31756f63-a165a417-94a2c4ab-41fa955f": [], + "4e5ddaa7-63711567-067f2a36-70ca8cbf-3684164e": [], + "ba93c845-aff601a7-a7342bac-ad387748-7af110b6": [ + "Lung Opacity" + ], + "2dfbf7e0-85ed2f34-4c60e220-a5f1fa98-464b3ce2": [ + "Atelectasis", + "Support Devices" + ], + "3555a31b-7de6859b-3d2e1279-2c0be9b8-f1030977": [ + "Atelectasis" + ], + "4ad53a55-132d3197-10100b09-48d1f2ba-43059e75": [ + "Cardiomegaly", + "Support Devices" + ], + "31fd8c2d-92304fd6-93dd126a-3ed4e346-c485de34": [ + "Support Devices" + ], + "5c6bee5b-5201ac36-cf58d846-9697b015-29bf9fb3": [ + "Cardiomegaly", + "Support Devices" + ], + "f853039e-e541ff3f-875071bd-62705831-03bd8d9e": [ + "Support Devices" + ], + "7a75be73-77ed1349-e974ef60-e017dcfa-5be7d3fa": [ + "Lung Opacity", + "Atelectasis" + ], + "df15edc0-6b4fce10-50e4beb8-40b31531-05dc3b49": [ + "Support Devices" + ], + "ba22c676-fe74f3b9-b6e53609-c7281450-9f52ce69": [ + "Lung Opacity", + "Atelectasis" + ], + "e965dfde-aaa9927d-fd329e7e-4a8af64b-ed32a2d7": [ + "Cardiomegaly", + "Support Devices" + ], + "2c2536da-bc7670f1-2bbb98a2-e03017cc-87c616ee": [ + "Atelectasis", + "Support Devices" + ], + "dd4d07ba-c78dcfab-fc8fc38e-e425a71b-29874f79": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "59f7b1a5-e3b803cc-ec6d1131-1e8caefd-eed8e970": [], + "659b7656-5c312fe2-6ee7299d-888e06f1-93f4d7e0": [], + "dfd7957a-264424c1-2d9c4a61-2b5aa381-f6983154": [ + "Atelectasis" + ], + "19dfecbd-0472033b-2482be22-f33c01b1-55773ffa": [ + "Support Devices" + ], + "310e9e4c-47270425-45970e01-10edadcc-1789ecf5": [ + "Cardiomegaly", + "Lung Opacity" + ], + "a1c961e5-048307f2-6354c600-52da3efe-47edd590": [ + "Atelectasis" + ], + "b99f0092-64ffe6a0-62facb39-d03443cf-248e9033": [ + "Atelectasis" + ], + "255ab368-f408f0ed-d5ecb47a-e5626640-d14e5c3d": [], + "3f0f5cbb-59b29982-c936c70b-36a6c86d-23da1915": [], + "6d3f491e-b23e2a07-9c9ef1a4-be3b5ffb-8aba0768": [], + "4a819d4e-b5dd0e9c-b31a1805-8e048ace-b2c45a7c": [ + "No Finding" + ], + "a431832f-c2debb14-58876089-dc9b0d60-95e4c67f": [ + "No Finding" + ], + "fd15e7bf-1621a059-9416c9b7-f74f9113-61918f0f": [ + "Atelectasis", + "Pleural Effusion" + ], + "ab680048-8257c201-858ba25c-718b230c-186cf3f4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "8f5a986b-ec1dddaa-36845b94-ecca2b99-b3731cca": [ + "Lung Opacity", + "Consolidation", + "Pleural Other" + ], + "327876be-d8f1de31-424ef286-e890c535-7403b6b8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1a20d32d-56fcb21b-80514db1-d78aa7eb-c60c9bb1": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "8d2b343d-5f569dbe-d6ced9ab-01862237-a2d8520c": [ + "Lung Opacity" + ], + "9e51895a-9f186f5a-4b0a5de3-44c03a40-204d048b": [ + "Lung Opacity" + ], + "5e2919b3-f5b224d9-f8a61359-61a65dbd-1f996976": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b41c2311-0eb8b5c8-4235ebb9-70881fa9-d40cc1d6": [ + "No Finding" + ], + "b74575dc-72fdefcf-956cda70-9feec40f-0ad80c33": [ + "Cardiomegaly" + ], + "6e87c959-24dfa50c-d3d91e0a-70a0dfad-96865517": [ + "Cardiomegaly", + "Support Devices" + ], + "cc283d06-b37e790c-756c5aa9-93a2cc06-a9cd8cf8": [ + "Lung Opacity", + "Support Devices" + ], + "8ead2e2f-a4d30f0e-d6091305-a771d78b-09e4f06d": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "e5f2a417-f5d646ca-33f15b0f-5b7c75b3-2b9611d5": [ + "Enlarged Cardiomediastinum" + ], + "8c410469-6d0fe4ba-0b72128d-15095daa-3e1623e9": [ + "Cardiomegaly" + ], + "8cfadf6b-471b5144-7c37275c-9fdbc51a-041a6f50": [ + "Cardiomegaly" + ], + "46e392dd-8bae92bc-05e946e4-dad0f6d9-5866b783": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Support Devices" + ], + "2af9ca79-64862342-e9b8e6a0-59941e27-f38f159f": [], + "90fa87dc-49b61431-a836524e-5374a6af-d3f50a9f": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "b6a6935d-4971116a-88062d67-ad36e7ac-0fc76bdf": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "6b4dc11e-9327aac2-b44f984e-785cc2bd-a31045b8": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "f3f953d7-e6a719c7-2e5e731b-3181955e-30e32f42": [ + "Cardiomegaly" + ], + "b7013a8b-6c5dab19-f07b823e-d65d3507-a7548d2f": [ + "Cardiomegaly", + "Support Devices" + ], + "ccb23713-fc3403f9-ed87ad5d-f67a8be5-b4067886": [ + "Lung Opacity" + ], + "3f80bbda-1c82f45d-788d2535-2c56bc02-94651d15": [ + "Support Devices" + ], + "165711e8-c8b71f3b-2d2cbf76-dca067bc-f2ba9089": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "301ce3f6-a772d517-7d019547-b8f6d662-45d6850b": [ + "Cardiomegaly", + "Lung Opacity" + ], + "191b0a76-523b5732-5e86b6da-9b402995-a1c02713": [], + "5d9cf85d-134469a1-4ea8049e-fd8251d2-d8281018": [ + "Support Devices" + ], + "2dbc33d8-a5b00a49-a6bfeea2-cff69532-91a4aac1": [ + "Cardiomegaly", + "Edema" + ], + "56bc5807-8de1dc38-a4e70cd4-d8bdcb19-47bf20c9": [], + "4fe6df12-6ecc6b81-5dce29b5-8002ce3e-8a91378d": [ + "Support Devices" + ], + "dce92976-fb96a7c4-c9a1da62-474592a5-98203d87": [ + "No Finding" + ], + "ef98f5b9-a2a8261a-8138e17e-bc61edb2-729d5908": [ + "No Finding", + "Support Devices" + ], + "1d30f209-052f6707-00f69616-22a83b3b-4c38cc05": [ + "Lung Opacity", + "Lung Lesion" + ], + "fe314fbf-50e95159-d593c5dd-390f58f6-7a7cb04b": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "2343dc55-38e48c6b-7156e38e-160821ce-be18c5a3": [ + "Cardiomegaly" + ], + "53a27018-b8c0b2a6-f17c28fb-36c7d96a-9f40c15f": [], + "fee424dc-5eb9208a-f33819ea-2202c264-75ac8893": [], + "a23f7cc0-2cc8da91-5f864f5b-6672534c-98f63cd8": [ + "Atelectasis" + ], + "823ebf48-768dcf19-136b5611-cabac298-d4c7a698": [], + "f9dce1d5-9980fc56-0112f0b6-88e9a45f-48e80619": [], + "99aeda2e-665dd4de-645bda53-e43dbd3e-e3b45e9f": [ + "Lung Opacity", + "Pleural Effusion" + ], + "2c704935-5d71f27f-9a16f96b-c07c47ac-c20f9b2f": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "d6326d09-908b90e7-7f3c10fc-620713fc-4e490c4a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "2213d9b8-a439ba1b-d3c83a34-dffbbd3d-bf4fe01e": [], + "60565158-58324362-cca18ef0-bb2bc393-750737fd": [], + "05f71593-f6c69ec6-4d98e8b5-3c7490cb-7cce893a": [ + "No Finding" + ], + "90e0275c-fdf15b9e-fa00d384-ace49c70-f4727012": [ + "No Finding" + ], + "49e45fba-5b48f519-adb35266-68939cbb-dfda8e0f": [ + "Cardiomegaly", + "Lung Opacity" + ], + "77ecd7b4-59a34a5b-a452c45e-742809d6-884d2757": [ + "No Finding" + ], + "c541b4b9-e18c9d0c-428f0bcd-4b4fcf3c-ca7acd25": [ + "Lung Lesion", + "Support Devices" + ], + "002ec547-39998a44-001fa06f-b2d03591-048c0d40": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "abe364f9-4042401f-a780b2fd-91b32996-dcf7b741": [ + "Enlarged Cardiomediastinum" + ], + "35192e20-d4a303b9-6410cd12-e01e8fe2-3e165f33": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "3fb53bea-f1dad119-d26160af-4b106702-04691d32": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "6b022472-268f6ea1-33a11fa1-55b44ef6-3efa06ec": [ + "Lung Opacity" + ], + "a7086ff1-0170e249-78abab05-8879d1bc-4bf53b97": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "bbeb5006-95cd0d0e-263c6445-ee37f7f9-a48dd6ab": [ + "Lung Opacity" + ], + "feab557c-84c132e2-a4172ea5-87289e6b-4c74334d": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "2f40daa6-51dad1b2-e683d1c3-cdf10946-d37ae69f": [], + "7b6d99b9-abd98664-19db4d28-6510c45f-df1bec18": [], + "2e11d19f-7fd45c8b-fd747233-8ee0a18d-191447d3": [], + "3b4729dd-0500c5d0-6b19652c-b8718761-f7ddbbc3": [], + "4fe5756d-bd504c0e-ec57e8bd-d9d21f15-a2cd65f3": [ + "Lung Opacity", + "Lung Lesion" + ], + "b2dff771-d162bb4b-180d5ef7-ed2022f8-e32ac869": [ + "Lung Opacity", + "Pneumonia" + ], + "a77f001a-2af09f25-bba035a7-1a8b1a02-641eb8cc": [ + "No Finding" + ], + "ad690f59-42c11dc9-609bb394-37809e1b-d91c2652": [ + "No Finding" + ], + "292e260b-5f2cf60c-0422ecb6-9200cc0f-ef9654d4": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity" + ], + "3dd7fadc-472e29be-47a89d67-912975dd-439fad53": [ + "Cardiomegaly", + "Edema" + ], + "02b9665e-286a47a7-edbf1119-14117e3b-ed29a2fe": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "d78cb088-c3cad3f2-7a6176d6-7a4ca5df-dbe9326c": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "573facce-127da328-97902cbc-3447051c-a4dbdcaa": [ + "Cardiomegaly", + "Lung Opacity" + ], + "786239e7-5c2c7f97-0c5c6b36-f8e00af3-91804ffc": [ + "Cardiomegaly", + "Lung Opacity" + ], + "f2795cb8-461db7d5-3a023168-8b1300eb-d418d99f": [ + "Cardiomegaly", + "Lung Opacity" + ], + "65d133df-679e0589-f0e750af-c7493795-d719917f": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "ba840241-39ec80e6-7525149d-a587f345-856f138e": [ + "Cardiomegaly" + ], + "db46fb79-5ef144b5-a30257dc-a364a08f-731905ea": [ + "Cardiomegaly" + ], + "9b89dbe0-e7cb624a-a28136ca-4e93fa28-46f66f22": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d43be646-19f03d73-110ab467-b77f44ad-4f285803": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d89f6431-69df909d-747f1354-8a38a37f-5835e7aa": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "47a73d2b-688c752b-cfa51ca5-f39441b9-830e80ec": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "523be3eb-55688f06-fa67a8c0-a8c3d057-f92ca087": [ + "Cardiomegaly", + "Support Devices" + ], + "4f8a1691-89998d68-1647d35a-65f86204-16385ae8": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "7ab14399-04914a4f-ecbeb632-86169815-b8874a50": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "3ced14b8-2accf862-b2eab013-efdf4f2d-991f75eb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7c70e574-d72b406a-b5eddc73-e53c3242-c9c99c9b": [], + "22592a1d-d2060a7c-1e748138-5ac977c0-0d6a2587": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f66fce26-7c002d5f-2c12f63f-8dd12c3a-92ec73bf": [ + "Cardiomegaly", + "Support Devices" + ], + "d3c16ec5-f49b8c5b-fafc5fc8-41ec9bca-ca28586a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "fb8b94a3-98ec59dc-d148e378-62063c90-58baaa12": [ + "Cardiomegaly", + "Edema" + ], + "3ed3bb4b-239e165f-32a0305f-6e40b696-afdec18d": [ + "Cardiomegaly" + ], + "59f27b42-493502db-176f0ee7-90ba0f84-30b55b8b": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis" + ], + "da9e3e67-02622466-3838d301-ca677b26-64a2bee0": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "5c6e01e3-164c30db-22196724-376748a3-d299a9eb": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Support Devices" + ], + "ffd311aa-b1ad24f7-29b178ef-4423264a-d0298e46": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "1bc3bed7-2aa120b0-65805fec-266c7e92-f3eebc0a": [ + "Atelectasis", + "Support Devices" + ], + "23e4102f-653bff1f-e3b35573-f3e54b6a-472f2c8a": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "306bc295-0e5c4259-e24a442d-9b2483b1-6478ee28": [ + "Cardiomegaly" + ], + "4581429d-cfeddd82-c5fe4954-afb7ecc0-cf292c08": [ + "Lung Opacity", + "Atelectasis" + ], + "cd4c13d7-949c45ee-8508ec30-c9fed36f-bea3a8f6": [], + "e3e6cc59-4cfa69f0-eb73c903-0346145f-f6ae821f": [ + "Atelectasis", + "Support Devices" + ], + "ab15addd-7646ff4c-89b05c13-b4ea8bb6-22be4b16": [ + "Support Devices" + ], + "df381e4e-bf31f79a-d78a3d63-8b19d21e-bf14cc6d": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "4ab443e8-381a282a-dfe41cd5-8edde8bf-72cbeb68": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "185ab14e-f83a847e-3a796c51-6388baaa-a5a1ddf6": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "88687ba9-534e2c29-05f6794b-40aa3d96-4ba80b70": [ + "Lung Opacity" + ], + "e48e959d-10d7b785-3ba7d6d0-87d614c1-19ed06cc": [], + "b90427be-b8e2a5b2-d96a239f-5b791587-230e2fe5": [ + "Cardiomegaly" + ], + "a3c2266d-8b1ffac0-48100adb-18621806-7ba7faa5": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7b714b4a-a32cd9a3-99984154-eacb273a-b64ec97a": [ + "Cardiomegaly", + "Atelectasis" + ], + "41ac266f-165c8df4-32f6976e-54066ffd-f078337c": [ + "Lung Opacity" + ], + "7d620442-deb05a77-a0f55a7e-f9f1d0e1-99509e35": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Pleural Other", + "Fracture" + ], + "8ad1de13-f6b65ae3-08e07682-ee626313-1ac6876a": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "f9af4910-694f5e1f-75e4a512-0bd1c6dc-e4616d88": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9bff71ab-e64fa16c-fb22884b-26584905-9f6b4cb7": [ + "Lung Opacity", + "Support Devices" + ], + "2c64848d-cd007bfa-b3e2c794-d206cd7b-26b4ec95": [ + "Lung Opacity", + "Edema", + "Fracture" + ], + "00005197-869d72f3-66210bf4-fa2c9d83-b613c4e7": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "ad410c7a-46b0ae8f-b391fd24-21364d41-7b5b27f8": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b83f6019-238aa535-591efc94-e0670815-dc1ea130": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bf704123-a17d33d9-d80aaea8-665e04f1-11a14368": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "ff9478db-4ce6ed74-e3b6d8f2-320694e0-e8a21817": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "018a20b6-6f0efbba-f043405f-e1af115c-a30fa5ed": [ + "Cardiomegaly", + "Edema", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "7fa40636-0f1e59a3-7231587d-33eea7f2-79d6fae8": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2004f81f-c16fed11-b77c5bad-b1bbed9b-deb7a14a": [ + "Lung Opacity", + "Lung Lesion" + ], + "741c0b91-5309a6f3-55319d4d-f0eb48ce-cb249515": [ + "Lung Opacity", + "Fracture" + ], + "9428e731-163d993c-618d497c-871a84b1-39a4138e": [ + "Lung Opacity" + ], + "f9a786b3-b5473ac8-3f0d1596-bc19198f-2a6ccc1c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "94afdd5f-dc06961f-690e6029-5a69f579-0be3a0a9": [ + "Atelectasis", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "c4553877-9b07b9a5-f62948cd-a312c9b6-a2980bca": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fb7ca346-c681578f-ca4991f6-03844d32-706f3694": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "078b8107-6b122d1a-325d9a89-33038b55-a20ebabc": [ + "Lung Opacity", + "Lung Lesion", + "Edema", + "Pleural Effusion" + ], + "5e0d77ce-231b152c-108568f2-d7021ce2-2afe69fa": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "33e89953-a3344800-0b12cc28-ae13c39f-f350e654": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Support Devices" + ], + "cb0066e2-7af933a5-97947108-f34228af-7b0bf717": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ed99367d-40622c55-5e8aa563-da1eedd8-50f5284f": [ + "Lung Opacity", + "Lung Lesion" + ], + "f0c7fed9-f0dd13bd-29757304-7d67a895-423549b2": [ + "Lung Lesion", + "Pleural Effusion" + ], + "029111b4-42895f22-a6debf60-499363fc-8506c4b1": [ + "Lung Opacity" + ], + "cad294ec-5e2a00a5-5080644b-2dcc1bb7-3c743d0a": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "8137d98b-e8a60482-a158cc07-096a8d02-978fa0cc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "819e8838-813f6f6e-a6c5d098-e747a8aa-68e03a8b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "86d32dd1-50a12d52-f95eadf5-8f436965-b8669247": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "39922ca1-cb122a2e-5f5f5b94-65973906-45a1b814": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "d05c84b4-68e7175f-6e3d46fb-1d4c825e-be9e4e29": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2d53d7a6-952779d8-cf36815b-c0de03a5-65207ded": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "0fd2483e-20dd0ce1-75329782-17d1ddfd-e4e835a7": [ + "Lung Opacity", + "Lung Lesion", + "Edema", + "Pleural Effusion" + ], + "efeba16b-39830a9e-b70b62fb-3cbb97db-960c72d4": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "50f6f1b1-aa149cd2-0ee5f300-fca11b18-fa515a42": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "b8bed4d3-d993a18e-0991e847-d35ed326-8aebc923": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Edema", + "Pleural Effusion" + ], + "091d7e7b-911382e5-4350f5a9-e20145c0-1c75286f": [ + "Lung Opacity", + "Pleural Other" + ], + "5828d9a8-9cf90a1a-c0941ded-b106d21c-4625544a": [ + "Lung Opacity", + "Pleural Other" + ], + "c998a605-df576475-7a0c7a3f-4e3b3410-0d78cdd2": [ + "Lung Opacity", + "Fracture" + ], + "c1d88bcb-41125f69-0bde8f97-cf27b9f3-3e411312": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "c1f46658-8c56b8e3-70c04ec6-a15e02a0-31c42988": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c949251e-e8d45663-657d2f17-e9923379-934ec9dd": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "ff9fed32-307dfd9e-3f70b114-c9234fbc-6a057052": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other", + "Fracture" + ], + "5dfffffd-68cbd012-f3428c65-ebd2ffd8-57793a0c": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Fracture" + ], + "445b99e9-01f5072d-77cc64c9-359902d0-e84c80c3": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "98e37146-ef23f4c1-ac601a1a-cac4868a-80a0d673": [ + "Lung Opacity", + "Pleural Other" + ], + "4c8cfdf2-2ceef04b-440ed4a3-a43a738c-f031c582": [ + "Lung Opacity", + "Lung Lesion", + "Fracture" + ], + "53c61f6b-13463b44-509c8ec2-1dc260ad-9136011d": [ + "Fracture" + ], + "17c17bf4-5c86a90d-dd7f7b90-cfa93c69-b37cdca4": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0fd07569-5d9f41de-7799b9da-c5f4f7c7-87e4ffbb": [ + "Lung Opacity" + ], + "14f53052-11ab2a27-a1403993-2e146bc1-5263c5e0": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "57900663-30a564a8-c6e7ada4-e124f681-8d66c816": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "f403c773-516b1bf3-4068dd21-67aadc38-513ad05f": [ + "Lung Opacity", + "Lung Lesion", + "Fracture" + ], + "886b46d2-5577e6fc-fe1bb0e6-08228079-9b623407": [ + "No Finding" + ], + "5d3b28e1-1aac3fe6-a4122890-9105accb-061b8489": [], + "4a166e66-b64873d3-ed07d3ae-fc22f26a-6c154a1a": [ + "No Finding" + ], + "b2187498-bd6044fd-89eafb88-63b96bdd-2794d412": [ + "No Finding" + ], + "ea9b867c-c8a2b175-f813e34d-9ae7229d-23ab7c24": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2c6f2019-d5ae3df4-d1020c68-54c72daf-f541b4b3": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "95e57a26-a6de4499-4dddba72-f21f0627-c864e681": [ + "Lung Lesion", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "39c4b238-25f6b12b-afab2399-a95f4e2b-a02239de": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9278c9ba-40c4d99b-db0b63f4-8b124c8f-d092002c": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b758e8f4-574ee6a8-32a4c691-81f94a5b-96a0773c": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "43526336-ec395adc-91956491-ee7f2e9f-5ea5ac83": [ + "Lung Opacity", + "Lung Lesion" + ], + "d131f617-7810bf73-047f6e2e-16347ff4-e18183e6": [ + "Lung Lesion" + ], + "f95e2c77-d318c10b-c5113c5d-455b870e-eb3878e8": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "2263652d-9febb548-c194ddde-3d609261-01889c9a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "75dba8a3-5f23d588-d3d4556c-daef69cf-8ed524b4": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "9bc4f9f8-9a5cf680-f9889b51-30721129-c66aa757": [ + "Lung Opacity", + "Support Devices" + ], + "05e37d0a-c7818c2a-ac8b5b89-0daa39da-c75ec7c8": [ + "Lung Opacity", + "Lung Lesion" + ], + "4ca4512c-5c8f986c-2e3448c0-1b60be7a-6946424b": [ + "Cardiomegaly", + "Pleural Other", + "Fracture", + "Support Devices" + ], + "5105ad53-1db1adf2-24a87016-dccf8db5-acfa42b3": [ + "Support Devices" + ], + "9b21566f-2fa02275-f08686bc-4b67b21b-5dc922fb": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "8c50fc43-5d35a129-85112298-d3630da6-c38d6a1b": [ + "Lung Opacity", + "Support Devices" + ], + "c644ef55-2c1480c0-fa4e0e08-a92b5aa0-5b7ceb6c": [ + "Cardiomegaly", + "Support Devices" + ], + "c1ca2269-888c6d31-99903c19-c02256b7-390f38a1": [ + "Enlarged Cardiomediastinum" + ], + "dae1f21b-39bf30ae-e438eeeb-ff8bfb80-1d3f7d87": [ + "Atelectasis" + ], + "274fd6a9-e8c3359b-7f93bd0b-fcdbb042-ab281308": [], + "3358b4e8-14a2bc35-f84f23f1-d2e9e486-dd707de1": [ + "Cardiomegaly" + ], + "dbb7b30b-ca662a67-5d175671-812f5615-3201e73e": [], + "ee2fe22f-087ea688-eacd294b-68409208-45f2430d": [], + "162f9e5e-d9cee36e-fe144338-a9759990-471aa8c0": [], + "6c2f6c92-9b69f554-597e1e2f-9dcb6129-e9285bac": [], + "69e36e8f-cfe80296-fba1f08a-4b1e0db3-a8ace269": [ + "Enlarged Cardiomediastinum" + ], + "7622b212-dfabb7f0-ec1b5e04-0b2c781d-9fa93889": [], + "d62b71ce-51a1757d-79a7f8cd-a73c6266-19484978": [ + "Lung Opacity" + ], + "37d5e0a8-71e3174e-de2a7542-4cb0ba66-76531312": [ + "Fracture" + ], + "4eaa9013-13662076-d031dfd3-960b744a-51e050fe": [], + "924e87c2-147bd825-9fe46cda-0cd4a1e3-f76f63a0": [ + "Enlarged Cardiomediastinum" + ], + "cff0405e-7c684aeb-122051b9-dec202c9-1dfbb41e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "fae734b5-cdbcad8f-13e2fcaf-8e2731ff-ca43dfa9": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "3c1b3188-06b1d3fc-5436c730-91b7dc0b-88efff54": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "be8079bf-2ab5656d-d2cf6c18-8b9c6ea9-072acfe8": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "de69c335-3914fe86-56f078f4-3b25135d-fc2f5f3c": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e1a199d2-0a67b663-57e4049b-c809b2ac-789cce80": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "232aed3a-74900285-3fa279f4-43c5af2a-e8406c03": [ + "No Finding", + "Support Devices" + ], + "cfc5e042-6a1ddb0b-cce9c058-196b90bb-66e5851f": [ + "No Finding" + ], + "3a00ab90-4563967d-ad46d969-ae884a78-c7f2dd2b": [ + "No Finding" + ], + "d165b008-6569b2ab-6899ea6b-f3f5f10e-481cc0dd": [ + "No Finding" + ], + "5d38b235-8992ecec-2b630078-d290f396-00fdf5db": [ + "No Finding" + ], + "b43f1646-506a2bd6-50a28dbd-2d7d2162-eda74210": [ + "No Finding" + ], + "117eb2b7-898e9ead-83d83cb1-c1bd5852-60ba72f4": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2d4ccede-25c8c78f-2cd4c037-4558ffea-2317badd": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "f43ed85f-f693419c-ca41ad14-854149c7-81bf7afe": [ + "No Finding", + "Support Devices" + ], + "b4ea00dd-29a8687d-10b1e7eb-d6d1cd5b-ebd65d6c": [ + "No Finding" + ], + "e4e80f9c-ef266d33-c4aa87bf-f8071057-a744c102": [ + "Pleural Other" + ], + "38a9b23d-4349cfb4-451a3bfd-346ed01f-b4360327": [ + "No Finding" + ], + "939fd73d-90b151b7-0fd1e28a-f74c0f61-e2cb7917": [], + "01b9b26f-ff910315-d75bbc0e-5d092e8b-30ae245b": [], + "0636d0c0-a771097e-ac0c52a9-9124a5d0-95b0bc51": [ + "No Finding", + "Support Devices" + ], + "076a4be2-5c874ed2-8924ba25-a91078bf-433b46a2": [ + "No Finding" + ], + "63b80213-438bb6c2-4d070fea-92d5e59e-87611ef8": [ + "No Finding" + ], + "df768ec0-58930767-c9b998d4-d99867af-9f1ef7c6": [ + "No Finding" + ], + "fd043f2e-fb851408-681f3799-13b1ec21-5a635d01": [ + "No Finding", + "Support Devices" + ], + "bd752951-5d4e5b88-c3f34820-c9e7fcd4-1d2b4af7": [ + "Support Devices" + ], + "39c36e59-7b5c308e-a9153759-84676a45-4cadadf0": [ + "No Finding" + ], + "e3175ea1-01a77a5f-f7f0522d-d4eaa2ff-222ad571": [], + "705d8098-599ee69b-ab0b9267-00def4fb-b2410a5d": [], + "63d37384-184136e7-97b99c44-25b314ac-ecd14631": [ + "Atelectasis" + ], + "18fa01c7-38307c4a-1dd8c7be-5e380391-098fa83f": [ + "Lung Opacity" + ], + "78abcbc7-6b5aa7c5-013f4e3b-2fd7d3b6-6a5986ee": [ + "Lung Opacity", + "Atelectasis" + ], + "9b7221b8-2d0ff716-48b063be-059cbf7f-d53d72e1": [], + "eaf779dc-f580b7b8-168b1b3c-53ee66c1-21268250": [ + "No Finding" + ], + "77627414-f5a7090e-25aa3533-2b99b3af-0c5abf63": [], + "a025f08e-de9dddc4-8716a1ac-899ce213-d7289c7a": [], + "4e536fbd-1d3c1f99-c3494ba6-918a4177-3e3b72ff": [ + "No Finding", + "Support Devices" + ], + "63613222-d2216c2e-d4ff5b88-43805695-99256e40": [ + "No Finding", + "Support Devices" + ], + "4f1bb588-0dc670a4-6ec07af4-aa421e00-6bd3d8db": [ + "No Finding" + ], + "cfb89eed-31e856eb-8dd16dc1-b7337ecf-1bec8801": [ + "Pleural Other" + ], + "4395551b-f2717eed-fcd629df-804bb762-a356218d": [ + "No Finding" + ], + "b91c97ed-5177ed0b-fa1759b1-28b3e6ac-e518d525": [ + "No Finding", + "Support Devices" + ], + "2a443c5b-911d577f-f0f52f16-9d2662c4-4c3a0fad": [ + "No Finding" + ], + "5c46aa81-80ce61d5-b0876cbf-447acc20-e262c237": [ + "Lung Lesion" + ], + "550025f0-fb28013b-e174e563-a9c2dc35-c3f0b4d0": [ + "No Finding" + ], + "6f0df7c5-cee98aac-b4fc19b7-744a0567-9bae6dfa": [ + "Pleural Other" + ], + "09eef487-ce5f18a5-ba553a04-30f2617c-4f4a6692": [ + "No Finding" + ], + "0e446eb6-02bb584e-6ef1f95a-ad6430c9-f5669b5c": [ + "Pleural Other" + ], + "a8398d17-610399a9-7f2059be-9b8fe9f8-b05f3290": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "e17d84db-087290bd-4a5f8f5b-fa788033-cfd452da": [ + "Support Devices" + ], + "96039f47-3e02e23d-f1c42efb-ed41fb27-4376aa85": [ + "Cardiomegaly", + "Edema" + ], + "526dc590-f658c26e-49300669-427e7124-ac0f1350": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "4ffa9df0-24b7231c-3f67bde1-d9698406-f27658a3": [ + "Cardiomegaly", + "Edema" + ], + "947ce661-ea81059f-7da8d1e6-033e612e-ba93f7fd": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "ec9b16ae-795abbc9-93aaebcc-d1ffbf96-86cc910a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "fbc1d1b7-2217f22b-74904fff-5061c77a-930f05c8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "05f9a070-a4116dd6-f7ba75fb-5e8dea94-59328a7f": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "0fa068b9-b7c538a0-4a745c5f-061c6c55-8c8236ce": [ + "Lung Opacity" + ], + "73d09a2f-e8077206-2a03b426-badcd185-81f46a4f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "308bf948-d05f2a1d-2c32a818-2df09584-d17283f6": [ + "Cardiomegaly", + "Edema" + ], + "c2b22508-19420edd-b20d6189-f63a4ebf-54d99e64": [ + "Cardiomegaly", + "Edema" + ], + "290081ae-b14aaa96-b81a751e-22dc3c33-3be3cddc": [ + "Cardiomegaly" + ], + "5cdfb771-109f66be-85ce962d-5d7f0653-ae3c1100": [ + "Cardiomegaly", + "Lung Opacity" + ], + "0daf3607-6a65b12a-07f528d4-3c472d61-65dbed90": [ + "Cardiomegaly" + ], + "426bad34-c84321a7-37a7e076-e0395dc2-f2a3123a": [ + "Cardiomegaly", + "Edema" + ], + "f83f160f-ac1a55c0-b03c517c-05c99d7e-931e1444": [ + "Cardiomegaly", + "Edema" + ], + "4db0b107-b92cf8bd-4725e810-1ceb5f96-fcbd4d2a": [ + "Cardiomegaly", + "Edema" + ], + "8505ed38-cda52817-295c6f27-d2ba4661-1bba1d25": [ + "Cardiomegaly", + "Edema" + ], + "1b9a76c5-24e784cb-4a768979-edd5e575-042c91a0": [ + "Cardiomegaly" + ], + "a784856b-5e0c40a5-adf5c519-298e21a2-ef3a0062": [ + "Cardiomegaly" + ], + "093c153e-d1acd85f-f43aa2c9-b469c946-c50bed41": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Support Devices" + ], + "97365c4c-68d2ec4d-fbc504dc-02498793-2914b5de": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "5561133e-55a2fb38-51a45d25-98a90295-40203962": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "676f47c0-d614cf37-78b5c5d0-274cd2aa-9d6211ac": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "a0cd68a8-1dc96fff-377965f8-4882b5d1-4563578d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "13abc428-9f713fce-3b977311-23dd2093-f8c0d743": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "69a388e4-94fb2974-fac79369-7a8ffbfd-0331e4d3": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "f5f335c8-148fbc15-8bb36e82-d7f364d8-066a5b50": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "108c4783-1499c826-2bf7748a-8beb06c1-d8a2c88f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2859a69d-3c904620-0563745d-d5b11916-72b1151d": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "a3f94558-fcb3a66f-7b6f0be2-1c09857b-168fb462": [ + "Cardiomegaly" + ], + "6961188b-c38e2a5b-a99c020f-7b1d396a-86da5f49": [ + "Cardiomegaly", + "Edema" + ], + "2b32ba29-3ca9c490-8c578ab7-2545ee1c-8cb9c74b": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "8bd29787-5b4afe07-79a4efa4-193d9424-42eea377": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "b57face8-df2c3c57-2a99e6b1-4919f774-c8c3e93c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis" + ], + "b031566e-064ee571-7c0e1804-9509e4ce-e8c2fd74": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "a43142f0-504e9beb-f5710f72-fb264e8b-1a8d6b9c": [ + "Cardiomegaly", + "Edema" + ], + "2f1dce28-88730e39-d63f2655-c6d7afd5-b3868e09": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "6cd580d7-5ec74248-17b89c75-a4a99d48-97e58fe4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1432843f-fca7eaa3-df3e65b3-c45419fa-71029980": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "25bf2edc-f6ba2b7c-b60cce3d-7f3ba548-0606e88a": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "de92b434-5ef9d4ce-61d1d2b2-1b3efd95-949c6123": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis" + ], + "4729b000-d6aaa9bd-d083ba92-2e9be9b9-072f2bfb": [ + "Cardiomegaly" + ], + "65b85d44-6bcf71a2-508b0589-a48d95ed-d4997747": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "24272d21-fb03bffa-30313063-dcf3be4e-abd43ff2": [ + "Cardiomegaly" + ], + "4ef84da8-ff83a551-31f0aa42-d17ba6a2-c6561835": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "fcbd8e6c-3d25351e-a80195ec-58b15ef8-9c07f9a2": [ + "Cardiomegaly" + ], + "e01e8de2-d5095cb4-f851985e-df9c203c-89326fdb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "e7f7234c-b9fe8996-8a54370a-0914218c-055c2477": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "08081db5-6ca04a17-57f800a3-d1d7d84c-a40861b4": [ + "Cardiomegaly", + "Edema" + ], + "72ce954d-bba45304-05275f9e-44609e77-47dcf40c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "a652c914-9dee6fe8-96a798f8-8450007c-69a5592a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "2a166b16-c5106df5-cf2e822c-23c915b4-983161ad": [ + "Cardiomegaly", + "Atelectasis" + ], + "467886fc-bdd148bc-96415ce2-3ea24428-0ee1d9a1": [ + "Cardiomegaly" + ], + "99fa5789-a4d43513-3a5dfc76-97ec89e9-89cc3e71": [ + "Lung Opacity" + ], + "d8fc9055-45df8285-80757692-6ab96494-af6f56a0": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9b42f01f-2bbe3c2e-1348a6c8-33031532-1a82c013": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "47824497-77e713da-b1f179d8-ecf443d2-4fca0009": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "d9cc9107-872f0471-6fba0396-edc86cf6-6e1a2a4e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "b0b2d70b-d96be717-6c1cbd4c-fcf2bcd9-e8d42293": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "8514ae6a-487dc3d0-b8e0ee76-b3d06968-3aad7ad0": [ + "Cardiomegaly", + "Support Devices" + ], + "9a153253-dcd22d72-b7158f90-d4bc1d9b-ef456abf": [ + "Cardiomegaly" + ], + "b785c793-aaed777d-bf9e5f46-51f74f6e-d5c76d2d": [ + "Cardiomegaly", + "Support Devices" + ], + "57acf73e-ba3f0114-8d77513c-7aee7bf4-4afa327e": [ + "Cardiomegaly", + "Support Devices" + ], + "6a7a8448-ea976adb-343bc548-9a621bc5-db423765": [ + "Cardiomegaly" + ], + "aa1e0882-36dcc79a-eb35cb80-7a299e65-977dc559": [ + "Cardiomegaly", + "Support Devices" + ], + "0b935875-ccc24ae1-ff220578-be4e3835-6acc2e7a": [ + "Cardiomegaly", + "Support Devices" + ], + "d918062a-d0a7bedc-45270789-08ad2dec-e2c2ca87": [ + "Cardiomegaly", + "Support Devices" + ], + "ec32c693-7e523bd2-33c3bc87-53de2670-1aac4956": [], + "6620c86d-6be6ba2b-c1c0beb1-2b89f89b-a0a59da4": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "c3827619-5b104baa-e1895045-007f9978-837ef55e": [ + "Lung Opacity", + "Atelectasis" + ], + "7095b09e-8fea76ab-f2c3c5aa-6c08e75a-0c451ac5": [ + "Lung Opacity" + ], + "af7cf015-dffc91c8-acbf1261-5199a5eb-a18d71cf": [ + "Atelectasis" + ], + "c2402f4a-6c5552e7-e0b4749a-2b88ba69-f59a01a6": [ + "Lung Opacity", + "Fracture" + ], + "ddf73353-2bd13067-b8238f63-0ee1fa88-b917f360": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "97766a6d-6ee96b98-90cacba0-3eb50d93-77416ad1": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "adbfc9ce-b82d1181-fce57c7d-f71a436a-708693b0": [ + "Lung Opacity", + "Atelectasis" + ], + "d17e21ba-cf76b4d5-e90b2776-43be3667-dacf2f6f": [ + "Lung Opacity" + ], + "4ce9e5bc-91147696-d0c4b6cd-fc5ffa18-c485b700": [ + "Lung Opacity" + ], + "927fb781-4f9bc44e-a7fdd883-151703e1-8e450752": [], + "537866b5-4423c6f9-f01223bc-1a4b2a8a-a550fd36": [ + "Atelectasis", + "Fracture" + ], + "f65458e7-7ef7e73f-fea3b7ca-40749fee-38fb4aeb": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "201ac57d-bf4004d7-41445e4a-91f50e03-e786df90": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "829c6f86-9cb29e7d-e8f6a250-91dc2e24-bf216a9e": [ + "Atelectasis" + ], + "dc93422b-fd5ec685-19eb4eba-fb31f8d0-b60d8b47": [ + "Pleural Effusion" + ], + "0fc79616-7e3a9293-c3991955-223e2630-2bf96047": [ + "Fracture" + ], + "fb97dc99-52ef2345-cca09851-57c3d33d-c0fcf34c": [], + "8556763c-b1bc6f79-edf4b821-e6261f21-f1f60684": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Fracture", + "Support Devices" + ], + "a5d858a3-f180454b-311e1427-1b70d6f0-3d95426d": [], + "e8bee7e8-3d046a2b-a495f848-e8247e92-8a180494": [ + "No Finding" + ], + "104e70dc-8a1df46d-99cc3664-72465ac9-c0ca4d03": [ + "Support Devices" + ], + "2a14617b-2d5db3d5-34f04c3f-f0794b78-c9a89f06": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "4774ead7-71b48825-eef17477-bde904ec-11a19e52": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "b5362301-4fdc5dd0-c51d857d-fa8af958-4eac8251": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "b9d07ae5-876bb931-85ce766f-8dc425d4-5948363d": [ + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "30105040-38b1165a-cdffbc34-0acc1b2b-1a69a7b9": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "425d59af-b3a07390-48699ce4-edd9cf7d-3b4faafe": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "af3c9af6-5d5ec7c0-14e485a8-e4a15ee5-cda32e62": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "eb01562e-2c2a238a-fe9ab06f-74e7bb4d-a3352724": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "ffe15776-720f5fb1-efcda596-e36276d8-5e97941e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "515703bc-4c8240a5-4b5d0a83-1f8c8dda-289ce799": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "88d66a2e-11751a81-a9daf8df-433b48ec-34cd1570": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ef97e724-84de20c9-3e73a8b5-65a01e95-2f82137a": [ + "Cardiomegaly", + "Lung Opacity" + ], + "c249e803-7af4d888-0de68b91-d6fda68a-387c0f5d": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6973b010-49ac25bb-d2e035bc-667938df-855b7f4c": [ + "Cardiomegaly", + "Lung Opacity" + ], + "b267e44d-493a0dca-420b4fd5-a91a1026-c3386cac": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "14782ed9-49fc2401-ac349dd1-0a9b89e0-5425836b": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "32f9d0a6-a71c3e37-8285ac35-90d110a9-d3f838cf": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "bbfadd26-26a1370d-69d5f8f9-5b210fd9-a89a0589": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "bba69ee7-df213de0-6bcebedd-77472984-0840a418": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "ede252ee-83066d8a-376961c0-b07de3b1-0dfeb1e0": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "2f01c6ef-54b9b5f8-0f452502-c6cd3871-48a2c872": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bb03b651-512952bc-0ea27cd3-c61b8255-0b80bbb5": [ + "Pleural Effusion", + "Support Devices" + ], + "d1badba1-e01afe43-80c374ea-e81e55b3-ae48bd8a": [ + "Pleural Effusion", + "Support Devices" + ], + "35b21042-72d1e131-7566b7a8-5f8005c0-b27fc76d": [ + "Cardiomegaly", + "Support Devices" + ], + "981f5956-9dbb9f69-8b7bbf12-b872f7a3-16f09cf4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "fd10e506-04541266-88f11cc7-b24b4822-8cf8bc4b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e71f51f3-72341a6f-e930d575-66d2c3ef-339886c5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "3920cf42-8cd1362b-cbe6eaee-518b1fa6-a7358a5b": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "641cc7ad-8d3dc0c6-ee97f6e1-7bf62c19-d12ac7bd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "e8149721-c9e4afbc-7a9dde4a-3c9f7362-fec663a4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ecc315d7-39f7e590-405c1a1f-5a8f026d-560ba339": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "928a3662-7a9bc2d9-1808833b-79fd5d7b-76aabf9d": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9ae19357-ed8ab74b-7c794e86-235ab6b4-b0b98b54": [ + "Cardiomegaly", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "42fd3d74-fe3267e7-82ffa036-96225174-327660f6": [ + "Cardiomegaly", + "Edema" + ], + "650a92b6-c884c405-4d8cdb97-6cf12826-c8542d57": [ + "Cardiomegaly" + ], + "64c99cbe-e1457ba5-58d940df-68b406e8-2a430fdc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "6f3ad43a-df5c6fdb-9ca593fc-13d161a4-8869dd8f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "2501dbf9-714acd96-ca4fba08-e02967b8-23f99f37": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "438f1b70-14b9e3c9-bd4e7c92-e6463ffc-e5aec56d": [ + "Cardiomegaly", + "Edema", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "2241b085-d8b05d1d-b5f91fce-e5b5e662-4e27dbc6": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "28674cfd-a09cd562-c2ee2007-8a9a2145-bc7be12c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bc28ea67-0dc950d7-d5c81ea4-c8640ac1-e0a88e8d": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "178a003a-0d5784da-664f8272-6c14ae7b-135dfadb": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "829a5c44-1054e6ae-d8dd4131-14a36ac3-9bc1fff5": [ + "Atelectasis", + "Pleural Effusion" + ], + "f4c84687-90ca8c27-94ff047f-739ca07b-e7f169d4": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "78de0f59-b436260e-9d46d449-56c7de3b-ff3655cd": [ + "Cardiomegaly", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "3c2ceb4b-9a71f26f-29f23ca1-471edb79-e24b6136": [], + "81eb6942-d0732528-e744f159-3b407680-818991c9": [], + "7dbac337-f4c37957-531c7433-82c70080-8a9067d7": [ + "Atelectasis", + "Support Devices" + ], + "a1746ff2-d1af8629-93c25ff4-e7d87c86-532f4829": [ + "Atelectasis", + "Support Devices" + ], + "b6d9d032-070a55f6-660fd17c-1cb8442f-68a5b3b9": [], + "c9411698-f64564b3-5ea07940-87d583ad-154d647b": [ + "Lung Opacity" + ], + "035b3c94-500ee35c-10e923c5-3a5a2324-348b48c2": [ + "Atelectasis", + "Support Devices" + ], + "2689618d-d2d66d76-59bc106d-e3cc0c85-91cc995f": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6fef2911-a06fa6dd-c764a4a5-f0d84931-368a51c4": [ + "Atelectasis", + "Support Devices" + ], + "a3b5f140-09ecc379-5729bd0f-98abe246-f9eea2ed": [ + "Edema", + "Atelectasis", + "Support Devices" + ], + "22a3477a-665567e4-137b590b-c2a27bb8-d03b7d01": [ + "Atelectasis", + "Support Devices" + ], + "37f7e3ca-93ef1bc3-81e615c8-a061addd-3a3b6dbf": [ + "No Finding", + "Support Devices" + ], + "1ab129c3-79b49414-0d5287c9-5e9ab48a-b1cfae33": [ + "Cardiomegaly", + "Atelectasis" + ], + "51980c98-091b1da9-b7d824b9-3b407488-372f984c": [], + "a69bfb99-6db10b12-ba4c0c04-51f5d6ea-ecddb834": [ + "Support Devices" + ], + "8d15d949-caaa05f3-1811c857-a95fc3d0-6bf995b2": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9f88a220-973e2475-25bf2e6b-501e99f4-65c4c9bd": [ + "Lung Opacity", + "Support Devices" + ], + "e13035e9-35e026e1-d7d54018-e342a349-93752c81": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "cfc3effc-853804f4-6aaf7cfd-374d7078-6e586d77": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "20926ce7-7b3d87db-c15f0a3e-556e3a75-1c54be6f": [ + "Atelectasis" + ], + "2d5f73c2-9a6138e2-d33b6539-067b7734-2b55b088": [ + "Support Devices" + ], + "9fbb07e2-d260dfd7-0f8132b6-c8b2cabb-6745996f": [ + "Atelectasis", + "Support Devices" + ], + "e18e6623-ee725070-b05a75c1-a11fea0c-9d3f0868": [ + "Lung Opacity", + "Support Devices" + ], + "7a56c5a4-63fabea2-e65cd08b-42dd34c4-a1867f86": [ + "Lung Opacity", + "Lung Lesion" + ], + "d8636464-5f2a7803-d01b947f-b25511ee-90c037b5": [ + "Lung Lesion", + "Pleural Other" + ], + "9a198bd3-5524b831-8a16ec0d-1488ac1c-9d60aadc": [ + "Lung Opacity", + "Lung Lesion" + ], + "aa615bc7-e32c0c72-a1f0ee3f-0a7f4a52-5e7078c2": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "5ecd8878-ac3a84b5-6b82b286-c4e20569-9b9f5df3": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "13ff8a8c-4278aaf8-04c02c8e-0a45b72a-3f9dd86d": [ + "Lung Opacity", + "Support Devices" + ], + "4a04164c-bf7a47b2-39273bf3-6f841e34-278431eb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "93b9fbec-d0096ef4-0f25a638-a44849a5-58844ba5": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "ae716843-fde7cd99-a5fb83a1-9d5eb9d9-ffb02e30": [ + "Lung Opacity", + "Support Devices" + ], + "1f7d224a-19e6cfa7-5627f007-83212a22-be1faf67": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2903a316-1b126454-7e0b846a-69d68d8d-3ad19da0": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "48196050-c2ee8146-8c4ad047-a5c48df8-6412365d": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1fcd995b-1ec680c3-bba45110-e0430c14-bc44fbde": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "2bc6a85c-e37491cd-8408dde1-e5061580-b890fc2f": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "032b9a1a-f727fa4f-786f80a0-cdbfe259-f1a9f763": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "0b2a65b3-ecee8e88-e18315bd-e36c3b31-2673050b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "5051fc01-30c7f31e-a08187d6-28940c33-8ba36cc3": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "ba3fb88d-d17476f9-7e265acc-3818caee-7fe0f04e": [ + "Cardiomegaly", + "Lung Opacity" + ], + "bbbda37b-a4c5358b-a7bc0bf9-c4eb7ea2-7ebbc0fb": [ + "Lung Opacity", + "Atelectasis" + ], + "b50c5a50-2713d6bf-b6a084a7-d2b96375-54cc29d2": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4bb046fd-97a72e50-21955713-67e2c1c0-ee97bbc4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "5cccf2bd-bfd996be-96074827-f468cba2-16a37ebd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "3fcac1c0-7afa558f-f51df555-3ba02f47-ad17da4f": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "ce0eeca8-194e6434-1bfb6524-16939184-98a84525": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "efea65d1-1ef297f0-129ff6e4-c843bd43-2db0b71d": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "1585b079-3c16e696-8466896e-42ade4b7-3bc6686f": [ + "Lung Opacity" + ], + "804b2558-1b928d2d-a41b4959-275e9da9-5ccdeca5": [ + "Lung Opacity", + "Lung Lesion" + ], + "5ae25c72-34cb9d49-a4da40d2-b675e012-73e45602": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1b6cfbee-901f801d-651c11f8-2c84bb31-91883814": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "57f7f75e-91517fb3-4071303d-6f325ed5-5daca800": [ + "Cardiomegaly", + "Atelectasis" + ], + "d51e424a-a44ba612-1f92bcc5-32008577-36bdedd0": [ + "Lung Opacity", + "Pneumonia" + ], + "97e98c24-079ba543-3cfe0fbe-b97b30b8-bbd0e9a5": [ + "Cardiomegaly" + ], + "b6efc4df-c96de5ed-5551d21b-f99936ca-082ca79e": [ + "Lung Opacity", + "Atelectasis" + ], + "081b6db8-da3b5047-573fbc16-9aa955fa-d35d3cc2": [], + "88452747-3f314c21-22193cd6-21965317-a568535d": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "dd7b0ab6-fd3ea03d-b2a70c10-5eca94a7-a74d42be": [ + "Cardiomegaly", + "Lung Opacity" + ], + "76e72399-4ee134f7-c1d4538e-8c0a7451-bacc3a48": [ + "Atelectasis", + "Support Devices" + ], + "68adee87-49f72ff4-e7374407-bc547b35-ff118ba2": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Fracture" + ], + "79efe8cb-356ec1b4-23153a48-35b3a64c-40e70a3a": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "647c3bd0-6e8ea0e4-e367edee-d6eefb00-174fcf42": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation" + ], + "01994677-4cf1e7e3-d8b77337-b9e6e43d-e2b0bf7d": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "1404cb7d-9f235a77-48962ba3-bbce9034-07178c1b": [ + "Lung Opacity" + ], + "e5a35d58-daafa26b-836bd682-17f54c3c-a3f33527": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "41f318a8-7cfeafa3-86187822-84d18ca4-153b1ecf": [ + "No Finding" + ], + "44fd9408-57bb7612-99f6002c-71e76b77-a2040d14": [], + "503c3e2e-fdb4d0be-816c24b3-5fd7d8cf-d0f61456": [ + "No Finding" + ], + "88f5aab2-59d65dc0-384b49ce-d7a62771-3c098482": [], + "f1096194-814152f3-c5c14405-305b19d8-0d4eaffb": [ + "No Finding" + ], + "fb713bef-44a802dc-179def5b-4baaedb7-991610c2": [], + "0c5f56c2-3d707105-b36af285-88d0ae60-48ef3fda": [ + "No Finding" + ], + "d18abe57-80923646-8d3f05f6-dafedd8b-289ed541": [], + "70ad5a5e-35834f2a-a5619c1e-5deaac58-b6657063": [], + "c3fe2619-5e9d2145-d9f7ccdc-a0bafc7b-6cf0c98d": [], + "176e0588-2fc59c9a-096765cc-a04685eb-e860762a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "a2958de9-3f5b2b3e-0f868adb-1bfb09df-e2f90c3e": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "7cd49c7e-4de451f1-91d968ae-81143d7e-0b2dd70f": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Fracture" + ], + "912e2ddc-d5d8cb35-d2736bcd-4a25d08f-ee68cba1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "28737f0b-1389eccb-3debcb12-da4fbf04-3401a0a4": [ + "Cardiomegaly" + ], + "b68832f5-cb74ec26-125ffe9e-4e092765-e97f8be0": [ + "Cardiomegaly", + "Fracture" + ], + "d3ecfa7f-1a24312c-7a107e83-9ee0345c-edfe5bc0": [ + "Cardiomegaly" + ], + "970d5ff8-d0f488b2-37ca618a-69482663-8f926491": [], + "98267606-76ec973b-5884e28c-692b590a-093841f0": [ + "Cardiomegaly", + "Fracture" + ], + "8623cf71-596099ea-2245cb58-0c69238a-3a539886": [], + "c84b7521-c75b5b52-ce5dc9c4-ec6fb779-a69ee6b1": [ + "Fracture" + ], + "fa62fc78-9b66c0fd-aa7ee648-8b82e0fc-b0e5c0d4": [ + "Cardiomegaly", + "Fracture" + ], + "3457e40c-876244f2-a9b678c4-5af63665-49377d02": [ + "Cardiomegaly", + "Fracture" + ], + "9fc531b0-1d7cf4cc-5d546ca8-622147cf-ea7ac035": [], + "5c2bf1b4-d3738135-b0f5cea4-bfa67dda-166feb65": [], + "f8622643-cc231ab1-f33d7f64-a7531ebf-5dc5e7bc": [], + "fbe66566-622475b1-f1e0f2cf-bc7f5c85-440be008": [], + "77986392-2dac3752-b145c42b-2ba010de-d49de562": [ + "Cardiomegaly", + "Lung Opacity" + ], + "89318934-c9420a56-2169eec0-c8c097f7-8b4b07d6": [ + "Lung Opacity", + "Atelectasis" + ], + "48a254ba-4d6ccab1-b254dcf7-a7f305bc-9aae746b": [ + "Cardiomegaly" + ], + "64445cbc-ad80926d-3cf56f35-73f41b87-cdaaf288": [], + "08b3a2f5-6a4527a8-cea348a9-b559b9e1-42a62261": [ + "Lung Opacity" + ], + "2c87ed37-9ea15e9b-216843bf-c06c0554-220563a4": [], + "010af5dc-c4d6194d-4922ccd6-543af1d7-30fa1a21": [ + "Lung Opacity" + ], + "493ad888-c9901b7c-919b136e-9d112af5-69cb1ae2": [ + "Lung Opacity", + "Pleural Effusion" + ], + "82d144fd-f088da1b-377b3165-5f6cfb78-e3e4ae80": [ + "Lung Opacity" + ], + "7954b023-74e12365-5c4fbe43-07ef3edc-a3caf1df": [ + "Lung Opacity" + ], + "c543503a-d329c7f5-3ba46412-93119de5-6da48cb1": [ + "Lung Opacity", + "Lung Lesion" + ], + "519f4481-6aee1c53-394dccc4-d527eee2-05f59923": [ + "Lung Opacity" + ], + "80d40ef1-bf5479a7-9262dbfe-00ac06d8-9ee348b1": [ + "Lung Opacity", + "Pneumonia" + ], + "84c1b3da-67a19397-d61bf966-069c630f-75a2038f": [ + "Lung Opacity", + "Pneumonia" + ], + "a1131f36-adcb21da-daa393cc-f694cd63-a9cd3696": [], + "fd15a691-c9a3b644-6c5f2cce-8d81a9f7-8a6dc366": [], + "ffc87b00-0815c74e-636e48b5-42d8bca2-443af381": [ + "Lung Opacity" + ], + "4ce5f937-028fec9f-43461f2e-d08533d0-3ceee93a": [], + "6bee882f-357d1846-ca771638-0a877fc8-6d19d615": [ + "Lung Opacity" + ], + "902a9e67-b9f6b648-6467300b-eeb19d52-3cde1ad9": [ + "No Finding" + ], + "0bfd31e5-76a7abb7-f9651ef5-a73bef92-57c65fd2": [], + "5508a85f-2f9f244d-d22cda11-0527ab51-a15d5058": [], + "878ffc5b-fbc8c37b-45a5b548-6883c9d4-5fa06364": [], + "2cf0b01a-317bdacc-77b6a3d0-b6f5785c-0d3b681c": [], + "add3012d-cb9d632f-ad7fd05c-a7bc8640-4c0eccbd": [ + "Lung Opacity" + ], + "cd202e14-5a239c8c-8bba8f71-28fcffad-3ee8715f": [], + "7358c522-a008ba73-ad82f64d-377361fe-34cb3b0a": [], + "a36b6547-7657514f-27474c2c-242b74c6-348f068a": [ + "Lung Lesion" + ], + "a7f13ec9-849ac14d-c01cebdb-4ec75cc0-3f0f2ca6": [ + "No Finding" + ], + "7c32ce35-7b1034c4-629b82bd-91ec7754-06210160": [], + "93ad1f3b-e27d8070-8b21fc81-09c13461-bde10e1c": [], + "976273c3-1fc9e5d3-58b68382-bc1ee192-ad4bcbce": [ + "Lung Opacity" + ], + "9f865621-5dd659d0-1258a722-ddb9a27f-f6188299": [], + "a9a7d29d-d6bfc7f0-0cf3ce22-1a6a9dbc-1df52ce1": [], + "15a43747-b7f52373-15c7623d-8ec7b6f7-c1fd59aa": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "35d6d97a-9cbb9f6a-78b7bf1d-f7a49df3-fa17a2b5": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "f92f8eca-d4526790-a1842ee9-1c5b4666-a0e18256": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3beddebe-77318989-f0a94514-750bd4e3-c009749d": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "9f5b44e9-6f162589-6533517c-f73c712d-9cef61a7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "97e428ce-51d4215e-210ed55c-4327be47-4a10e46c": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5e861703-66367757-f8a458b6-39741594-3ab89d41": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "a767b7c0-6bdaee42-8ca0cd60-7b89ffb1-3bbbba27": [ + "Support Devices" + ], + "8c9f9878-cdf131fc-776baece-6baeb337-8c4c2b2a": [ + "Lung Opacity" + ], + "bde00ad6-316f9e7b-90b2bc93-a51cfbe3-8ca2cefc": [ + "Lung Opacity" + ], + "0cdfb937-27e0834d-4d8d1c40-cee9e187-98390c95": [ + "Lung Lesion" + ], + "dea1e00f-36525922-d0518f15-1f6a94ed-0a385fad": [ + "Pleural Other" + ], + "e1b1e9b3-4c57d726-b37866dd-872d5448-027a7484": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "6a53a787-2e1025f2-59359f42-140f8938-45899305": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "495e73be-71f5ed15-35bbd67d-363dfe60-32f375b6": [ + "Cardiomegaly", + "Support Devices" + ], + "bed7c512-ac375506-2b7022e0-a8e257bc-dfe0c8c2": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "6d6562a6-7ea28cc5-3b671652-a8edcd23-b3925dbe": [ + "Lung Opacity", + "Pleural Other" + ], + "799f1b32-f3940fb2-dbeeb4df-7ce165c2-1f542825": [ + "Lung Opacity" + ], + "eb48e944-d1f04023-e3dc8926-7ddd1131-a91ef09a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "2cdf54d6-df90d07a-cbaaa135-454278cd-ffe7eb4e": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "2f0868eb-1a137784-02208ca9-db04ed1a-dfd94665": [ + "Cardiomegaly", + "Lung Opacity" + ], + "a2999df0-0ac91672-f73db8e8-82a07414-44b0a302": [ + "Cardiomegaly", + "Lung Opacity", + "Fracture" + ], + "5e2d7a5c-0cca16ec-3dff48d4-bab26e70-6bea7f6d": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "5abbfd91-57ab30f3-231c4823-f55fbfa9-5d5300a8": [ + "Pleural Other" + ], + "d4c589de-03abd892-c6db54dd-d076769e-15246646": [ + "Lung Opacity" + ], + "f2029c31-2acb877f-a7000d23-c119d2f1-b5d4844b": [ + "Cardiomegaly", + "Lung Opacity" + ], + "2921058d-a6fb076d-8bb4de0c-d43e5b8d-1e91708a": [ + "Fracture", + "Support Devices" + ], + "bdbdde19-6dd4e8f3-1636aed1-04e54b76-0009a601": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "a231b16b-dd2f002a-f99f05d9-20a0f431-bbeee698": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "2a923a58-e0c657c2-744b16dc-7e0c1d5c-5e08e49b": [ + "Lung Lesion" + ], + "41452399-c1ad7798-f6b82bec-04239f92-3d1db04e": [], + "3de6e01e-157ea365-d2474e3c-ab60b297-9e6bcadc": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "1b48006f-f8f13edc-fd0058bf-d9276306-8fa23ee4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1dfc0e48-5089885c-04550c95-ad10c948-f2488a05": [ + "Cardiomegaly", + "Edema" + ], + "904cf86f-1866f68d-e860512e-9cbe3c9e-f9c32a56": [], + "b2cda6f3-388157df-c26cec82-28b37970-af315339": [], + "df7b8cfc-12798a16-4d5f66d6-63417bad-c5e6fca0": [], + "3309c1ea-ab3bd4ee-d7677769-da248132-c26d7c02": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "6751916a-85cc83ce-8024460f-6330011b-248ae148": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "2fba7496-4ddb5c26-026164b8-c3e4e111-e43f94f9": [ + "Cardiomegaly", + "Edema" + ], + "38b3b47d-6984aed6-acb1ea60-2c93049b-1ccdfc91": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "e539ba13-0f60a2b9-c5777304-ac5661fd-236f33a8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "754c8b94-ddf3a484-279e5c47-973dad5c-3e52b57c": [ + "No Finding" + ], + "293ccf0f-bbec782f-8f4cd724-1cb95930-9e395539": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "b128a59a-4eb90799-c8564692-8e582714-82706ad2": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "3ecc5fc4-ddb10e6d-149d9bc0-0e810143-adbc6d0d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "de9e7463-d51a6b2a-2601990d-3ca399d2-0f7a8df4": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "c536f749-2326f755-6a65f28f-469affd2-26392ce9": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "46c161c4-0cac1236-ec95dd28-d99eb016-ee9a344d": [], + "91031e5e-6f1e3df2-774ccea8-0e77fbca-e12d0749": [], + "ae4c91eb-797ef162-94445cf7-b657d732-2344c20d": [ + "No Finding" + ], + "b06d47bc-8181cd72-254ab8b4-1731873e-41b7aed5": [], + "0d200bb3-f8564775-b6f65f57-a21dd9b7-d25d90ff": [ + "Lung Lesion" + ], + "d01b1c8a-5e5fa2ea-a11bdb6b-851bbf73-ce6e2ce8": [], + "b7d5d87f-d26475b8-59e5abac-b1142fa5-4071124e": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "d8b6b619-9e181de2-c46adb2d-08194ead-eefd7108": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "9ce5a44f-66532667-66a23383-cbbb4b96-4a927036": [ + "Cardiomegaly", + "Edema" + ], + "5cfc2922-68cd176a-e182b4c8-e74dd44c-0ea44344": [ + "Lung Opacity", + "Support Devices" + ], + "8dc7bad7-d7cdbfe7-7231abb5-65e3168d-12e734c2": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "f3627f06-7f8dc376-299731cc-3607780e-44c820e4": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "5b544b50-6b9fd2e8-40331062-6eea2423-c6427c30": [], + "5fdb7189-ead5e2fd-71a6d19b-3862ce63-28bc762e": [ + "No Finding", + "Support Devices" + ], + "19c60eb8-3699971f-b058c7f4-9032d4a4-2b586b3f": [ + "Pleural Effusion" + ], + "7fae1179-39697856-a9795bb4-19feb4f6-b065f924": [], + "210f9c01-9e0728bf-4b8ec9bf-34d1564e-16cf509c": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "56888581-9346fc34-c18707cb-fa38bf32-7ebf29b5": [ + "Lung Opacity", + "Atelectasis" + ], + "b0654395-dbeb03af-4e4e7a27-a9480bb1-e7c9e462": [ + "Cardiomegaly" + ], + "f11d267a-fb7c10b3-abbbef5e-66e9412c-99b8c90d": [ + "Cardiomegaly", + "Edema" + ], + "feb9d62a-ce4bfb3a-c84f7f64-ee3213fc-bb09bac5": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "edbc95bb-75d52166-1e3ecf1b-24889c9f-9598b9a9": [ + "Cardiomegaly", + "Edema" + ], + "2f2f5511-1fc4dccc-bbc1203a-f97f7298-b099de12": [], + "7536f4a6-1fbe0f20-f19b428c-ed5f66a2-68198980": [ + "Support Devices" + ], + "325742c8-9cb60d54-750e1c80-c2ee97f6-0c6d0555": [], + "5d18a76c-dd25b2c6-796e4972-0c023664-6bc9eff8": [], + "f9d601d7-0eb2306d-2e66934e-5db0f766-edb49564": [ + "Fracture" + ], + "3352c0d5-7f41c92d-b1178750-7dc794c6-979ffba3": [], + "5c405616-b5fff6d3-129d4fb2-eec829ba-52e46d92": [], + "8b60991f-624bc875-aa844f68-060004c2-1fdd9628": [ + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "9cb7472a-803c242b-a9526718-19d7b53c-e332df01": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "46f5be5f-70e3e741-542f6fde-edbbdbfe-a4ed00d6": [], + "603ec26c-efd8dad7-d9c3a4d2-f402b7a8-8b3ac5e7": [], + "a0c83599-da2ea7b7-03944f49-45a6b253-31fa3b34": [ + "Atelectasis", + "Support Devices" + ], + "b4a8be85-cd2ddd78-71d33835-f50791b5-18321dcd": [ + "Lung Opacity" + ], + "bffeb923-b2e49523-b66fa14c-e5d62eb0-93afffd1": [], + "5cecf989-3c537ad2-d38c50a6-2ca6b9d1-743a7756": [ + "Support Devices" + ], + "8e1f514a-b9de86e8-aed555ee-edadacd9-83b66b39": [ + "Support Devices" + ], + "4ad176c8-58423813-962a8a34-f69b1128-601e483d": [ + "Support Devices" + ], + "5f4fdb1c-97aed97d-fa4a3b1b-9da4ea33-e9df38ee": [ + "Support Devices" + ], + "378d7d48-0cfa19a3-361e40d3-6bd71394-bca64527": [ + "Support Devices" + ], + "cfec6d9d-4bc06a39-db51e654-c78ce642-16ef1ae3": [ + "Support Devices" + ], + "368e1359-16b72e82-b25bf830-5ec680de-693466a0": [ + "Support Devices" + ], + "c02bdcc0-549bf4f3-5f78b267-f547a2ea-ad315318": [ + "Support Devices" + ], + "5e6a1e77-fe7d7c1c-14f0897f-85cfc35e-7b7fd799": [ + "Support Devices" + ], + "e45c6a11-ebe8234e-5ffe43e8-8a9541f2-5aa0dd77": [ + "Support Devices" + ], + "368f87de-9f5ace1d-685ab2ab-845aa8b8-5fd1e2ed": [ + "Support Devices" + ], + "4dd16b7e-2f2d14a6-589fa0e3-f24d8230-874d3c21": [ + "Support Devices" + ], + "27e83fc9-b156bdac-0ec31eb2-21403864-d2def4c7": [ + "Cardiomegaly" + ], + "cd986c7a-427ddb9f-9727cd08-4715c210-8b6ffc50": [ + "Support Devices" + ], + "5764a70f-234a5a0d-42ae4b8f-b130f5c4-63dac3a1": [ + "Support Devices" + ], + "90e7de93-7268a4dd-a36fe8e3-1e1f27e8-323287bd": [ + "Support Devices" + ], + "bc34419f-ff9f5a7d-e909fa2f-7f6b33c4-80d138b8": [ + "Support Devices" + ], + "0240c2bd-1a2d54ea-8ccdf075-26529d30-cc00fd94": [ + "Support Devices" + ], + "1d56c03c-9a44b66d-4d418b85-94c243d6-acd00b8a": [ + "Support Devices" + ], + "1e7e7b71-9afe22dc-51aaf15b-79809a2a-bd5d192d": [ + "Support Devices" + ], + "59a1c5a9-add53af5-92d508dc-a3090850-83abe863": [ + "Support Devices" + ], + "be4aa5f6-99ccaf97-2b5e3e91-41ef9449-536d6ae5": [ + "Support Devices" + ], + "4aca5ea1-07090fd9-54d40886-49f3c33b-56925430": [ + "Cardiomegaly" + ], + "9844f097-34ee5bca-c0ab33dd-1b830d21-0df9b00d": [], + "1b969967-88c2b36b-65da30a7-644c09d3-96356c51": [ + "Support Devices" + ], + "5e06f576-00f63575-732b3eac-a525f7d2-9355ee5f": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "bda348c8-c2a90c97-af289a1e-0d1b064c-564703d7": [ + "Cardiomegaly", + "Lung Opacity" + ], + "694f4d8b-a3f0bd59-596ca105-6de49d58-7de152c6": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c9696dea-5c1429f6-f7f379f6-a8b0af2c-8d29d931": [ + "Cardiomegaly", + "Support Devices" + ], + "10b7a5e0-c721996a-b5046563-dd86ee1f-5d1caa58": [ + "Support Devices" + ], + "9d933eaf-cb9eff2b-959a2879-3cdb1930-8f80cd45": [ + "Support Devices" + ], + "d531af35-5e195d3a-0756d7c2-7e3aff86-d6c94461": [], + "37281a6b-d40f025d-51681f11-e078aa8f-3c6452d2": [ + "Support Devices" + ], + "719206c4-ade9b6c1-79fda2c7-c9cf7be4-a8979a87": [ + "Support Devices" + ], + "bc25fa99-0d3766cc-7704edb7-5c7a4a63-dc65480a": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "1b3d4f71-68977c5e-a070ff6b-29584c84-b70bf667": [ + "Support Devices" + ], + "b2dc9318-372908d7-5af538be-3b12eac5-7c995a7c": [ + "No Finding" + ], + "1cc3aae6-387f9950-c591a39d-320f3621-7c4e1b19": [], + "f65cb11a-2ead5997-07930361-9837a17e-7d96f22b": [], + "096b32ec-f7a979c1-df4bc2e0-589ac982-da947b3f": [ + "Support Devices" + ], + "d4e70647-9bed282e-fd4e5b2f-d659e2f5-2b751fc4": [ + "Support Devices" + ], + "2c8df100-4309e350-7d82cb04-094d8978-ce88debf": [], + "2e3c3f7c-7193e986-db131763-296881f6-9c7d88d7": [ + "Cardiomegaly" + ], + "39f8070e-150fed7a-edc48fc5-4957b38f-cd627a7e": [ + "Cardiomegaly" + ], + "3084f617-e040a88c-2e4bb84f-d190e19b-fc86d543": [ + "Atelectasis", + "Support Devices" + ], + "02459e00-c32b7e61-1d7eaf5a-b10fc8f6-063f7d90": [ + "Support Devices" + ], + "4121b513-0b19d16a-eae78b94-9ad9e2c6-d0f50262": [ + "Cardiomegaly", + "Support Devices" + ], + "4ea64f59-3502fca0-7099d35c-d3856d7b-d2a2d354": [ + "No Finding" + ], + "9b148afe-84b1cee1-f5157098-7afc39cf-7d78784c": [ + "Lung Opacity", + "Fracture" + ], + "adb48138-344feb7e-14e31d10-2639c54e-0b5a95d7": [ + "No Finding" + ], + "38708899-5132e206-88cb58cf-d55a7065-6cbc983d": [ + "Cardiomegaly", + "Lung Opacity" + ], + "b6520de1-54c0557f-89afcfc8-cbacd337-e2a10b25": [ + "Lung Opacity" + ], + "3b50ccea-cf11fea9-920cca73-76b7d44d-a046e317": [ + "Atelectasis" + ], + "525c7667-53fd7624-6f104340-1895a29c-1ee766f1": [], + "6d5d81f0-24db4698-0b10ede2-80628bfa-6c5de5f8": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "a453ca56-ce5491bc-0ebe830d-450665ec-f47c3053": [ + "Lung Opacity", + "Consolidation" + ], + "e6298e5b-366c6725-3be73135-100fb888-3168c3b2": [ + "Lung Opacity", + "Lung Lesion" + ], + "b57f6693-0b6cfcff-9a77d958-c0a4c1f5-fab766d2": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "1a5734f8-86784713-834c020a-10c75729-cff94a9b": [ + "Lung Opacity", + "Pleural Other" + ], + "31b932ba-757c9228-940b6753-513b8ecb-705d05b5": [ + "Cardiomegaly", + "Edema" + ], + "498f9360-0c28d42f-94618d8e-62ab4a70-6bf2596d": [ + "Lung Opacity" + ], + "9762049c-4ede04ad-3686cd0b-abfae75d-795cb083": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "84350c37-9b9580be-c60fc9a8-a1221a71-b90ec487": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "636c3d85-735bc7ab-f85f38f5-8b782e04-3f94239f": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "47b82a26-321d12c0-2e8e3d70-fea4fb45-3e201e4c": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "807aa21b-591fc5c2-928a2b58-33af8636-1de7e3a9": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "e2706168-aad7b524-06ccdf55-031e9a4f-5c0bdcb8": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "75a92fd3-de039272-23790693-7ddfce74-cb96a026": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis" + ], + "a78450bf-630d9aa5-d48a79f1-41a5d2c2-802321fb": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "2b0c69d6-c2dc4934-db59e90a-2e58d454-ee26f72e": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Support Devices" + ], + "19e1160c-64331a2f-1c1287f4-deca2aae-a62a7beb": [ + "Lung Opacity", + "Edema" + ], + "40a34d9e-affb9a73-e6009ee7-ed1a371e-64c6a36e": [ + "Cardiomegaly", + "Lung Opacity", + "Pneumonia" + ], + "c6fdd21a-91b444bd-940aae07-50ed7fb6-f27ea087": [ + "Lung Opacity", + "Pneumonia" + ], + "46f92d39-5a0b4745-589a5232-31469918-7d77751f": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "8b6b90be-a3f009d8-fcfdce19-97533664-0f73e66c": [ + "Cardiomegaly", + "Support Devices" + ], + "1a648bc5-393857b7-f4dcfea5-cc7f74af-b8d8d2fe": [], + "4983ed0a-abcbaeb0-442211c9-9b2054ad-8fdf0f80": [], + "64613c7b-ce9fb911-c2eb42ab-41a905ea-97ce9a9d": [], + "06aeac02-b53537f5-fc5cd426-d1528a0c-0b563e39": [], + "0bb60711-8098a084-5f12d2bb-e8739a70-870e72a1": [], + "eac51eb0-1de39331-93d4cd9e-2ea34983-47a728bc": [], + "9899772e-b051b74d-f68faa87-f45ebf9b-3fcd4d7b": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5df5745b-a26b6124-07ab0ff7-a79cf0ca-d84b7fa1": [ + "Lung Opacity" + ], + "8d361e7d-f4f46fc7-956ef2b6-bc506025-0df660c3": [ + "Lung Opacity", + "Support Devices" + ], + "583590d0-c9c3ce35-4b385739-1623390c-62fd1b5d": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "bcbe5ec6-d84ec5ad-7815dc90-92ca0882-48d3c3a6": [ + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bb664e62-f26a58fb-f3f6515a-0cb91fa0-2638766f": [ + "Atelectasis", + "Support Devices" + ], + "2e0bc848-368fe38c-4feca54c-89e93ae2-b2c7c2db": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "8511e432-1707518d-687c14ac-488cb51f-b03fb332": [ + "Pleural Effusion", + "Support Devices" + ], + "d021e279-fc2a15cf-aa08b3db-9b75b05d-324ffb18": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e3462cbd-2ad9049e-4bc04cbf-4f3005ab-3c4c0678": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7776d1fb-792c88a8-721a0773-7d142590-639999fb": [ + "Support Devices" + ], + "5ca8e895-727feeb6-2817230e-65ce2e3b-5b8f315f": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4598aebc-969c6b3b-a13242a3-a9bd01f3-b870c101": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0a5b6b02-70afce7a-5660c265-198ba57b-b6283f58": [ + "Lung Opacity", + "Support Devices" + ], + "406d2ff9-6049cf28-40864b44-63167ec2-a0b55495": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "698584c2-12c4e70e-5b50b31c-5bac17e7-dfeb3e9d": [ + "Support Devices" + ], + "a54a1c95-9ef227c1-e64321cb-98c9470d-761b66f8": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "f5ffe72f-2177cc32-4bf7c5fa-c241b35c-447b2120": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c20654e3-3f4f8322-d732af7e-f214d42f-c16264fc": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2e87f158-0b24dcfb-c1faa72a-75f96efd-3e82f4c4": [ + "Support Devices" + ], + "39291b24-1045b1ed-af35c04e-d467233c-9c0a3be0": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Support Devices" + ], + "c09fde7b-fe3f3f21-4ea1ee09-6a8497f7-7e901050": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f1939ee3-c5f53319-6a12cc79-3a32f440-2cec4540": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4e978740-b97d9a2c-f97c4610-4dd52d72-5cb121ef": [ + "Lung Lesion" + ], + "dc1267a2-3ee022b5-d80f7ef1-f88a4e83-8d0de660": [ + "Lung Opacity", + "Support Devices" + ], + "2687e47d-96929b39-f0f102b3-d5e17213-31865ec4": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "21291544-3a540481-114dd644-ac5c71c2-69673493": [ + "Lung Opacity", + "Atelectasis" + ], + "a8f21394-f3845d92-545b522e-717fef30-fa50a684": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c9028d9d-b5be82c7-94f4e115-fcd0cbb2-bdc86018": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "320ec4bc-eb78eb77-b0088c51-9c38d6dc-d4677778": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "70151e8a-71e8ed45-15a560dc-97516a13-1d4ca7c3": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "fa76addb-604afc82-2fed6189-2657d8ca-8464dc84": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "d2c67694-56bd35b7-4aad9a81-9c1ca076-546a019a": [ + "Lung Opacity", + "Support Devices" + ], + "582e1166-1525596f-e3aa9071-b64f3476-3edee376": [], + "7173b6b4-1d8ed39d-ac70a6ee-5634f026-cb7af67e": [], + "ab08af63-948a2416-3f9f6080-5d16badd-02c43b45": [ + "Lung Lesion" + ], + "d9c359c1-1be4d372-89b1a633-8ae85c64-d875118f": [], + "0336687b-390c6d13-fe15ecd8-f66d495e-b90db625": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "dd28d7b2-1303acd7-f23b52ab-4c24a9ab-f7296720": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "288ed076-f6b4189f-b7e6e717-ff31b7e7-f5d1fa0c": [ + "Atelectasis", + "Pleural Effusion" + ], + "9e0b006b-70cbcb07-0aaf5bd7-5faf6256-c93f4008": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "651f114e-84947603-ffc43734-98f192e7-c9c6afe0": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9b3b2ac9-c7621799-9c520077-028dc771-d93cf2d7": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0faaaa23-459dfd75-f9dfe24a-17af121d-d1d5b9e4": [ + "Pleural Effusion" + ], + "124f973d-d060d2cb-f7f48073-f3b3298e-8e8bcfac": [ + "Atelectasis", + "Pleural Effusion" + ], + "1c6b6253-4298b326-603a70e5-89968c12-4c6900f8": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "cc9097d1-f7a1ebc5-aaf716e9-769e9776-3e93e11b": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "4f4218c0-7e3de34f-abade5db-964b2d47-addcc964": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "a797fb72-ac31496e-fb500d8f-daa52795-1800ca2e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "2fcba743-5df8901d-e0a0422a-de2d913b-9a3ca76e": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "b8375637-30c4d9cb-3bd3bb64-a6a4446a-c149911f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "535db340-f9e90089-14252bfc-a0e9b1d2-7b3b4baa": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "99d55522-c421c3a3-4e043495-a4e139ff-69c8f48f": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "46ee8e54-8770a1f9-92571cb4-188d5290-2e4ed48b": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "67a32863-338f2899-5e526d84-2639d564-a2204b9b": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "b03d121a-8a657f7b-2c3da5f3-6828c27c-2a4d38a4": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "5d4e8798-538c8cb8-095c11a2-e34b3a85-0f96f1b3": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "7cd9b3ba-edb2b391-8e12d2ad-8303e23b-bbb3a640": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "1d2210f4-4ee82b62-33bb0a65-95c1445f-149d7a7f": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b900fc21-dda79088-8dc65796-63160053-790a5628": [ + "Atelectasis", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "88633d62-dc511693-f8ff40bf-fbf31a2e-2760a8e3": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "eae82e15-d009faf9-ea670371-7404ef86-edfc3065": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b197e096-c5bf8b0f-c2a04ee0-f6eb2370-9cb07b7c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6e9a74d7-21c84522-a747db35-77dec447-6c76dd6e": [ + "Lung Opacity", + "Lung Lesion" + ], + "fca85dcd-6c374a5d-3ff8fe9f-4c0597a9-db55419e": [ + "Lung Lesion" + ], + "df2afec3-bcff5990-a6f64c83-6bb93795-d38a1ec8": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "20106d63-2c479e81-0d61595c-25ef9723-cba07432": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "218c9927-cdee34db-c4b93920-adfa83cb-cfb580c5": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "637d11ba-abd47193-e88143b0-675837b1-f8a1069d": [ + "Lung Opacity" + ], + "1497c1a7-0f52e042-8b3ffade-b8b71145-17eae73d": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "3a2587b2-54d74fa2-bfaa41f8-376175a0-1ebd1aa5": [ + "Lung Opacity", + "Lung Lesion" + ], + "77af0e2c-d7666b9b-34048bce-176b735b-4e6ee973": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "b05e2bad-8b5b414e-de701c91-cd96ce95-3dd20d77": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "1f37fa7f-bbfdda2f-9ae5bac4-0027124f-f462fe0b": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "546cda58-159974fb-87293b33-b96efa16-29d93af9": [ + "Lung Opacity", + "Pneumonia" + ], + "2e8951da-ac479fb3-79e5a820-7bb84b0f-5b41ef08": [ + "No Finding" + ], + "2bb87f10-45aac793-86c9f27c-51c099e7-101f7d29": [ + "Lung Opacity", + "Pneumonia" + ], + "7bd2406e-7c8114ad-31d1b818-28c7e563-6a1a6176": [ + "Lung Opacity", + "Lung Lesion" + ], + "4b64a5b1-add48a29-703a757c-e888cd6b-4684205e": [ + "Lung Lesion" + ], + "cc171ec3-fc9a6d36-795ec494-82541af9-087011d7": [ + "Lung Opacity", + "Lung Lesion" + ], + "16b32195-cb3e0995-d4cf9ac1-4af71b24-8d42365f": [ + "Lung Opacity", + "Pneumonia" + ], + "cbe3bc41-e94a672f-5fdd94a6-aa2446b0-e821a444": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "d439d39d-cacf925c-2737a0f6-204add42-44e8cd99": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "9867f9b8-833b5f7f-18a67bac-b62caa15-7a215a2b": [], + "c2fc2eb2-033da9b6-8f6e6304-b08a9f88-3bbe7370": [ + "Lung Opacity", + "Pneumonia" + ], + "14bc2280-1d27b09e-a19b7d63-157c1de5-fa6f8d15": [], + "4a11826b-f6d01af0-18890057-960c5a8c-f24fc5f0": [ + "Lung Lesion" + ], + "0cda206a-b37c9416-30863ff0-63268f49-76c60c1d": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "5aa672e1-1a4bfdc1-770847af-e76adb3d-a2d61d6a": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "f9306189-d5a02f03-9cdb2f33-b74ba726-8c15439d": [ + "No Finding" + ], + "fe5bce5c-5c949faf-1120fe46-1ac9de4b-5c4f5072": [ + "Lung Lesion", + "Fracture" + ], + "8a783cbe-d52d08bc-f2c3bbf8-9b3be898-4872449b": [ + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "c228dc1b-34ffc306-df90934c-a737322e-42e32273": [ + "Lung Opacity", + "Pleural Effusion" + ], + "93f1cff6-36f3e02f-d36cdf6d-ee6f284b-c618d6fd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "13ef3d0a-59bd5ec5-714aa150-ad2c6c44-c8e32115": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "3c683456-9107fcf5-4722c784-358a526d-54f47984": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "2d1e6273-8e13a27a-10e404d2-b5ff44ae-03ad30ce": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "3e35e5c5-a1990b18-b3d03116-6599c881-27d172e8": [ + "Lung Opacity", + "Consolidation" + ], + "e07fa786-650ff653-81675db1-7d20a8f0-b4a5b8f3": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "524967a5-136b039a-0f60c1fe-2450be2a-a34378a7": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "60195474-8b005d9a-ba896639-dde6ba48-49b2d063": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "e54056af-0e47378b-d4809463-9d218a22-17591156": [ + "Atelectasis", + "Support Devices" + ], + "aee4ede5-44ecf0d9-5fe27051-91a30aab-2059b97d": [ + "Support Devices" + ], + "d69cce11-46d26bdd-72a95d03-473ab83c-553c9c91": [ + "Cardiomegaly", + "Support Devices" + ], + "cf48760b-bc0b549d-17be5069-3e7b5248-e5f62e37": [], + "29a9ca2f-50292418-e78e2999-12755e18-3103a476": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "8ca45b1d-11e7b3c4-81d757ce-5fa29549-4efce674": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "81519ba6-8d7cb2e1-1711d24c-0d43f539-d2181628": [ + "Lung Opacity", + "Support Devices" + ], + "b4f28648-ad5e7b85-c9c36b5c-975bd159-3da2a25f": [ + "Lung Opacity", + "Support Devices" + ], + "430e6100-bae3aa34-d72132a7-2c61b505-8d2056bb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "983faa39-85b84785-39cbeb3d-01519146-5be82c3b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "ee20ed6a-2dc0af0c-24d33cf6-5386e01a-c281e8c5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "55075506-31f28698-900b686f-bf4d78e8-3c2a322e": [ + "Lung Opacity", + "Support Devices" + ], + "77ab84c4-ba890f3a-4d161cb1-8516d2ff-ba5e1842": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "7a448024-34b46da3-0662ce39-3a69ebb7-30625b25": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "6c0daac8-adefbe30-1a6a00e7-ac963bb6-fc69e8e4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "8d8b26e3-3c8ee293-aad9533f-8fc6f107-c58c3f36": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "febf4065-2f4fb271-950add11-ee1ea7b0-f4c14c02": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "7d75166a-47342cde-9303b619-7fff892c-486713f7": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "dbaacc26-a0c84198-e2e7ec4e-89757108-dcf9f2f3": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "c2f49f11-42bbe227-0e97f6b4-10ea93f4-e05ef9fb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "2e619f64-89aad18a-fa15db10-86ed910e-e1d9fb82": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "67a20282-74cc43b9-69dd3914-1cb897d2-cb2f6018": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "55065f66-4391f4b6-dfb89de6-2d41c91d-8c4fef83": [], + "8b3bc5d6-b73f3699-9273fe20-4aac09c6-d0ef8954": [ + "Cardiomegaly" + ], + "e28b50ff-3106ff22-b852ec44-10d70673-a6d3b87a": [], + "92afaf0a-1599ea5d-299de00c-663008be-231fd983": [], + "b1cf33ff-6f744ea2-7779ec30-81842599-a4625e58": [ + "Lung Opacity", + "Pneumonia" + ], + "0762369f-af8531f3-09fc45b2-f00d90c9-88e6ff7d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "888290a6-cb15d01c-e8f7eea0-2b69aa11-d34b333b": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "637ffdbf-4427b427-47f9c4dd-fb6aed19-218a92c2": [ + "Lung Opacity" + ], + "cd5bb1b2-3fb23145-b033324b-a7cb4c43-c1641cc9": [], + "bb3b6a6b-35b5581b-ed87943b-ce0dd143-4fae7096": [ + "Lung Opacity", + "Pneumonia" + ], + "dbb3e7c3-35a17f99-7bcd2d4c-57f5a932-d79a20cd": [ + "Lung Opacity" + ], + "db019b7e-d9ed7caa-dce2242f-4d94ffd2-276acfb6": [], + "e7c6ee1e-e78f4a5f-8d06b880-0facc167-9037ed6a": [], + "cae34b8f-cef454bf-250bd88e-8bef265d-9a3f0172": [ + "Atelectasis", + "Support Devices" + ], + "277f62f5-617ece32-531a87ea-d1f6b703-578157ce": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "7ddd8e36-8b7ad07a-2157c5f0-e30755e5-e0a8ad3f": [ + "Support Devices" + ], + "12564330-3d6b0ab6-568cc9d4-342379e6-c2af1108": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "17a72ae0-23c30abe-90d2e3d6-03c3c393-2cbeda3d": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "ec144fec-d36c78ec-3f3a3acd-f39aed67-c75e95ee": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Edema", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "129b160a-a04df689-fd8a2f39-c04a597d-736a0245": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "62293417-c3edd9fd-c05a2646-8a63d21e-b182d247": [], + "acd1cafb-900a2856-d5d8b7f6-9bf7f757-019ea214": [], + "646e6ad9-a96531b8-9c145524-8d9eee31-45c942db": [], + "d642ad26-82bef23a-5b41c13c-5f34e5e1-f45e10aa": [], + "62c178b3-0902fd6d-f0c150b1-c6a6cdf2-f914c29c": [ + "Atelectasis", + "Pleural Effusion" + ], + "bf3ca23d-9ae54a6f-679d2476-6eb17d30-ee3cf5ee": [ + "Atelectasis", + "Pleural Effusion" + ], + "c6daa86b-28de832b-4cdd7e0d-51eca585-d7dad6ce": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "4765eb14-526b941e-eca533c4-4036ca47-964e3982": [ + "No Finding", + "Support Devices" + ], + "352f1f90-b49aaf35-a359c107-f209944e-a4814903": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "eb00136d-bf3de8a4-e4b112fb-e086aa9e-97dc80ff": [], + "376dd083-0c554a9f-3a0b2392-b89e6681-8215c52b": [ + "Lung Opacity", + "Pleural Effusion" + ], + "5033a612-cecd8c09-fda1ffcf-89bbc30e-147ecb44": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "2094ddf3-2348835f-2f468a2c-493f4e64-1b4ef954": [], + "4893a80c-cae07066-13a4d4ad-ca8b919c-7f50449a": [], + "81cfd2c3-1f5ca0a7-0c161ae2-ee73d31b-b51df559": [ + "Lung Opacity", + "Atelectasis" + ], + "c4578e07-19955135-9ae60a98-5c7ec462-69beadbb": [], + "02e9477c-659b97b0-28c5c1b2-6f4e0865-3e04a039": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "9cc3281f-64ff9f26-d2f759b1-ee26296f-50d416d4": [ + "Pleural Effusion" + ], + "ab27ba71-c4d831e6-be72ac46-7d5467b9-27e33f4f": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "03e4f490-80c314d6-8e4e9cee-cfdf8702-faac4644": [ + "Lung Opacity", + "Edema" + ], + "4bc65291-c131317d-d5517a48-0f7151d2-cd115f55": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "3960bfee-3d775493-bb08f568-81bff471-ef4dfaa5": [ + "Lung Opacity" + ], + "954f63ab-17009b0a-74507f85-db57e82e-94a1eed1": [], + "9890d76d-39a318f4-9252aa88-4357e066-a622d948": [ + "Fracture" + ], + "9cc2f017-fb143b0b-85dffa52-fbe2bdfe-eb8ed83c": [ + "Lung Opacity", + "Lung Lesion" + ], + "e71e1f01-11b4f60d-139fce5f-3eed20e2-1b61e149": [], + "901ff9da-8c7918cf-2c1642f7-2db14f83-c386dfe5": [], + "f54d71e9-cb078a0e-41326b2e-d8a5e132-77b9f33a": [], + "a10dea57-90f876f4-c66af250-6fb45322-6ef88ddc": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "a74b9fcc-ff2cc5ea-87d770aa-76473a8f-f68a8860": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "b6259590-ac02402d-a7f53e0c-5ab10b89-b8c49017": [ + "Lung Opacity", + "Pneumonia" + ], + "13b4969f-569b4e51-d63f9659-778309be-d1ef9815": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "78ca5bf7-9af12524-0cd2bd0f-466c301c-5278ce0c": [ + "Lung Opacity", + "Pneumonia" + ], + "a03ac33d-fe835365-82973c3a-0bf2e738-fbb8a2f1": [ + "Lung Opacity", + "Pneumonia" + ], + "4d0cd285-e11ff67a-d4f1a9ed-0286ae1b-f74190b1": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "6a5c30d3-89499825-f574a80f-225cc2e2-8fddc9a1": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "c190fb7d-da5b3a51-5f074369-736f62a6-589d6474": [ + "Lung Opacity", + "Pneumonia", + "Support Devices" + ], + "c1d08547-51bb20b6-d0fc7be9-c7477e9a-9e2e5755": [ + "Lung Opacity", + "Lung Lesion" + ], + "21dd100a-bf76f673-4ee97c34-87797534-1ff8583e": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "4100235d-675f4f1f-2073fecb-b125c75b-efa3e4ee": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "33222196-20a22f7b-b04dd8d7-3c2d9960-8b9630bb": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "4dc103db-597e938a-f6b0373d-e7703fa2-94e9efdd": [ + "Lung Lesion" + ], + "b4a25932-1328eeb3-d6edac97-2f1a91ba-69790ccf": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "dc259d24-611aa4fd-ede77026-cf06f0b3-9c9ae10a": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "49d3507c-e1c8d85f-5d7f8127-2f2e14f5-a84a6a13": [ + "Lung Opacity", + "Pneumonia" + ], + "9119a28a-7a5c8be8-becc105d-8c0996f6-27024024": [ + "No Finding" + ], + "ce1f47b6-0118a2a3-259807fd-a6713c05-84e92c9f": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "39a0863f-9a6a4e94-41b1b286-8536e7dc-75252ad8": [ + "No Finding" + ], + "5c1ebdbe-f7834fbb-a2869781-9138d6d2-e5cdd28f": [ + "Lung Opacity", + "Lung Lesion" + ], + "8562ffc0-ca46d184-8a4dc3ba-4b7f6c58-6a161c16": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "ec537dc4-f5eeec2d-56cb7b79-4732911f-612e645a": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "179a3bc6-06e45b2d-3a0d7560-d5bea797-ed93b1dc": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "8e24f563-9ef7ca91-17190c86-0d7d6406-35d94599": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "a86e243b-eb7c225e-ad44bbf8-9125ef98-3d02d669": [ + "Lung Opacity", + "Support Devices" + ], + "d41fb89f-8c1d50b1-450c4170-7068ca83-5ad87d23": [ + "Pleural Effusion", + "Support Devices" + ], + "623a9e44-93ced832-bdcd5276-a887ca9f-238d2599": [ + "Lung Opacity" + ], + "a0b02b80-6dbd9219-a3aea9eb-20011893-d884618c": [ + "No Finding" + ], + "0d3c825a-9753f20e-bc1e0aa5-f14f69e5-eaa3adee": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "6a4f0aee-31bef761-fd5d6d33-6b8a544d-dbcacb82": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "0eeed2ac-7c2c8b80-4a7de4c0-bf204a98-3f015f56": [ + "No Finding" + ], + "f781fb92-d5c744fe-58574051-17d2e843-3ba0a211": [ + "No Finding" + ], + "8d47a87b-4b8bd1b8-9376da2c-20018620-a1d465a4": [ + "Lung Opacity", + "Pneumonia" + ], + "ec2613ac-d859c02c-90a0d8c7-09a107c4-990690ec": [ + "Lung Opacity", + "Pneumonia" + ], + "3632b732-a6fc2d5a-e522dbb0-44d33b7b-d5bb10c1": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "42c0684d-a2f6f499-1215efe0-496a6638-f805c597": [ + "Lung Opacity", + "Lung Lesion" + ], + "823fd649-1a827456-8a52f457-41419696-3c50b072": [], + "d3b0d36d-5201ca16-3476454c-0e031e78-004217a2": [], + "1f30c7df-3f959322-1310a3e0-aa8489da-f7772d04": [ + "Lung Opacity", + "Pneumonia" + ], + "4f39f3cc-21398fd5-98bdb9b6-55653602-c53fc011": [ + "No Finding" + ], + "dfde1118-f8d0acbf-f1edeee7-1d568beb-a983654d": [ + "Atelectasis", + "Pleural Effusion" + ], + "fabc582d-1a12e5e2-e6f08171-00f07d2b-6ec6b54e": [ + "Atelectasis", + "Pleural Effusion" + ], + "66e2a71f-4c89386c-3cd769ac-021891b7-e0b1bf2b": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "cccfa82d-f56ed730-031b5dac-53bafa2b-f20378ad": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "90700f34-2bf7712e-44ca9a85-f62ca3ec-083c083b": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "c2402c74-80288790-b0b025b8-326882cb-8d3752f4": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "0e20294a-a19790ed-687b001e-481e4273-f89dd2c4": [ + "No Finding" + ], + "2d4d3dbb-39cdc11d-01294bd2-8a3904df-30e4ac9a": [ + "Lung Opacity", + "Lung Lesion" + ], + "432f5b8d-dbf9d5f6-b2ae5422-ee46f656-00caa39c": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "463d2a28-b411bb98-f7bda38e-7030ebb9-74a8a1e0": [ + "No Finding" + ], + "1d1b1649-61056b25-922ea810-d353c844-6a089756": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "dcdd32f6-e80f7f1f-0c2448f5-0816540b-3b890ebf": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "bf040338-6d134f73-6145c023-c868f0da-e70f429b": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "d5380e43-b9ca5dee-fb28ec1b-21f2d76b-af26d998": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "53467c86-8205cb70-cc0e9d9c-e218feb5-36807cc9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "a9b00aa7-e110b339-196b4e7c-3d15e5aa-2608008c": [ + "Lung Opacity", + "Fracture" + ], + "6ffb2758-06d7d35f-3945c13a-7dc500cc-de2839e4": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "3478fd3c-a34b3e6d-0a9a1cf3-726cb9cd-ec1381aa": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Pleural Effusion" + ], + "5b4b7e3e-a726aeb4-8bd775d0-56132ba3-44911f96": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "6c07c33a-7fa8c707-954343f0-26c7f512-379005a9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "8ce5b932-2d8ffc38-cb498d1d-80d458cd-cec8ac86": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "e75af3b7-a3b4f881-b1f68642-609d0775-916ece62": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "6b77cbf9-987963b7-937492b5-149802aa-75535076": [ + "Lung Opacity" + ], + "e51c0403-d316954a-0ea8f97b-063b0ac1-c4fb078e": [ + "Edema" + ], + "e8ee2b4d-8ea54f5a-fbbd13ae-b0322e55-8d89e12b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "350c270f-70f4a764-33a53729-ec529c84-cd886aa9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "a94afe1d-af9219e1-0a7b8d8c-96262c1c-2f5b9d27": [ + "Lung Opacity", + "Pneumothorax", + "Fracture", + "Support Devices" + ], + "15f11dc8-bf0efa42-bfe3db80-e0bf6c95-1ae84951": [ + "Lung Opacity", + "Support Devices" + ], + "1479bd69-820c7589-5e02e82e-b713275f-99aed79d": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "4161612b-04b736ab-f5965aae-1028ae0b-6bf634ae": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "14047a00-16ef4559-fd349a7f-fc7d9ef5-2667ceaf": [ + "Fracture", + "Support Devices" + ], + "4ac477ad-67469958-ec8c37e7-547c1f59-9a0137e7": [ + "Lung Opacity", + "Pneumothorax", + "Fracture", + "Support Devices" + ], + "aaf8a24a-aa94d1ac-0c8bf9e2-7a786f52-61f413f3": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "b4cdbc46-c91c088a-014cfd36-cf752c93-ee08be9e": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "4a5bbca6-64ed6abf-84645068-6a7688bd-9a9910d4": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "9756bc1b-1827e912-16df6958-c6ddb9e7-17098cf1": [ + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "fccc3e79-097ee8e0-2e6dd2f2-272cc880-9a0ef87b": [ + "Lung Lesion" + ], + "cb1f8e7a-37c1dd98-3ded7ccb-0f29a540-71ff7d2d": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "3d1d93b1-6b91fadd-c1b40a43-382aef3b-639c3488": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "4b3357b7-f55f7ab3-65b6dece-b56ba663-546aa37d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "ba4bbaf8-52c6f0c8-d6922907-95d9b63b-f10069d0": [ + "Lung Opacity", + "Pleural Effusion" + ], + "ede20c8a-3e1c0c67-30c5c122-dfcf20cc-b8acc6ae": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "5cd0800c-77280a87-980a1cf6-b7765304-288d0a38": [ + "Lung Opacity", + "Support Devices" + ], + "3ee15aa2-32388516-3d85397d-2d958762-6bc5f7c8": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "8e9b736c-1abf5111-086c325e-36cc49cf-82791ceb": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "0b08c349-d6da596b-18713b4e-e42ab4c4-35971a4f": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8d88d859-5ae2eefd-3af51dce-25f4fd2d-15e047c7": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9470e916-1ba08135-e208f625-63d7a64b-2a009f98": [ + "Pleural Effusion", + "Fracture" + ], + "021c6321-4fe21bcf-a5fc07b5-10da56bf-8436fc83": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c6cd8924-91d9c0b3-cb90ad47-aa32d3f4-86a66ea8": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "49c6a0af-c1fc71ef-9a008d1f-a69a11c6-ae390e99": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "5f058986-c0a46f7a-7d175c3e-c40f1bd2-e71884bf": [ + "Enlarged Cardiomediastinum" + ], + "d4228ce7-2788f96d-b22cd5dd-b09350aa-bb461d38": [ + "Support Devices" + ], + "8ecf5181-09dec4e6-27b43fca-3b8999bf-6d25f591": [ + "Enlarged Cardiomediastinum" + ], + "b8f0ce5f-ae088cd3-92d27847-3b4570bb-1305056f": [ + "Lung Opacity", + "Lung Lesion" + ], + "09a3e9d9-822e7d52-af47f424-1f87a789-2edd0300": [ + "Lung Lesion" + ], + "559e1c4a-6534ac94-37ba47eb-9a4857be-0d95f618": [ + "Lung Opacity", + "Lung Lesion" + ], + "b1009aff-e698f80d-330e0345-8dc761eb-889e6c69": [ + "Lung Lesion" + ], + "3622b493-4fc54d50-37c8dd39-9ad4b433-1fc9ab20": [], + "7494cb49-099d351b-0e03726b-10674f3a-b482faaa": [ + "Enlarged Cardiomediastinum", + "Lung Opacity" + ], + "1452c2ed-ce6c7d7b-02bcde56-a4636a4f-849b5534": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "00c62f03-afbd0562-f8fc16b3-3a4ae1d8-73b67c6b": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7bc6a484-606eb095-e1f6f658-ef47cd8f-5c1d2c86": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "d2f3ca46-8acb3e22-648cbc5d-db7450d3-d3a634a6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "40f7f6b3-2ca777db-7faade62-2e986844-95785a01": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a9c772ae-200934a7-b6e1a70f-b42f3c60-9ddecf2b": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "25ee6ef1-1e086650-4b388d67-99cae82c-8b65717e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "84471a04-4b52493f-eceb148f-7c403b8b-78458575": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "d263e868-0cc6db67-58f15831-a2a8a9ac-4c59911c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "00cab8db-89ed3680-c75f49b1-f4fdd419-f48303e6": [ + "Lung Lesion" + ], + "cfba203e-fe166598-71452568-2adea590-f7158b8f": [ + "Support Devices" + ], + "196c8e5f-ab6084a7-145ac6ef-54b05747-9768ba0f": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1d7c427a-6e76e27f-2aa441d5-dc1ce213-c075b375": [ + "Cardiomegaly", + "Edema", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f0983c7e-5edaaa34-04885b30-b260a522-2451e5cb": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c4043075-ef0f5e86-98cd490f-353abc47-c25c3a5f": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ec259ac8-a686ec57-96de3308-85ce5840-db5a729d": [ + "Atelectasis", + "Pleural Effusion" + ], + "0ebfea17-388d6e3e-19b4850d-4da084f8-0088c1c3": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "76c350ea-1a3f5c17-77dc0d18-f3ac57a7-27bd14f8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7e6b2f67-75c969ed-bbc30375-abddcfdb-1f16d824": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "b0fc3c88-772bc99b-87d98a66-29286aad-dfa69fa3": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9971003a-1a8b5d7d-b708ea6d-c1b77b68-99adb262": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "d2e3dff5-381ea801-b587e5f8-7a35a88a-9c9b66a5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "8b71881c-c896b1ec-9e6c08d8-6f61075a-c98e7454": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "2155d1bd-3cd88831-6b690bee-e3ac34ae-4b25fa8a": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "7f6657e8-53cbad66-408c44bd-be99b9af-fbb557c9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "5bfbe926-314a08f1-d8a3c850-6284306b-614e628c": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "5d60432d-9a9f7b91-2a3f88ee-8f0c574e-de8f7187": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "386f3989-399f50ac-f80589aa-642b131d-16e64e70": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "299e5b56-5569fb81-d1129251-b7cb6071-ab3dc20b": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "fe7bd495-cd1ee433-25411a4e-13614d8b-00bb590c": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "79b2273d-eb59519b-a4f45fe3-cf98a087-3cb1b840": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "bd268e85-ff8116fd-55309751-989af5bd-af1836a9": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "4f49b2cf-afac9d76-538a44c3-0d040070-15d0571b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "561aa77f-36bdb76f-e2a79068-a9c24ac5-0e745c62": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "5c215386-3fe45a36-36feabd2-5dc463cf-3c2be1a1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "d1d6666e-15233295-0295b986-083aa34f-88ba93b2": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "543b4069-deab8e00-eacd542d-26643f2e-557d2591": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ee027160-ec55fd25-2991f88d-cfc0fb94-bfe15a07": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6d68975e-d2edf733-8d606be2-0293f596-9d2ed6a6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "c8b95c4e-1ab26289-9107ecb6-6e70a749-ec02c584": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "540bedcf-8202c1a0-6499b7ab-c43d0c66-a287c997": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "3df17cad-5c3f8bbb-76d9b10d-006a7939-4d898c97": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "4a43030c-6867738a-9af25682-7751982a-a516ecb7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "adae90d7-feef7abe-f9447062-dd02daab-bc446b77": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "19466b08-2d75cf0a-aa6a9899-d3deb04a-436f74ca": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ef34a791-15321a3d-aa9eca93-84157fc9-6fccd907": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "92e316b6-8facf11c-bce58686-26309d9a-afc8bed3": [ + "Atelectasis", + "Pleural Effusion" + ], + "c7427f95-b71d2d11-ed43a341-c13a16db-de503c5a": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "33ecbdf2-35c3aa31-e848a7b9-a49131b4-0690b4a3": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "626c8821-3de699cf-14f3cfae-8d973f75-4c8a31c6": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "e92d9801-97dad88a-dce9c2c1-ac9d93ac-c7134e12": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "88c6c717-a8632896-fd029484-3dee5f36-331a78dc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "2d93fd96-9b0fecad-1fdab811-37caf33a-3874a948": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "8694d480-db130666-e072b4e5-4909f0ea-9b9f0d06": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "96b2b01d-08f718fb-c4f596d0-64bf6e3e-03e90435": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "e5d1a79a-101a6822-e589102f-05d0d1c7-fe74e5e5": [], + "763d782b-5a51908c-3e57e293-836df343-de966853": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "9c4e6c30-f517fbdf-d045185b-4f7d3c4b-5cb54b42": [ + "Lung Opacity", + "Support Devices" + ], + "16664a3d-af2dbca3-e3408ca4-19c24125-70e75361": [ + "Lung Opacity", + "Atelectasis" + ], + "8f79faef-d6ab7ef3-75eb04f9-26fe138d-a9352552": [ + "Lung Opacity" + ], + "0c931dce-4d5b295c-0a68da5e-9d5c6169-3d3ef2da": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6ec5e4b8-6821d041-b2fd540f-a1d42270-467d72bd": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Pleural Effusion" + ], + "79a1d194-0d324545-7c4ad0fc-c75075d7-91c97dc4": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Pleural Effusion" + ], + "943eea27-fbd84e49-bf38a522-5020d59e-0c6c7541": [ + "Atelectasis", + "Pleural Effusion" + ], + "2672a5f6-256a738f-b6a24dbc-0e439c1c-d27f0b35": [ + "Lung Opacity" + ], + "33afaafe-a1605f54-f33616de-424605bf-7c961442": [ + "Atelectasis", + "Pleural Effusion" + ], + "11fac305-a3d8a8fe-cd1ad4a0-fc2a287f-0e061474": [ + "Atelectasis" + ], + "1d1bc795-245a8bf2-267d7b91-209d78ab-a1e3f52f": [], + "1a0d4a94-6ef86f39-cbfdfcac-7dd9b3a7-a693ce1d": [ + "Lung Opacity", + "Lung Lesion" + ], + "f0582983-56346354-e01404b6-17ebba56-b55ba414": [ + "Lung Opacity", + "Pleural Other" + ], + "8e086f17-1ab22133-89a28c98-fdd1bab2-fb852083": [ + "Pleural Effusion", + "Pleural Other" + ], + "c45aa650-87fd8d00-5217543e-595f7300-353c89b4": [ + "Pleural Effusion", + "Pleural Other" + ], + "3d99ed96-dc2263d9-e1073168-b827579b-63b897ec": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0211af7b-115fc73f-cf17f4b2-f1582601-de4a787a": [ + "Atelectasis" + ], + "0b8983cf-a43a8452-8286dd0b-c2f8f8ba-c20f59fe": [ + "Atelectasis" + ], + "53b32671-685e3433-612784a3-6c684cd8-e06dd901": [ + "Atelectasis", + "Pleural Effusion" + ], + "1fba2de2-36345a9e-ea2ef064-76c702c3-b80e6127": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "470d71ad-61c1b13f-0cdf943d-752fb588-ec523b25": [ + "Cardiomegaly", + "Lung Opacity" + ], + "c9af77d2-fad3eeed-901b28fb-003041ad-d1ad165e": [ + "Enlarged Cardiomediastinum" + ], + "14c1e51e-9e86e71a-8b399678-688f4515-7106f9a1": [], + "b1f84769-685be138-cd909af7-6737e321-551043bf": [ + "Lung Opacity" + ], + "ea644819-f1117ff7-4f06774f-336c60f0-51a50fd0": [ + "Atelectasis", + "Fracture" + ], + "d0b136c5-f0844e8c-66112b7b-2c23ee98-5d07fb5c": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Support Devices" + ], + "5320dce2-60fde2c2-0590fad0-36474905-b3318771": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "7edb7bdc-93380e91-4d5d0b73-0c778fdb-40e32018": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "c9532e5b-e9cb7923-1d3cf2ef-05e252e8-dcf11149": [ + "Atelectasis", + "Support Devices" + ], + "98bd2c4d-e47c5249-9e187925-65a4159d-5fb2cc1e": [ + "Atelectasis", + "Support Devices" + ], + "28286aca-22f060d1-344a3628-b2cd36f8-df90a34a": [ + "Atelectasis", + "Fracture" + ], + "a8dc3cbb-b58718d9-53a4df6c-82caf4ea-cf4bb15e": [ + "Lung Opacity" + ], + "d41d33f4-a726cd71-186c6cd2-c223bd2f-69f4ff76": [ + "Lung Opacity" + ], + "d5aa0315-53869b6c-10151e97-c12a5f0f-d369e178": [], + "10b653ab-46de5007-fc3c0784-46a5a718-df7713ba": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "a8c650ae-950b6c2f-15d23a79-9c74f29c-af076691": [ + "Lung Opacity", + "Atelectasis" + ], + "5e587c3b-2593ff0d-f7ac821e-4955e532-83ba9419": [ + "Cardiomegaly" + ], + "8474d7b8-cceb51a2-16c0d6b2-f075f46e-38670c7f": [ + "Cardiomegaly", + "Atelectasis" + ], + "5ad11416-2d53dd53-96e1fcda-ca3b80c0-c0fb1e6f": [ + "Lung Opacity", + "Atelectasis" + ], + "89da1b34-2fdd01de-1e33a13c-810f5251-9dcaceab": [ + "Lung Opacity" + ], + "b17112f4-c4b08b8b-00a18968-0495ad7f-80aab2f4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "f63472c6-7fff6462-6df9fd25-2705bc5e-08edc54f": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "71bfff81-56c6477b-3432d360-6d1f41d2-8b2d7988": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "940ed972-9b210254-8ce47743-d277b7b7-d440de02": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "27c8aa21-0a66ebf9-667f13ca-9695345c-caa66257": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "577e3751-aef1bbf3-e970d911-b1ad5a8e-af1b41d3": [ + "Cardiomegaly", + "Lung Opacity" + ], + "ef3a13e7-698e0d1f-8393808a-10002aef-7bd95331": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9a29ce3a-c06e22b5-44f5cc18-85e115b8-cbc710d9": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "d240a096-eb1996ea-8a08a168-367aa57b-96adf6ad": [ + "Cardiomegaly", + "Lung Opacity" + ], + "f1b89b54-27c193cd-47878997-195a1a2f-9d7bbffb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "6f9ca3bc-a0a9f3c7-afd9f2ca-a88637ba-52ab17cf": [ + "Lung Opacity" + ], + "8b38d41a-f5185160-d311d652-8d19e4c2-9f97688a": [ + "Cardiomegaly", + "Lung Opacity" + ], + "1b6de453-c29f3bea-062b74e0-18018703-0456f192": [ + "Atelectasis" + ], + "bf3a5411-5e10c67b-da46d4e3-89978035-8577d0fe": [ + "Cardiomegaly", + "Edema" + ], + "a77d2e8f-c6ecaa1e-c2b76bec-23469463-3e9de1f1": [], + "a8b55585-2e9aa2ae-9a9a0e78-eec5ec08-c35ee4c3": [ + "Lung Opacity" + ], + "d5fa9e5f-25744b5d-edd68a9c-806bfe8e-e7e0b542": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "efdbb954-7179fa49-509d0620-ab87eace-f42022d3": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "51e9421b-c2f395da-5dd48889-7e307aca-1472d6a6": [ + "Cardiomegaly" + ], + "fd4d0982-653e46f1-41642c43-423df23d-c0f86cbc": [ + "Cardiomegaly" + ], + "39618a10-511f1ac1-6fa3e87e-ec147c2b-8c69b847": [ + "Lung Opacity" + ], + "97dce762-0f106b37-190de5f9-33071881-9d9e0b6d": [ + "Cardiomegaly", + "Atelectasis" + ], + "16d25586-c7ca5d57-d25ac386-16c24f70-adba1791": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "a5deb13b-23c3db0d-1ad0a84a-91791d1e-05a8aaa7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "6de51358-d77c44f7-19d5cd49-0d32b6fa-15f71ae5": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "3bb2cb54-60f696d8-9dfcbee7-5a506428-c7316197": [ + "Lung Opacity" + ], + "3c172ae3-82504f6a-6de0bc7a-28294cec-278aa9d6": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "c8591b84-dfb9bd0c-54f0a9f4-e5258ccd-4fec4b57": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "66b2b4e8-470a1e57-77371a47-f3e6f263-0b7d1783": [ + "Atelectasis" + ], + "0119e0a7-198160f8-7a4b361a-0b612edd-9b62bc13": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "2c27c769-9854b0e9-102ff0b0-b17773f0-052865d7": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "b00146a8-daf7d7b9-b5b42300-46be81dc-b7c723c0": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "f7bbdf2d-8612cba0-b5619cfe-072a43c1-6438f2be": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a466a1e2-24db4349-c068db9b-aae250f4-030ceb1e": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f6eee07f-b610f72b-a8832d42-b5472b4d-7cc97271": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Support Devices" + ], + "cc94c95e-0ab572e9-4530d0e6-f22f983e-4b10755a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "59bade6b-0ae178f8-e0238791-c4862394-a0a99773": [ + "Lung Opacity", + "Lung Lesion" + ], + "7958accd-21d0f8fa-0a0f1a50-fbb2ce69-5128a4a4": [ + "Cardiomegaly" + ], + "6a748e66-94fe3916-8d95e285-cdcd69ce-af744882": [ + "Cardiomegaly", + "Edema" + ], + "b3068b62-93af079c-28037ceb-5f8b41e3-8d9c5e81": [ + "Cardiomegaly", + "Edema" + ], + "3a8c9fa9-90b94fc1-484469e2-d0316be1-245e5d13": [ + "Cardiomegaly" + ], + "7f656d45-d1f74ac4-4ad4b221-3f4ff982-a2435c40": [ + "Cardiomegaly", + "Edema" + ], + "f6300671-0644a211-45639c11-c0ef0484-67a8c5c0": [ + "Cardiomegaly", + "Edema" + ], + "4ada6367-cb70c4dd-8f2b5739-ef9da5fa-f1c91813": [ + "Cardiomegaly", + "Edema", + "Fracture" + ], + "cec20d25-582dd382-7387d033-b47f0a48-fb349447": [ + "Lung Opacity" + ], + "93e655d4-f85397d7-f5a5bd25-3ff6da79-c4342fc6": [ + "Cardiomegaly", + "Edema" + ], + "9ee98385-af8a9420-def01c7f-3a68ac80-7bb906d7": [ + "Cardiomegaly", + "Lung Opacity" + ], + "ffce664a-4eeb8fbe-401c14eb-0a71b293-c4027078": [ + "Cardiomegaly", + "Lung Opacity" + ], + "63f854b9-c24c2a15-3c4ee54e-72c08c57-5b8bcf18": [ + "Cardiomegaly", + "Edema" + ], + "9370636b-c15ba900-6d4fa453-e8725bf7-124cf815": [ + "Cardiomegaly", + "Edema" + ], + "34f9ce43-c6f3b51f-d12a71b8-003727fe-35c85318": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "4732ed95-933b87bb-7e3ef418-22b2990f-9b0a9efa": [], + "158479af-cf9c24d6-99ee742e-bbb91960-bfa7f46c": [ + "Cardiomegaly", + "Edema" + ], + "1ca66906-ea4212b7-f0588f1e-1c87cc79-bcbc1780": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "481574ed-5d06028b-38a29e1c-91406540-5bd259de": [ + "Cardiomegaly", + "Edema" + ], + "8e067d88-2ea4ee8d-21db2c6b-f78701cb-91ad53f9": [ + "Cardiomegaly" + ], + "e376439c-52cdf885-41f17afb-9a4a3fea-43c74d55": [ + "Cardiomegaly", + "Edema" + ], + "3c57e0f8-a76eb992-7795da42-1cebda11-839fc6ef": [ + "Cardiomegaly", + "Edema" + ], + "ac61125d-0a43dbdc-3c290b21-1ded59a4-0131570a": [ + "Cardiomegaly", + "Edema" + ], + "2f0faf68-27020330-24ac6180-f913331b-440b1474": [ + "Fracture" + ], + "737016db-c820a9cb-11c8e000-a5eef752-c1d20274": [], + "8d229bcf-75e124e8-8a55e963-dadf73d5-84125eb6": [ + "Lung Opacity" + ], + "a65d3d93-ce43965b-d289b7d8-624367da-7d615da8": [ + "Pleural Other", + "Fracture" + ], + "b5d3da06-fd20e016-8b1924e1-3ff9ceed-fb365036": [ + "Cardiomegaly", + "Fracture" + ], + "a7c1a219-d07eb7af-e89874a9-69a956b8-3f666a6d": [ + "Lung Opacity" + ], + "eaf0eb79-03580da7-ae1a0398-5fcef938-acdb31dd": [ + "Cardiomegaly", + "Edema" + ], + "4b232ada-d690d5b8-bf093f94-bd61a373-ff2e6e33": [], + "77283979-b7b02317-bf3cf53e-4068c643-ba29c7d7": [ + "Cardiomegaly", + "Edema" + ], + "3b3f6054-b7b51547-2794e57e-2e3bac66-7d7b834b": [ + "Lung Opacity", + "Support Devices" + ], + "a9c449db-9cd2fe30-50cd41c6-aa9508ea-806361eb": [ + "Lung Opacity", + "Support Devices" + ], + "39af0cd9-82745eb4-2fe05152-1dfd448e-8725c801": [ + "Lung Opacity", + "Pneumonia", + "Support Devices" + ], + "912a9d56-c2439c24-b1aa969b-da69313c-4e3cba1f": [ + "Lung Opacity" + ], + "ad848298-a6a13b00-3540b2ac-2e0e927d-908befad": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "360e3149-7a10216b-6b790393-8b2422b6-b3909360": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "6ec78bca-9eb86302-16367715-1a68dd88-f70084c0": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "8a8201f1-257d3a16-561099bb-c8e95167-e3b3b8e1": [ + "Lung Opacity", + "Support Devices" + ], + "d9a018f0-efb2820b-ed7a64b7-c05b8be3-12124812": [ + "Lung Opacity", + "Support Devices" + ], + "7e7b19ac-d29aedbe-10d9f138-4037688a-57615f21": [], + "fd2b67dc-f8167506-7c0667ac-33d49ad7-cc9fbde1": [ + "No Finding" + ], + "908fcfa5-90abe83a-27e2b569-6d63788e-3f258290": [ + "Pneumothorax", + "Support Devices" + ], + "efe3cdc5-c0ced06a-212a5901-9c1ee7c7-bbbe0e6b": [ + "Lung Opacity", + "Consolidation", + "Pneumothorax", + "Support Devices" + ], + "f05b9731-d6bf3b29-6197f242-4cc974a3-fe0f5b56": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "b6ce62d8-12124de8-769cb0d0-07e96bef-ca38036d": [ + "Cardiomegaly" + ], + "b763b37f-bcd8f18b-d2041837-3b2722d1-f6f3013a": [], + "af9b5e5b-573301f2-71ea7f54-300d7537-be08d760": [], + "d8f6df8b-a89ccea2-63bada22-1566fcf0-126ceeb7": [ + "Cardiomegaly", + "Atelectasis" + ], + "3ceaa65b-850c135e-da080f5d-e28c2bc7-a9dea924": [], + "60df340a-31a5266d-2f3912a7-3758a59c-9a5baa79": [], + "8146d764-df8a61cc-05eee7e7-2a09b0ca-af854e29": [ + "Atelectasis" + ], + "c476c50a-1f0890c2-aba98995-954a758b-7f46da68": [ + "Atelectasis" + ], + "2ee8335e-c2cee8be-256455f2-9cc54604-d6b4c10d": [ + "Atelectasis", + "Support Devices" + ], + "a9493b3c-4d63defd-55b09266-3147f2af-e73caba1": [ + "No Finding", + "Support Devices" + ], + "dd7f3873-773c451c-3500ff51-f62851f4-3a6116a9": [ + "Cardiomegaly" + ], + "4e2deb58-2087d69f-a4c1a7c8-776af924-1bd0202d": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "cafde7cd-b6e7a873-406f5371-358aca60-ed02bdc3": [ + "No Finding", + "Support Devices" + ], + "354f8abd-01f7f413-cb068ad1-1d47c651-7a17c514": [ + "Atelectasis", + "Support Devices" + ], + "af4526a3-ed45d1ae-28409d1f-a7389574-8e977011": [ + "Support Devices" + ], + "1f13c4be-a6bc48a6-5675f256-e95b8a28-c017e780": [ + "Atelectasis", + "Support Devices" + ], + "3d93e17d-7634fb78-ec7abdcd-a745490f-6eb6cc24": [], + "83502e58-5ada1fba-450984b0-07c9ec9e-2b5b91b4": [ + "Atelectasis", + "Support Devices" + ], + "bd3dc01c-c67b8f05-580c3880-de7352aa-4118828e": [], + "0f513599-eb6bddc9-4306d15d-46c7c0c2-a3c6c854": [ + "Support Devices" + ], + "de7f2739-8c743a3a-6e0e37fb-635c58f5-a48a0ab7": [ + "No Finding", + "Support Devices" + ], + "bd8fc3e9-687db5d6-574cb5a6-b78d18b2-2f5fb4de": [ + "Atelectasis", + "Support Devices" + ], + "db0c967e-30c9c887-b4196fb7-e0ba8546-1b9ad52e": [ + "Cardiomegaly" + ], + "49219783-9d403555-ff694f12-b2693e65-a4c63e44": [ + "Lung Opacity", + "Pneumonia" + ], + "92d587c3-dd9aef6e-c855611f-e7bf4afc-06528a0e": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "84ffb901-893b00a7-7f2090be-d5cf6a4e-c34ab763": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "97226dc3-7b9c359b-8468bf2e-c775ba13-5108853d": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "c029f002-a14b369a-f7673362-88efe082-cce22021": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "f2b84959-05a7275a-931bd2c9-4755b948-797561fe": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "5ab5fba0-c8566867-480eaa18-3c6ff3f8-87c30b03": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "7d2e3c50-e0ca79fb-74b46922-68f9cb02-e05269e5": [ + "Cardiomegaly", + "Edema" + ], + "9d3fc285-2804e9fb-140f4830-54ce06d4-478a8abd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "a02fc8d7-4d89d7b2-2bcaaf26-ebd72059-2e9d5341": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "2247b067-ee0f755a-9ea52034-1cc6095d-1d4ea3df": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "09c510a6-55f47c1d-504f429b-f333cf7f-7ccf6ac6": [ + "Lung Opacity", + "Lung Lesion", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "ec72dd86-36c802f0-20a909ca-8cbcc950-58733cd5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "ff6e7a7d-9a6dcd6f-295e7a94-b49fbcc3-502bd3ab": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "42ca3426-3c2dc573-7e2d42fe-aa2b9627-d888b47b": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "a6aacacb-72188cab-113e38f7-dc63b7cb-e0b3cd1a": [ + "No Finding" + ], + "e872e235-dee5ac10-dfd4a5e4-e40a9a02-73e5ee8a": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "614cf968-41dc136f-73eb6d42-6b73032b-e0dde637": [], + "96970f3a-0571b454-3baba4d3-45236f65-abf7a9c6": [ + "No Finding" + ], + "8aa4f925-9b6e30c1-526619f6-79135e41-713c105c": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "a14d938c-b4edf238-b00dca2d-348b1732-ab6959a5": [ + "Lung Opacity", + "Lung Lesion" + ], + "645f7236-8ba1a267-2b01ad31-b648d484-41279141": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "9ec0cfcc-56c60789-9ba97090-78a9c166-1429115f": [ + "Lung Opacity", + "Lung Lesion" + ], + "67c9c5c6-f729ea08-a8ff4f27-2c8591bb-09775150": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "fa46f7c1-2f7b2152-3371f918-8971f374-e6405bae": [ + "Lung Opacity", + "Lung Lesion" + ], + "8de65847-743ba591-16ca4044-0b5f1002-f1545e14": [ + "Lung Opacity", + "Lung Lesion" + ], + "cf6229c4-0dbb5dd3-64610954-17ed414a-c7d2837d": [ + "Support Devices" + ], + "c6b71b77-d56881b6-ee8c63bc-6ee0be88-89856367": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "c57c824d-1eddb1d5-5933f11b-3da0b20b-0bd14eef": [ + "Cardiomegaly" + ], + "adcf4325-aa59cd31-be329869-32fd0147-d3cd1387": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "038426f2-7b990f98-24487e3e-2bd7a156-4761c39a": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "fff8b765-4289d0ce-6805237f-93fcb87b-f911319c": [ + "Lung Opacity", + "Atelectasis" + ], + "2a2a2146-3823d8bb-bc8ec58d-9af8fa05-fa3a7068": [], + "6021cfe7-e84289ad-c2738e0c-e8db237c-d7147774": [], + "6ca5a964-c2ca2bd9-65649ae8-f92049bd-64042102": [ + "Pleural Other" + ], + "a13f355f-dafd65c3-ab50b75f-03d32b03-0a659e44": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "188869bb-00723113-2fc28f53-e47d6be0-f22d75c1": [ + "Cardiomegaly", + "Edema" + ], + "7bd56a54-3405c0c7-7d21af62-1ceef66a-ec71da6c": [ + "Cardiomegaly" + ], + "9bfe49ac-87087878-1110949f-335e751c-ddc3d7fe": [ + "Cardiomegaly", + "Atelectasis" + ], + "80b3c768-af7774d2-b929f0f3-cc00f7e1-a8bb88eb": [], + "90e69875-9ab9608a-dcf7955e-bb4cbfdd-fb8b978c": [], + "e91b1003-a8c28551-e5e8a4b9-5eb4b147-3de2e6ab": [], + "5f6af615-3c2d172d-0e464b6c-3e9a034e-60e30bc6": [], + "96041b33-c15cc055-c1ef5f96-e24f995c-ce351b23": [], + "cf5f1f4f-b4d8bc5b-dccb823c-51fa4849-94f65859": [ + "Cardiomegaly", + "Edema" + ], + "569088a8-74656732-c1598d15-be78951b-11ca6d73": [ + "Cardiomegaly" + ], + "620749b0-65543474-81e34b55-e58aadc3-68e30cbf": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "fd6e4f88-f10a601f-5ab99df7-15c792e7-3edf3e2c": [ + "Cardiomegaly" + ], + "0e02f05c-dfa11803-7fd610f9-7011086c-eeeeb1fb": [ + "Cardiomegaly", + "Atelectasis" + ], + "3ad494b4-6c39cc5d-18af4458-ca534fa5-36427e1e": [ + "Lung Opacity", + "Atelectasis" + ], + "2ac6104a-c3b0665e-6f5c6160-3696dc6e-a07823dd": [ + "Cardiomegaly", + "Edema" + ], + "415deed8-eaa62a51-8e593fd1-984c1ee8-2f0b5e2d": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "e9683fa3-283e5f0c-c05c217c-b320d070-4a8e9fc0": [ + "Cardiomegaly" + ], + "9e39cc45-a2ff14d4-3339ec28-dae4711c-f856e2b8": [ + "Cardiomegaly" + ], + "c33529b6-0bc71076-a10b08f6-ef0692d4-2c28d98f": [ + "Cardiomegaly", + "Lung Opacity" + ], + "8b177416-806e9ce8-3b975084-9b91c002-0ca6d0aa": [], + "eb015667-db827ca3-eadd5d39-1e4f2e30-bf09f5b6": [ + "Cardiomegaly" + ], + "281bf9e6-83587dc3-7c734095-ed5f7e81-5af9a6d2": [ + "Cardiomegaly", + "Lung Opacity" + ], + "3e95e1d8-dfda84b0-7eded0f8-e83090e4-12e3ff68": [ + "Cardiomegaly" + ], + "499bb691-a870a1f6-04eb8660-8523e964-df8bb1fb": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "a67e2e2b-c5902ccf-adf291f3-51b417af-5b71eeaa": [ + "Atelectasis" + ], + "c90d5371-a8f60243-4bba58f2-aa0936cb-17473f87": [ + "Atelectasis" + ], + "0edc4350-79bed040-c995383a-424e4573-a701ab07": [ + "Lung Opacity", + "Atelectasis" + ], + "a163cafe-64ffc35b-319d99b1-4a167e5b-fff059e0": [ + "Cardiomegaly", + "Atelectasis" + ], + "d43e3c28-8d1a4b0c-ef446460-413e4e0b-df3a80ef": [ + "Cardiomegaly" + ], + "5b3a073e-8c070064-383e87bc-900d5646-a15c9576": [ + "Enlarged Cardiomediastinum" + ], + "66fece2b-2fccf418-d23f1eda-9dde45e2-d85df8da": [ + "Enlarged Cardiomediastinum" + ], + "f53747e0-3dd01244-eeae450a-0ae12723-4a49d191": [], + "3f88d0d6-bcbb5cb4-27d9e806-7b3903f8-2645e762": [ + "Enlarged Cardiomediastinum" + ], + "505da1b4-ef3336a4-fb3f5e5e-09bb3b5e-eb1350dc": [ + "Lung Lesion" + ], + "a30e7a85-23910be3-967d6653-109accd7-e4101dcf": [], + "77911e4a-fb35c2ec-cd17f417-a514b2d2-47244970": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "c02b4b56-24488f86-c4b9886d-86e515ce-ae4f0555": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "56b0777b-ec731ed4-e7b2af82-7cedbe31-65605bf9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "eeb4d97d-b303714e-7efc3b02-a7b0e4a6-20127092": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "02671608-065b76e2-274885ec-ecfab8e8-3b4725fc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "f2166859-f4629ed4-014033b5-930fc410-8a9f51c9": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "37583135-5e94d264-ff4574d6-cdb16475-77c6bbe2": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Fracture", + "Support Devices" + ], + "a63e169d-68ac0a93-f335ef61-a4d2e226-449d7927": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "e38221a2-36d9eedb-5a9af804-2eba7cb0-ea8d7ffd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "28846b1c-da929f47-35763299-12d7c8fa-da2e4559": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7a32ee89-21330f2f-d60055cb-97551429-e4a105d1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "04c731eb-0cc43023-ab7dbb20-aaee6d1b-7d9295c9": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "9763cff1-26fe3d95-bb076c42-59a33d2e-4986039e": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "074f413f-4fe47c0b-104f1e39-9ce05cf9-a0df5bd4": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "9cf8e1b3-4a4ea8dd-33fc8814-862d81e5-34c105d1": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "f12f4aff-464794a0-43804b4b-647ac047-cc14b671": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "03502481-6cda13ba-cb388ede-fbd7eb62-5b02b608": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "fcacd1e7-993853b9-c2a8e32f-c4fff20c-7792291b": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "b1e23843-fd96303d-eaefd4f1-7b0a4357-08877685": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "67486f3c-a4ef806f-47d7541c-c1f00d2e-9c2f09fe": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "253ff311-29b03520-fb3b41cc-943dee43-7ac172d5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b0777bfe-820d4a8b-e6e4ec7a-7aacd190-f85113cf": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "6b0e83ab-6cdfeb29-98310cca-4b6aa8f5-8455fe63": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "9a64df47-d0610142-8f6232fb-b9e742e6-c06baf1f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "74a8518e-540825ef-5348424e-50918195-a06fc105": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "d8716bfb-b0b2d6fc-44ff5f4b-ab0a9bba-8b1a5390": [ + "Cardiomegaly", + "Lung Opacity" + ], + "cfe95f11-8443d7dd-4d3b5c96-d6c7892c-e037193e": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "3800242f-50b7f001-e4bbe30b-53ec3863-df4fe7dc": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "26429055-6f36df1c-a048f115-c1f04dc8-d04f9b02": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "57a0b97f-9fbdd0e8-f564bcee-b913d857-a57d9530": [ + "Atelectasis", + "Support Devices" + ], + "76e5c84a-6fc4083b-55704f3a-0af624ed-5f4c9970": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "e023c3e4-39101fc9-0c1d4cb4-1566e997-0080096e": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "a336fc81-7ee080cf-fe8b1be1-38aa5c12-add53acc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "09248f93-7275a552-c55b735a-29981340-e0b66153": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "e199d51c-58d0356d-8ed19c9f-64ddb8ec-cd3fdc7a": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "35c92af3-ed9be418-cfa5c77f-01d6e3c7-fcb5af0a": [ + "Lung Opacity", + "Pleural Effusion" + ], + "39ca48e7-53f0eca0-ce297a4a-84fa12a4-cb30308f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "04e9517d-42048357-acb498cb-3abdd733-bd007f09": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Support Devices" + ], + "53f32ceb-f05afd4e-d67f0e46-129e6b89-26b170b5": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "fcefff91-22ab7055-235f085c-ea9ac8ad-bbdaa83c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "c19b01bf-e57e7aee-f251430e-9a1d156e-acbf7677": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "6ff741e9-6ea01eef-1bf10153-d1b6beba-590b6620": [ + "Cardiomegaly", + "Support Devices" + ], + "e4f6de95-2089560c-4df114b1-deac3d24-a6bc53f7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "202eeb12-617bacc6-b42cd0f1-1833bd07-b12aab41": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "8d9be95b-acae4c91-b54b7471-ffba1791-2685235f": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "b9b1f6e8-15e667f7-ded64b1b-841d8028-ebf79954": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "194f6925-e9306f2d-eba4d0b5-0187742f-fb7e0343": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "9b4f1964-734c3d45-d58e0850-71a0baee-535ae2c8": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Edema", + "Support Devices" + ], + "1e3926d7-a660ecde-c6e6282e-98039f5e-6c6714c8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7f8f6ec3-a3e29283-ecbe579b-2cc82a1b-8ba750a6": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "9adf1edf-b9cd0878-60c0cc62-6a5125d2-d77223ee": [], + "aa0846b4-d00f5edd-d3cfefd0-2318b977-1c035245": [ + "Lung Opacity", + "Atelectasis" + ], + "b016415e-902049d0-94f8ea46-c19425cf-f3a5dfb6": [ + "Atelectasis", + "Fracture" + ], + "6029ba23-5d73e768-c1fe417b-73eb330f-9c507e77": [ + "Fracture" + ], + "c08e8ebb-14a3a1f0-0da1ea4e-1b2412fb-f2d4da54": [ + "Lung Opacity", + "Lung Lesion" + ], + "324bef29-0a9132a2-8b124645-f95634f0-d573eccc": [ + "Atelectasis", + "Support Devices" + ], + "ab649acd-239dc728-c8404656-da6cbf96-fb31a0b6": [], + "da96d0b2-703c1297-0c6a6193-9d2ce59a-b313489b": [], + "732f6fb0-c98d7738-2938f633-bb161f80-f30aecdd": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6722c21a-9a65dc03-dbc8707e-83f326f7-09e1768c": [ + "Cardiomegaly", + "Support Devices" + ], + "06381bf5-e227679d-9f9965ef-dbbb229c-281230a2": [], + "6a31f7f3-592b6144-a0b7e38c-d11761b4-bd2bf9e3": [ + "Cardiomegaly" + ], + "cc9633ee-0f1c87c6-d3eab33a-ac1eccd5-1bd7608f": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "4a102c0d-0f7d000d-98e8aac0-7509e4c8-b9d60545": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "f9ce0a6c-67455c98-67d8a2c9-c6e73fd9-9753b4aa": [], + "0b5f3585-a53ebe18-3930e02f-271b3e7d-836cdf4a": [ + "Atelectasis", + "Support Devices" + ], + "42f9b759-e6e7ad97-975fc45e-f1a03ce4-1f252352": [], + "2ddeb88d-f8a15dea-6de598cd-b07bef82-d26381d6": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "135f75db-12a94b0c-6c6aab28-36eee09d-648f5827": [ + "Atelectasis" + ], + "44af3e4a-0cc1e98d-377c1626-46bc8189-2c995eb3": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "48610074-8aa6ab8c-7c20f23a-7e26d775-88ee88e4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "b7d77fd6-bf863ed1-0d7c7510-dde731ba-1e25abec": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "777338e3-04154e90-8effe703-6c2dd4dd-a358f687": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "8011d9cb-8f3ea017-86ad36bd-5e7380ff-32005f00": [ + "Atelectasis", + "Pleural Effusion" + ], + "107bf819-bd17b10b-9fa1cd26-692e07cc-b408328a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "a044ddbb-f45fc0ce-2f0a6955-8242603e-184c26b0": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "ce079139-3dd3fe97-6c8688b6-c1ff49b1-d8b8585f": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "19e28a2e-5e1236b7-de13744c-f68b83ff-fb3e1c2f": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "73ca3214-e0c93052-7e191b81-356439da-354da5eb": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "2e82b549-d2fb6a33-4747e742-d21b905f-813ff996": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "3d84712e-208c4347-e4890359-8cd17a21-d9d36d5b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "55b170c5-0d2cca30-fb9f4563-9b2f14f0-3b5f0a22": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Fracture" + ], + "137c9581-82049ac3-2bce7676-8032c119-9845711c": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Pleural Effusion" + ], + "4669639e-0eb499f7-605cb393-d4ef9323-7f6c47df": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "4eab5702-5e51a961-a59e4e84-b5aa758f-4e367b89": [ + "Atelectasis" + ], + "5498ebad-1de79102-660933b2-1ccb95d8-318211a8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "00f1a123-51de83f7-4d563a12-f705f4f0-4683b4eb": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "ceb36d05-686e9404-43dfdc4f-e050bf09-89b8d71d": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "9a046e7c-057d79d3-d97632b4-19afc34b-e0beff6a": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "bbe08fc1-a56aeae9-bd7c72ec-ce35c2c5-b033ef08": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "e2a0ad89-ad9f7213-42de3b6c-34d942a2-c8f7ec98": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "78ecaf71-9fdb0b43-b0134402-8c5e739f-2c6c0ea2": [ + "Lung Lesion", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "44c6701c-01fdf8ac-ecb8f1a0-821850a7-a8fe9ac5": [ + "Atelectasis" + ], + "99a719f1-338c19ff-4c6100c3-a98e761a-254572ee": [], + "b2322fdd-cfe8ca16-f58f8a07-206b7440-5ff93a26": [ + "Pleural Other", + "Fracture" + ], + "9df378ca-1a460144-f9bb32fc-35303d15-8b86f4c9": [], + "99afae49-8d95e258-a1717ce5-74e8f9fa-715ae11a": [ + "Lung Opacity", + "Lung Lesion" + ], + "41479840-5d9f3cf1-ac29c4be-7007cfb9-37e379f3": [], + "32f29bbd-708c39d5-e0e01140-65e5a8ac-a2a6f01c": [ + "Lung Opacity" + ], + "a17b5dc8-d644c07f-3d06ab54-851e9dee-b8643fad": [ + "Pleural Effusion" + ], + "d958a1d3-977c9fd6-0296ff8d-bf5c5aa9-8894c621": [ + "Atelectasis" + ], + "2562051f-7aa8f63a-d00bafea-ddf082c6-838ba1fd": [ + "Cardiomegaly", + "Edema" + ], + "42721071-6d96b2ed-f083c7d3-5f14b0d5-a7845fc1": [ + "Lung Opacity", + "Support Devices" + ], + "067df4f2-ba0ae770-919c7d21-9186536c-9c0f8174": [ + "Support Devices" + ], + "9b350f75-7f987b20-092a7bbf-84be3535-8bc72c1f": [ + "Cardiomegaly", + "Support Devices" + ], + "4c813a56-c3955f56-d8575305-9347eb08-6c581dc1": [ + "Cardiomegaly", + "Edema" + ], + "acddfc4f-6bf56983-900fa34f-f650d62f-a30c95af": [ + "Support Devices" + ], + "0c0e3903-2f744a5c-3750bad4-6d772736-6bf1c8a2": [ + "Support Devices" + ], + "3e179ec6-2dd8aea9-b1ef694b-eafe6ce6-0a175813": [ + "Cardiomegaly", + "Support Devices" + ], + "7688e895-1ec37491-98ad4a70-8efc45b7-f8ba74da": [ + "Cardiomegaly", + "Lung Opacity" + ], + "13a5d3b6-8cf4d79a-807319e4-1292cd55-39f57349": [ + "Pneumothorax", + "Support Devices" + ], + "6e436657-6f0023be-60aed3c6-bdcf88c4-bb1c2ffc": [], + "967de454-d4c2476c-b73d6db8-ec0ea754-a14f4631": [ + "Cardiomegaly" + ], + "dc58c102-bad13ac3-47c05317-4b782618-24b81e59": [ + "Lung Opacity" + ], + "608b0d80-17eff322-aea174f9-714f31a8-41683ee7": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "2e078e3d-01673fac-4158a2bb-fc53694d-0a68bb67": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f0f0f362-66be2ab0-3210b813-23d16481-c7a59206": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "486dfea4-dc27bc78-a4e9effa-c328c0ab-a8c3285e": [ + "Support Devices" + ], + "81283cfb-7bfa242e-22317b9e-f2979399-2788b211": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "86deb04a-2c61843d-5acda394-6b0cd2e7-40be9dd0": [ + "Support Devices" + ], + "0fef51dc-8e713f62-0c7f23dc-fb145074-68b8ec4b": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Fracture", + "Support Devices" + ], + "6e7ba50c-a093a0ce-c9809007-6ffac781-93024486": [ + "Fracture" + ], + "6cf93674-8fe57ec0-cf9d01c8-a4e2f45a-ab599448": [ + "Pleural Effusion" + ], + "f99f8714-5e5a416e-ab4d7b84-1c4f38b2-32864a70": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "0e3f8459-2b944097-bffb91c8-6578b8ac-e143b9a2": [ + "Lung Opacity", + "Support Devices" + ], + "cf2669d1-d8463824-d4bd7e26-0594a737-b89d33a4": [ + "Lung Opacity", + "Support Devices" + ], + "dc130e93-8226ed32-f9924895-6be11d35-3d395b3c": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other", + "Support Devices" + ], + "e298beba-572ccfb6-74c46bda-11c4beba-0ca3e906": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "79d6fa76-8cc30af0-1dba3386-66e2a784-e134a348": [ + "Support Devices" + ], + "8f861239-cf7f8611-13631eb1-e7c4188f-f39f6041": [ + "Lung Opacity" + ], + "ca198d4c-70be63ec-5974f3e9-d6320a38-4eb83158": [], + "1ea90c74-cf4ca390-7da19bed-34cd7568-a183d924": [], + "a09b7aaa-77f7ca90-d3e26f5c-782a561e-499254d6": [ + "Support Devices" + ], + "555d2282-7ca48bd5-2e68791a-778b0044-8fa2ce6f": [ + "Cardiomegaly", + "Edema" + ], + "b9d3a2a8-efad6e43-fd5c9461-389ea619-4454f98c": [ + "Cardiomegaly", + "Lung Opacity" + ], + "0788829b-5419d8e4-5ce8eb81-87a77c03-98c15a1a": [ + "Cardiomegaly" + ], + "033b5311-bd309afe-0b070613-65e6e2f1-0481fd48": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Fracture", + "Support Devices" + ], + "bf2bacd5-b94c49e9-68a69f71-b5d6c169-1078cd4b": [ + "Cardiomegaly", + "Edema", + "Fracture", + "Support Devices" + ], + "8663aaa6-c83d78b8-ff43e08f-5ea79d11-e7cca33e": [ + "Atelectasis", + "Support Devices" + ], + "8a1b28a3-0922cd6a-282ceb83-59fd9271-ebf56ff4": [ + "Cardiomegaly" + ], + "e5382fdb-74985bc4-2fb7ed30-c1708f5c-3f136ee4": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "474c4fbb-14f486fd-a3c9e647-da14a57d-dcf9e39a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Fracture" + ], + "13c8c746-5d1d71f5-af021e53-041a96c3-710e3730": [ + "Atelectasis" + ], + "6acc427b-57dfcb76-42bfe32a-060177db-044a5c6f": [ + "Lung Opacity", + "Atelectasis" + ], + "74b808ff-f5c9a368-31feafce-c0e5c66d-d251a32c": [ + "Lung Opacity" + ], + "b78b1110-28e93f4d-b7e0e8f6-22552c4c-b967810b": [ + "Atelectasis" + ], + "41df0913-e1804610-248fbdd1-6c00cbe1-01bebf5e": [], + "e7c283a2-7103747a-f58558d4-48c8259f-aeb043ac": [], + "2830f665-0aaa29d2-595be5a7-693ce7bf-c71d0c0b": [ + "Lung Opacity", + "Lung Lesion" + ], + "9188d253-7432f199-b8668189-c4b015e6-24ed4f79": [ + "Lung Opacity" + ], + "3a95996c-94c41329-d656550a-90424b30-ec861fcc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "5ace239b-61b2f2f3-103b0d93-d3803c39-ef06ca44": [ + "Cardiomegaly", + "Lung Opacity" + ], + "c768ecd2-dec91075-b6e6d204-6a9d0da8-e1ce939a": [ + "Cardiomegaly" + ], + "0efbdb11-4a6e04cf-2acc8b02-8b0ee7b6-36a1e507": [ + "Support Devices" + ], + "140516cd-0a4265d2-ce7c8e15-37036b48-42fd24d5": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "5ad6463b-b79f3447-bf9c7db1-e6fc6f3e-da500463": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ce6c73a2-bfbdbdf8-f7f014a2-bfffc5e3-232d2d80": [ + "Atelectasis", + "Support Devices" + ], + "837cc5b5-e15e87de-3fc53c74-c391e8b0-c7e53396": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e51549cd-cbebd9a4-0aeaabab-5fa2f8bd-b76c2577": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "84fdafc6-cb74b0f4-e01856b1-7af27b87-3d01f692": [ + "Support Devices" + ], + "9679cd55-37b997e0-0205c229-df3216c2-705327c9": [ + "Lung Lesion" + ], + "b973beee-a64f055b-a96181c0-05105bc5-25dcc796": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "5dd97738-76c3ff89-82388c36-9f34d2c3-5073e305": [ + "Lung Lesion" + ], + "f33df19b-40b70f49-e2089e24-af20049c-136fb213": [ + "Lung Lesion", + "Support Devices" + ], + "63ee3ff5-d84abed7-10208fcd-96b68026-bb55b8ff": [ + "Support Devices" + ], + "805c8f03-c6d068dd-c95f546c-e1dfe872-324866d0": [ + "Lung Opacity", + "Lung Lesion" + ], + "1ed95e47-83a54489-79ebd823-db934045-acd7ca23": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "33bd9626-0ea91dc1-d8b6449a-1b20afcb-19da17f2": [ + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "8faff40c-536b8347-b1b760e0-182dc706-77835a8e": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Support Devices" + ], + "de01c9bf-3fb74041-71495a3e-efd82101-cace2aa7": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "404dfc42-ee2b7f16-1f8535c6-eddf267e-b9f928e0": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "94f5ba63-5b0649c0-63f21058-2429a6c1-291139cc": [ + "Support Devices" + ], + "a6dc99c7-6d793ce2-188bd506-b751deab-79f8ebbb": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f90437b8-3b33ff29-c06a7caf-299995e5-2da5c2ba": [ + "Pleural Effusion", + "Support Devices" + ], + "32f086b1-c463fbe9-679d7bcb-50ac810a-fc5cab93": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "45dc8b2b-703d5d88-d0e05f85-35cc43ba-84b1f4be": [ + "Atelectasis", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "2598d2a4-fec32ad4-e6bb68b9-b6c86b6e-ec0a7008": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "24a1e121-f2e8a2ee-fd9ceefb-fcd921af-d278d679": [ + "Cardiomegaly", + "Atelectasis", + "Fracture", + "Support Devices" + ], + "c405b126-03d888ca-314564ad-3797a458-30e53586": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "688ba1bb-09e43b44-39a4a90a-e52ce698-74c13302": [ + "Lung Opacity" + ], + "a82741ea-8169b7a6-82642ef9-7c78cbbe-95583ecb": [ + "Cardiomegaly", + "Pleural Other", + "Fracture" + ], + "bf028214-cb0835ca-30254541-ed6392a2-5d347a09": [ + "Cardiomegaly" + ], + "64c4f3ac-5b12f9d8-de62c4d5-1980be49-28cd96f9": [ + "Cardiomegaly", + "Atelectasis", + "Fracture", + "Support Devices" + ], + "441735fc-34bd0286-fa539675-6602e72a-1fed5ed4": [ + "Fracture", + "Support Devices" + ], + "9ffe4a2c-7cf9a8f6-c97f630e-4618ae86-c49236fd": [ + "Atelectasis", + "Fracture" + ], + "ac34d85d-8a18bdb4-6a76e6b3-63e71de7-dd331e6c": [ + "Cardiomegaly", + "Fracture" + ], + "7314ab8f-787ccb0b-f465183a-18649a4d-0d37cc0e": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "18538733-4a1be639-4094697f-10affe45-2dcbc4f7": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "84d86cc8-682db79b-a57522b4-e65281b6-4d040d2f": [ + "Cardiomegaly", + "Pleural Other", + "Fracture" + ], + "ab2114b6-c5b3b7af-e612df5c-e298eac2-774abd50": [ + "Cardiomegaly" + ], + "c85fa16f-34f0c26a-08f8aa53-921a401d-9f4c42fa": [ + "Lung Opacity" + ], + "478c08e1-e7a57261-02125adf-77d9e924-251135f1": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7e35b00e-b26953b2-8748806e-5162f99f-feffc6b2": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1e6ed6ad-8dbe2951-bd1403ff-307b58bd-27c725fe": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "49c67d34-b57aa84d-37146bc3-a1b0773c-ef5be03c": [ + "Atelectasis" + ], + "80f8c1cf-51619e01-2da83861-7c12a49d-f6858e53": [ + "Cardiomegaly", + "Atelectasis" + ], + "6fa0dab9-9c76b1c5-e420ee1c-d851a556-a50a5a88": [ + "Lung Opacity", + "Atelectasis" + ], + "f268f466-63237ff9-71f67025-2f256fa0-8f9c0e56": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "083a3e76-48cf31d2-b2f088df-9c323345-ef72f46f": [ + "Support Devices" + ], + "cde578b4-835fd6d8-52f31743-1cefcefc-0fa3157d": [ + "Lung Opacity", + "Support Devices" + ], + "63800411-62f90656-5cf911fc-be848697-8aca7551": [ + "Support Devices" + ], + "81450711-ce3a0e1f-48fce3df-720d7107-44bf0a49": [ + "Support Devices" + ], + "d9e22dc4-c2df3c29-6bbda3ee-d5d33e26-c93e5f4e": [ + "Enlarged Cardiomediastinum" + ], + "2d45a143-1df013b8-730bd381-c219de78-7ad22f77": [ + "Support Devices" + ], + "f9939219-9d47f1d2-245483ba-56d3429b-896a3f2e": [ + "Support Devices" + ], + "474305f3-1346d14f-d554552c-d0606af0-2edf1cb9": [ + "Support Devices" + ], + "657c695b-0198a50b-2cafb23d-85b6cd41-78172777": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "94b32e23-d24b60e0-3b7cd3fc-cc82139f-94517432": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "cd70d994-3c669ab2-ccd5f3bc-4276428d-b7fa3155": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "eb810218-60a5a044-852328e8-4cdeeaef-1befd540": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "90e79548-fcbab121-6100c047-b413fab9-912f13a5": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "060219ba-448fe7d4-8a19694c-92b20db5-74035416": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9cbe3071-02f095d3-10c4f0a5-6fd36d4b-4affe81e": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "0bef8ba1-43fc24e0-70fdb6e1-979af2ea-5243f4b6": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ccd9df65-03a33fd6-372e070c-1b36c943-a18d8378": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "a30e6be6-cdb72787-3efd0ffc-438f4522-1a95c8da": [ + "Support Devices" + ], + "a3d44928-d6b84811-5b2676b1-f659918e-bd270e68": [], + "cc410dfa-e21285ff-d25cfafb-848e6791-99fdc276": [], + "4fbab26c-0355ac52-0e5488f4-490701fc-88f483cf": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "02c9f4f3-ce818858-04a867b4-0c5c1823-e247eb67": [ + "Cardiomegaly", + "Support Devices" + ], + "6dd1de7d-99ce0b82-cd1c5e0c-f5046bb6-8f5d23ba": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "752ff05f-db827c7c-ed3d5da2-9e656319-b02ff663": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ba021d0f-a80b547a-f46e1b2b-5b0a8ce9-3507868f": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ac124350-20557267-dc926c7c-b39bd160-ace9affa": [ + "Cardiomegaly", + "Support Devices" + ], + "d504dbe8-1c4f781c-0df439c0-f9d111e3-383d8361": [ + "Support Devices" + ], + "23a461cb-eb3f1804-b272899e-c6e30098-39682b9c": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "8c2fce76-c091c053-ef8d7d20-227a5611-f281c15c": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "a9991719-341a4cd1-b3b0c49c-17109b1c-238517f4": [ + "Lung Opacity", + "Pleural Effusion" + ], + "5696d6d7-d428a678-f3adc77d-66fccbb3-3e9cc81e": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "58d7d80b-3610f757-0e540435-44dbf9dd-12c5b583": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f3b42407-6b2326f3-2497e880-ce2defbd-96071f1d": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "832a229c-642318e5-0b042be6-fc394a0a-c8c99a46": [ + "Cardiomegaly", + "Lung Opacity" + ], + "fb85016a-bff648ee-d64f0e6d-8bf72ac1-ce274815": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1a5a59f7-d389a59a-1d55691a-0a77b80a-96ea4108": [ + "Lung Opacity", + "Pleural Other" + ], + "59a459f5-0bd58411-1d739d65-1d7477bf-92d830cb": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "4b21950a-5565f60b-5e86b9fd-fde33a71-2a564240": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "64e9fab8-be276430-8b0b8d08-b7aff644-5d287946": [ + "Support Devices" + ], + "c3b3a7da-a23fa428-bfdf622b-e03af5b4-401c60d3": [], + "02277520-0c2f2dfc-48595e9d-67e7b3d0-51eb5d78": [ + "Lung Opacity" + ], + "e03d6b55-39250a31-cf04e3c9-99bee8ed-77e6e3ae": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "39e30ffd-62d209bb-27422c59-4d36909a-855e11d8": [ + "Lung Opacity", + "Atelectasis" + ], + "74e72ac6-d04d2e9a-135b0911-cce87e45-cdf6d625": [ + "Pleural Effusion" + ], + "2f04b963-317903c2-c937a1b3-84194e4c-5ce01852": [ + "Lung Opacity" + ], + "c149c26e-5a990901-a0cf8313-6cfa1098-34b1fa4c": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "21e742f7-ee50e64f-508ad946-db407641-972bfa79": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5cf6cfe2-4b16c014-a74dabde-ab3726ed-2cbdd4dc": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "89fbc7f3-542fde0d-c914db57-f46e285f-22e70ae1": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "8f578d66-1a95b16a-8fce51d0-76b09aea-4f1980ca": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "2d669c63-3ec31080-3ee62b8b-7002f5b5-bf8e73b6": [ + "Lung Opacity", + "Pleural Effusion" + ], + "cb581d96-edd1855f-79bc7a49-e942ded5-fb83c971": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "2b9d6438-d4549d50-64eabcc2-0159f860-4702ea69": [ + "Lung Opacity" + ], + "cb451dc8-9467ee59-467b472e-f073a381-46f219c5": [ + "Lung Opacity", + "Atelectasis", + "Fracture" + ], + "126d1e0c-613de8a4-7f1cfd82-86511457-4cc0543f": [ + "Pneumothorax", + "Support Devices" + ], + "81da6609-5b1db1a9-985ed5af-0ea8bff9-d2ae3e08": [ + "Atelectasis", + "Pleural Effusion" + ], + "c418a7ea-f382ef9c-a8aa6045-d0ecf7cb-87214437": [ + "Lung Opacity", + "Pleural Effusion" + ], + "0172482f-ff4eeb46-e6e40eaa-2659ae08-97fb1158": [ + "Atelectasis", + "Pleural Effusion" + ], + "928e66f1-87ef1b9e-0ce33e37-760d835a-a539e8b9": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "243970e9-b0a7958c-31bb275a-b862a345-294f46b1": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8a31b2b4-ae7e2d63-755cd377-936102cb-9bb02fac": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "5cc8a35c-430e95e2-0ece986e-69a22503-cc4bf39e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "4b2e0e56-c92f64a6-040f8d1f-05d28ea4-b7a14044": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d1cd470b-709eb217-69977228-14bf4f2f-c0457196": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "9b9cce32-6e61e5c8-31b59b5f-9aa235c9-7fc98cb1": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f59791dd-2e8e1e7a-607b2f6e-18b713c7-aed09023": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "0d930f0a-46f813a9-db3b137b-05142eef-eca3c5a7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "3316f535-55fb94a2-9ced6576-f0cb4da1-83d82a05": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f4adee4b-4f00cc47-63f9ed2a-b4432064-a81ec91c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "aedfcdd8-6438b27a-5d6b20d6-08c03afc-b40c0830": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "053ef377-da66ede4-ca590556-c5ee239e-a4d98f53": [ + "Atelectasis" + ], + "aa9371dd-52fdb59b-0cafade1-142e3fc3-116591ab": [ + "Atelectasis" + ], + "3338ba8a-3a7be5a3-380128ed-7bb1359c-14e4c2d1": [ + "Atelectasis", + "Pleural Effusion" + ], + "a19deddd-1fd8b1e8-1cd65322-2e4f8c1e-086650bd": [ + "Atelectasis" + ], + "20973f59-31a0c792-a3f0870b-bebcadce-934a76f3": [ + "Edema" + ], + "50c4c3e6-d6b87643-54baada6-a0fddb5a-90bc4307": [ + "Lung Opacity", + "Pleural Effusion" + ], + "703e42a5-6b45dc45-ddce2dde-27e08236-58af4c95": [ + "Atelectasis" + ], + "e6d71509-dc72fd32-c28ba98c-46144671-e24378dc": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "0d3ff5e0-5202a70f-86af9d84-eec64254-845e87d4": [ + "Edema" + ], + "48d2fd47-8df6a41f-106df2c8-bda4ee13-ab4eaa22": [ + "Atelectasis" + ], + "ad2d9faa-b8c9c2ee-833f7217-e4abe541-ffbe0f8f": [ + "Enlarged Cardiomediastinum", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "38c65a6d-f4aef98f-d9b4f8fc-37878bd1-8cf123a6": [ + "Lung Opacity" + ], + "880f55b2-21e9c680-823ecd8e-9ac3a7b2-836baabb": [ + "Atelectasis" + ], + "1942d8aa-bc12ddf0-57ea2c73-ec049fab-e766a8bd": [ + "Atelectasis" + ], + "52a90633-9e1c7301-df020424-ea6324fd-64b0c5f6": [ + "Atelectasis" + ], + "459cfba0-0e5fabcb-a6cd2ff8-887d8f8c-59a166aa": [ + "Cardiomegaly", + "Atelectasis" + ], + "0c0c6328-356ed105-d08d85dc-d48519a5-37ce609c": [ + "Atelectasis" + ], + "36f6dd1e-fefeef89-03c80035-d373c61b-1a4e895b": [], + "f0de6eac-d8d4cc43-59d26e49-46200472-34fa5de1": [ + "Atelectasis" + ], + "65c9e42e-6093fd2c-66ffbba3-b6fa9d18-48594809": [], + "ceb97930-fe5ec7d6-6ee4c8aa-56e46341-d0fbfd43": [ + "No Finding" + ], + "cf70ca08-0d94fd1b-e54c0121-98ae7205-8f0f48e4": [ + "No Finding" + ], + "01ceb247-fa13bc0e-8819e99f-9df1e9e8-bba88b3d": [ + "No Finding" + ], + "2a5046e4-c023b60a-61a89d1b-464d705c-e2b1eae7": [], + "c6d30763-f0410801-1fbc901e-31d0633e-b345afbd": [ + "Lung Opacity" + ], + "e8f40dc1-eb1d35c9-581a0b09-a78294c8-1a9ab9f1": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "35901623-dfa281b0-60bd2a48-cb5eacfb-bbab810e": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "72e66342-77147de7-49a4d205-c29b20c6-4afd3987": [ + "Cardiomegaly", + "Lung Opacity" + ], + "a4782cf2-0d20d835-419b812e-de98d053-800b9d29": [ + "Cardiomegaly", + "Lung Opacity" + ], + "1f4a1a92-7c6c27d6-649767ec-d3ca03ca-885c6ce6": [ + "Cardiomegaly", + "Support Devices" + ], + "50da6cea-7757397e-e0e5175b-5dfd32f3-3183a4d4": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "fe10d1ed-22968c1c-23c84bf4-ddc23640-bc64a3ed": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "75f21a8f-79c74bef-915a62bf-6f0fe729-8b59663a": [], + "914e8aae-98977714-95bb2a56-fbd74998-2c926045": [ + "Atelectasis" + ], + "9c04078c-dee8c858-bc2a105e-d5fb538e-ac5a7c69": [ + "Cardiomegaly", + "Support Devices" + ], + "171a0854-5913620e-72072890-3fec961c-fc4bf535": [ + "Cardiomegaly", + "Edema" + ], + "250bb626-f805c9f6-d82488e1-019d8362-ddb9eae6": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "369dc5bd-70bd89d0-2d90fa80-f319ec1d-fb2802aa": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "70da9ce8-660f957c-cff2916f-1e067a32-1f7149f9": [ + "Cardiomegaly", + "Support Devices" + ], + "bd3badf2-83c4afdf-f177671f-f91d008a-5751464e": [], + "fc2dd069-a9848695-2c9cc70c-cf06c0f6-38694917": [ + "Cardiomegaly" + ], + "8421105f-75a36b56-fb945313-e4f6d3a0-e2876c01": [ + "Lung Opacity", + "Atelectasis", + "Fracture", + "Support Devices" + ], + "f3c65ae4-81c03654-c3fe857f-dec24a17-a5a118b9": [ + "Support Devices" + ], + "4bc5f178-5d714644-9cc072b9-d1ac0ed5-b4db2ba0": [ + "Support Devices" + ], + "789d985f-bfb9d5d9-23015f62-51fcef07-ef80abf5": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "88182eaf-e387089b-7ec2ced7-6cfa0fb9-6f390847": [ + "Cardiomegaly" + ], + "92a2a181-8f508ced-b3cb8aae-f4da8efa-3df4edc0": [ + "No Finding", + "Support Devices" + ], + "14a4a35d-8763ba28-085afc05-45f80848-08962597": [ + "Atelectasis", + "Support Devices" + ], + "ef4d5d47-62ec7452-7097cc7f-0096727c-ed1cb6cf": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "34385126-4e8184f2-e9ac8e38-eb0d5a59-31d37002": [ + "Support Devices" + ], + "4913b433-92aff6ce-813d647b-e068ebfa-58ce7426": [ + "Cardiomegaly" + ], + "cf6d711d-4ed1bbca-7013760b-7cc2b8ef-925ff493": [], + "e8f94964-26bbd138-d2b7248a-e4fd514a-35beb87c": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "1d5931ea-ae06916c-5082d79e-ce203e51-6581ddc9": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "6f94d91b-92a0152e-bc6fb29c-649edaf8-b41da231": [ + "Support Devices" + ], + "ff8b2af5-e8c313a0-9caec8e9-f6a90929-3b53792a": [ + "Cardiomegaly", + "Support Devices" + ], + "37d75746-aa6bbc7a-bbbf7bd9-3bb0f97b-3bd37684": [ + "Cardiomegaly", + "Support Devices" + ], + "374f8822-3c399f31-c5e13e37-a6cc8245-cb3cc735": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "74539665-467d0bc8-6f5c9920-f9b6e911-a6f92f44": [ + "Cardiomegaly", + "Atelectasis" + ], + "aef845e2-53646bbc-a445e270-6f279d07-6a13a71a": [ + "Lung Opacity", + "Atelectasis" + ], + "81662f3f-0c97fb86-66099abe-260ad401-e1d61e16": [ + "Atelectasis" + ], + "978e2939-4844d38e-fd154225-ef3f6933-59c3ead3": [ + "Lung Opacity", + "Atelectasis" + ], + "86d4ab20-e9abbc54-b65af50f-128d2b48-d9884715": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "411abaf0-f8b81683-e86eea4a-a3ea2b62-2d262a90": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "8a2ac87e-67bd3fae-31632688-1d6dbc89-594ca350": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "c4b67dd3-d40261f4-896ca5c9-acc7cde5-d93ec993": [ + "Cardiomegaly", + "Lung Opacity" + ], + "30daa1b3-c4b0ad98-ca413c68-077af6c7-6565dd04": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "8a046a64-8ed795ff-765071a4-668a3e83-c8c7fa28": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "4a07ec47-07219c0a-f144f691-b0625175-f58f47d0": [ + "Cardiomegaly", + "Lung Opacity" + ], + "cb8f1bee-76ec4235-a62de65b-43589ff5-04413eab": [ + "Cardiomegaly" + ], + "e7a760c7-d8b172fd-0d9baa9c-ffb863c4-f297e5b8": [ + "Lung Opacity" + ], + "8f3afa87-cb2c2fec-210903d7-8faa6559-a7b6bf8e": [ + "Cardiomegaly" + ], + "34a10323-881113ce-bd77fb85-f57b5c48-160f4e7b": [ + "Atelectasis", + "Support Devices" + ], + "8f647240-3f5e4425-7c6a1798-7fa8005f-ecc04d35": [ + "Atelectasis", + "Support Devices" + ], + "6b1a712d-b6ee334a-b3bc78ad-38095ded-c4486183": [ + "Atelectasis", + "Support Devices" + ], + "c1b6f0b0-c201e15c-84aa8630-f1c9dba3-2c2a1773": [ + "Atelectasis", + "Support Devices" + ], + "26cd4845-5c52d871-e5d996d0-a2113787-630c0309": [ + "Atelectasis", + "Support Devices" + ], + "8328656b-7a7c59ec-fba66d3e-d4e3b7d3-2d5332bc": [ + "Support Devices" + ], + "e28d8d90-6270d7bd-ea44579d-8f6861a4-2d4a40ae": [ + "Lung Opacity", + "Lung Lesion" + ], + "3266c7b2-a469a79f-ec915bdc-b0101f49-8eaaf917": [ + "Lung Opacity", + "Support Devices" + ], + "478635bb-97f592c6-a8494bc8-4ff177e8-ead686ca": [ + "Lung Opacity", + "Support Devices" + ], + "615687f6-9c68c0c3-ea00fb31-0987abc8-6d4be9c7": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "68e2da8e-4b0cc570-5f6dac62-dd096bf8-ce452663": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "89a623b8-0f8a2cb9-e027aaf4-7b5828f4-9480d3a6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "3aaa5c44-b88aa530-0f177d6e-7feff2d9-7d4890e2": [ + "Lung Opacity" + ], + "bdc767d8-f9566903-2dda971f-c7110e57-164c5277": [ + "Support Devices" + ], + "39513708-faae323a-d74bc04a-b49a24ec-fbe051f6": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "62e28fc5-93fe9a0b-36f25627-e72bcdc7-fddf5f6e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "a445c04c-f8447b3a-f83c989c-97f7024d-ba4c2370": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "7cb5c502-ad66f0fd-1c7fbbaa-d1dffe8f-1a2416a3": [], + "a0578edb-12a640ca-1ddab351-089c4d4c-00bb6f19": [ + "Cardiomegaly", + "Support Devices" + ], + "ce6bc473-864aa830-25f637a2-2a8c99c0-f7f68138": [], + "41c8cba5-a0d8e773-24645a1c-2326cd47-77ef0674": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "dd3bb5f4-72efaaca-854cacfc-e1b8f92d-745973bd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "e9d24dd4-53a3cddf-037262e6-499b0f3d-de0ab4eb": [], + "93f5ae76-d350d7b5-e47e23fd-d455db66-00627ccc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "2d13a8b7-f90c5932-218e4fdf-056b5c2f-550c0a09": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "04d8b146-8f27fd48-e07afc43-464529fc-57350e1b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4e44e0c6-f6bbfa6d-36e48830-791d6141-78bb36e6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "01c5daed-cf6a5552-a23ad3f6-5850acca-d9619ea2": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "469c319a-57c55551-e71b3f83-73849157-a180b0ee": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "62969c3a-e3c22e1f-1e3ca640-6a048fac-c5b86dbe": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "efeee902-a228cde6-a6a4b031-7c26bc53-842009b9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b74e11fc-805d197f-bbcb7e01-986abcbe-6152c60b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f0e11656-d359330e-8e7c2e5d-09c9d0d0-583da81f": [ + "Support Devices" + ], + "61ae8e67-88ced0e9-c454f0c6-1cb71dd6-26e77a9e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "a0ff876f-331fe46d-c522fdea-c26a2300-676e3cfa": [ + "Cardiomegaly", + "Support Devices" + ], + "fa9c8854-7c936fd0-4432d579-5cc2dc60-c78d9525": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "1072c678-fa1edea2-a74424cb-595778ce-39f7fe0e": [ + "Fracture" + ], + "efbcd2da-2625a5bc-38ee2bcb-8a2bb9a0-43484906": [ + "Pleural Other", + "Fracture" + ], + "2984b553-968b208b-bf70cb3c-d5e5927b-193c26ef": [ + "Fracture" + ], + "4dab8652-904d5fa6-0cbdc7ce-b4ef75fa-17ddb82e": [ + "Lung Opacity", + "Lung Lesion" + ], + "9fbaa017-94a89bbb-b4769219-1ce28b02-d60a8caa": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "af8f292e-eecbb702-9aeef1d2-46861e97-709d3307": [ + "Lung Opacity", + "Pleural Other", + "Fracture" + ], + "67d864d4-d51e968e-6523ea3d-51098156-ed3ea015": [], + "eb9147c0-673fd900-e2943f09-d750c819-dbbf834e": [], + "24960743-14f426d7-d057ceaa-ea719e12-5534250a": [ + "Cardiomegaly", + "Lung Opacity" + ], + "9c67a2e3-68620391-2e5a5578-0433f757-1eba00c6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "35e71750-ddfd8ab7-6727d134-ce5dcbad-b91eb45b": [ + "No Finding" + ], + "5c8c0263-8d94687e-2a7896c8-5682bae9-6aeefbc4": [ + "Cardiomegaly" + ], + "198de658-1227d01c-476b2711-045c0b08-734edabe": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c5257468-fb41d9ce-701fc319-a6141214-92bb351c": [], + "475838e0-f584ba2c-4e4b584f-7b63fdb6-7fa998a9": [], + "55249a04-13ab44b1-04c4b5e6-803f6e35-0c091a7d": [], + "7d6acf38-2ce33bef-4722c2e9-c0f089ec-c06a5100": [ + "Cardiomegaly", + "Edema" + ], + "8af32f0b-aeaad02d-8979cb3c-7935b38a-e1461335": [ + "Cardiomegaly", + "Edema" + ], + "c89c0bac-453ca322-9aec3b3a-af1073e8-833e0ccd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "7f893546-338c10fd-6a9cd08f-10d75928-62b63ac6": [], + "ee7e973e-09b18407-53d2a8d5-becd082f-6debca86": [], + "638c566a-13e88650-9b767af5-d532eda6-7120af1b": [ + "No Finding" + ], + "88dd4b9d-f5dc2b18-5e9e6141-943b90b2-39b71300": [], + "1ef64d55-b80da23e-67810283-ad56b0ab-22c83b5b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1b6d925a-664fef76-ced5cc25-d1a46648-b32130e4": [], + "7618afaf-76046145-f7086e54-e915e61e-1241a1fa": [], + "c462d814-c520caef-649ccd0c-e754aafa-4e59889d": [], + "7d6ef131-ee5bb581-a035d839-fc72971c-ab698220": [ + "No Finding" + ], + "879a2872-4e21c290-5352ae99-8805af62-5adc6c28": [ + "Cardiomegaly" + ], + "ecd3a847-44218ca9-e9039305-57d97776-45c6a231": [], + "92fd0922-955eb1c3-1cccf867-afd0d2e5-1e5a368b": [ + "Cardiomegaly" + ], + "81045bbb-0ff47e0f-e6832f53-a8620841-66e813f0": [ + "Cardiomegaly" + ], + "e747e5f5-4b65dfad-f486cf2d-3b6ef7ca-50784175": [ + "Cardiomegaly" + ], + "7e950526-ccc5960e-735b0f76-a80365d9-139f5bff": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "10a6246b-f2e3ec72-8c956609-ee81d40f-4a962883": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "56632a48-cce6f015-6436c85a-42883cbd-7a1c5f22": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "73a65ade-633f4da5-1c37b0a5-6a589b9c-bccae96f": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Edema" + ], + "35deb322-043ec12f-b33e7567-530c7a88-8b213991": [ + "Cardiomegaly", + "Atelectasis" + ], + "c5c69a84-407efe78-e075f90d-1d0fe345-df3f18b3": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "fe5ade20-832e5f10-2fcedcb6-4c3c8557-e8bfb513": [ + "Cardiomegaly" + ], + "04b94a16-2f255dc1-135c9cbd-82107f89-2d706167": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "aa546728-20bdd90f-5ff37933-03763e88-8460fa7e": [ + "Support Devices" + ], + "7574674d-a958763c-1c48667a-18e60f35-dfd1f3d3": [], + "91bd4888-7f1222f4-5b4fe46d-db77d37b-077c6f19": [ + "No Finding" + ], + "92633e53-79ea5fb7-67adcc81-8c6f443e-7c201666": [], + "fbecb95d-55942985-c9904dd9-66049a82-cd83c3a2": [], + "73da0836-553a87de-58ef0562-f9c31de6-c47927ac": [ + "Atelectasis", + "Support Devices" + ], + "423fc237-2b2e1394-e5255f87-97ae0a26-96fd38d9": [ + "Lung Lesion" + ], + "42cb7646-ac2acc5b-504f6247-07366b48-3d2bd573": [], + "622257bb-496a36b2-e8d31897-1bcc260d-c1d607d2": [], + "1344069d-f5bbd6ab-956a09d4-76f8bac1-7d8c3a04": [], + "38e5d885-855b370d-ff1f67a4-ece45a25-cc36e325": [], + "baafe7cb-474127df-e3251e9e-6341cd2a-e650e8da": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "3fb9a12d-133444d3-6e328120-7dc4d6ef-d0b6b9fd": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "0fcb8ff6-23c42baa-56da3133-5418ba4a-05e35993": [ + "Lung Opacity", + "Support Devices" + ], + "853f7149-553cb4b1-fe4e0131-75f81ca8-f910c92b": [ + "Atelectasis", + "Support Devices" + ], + "7cb35601-837df231-b3efc10a-3a761298-85f39d17": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "1319398f-f8e49347-72a5d7a0-1ccd8a53-85ba807c": [ + "Support Devices" + ], + "f7bf15c4-c1338417-c196f03f-0fd1e2df-055ce821": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f79f9dd9-f65e43a2-492aec2c-5859d568-299fa79d": [ + "Enlarged Cardiomediastinum", + "Support Devices" + ], + "4055e006-3d0171d5-07ea571b-cf29d489-7847ba6e": [ + "Edema", + "Support Devices" + ], + "71836ad3-c65f5072-d88d098b-00ab4c24-98994b02": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bb31f02a-26cfe8cb-d6444793-d24a3c7a-3ba6afb6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "29481f39-ab51b96a-2a696f80-7ee66b4f-2ded1b3e": [ + "Cardiomegaly", + "Support Devices" + ], + "cb0502af-22b9aa9f-6f613ef2-15552b8e-5b4238eb": [ + "Atelectasis" + ], + "482e79ef-a82c1a49-c033fcfb-5111777e-a1d59d81": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "e556173d-1f21a53c-e214118c-39d134bc-23638059": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "82fb374b-501cd085-de6db06c-337de2f5-3f5d1157": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b361a1e1-b9c3ab9d-c2cc8344-2903cfd8-3888d7b9": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "4d9de708-0d2bc7fe-d09123f4-cddd314f-81bceaad": [ + "Cardiomegaly", + "Lung Opacity" + ], + "48e69f6e-d7d3b831-9c09eade-bb20bccd-c9102543": [], + "ee1b7363-7791f3b8-05250aa7-b16ae53b-f1d3e209": [ + "No Finding" + ], + "bb42be73-33be1577-a742e6e6-9c47b56b-95a9659e": [], + "e15480a9-ae34c980-6051475b-93ac3b91-7f255d40": [], + "0200b4be-b53b9401-7151c4aa-5b17173d-1df6302b": [ + "Atelectasis" + ], + "0d8631a3-76f811f9-2cdcf377-22f2f8eb-4d5a97e4": [ + "Support Devices" + ], + "711f27df-b3aacd5a-c3fb842d-dcadab6d-36569853": [ + "Support Devices" + ], + "f16b5e80-1c4e9616-8ce2becb-1d966e2e-c84a01d5": [ + "No Finding", + "Support Devices" + ], + "44388ee4-a43ff605-7edf7add-37dd01f3-7596e2a5": [ + "No Finding" + ], + "f461329d-d6c1fb63-1dbb6294-4837e58c-53a0b617": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "4853dd84-ab86c09a-c204f25e-0a6f5d96-c03fc2f9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "742a919c-4e4a6e34-f49de182-4a0dafcf-8b3c101b": [ + "Cardiomegaly" + ], + "d6c44a1e-bc7bfb79-5bb6413e-56e90974-d687482a": [ + "Support Devices" + ], + "de63ae30-040537e7-cda1fd69-c64661bd-ab9be172": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "197dd856-31ef9250-0c7a8773-b83b65ef-167e2eea": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "2e8c5b5c-9271aa86-6e8f8585-b9dde222-7db00264": [ + "Cardiomegaly", + "Support Devices" + ], + "ef578547-4e4219db-c1753821-922ec956-1d6e6770": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "2c2a8c78-1629add6-99b9b1e7-913212fa-faa7a8ac": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "58742345-8a241152-4b4d44c2-4b3196da-324efa44": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "94c11798-961e79c2-6916a44a-2f90e301-46fa937d": [ + "Cardiomegaly", + "Edema" + ], + "cd0f28bf-ef9ca7fd-222d9446-2a62151e-8b8f43ab": [ + "Cardiomegaly", + "Lung Opacity" + ], + "0d6db000-b7832a09-4e80e472-89242ef5-20701513": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "5337ec0a-283bf318-55060740-77ac2e55-67b5f668": [ + "Lung Opacity", + "Pneumonia" + ], + "75f51e34-e0b0e29f-85ec0820-5bace590-98001b7f": [ + "Lung Opacity" + ], + "f562ddad-3fb08dd0-f299d5c8-61447a92-3111dfa5": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "c79cfde2-a2096710-1c80abd7-773c8658-b7393891": [ + "Lung Opacity" + ], + "de140675-ed4e6db5-111e6c9c-427ebbe7-7e83e354": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "76ed7948-d76e15f7-2ee71e31-4b988bc0-76e34df8": [], + "a31cf547-a85da812-785f9396-ec422967-38d69e1c": [ + "Cardiomegaly", + "Pleural Other" + ], + "415f8af3-cd9c7d29-d09be965-7f210ffa-09522234": [ + "Cardiomegaly" + ], + "928427f2-ea258174-1e7a326a-223e2d87-14e3a792": [ + "Cardiomegaly", + "Support Devices" + ], + "5ca9497b-fab0d42a-ffd2e65e-a7f10a95-2c0507e2": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis" + ], + "677a589e-f87f5a2c-f4ad1883-f7df335b-db658aae": [ + "Lung Opacity" + ], + "8c75550e-9aac921d-95015c3f-ac9bc81b-13abd432": [], + "75130ab9-d00d9240-ca6e83c3-57d1ae06-ba5a458b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "aa20f78f-53dce569-e7263012-3c4ab839-7abbabd4": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "0ec61261-98a2ef54-8f507688-ac74f4d3-f371ace2": [ + "Lung Opacity", + "Atelectasis" + ], + "9168e746-fd2a040c-9f5380de-40f8d0ff-5f51b5df": [ + "Atelectasis" + ], + "033de00a-e5ba30d5-d1ea8a2f-f3bdaa8a-5e7a0f03": [ + "Lung Opacity", + "Atelectasis" + ], + "a406f2bc-128ca407-f2400f61-701fd17b-17f85e90": [], + "a5fd5e55-4159fef2-6f0ac33c-f57ea303-1d5e8f7a": [ + "Fracture" + ], + "7f51e1cc-fc9208cc-470c70a3-9528d87c-9f33be5b": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "f0b2495b-1f5bba25-28b2aff5-41d9fd3a-a364895f": [ + "Lung Opacity", + "Pneumonia" + ], + "ca9c11da-3e9f5e3b-740ad552-71c90659-df5e1052": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "cd63e875-f4edd5c0-6b3cb2eb-aa774713-24cec640": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "7d45bb0a-531ab42d-d3820493-112d47e5-6eafa5a1": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "e26df0e6-03380fa6-44f4ce97-dbb30b9d-c1bc0ec5": [ + "Pleural Effusion", + "Support Devices" + ], + "d915fd90-d34450bb-ed88704e-ead739d2-470fa99f": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Fracture" + ], + "e2e855ab-59b52a28-1d4d9706-39fafe82-54c52c1d": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2e15d44b-391ff16c-0474e263-a0536b97-de75b719": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "5f9111c1-6adeef26-c000646d-ea3d85ea-e542f4ae": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "676f6524-0bac20b4-e0e1569b-3ac3e8ee-92877aa0": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "ea1b22a8-7ee63c4a-1ad1ae64-defd894b-1a52dcac": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "f49301d7-6e0b977b-e4fe5357-229f8407-66ff773c": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "460564da-f530de8e-fabb35c1-53d562ae-404235d0": [ + "Lung Opacity" + ], + "6ba63140-f35853ba-1c3f30d6-79e8a6d9-972b8b3a": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "e7085e3b-822cf4b9-b27bfe82-c20f0dd0-af0b8894": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "aab91d0b-db2c766c-d2a2b41b-1fed8561-7e2d060c": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "cef9e892-8204779e-65d65050-2b6ef6e3-5ad4f6e6": [ + "Lung Opacity", + "Pleural Effusion" + ], + "405581ff-6e5fc337-04c3cddc-f4b5bffe-992dd6f7": [ + "Lung Opacity" + ], + "5d75ee2c-09804dfd-a85eb831-74593896-c361801f": [ + "Lung Opacity", + "Lung Lesion" + ], + "0ac2b288-52510797-df0a6b75-70a649b5-d526e4dd": [ + "Lung Opacity", + "Fracture" + ], + "177495f2-996738c6-f03f52bd-f9e6aad1-913f1885": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia", + "Pleural Effusion" + ], + "daf6cf16-a484b5dd-18011dd3-da52fe5d-68986a14": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia", + "Pleural Effusion" + ], + "ee0d88e3-1c728e1b-8caed61e-514e2793-24b420e2": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f3baaf80-a55a5d5c-780ab97b-5fade2b1-80096e7e": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "2f8885a1-06440c4f-d3013600-227e0bbf-1a438c73": [ + "Lung Opacity" + ], + "394a60ac-206f1704-9f6e8216-aa5c47a0-c1c5b9ea": [ + "Lung Opacity", + "Lung Lesion" + ], + "5a164106-ce198292-34f951f4-c4c8b96d-1e1a80dd": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "914b17d9-ffa084b2-cf81dd9b-6a125b63-3a69dd01": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "20c5c50c-553e3e49-0736e206-832e3377-9d7f8937": [ + "Lung Opacity", + "Pleural Other" + ], + "ed9628e5-62ce1427-67e04f11-6daf5632-424ef2d1": [ + "Lung Opacity" + ], + "cb88b12c-f7910a4b-45c5a38c-21fb6499-42128dca": [ + "Cardiomegaly" + ], + "ee0ef8eb-6e0b96dd-964fb803-b19c1c2c-cd735b21": [], + "fca5d102-2547ddfe-cefd8e2c-8c8f9f1e-e97ba106": [ + "No Finding" + ], + "88599fd0-57288634-2d77f19e-73726d34-90158ecc": [ + "Enlarged Cardiomediastinum" + ], + "932b89a1-c36ebee2-a99dbcb1-aad3c07f-21047198": [], + "db9b56da-aba5bf9f-df933d41-8e777fe3-56275adf": [], + "4aea4393-f44d4dd2-55ae2d64-e3486a9c-ee57460c": [ + "No Finding" + ], + "73008a4b-9fd383b4-3d289f58-d78bef2a-065b5789": [], + "f30bbb0b-e2fc0d98-807a79b1-7976e0dd-4fbccb61": [ + "No Finding" + ], + "11768b21-cec7175e-576769c4-ac9ed6f8-4e40be69": [], + "96ea3d09-e928fb3b-dc086815-e0a3d015-45d3b08a": [ + "Enlarged Cardiomediastinum" + ], + "f2c778ba-f563bd84-a1ecabe9-6fe0c5c5-c98661d8": [ + "Cardiomegaly" + ], + "51f5ce00-6a5bde30-814d9207-cc5f7a52-ceb3502a": [ + "Support Devices" + ], + "3706cb8c-281ab1eb-f066978e-bce7d893-4b60bca9": [ + "Enlarged Cardiomediastinum" + ], + "5f860da1-0df267dd-71c297f8-f5833732-c79b751d": [ + "Lung Opacity" + ], + "7b9c311b-b511e83b-75a5a6cf-d46efb9d-ac034314": [ + "Lung Opacity" + ], + "ccb6bd66-aecda036-88eda366-91d212f5-be0df25b": [ + "Lung Opacity" + ], + "eb2476eb-92fc9b7d-44aebf13-67d07277-64531ea2": [ + "Lung Opacity" + ], + "0a788d46-a00044c9-e0df1484-22595fd9-1b836a06": [], + "e9bde0fb-7802062b-cec3c952-270203d9-0dd777ef": [], + "24b1563d-4e7efd6d-c06b429d-2ea5af54-95e60968": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "56800e51-37c27e17-e57356ac-463bc851-663bdfa9": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "596ada03-4cd1298c-35965d3c-db44850a-0baa9257": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "66da7741-082903c2-f50c52b1-768d15c1-7219692b": [], + "e4803482-51fd078d-b1b0c75c-e66487fe-0e881cdc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "ac9317c6-52379372-d9464c93-abdb2215-2daad9f1": [ + "Support Devices" + ], + "9bb1fe4e-c234466a-72525367-a54b28d3-b91d05fe": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "1d191ab7-a6b06641-eae8c46f-bec7824b-0d18c9e7": [ + "Lung Opacity" + ], + "407f8ab5-8827f7ad-75133d25-50cf5e18-f830a187": [ + "Cardiomegaly", + "Support Devices" + ], + "5dfc2e74-8fb4a113-58f8cc12-1e62c2dc-36e95e11": [ + "Support Devices" + ], + "e544cec6-ae472b46-7bd4e8f8-70145a76-6d51a0de": [ + "Lung Opacity" + ], + "e56aa514-47bbf828-9caeef29-26cbcace-d4f3c1cc": [ + "Cardiomegaly", + "Support Devices" + ], + "c9d87d11-a862527b-17c66e14-b5598f4f-2f5d28c5": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity" + ], + "1a8e4202-579a0128-3c8ffb22-1a60c491-85c789b7": [ + "Lung Opacity", + "Lung Lesion" + ], + "6b316ff1-09afc29c-706a4def-20612025-cb976104": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "4798fcf1-50a04443-4ae5a1d4-6ec993a2-6a3640d0": [], + "b8dfd605-1122ed45-3fd45f18-5d90932a-5f2dab90": [ + "Cardiomegaly", + "Lung Opacity" + ], + "1cbfd6d5-9adcc975-837ade15-105b6280-655efe4f": [ + "Cardiomegaly", + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "3a09195f-a700cae8-ebc497cd-4a728c60-18e6f063": [ + "Lung Opacity", + "Lung Lesion" + ], + "5deaa59c-85f1886f-bd9ffc22-afab2dbb-6c843217": [ + "Lung Opacity", + "Lung Lesion" + ], + "144f46e1-630ba5e3-82d84674-9f0575c5-6017bdd1": [ + "Cardiomegaly" + ], + "9a5952bb-e2e11f6a-5a352c9d-2b4ef5e8-d6455df3": [ + "Lung Opacity" + ], + "e0ae297e-45d00189-fe4c699e-4a3c2545-f0fda819": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1c038d27-c6193e6a-d4588595-a78608bd-565e11fa": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "429fa17a-9886b777-b604dcc3-2aa91a9f-3963b43a": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "a4ced79c-68a99c35-e4a2aa15-21423671-0559dedf": [ + "Cardiomegaly", + "Edema" + ], + "e8fe1d63-cd1aba2f-a7c06ed9-9add34f1-736fa06f": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "406ff57a-8c66ca32-af21faa2-a53b08d6-7b5a0bdf": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "959366ef-34cddc43-1c3e238c-99503ed8-b5fc863c": [ + "Cardiomegaly", + "Support Devices" + ], + "f3d507c2-a374ec9a-30b7c848-c991828c-333297ff": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "cbb5ad98-f607de54-6bb0cb49-b19365ae-791d9d25": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8183f090-2b6765ef-92984c04-0bd04826-f32d16dd": [ + "No Finding", + "Support Devices" + ], + "854eba83-e66e20aa-29a1b935-484d9991-94aecf1b": [ + "No Finding", + "Support Devices" + ], + "b6243df3-d51d165a-8d436de1-245fac16-bbd54062": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "28436719-d87f3ae5-9c69e639-adb91cdf-96771118": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "2d0d0cce-dd111287-ec34ac38-90e1c536-17d3bdd9": [ + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "2ec4e8c7-f4b9b644-8b532687-5eb8a5e7-db29b058": [ + "Edema", + "Support Devices" + ], + "74728f75-0a018add-11c546f2-e847b4e1-25501802": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7ab74669-cc831f4c-a2b5b2bd-b7212ec9-7b926c3d": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Support Devices" + ], + "a54a51a1-f6b0b03e-3a44b36e-aaf6e2cb-05b0c6ff": [ + "Lung Opacity" + ], + "f15b72a4-0e6020a3-cf98cd7c-c8f430f5-1a7d3aa9": [ + "Support Devices" + ], + "0a5f74c9-1b33d618-67e197ce-2c245e88-51a4e37c": [], + "b078a488-d4e59bf9-bdd410ac-f6f0a126-8d0fca7e": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "d9804d7c-635ee55c-7df369a2-fad70e3c-4b5af3fb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "e043f870-1670fd0c-cf68f196-4f351347-4a665c39": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2c6e86c8-921ec7a5-47be827f-42cce8dc-26b68598": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "3d369d5e-63a6e5b5-2da13aad-a02c9aa2-42d8e9fd": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7f25428d-f40f45d8-63084d3a-45dfb5a4-07d850c3": [ + "Cardiomegaly", + "Pleural Other", + "Support Devices" + ], + "2c34a6e4-968a506c-a8b39537-c46c370e-184792f4": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "8c4b0928-25f0374e-f160695e-a8ead2b2-21c9a14b": [ + "Cardiomegaly", + "Support Devices" + ], + "ff4c00a4-74c0b483-307446fe-e534b390-224db689": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7f667ba3-a9265ab9-a860e1b3-2fdf36b2-bf3b1ae1": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "c148002c-a0674884-d784b291-762232a4-a10fa5aa": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "1788a491-dde38c10-84084270-8ac256d3-7f69a1f6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "4d33ac8f-8d9c4251-e9defb1a-a8f77096-4e2a228e": [ + "Cardiomegaly" + ], + "58e73f4a-35cfb824-0e7a692a-8c4f5cea-22799505": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "6698971c-6ec76761-85ca680f-24dfc39f-790eb123": [ + "Cardiomegaly", + "Edema" + ], + "27be8e47-777aa20b-bdfc0d00-edfb3263-1cebe4df": [], + "5d1050e9-28da32a0-1d4125fa-2e3cec29-4be75b1e": [ + "Lung Opacity" + ], + "37de998f-ddeb6002-7bd3c350-863058e5-a5d6ca9b": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "54035728-03eb01c3-1af39698-5f789e6f-686ca166": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c874667d-3a322fbd-378b624c-a8b7113e-491c9160": [], + "1cbba3f1-9473d496-6a09bade-908af686-5568c136": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "ebcd934a-fe1838dd-2918f535-1a7560c9-be5e9ab2": [ + "Cardiomegaly", + "Lung Opacity" + ], + "bf73d8b0-3e093d0f-dd91f13c-0d6e276b-53136b54": [ + "Cardiomegaly" + ], + "dec32ede-aaf40bbe-0fce59bb-15629b05-e23aff4c": [ + "Cardiomegaly" + ], + "88723780-1ba2f066-c81f8785-f1b6c689-360af444": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "166ed666-3cf27b16-96e71ab7-5c3cb2e9-2f2c90d1": [ + "Edema", + "Support Devices" + ], + "85e6c011-1020a8b3-3145216e-1aed7acb-abe82459": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Other" + ], + "7e424a42-38f2b8c3-7cdac166-95452e5b-2ada132a": [ + "Cardiomegaly", + "Edema" + ], + "1fa07d59-1b6609db-c7feef15-3888f71e-17d91291": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "0f55eb03-9eb3edde-1c46e2fb-60625b8b-86fdba40": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "f0af6b21-c203468f-f3fc3442-bd92e0bb-bf562d09": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "1b28921d-4ff1da35-9168d4d3-3ae39a1f-15dedb6c": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "a1ece6b0-48facc6a-5c1446ce-86190a6c-f2036983": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "001bb54b-a4e0bb99-48a28f4c-9df85f1b-e1606587": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "fe58949c-440ecca2-acbe699f-ccfa0603-90cc7117": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "217ccc9a-8b9a6468-8d34855f-37b8c95a-fe29df0b": [ + "Pleural Effusion", + "Support Devices" + ], + "010357e5-15fa3bea-a68903e4-6326524d-9a77b7db": [ + "Lung Opacity", + "Edema" + ], + "5a98ef87-14b50e7b-3fc8913c-8b345fe8-a38665fa": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "7b1c0393-9d11556a-679af991-d0cc1d68-b1852b51": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9f188b25-a57547b5-c0fafc1a-be325b3f-6cbae579": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4d994f76-a7de771a-cf65cd0f-c1250201-f04a9626": [ + "Cardiomegaly", + "Lung Opacity" + ], + "91c0e7ad-4c444b50-67964828-926ecb38-7ae2fa71": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "47c8159c-71388595-84bf105d-5a7e99e4-077fb801": [ + "Atelectasis", + "Pleural Effusion" + ], + "6c1671e0-25c063d0-6c5d5405-880b3eb4-af9a0789": [ + "Atelectasis", + "Pleural Effusion" + ], + "02b1b4da-2bcf091c-b126afb0-da48d861-8ffa17a3": [ + "Cardiomegaly" + ], + "0346b4e3-a2e79a1e-8ec8970d-712bb522-84ed88dc": [ + "Enlarged Cardiomediastinum" + ], + "74c3dfed-ea7a4283-d0682584-6835d770-f9eff630": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "1c80a4de-5e37f8ad-d4683fbe-bada5508-8c1524ea": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "89853b2a-bf88984c-37910d68-2401fca9-884951db": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "404c92ca-507a2663-933cb795-d5538049-f6ed552e": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity" + ], + "97396291-b49c2ae9-b5478363-46b537a4-fc5346fa": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b9fa87e8-60fe2f5e-ead3ccb6-7ad496d8-8233efbd": [ + "Atelectasis", + "Pleural Effusion" + ], + "121a82e4-e8fcc625-76d8bd71-defee5fe-3f48af2b": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9f7a166b-fe5ab568-4dcfc13e-974262a9-8b6ccc98": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "27975aed-15b0a97c-df48c48f-85f941bc-eef08eea": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Pleural Effusion" + ], + "549b6e36-b45d0172-445902b7-286d449b-bb7734f6": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e7917cda-a7acb02f-631867d3-7fc91d5b-db5cdeef": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c97cba0f-be9c81e1-e3b2f294-5af9f1ac-aa4dab80": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "4d92da88-7369aa66-983734e4-bfcb6662-72f56c2d": [ + "Cardiomegaly" + ], + "546922d2-a7e68107-7cd88cca-00e86121-f8796513": [], + "54dabc00-d770631c-f8f47830-2e377162-52750501": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bd31883a-45fff94f-a6b462e8-9b2d4696-f2d2a0e5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "d85667b8-c62dec2e-998b6abd-7f553ce3-75954004": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "bce5d9b0-6d67ccea-45044d9d-e4136b2d-643464ce": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "692b12ec-4c9a3585-9aba9b6f-3c65bf19-6c939cec": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c5faee40-351cd77d-cb9145ad-278c11ed-e7f9b874": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "0fbc52f8-e1f7ad4b-73a2039c-cb06f96e-e187e1f7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "8b55a782-30d7d840-58d2c6c2-e8f05f18-2024e6c1": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "f08f01b8-22e9d374-4b8af575-e8a913dd-c93812ec": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "ffd60688-5da7c1d3-4229e284-c84ba788-c00f4302": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "702ea80d-45e751b9-f310cea5-80c50417-c80de945": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7e8dece6-cdbbe105-a1737549-acae3992-9164d7f5": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "36ab86c1-9e24116f-38745149-2b69406f-8aeabb2c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "6a7b83c9-7b7c6ba9-09d85de8-a76f1aa7-4fd0e047": [ + "Lung Opacity", + "Pneumonia" + ], + "2583d874-7007d29b-0623d6fb-2cf0c45d-51f0d37d": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "c0c921be-f6f18f17-4191ce0a-02049b91-242e197b": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4ac816f0-20d6f585-6b55a743-653f83da-3490fb22": [ + "Atelectasis", + "Pleural Effusion" + ], + "7d705bf2-0c6a9344-d86b9381-311c9eb2-e4b1ab6c": [ + "Atelectasis", + "Pleural Effusion" + ], + "155e0867-6925a927-7f73fa2f-6e5438bb-dc6ae8fc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pneumonia" + ], + "eb29f789-00abb730-5068408c-3f7898d3-a83d4745": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "f04b1aeb-e42a14c0-ad437e4e-dee054c7-e24bbe86": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "357764ae-3c98ec1b-8c94907d-641d3d01-5bae8280": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "bed0c17c-b8312534-d05da632-f282115c-e6a70f30": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "5bb814d4-0722fcaf-8647d444-2773b39d-5d9c455f": [ + "Atelectasis", + "Pleural Effusion" + ], + "e8721312-3402fc01-b4761c82-db71f1ea-afe8e0c2": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "22353454-97e7e0d1-d2711b39-b8159585-512d3c23": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "377bdbe0-9a73de16-b40c56a1-d44cdbcc-0051da03": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "def20e5a-8bc84951-a39d0889-5e00a0fc-2fb27ffa": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "eec556a6-1c46381e-1b9492b9-f747e8ec-048b888a": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "36f9558a-104cb64f-0ea8cc6a-503be286-3e591c65": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "62d1a94d-08be6886-1860ef56-16cc47a7-abbc574e": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "658ef774-35bbcbca-076591cf-e4bb58ca-243724d2": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b8d216b3-7f16e10d-72147640-2fd8511c-7da23725": [ + "Cardiomegaly", + "Support Devices" + ], + "4d9ec74c-58ee4dca-9bf9fe37-360c15ab-2b67b1a8": [ + "Cardiomegaly", + "Support Devices" + ], + "6d39e409-d87b1294-47a8c7eb-be6f7198-b4c42da0": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "2fc29ea1-355cc172-27d15937-3df170a0-932a4069": [ + "Pleural Effusion" + ], + "23944c5d-05acde48-c46484e1-0c68641c-e9ad6fd2": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "a7747cf0-5a042d25-ae9af09d-d8f2956d-ecfb087d": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1385f4a5-f1a65c0d-03e20ca7-6c7c7812-681c33fe": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "5266b09b-623e5530-6e37f74e-af2fb12f-8294d936": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b4d823ad-b9f7d3f3-47e57646-bd49ea72-8e3c5bd0": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "163690b6-b9df2f8b-01d0311d-48c0f035-84c7e150": [ + "No Finding" + ], + "4977b9cb-187b6611-2a2cd5ec-75b12655-890f56b5": [ + "Fracture" + ], + "69d7ea10-57234e98-7b668986-85e36c14-8656e7f9": [], + "6211c262-9d3215ef-c9ecc9be-dab821ad-94ac069f": [ + "Lung Lesion", + "Pneumothorax" + ], + "3dc71595-c47bd185-73aaa5e1-d15818c0-c6096a22": [ + "Lung Opacity", + "Pleural Other", + "Fracture" + ], + "b5e3dd9b-06654f14-edbd8c2e-0a287a26-7decab97": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis" + ], + "7701efe6-56cfaf62-917ec157-bf142818-4a6993ee": [ + "Lung Opacity" + ], + "85817777-b9158c6e-b0d376b5-d21f2744-f3a04234": [ + "Atelectasis", + "Support Devices" + ], + "47168ca2-46fb63bc-f859ecb2-d1a48369-fbc2f3cf": [ + "Pleural Other" + ], + "74b6403c-b1e5a850-192a4d1c-214f0603-0e109398": [ + "Lung Opacity", + "Pleural Other" + ], + "062a8362-a0b9fd2d-41671db7-6536ff37-75514272": [ + "No Finding" + ], + "187c0d4c-e45846b9-c1b6166e-4306cbe2-28db590f": [ + "Lung Lesion" + ], + "a03e8534-7f761bd7-1126a902-29853033-bba2b4f6": [ + "Fracture" + ], + "b2ad1391-f9791757-01f3acb5-d501ad40-abc9a837": [ + "Lung Opacity", + "Lung Lesion" + ], + "789709af-ab78dbbd-bd973f37-aa5edc4c-cb7f975a": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "6eaf7963-626eb629-9cbd1f78-ed48ebd0-cba58eee": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "7d8df8e3-c8bcedda-66ffa4f1-c953af7e-0896b398": [ + "Atelectasis", + "Pleural Effusion" + ], + "daf22278-c7ef9cb8-31e6569f-0e1541a4-153d1977": [ + "Pleural Effusion", + "Pleural Other" + ], + "79de3895-78f8039f-6010f064-7af8dd2e-e73deecb": [ + "Lung Opacity", + "Atelectasis" + ], + "9e6505d9-f09c30b0-96a9586e-37f43bf5-f7e34dbc": [], + "d7fd94c9-c495c1e6-cfc0ccec-60cc9251-6dfbb8ff": [ + "Lung Lesion" + ], + "64b8ecd0-558bc928-d94477cd-e5066ca7-44e87fb5": [ + "Lung Opacity" + ], + "08da513d-5325ee2d-d57746d8-762cf929-bf1c0fa4": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation" + ], + "847237ae-40229169-b1a8c3fd-04d45b62-fc0cee14": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "2105a3d5-135b0241-ad3232b4-24f593cc-3d0862a6": [ + "Lung Opacity", + "Pneumonia", + "Support Devices" + ], + "c408021c-9ec7e58b-9e1623a5-ea612873-9f6462aa": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "480f169c-15ef13a4-4ca3b85d-181a240e-edc79169": [ + "Pleural Other" + ], + "cdd7ee52-66082b29-febaceb1-6ced7608-1e8e8631": [ + "No Finding" + ], + "7a61d475-697617d7-8f7bacca-80d56a97-5a83bbd7": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "93681764-ec39480e-0518b12c-199850c2-f15118ab": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "674352c6-0c0645c1-b23ec675-6af58553-7af149b1": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "477309d8-69f82510-e3b9fe4b-4050b9f0-15e07ff3": [], + "8adb9931-4175c4ce-48e51965-ef56eb3d-4c575d17": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "97264070-c4f4a7bf-14e97575-719452ba-811afedf": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5338edd0-50f5acc9-e2b17f61-df5423a3-36b08d58": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "608aeffa-2b4e0b2c-f8672ebd-586ae0f1-e9b9e46a": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "0640123a-6126739b-40ba8ed2-ce99e561-5b4636f5": [], + "c1835b44-25f4ae1d-7fe2caf9-d07d4f59-ab0150b4": [ + "Cardiomegaly" + ], + "7d047120-d24a497e-fc26ea7e-6c3acc0c-ce5bc190": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "854781b3-f371e22e-df201d6f-78f736e1-07330978": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "495aa78d-7ad88491-fe7e2c29-d712e346-43f1b1a9": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "8b277408-532884e8-ea3f5ba6-e619ee5e-8c820c0c": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bfa3c5fe-e3616a0b-f2cede25-46b58e40-679b44d1": [ + "Cardiomegaly" + ], + "eca89888-595ca206-853c10b0-391e3f6a-e7f84ac3": [ + "Lung Opacity", + "Atelectasis" + ], + "955b5b7c-e2c4d556-9acb1f7d-ca2828f9-f57d4c56": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "1cd8224d-c54f75c5-40100521-82169222-61354765": [], + "b52282c3-1c808e3a-7ffee928-83083ac2-8cff0c2d": [ + "Cardiomegaly" + ], + "603b6fc2-24054d99-32b7b09a-fd1fec08-ca0b306f": [ + "Enlarged Cardiomediastinum" + ], + "52b231f0-b5da5c5b-5a030c08-1b4c1c46-99c6b79e": [ + "Cardiomegaly" + ], + "2be3e6f4-47ca559c-4c3c70ec-133cd9d3-40738c4d": [ + "Cardiomegaly" + ], + "92ed1b87-016202fb-06cb6d9b-524f6193-a2cafa9c": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Pleural Effusion" + ], + "f7d18e0b-557566af-9339243f-a8b26e9f-c974e2de": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5180e323-2f458dd9-ed09ecb3-6528c63a-6b9b4f1f": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3a0553aa-9c31867a-e614b9d9-628054fd-27e6053f": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity" + ], + "781921a5-632c5cea-0698eed2-35e2056a-0dd0517a": [ + "Cardiomegaly", + "Lung Opacity" + ], + "5432fbd3-085280d8-b2452bf4-52defb60-99f287db": [ + "Cardiomegaly", + "Atelectasis" + ], + "f7078882-7927ae24-2cb5194e-a4ea0c05-99f8ea08": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "c2a99a61-6ccc4c17-7a976c51-c9961784-bdfe8a3e": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "9bdc75bb-bfb40b21-54ac066c-4c718750-ef2b4f22": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "2a41d909-c858a5fc-da024f8f-a33bd3ff-ed8fe748": [ + "Cardiomegaly" + ], + "6eb90215-8ba4b024-b326c41b-9e832fd5-d678690f": [ + "Cardiomegaly" + ], + "faafd86d-6a1d4047-0cf76260-da7b281c-eba9d436": [ + "Cardiomegaly" + ], + "1b3502f6-703cfde6-fe24a195-2a059f09-8e715e77": [ + "Cardiomegaly" + ], + "9b8c8c16-1ff93d63-c49fdc62-8256171e-4c4acb9d": [ + "Cardiomegaly" + ], + "83c03ab3-cb2d1377-2e09bc4f-26e7f47e-67901270": [], + "84dac834-d9f40739-755532a0-1ddab50a-cae07005": [ + "Cardiomegaly" + ], + "90959c50-71b7d860-9e648092-e311c647-681c62e5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "c04f1959-6d763649-3561d2d3-baf924f7-bac2214b": [ + "Fracture" + ], + "361f3292-69c09716-56d735d9-af2502ee-6ba5bfcf": [], + "d0f12959-3ddcfd01-600a8d75-bd545bef-1655affe": [], + "7ddbb51e-55d7dd8d-8627c186-c5bc068b-ddb034e8": [ + "Cardiomegaly", + "Lung Opacity" + ], + "cbcc7f2d-85037ab8-b4a6295b-36cbbacc-09003a12": [ + "Cardiomegaly" + ], + "2290a4bd-134ecd43-8b4207a5-bc940915-b81657b2": [], + "af0c4020-5add1573-1c5ab2bf-de56409e-b3748c43": [ + "Cardiomegaly" + ], + "c1d95317-261068b4-1cfb7863-12882166-269c307b": [ + "Cardiomegaly" + ], + "db395251-352c94c2-fcee5f77-85922f20-33f7f530": [ + "Cardiomegaly" + ], + "cf85ad05-11574785-5d5c24bc-5931200b-df7f068a": [ + "Cardiomegaly" + ], + "dcc0c992-a044f70a-770a63e9-ea13d7b4-b62a671a": [ + "Cardiomegaly" + ], + "87121059-41c650c2-009d026d-25bb56aa-f6ddee27": [], + "8f866521-2083f0bb-a12df756-24346ecd-5e484e40": [], + "4c9812bf-f392e749-e5a9e763-24de2d49-20271034": [], + "00dbc849-560058de-e051c029-8cd120fe-9a4f3202": [ + "Cardiomegaly" + ], + "231686e2-a4e00674-f79b0a9d-3aa8362f-c822c78a": [], + "177a1056-691824d9-0baad023-32217305-9f282e25": [], + "553f6199-37bc0e92-8f246bbd-f36f847e-8d0c8e14": [ + "Cardiomegaly" + ], + "c810fda6-49f22def-580efb22-d9ed1837-c3e002b1": [ + "Atelectasis", + "Support Devices" + ], + "3db433a8-9379d041-b4e9d173-f253fe8b-8ad21d0a": [], + "41cf21eb-9d52be87-edeedec8-7aecd1ac-5e5662c4": [ + "Support Devices" + ], + "4bb967c3-58f8c025-777fd624-8d104e92-18a9526a": [ + "Pleural Other" + ], + "9a4ccf98-58c3f0da-81d2cd90-38c242fb-cc48af1b": [ + "Cardiomegaly", + "Pleural Effusion", + "Pleural Other" + ], + "bdd5a7d2-2ce12b6b-b5e7b44e-b9332707-80c08524": [ + "Lung Opacity" + ], + "f10aba88-cfb8f760-c3b288f6-c1d76c27-88bfb3e0": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "35ba5821-6f988e43-c7ce7779-9947c2dc-064358ad": [], + "bc763820-6af428a2-67311ece-8d067825-f6282dba": [], + "318e2d2a-cd564b66-987b939f-2b0ded80-8fc82ad2": [ + "Lung Opacity", + "Lung Lesion" + ], + "b3e3cd04-672dd424-cb6d9ca6-59bdd243-0fa75b80": [], + "7377346a-38f8250e-c3694853-37601fdd-b0ff4cb7": [], + "a464fe33-f97c23c1-580d2988-155f758e-66524a5f": [ + "No Finding" + ], + "c7c68b52-54b2bc92-e88ecc8c-e4048535-e3dbb409": [], + "0f20cabf-36c73318-eec1255d-ebc5dd0a-3389d19c": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "49d5c433-1f63df75-aa22694c-c8e8079d-d23cdaa9": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d24935db-b9f27f56-82996aec-e7a6bdec-618e0daa": [ + "Lung Opacity" + ], + "e6772ec5-79cc92d4-14c206cd-124edc47-86e22fb9": [ + "Pleural Other", + "Fracture" + ], + "704b81fb-eb6b3580-0bf2d329-f5aa33e7-5e85c2ae": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fbd637bc-15953c2d-d5c723d3-e8c2ba4f-c1103de6": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a9510716-02da91b0-61532c26-a65b2efc-c9dfa6f1": [ + "Pleural Other", + "Fracture" + ], + "060cf092-fe76bdf7-19fee515-26cbef2c-5c16ba6f": [ + "Lung Opacity", + "Atelectasis", + "Fracture" + ], + "140899e2-c3230cef-e97309b0-5b41fbea-af32d87a": [ + "Atelectasis", + "Pleural Effusion" + ], + "b5599aff-71fe317d-6e792fbc-d586d408-3b18b394": [ + "Lung Opacity" + ], + "8bedfff2-8d66e0f5-e4b03459-1e0fd124-b7efed95": [ + "Lung Lesion" + ], + "94ef0c56-294080ae-686b97fd-4ea9b5b7-b90a6858": [ + "Atelectasis" + ], + "a839e43c-1d7f9788-1f4d11ef-8bf9c279-74ebcc3f": [], + "46695ae3-c67059c5-8ada6268-131f121b-d71bcb30": [], + "5b9d3fcb-ec593910-a4df74dc-05deda2c-9719c9ea": [], + "d4d5dc4c-6021744f-fa9497e5-157fa69b-f68ddb75": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "879c5bd5-8fde6e6e-470c4bdb-323689b2-fac6fa7e": [ + "No Finding" + ], + "fcedd2e4-64153d40-86614cb0-bae4c2c0-58975d3f": [ + "Lung Opacity" + ], + "afa46108-e06269ce-05deb812-e12dad4d-ef863113": [ + "No Finding" + ], + "f544d94c-f76c0138-27642df3-203d7374-4acb7c32": [ + "No Finding" + ], + "66607c54-01766ee9-0296b1fd-b642145d-24ea1577": [ + "Lung Opacity", + "Atelectasis" + ], + "925c7815-b98af60d-65bf143d-402d7df3-91f83561": [], + "3cdc8349-0fc6e527-5c2ba552-1ec32b7b-0e53822f": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "9c51d1ec-858c08f3-1185729c-961916ad-9628d6b8": [ + "Lung Opacity", + "Atelectasis" + ], + "0f257273-0fa8c76f-737b4a98-eedda2aa-44d82e39": [], + "13e67075-19ffe93c-e24d6601-d1d92120-f69369f2": [], + "69185846-837b415c-5aa118ec-802f32df-bdc6985a": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Support Devices" + ], + "b85f7da5-828bea81-c7e95d37-4650d910-3c367fa4": [ + "Lung Opacity", + "Atelectasis" + ], + "d8d6bec6-48c8a366-841c2d03-d9845540-66735bb4": [], + "dd1b3904-39c994bb-d70efb14-d51f63a7-7848565c": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "27dd77c0-a8c3f1a1-f33fb0c9-928377b3-b5ae13f7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "81783298-03c9ce8a-e5c41662-1e81cfbd-fe393439": [ + "No Finding" + ], + "8ce5c1e8-5314070b-aed98ebb-f5135400-c6c11c2f": [ + "No Finding" + ], + "d8388085-8bcae4b0-0ecdcc02-28afaff9-221f4d72": [ + "No Finding" + ], + "da234986-086e6232-706fdd79-a63870a6-7801b85d": [ + "No Finding", + "Atelectasis", + "Support Devices" + ], + "03c9f091-1ac40a2e-362d8a50-c5e3a9c0-eaea0cd2": [ + "No Finding" + ], + "54b17fd5-2b9447fa-49e494d4-99a53410-c2e24e0b": [ + "Lung Opacity" + ], + "34395a9b-ad2db3ef-2c80999f-d0c5077b-42fb9957": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "839682a6-30ec6c4c-12520bec-1825e8a9-d6a263d4": [ + "No Finding" + ], + "d8c7752e-39ef154a-d2bf3a3e-821562ea-b71fc606": [], + "f7c990eb-833446da-f709f75c-94e17a51-a2479b54": [ + "No Finding" + ], + "07223e64-694168bd-99cb6d9e-44dd80fc-6f182991": [ + "Lung Opacity", + "Support Devices" + ], + "5142f79d-ca2bee0e-d70061cd-e31c5917-98f78f0e": [ + "Atelectasis", + "Support Devices" + ], + "12d4cda1-a51a4015-46e05368-b984cb4f-10b1be5c": [ + "Atelectasis", + "Support Devices" + ], + "1077b9f0-48d911e6-a4858b45-dbcaf675-655280d9": [ + "Support Devices" + ], + "8213e26d-d00f0c0f-5125e457-8602815c-1ccc2765": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2b4cfcc5-c44c4f2a-8e59b25e-b354f0ac-459b3e05": [ + "Atelectasis" + ], + "61ed122d-80b347e7-d2269b6b-e28fb75e-e5585f0f": [ + "No Finding" + ], + "2f7e40ab-fd3ebb8f-1f00d1a6-1aecdf69-793d8d35": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "3e1035d3-49417acb-62977270-a4de2787-c6024d53": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "322387f2-af76ba8f-755323f0-51c76e2e-5aa7a8d7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f517acaa-8c49752c-968ae55b-9b6530f1-4dacc503": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "03b170ab-561ffd21-6697ecf9-665767b0-674413ae": [ + "Cardiomegaly", + "Edema", + "Fracture" + ], + "6fed948b-d28771fb-fb7296de-9ee66094-e9a38c0c": [ + "Lung Opacity", + "Pleural Other" + ], + "fcf2656a-1407b4d0-e029e995-c324e158-e2b9ce15": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "a5a826d6-195c67e7-9c1b8449-48bc396a-87fae5fc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "3a15717b-35330afb-c621652c-6072ec95-cbce9765": [ + "Lung Opacity" + ], + "c8cfc832-b771f3f4-0862618d-c5b40b2a-86706006": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "f4a818e5-89d51e2d-9f478ecb-8774a1bf-739673b3": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "bdece112-0ab84104-d2b05f42-10b6388c-49b93a37": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "d624a149-1fcbcabe-23806706-6db78fb1-d9fb63d5": [ + "Atelectasis", + "Pleural Effusion" + ], + "0bfb85a2-fe62f571-fb0c092b-b592a4d6-60a8b4ff": [ + "Lung Opacity" + ], + "6849debe-9dbcc764-0a6286d7-242f3a36-43c4b94c": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "0dc02be2-fdb6e050-1b51dc0a-7bf9718e-a4bc2f13": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "e7d4e068-306cec6b-140f2e23-4534086d-e80680d2": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "82c1c97a-b5708e95-baa8ec84-c1237993-93b67d8b": [ + "Lung Opacity", + "Pneumonia", + "Fracture" + ], + "d5471b25-e49ee2a7-5c4a33bf-3f216c05-2ab0696d": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "65275408-6db6d9a9-13c023c8-a6a96579-434dee3d": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "45aa1a09-ed50dffa-f91421ee-590a536a-9867ca96": [ + "Lung Opacity", + "Pleural Effusion" + ], + "5932603f-64abd8a2-713ef8b9-907f95b0-106004c5": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "74634e78-46bff1c6-0f55af35-ffc09ea6-543ee803": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "4d50716a-ce9e59d8-2bccee5f-9fd75a55-f12cd66a": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "38d03b04-0d7ed79f-2cf5f34d-96d831d3-227a44aa": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "8f27588d-1bdebd8f-27072fe7-d51a60d5-c6968fcf": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "b378a3b5-08a7504a-631c758a-059fd7ba-eea6caf2": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "06df3b11-81898aee-955508ec-3c40c0bd-2c592b21": [ + "Cardiomegaly" + ], + "8e161b87-cb333a65-3d63c0a2-06de571e-60c0978e": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "43c2cead-8dce2aea-f81013c5-fc2fa446-d47bb9d1": [ + "Cardiomegaly", + "Support Devices" + ], + "dc1a93ef-539208d4-97e94a0c-0081a869-6bf2996a": [ + "Cardiomegaly" + ], + "ac638c9f-e5d8c3ae-fe914812-72a8fa82-e38477e7": [], + "e585ac0f-fc079ecc-ae54b1f8-1121c4b0-52a0b7f0": [], + "f6996351-b7330fe0-c77b11b0-628b7301-475c940f": [], + "8b08f860-baa48664-53adfb7a-98469602-de45d5e7": [], + "baf21f49-b3c34e24-016e1cf0-2d79e385-87cef256": [], + "30bc9b40-a8f3abb2-ed8a5db2-ec23cd7f-21ea4f1f": [ + "Lung Lesion" + ], + "9905499f-c48f304d-f9efd154-a921881b-f71b7f86": [ + "Lung Lesion" + ], + "de6f3d70-eadfcea2-4074743a-28118cf6-707e9cfd": [ + "No Finding" + ], + "7ee153a9-e00f7cd0-8c44b852-d83a1175-db28c1e7": [ + "Lung Opacity" + ], + "887d2084-05ef3dd9-2c675409-df755081-60950f2a": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "59a9547b-1d1ae94d-21f9b870-53488792-48240baa": [ + "No Finding" + ], + "6eaf56a0-ded30052-29edb3ad-20da2133-db0cf728": [ + "No Finding" + ], + "5db1ff54-6a22902f-51402f15-27dc7310-21a1183c": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "c72bf2bc-e22e489c-44cc5b8c-04c75d9e-5533e141": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "5051c3c7-e3c4e3f2-169fb49b-98d06fc5-662b3471": [ + "Lung Opacity", + "Pleural Effusion", + "Fracture" + ], + "a40681cf-5ae02ca8-00157e4a-2a48e28a-831224eb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "f429f4ba-4905c997-5dc76af4-ce97e3f6-8df8fe4c": [ + "Lung Opacity", + "Pleural Effusion" + ], + "fa3c5d61-58bb9992-05e07467-d6f5340b-7253e398": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "c7bb0e40-1f6e7506-544a2f87-79320653-743f3351": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "dd0edd5f-bbfc870a-23c7b603-2ee5bd53-caedb97b": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "1d63f983-58edaaaf-a291053b-73417333-421d0021": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "41015709-991752ad-b8bf5519-0dd588fd-dec4d029": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "13255e1f-91b7b172-02baaeee-340ec493-0e531681": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b58200f0-94821f08-ca60f9fd-6fc424ee-4365c0cb": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "be022b6e-69a878a5-39db0aac-453cd12d-627ea0a0": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "73f1035a-9d57466e-92c2b0b1-5ee3d31c-78ad1ad4": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c69d6872-0e7c2c30-55970ed5-fec97355-1286acf4": [ + "Cardiomegaly", + "Atelectasis" + ], + "9212c3a6-8bed5158-601c88b9-1f239c51-e1049431": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "bd9e6004-1c524f7f-ef858f02-2076cac1-7e6c370a": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "603fdb7f-afe35a77-b061a67b-584da7df-a8c17895": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f16d1f96-470d26ac-7b1a4657-afa33e79-38163538": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "29120840-a5d71eac-82a9f536-6cf7509d-f01a7480": [ + "Pleural Other", + "Fracture", + "Support Devices" + ], + "dc433c13-ef033a1e-75763e20-db477b3f-da3e909b": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "dc65b890-c82f963f-5b15fb54-916b57f4-236d944e": [], + "d21a9727-19732ca3-04b1e396-f706bb33-063c90b8": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "4d570d20-1f80af86-1855ab56-6d99bc9a-cd105562": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b59f061e-d6f55ed3-4b378603-f6d62e26-30d07d1c": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "7b2ae5d6-29ba59ad-3452638d-8877d19c-db599f29": [ + "Cardiomegaly", + "Support Devices" + ], + "de862699-c552320b-11e6f6c8-5087a74f-98f0b80d": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "5ad83d61-44f64350-e0fe61c9-c78a0842-626ecb1f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "7af7f1bb-df383cf0-cf61ba91-874a1b66-c067492b": [ + "Pleural Other" + ], + "8c248d5f-8700e4e5-23cf46b2-e930bffd-cc41a993": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7fab0be6-9ffd373a-a2ef5222-4aaf90ed-c4afea69": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7f65cb04-e3436984-1b6d2d66-60ed82fe-176f71bd": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "8fbf70c6-38be49b6-19536bcd-74b5e494-4ed5093f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "283df983-fd666130-de72e26e-a2fb9b59-88a371f7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "fa974cf9-6dfdfadf-834c74f3-3f7eee96-2d7d23a6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "7f90be03-f64f2d0b-36350e78-668756f9-417c5b45": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "856ccba6-265c59c6-d6f7dcf6-78eea3ea-b33762d5": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "87f64c4d-93ab83e7-04f10c4b-a9ed71f7-d05889f2": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "9d7f405a-066460a9-c49592a0-60cb15fe-9dc87b8c": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "a2c7e2ee-839b9c91-50a774a6-3c49483b-d7189ad3": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "71167aec-a4ab9faa-769e24eb-94b4049b-19b632f9": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "971bdcae-04538cff-c7a81ae5-3f843c01-5162ca39": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "ae135fa3-eb593692-9f19fe95-cdc9b703-28b87ac4": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "897059e3-92ae214b-1458e44d-75eb5510-5098e1f8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c8fbdee0-da83ffe5-649d918a-6bb64062-4f454c6b": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "49e89dc3-0e95e45b-179db5f6-6e61bad2-902512d4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "b4e5e6d9-372dda3f-636a7faa-cac88b07-a21496fe": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "f1ca05c4-09fee68b-47910c46-b68fbcc0-dc070cab": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "3d5c9bad-c1fa71ed-adc295a3-b423edd6-afb265b0": [ + "Lung Opacity" + ], + "c43dfeba-cd886d20-ea025f7c-ec8661e4-34005602": [ + "Lung Opacity" + ], + "c5b9a963-19ad5c79-7e658aef-87d2cec2-8d00ddc7": [ + "Lung Opacity", + "Pneumonia" + ], + "9f7bb56e-f8a06183-fe21858a-22ed5544-a68af3f8": [ + "Lung Opacity", + "Pleural Effusion" + ], + "ab062fe2-bf183eec-059ed8b1-b3b1917c-26fe6fdc": [ + "Lung Opacity", + "Pleural Other" + ], + "47b10a9c-53b0d876-a4213e86-d4a3e8c6-0076ea7a": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "a8b7cbef-ae8ef4b0-09766f27-a49a3af2-eea22021": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "ac9b202d-33441ce8-29b49c66-d903a94d-74c87396": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "cc9ac8b1-4e9d6951-52116465-7c53b9b4-17858e92": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "82781fc3-e4107008-274209ea-98d59f1a-120c9113": [ + "Cardiomegaly" + ], + "db9e4471-b977972b-27adc624-e77cf1df-13e56a0c": [], + "9b571cea-6eac4eb9-c9721fa5-37624c30-9d753aea": [ + "Lung Opacity" + ], + "be1ddefb-9327567f-aef38bd8-e918043d-91c40219": [ + "Lung Opacity" + ], + "22236fb9-1516b628-02843fe3-cd38ee2c-427a7647": [ + "Lung Opacity", + "Pneumonia" + ], + "a19a99df-7a50369f-ebdcd74f-f24c8839-d8ab6214": [ + "Lung Opacity" + ], + "00c3905c-c62bcac5-af952060-8b2bd330-cc4848ac": [], + "119125d7-35ae9512-e98f07d9-87a21f0f-3ee71f3d": [ + "Lung Opacity" + ], + "cc5ac61e-f2bd2109-93d1046f-d8eba485-5a753deb": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "7a238738-8c621632-91033197-65bce15b-74461a6c": [ + "Lung Opacity" + ], + "b800c916-3b94102e-b30f93af-af52c677-167e5233": [], + "19254d2e-12f84a8a-3d9be406-77b33fc9-ff7ed852": [], + "66b7c679-c157c1f3-e9474f67-86d8cfd8-d63dd1f2": [], + "5b433593-d02544b5-225e12eb-2d963391-108a1692": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "7cb2c039-853a9b5d-c0fb9c3c-d4782b37-a41cd692": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "e9f8beb8-4ee1436c-72c497d0-1bc5a42c-e9cfb483": [ + "Cardiomegaly", + "Edema" + ], + "f2075bc9-3c92d658-0f36d71a-9df38119-d2fafe13": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f138d1b9-51f16615-50213e4d-c67d164b-78ea6c15": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "28d71c5a-7f16c42f-ec973545-72a7a3e9-3d2193e6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "837b8688-35f0aa92-3dcaf15e-3d2d5607-080f27b2": [ + "Edema", + "Atelectasis", + "Support Devices" + ], + "643571eb-5685abe0-5b2f161d-df5ebefa-6f160c6f": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "ba7962b1-c57c8310-baaa8f93-1ae65fab-edcaa58b": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "189bfd48-459e602e-189009ad-8e87fda4-4badf1bc": [ + "Atelectasis" + ], + "af1457be-7507046a-550303e6-7079a0d3-56b7ab55": [ + "Support Devices" + ], + "32c5499f-c7a8f116-bc3516cf-55127c10-d77b160c": [ + "Support Devices" + ], + "25cd4b5b-538a92eb-96ad692e-1da96183-8577e43c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "be142141-0e637201-65d2ff88-43edd072-198d4dc7": [ + "Lung Opacity", + "Edema" + ], + "a5bb1dd6-32ef2b29-b27f45f5-4980a5b0-34f11cf0": [ + "No Finding" + ], + "ae711ffd-03ebb7b3-cc16c95e-e6f64de7-d2bf7de4": [], + "38c9787f-8f9a7af2-3814ee5a-ebd8ba86-d55e4279": [], + "838d96da-8d9d8d8d-2aacafdf-9f280c96-573b74db": [ + "Atelectasis", + "Support Devices" + ], + "484ad440-175df0f1-5dfa85f0-c66c85d9-8b671d66": [], + "6ecbe4b7-6be8f186-1f3bad81-26ea6dcd-7447ac19": [], + "12a0ceaa-cb54cf1c-5c1f8505-092df7e4-cea16553": [], + "6a92203f-216df921-4fce7d2a-acd7f2ac-ff08b6bf": [], + "247125c4-d3771619-d3f0f316-f696f8c7-c66bc0b7": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "c76592b7-dc16f6ee-eddffb4d-e872e85b-672e7d59": [ + "Atelectasis", + "Support Devices" + ], + "495990a5-0e6c123d-d8810c65-d78d662c-7435a7d4": [], + "92134f99-0e73faba-1280ad81-218c68ba-933a85c5": [], + "d9e22f16-a5b260d1-2a5aee7a-4cd66d44-b590afb8": [ + "No Finding", + "Support Devices" + ], + "6e2797cc-f1c60fb3-30a651cc-c23cf3d1-b15803bb": [], + "7a484064-6d2f5b95-1e966dad-22b8556e-23e55386": [], + "95e1b2d6-d0736b37-a91b2692-1483eba1-40fb9b7f": [ + "No Finding" + ], + "c6db0413-f3266e66-031e9892-2809b536-c13cf9f2": [], + "2f9cc5fb-ee49a77d-61586888-9ea3d166-e27de7ba": [], + "a4a72137-eea8a09f-a1ac8c72-4c948dd3-57236f6e": [], + "04833a58-a2f015d6-5d9e4afe-efa203f9-cfd9c1c6": [ + "Enlarged Cardiomediastinum", + "Fracture", + "Support Devices" + ], + "2273715a-2ad11b92-c64a1ab9-2d38c44a-e1e7d03a": [ + "Support Devices" + ], + "43fd9f86-bafca6c3-8e89eb75-eccccb60-bdf29257": [ + "Support Devices" + ], + "585dc46b-7d735766-e8302451-9285b2c6-eb6c295a": [ + "Fracture" + ], + "bf4ee504-3f4314d2-cf1daca2-79e949ec-6a42355f": [ + "Lung Opacity" + ], + "7022a121-c39c1e71-7fc1c7f7-d24120be-62decb00": [ + "Fracture" + ], + "1b02ffa5-a6da06e3-9063b9ef-5e540245-c18323b5": [ + "Pleural Other", + "Fracture" + ], + "cbf779b0-e9d49036-6c025860-330a4708-184fb882": [], + "3272470c-530109a6-4ffe7fca-c776dbb3-224eda66": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pneumonia" + ], + "7cdd0c6e-d0263417-262f1fce-bd3d2712-99409e00": [ + "Pneumothorax" + ], + "43636aec-98ae2504-18f03cac-4fe8e211-62049c6d": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Support Devices" + ], + "d122eb74-bc404dd2-45a05cd3-18505b72-5058fbdd": [ + "Pneumothorax", + "Support Devices" + ], + "2d0477bb-67599f90-d6b6437f-e9e37104-38079f1b": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "52e964a2-7fa373f2-9b88b009-123e8817-48889d6b": [ + "Fracture" + ], + "ebe1c050-b5cd68d5-7eb2b544-8906f022-e95300a4": [ + "Fracture" + ], + "715d0cdc-ddee4d9b-b5a28b77-350e1063-bc606f0d": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "6ce54ac9-077864fe-84217f97-5f43c4e3-f0578456": [ + "Pneumothorax" + ], + "2864e838-3b910802-5564865b-5c6e8d90-7c64b392": [ + "Lung Opacity" + ], + "a8c08cbf-15ac0dac-b76a40a0-dab826c7-18015767": [ + "Lung Lesion" + ], + "313f1d75-23648c34-dd36ecad-5d0f94e8-93a40356": [ + "Lung Opacity", + "Support Devices" + ], + "4d0251eb-cc875c55-fde85f43-3a9d7888-c62772b8": [ + "Pneumothorax", + "Support Devices" + ], + "f6a7a470-9e057a45-d244e0e5-3efe1422-bb946478": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ] +} \ No newline at end of file diff --git a/findings_classifier/predictions/structured_preds_chexpert_log_weighting_val_macro.json b/findings_classifier/predictions/structured_preds_chexpert_log_weighting_val_macro.json new file mode 100644 index 0000000000000000000000000000000000000000..5658382329266f0670c72c06eec1de3babe05d00 --- /dev/null +++ b/findings_classifier/predictions/structured_preds_chexpert_log_weighting_val_macro.json @@ -0,0 +1,7464 @@ +{ + "1fa79752-9ddaf5b5-2120ae82-9fec50d6-51f48d1f": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "a8319f39-9eef5bb2-5bd95b97-9dd70b0f-02a846e3": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "060b1fcc-5f90c680-8ce2e1f5-40d3ac27-2dced2d6": [ + "Pleural Effusion" + ], + "1efa55e3-0a3856d9-421024b8-408fa7e5-81d83c1e": [ + "Pleural Effusion" + ], + "e0275ad1-1e6a7451-c3960f5f-1267a188-547b73a1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "371aaea8-195e21b2-ba5a2856-54803ecf-1b72d88b": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "31d9847f-987fcf63-704f7496-d2b21eb8-63cd973e": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b410634d-0e4278d7-9c9b3561-8f5e5fc4-34a6aac8": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "489faba7-a9dc5f1d-fd7241d6-9638d855-eaa952b1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "550e6f3b-f008c1d0-8d2dee2a-649b30f4-101a98cc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "eb2fabb7-4bbc8aab-d7371282-08e5bcb5-de2e430a": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "4f00f5a1-f6335155-ca9fb0b6-d65980aa-64e6c7e9": [ + "Lung Opacity", + "Atelectasis" + ], + "bb160b54-83b69413-d51367dd-c267210b-fbad7ccd": [], + "5799175e-c125dfdb-3bd28e88-4f9ad41b-37bdd2ed": [], + "5eb9cc4f-c43b5757-52310877-3c87b128-465b02db": [ + "Cardiomegaly" + ], + "0f3224d0-b72c37a0-b9d8b5e4-ec922787-44f841ac": [ + "Lung Opacity", + "Atelectasis" + ], + "4359fd68-d9a2137b-df64aa37-2868a0c5-f0febbee": [ + "Lung Opacity", + "Atelectasis" + ], + "495dc914-9cc72534-5879a916-28e2fc86-52f8538a": [ + "Lung Opacity", + "Pneumonia" + ], + "537d5240-7ea880c9-7e16b990-f04ef406-c7fe5066": [], + "822ea266-47279ea1-f37382a9-0e32ce11-fc3d643a": [], + "c76de023-08a7d41a-65fe1516-f8e01a85-18399055": [ + "No Finding" + ], + "2d783c8a-492984b7-28aaf571-bfc30156-61ab26f6": [ + "Cardiomegaly", + "Edema" + ], + "4cfccdcb-122eefe2-ccd1cbbd-c93635de-eda3823c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "dbd34ffe-85795554-0531cdd9-ac757c62-46a7e259": [ + "No Finding" + ], + "eaef7f7a-a5d2ccdb-8098c68a-6d425309-06049ede": [ + "No Finding" + ], + "13490b6f-3eb75751-a191991b-e8f33cad-e423992c": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "49f3fbfe-cb406005-e8999546-2f5f2217-cd346108": [ + "Atelectasis", + "Pleural Effusion" + ], + "f48effa0-ca35986f-95efd353-3ba4e8a2-3ec3c9ca": [ + "Cardiomegaly", + "Lung Opacity" + ], + "691d5bdf-502c05bd-000c22a0-9be0768d-e13bb54d": [ + "Cardiomegaly" + ], + "a94f823a-d1f6f5aa-de10d9b8-37f6c6c1-e9631495": [ + "Cardiomegaly" + ], + "52051de6-12f425a6-7e6e8a6e-8b8c4176-b5d56a2b": [ + "Cardiomegaly" + ], + "b0957f5e-2da32f5e-3f46e685-8b05a23b-25c97471": [ + "Cardiomegaly", + "Support Devices" + ], + "121773ed-56eae249-ca58c72b-26c66aae-88b837e5": [ + "Cardiomegaly" + ], + "9203c21e-1b06abe0-e6fadf69-3d70d893-249f5a2b": [], + "d389daad-dc012836-92c88796-2f212d75-88cdebf1": [ + "Cardiomegaly" + ], + "b313c405-d9c8a648-8b1f3762-edb5671b-8541118c": [], + "d98a4431-acba5ef8-f0c5fe0c-b1b0900e-13276d61": [ + "No Finding" + ], + "2e4690af-c5ad2bcb-ba270540-7605889a-6109aaad": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "30b681db-78293b4e-edd1a3e2-eece4dc4-5ff2d9ab": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1f199273-2f4b7e8c-9041b5c2-18e7ca21-26142e3c": [], + "4f0fdcd0-d9e08481-3d3c4e0d-76022ffd-270ef82f": [], + "24386f31-41e447f6-dd0abcfa-ac74f2fe-431699ec": [], + "58fff15b-eb79f6d5-8c99f86c-74dcb1df-d63b2957": [ + "Atelectasis" + ], + "6653e133-913e51d1-1b11f141-84147ddc-cab501f1": [ + "Lung Opacity", + "Pneumonia", + "Atelectasis" + ], + "46583e03-f42311f4-87dca60a-c4c12f22-0fe13c7f": [ + "Lung Opacity" + ], + "51051faa-2f20e284-0d88407b-8415e95b-9767e74e": [ + "No Finding" + ], + "846d111d-b06db236-e8ad3b94-2d90a99b-82cea8a1": [ + "No Finding" + ], + "4749ba05-564eff9b-d0d13d38-c614a53c-056ac9a7": [], + "902eff2e-fa561f7b-5fa0f94e-e783fda8-9929d74a": [], + "c558a43e-149445ab-fd0ae407-39c70cca-a8a63ddf": [ + "No Finding" + ], + "18a4c626-d4481b14-559c1206-26f54875-dd74e59d": [ + "Lung Opacity", + "Pneumonia", + "Pleural Effusion" + ], + "aa29a8f7-ec260779-8cb37967-7d5bb1e6-a623e93f": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "42fb9144-0cd336f1-4e3ecd64-a3e859ef-2647d4b0": [ + "Atelectasis", + "Pleural Effusion" + ], + "1cf4fc4f-428e8580-055a5630-45455deb-5c72df9c": [ + "Lung Opacity", + "Lung Lesion", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "ad80e2eb-b3f466b2-05747a4a-6bceb507-5d3748ba": [ + "Lung Opacity", + "Edema", + "Fracture" + ], + "5aab99c5-9eddcc03-d82c31f8-f7578391-c74b9f65": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7aca64c9-d64297cc-102477f2-a8ca30e1-7b90cf8c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "ac8d6143-a581f133-eafa59da-4f66bc75-4693997c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "3eb3bf96-c5401aea-07178eee-c43e5e80-600f6a33": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "44bec237-520a0e5b-80e20d64-2c0a9036-c8766a81": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "47dd9117-4908216e-6fa039c8-2d7a1454-74151fad": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "c81c9275-d9fbf1b0-d61f3278-28a1d56b-6fc5dec5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "58ac68b5-24c8cb7d-62f38524-4c03808a-0329f3c6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "56ba2b4a-a47cedaf-139af8c9-10d8a957-74ec4f4f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "4bfa0065-4e743c19-876b8f5d-7295f3b5-a37cc274": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7a04d256-8236b272-b4ccee81-b556f1dd-9df7b98a": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "b6a12938-a1f0ed52-bca8e3f0-728b69ec-d2bc0a92": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "658a8ccf-a63adc9e-66351e99-f15af5f2-8e2e00b1": [ + "No Finding" + ], + "8af1b630-3ace08e2-edeb0783-ae2ef2e3-07f5576b": [], + "0e692067-1cd27131-a4ab943b-4a9bfbc9-d662b997": [ + "No Finding" + ], + "e049f18a-e4f9351c-fec6cad4-a19211f7-0c534a5c": [ + "No Finding" + ], + "f30d9e52-566bca1d-3ae8578d-0996d890-bc076486": [ + "No Finding" + ], + "4f0f1c98-127de941-be134310-bf433d4a-c79e22aa": [], + "acf8db28-7be06aa5-dec86122-ecb7e055-f198a3f8": [ + "No Finding" + ], + "4517dc03-f5b5bca8-05cdecdd-45b7a15d-a512bd04": [], + "cf1dab72-e09f8f17-73f1e925-ffb70fe0-e8b878fa": [ + "No Finding" + ], + "6887e2d1-fbfd6066-7306286f-87e5d3bc-3ded14e7": [ + "Fracture" + ], + "6c123f37-2e866064-a97fce62-c3214b55-0725f10d": [], + "aa81a761-dbc13def-538949eb-6aefd90c-12a85e54": [ + "Cardiomegaly" + ], + "ccea3851-88245a72-e4229b4e-0d54293e-6b5fae76": [], + "07f8e57c-a1b872d2-5c2e7806-1c4fd548-128dd898": [], + "f5d855de-88ff9fae-f82e34bc-c80b59f6-1f79d117": [], + "8f408f38-01bd3625-ba5e3d67-86aec5a5-4161a165": [ + "No Finding" + ], + "ede0b529-6cdb009c-7768be87-b40bb244-7ff29b19": [ + "Lung Lesion" + ], + "3b6ecb77-1f0b496f-0e7298e0-2805ed0e-616e6f35": [ + "No Finding", + "Support Devices" + ], + "b9454df6-7f75440e-9f3f32d4-038f3447-0c48ce72": [ + "Support Devices" + ], + "88d07416-c595d584-b0eec579-babde77f-c3ce90be": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1216f943-00196c3a-c41ea739-788f8d83-9571731c": [ + "Cardiomegaly", + "Lung Opacity" + ], + "a35725a6-cea21ad3-08b4e359-ffa6686f-8bb4f626": [ + "Cardiomegaly", + "Lung Opacity" + ], + "cd184740-11930719-2a8fc04b-c1076a05-9009709a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "b3d6304a-bf9f636f-6eba19df-d0e27e8d-4d62934b": [ + "Lung Opacity", + "Support Devices" + ], + "78383c35-b9b27e1d-2f9fa023-af32c4bc-0e8f6a90": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "d22a0609-122f9478-2067622b-1cc96cdb-c5c975aa": [ + "No Finding" + ], + "eb6725c5-05997634-42fc628d-001242ba-5ab3fe83": [ + "No Finding" + ], + "70e97a3f-29b2d597-f8635ca2-daabc3ae-fba20599": [ + "Cardiomegaly" + ], + "8bd08c70-fbb6e2dc-4a5730ee-8a7a80b5-c496867e": [ + "Cardiomegaly" + ], + "d68f20ae-43c390c2-b66bf131-3528cedc-57f7e90f": [ + "Cardiomegaly" + ], + "f81a519e-734afad4-3d6c87f8-6434f949-a7676b82": [ + "Cardiomegaly" + ], + "70a1de7a-ced6544b-f6c703aa-f806951c-c1fc887d": [ + "No Finding" + ], + "781476c8-b3ceae84-5bca3f05-15064709-53236d2f": [], + "c9537d32-fb8e976f-0128f837-6f009881-56b28f56": [ + "Cardiomegaly" + ], + "08895756-28628f43-7bb6fa61-72737637-e90ef342": [ + "Cardiomegaly" + ], + "3ef83336-7f67850f-4c481312-ec7c99d2-a874836a": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "16e57afa-63382843-a3a5c024-e1af2c42-96184334": [ + "Cardiomegaly" + ], + "bbee38bd-f8ab65ce-49fa28b2-f1bcb3e5-3bbffc88": [], + "01f860b4-313df5f2-ef6df995-a3bff91e-0e53eadd": [], + "f6aafba9-9cacdf7c-73268cf5-74b96292-7b81a593": [ + "Cardiomegaly", + "Edema" + ], + "30e3504a-2e22ab19-d9dd1362-eb94fd44-91739662": [], + "e283e6ee-1e78a429-c05396b5-19ed705f-5de5210a": [ + "Cardiomegaly" + ], + "ad5dbcae-e391d578-f01e2f54-b2d7c96c-0c121ec6": [ + "No Finding" + ], + "c027d8f8-d7e3b702-251c84f4-f4630cbf-72e59727": [], + "18378887-d7647b4e-a2987793-7ff5887a-51970d80": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "43fe7b33-07803c3a-c3cdc4b6-7a8f7f94-e7e6e01a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "20907810-b1ab5c94-cb4fbcf4-09c10590-05321eb1": [ + "Lung Opacity", + "Lung Lesion" + ], + "ad582141-5b748b2f-c456f25a-705b7a04-b32e22e4": [], + "3e690aea-3a937250-0a43c974-010eeb6a-f84953b2": [ + "No Finding" + ], + "6e0c0f60-529ac8e0-606e671a-5e7075f0-07fcd489": [ + "No Finding" + ], + "cb19438f-641f1bf4-e5b7d045-351ae8c3-892e9013": [ + "Support Devices" + ], + "d5c7d596-f85d51d0-f50de103-25a4904c-c62cd894": [ + "Lung Lesion", + "Support Devices" + ], + "e2f522d8-0e6fb835-12e75637-f8abfd5c-bf8fea8a": [], + "3edade1d-e06bbc14-6a3b9886-930b0ff1-95810ebc": [], + "5e4ec3e6-eff5ccaf-92e6f524-90e868e2-3d2c2772": [ + "No Finding" + ], + "db1e6857-1793dbe3-eb212ced-f48ed573-0ac73b2c": [], + "7eff5f7d-db222fe7-fe4b9865-1f0641c1-bcfdc4a1": [ + "No Finding" + ], + "e4b6639a-addc6e70-3931f176-25766a17-95a40103": [ + "No Finding" + ], + "1d781883-bb2d3cf0-14fd56ff-c4d0e12f-1143d820": [], + "50d7481e-a17d3334-1639b695-43ac984e-46ccec4f": [ + "Lung Opacity", + "Atelectasis" + ], + "c5cb848f-99205a6c-08c1ebd4-fd92d960-44ec5143": [ + "Support Devices" + ], + "df51559d-507712fb-fa6e2962-7da4f76b-a209ffe9": [ + "Atelectasis" + ], + "632aa920-047fa58d-57bb9ec3-53497e57-ab6df53a": [ + "Support Devices" + ], + "27da1774-c4b8d63b-55aa64ae-fd743cac-debd93de": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "f9f2994d-0072f6aa-32cf61c7-af016a0a-5e32b37a": [ + "Cardiomegaly", + "Support Devices" + ], + "0467c521-bdba9798-87b7c0cf-b1e76b40-5fcd1444": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "28bcbc77-70736463-dc95285f-40b115a7-5d7b7f15": [ + "Fracture" + ], + "501b436f-4f6cf540-ca6ea4e6-b4a0a951-03e9baf9": [], + "791ef542-9bf794a8-96dd48ff-588a38ed-9b686f16": [ + "Fracture" + ], + "8f52469c-b701614e-5a141316-1fa3c9ca-c1d881de": [], + "6c0ee6ab-a42d369e-38095ae8-53f0889e-f84941fb": [ + "No Finding" + ], + "e6a7f3ac-fb2965d9-da384ee3-023cf138-7b74ab23": [ + "No Finding" + ], + "1ded0fc6-dc59870e-c054eea2-5b6cceee-6151983d": [ + "Consolidation", + "Pneumothorax", + "Pleural Effusion" + ], + "fa7b20f1-0fd5ce93-b4aaf450-db44d8ec-8f3df713": [ + "Lung Opacity", + "Pleural Other" + ], + "0634e821-c53b5925-d799ae9a-7d89063e-d8f88591": [ + "Pleural Effusion", + "Pleural Other" + ], + "0c04004a-a36c9c30-f869bd3d-e4497073-49914c51": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "4286651b-827ede38-fb96335e-fc2778b6-7c25eb40": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "05aa533c-2feb184d-ecec6546-ea655419-8dfdb025": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "7ce067b7-43b86b45-28974414-6f1c4688-b7f94e66": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "864c32b8-9a203655-831c5b9a-f9adadcb-767da6bb": [ + "No Finding" + ], + "eae6b2ca-4d2a18ae-8fbf9cf4-15cf90bc-2ae81da1": [ + "No Finding" + ], + "dd5da479-b1000fad-3146bb1a-6a6c7244-25e07794": [ + "Lung Opacity", + "Consolidation", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "44a77474-9433858c-b46ea842-b78cbd76-b08fc180": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "583ddbd2-50f85c61-b2d63c29-0c4cc293-77060208": [ + "Atelectasis", + "Pleural Effusion" + ], + "a9c0a1f8-cb2a4f30-656ef3e2-e80e3406-e70d3c53": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "b8a69006-58500ba5-3ae8ca5c-e3c7bbde-d18e3034": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6e7b243d-a11a3f29-49057751-677985e1-c29b0e67": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "c9cf7fd7-7209115e-f7497506-5548d12f-30259e65": [ + "Pleural Effusion" + ], + "d4eb74b1-f44ac0fc-aaaa580a-ebd12892-d8aef5e2": [ + "Lung Opacity", + "Pleural Effusion" + ], + "3bcd0d92-81373a0a-8fb28e74-2cac5886-c8fd319b": [], + "c3c8dab4-129cc1cd-e3818349-2e9417a3-50ceda9c": [ + "No Finding" + ], + "e0d4c756-3788fc64-eaff6f23-f19c9a77-37380c7c": [ + "Atelectasis", + "Pleural Effusion" + ], + "e29f99dd-1ecf184b-8a7a3240-781f606a-b37061da": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "49910657-1f377f22-5cc20631-adab4e1a-1debb4b0": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "d5afdb09-0bfe8802-651a2d06-44efa800-80a795fe": [ + "Atelectasis", + "Pleural Effusion" + ], + "ffc73da5-5e52ccfd-028a2711-ae2702af-ad87c455": [ + "Atelectasis", + "Pleural Effusion" + ], + "a239d4b6-5c88ad05-ed28dae6-22f93f18-4538a559": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "3b21641a-0dbd0858-0948dffc-42b3b047-a2153a8a": [ + "No Finding" + ], + "e5fe40d3-47686c41-bd3deb46-bff9a8dd-60e1fc04": [ + "No Finding" + ], + "30b12960-af4bffa5-615613dd-d0a3cdcc-f885a90f": [ + "Atelectasis" + ], + "635af03b-69756d41-3660ec05-e2c0ec37-d732f2cc": [], + "bb1e3b63-37b0c06b-9ee2551f-b2d7cf01-ed2f7d8b": [], + "6320a177-342a4fd7-a6b6cd85-53265126-c5592815": [ + "No Finding" + ], + "7ca81fd6-1bf2f074-46a147a6-c0a1560d-28d9dde0": [], + "d0991e2b-409414c3-61292bfe-a7503b43-1683f5b1": [ + "No Finding" + ], + "e5ba8565-97cf1086-bd6674d6-78042027-ad400dce": [ + "Atelectasis" + ], + "fde68247-83632d38-2e159579-20fba1c5-c7473876": [], + "4432d858-426db8ec-8226951b-4df0ed71-68761d4e": [], + "8a5f12a9-223bb9c6-bbd5b9fd-ca751b7a-ba6e910c": [ + "Cardiomegaly" + ], + "c04b6f75-8752b210-1173c5e6-fcf5e8bb-45da6d34": [ + "Lung Opacity" + ], + "e9ba6f0f-a9ac57e5-4e7a4cfa-4bae2994-2398514c": [], + "9174f95c-f3fdd1b5-b0a921a6-de43c3e8-939bcfa2": [ + "Lung Opacity" + ], + "f4ec1ae5-a9b3e696-9647c6e3-2518312e-e435cf0a": [ + "Lung Opacity", + "Atelectasis" + ], + "74155497-e80ec02f-154721b7-bc76f816-069c92eb": [ + "Atelectasis" + ], + "d1552af1-5b159d3e-4058cc59-8af87caf-375f46e7": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "171a4674-65e7ed96-c63bae1f-faa3fd7d-07ac9309": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "4d5310fd-468856e6-1b902127-c506ed84-8b93870d": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "d60c19c5-2a87cd59-e5c184dd-a81d581c-09f5cb99": [ + "Cardiomegaly" + ], + "d0d2bd0c-8bc50aa2-a9ab3ca1-cf9c9404-543a10b7": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Atelectasis" + ], + "0ab98ebc-3e42c243-135283ca-41290b6b-639453bd": [], + "47cc7240-5f6606db-9489804d-ba5151f2-7b875507": [ + "No Finding" + ], + "06e2fd1d-35c95f84-e6021f4a-4611a14e-a4b9a693": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "9613d784-ef4fadd2-8b33b9c3-3db90fd4-6730c5d6": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "5da374a7-95f81d01-9c2072c5-7a5799b7-2f7164e0": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "fadc81b1-9ea238c0-58b6e7a8-915e4bbc-34aee7b4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "5baac073-ce7e3f3a-9ba21c8f-9237a435-845c26f6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "c4752408-15e8abd3-707ec66e-a1449931-5430926e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "4cac02f5-71a07948-2e40edb0-d546dcad-b3683965": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "5a686ceb-f01792db-cdba870c-da79a22f-f34265ea": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "1f6d1038-c6cffc09-b682f19e-854afec7-cef098a5": [ + "No Finding" + ], + "f52765f8-018073b3-3ce025f3-c3820e4f-a3c35f56": [ + "No Finding" + ], + "4eb4be03-2765d772-09f40d82-96431de2-b7ca17e9": [ + "Fracture" + ], + "b21d03fd-ba77c145-efcda1f7-654925ed-bba4d6e8": [], + "b4a9606f-2d62a1a5-c7d2c5e1-7ca25c12-e1d2f15f": [ + "Lung Opacity" + ], + "bc2e5f8e-5fa53cf8-97cc7920-21879c69-eada094b": [ + "Atelectasis", + "Pleural Effusion" + ], + "0d7f28dc-1de4e7ed-fbc0c70f-e099382a-e5dfb332": [ + "Lung Opacity", + "Lung Lesion" + ], + "10efa450-28c449f2-7a5dde1e-58eb3c3e-2a6a8ef0": [], + "30e1c508-1a2ca634-02f30afb-06fc43a9-d7eac519": [ + "Lung Opacity" + ], + "556d5af6-986670c8-db365f47-e8286407-b025908b": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "88877d10-188b5a1e-d99e6d09-75236a50-63e30ee8": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "a49ebd3a-d86b070c-87256a4b-f5bb2b7e-f8ebaa00": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f3a27e2d-1d0d73bc-b7394f0c-7ed82c79-189ddee5": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "02ae05fc-ce6ab459-7561db4d-881fb85b-5a207608": [ + "Cardiomegaly", + "Atelectasis" + ], + "120e5b75-c3500201-4fcbcd62-51265bb3-e3371c84": [ + "Cardiomegaly" + ], + "598d6145-85bfdcdc-b0cd756d-4d72d599-79e3f10a": [], + "0a7b4797-26061ea5-69f731ec-a45b9e8e-b4a66113": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "4662c1cc-57eb400d-e894dd62-0486f8e4-6b84a7e1": [], + "a5c3470b-be30e581-14b6f2be-8eb54504-adeaa406": [ + "Cardiomegaly", + "Edema" + ], + "f10470fd-82455fd5-f446d955-7e930766-0cbeec89": [ + "Support Devices" + ], + "1d6f62f9-adc5107d-e66dba67-28c879ec-bcf9e17a": [], + "25a4da29-677dfc01-3c7bc2e9-ca5766ff-8910f5a1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f9624358-214a129c-dc05b026-e49885ed-66224bdb": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "49d0865a-87d61b94-18e9e122-66f361aa-c8d164a6": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "c75317be-225faf00-b7bccd06-b199a930-a4ef45ff": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "7a54f39f-f199adbd-22bd79bc-f9ef8f44-0ee9682f": [ + "Atelectasis", + "Pleural Effusion" + ], + "febddc5e-2a9cf23a-7c6c7b4b-227c0ad3-96a82b0d": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "648179a6-4fa29136-911690e6-f934aaa8-bcd92eef": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "6fab1ad7-445ea2a4-e4074846-ffc0bcd0-3a5972ca": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "c3badf14-8f90970e-8455cef5-6fe2eea4-6357ee71": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "20a8146b-74dd756c-382fd16f-2248a7d2-a74b9bbd": [ + "Lung Opacity", + "Pleural Effusion" + ], + "3b81672c-7380f29c-16a0623b-5e6342fc-243805ea": [], + "5e2d1990-db2e7dd8-9864ad4c-6346c61d-cd3f9875": [ + "Lung Opacity" + ], + "61f52c00-7a583d5a-eb7fe590-480bddd5-3a5776dc": [], + "cb6b6702-9109f7be-cb626f90-5de5b6ef-4f4c7ad9": [ + "Lung Lesion", + "Fracture" + ], + "ded930f3-a5938b06-618826ab-3d33015c-0825424e": [ + "Lung Opacity" + ], + "23b9a601-50441467-c840ef98-cc20b3d9-0f1e89c8": [ + "Lung Opacity" + ], + "c7524a34-034ad3d1-e934a59f-85f18631-6f81adad": [], + "0301c574-112ee0a8-1ccd9da9-2d579a55-b2f80210": [], + "7aebcf40-c513d753-29abca25-111aef26-ba376639": [ + "No Finding" + ], + "a2c7838e-c081e69b-ecdee541-780db068-00b5fd81": [], + "c468a266-8cdc345b-7830d55d-85f6be9c-42a47dc9": [ + "Lung Opacity" + ], + "1231dc8f-4cf6ae66-2754d2f7-db1abf04-fe0eb62b": [], + "ecd38a1a-a066f8ff-860275d8-be7ba46b-09449675": [ + "Lung Opacity" + ], + "648ee6d5-cb5e79fb-b7aca47b-5b20049b-042b1f8a": [], + "efa7ce32-9434194a-c88b2633-833bc1e5-4b39a4fc": [ + "Lung Opacity" + ], + "48f65bd6-fd930f65-27b3123b-39cb33cc-049a89be": [ + "Lung Opacity", + "Lung Lesion" + ], + "7c3703a8-64b5649b-f5839d8c-3e2cf8e8-d0e6eee3": [ + "Lung Opacity", + "Lung Lesion" + ], + "967b665e-e9e89447-08613598-bfb8fc37-34638efc": [ + "Lung Lesion" + ], + "da9de99a-88589600-954a7bf7-b947b366-25d4cf16": [ + "Lung Opacity" + ], + "f2f96a77-ffa800e0-fe3c692c-487ed51b-87b84b10": [ + "Pleural Other" + ], + "80ebdd2c-d387828d-89e90960-df690604-91bd8696": [], + "0f4d6e3a-d8e36345-55070513-6f057329-b4f1283b": [ + "Lung Opacity" + ], + "55ba8d4b-a90e56a6-4209b8bf-e6950992-a13cab93": [ + "Lung Opacity" + ], + "7b305795-f3816546-a9a8227a-013d0d53-47dec574": [ + "No Finding" + ], + "7c4d214c-4ec4e4bd-71675aed-fad9c05a-e679ee9a": [ + "No Finding" + ], + "b8084cc6-129daa21-5e7278cf-1038961e-a964e354": [], + "c5937742-fb73ee63-48b37017-9cc947e5-fa8342d4": [], + "dc423670-4243d370-0917d0d7-e7ccb499-f9e256e6": [ + "Lung Opacity" + ], + "620d7dcf-06e6a794-87f53b98-bc55811e-8fc54800": [ + "Lung Opacity", + "Pleural Effusion" + ], + "a19d711b-6c29af26-11883860-c9e6a00a-dd8b349c": [ + "Lung Opacity", + "Pleural Effusion" + ], + "1ad21961-ee94488b-7fc68fbd-3a8a8100-9b71edfc": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "31afabb5-1bab1f87-ced724a1-8ae227f6-6bca4f42": [ + "Lung Opacity", + "Lung Lesion" + ], + "2c1b8528-f39e96b9-54bb89a8-d99d2ec5-472472ce": [ + "Enlarged Cardiomediastinum" + ], + "cbfd7625-9544bc09-c925c328-d7fe32ae-a29d64ef": [ + "Lung Opacity", + "Pleural Effusion" + ], + "1b56958d-2db30a47-c149a47c-5161435f-f70948bd": [ + "Enlarged Cardiomediastinum" + ], + "5f053b2c-56f23cae-42d6a64d-cc58332c-8a49a6fe": [ + "Cardiomegaly" + ], + "03270807-5e38a815-9e4f8720-08103828-f27bb4e4": [], + "05abb6c4-7cc9ae3c-bc29c9da-5c2f5ab2-8845a3ae": [ + "Lung Opacity" + ], + "3f5dec1b-45644e70-ed34cbb0-1a80da55-77581541": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "a39f20a8-d6fcb2c5-62904bb6-546afe49-0d7926bc": [ + "Lung Opacity", + "Pleural Effusion" + ], + "cd8b3583-06cd4871-e09025fe-a2a60b90-348e7521": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Fracture" + ], + "b85ecda1-089e869a-90607e39-84199c93-e66fae7a": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "e19abbe6-df472023-83481ac8-0a310178-3cdd22d2": [ + "Lung Opacity", + "Pneumonia", + "Pleural Other" + ], + "0e252b44-7eeee514-f7db5565-5c69c644-9808eb6c": [], + "d8e7e260-db17e49d-5a6fdba5-6ae4bb12-73abeec9": [], + "3b825e5c-972cf73b-c9e78f42-2ffb6f80-40fb7b5e": [ + "No Finding" + ], + "f0220e89-6a3c972d-e6129b54-0f9f801e-8bdeb45e": [ + "No Finding" + ], + "967b4be7-246fd0d5-0f1f4921-af286d14-001bff69": [], + "e739c1f7-c8cb4da6-35a5b19c-c3c44f5c-bde78d3d": [ + "No Finding" + ], + "c051db46-f8077330-028442f2-35bf5221-fda0ae4f": [ + "Cardiomegaly" + ], + "046d4db0-ce1ff4f2-7995008c-6b054b3f-52e497a8": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b22978a8-b5b4125a-08c7a341-112606a4-cbd852a9": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d1969331-194ac1ab-ab92b6ec-10a231e8-8585ed4a": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "f1d21b3d-2ee34c86-4d7e3bcf-7cbc833b-f0692c65": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "360077bf-5c45c46a-28dca0b6-44639e55-2a199832": [ + "Cardiomegaly" + ], + "fe1456c8-170ff785-1bee6889-6f6bf616-b8bfe756": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "79edbc6e-58f13a9d-db0158a9-e1565212-5bdc7e4a": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "d92fe0aa-f7ceb728-7de56f3f-502cf2b6-1e4ccafc": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "e7dd53db-aad223bb-65d21903-85c5d0b4-02e26850": [ + "Cardiomegaly", + "Lung Lesion", + "Atelectasis", + "Support Devices" + ], + "21ff2ec7-c4a60756-1d1937eb-e12dee07-852c4995": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "a54f4d38-f53d69a4-fe5bb1af-ec0c839c-ca1ea4cf": [ + "Cardiomegaly", + "Lung Opacity" + ], + "47095b32-a853ea62-3c44a0f5-18ba6a9d-bf1ef6f9": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "925adb8d-69aca63a-440c3d56-6b7842af-89d5994b": [ + "Cardiomegaly" + ], + "da4b16dc-70fac17f-f55577e8-6d7eb687-7777fa17": [ + "Cardiomegaly" + ], + "2bd4b6f8-658cb9f5-939803a8-685c7ce3-356accb5": [ + "No Finding" + ], + "8c9534d9-497d5f33-e7f5ab5b-66be897e-2491cd73": [ + "No Finding" + ], + "cd5d17cd-26d7e480-755586ec-f31356c1-9cbd3336": [ + "No Finding" + ], + "2c13c94d-a6893cf5-5cd6d737-fe3cfe58-c9ba37c1": [ + "Atelectasis", + "Pleural Effusion" + ], + "ded2ded1-1fe6cca7-0b90912a-e5ecd92b-3eaab81c": [ + "Support Devices" + ], + "f08ccf15-c89bcee2-de085991-51e9aa5f-64704b8b": [], + "18f9a05f-f2cd30f5-bb92443e-a96e29a2-2d10374b": [ + "Atelectasis" + ], + "8c92d74b-8f6e075a-400a5d87-ae954228-73edbc6b": [ + "Lung Opacity", + "Atelectasis" + ], + "9d98c3ef-af601aa0-e2f3bafc-9a4bf053-5680f50b": [ + "Lung Opacity", + "Atelectasis" + ], + "7cdbec45-4e0aea44-b466faa1-c762f062-1e61182e": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "f7afb1fb-980babb9-17a967f1-4ab852ff-c8ecd2fa": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "050b0481-40bac9ae-ecbb8c83-6251c674-f8dc69a7": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a421114e-d29d7d27-ca1c3caa-149eff70-e015e6c6": [ + "Support Devices" + ], + "bd9e45d8-e8d6d3fa-e8a8e094-a2a77b14-2b43fddb": [ + "Lung Opacity", + "Support Devices" + ], + "51bf1504-fd68a1ec-7f7ca477-9736040f-4167a6f0": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a4e05e8d-f1cc5629-84b87ad8-9f4c0402-17e6f75e": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "77990ff0-f8347f9e-fa7dbb3d-d8c3086d-ef0f6f92": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "551d7076-32d60564-745ab2a8-624b5317-c6f634f8": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ae000d03-91aa28dd-ccd3897d-ceb92206-fba185ff": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "003fd23c-264ac00a-8e8225c5-d7f3543f-6ba3ef81": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c81743fc-40348d42-c468e36f-0c9077e0-46d24e73": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "81e9d226-e7e5071f-d482f16e-fd218ac1-29df4021": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "cb4af14c-7c3258e3-157f685e-c1cc0471-fe3eb0ec": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "268224a0-f4db4bc6-9f5606f0-6a333f24-ace4e910": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "09df9e78-971e1a02-c9968fef-e789e1ff-6ca76ab2": [ + "Atelectasis" + ], + "34ef720b-67dd22ea-ff045347-55244604-8fc95e70": [], + "d04f293e-687f0e9d-4e5eb75c-5a6dbe57-eeb72c9b": [ + "Cardiomegaly" + ], + "d468d381-defa9a3f-980dcf37-2507e827-dde4f6c9": [], + "ede7dee9-d9fff69d-6b18ffa5-ee83e334-d818bbaa": [ + "Lung Opacity", + "Lung Lesion" + ], + "7252d03a-a20f7bb6-f72983bd-0b4f5591-98efee5e": [ + "Atelectasis", + "Support Devices" + ], + "63422ad6-e1977068-64602147-0409a128-76499d3c": [ + "Atelectasis" + ], + "a305262a-fc35773c-be68cd0d-b834e2ec-80646749": [ + "Enlarged Cardiomediastinum" + ], + "5f8a2e95-393adc85-02071eb8-cb3c6071-0c90090d": [], + "8900dcbb-18a63f4a-5da806d5-d2d1e1e4-856fb310": [], + "b1bf08c1-0f016663-5e5500bb-8b341326-b12e9c6b": [], + "0ec69750-0632a3fd-75f5556a-63efc651-c2d582f3": [ + "Lung Opacity", + "Lung Lesion" + ], + "36e2ba54-b3a43f54-fe19cfdd-d444c635-f67a3229": [ + "Lung Opacity", + "Atelectasis" + ], + "5b7be76e-a4c9feb1-8407dbe4-3d0e8436-c2b49b98": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "209d689e-f2bb226e-ab552d0d-9117b227-324c0ac6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "b9ea020d-fe39c08b-1e6f557d-405aa7cb-ce016ba2": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "127c8f18-778f317b-10bde8a4-fb02eba9-e1fcd511": [ + "Lung Opacity", + "Support Devices" + ], + "5a32886d-a4653f96-53ae3fbd-4903075b-320b865d": [ + "Lung Opacity" + ], + "372cbd5c-3e859e0a-99848f35-a0ad4c90-72e10f87": [ + "No Finding" + ], + "c28d6f89-4ca74a2d-2dac60f1-572eb1e1-651e43a4": [ + "No Finding" + ], + "86b84bed-d791c470-659a6623-1e13e455-cc83eda7": [ + "No Finding" + ], + "c681e756-278b3b38-0472808c-ce2344ce-743125ee": [], + "6e21c3c3-eeed0568-c5827143-dc010d61-a5f5f0bd": [ + "Lung Lesion", + "Pleural Other" + ], + "c8d7cf11-95b640cd-48eceb73-02f4b390-b9d3f500": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "ef655573-89dd6218-2a5e356d-fa86183f-4ec13d35": [], + "a8533919-65ca2062-6abef4f8-63fa076f-475432a3": [ + "Pleural Other" + ], + "f33f365d-10d1ff5e-228007f3-863aa1cb-63c0c506": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "cd151804-3ba37dc7-1008641f-491929af-f37e6dc5": [ + "Lung Opacity", + "Atelectasis" + ], + "b44fb02a-f784c183-f64902ef-a17d7453-69968006": [ + "Edema", + "Pneumothorax", + "Support Devices" + ], + "b51fb695-3cf77ffd-0401b042-c7378e82-eca5ceed": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7798f90f-d4185983-5f262189-fe7879ae-df20ce5d": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "321f3032-be0e27a3-89aaf76d-79b01d0b-1c4d5b9b": [ + "Lung Opacity", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "17a73741-1a329d9a-09f6f1af-1e66a860-43d74397": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "4cd0e6e4-e486a052-5adcc162-6ea6ba64-f65c1a31": [], + "2ee41fdf-c427ca61-d4dad2ce-68c8d635-55b20347": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "140a02ce-ac87f493-972a58ba-dbd9c6cc-486706eb": [ + "No Finding" + ], + "ea47c557-92fcaf75-13b7ed5c-c784b2b8-3d83111c": [], + "4237ac38-158147e0-87b15115-b3ffc6e6-113d33a5": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "83464977-3248cdf7-dabf04d4-71b78a27-306db131": [ + "Cardiomegaly", + "Support Devices" + ], + "edd6b83c-688ee075-7706abe7-8585945e-88b5d0c7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "ea32b0da-db8371b9-e24620b3-33e572f6-51a33032": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "1069a38a-769121b0-3d5f575e-28b0d063-fac78684": [], + "bbed68cb-2b0d6862-be4b2ad1-33830392-d1192f4b": [ + "Atelectasis" + ], + "679090b8-5b08a40b-e515db21-32f95ad4-624698c4": [ + "Lung Opacity", + "Atelectasis" + ], + "a5d7641b-97e1262f-5f5a9f22-71aaf621-10f7bdc9": [ + "Lung Opacity", + "Fracture" + ], + "6a0b14e0-582c0bb3-fe7625b9-7cd88c64-48f2a1db": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "54df276e-3a7668b9-583c36a0-d858ee7e-e7d57d25": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9296d4e5-8c81e5dd-f08e6cfb-658feaeb-fe3cdfa5": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f0bdf88f-f956d3d7-2ba2ed1c-b1a7bcab-4a9cf8eb": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "c25143a2-4277be3e-75e5e1e0-67b10cbb-2386d4ca": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "072f7231-5cf47203-6fd7994e-ed9b5111-008da8c6": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "b337b63e-7e254de9-316afa13-f7d944d1-b69cbe1d": [ + "Lung Opacity", + "Pneumonia", + "Pleural Effusion", + "Support Devices" + ], + "755a89e3-07c0c918-4be04b78-27526552-f2505932": [ + "Cardiomegaly", + "Support Devices" + ], + "1645a8b3-a40b82da-8ea72c55-64a8dfe5-ce6efba4": [ + "Support Devices" + ], + "5246aaeb-fd4fe4e3-3107d96d-28205321-1fcd4ed8": [ + "No Finding", + "Support Devices" + ], + "075c5fad-cfbf7397-05bfb8fc-55ed0999-6c4abf11": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "efb1eddb-0ef61d1a-e71c7c6a-9885a19f-d756d9ca": [ + "Cardiomegaly", + "Support Devices" + ], + "a6d94c92-b9884e9a-493bceef-9f6c698a-83d8b674": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "c3ddf503-e6b16525-fd7a9015-9a50abe2-bef2b09e": [ + "Cardiomegaly", + "Lung Opacity", + "Fracture" + ], + "f4caf2a7-cfab7dcf-4ed18148-2edc0c1d-ec22176f": [ + "Lung Opacity", + "Support Devices" + ], + "e3afe9cf-4fbc9089-8943fa0a-08a4af09-069a5605": [], + "462d17f7-8f916f40-15f994b1-a745df9d-44cc9f48": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "86cbbd27-298942a6-03e4baae-97bf2fa6-7959f957": [ + "Lung Opacity", + "Support Devices" + ], + "a92dc43d-69675ba1-b327698d-39a479af-fd78fba4": [ + "Lung Opacity", + "Support Devices" + ], + "0df3e21f-5672d561-1479a9a6-bb24d13a-afd4f39e": [ + "Cardiomegaly", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "9205c9ac-2bc07ba3-7ce03e6e-f5c7a725-31fd481d": [], + "be35822b-d15d7251-57872f94-f8e5d649-b71aba02": [ + "Lung Opacity" + ], + "6fa38a39-b7c9d558-58dec4b3-9b6ae59b-d80805e8": [ + "Cardiomegaly", + "Lung Opacity", + "Pneumonia", + "Support Devices" + ], + "18696db7-7d416236-9375f9b1-cb09447c-cbfb9773": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "60067fbf-8ef267f1-ac1186d9-a3798e30-1932da74": [ + "Atelectasis", + "Support Devices" + ], + "d7a84073-0d23e88e-5dbd44fd-4d8bee1f-5f53df8b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c1999cab-aab644aa-a8c530ff-347de8b1-4b8299ac": [ + "Lung Opacity", + "Support Devices" + ], + "16e5b1a2-792c2449-d0f46569-a6fc499f-62628542": [ + "Lung Opacity", + "Atelectasis" + ], + "21b2ba36-099442f2-f218da36-f0bc8c1a-27305d7c": [], + "9be6d2e9-c327b161-d0f2085f-bb403a9c-dfcb4b59": [ + "No Finding" + ], + "4be77f0f-26020260-0150f74f-f95c85f5-33c47450": [], + "8a2d0c99-d9c16df8-af4a6670-03baa169-48086bb0": [ + "No Finding" + ], + "07f9f818-19d71d41-fac3dfba-a4307c8e-1804d6ec": [ + "No Finding" + ], + "4e2cdbbb-94042b25-3040684e-0c7ff67d-5616031e": [ + "No Finding" + ], + "476a3664-0a37f09b-cf422fb1-b96e8af6-b1ff1c8b": [ + "No Finding" + ], + "9b3209a1-4f4f10b6-89d60e43-ae5ca330-58720ec8": [ + "No Finding" + ], + "40dc9290-9a260ee3-d39bc9ca-9a80981a-ca659255": [ + "No Finding" + ], + "c3fd73cb-5e46b400-0cc3a1d2-8cd95b40-d8ce12df": [ + "No Finding" + ], + "87c987cb-bf4d5e2a-f57b9ffb-a5d3f1b3-2a752ed8": [ + "No Finding" + ], + "f15e3281-13c23328-e39947d4-33a6882f-dd72ac3c": [], + "0557e604-9479496b-6839fa34-3dfa8788-846e8429": [ + "No Finding" + ], + "2ea89aad-3d076a79-425867fa-0370247c-567a9dd5": [ + "No Finding" + ], + "571f6fe7-8dfc0bb4-1a799b61-088a701a-55a35ec7": [], + "ed6718bd-49c6aaf7-4f16a407-3ce9862f-0961129b": [ + "No Finding" + ], + "b1013c9a-72cbbabf-f3f57999-0e872542-c493daa7": [ + "No Finding" + ], + "e2f8c511-0fc27635-102d25e8-09067cc6-6943c99e": [ + "No Finding" + ], + "1daf1add-19e374b0-b8e35d65-58f13e97-acb7ed37": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "c8e45d42-826148f0-ecddc635-78da1bb8-218f17be": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "0fe43549-21617d5c-89c5f44b-affffc13-9409fa39": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "66423af7-ad57034e-b950291f-d84abf0a-902afb34": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "167948ba-77fedd55-bc7926a8-bef575a4-e4ca7f9f": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "8e8f8159-d51ace31-6b6c0592-fb393f9a-65ead50d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "293c8608-3a0f3cbd-cea33c07-ea8130b0-2b90fea4": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "cce40a95-f888ed8b-3d0d8160-c780a8be-dedc172d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "f72e0100-fde456e4-826cdbf3-7c006797-8055bc44": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "87c8d17c-efddd19d-6d6bdf4a-33ac06da-52d1f2ae": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "cc1a416d-51f3f1eb-f180d40e-0cfd0190-9e7a9a54": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "463855e7-833cbc69-04a5abcb-dda8a693-e6e4e948": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6c74d21c-53fddedf-a2bb1745-bd2de6ee-d9f68f8a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "e044c941-2f2d494f-0a794f54-a64e76fe-70da04b2": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "f116ca80-a8af602f-9e093f53-f6f59ad5-7dd5441d": [ + "Atelectasis", + "Pleural Effusion" + ], + "31716940-bbbe2182-3ed77c6c-2c4bb3d2-e2d71c0e": [ + "Lung Lesion" + ], + "58486732-601a466c-04f4fd39-26bf4291-8cf57364": [], + "5efa2f05-aa177e84-93949bd0-2744fb04-908b9a48": [], + "7f7f9559-e0020fe2-d818feea-fe3dfc5a-6fe1fdf3": [ + "Lung Opacity" + ], + "849bcc13-403bf760-04323271-8223b6e7-a6c8e685": [ + "Lung Opacity" + ], + "06d06454-e679a2d4-05fcb986-27323b1b-a82e89c8": [], + "8e1f4766-c0852f98-8c4c8db6-57182af8-99ec6bb1": [ + "No Finding" + ], + "a5c94f55-0a06cd2d-322ee395-331426ff-75fa19b5": [ + "No Finding" + ], + "0747fa57-65ee11cc-ed504521-5cfed40f-2a61d9b7": [], + "9cbd3475-8f9f2464-1fbb6aca-f66b1b1e-6f5a46d8": [], + "f06c75a8-93f44e14-bd0480d5-b2bdb8f6-6d771156": [], + "3153b513-aa211ff5-db3a738d-8e4d0c11-9afdadd8": [ + "No Finding" + ], + "cabb5fa9-d1acd957-85f5de3b-98fe2481-6ebf62bd": [ + "No Finding", + "Fracture" + ], + "73e67ffa-4125674a-1c921135-faea72ee-d3a60267": [ + "Lung Opacity" + ], + "abca1a43-54c24a8a-52ed07b0-5cd250c5-afdc7061": [ + "No Finding" + ], + "c963fac4-7f414f76-1fe5eb83-2bd75a14-f2dcd77e": [ + "Lung Opacity", + "Support Devices" + ], + "8792030f-fa92ef26-20cc8462-d46e5176-1dd9ee64": [], + "b4ad1fa1-a7d0c3f5-61065597-401ffc49-7d46d1ed": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "394e4fc7-9c032c3f-1bf44214-594a112c-dbf00598": [ + "Lung Opacity" + ], + "3f69336f-36ceec41-467c3490-22a37536-b48f30e3": [ + "No Finding" + ], + "73d31d6f-ca8c0564-fa33ca69-0d72a50a-31d38651": [ + "No Finding", + "Support Devices" + ], + "d0e2802e-7ba958f6-7db1cbc3-31f2a1d0-0ac20695": [ + "No Finding" + ], + "86eb621b-f9a39d0a-22d3a0de-eeb8000a-f31f0e44": [ + "Lung Opacity", + "Lung Lesion" + ], + "f877eb30-e2155ec8-a0bdcfb3-494d60b8-a0e7c7b7": [ + "Lung Opacity", + "Pneumonia" + ], + "528871d5-6baf82c5-5fd7b922-bbc60517-26d6dc84": [], + "82964865-d4efa996-8d0f5736-16793d59-ca381654": [ + "Lung Opacity", + "Lung Lesion" + ], + "da356d52-522f4027-87bf71f9-a9ee4996-ea735f4e": [], + "25b1f581-32a8bccf-ddc5c8cd-f34d16a5-befd4bdc": [ + "Lung Opacity" + ], + "973d8700-4120b7b6-d9b4de64-42d4af18-999c914d": [ + "Lung Opacity", + "Lung Lesion" + ], + "4c484e73-4abd4329-ec10231a-56289fc3-aaed7d86": [ + "Lung Lesion" + ], + "eaf346b2-804fccf1-7b8edede-5553e418-701f2e75": [], + "f9a46cab-b5aa6b75-05607b40-69ec7221-7cdb3866": [ + "Lung Lesion" + ], + "3262a2af-cbec2cad-9cd5cba9-7d8623c0-9655977e": [ + "Lung Lesion" + ], + "c1610076-7344ca52-76ac1da0-6b6e055a-0888a924": [], + "2b16b5f9-f1b0a358-5bd9e08e-e1f5a385-2a69e8dd": [ + "No Finding" + ], + "d9247008-190a48a3-02caefc9-e25fb73c-1c3f9dfd": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "e5529814-3b0dbe20-70f99d0c-f5ffb1a4-adfa0614": [ + "Lung Opacity", + "Lung Lesion" + ], + "a958e3de-279030e2-7bc6d958-4c3d875a-60df89c4": [ + "Lung Opacity", + "Support Devices" + ], + "88e154a1-fd82784b-588fbc5a-0649ad57-b12ed9cb": [ + "Support Devices" + ], + "69eca2be-d1ce0c03-915414db-24d5cb14-1a5729b1": [ + "No Finding" + ], + "1e9ce595-bdd1e282-474eb65a-4f0acade-2ed14cac": [], + "29c6ee6f-aeb1d255-de6cfa22-759fbcea-190bc64d": [ + "Lung Opacity", + "Lung Lesion" + ], + "ae6a9c3e-1994f6fc-566936f5-9b51a110-2fb8ea7e": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "24aaa8b8-bd3cb728-72b4e416-3dca185e-89bad691": [ + "Lung Opacity" + ], + "5ff743c4-002fb75b-2bebc8ef-391abb9f-8ecce49c": [], + "bb2ec5e1-ada1247e-33e3a640-9b80d1f5-9c7f15b6": [ + "Lung Opacity" + ], + "cfa6f879-767cb5fe-cfb7acdf-144814b9-7e4fb170": [ + "Lung Opacity", + "Lung Lesion" + ], + "380bd914-1c234083-a59c609d-7ebce49b-0a9b6101": [ + "Lung Lesion" + ], + "896369e9-0e4e879b-f8fccc40-e58605c2-c1bfaf48": [ + "No Finding" + ], + "f60b65dc-ac803984-0787a100-9fd4173c-5b5c619f": [], + "5544bf5f-cd726bd8-5b0bd5ab-c8c4b0f3-f296c7e7": [], + "10313a92-ab9a74d9-00b5cef1-09e6a75f-b95d878d": [ + "Lung Opacity", + "Lung Lesion" + ], + "971b4bd8-09f04bc5-e43b86b5-dde445a3-5cbfca46": [], + "8f21f008-08a83591-c104c6ca-3bc4abf9-5a9a7ccb": [ + "Lung Opacity" + ], + "8f587ae6-79663504-c7d6018f-27854479-a30cb057": [], + "b2866e53-ffc2e916-fe99a48b-4d3622b6-df9fb5e7": [], + "66e06e1a-cbaf78cc-cfb43d10-c93987a3-a12d7bca": [ + "Lung Opacity", + "Lung Lesion" + ], + "f64e7f86-3a69ce7c-1bca8f45-3fb972a4-a7f54583": [ + "Lung Opacity", + "Pneumonia" + ], + "c3a5cd3a-ef8d5ed2-e9185ad1-5ed385b0-b980a67e": [ + "Lung Opacity", + "Atelectasis" + ], + "a801e9d6-a80c7ee3-f0074930-698b1ee0-eca02fef": [ + "No Finding" + ], + "edf1e5ad-e7249deb-2d881608-aa2878c8-e22288bd": [], + "11dec88e-878b57f1-343fb940-c74959b5-0320dab9": [ + "Pleural Effusion" + ], + "16ba2ebd-2cf0b27a-05a2c9ef-d72cf558-6c0b0bb2": [], + "6f942e01-0ff2a009-37a3ba1a-9ac8cfa7-43910a68": [], + "3409fbb3-3f6323e9-0d72911c-0f62ad8d-ec55cdcb": [], + "975bd9a6-00f17467-7782efe6-857c386d-9d3494b6": [ + "Lung Opacity" + ], + "e5f0aa5a-be3e0f67-149b4619-3d110ca7-7f102361": [ + "Lung Opacity" + ], + "50b6f2c0-a99478b8-c1b353a7-66a4347c-af161d2c": [ + "Lung Opacity" + ], + "f25fd3b1-93706233-89edc8d3-09483d65-361ed6aa": [ + "Cardiomegaly" + ], + "406fe27f-63d23a7d-33fa6a30-181e80d4-a1f38ff4": [ + "No Finding" + ], + "5c43dc33-0a06529a-827bf40b-85849e83-977ad483": [ + "No Finding" + ], + "d4b90254-71776112-73f647e1-bf4f2291-54ff2751": [ + "No Finding" + ], + "26ee6ee4-e5bb799b-aa5f201b-b27779ab-636db2a4": [ + "Cardiomegaly", + "Atelectasis" + ], + "82c0e7ef-5760c746-e27a81ec-73b19b26-475e8d54": [ + "Atelectasis" + ], + "01b2e505-9d2a75bc-da0a86a7-cb2a2c42-9582f62b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "3b197005-484344a8-d685b5df-3c59c632-aa22411e": [ + "Lung Opacity", + "Pneumonia", + "Atelectasis", + "Pleural Effusion" + ], + "00d187bc-46b2dcc4-dcc3029d-57dedba3-c026f807": [ + "Lung Opacity", + "Pneumonia" + ], + "1041a192-952e9875-16fa1c6c-45c39917-f19e5dc2": [ + "No Finding" + ], + "2e94960c-365a721b-61eb4283-9b7acafa-153beb97": [ + "No Finding" + ], + "5153eb4a-9454babf-5d463789-3f9111a6-547adedb": [ + "No Finding" + ], + "25651b13-d572c28c-5e501292-b096b253-6d6fb63a": [], + "547bf6d9-5959e8be-65d31255-e8e031b4-5a9af9e0": [], + "3dd4e4e5-e6793772-9ea89ee4-5984f91b-04184847": [ + "Lung Opacity", + "Pneumonia" + ], + "f075ce73-c9417eb6-96794bef-5c430ca4-d3026797": [], + "09aa6fa5-3e35f33e-7725ffae-853bd99f-0f47eac6": [ + "Atelectasis", + "Pleural Effusion" + ], + "4b17550c-25e0500e-c7f5e522-75da40cb-c6e5c492": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "84886842-304fe1cd-e55f7a58-185a5fe3-96e3a8eb": [ + "No Finding" + ], + "908b9934-054b6fbb-1a8eddea-5b722b43-2f83d2fb": [ + "No Finding" + ], + "3e807ef1-89671fba-a42567b3-a1ceb0db-0c056a50": [ + "No Finding" + ], + "7036152d-aa6efb97-c67ab87a-cf180d3c-c9a2dfd1": [ + "No Finding" + ], + "9f4f2d43-83091dbe-aa72f47e-5d7d06a0-6512aa11": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "e5058ddc-12914e19-41492f3b-9016f745-4333ebfe": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "7875fcba-da8aa12e-d091f393-527e729b-65c7d344": [ + "Atelectasis" + ], + "8894a073-a8fc7130-d4c16a1a-200a8663-2f3577f8": [ + "Lung Lesion" + ], + "01426485-8678cd3e-09df30bc-44f2929a-dcae524c": [ + "Atelectasis", + "Pneumothorax", + "Fracture", + "Support Devices" + ], + "2e8f09c5-490b580f-3d8c66a1-baec541c-5a0c5908": [ + "Lung Opacity", + "Lung Lesion", + "Pneumothorax", + "Pleural Other" + ], + "9244882d-c90352d9-806e731d-e028242b-a619a04c": [ + "Atelectasis" + ], + "eab0888d-6b3b2814-4f0e59da-6f0c9408-d4cab1b0": [], + "01064b50-d0d421d9-6fad1834-798ed6d8-d2ef01ac": [ + "Enlarged Cardiomediastinum" + ], + "4e25f2e7-4ab07975-e5a9f14c-acc20f75-9fa89750": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2bcf27dd-d6846a19-17a50f81-e265b7ff-00892752": [ + "Lung Opacity" + ], + "6e7d1634-c7ec6214-ab2d08c7-5f964d50-7fcebc90": [ + "Pleural Other" + ], + "3938b32d-934d824e-3e75f809-d61dd89f-ad22b1a3": [], + "57eb3bc1-e545c54d-119c0054-14d0f8cd-7d46d994": [], + "8ddb63f4-106e50f8-38f5b05c-d7f17419-6515de90": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "c7a2c5af-3b1a64a5-470827fe-ad59bec3-82fa5c9f": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "83422dab-e3015272-fbf3df24-eb9e1d65-1da5c1dc": [ + "Atelectasis", + "Pleural Effusion" + ], + "9b4edb71-42dc3068-0b5afbd8-6d1b2b45-34e992a3": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "274d8805-bc393e4a-269a1f8a-ee42d1ae-e8959ff7": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "b89928d1-52232630-816e0948-e20d92e5-b0d906ab": [ + "Pneumothorax" + ], + "91310c64-f689bd9a-53a0bb24-83baba02-d33e0c78": [ + "No Finding" + ], + "a6bfecfe-281e20c1-3d9a3002-ebed7792-aa0c7f47": [ + "No Finding" + ], + "d82e22a0-b3ce3eec-22bf56ae-9a1fca51-556da100": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6fafcd8d-67ac12fa-a3ce56a6-3557b61f-1fa1d58a": [ + "Lung Opacity", + "Lung Lesion" + ], + "d593896e-25d268b0-0a8ededc-4a4c401c-c72b8357": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "666f0409-83c99213-aec854ff-03da11ef-e191743c": [], + "d190c814-1c8598f7-9097eae2-3fa18869-4c3939f0": [ + "No Finding" + ], + "f19575cf-a6ee7054-d30f3c82-aba71fa9-681c61fd": [ + "No Finding" + ], + "1e26851f-86034c0c-3c1b4167-5d391b8b-e57ddc3c": [ + "No Finding" + ], + "a30106ce-242ee50e-4ce16bef-83e94bda-ce490f7d": [], + "6caed164-11e024ad-5d6bb57a-9bf52ee3-2ca67ded": [ + "Lung Opacity" + ], + "ac093f50-68e5995f-7d538f77-146f8bc4-7f6bd8a2": [ + "Cardiomegaly" + ], + "052e448b-2164ba7d-2a1a5625-94f5bdc2-34f732ab": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "23a5cd3b-6bb29875-b1984d7c-7987bdb4-cff71cef": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "218d1c93-0e3c7a85-76dca3b3-1b9ebcc9-e2b4c42d": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "c5b8a2f9-090381c7-4b218f8a-c0717744-0ce9f78a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "c85fee28-66bb150d-3b065b0a-102fe76b-cbe662b0": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "4861b3fb-a6f7f90a-54624d89-31cc606f-beab81a7": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e63e4411-eb57a2b9-50bb9ef0-8f980310-c7fd6f0f": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3c021d64-a606521a-b5070291-5ec59830-23aad4a7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "3f89e108-89fa407d-26628871-8e8731be-02819429": [ + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "daa9c2a1-691a861b-e52b5481-7f9bdd7b-7620fca2": [ + "Fracture" + ], + "54e21088-65a35336-172f8890-a611790f-e6557f83": [ + "No Finding" + ], + "6df82632-348a13df-d696e9ad-1f33b79e-86525aab": [], + "bab86a42-05db59f4-454c02e1-0bbe3f31-9cdc1707": [ + "No Finding" + ], + "dbaeebd4-8edab08d-1bac4c08-b70ae703-e338d747": [ + "No Finding" + ], + "e00791c1-236f1162-299681bf-dc0ec9cf-db0b76ee": [], + "1b370f82-b8a415a7-a70f0db0-bda921ae-1e8001be": [ + "No Finding" + ], + "317e7630-52d0ab79-4239d66c-35065bf1-3202618a": [ + "No Finding" + ], + "4f22a5c8-9c123a46-7ddaa379-f478d129-ebfe7617": [], + "5f911953-51eaaa8a-320221e3-a2cf095f-044ba357": [], + "b60f7b52-7c9856fa-65e8bf8a-92264fda-4be20437": [], + "ea1611e9-02ce0511-45a33de4-95ec5416-44848b18": [ + "No Finding" + ], + "2183d638-8f431548-7221c970-340325e1-fae35262": [ + "Cardiomegaly" + ], + "7abed310-5c7341f5-b74d2b26-7880d896-1cd5cff0": [], + "a07cee97-c744e578-dad89348-abe3886b-efe599ee": [], + "e4527afd-9522899b-f0226c68-901dccb8-e2d4eff4": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "6cc81092-d60dc980-f5c8dd41-cc44c43d-09b45cbf": [], + "162fc277-cbb73b5c-ce81e596-2975a3c2-428c8a21": [], + "53286e62-dc9dc056-5c468ac4-8d4b9a0d-747d77cd": [], + "06c66858-7a1c5a87-dcab2b4f-eac300a1-97c25db3": [], + "371535d2-66f5cbc5-b9d8abfd-fadeca21-81b0e4a8": [], + "25118890-fc44b48b-8e3d2980-31cb3356-13527ea4": [ + "No Finding" + ], + "c58bc070-f7ebbe78-118de371-eb210cc8-fa6d8df7": [ + "No Finding" + ], + "03b9e3ff-c40f29c1-615fb8e6-0216fe58-613d5825": [], + "064e926b-28021384-d5cb542c-d54a9c5e-691c53eb": [], + "3f35c879-e0f325bf-a821d3d2-60eb7acd-9e2a28d9": [ + "Lung Opacity" + ], + "92f37995-1d0ade97-7686e702-9ab7dfd5-ea7832d1": [], + "87d03f53-dd1465e8-d596008b-79e71d28-8211447b": [ + "No Finding" + ], + "df851e66-1968ad73-dcc1849a-1cabdfab-cedd0bf1": [ + "No Finding" + ], + "200e17d2-666d3d30-cb5b7422-11e2947b-b9be4f8d": [ + "No Finding" + ], + "f782b459-df9bf16d-518954f8-214bdf11-0fd20ce2": [ + "No Finding" + ], + "0031401d-0506c0cc-964f493e-c7e40618-2047871e": [ + "No Finding" + ], + "881e3b6a-b2732a0c-70171a86-1151699e-8fceefe0": [], + "17fae21b-681fe7f9-de27ec0b-232f4842-b13d94e9": [ + "No Finding" + ], + "5ff8860b-fc277b55-da194e4b-22a5190d-6e95a1aa": [ + "No Finding" + ], + "1d4d38ca-ca23a788-10bb00aa-f4d15995-4fa7389c": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly" + ], + "cfdff70b-bac19d1e-01b71598-af4a73bc-345ae344": [], + "00c5e8ac-78438bb0-ce44b225-9f9b777a-cb4e468e": [ + "Cardiomegaly" + ], + "f77f2651-184cccdb-7914e653-346dbc48-025f042c": [], + "4350f64d-aeb8882b-534177fb-fd203cf0-30c10a19": [], + "e8097fd2-6a5694a1-70f737f9-5d60b4b4-582fa652": [ + "No Finding" + ], + "a8b640d1-c3a81570-baa9d963-cdaa8622-dfb59aa2": [], + "e965c6fd-c7c9ed8a-313a8d01-e2761616-b0dda288": [ + "Cardiomegaly" + ], + "16238d89-58968b0f-5673acd0-1ebef29e-4d339d87": [ + "No Finding" + ], + "c3a1b629-9780bce6-f4039fd1-f3db7c19-55bbcdb7": [], + "2cd5b0dd-527a6616-cb6ad62f-c8ee94df-0b7ffd5b": [ + "Lung Opacity", + "Atelectasis" + ], + "421ffb60-9a41bff9-c842e6e6-a31adcbc-d8e5ad64": [ + "Cardiomegaly" + ], + "2c69ade8-24448991-edc21d3e-7298899d-6ece7e0a": [ + "Lung Opacity", + "Atelectasis" + ], + "d24b5355-c7b4a8cb-680e6185-0280353a-18bff492": [], + "2522581e-ac120282-c9568047-88e5dfff-2e19d8e4": [ + "Atelectasis" + ], + "9ef62dcd-4b3e52d1-80cd9cd2-655e3c3b-b0669fc5": [ + "Cardiomegaly", + "Atelectasis" + ], + "eac81c8c-1dc5b6da-13af8380-a66641a0-1a204f81": [ + "Lung Opacity" + ], + "78675c97-3d574a7a-21454f9d-2487195b-496a7b4b": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "53e18b50-2214dd2c-d70345b2-935f26ab-f5128750": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "b8a96dfd-924e5707-1009e1ac-9f767236-ff131cd4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "35136a7b-a6253f96-8f21d7df-52a01ea2-ce5aa3fe": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "c4df65ce-6d545b91-83579e78-d81570ee-b18f0e0d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "54dc0bb7-ef174450-8314a8e5-b94f3c64-748fd4a3": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1312be28-d131f758-783e1a08-1e878cba-6236e5ff": [ + "No Finding" + ], + "766b651a-bf318a3c-a6e00002-e595f99a-1a97ffae": [], + "14f68fc5-ae8a53c1-5b35d96f-1fb5d709-e09abe35": [ + "No Finding" + ], + "76c189dd-c9cae85a-af7009fe-25471b3e-172f291c": [ + "No Finding", + "Support Devices" + ], + "3bd7086b-893fe462-f1699be8-dce553d3-1459991d": [ + "Support Devices" + ], + "1ed2756e-369a930f-ffff5e24-2435499b-1e4603e9": [ + "Support Devices" + ], + "c2e4d2ab-1ef3ec14-f7d2ee88-38430789-e17be20c": [ + "Lung Lesion" + ], + "0486aca2-fd15fa89-51be4de4-01dcddd9-ed8ebf50": [ + "No Finding" + ], + "88ccf610-b3c4e8b9-dc228355-6410ee87-1191a63b": [ + "No Finding" + ], + "59b7e3c4-05bcf819-da6417fa-60f5b61a-38711e5c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "7b4211fe-def2de24-c6991efa-026a3d44-2e4082f8": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d54a965f-9fb1b27f-8a1b45a8-87d31707-45c1feb1": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "efa1c4d4-c6b83e76-71107d37-015f4c79-24aa9e68": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "b606c5ab-1f7c5020-53941bec-8f32fed0-249da9f6": [ + "Support Devices" + ], + "c3dccd75-321d490b-d282ea11-4da8be1c-6f83adb4": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "576ea30f-0b6d676e-4fb00e65-c319c423-7445e215": [ + "Atelectasis" + ], + "ea4d9952-427fe1f1-211bede7-853d99dc-eaaa4a79": [ + "Atelectasis" + ], + "53c74567-293c2bb4-71eb4e1e-7dbc1f94-8eecb92b": [ + "Lung Opacity" + ], + "aecd487f-89650453-71139ac4-094e3790-910d705d": [], + "48137c2d-eb569f44-d59a0735-091e53b4-ea6f8a26": [ + "Support Devices" + ], + "78ec02f5-f3419d1a-1733282f-87d9ca09-ae2c9564": [], + "e8a8fe6e-ba33113b-b7244463-6d8269c8-401aab79": [ + "Support Devices" + ], + "6731c06d-16bbcd4b-74834699-e8808d6b-6f7c74c6": [ + "No Finding" + ], + "dd78d25b-dc8c3cf2-d7bf6627-14791a61-146846c2": [ + "No Finding" + ], + "96ac5d23-fc7ee66f-45c92058-4edaeaf3-87204a92": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "527ab470-5a042701-655a8f99-f88b1d1d-d9a565d0": [ + "Lung Opacity", + "Atelectasis" + ], + "a5c3b36a-f3271f5a-cc6ce24f-3808fc88-f79e1e27": [ + "Lung Opacity", + "Pleural Effusion" + ], + "71303414-ba44ef85-a0ecfd3d-987e16a5-878de783": [ + "No Finding" + ], + "75da10ed-116cae46-bcce243e-043a0dd8-3b9cd092": [ + "No Finding" + ], + "b8fe3d66-623dd7f2-01a7c7a7-e3115bac-20b92cb8": [], + "5ce424e3-7e50c3a2-f36da4c7-bc25a2d1-a37fca4f": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "21e904a4-539c24eb-be580554-4d15ddda-3546386c": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "f3fe398f-bb2b70e1-8ee5b14b-b9a498be-9d923e21": [ + "Lung Opacity", + "Atelectasis" + ], + "fadf202c-b58902f4-74479a47-d1cb4e1f-f67332ba": [ + "Lung Opacity", + "Atelectasis", + "Fracture" + ], + "b6d528ca-2adc0b92-747b8c36-a0e0887d-6b962cec": [ + "Lung Opacity" + ], + "82ed5499-22d93514-a1cced80-066ab639-2066625f": [ + "No Finding" + ], + "c1e60b7d-0a4e5228-148af355-3f9fcb50-d501908b": [ + "No Finding" + ], + "b84fa313-09027c57-7c255b39-f4aed3e3-ff396107": [ + "No Finding" + ], + "ff3dc06f-f7a97800-fce2758f-0bbeccd1-463d4449": [ + "No Finding" + ], + "2a1e777f-0b658cf0-64aafd5d-0a0d22f8-9bba06d0": [], + "f2823f12-bcf8d6c1-6b131e56-5ffb6d36-cbd75947": [ + "No Finding" + ], + "11e48232-807822de-087a2398-ff1998ec-ec7c263e": [], + "4551db74-ad728834-2a629241-9104fd86-6810bfcc": [ + "No Finding" + ], + "0b2dd972-3c011bed-2c95c910-d16cc4da-65760e65": [ + "No Finding" + ], + "f88a088b-aad99d7b-cad14019-614d2277-b01bb0bb": [ + "No Finding" + ], + "03b3c6e9-67123395-f76ddecc-19a10040-10f5b4e9": [ + "No Finding" + ], + "3a296121-9fc2bc73-d081dd75-b9ea5164-f49fc528": [ + "No Finding" + ], + "14ca8f98-3b8cc136-42e4fd22-e44b2da1-e390b60b": [ + "Lung Opacity", + "Pleural Other" + ], + "197a7aed-7ea6e597-f69224f2-04b68fe1-0148a45f": [ + "Lung Opacity", + "Lung Lesion" + ], + "4213580d-ac255044-99dbadbe-876a28fe-69c13044": [], + "67cde0b0-055d8347-2a99b426-f30ad9ca-db0ade30": [ + "Lung Opacity" + ], + "a5dbfeb9-868150c3-2d9545bd-f01f5543-d4a57638": [ + "No Finding" + ], + "bb2d16ed-83a9269c-7f1b2130-45116784-a9c8a430": [], + "0704b50e-89e04dec-4a699ba3-a4093977-f48109be": [ + "No Finding" + ], + "945ba47d-cb1ad056-168ac55e-9b9ba3b6-4b80d1f5": [ + "No Finding" + ], + "fb8c984b-8ddd4a3c-e0373e0c-8ed815d8-d180c599": [ + "No Finding" + ], + "f2948447-484794a5-6fb5339c-38ea0630-f00b4d11": [ + "Support Devices" + ], + "46bbccc4-0de08ebc-a7cb330e-39811a4d-c74d733b": [ + "No Finding" + ], + "beb1177e-dce3b292-49faa268-a82ce0e0-04d257de": [ + "No Finding" + ], + "c3198910-fd888ca2-0e1c5a82-8e318b2f-9901e350": [ + "No Finding" + ], + "08c57c30-cc28a132-c83ff0b6-eb8367f2-8c2eeb06": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3a8d14bb-e7b82dd7-5dad553b-e6eb2c41-7a0e3118": [], + "84c08756-e01015c6-65599730-f91d3b83-e4a954d9": [ + "Atelectasis" + ], + "b141bf84-f515c0d9-96113b11-9349f481-567cb70e": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "58597ddf-5c95d260-4911eef3-5907f696-f132c629": [ + "Atelectasis", + "Support Devices" + ], + "e436cfc0-fc21c094-9d4ddd86-bbf65f19-70a2c641": [ + "Pleural Effusion", + "Support Devices" + ], + "f6a58dfe-8cde9194-a1c915d6-f69e88b3-3437c91e": [ + "Atelectasis", + "Pleural Effusion" + ], + "abbc56f7-3569a197-33b68a76-2649b730-79cbcd28": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ed41d65f-590e0bfb-eb73d35c-3096e02f-e29daec8": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "01913fe9-f0448eac-8f439832-dc05486f-95545a64": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "1a93c3ba-b683fe20-b0710462-cf40c34d-136cf408": [ + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "57007272-9df31ade-7ab87e66-6edccc37-48b62a32": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "379b4718-fca565b4-9fc2566d-ecc473aa-00e09bdd": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b89d409f-f86c5bd7-887db0e3-8a997dbf-b16e1142": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9771b7cd-8a87ee8d-bf9e4546-ec002991-5580c62b": [ + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "ca7d8827-ea1c412d-b6a0a594-12d32534-52028738": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "81a0dd10-9675bcc3-97f75def-6373f508-ab005bf0": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "81e49d35-cb37d4ba-9cbace45-72adbd5d-f1cb41ad": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "73c4f0b3-857d48d6-62f18f50-6000ea9c-43e2d25c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "be18562e-74237b2c-c9ebfcb8-ba1b5c02-7b949433": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1286de61-eb3da8d2-2f6eb5d4-b32deb19-ebe3581d": [ + "Lung Opacity" + ], + "bdd0f372-e708b3b0-e9328838-c9a7f29f-f68971d0": [ + "Lung Opacity", + "Pneumothorax" + ], + "2d271bb0-b719bae0-a9361b1b-16706831-41fc9798": [ + "Lung Opacity", + "Pleural Other", + "Support Devices" + ], + "34c2aa16-f1f5bd4a-29eb1957-6c3c1668-854aa214": [ + "No Finding" + ], + "e842a138-69a0ac81-0b138fe6-e13752c2-243955bc": [ + "No Finding" + ], + "5cbd768e-5bd7bc33-aff08070-8a3a2de3-bd826608": [], + "8222390f-cdfd6433-74a649ee-a28aeae9-88fd56fe": [], + "3779e414-76cf3539-5f0c3634-17dc774e-61e0cdb4": [ + "No Finding", + "Support Devices" + ], + "ecb75c7e-8737e1e1-a77376ea-c4b1aea9-7021ccac": [ + "No Finding", + "Support Devices" + ], + "58263114-6dffa53e-32047b1a-853e06a0-f5f099fb": [], + "edc6ce1c-fc4f414b-85d4b348-397ef133-0cd52d48": [ + "Atelectasis" + ], + "e5a5b5a2-a2996ae1-5bb987c1-eace885e-862db33c": [], + "f1e70f28-5a6e30a4-7f2d7942-6753668e-d6f2ba56": [ + "Pleural Other", + "Fracture" + ], + "17d61d08-38d54e3f-a90d2a5a-cc0735ca-16f7c8a9": [ + "Enlarged Cardiomediastinum", + "Lung Opacity" + ], + "d654d073-7c55a18f-ede777f5-b8b0cd35-4d8a1782": [ + "Cardiomegaly", + "Atelectasis" + ], + "424512f8-2a1c31d2-9ba3a1a4-63c2f669-1232ca66": [ + "Lung Opacity", + "Atelectasis" + ], + "bc3c796e-6d0d50cb-bbda3fad-e5317feb-9129e16e": [ + "Atelectasis", + "Pleural Effusion" + ], + "7992c68f-11f00489-37aaadc6-6aa3e5c1-f3546cfa": [ + "Lung Opacity", + "Atelectasis" + ], + "a4e3640a-d1ed5982-b24f0c58-60e77e47-0256fe41": [ + "Atelectasis", + "Fracture" + ], + "4416e093-eda773d1-84f8f5dd-f17129d6-0f730272": [ + "No Finding" + ], + "837c2769-c747eb79-c73923fc-29fa11a1-7954345d": [ + "No Finding" + ], + "0a13521e-6acfb42d-704d4596-c983baab-5227fbea": [ + "No Finding", + "Support Devices" + ], + "3d973084-61d4b944-76a7f29f-472d0b0e-74563711": [ + "No Finding", + "Support Devices" + ], + "00b5589c-f5097caa-1b9fc64a-3cbd40d1-aac5eb42": [ + "Lung Opacity" + ], + "22df5947-d4f32355-60f7b9aa-d140ddb0-028af26a": [], + "222de94a-617f5cad-684d59ce-8ddd536c-aa8aa84a": [ + "Atelectasis" + ], + "b29bb966-45c209b8-1dee89af-5f791df9-481fe9f4": [ + "No Finding", + "Support Devices" + ], + "6f89762b-7470dad3-738456a1-7eca6b8a-27f96f66": [ + "No Finding" + ], + "9de9b3d5-52ceaca4-f8dc1eb9-476071b0-39ec7ea0": [], + "edf0798f-b3a2fdbf-00c812b0-c8d3b152-10d90abf": [ + "Cardiomegaly" + ], + "9f3c1525-622b3786-d4ec71b4-0ce69eb7-b8ebd96a": [ + "No Finding" + ], + "ca27223c-046c7c71-84a448f9-cd2bfe19-fecb7623": [], + "52e697a7-82a5997c-9983ec74-57da40f9-57b1a5fd": [], + "799a1e79-6391085d-5116aa00-483b59b4-8a776a15": [ + "Cardiomegaly" + ], + "e87f90e6-bce5fca4-f56f7269-9dda5b46-e2413c48": [ + "No Finding" + ], + "81893a7b-25e3ed4b-8debe6d3-38e925f6-ebeb46c7": [], + "ab1864d3-39efd23e-186ed260-9dd6e19c-9b5c7043": [], + "c3a30ee6-a23b54c0-6b4d9444-3703233d-1f7a5a46": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Support Devices" + ], + "cf34b8b8-d4e13fb9-2d589730-6f402164-0ef8ffdd": [ + "Atelectasis", + "Support Devices" + ], + "68d8c74c-b5c3c405-4232a5db-964916b5-a79a6594": [], + "e6860ce3-b1b0771f-ea2ef31a-bdd9346a-27206777": [ + "No Finding" + ], + "99111a32-995871bd-440828c1-27e28f82-8ee32d3e": [ + "No Finding" + ], + "c5d04cda-5902b0d3-962ad8a5-23e1fcb3-013d913f": [ + "No Finding" + ], + "315d37f7-b61c3e1e-be16af1b-9a2d7783-e2da1d8e": [ + "No Finding" + ], + "d26f1288-1dbca978-9e778e54-d1b738cd-ee48b9dd": [ + "No Finding" + ], + "9eacee09-f3a00feb-1129b788-b9127605-94b95329": [ + "No Finding" + ], + "d3b50fe0-bdb73c16-16774a7d-bbc6b279-63984407": [ + "No Finding" + ], + "7a30c54e-efd24c40-62ebd58f-010424a9-6a7200a8": [ + "No Finding" + ], + "b2ed7529-568134f7-5327275f-c83b91bd-a411f137": [], + "92b028e1-36a43ec4-b185bbfb-7187e208-3bee4505": [ + "Lung Opacity", + "Pneumonia" + ], + "c3faa797-8ce7ca41-dfd7d4f1-977729ad-c02062b6": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "a9708514-d13caad4-67a5bd5b-50adf0b1-001133c9": [ + "Lung Opacity" + ], + "b9e0794f-128bc11f-687abd02-c3068507-8bd8cb3e": [ + "Lung Opacity", + "Pneumonia" + ], + "43ac8837-cdd4322b-f73768bf-f798dcb6-bbef815b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "bf216517-21b42ccc-627f8812-5d889362-f5e78c59": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "53f3ebc2-eccf07d6-246e623d-a4b102ff-79e5b202": [ + "Support Devices" + ], + "0b15a853-44ea4dcc-e9dcc745-dc75e138-94628837": [ + "No Finding", + "Support Devices" + ], + "5dfd702f-14822708-67885b79-475de57e-c4f8f0ca": [ + "No Finding", + "Support Devices" + ], + "6c2a89e1-7527c7bc-af55390d-e1a8a046-a6a45f48": [ + "No Finding", + "Support Devices" + ], + "72b75c31-c89b5e3c-f2a6d852-a3982477-96334886": [ + "Support Devices" + ], + "508bde7e-579a6a09-068aea43-219e2386-53d7d1cb": [ + "No Finding", + "Support Devices" + ], + "c15b6e43-634ad95e-69919edb-abb2028c-661b636c": [ + "Support Devices" + ], + "d510b0bf-95986115-d0440448-4733c4af-00c420aa": [ + "No Finding", + "Support Devices" + ], + "42fa5a10-17856f17-da125a25-87062ee3-f9e4c296": [ + "No Finding", + "Support Devices" + ], + "4cd0d1cd-237bafa6-1be083d0-17d9d30b-6af8d1b5": [ + "Support Devices" + ], + "08029b60-763ac6a5-53ccfd4e-3b593a21-cf78ad88": [ + "No Finding" + ], + "acbef8a3-2a857ff6-2f6778b4-31ddaf28-debde67b": [ + "No Finding" + ], + "306b0293-e2548149-2de39ebc-cd25e20f-4b879865": [ + "No Finding" + ], + "e830b6f7-d74485cf-a5ab6855-8063ff88-edd2313f": [], + "11a4b049-8c3347ae-9833fe58-8d108cd5-e63e1fcc": [], + "482d52f7-7c113961-9abdb524-09269248-cef6708c": [], + "6d360f7b-67dbe66a-c31c23eb-f92e07f9-951ca5df": [ + "No Finding" + ], + "4bb0a233-9c375594-652f647f-64f5080f-30112b80": [ + "Lung Lesion" + ], + "4e968da7-36d6c5bd-e174cb95-66fa150c-d20ff9b5": [ + "Lung Opacity", + "Atelectasis" + ], + "2f821554-6b546bda-9be33494-4aa387db-9b020bb1": [], + "33d1d839-1473585f-86e05cdd-4b4ca0f9-c617aefe": [ + "Lung Lesion" + ], + "3dfa0784-a75d96af-25fffbe9-c9e922d8-c7b8fa79": [ + "Lung Opacity" + ], + "5094d0a0-f07c9eb2-b85c310a-d6e1335b-ca4efd83": [], + "1b622c42-59a555ee-9ce86379-95086f68-c4bed039": [], + "2bad523a-765916c2-a61d6020-4c5c7a19-42017e45": [], + "8d4c9eb2-984e5879-a822d017-56d518a7-0a75fbd5": [], + "c05aa1e8-ed9a9cfc-6c9337e0-0d53c30b-388ee6cf": [ + "No Finding" + ], + "e84c83d4-f03872ee-5fe8ec3b-076ce17a-f7b4f861": [ + "Lung Lesion" + ], + "7b744edc-0340d515-d2f68a05-cfb53241-560899aa": [ + "Lung Lesion" + ], + "87758a0a-42502f4e-666f7d3f-b75e49a3-243738a3": [ + "Cardiomegaly", + "Lung Lesion" + ], + "ce503ee9-43932a5f-76cf3fc3-77fc0303-686fb5c2": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "089b48e3-21dd2256-41eb2c07-e7ac0494-da51c1b8": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion", + "Support Devices" + ], + "8ed65ad6-239bbf7b-5e6858f2-f00269d0-41305065": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "312bb0ed-2dafb619-a0da3729-5dc19055-53169588": [], + "9b3c6816-5dff0eb0-f54e92d0-805791b2-11c32f0b": [], + "d7f886e4-10b9a3b0-c1cd0403-c6ec2f94-2dfc32db": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "83239aeb-423f4884-3030d0a9-5c624588-7b8dca07": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "05c6f437-00c5dd3e-2c78d21e-40683522-8e9ff770": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "60999807-e9c65537-0be33d31-e1f2eb09-329bb2a8": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "0b336535-040e4914-3827c41e-c9f96093-d6f5d54a": [ + "Atelectasis", + "Support Devices" + ], + "4c20cd93-cbf30533-1459577c-278ce3b2-46750f47": [ + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ca37ce49-8fdec0d6-4dc2466b-44543962-762cad72": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "4912b8ce-70f296a3-b9137775-5da5c93b-74948b5e": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "789e5cee-de74bcc5-a97c6525-24efe85d-ba759178": [], + "976d5e24-dbf376ab-9966d398-5632fd4a-09cb1d19": [ + "Lung Opacity" + ], + "3e0c30fb-983b2a9f-80136b8d-f7949f7d-4ee24f04": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "669d85b2-5453dc2b-a961b4a5-afa296a7-06a77cd8": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "d07f3fa4-182c4d9d-459fd2ed-24c6b8be-2802c598": [ + "Atelectasis", + "Pleural Effusion" + ], + "448e62e9-12a35130-5cc19fc9-f7d8b729-5751bf9c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "eee409a3-a4d4b1f1-792bd53f-adbce257-55c2b13d": [ + "Atelectasis", + "Pleural Effusion" + ], + "b01ddc40-b80fa234-3533e014-3b0fdf7b-e8c67c6c": [ + "Atelectasis", + "Pleural Effusion", + "Fracture" + ], + "3ff7aa6a-fcc94e00-adc8df6a-de85a781-27c9f662": [ + "Atelectasis", + "Pleural Effusion" + ], + "c448141e-083d9d4b-bf1a42bb-1d9de6ab-35d172f8": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "22bf2f39-0f319173-abc3db10-6e10c430-51f614e5": [], + "5f2c97b1-447bf315-76c09138-d319e6a7-78012f26": [], + "96734a31-b38490e1-f61e9e78-5db8c8f5-ded5e1df": [], + "0d393050-8caaa760-f81a0bdb-da31d259-43e27146": [ + "Support Devices" + ], + "af3bf50e-1730eb8e-1f26e5d5-38881647-62a7fd02": [], + "664198f0-e4b3fbb9-c7a6f117-980a1fc1-f6fa9a2f": [ + "Support Devices" + ], + "7b232609-e63c02a4-28b79e05-fb02ed28-1facf2f2": [ + "Fracture", + "Support Devices" + ], + "0c59944b-dbd8302b-4562d004-5868ec7a-d84395ad": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9c4f1537-be70f317-6f6e0f3d-5a469592-c26e0b88": [ + "Lung Opacity", + "Lung Lesion" + ], + "0314a6ea-9f693c4d-8a4f3f7c-443c0a6f-ee9467f0": [ + "Fracture" + ], + "579f0de5-36fac16d-378b2a77-284ac0ff-35abdc14": [ + "Lung Opacity" + ], + "e49ba178-a7c83425-3d9c730c-7e693dba-8ad83e82": [ + "Fracture" + ], + "66cd9f76-7d0e7422-876c51b9-e8f215eb-96091f16": [ + "Lung Opacity", + "Lung Lesion" + ], + "6f550224-a23be693-b5f671c6-843ca075-5b25df1f": [ + "Lung Lesion", + "Fracture" + ], + "9b3419be-60a3b97f-c7a2b63b-cf861b15-82355a9a": [], + "f15ca291-081f6d47-5fe46ec7-03874ec4-a58b9780": [ + "Lung Opacity" + ], + "f635620c-c59587a0-ea69a0e8-2b68825f-8a5e281f": [ + "Lung Lesion", + "Fracture" + ], + "730db867-d434712a-03e45219-29563ae9-6e57b2f9": [ + "Lung Opacity", + "Fracture" + ], + "9c885cef-08e9c171-95f0aa12-d19c0858-982a37fa": [ + "Lung Opacity" + ], + "d7148302-06967b0d-b0842ffe-a02c5032-4b7d26d6": [ + "Fracture" + ], + "34c60d57-a91b9812-32e246f3-6efe8843-a09ffa27": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "7ece76d5-4de53231-dc9bc951-c27b8a9c-00694cc8": [ + "Atelectasis", + "Pleural Effusion" + ], + "80e656ba-2e0b73a5-6252aa35-12c0df92-f0d566b9": [ + "Atelectasis", + "Pleural Effusion" + ], + "29db2a67-c5b93d1b-9c1638a1-673fda55-77f3d8ba": [ + "No Finding" + ], + "e6cd2500-1899413e-d3de528f-a4281a95-460339bf": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "ffd81c9c-a7f1e1b9-eb6fb574-0066af97-9d20f9a9": [ + "Atelectasis", + "Support Devices" + ], + "147372cb-a8b13f70-636a3d8e-c2c3672f-e6585376": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e5f491e8-7492e07c-44f7e6b7-01e90cc8-5242f410": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "9461c88d-83a7702b-d089e66a-73f4da4a-768bc8e7": [], + "b3d58529-d16ebe23-04b8237f-13bf09fb-69c9566f": [ + "No Finding" + ], + "e9c7e41a-39669be4-ef06a00c-98608201-df448387": [], + "08f26428-11618c66-d31e30be-bb3cdba9-7246cdef": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "114fc6d8-e46d27e6-617b8079-bc857050-e0982eee": [ + "Atelectasis", + "Pleural Effusion" + ], + "07623786-8bfec10d-aa286291-61fe86d0-f9371a45": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "c17d8e88-625a9c75-18f1925a-a3ba291b-a309ebb3": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "efd6cb09-2f2d04d4-41f75c29-c95e86ac-5aba4006": [ + "Atelectasis", + "Pleural Effusion" + ], + "730ac1ff-f9317f93-3bb0bb75-18942eab-a90c43a3": [], + "9952d9b7-35a065ad-cf97e843-5decbb57-aff7212a": [ + "Lung Lesion" + ], + "b55480c5-35f5035f-99072f8f-e543d1e6-5ac76f23": [], + "bcf4add2-ac9c300f-e35c9d96-d8462fe4-9d328831": [], + "217bddf4-50e50848-b90e6afd-2a88f6ed-1a208f57": [], + "6bc6645a-9556a008-608aa00b-a4d01254-eb8499be": [ + "Support Devices" + ], + "cdbffb1b-b48fd807-aadb1f9f-0acda7ba-dd92b80a": [ + "Support Devices" + ], + "7707c2f5-2b806bbd-3f906fe9-e476a733-223553d7": [ + "Support Devices" + ], + "9e30504e-b946160e-6e57d083-2bd79527-b28f1dc4": [ + "Support Devices" + ], + "59132f9d-ca07da35-afdde408-a2d7986d-4948d0c3": [], + "b57e2fd5-e8efb1d9-46533dc5-2d856c3d-19ab41b4": [ + "Support Devices" + ], + "381625eb-17722acf-958d7213-64604dd3-ee843cb4": [ + "Lung Lesion" + ], + "55a14268-88a2935c-2da0561c-338a49af-e83b75cd": [ + "Cardiomegaly" + ], + "6c679bb2-975bc590-6e4ec72e-9e2084c2-d303eaed": [], + "5b257a97-dad6f2e3-a20a3c51-1c6250d0-7024d6d4": [ + "Lung Lesion" + ], + "d32f47ef-e58a672f-861f3eff-c37a113c-d426926f": [ + "Lung Opacity" + ], + "da1e8877-ddaa6388-3f825099-88a1ca8d-da46da3f": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "999a39cb-f40385f6-572e068e-ea67663b-8adb5431": [ + "Cardiomegaly" + ], + "e6828d47-61cbfa6e-0213c719-e6864bd1-2bd635b9": [], + "cd910d90-c7ce8292-427f0761-508b8be8-83629e20": [ + "Lung Opacity" + ], + "db3d74d0-432e6e64-779f03be-e3057859-33eab1d4": [ + "Lung Opacity", + "Pleural Other" + ], + "3454e89a-58e3895d-8af07967-2786fcd9-72c8fe21": [ + "Lung Opacity", + "Pneumonia" + ], + "ab3c4c55-cffc7fd2-8e57ccab-4932928c-3527dd56": [ + "Lung Opacity" + ], + "d9c4de0d-c46e17dd-016fd56b-18b872fb-325755c9": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "96efa075-88b5082c-8576962c-dd1e4238-b16bfefd": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other", + "Support Devices" + ], + "bb3f07a8-beb19591-79af0942-6ba135e7-d3e24bb7": [ + "Lung Opacity", + "Pleural Other" + ], + "2e226c3f-39058bce-2bf559f3-119d4b1c-3b18c1e4": [ + "Lung Opacity" + ], + "bcfdab4a-41f56a9d-969a736a-88b92d25-0b313cc1": [ + "Lung Opacity", + "Pleural Other" + ], + "7a12e8a5-770ebdb4-2304e41d-535a3f1c-7409884f": [ + "Cardiomegaly" + ], + "7fb879bd-f49e00bd-91609953-bf71e17f-5a419295": [ + "Enlarged Cardiomediastinum" + ], + "b88c89c2-6422d672-c5ec4f6a-afb43481-31f62b0d": [ + "Cardiomegaly" + ], + "ff2d4c1c-22e6a9d1-7e5d6a3b-b1245e1f-f76954a5": [ + "Lung Opacity" + ], + "cc47427c-c5e9680e-551d3143-58cb46c2-28e82262": [], + "d4d8ed91-d54929b5-a7e9fd6e-063cc534-089ceaab": [ + "No Finding" + ], + "38c6b526-4a53ddea-3c236e8b-2761544c-90f1c42b": [], + "3c9f4e63-ab782964-b76f1cfd-0ab67396-c2575a4b": [], + "7db3c46c-7de7d596-bf39fadf-cb34f915-6fcdd3c0": [ + "No Finding" + ], + "b39765e1-fc527a21-64309812-6f3eb5c1-1069310d": [], + "0a10435e-e43147f5-c4986cba-35836a58-b4b70cd6": [ + "Lung Opacity" + ], + "6b5d6ce1-8bcb7314-52203b9f-b287d557-396bee1d": [ + "Cardiomegaly" + ], + "b90f926b-309e71d5-d3572c48-dc0744ec-8b4c6a5e": [ + "Cardiomegaly" + ], + "69b9e772-540d070d-5e5e948f-cf7cbf37-020b9a69": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion" + ], + "26bc0e45-db4da615-97dbdebd-e3079c87-ae29c389": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "a1a11577-09c2a5a2-93a505de-55c0dcb7-cb35e605": [ + "Lung Opacity" + ], + "39f9904e-3ec17e33-43b75114-cfba9a4d-b85024e9": [ + "No Finding" + ], + "f42d7dbd-d192327f-ba7c9e5c-8ef226b5-87f58720": [], + "92625849-fd665a5e-0e0ad552-642e6039-6cae5e5e": [], + "984ccf69-a2dacdd1-6ec13d35-3af17fd5-5c583dfa": [ + "No Finding" + ], + "762a4f20-66c7bb78-c7ed6020-a23e9f73-e13cb70a": [ + "No Finding" + ], + "868e32a8-3328f944-3b08f70d-e8ae4554-c649d2d0": [ + "No Finding" + ], + "4d4ef5d7-73e11e7a-6f694ce7-0bb5994b-0d7396b2": [ + "Lung Opacity" + ], + "b8d4de5a-4676a6b1-01f6df7f-f0b072c6-e951dffc": [ + "Fracture" + ], + "cd93f5ed-8955a049-e8718dc7-1ed931f6-00410869": [ + "Lung Opacity" + ], + "fb523451-49383564-12e28082-ddb7ebd2-b44d13a1": [], + "6e3d5d17-01a98d21-6930c329-f9cada6a-03046aa1": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "79bd40db-bf313204-172fcd09-3f35be56-19b3b10a": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0fd8eb66-17575650-50cd8c8c-11dcb1fe-a35ee055": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "8eaf1417-a9b5b2b6-bc20c468-6a3f754e-64bd8801": [ + "Lung Opacity", + "Support Devices" + ], + "6eb47aae-b9418849-f08de5c5-25a7216a-1f11ca7e": [ + "Support Devices" + ], + "31dac8b8-5dfaf3ad-e6f8e77c-78ea6c22-9e1fbc68": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "74538a31-cb733388-656f4f32-d5c5a571-959cc764": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "42dc981d-4c3414ee-55574b45-e63422d8-81395b98": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "b9c5fa7a-09bd7ea7-3a8d70e1-294c2963-340a8244": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fa919722-4eea7a12-2806e18f-f9050528-40aa3f3b": [ + "Atelectasis", + "Support Devices" + ], + "89860a70-14de9cf1-c87805dc-7e50a158-86913513": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e2cf84dd-8e0f61bb-4068b19d-3dd7f5f6-454cab9e": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "a5ae71de-54cbb819-a5beec7b-4134871f-563b0982": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "e54e4954-7a3cabf7-4122dcc6-470a5b97-0f7d4bf7": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1530fc93-5d8daf6b-2fe3d095-226a1abf-d1ee0557": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "71ce8c54-2501a856-f9c44787-8585fef6-a6c8ccc6": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "7a799fc7-10d013f4-f1c40969-4ce6ed6f-8f528025": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d6aabaed-583edc36-625b39fd-3dc3bdeb-4e46bb0b": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "20fd8602-76e94ccd-74b97075-b4acc96c-22816e41": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "2e0908b4-279ed4d6-7a472d0b-724df717-f35e3948": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "dfe7902d-7f50fd3a-34f95cfb-3aeeea63-20d6aa4f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "55dd98d9-43e485f7-ff9024c4-93e7442a-1aaafbc3": [ + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "cc37ee77-09d0c8aa-9c6a813c-7d3bf233-057edd33": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d0c7e877-8a4b5e21-55d622dd-a6bc538a-9b8b682b": [ + "No Finding" + ], + "05a331ae-17b42621-787f72cc-ebadd560-6d2586c0": [], + "193b6fbc-20817b64-62a0329b-67b74188-7e664d39": [], + "d307bd6f-24992159-2810d7aa-2a48cfc0-7696aa07": [ + "No Finding" + ], + "01333584-2ebbca3f-3136e1be-5fd064dc-d79f6e49": [], + "c32f537b-1e531bdf-dc94439f-516792e2-c4933220": [], + "be8b213a-9615a5b7-c62d7a30-aa470915-ac96f7ac": [ + "Lung Opacity", + "Atelectasis" + ], + "ca4f0e35-a2b35596-46ff395e-f8b1d162-2d199a8f": [ + "No Finding" + ], + "9de35640-255ad38e-8307196e-74d8e70f-ad7df48a": [ + "No Finding" + ], + "bcc05fb7-84c08474-9bd355fe-058b0c86-f1ce565e": [ + "No Finding" + ], + "a55632d0-66917d00-a02a2d21-db611a0e-baeed86e": [ + "No Finding" + ], + "f845ff66-184e984c-0fa96a41-0c8bfe10-eb5f881a": [ + "No Finding" + ], + "a0f5a683-e287a03c-6fa57c7c-0e9ea9bb-a7ee872f": [ + "No Finding" + ], + "a5cf32c4-3e4a200c-106abe0a-19745a35-322de57c": [ + "No Finding" + ], + "66da37b9-cee79ad9-575d0c12-3258f935-5b252c22": [ + "Lung Opacity" + ], + "e1777460-6d35822b-a0255c2a-b847d3fe-2b7faeef": [ + "Lung Opacity", + "Pneumonia", + "Atelectasis" + ], + "38d09978-1abbe4ef-2d0291f6-b956da6f-733ce57c": [ + "Cardiomegaly" + ], + "94e2c7bb-a81ac1fe-fce3a631-5677d6b2-605bd1fe": [], + "5da11f5d-ade60ec9-39a0b019-a3db192f-4b1e0bc7": [ + "No Finding" + ], + "a1debf16-716b5f40-b15944a1-79c490ee-129dff0e": [ + "Cardiomegaly" + ], + "22d4b5a3-c6744296-d4c6b985-335ebb8a-47b33809": [ + "Cardiomegaly" + ], + "7d6fe30f-42aecf3a-84d0dded-03670447-9991474d": [ + "Cardiomegaly" + ], + "809478a0-89ff6933-f8530e59-3f6f75d2-1fc0bb55": [], + "d0c696e3-46fcf520-cffb32ef-3f3bda8d-e23dd656": [ + "Lung Lesion" + ], + "1a3390a0-64016e72-4260680e-c7cdaeea-88505616": [ + "Lung Lesion" + ], + "5908d07a-1a8c8602-444efbb2-1fdd7481-5810665b": [ + "No Finding" + ], + "0b236a77-c19c7092-6111b0bf-d6e63ea8-507e68cb": [ + "No Finding" + ], + "25e1fea3-63c087dd-adb27176-a70687be-f0954a3b": [ + "No Finding" + ], + "71c5fd1a-6b349ef4-fa30d201-f780545a-a9a5340d": [ + "Atelectasis" + ], + "53dfc274-a8ac41b8-e160c4bf-556a2631-f52cd331": [], + "5f20a219-ce5d1785-0d1ef8d8-0076ce72-f8038b5a": [ + "Atelectasis" + ], + "c6b5d82e-e8fc8b40-f3b15ba8-bdaebf05-85bbb5cf": [], + "df3e97d7-fd77aab4-5efdb12d-111b9a8c-e9569b7c": [ + "Atelectasis" + ], + "0973ab55-e2d9ddb3-e7c364fe-137b0308-177b4795": [ + "Lung Opacity" + ], + "136985d4-3b58fc18-a45d8bbf-7d56b225-fffb9e9a": [ + "Lung Opacity" + ], + "2a15e5d8-5e51a253-590045d2-0df7cd99-f06413f9": [ + "Lung Opacity" + ], + "e99fb49b-a1e84657-f75c3b6a-fdb7838a-8c2bfb2b": [ + "Lung Opacity", + "Atelectasis" + ], + "fbed2763-32e1610b-cb445bc1-49e2d2d9-404f7105": [ + "Cardiomegaly", + "Atelectasis", + "Fracture" + ], + "a56cf43f-68487112-6618a5b8-67fe4506-0adbd299": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "1e8bd436-88bbe20f-d1f35238-90fccec2-66ed9ed3": [], + "8a70f2c2-1dc50436-4b6a86ff-ad04bb95-174cc88b": [], + "7a3aaa9f-1b3cecc6-299f7821-79ea2dfd-b5ea2337": [ + "No Finding" + ], + "80d9b2ed-78a45dda-a5de2d9e-64e077c3-9c07a278": [ + "No Finding" + ], + "5a8e85f1-3465c903-60688e99-7f50f8b3-a8794171": [ + "Lung Opacity" + ], + "809c72b2-39df536d-93ec5dbf-ac5f8f71-95414ea7": [ + "No Finding" + ], + "e544d6d1-92416c58-191077f7-1849aedb-7096c34a": [ + "Pleural Other" + ], + "d9d2b934-5af3b11a-2d1bba0d-44da5876-2f409264": [ + "Lung Opacity" + ], + "88827f17-dd2ff5dd-db0d2d89-136a30d8-ca92f929": [ + "No Finding" + ], + "23eb13e1-8751185a-481941e8-47440c28-f0b048e1": [ + "No Finding" + ], + "a7ae0c27-73fe32bb-6d9fd821-4b8a0d03-0ced0365": [ + "No Finding" + ], + "2ae82330-8aa965f5-a811c7b7-73cf5c80-f2006ab9": [ + "Lung Opacity", + "Edema" + ], + "ff7c119a-c56d5ce6-ebef3ba0-b55c554f-c89b48ba": [ + "Lung Opacity" + ], + "f834a63d-bdcd3d6a-6a87cf3f-a7a890c2-5cda7d0e": [ + "No Finding" + ], + "fc1d35be-cd0afaeb-a6f4acc1-7b0b0b12-82ac6317": [ + "No Finding" + ], + "62ada9ed-7166dd46-94661d49-c4fbabd2-b47e7fb7": [ + "No Finding" + ], + "cac8c5b6-88cc4800-d00fd7b0-cff74781-604110cf": [ + "No Finding" + ], + "03d8a81f-29aee625-3260a6f6-c3081ceb-a932dc44": [], + "1c749828-5456ba72-1bfe7323-e247f3a9-bb29875c": [ + "Atelectasis", + "Pleural Effusion" + ], + "9a973abe-4bfabaca-59bc4d9f-e8f497d9-a4a3c9a9": [ + "Pleural Effusion" + ], + "0bce12a8-a3f59f85-9b4b37d9-21ea3edf-a6a6ad98": [ + "Support Devices" + ], + "db537b22-dc6a616a-9ffefaf4-ff2d4311-dd035ac7": [ + "Fracture", + "Support Devices" + ], + "f9e77f68-e4b4671a-18f9eacb-bae8e615-f4e42a2a": [ + "Support Devices" + ], + "6f2033c5-f3718a4d-092239d8-8a857cfc-651961b6": [ + "No Finding" + ], + "ab2aaf36-39384bfa-427a821e-2f840195-c542824b": [ + "Fracture" + ], + "3d33b887-23962456-fcb947ed-6d59a3b7-42ea34a3": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "8b292385-a084a6ef-4fbb970f-f117f041-c4e194d0": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b3d11bdb-6b83fbba-54acc2bf-f79a7804-2fc0aa8a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "361c4750-2c4908c8-6102209f-69a347d0-887ee04b": [ + "Cardiomegaly" + ], + "aee9dc7d-9e6d2430-2f04c053-254149b6-e4925a31": [ + "Cardiomegaly", + "Fracture" + ], + "2c27614d-df5d18b9-d93249b6-10178a5f-05a69b81": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "49e22f6a-47611804-900ef8eb-08909fff-59836d66": [ + "No Finding" + ], + "4ec320f1-f6ed092b-c749d300-8124dd63-d98d10c4": [], + "abd48eb7-fe935d4c-897f0abd-f865a839-42bedbc3": [ + "No Finding" + ], + "e7267408-50278738-19fb9b1a-0e194253-046fa395": [ + "Atelectasis" + ], + "10848775-a37a1df3-15920443-b4c024fb-f364928e": [ + "Fracture" + ], + "4b6ce9a4-dac125b5-896d3f40-992de147-21d01a2b": [], + "2602a49c-e35b125f-82408969-f68eb85c-9735bc8b": [], + "ee48c72c-d6d0aae4-5c6a3951-8146574b-9683d5c4": [ + "Lung Opacity", + "Atelectasis" + ], + "35f30547-a26ab9ec-f5962b41-1e1d9b3a-2a9b5f50": [ + "Support Devices" + ], + "bbe7847a-18f0d974-62009a61-82ad2ee0-91ca809e": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "6df752dd-d96e8fa1-d902d33c-4797e505-97594e40": [ + "Support Devices" + ], + "86ab6668-1230eeac-ba4ca749-b4cf6c76-9bbae0dd": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "34ea4862-69b56c27-eea2acfb-63230bb2-63c5d575": [ + "No Finding" + ], + "cfc5f6b6-2c7ddc4f-f34bdcc8-2880d8b7-54333272": [ + "No Finding" + ], + "b0b8e02d-88bd77bb-b09b3efa-158cbedf-6f1e0f2f": [ + "No Finding" + ], + "f12aeb4b-97ac02a5-ca00f34c-0eba166e-714a951e": [ + "No Finding" + ], + "35c2f8b5-d2b7c4d7-40723bd1-b8b319b1-81c109bd": [ + "No Finding" + ], + "f9b94529-baeec146-110c6f2c-ac0f07c8-2bf2a00b": [ + "No Finding" + ], + "0296c965-747a37f9-3ac114b7-bbbc8820-43ca361b": [ + "Atelectasis" + ], + "a36da46a-b0b626ad-30087869-bf846180-f0bddb0f": [], + "1e200bbf-a4a3f4ef-5f5971f8-e0280c38-c5d317ef": [ + "Lung Opacity", + "Lung Lesion" + ], + "5596f59d-ff9d9ff9-99941d22-9322ec85-3ab29388": [ + "Lung Opacity", + "Atelectasis" + ], + "d44811b4-e337ad4c-3db89276-a24ae31a-5364e1fb": [ + "Lung Opacity" + ], + "b3d3f351-2f2c324c-963ca19b-fb5f5df2-0d7e9a31": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "edf7abab-3673a821-5062a41e-9d930ff2-07772f4f": [ + "Lung Opacity", + "Lung Lesion", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "d1311bd6-e306d59e-a79f3f57-df18a30e-bf78423b": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "c0b0c295-64487928-71fd50de-3c50dbdd-08360437": [ + "Atelectasis" + ], + "7fdf802e-9067de1e-6698cf2a-402439f4-e909e8f3": [ + "Support Devices" + ], + "341c96bc-87783d40-8abc20ab-fa3645e4-b5f56f36": [], + "ab122ca9-c693ab2c-cd9f74ef-04ecb782-231fdfe6": [], + "d099acf0-536d3ccf-55bae878-94ed75d5-e0df8d76": [], + "d3a1d9e4-94eb4b4c-537cbd71-da0ad8c6-d974a241": [ + "Support Devices" + ], + "225bb728-6155e5c7-1d5756c7-629c2d3f-308f2408": [ + "Atelectasis" + ], + "97c9620b-d57b73e6-50f4d0bb-e014ebb1-2d10729b": [ + "Atelectasis" + ], + "0f7b8c3b-7c10a4d0-859cab1a-c8fb4b4d-86f8b7b5": [], + "93ae0d43-dfe717a3-a03e8350-04ddffc9-106280f3": [ + "Lung Opacity" + ], + "ccae2064-e531c70c-adac2f88-9bb93c07-f67c5607": [], + "0c62a8e0-fa47177a-d5a6df96-e1bb986f-bafebb7c": [ + "No Finding" + ], + "69de2378-c6459058-c5e4a744-30e9cf68-1a0a8390": [ + "No Finding" + ], + "b16c6c8b-37296ed9-9ea6fb0b-c9f5c94a-2026dfc3": [], + "c96c675f-acb71a31-a7bdf067-4c742d16-6093e033": [ + "Lung Opacity" + ], + "451a20c9-4cebf6f8-2b833fda-30b69220-dca29a9d": [ + "No Finding" + ], + "707adba4-b7367857-642b3047-ed140bd8-5a905de2": [ + "No Finding" + ], + "5c1673ac-8ada2590-ddf3d88a-82c6d4fb-7faeebfb": [], + "8abf5ff4-0a62823f-8bd0c4f8-3bdf0dd9-69c2e270": [ + "Atelectasis" + ], + "07c709ae-9325464f-1dce6632-5d710b99-c9abd81e": [], + "f9631c4d-13fad799-9c72bca5-c380fc8b-59d730ed": [ + "No Finding" + ], + "0fbe8114-ff995f07-3913f67d-f95ff2a3-bee737dd": [ + "Lung Opacity", + "Pleural Effusion" + ], + "10183281-0e48a980-d8b20af2-8fb2878b-86f14605": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "32c44a1c-39b766e0-d251172d-1a3b66df-bd42daa8": [], + "61e6ad42-674b9c48-684abad1-83ce16d3-0188f603": [ + "No Finding" + ], + "4c558e55-5b795db7-3088bb34-cf6d4bc2-1407cae0": [ + "No Finding" + ], + "5f8b833a-b5c56bb4-c61a72ba-61c0a0ce-9fa8c10a": [], + "7bf046f9-18898711-4375498f-1c2a8724-dda1c2ff": [ + "No Finding" + ], + "4a88af4c-72fac00c-58343875-b13bd191-0cc77d0f": [ + "No Finding" + ], + "e5cf035a-e203a9f5-8d1942e2-e8b87b94-68462325": [ + "No Finding" + ], + "72550433-6fe53947-edefc714-62955b1d-5210cb16": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "7e8d9d50-584d2cd7-560f5d23-e406dc42-686f01fc": [ + "Lung Opacity", + "Support Devices" + ], + "b5379d3a-84715e82-c0b8a323-4bae9a9b-15125251": [ + "Support Devices" + ], + "c1baddfe-c5fb89e0-f89fcd8e-46d628ca-81ab567f": [ + "Support Devices" + ], + "0159eb74-f5b69f73-6e0faa67-ccf3e55c-474da4bb": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5c2bc160-a56ea402-02315775-00bb383c-8df68576": [ + "No Finding" + ], + "e7e11d70-ad1261ad-0cd35368-cb80144c-969cfe02": [ + "No Finding" + ], + "feeb7dc4-beddb481-54e49f5e-f8d3d074-dde2412d": [ + "No Finding", + "Support Devices" + ], + "2c6b9c0b-a92050fa-fcb78bd5-95f371a4-255b176c": [ + "No Finding" + ], + "fbf52ad0-afdf43c6-22dda043-b6697c68-ebd4f27f": [ + "No Finding" + ], + "365ca073-00e2cc8b-ede31946-142d70e7-e03c0bd9": [], + "79632435-0693e0d0-9f3a1293-1663b451-127421df": [], + "e02060fc-a54b4daf-d2ed5614-42e2016d-53ea5bed": [ + "Lung Opacity" + ], + "e6b4ccd3-0795f625-2acad01a-72101d69-4ade2ad7": [], + "f10984d9-b7e843e6-ebb071e2-68fe6b30-930a5e31": [ + "Pneumothorax", + "Support Devices" + ], + "3a839f77-7d3beba4-cd7263f9-55cea333-3d6908b7": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "da9bcd9f-310e0f89-ef56f5ed-330d4f9e-c7c83601": [ + "Atelectasis", + "Support Devices" + ], + "57dd280e-66b834fd-411e60fb-2264a0f9-7a3c7b24": [], + "f353557c-c5c77676-0355d9f8-f6ec8a6a-15084cd3": [ + "No Finding" + ], + "50ea0803-d3a44a0f-3a2b4d09-b548d47b-a0e81c90": [ + "No Finding" + ], + "588def2d-500ceb2b-4f6ba7d2-538d584d-1b6e3093": [ + "No Finding" + ], + "272ca8f3-c19b4186-d9b66363-3b20f14f-a6cec2b6": [ + "Lung Opacity", + "Lung Lesion" + ], + "bb47b3eb-ca29a1f0-571cfe7f-a5f99cf4-7e570c71": [ + "Lung Opacity", + "Lung Lesion" + ], + "3553886b-8c74758f-a6e1e4d8-badecf8a-1da3ad9b": [ + "No Finding" + ], + "8e719f66-0c603da9-c93cc5c7-41574b5d-7e6cf099": [], + "8e7e354e-77af2af7-3cf0db1f-e0d3671a-fc75ea03": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion" + ], + "a45898be-7a277064-b3338345-c2044677-1b9cffa4": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "4d00dd83-4db65b59-cb9eb0c2-5b70a148-82334ea6": [ + "Atelectasis" + ], + "7e009c56-a431fd3d-61f9ac9c-c67bebaa-04316f10": [ + "No Finding" + ], + "95f0da87-3b457cea-f92cc7c9-1cbeefcb-2b599786": [], + "97bfaad2-fb4b2ffe-ad057631-11574fbb-c19ec356": [], + "d00fb5d5-88c9a0f0-4d9224af-01793823-97ad452a": [], + "d7117501-555c94b2-e493d25e-ac1f3433-09e7204e": [], + "2aea6da8-c43d911f-f1ffde22-323a0ea8-ae72787f": [ + "No Finding" + ], + "b0e5bce9-f997f76a-229b93fa-ef4fc028-bdcaba10": [], + "93caa05e-f8a3f919-ee78818f-04d801af-3c445791": [ + "Cardiomegaly", + "Support Devices" + ], + "a6fb266b-ccca366f-9385bd8b-45c8e10e-bff19574": [], + "47f219cd-ee0df4e1-99b8c50c-fb71ca0a-bebff3ec": [], + "cf47d683-e828be31-85e2c295-1ee43e48-9663dfba": [ + "Cardiomegaly" + ], + "dfd9a06c-2994892e-f4a6bc1c-f6ec4803-283e5005": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "3e286a0f-e9daa593-c7a41a0e-9e3594d6-d8f7394f": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "56dc99f0-d1acfa2e-471d1c57-97a8acd0-0d3ca1f7": [ + "No Finding" + ], + "68eb5585-b507f6a7-22aec032-5da34d2f-86b95ee6": [ + "No Finding" + ], + "2e44f83c-54689c28-6a55b93e-8d0b1498-dbbd97b9": [], + "35658ef4-5934c0f8-01618c93-7ccfd737-dc81f89a": [ + "Cardiomegaly" + ], + "378e771d-beb3849e-e10d8369-ebbbdc98-48ae076e": [ + "No Finding" + ], + "9edfbe81-f4663dcd-3a8cef29-c4ae3ebf-34eaf330": [ + "No Finding" + ], + "b2d5d5d0-0f2ce3c9-7c098cea-a08ae5c5-c4c9c1c1": [ + "No Finding" + ], + "ffba75f5-67f885c5-448f97ff-7eee3a54-454b3310": [ + "No Finding" + ], + "1e05ca1d-9916266c-c58cb1a6-0acf8d1c-bf213534": [], + "f2a8d6d9-5425eaf4-1261d395-319e1538-edf854d9": [], + "16590c25-c0e530cb-6447694b-ed2dcc9d-04bc1b33": [ + "Cardiomegaly", + "Edema" + ], + "2be53082-f806f1da-98837406-6ee69de5-63b79cad": [ + "Atelectasis" + ], + "a7410e8e-caf81e04-e39bb33b-40b28719-9689b592": [ + "Atelectasis" + ], + "3cbdb4bd-f8ea5752-da55affe-f3e77959-40803c29": [ + "No Finding" + ], + "55e52c5f-c236740e-08081433-c4f293de-c83b178e": [ + "No Finding" + ], + "1be43e00-4990eafa-bc749a86-97e6962e-e2fbaad6": [ + "No Finding" + ], + "7524e142-0147cd8b-c4f41ff3-0d8d5792-49a48a77": [ + "No Finding" + ], + "2b53c5b4-6a087c8d-3e66def7-7fd6604a-77eb0287": [ + "No Finding" + ], + "475a6219-7057587b-12a770b0-665a9510-cbf49fdf": [ + "No Finding" + ], + "1a7db0e0-3c536032-768780b1-c802d8c1-5f8e51d0": [ + "No Finding" + ], + "3c0a4d68-b8908b62-f58d67d3-41ef7412-48a81c42": [], + "7dbb4b71-725cf08f-15105e66-93510dff-fa62ea4f": [ + "No Finding" + ], + "0517bdf0-af54f3aa-559609d8-b886767d-0c994e31": [ + "No Finding" + ], + "11d552f5-4943c301-a27f94ec-9e425669-487ef789": [ + "No Finding" + ], + "9fdcee0b-ef15f145-db2edbc3-861be20f-d5e27c80": [ + "No Finding" + ], + "2d2ff304-3025174d-ae262933-da20379a-0b089143": [ + "No Finding" + ], + "e6c88a15-a5b7b338-c97e55d1-8325a80f-0c40bb9c": [ + "No Finding" + ], + "57a2a4bb-f9cbac16-93c8460c-76e2ee36-3b62b5fd": [ + "Lung Opacity" + ], + "a3de483f-15711cf1-0123d198-14a34d08-69b4eca8": [], + "29af772b-fbabdff5-554a46f0-db9dc9a0-df705b16": [], + "405c64d9-2764c738-5d6c101d-4670fc09-119dbe6e": [], + "6f1d8e56-81ec34dd-4f80edfc-98c577db-9db1f26e": [ + "Atelectasis" + ], + "d17fd0d1-e11075c5-ac1d9055-dbea28a9-b09480ec": [ + "Cardiomegaly", + "Atelectasis" + ], + "e0f060fd-48f99877-e59be55f-f3ff2bba-0228b638": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Atelectasis" + ], + "1e308b9d-7b5ab795-6b0bcdb4-47f0778c-10bf984a": [ + "Cardiomegaly" + ], + "bf1b59cc-4f1aa853-6d18a4ee-64fdcf8d-fea466de": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "f56565b1-4dff7a18-f696ea91-96947d34-0faf11b6": [ + "Cardiomegaly", + "Atelectasis" + ], + "fa879b10-e59b6500-0f17b51e-22c2d961-29242fa0": [ + "Lung Opacity" + ], + "5bf38a0d-d30e0de1-37c34461-92633fb0-d208538e": [ + "Atelectasis", + "Pleural Effusion" + ], + "b4e881ec-b2dbe4eb-824d9649-07862804-17af7264": [ + "Pleural Effusion" + ], + "845dbe09-60b23e8a-ea4f7a81-4c73113d-656e1cc6": [ + "Cardiomegaly", + "Support Devices" + ], + "ce90119b-f1d03bb8-42218616-235c6432-9277af77": [ + "Support Devices" + ], + "834becd5-de7cc7de-4f498574-c769c7a2-c31ee980": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "b478446e-3a6b9edb-b60dfd6a-d173894d-cc7f116d": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "bdf52938-8cefb7d7-cfd86285-f8f1537b-7224f6fe": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "67cee155-ea0e64cf-a4ca82ce-781deea9-b7bb25ad": [ + "Atelectasis" + ], + "93d7f4a0-4ecb302c-972b3d65-e37fe54d-0c1e5f27": [ + "Cardiomegaly" + ], + "c19b1845-8b30cfe3-2ddb71ae-c687d110-276dccce": [], + "c5a0eb3d-8ed144a5-5a58bf8f-4bb89eaf-e4557889": [ + "Atelectasis" + ], + "2b9a39ff-6c9adb54-fb4749e8-0b7c6b3a-efb44324": [], + "97665b53-8da96eef-00829a6c-105f445c-be77a88d": [], + "39a771b2-b6891189-b68590ad-5d5cb5e6-7dc07990": [], + "89db0697-aa26530a-d451eb99-319b8e78-39a6aeb0": [], + "63cbc1ba-9c1c2426-1afe0a5d-efc95e28-826f383a": [], + "ca6270f2-04c17d88-cd4d219a-ba2ce815-f95b4e51": [], + "1e1bc298-16d08126-3fb08a26-ede408f7-e024e193": [ + "Lung Opacity" + ], + "2694726b-b64f21d1-40b204a6-b4106d63-e6e4af86": [ + "No Finding" + ], + "5ad2e9f0-2e4ae7f2-0d6cbcb3-ae978122-0abd2385": [], + "05117c5b-38b2c0de-a50c051e-f0303117-192f843c": [], + "0825ee1f-87c4a68b-20dbe092-f3f397a5-67e49d7e": [ + "No Finding" + ], + "c31e4875-3a3a1bad-e483f76f-14252862-55b2ec2e": [ + "No Finding" + ], + "cff48e01-d2db0222-9bbd6a26-6d30a9ba-b91e3ffa": [ + "No Finding" + ], + "5e51bc45-dc8103d5-a9d121eb-6921584e-03711aad": [ + "No Finding" + ], + "b2dcef8d-c2328b84-d47a7ecc-042df2f7-4aab73c7": [ + "No Finding" + ], + "ff26a962-eb3cdaa1-33cfafab-dc03615a-057c2271": [ + "No Finding" + ], + "50a472b5-45d0d214-091175cf-318c75f7-54e5007e": [ + "No Finding" + ], + "91b36d79-326b86ae-773d6a6f-2d9a9401-bfe405dc": [ + "Fracture" + ], + "80affc57-c634ad36-7566ba24-ac44787d-46dfc160": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "8ac669b7-9257e87a-4a9a70ee-6cbc9515-eacfcabb": [ + "Atelectasis" + ], + "4b900027-eae3a3b7-e4d8b930-1b7322f7-2efeef42": [ + "No Finding" + ], + "9e4af146-8c53d6c5-1cd2d8ed-67351f6f-d34a1ffe": [ + "No Finding" + ], + "127bf93a-197127b6-f778134c-daa7bac1-f104f57e": [ + "No Finding" + ], + "85486c2d-0d140a05-993029bf-23923f68-061805ea": [ + "No Finding" + ], + "08dad1a1-e0d9aa0c-43bcb6c8-8038d5ce-3430cd47": [], + "2bf97d91-aeecb635-55ed5060-aea787be-5271de06": [ + "No Finding", + "Lung Opacity" + ], + "cbdfc009-8a46e75c-5ef74a6c-63e9ee1d-fe7b9093": [ + "Support Devices" + ], + "8219e4f1-2f72e956-229a4257-3824daa6-56b96e5d": [ + "No Finding" + ], + "ccbd2311-fc323e32-01acc861-6baf59d1-7fac2f5b": [ + "No Finding" + ], + "d443c0ff-6ddd24d0-5048114b-99dea88b-27e0989f": [ + "No Finding" + ], + "e8ed41ce-17515a53-f87a1b13-1d6f9a5d-b671911a": [ + "Atelectasis" + ], + "48a3dd16-508ca270-0ecb3a7d-02364e43-519dbf97": [], + "594e57f9-194d110f-0b8fea6d-aa7e6958-a09d432a": [], + "84a4773c-796af02b-98561cf7-d61b3178-ff7f4939": [], + "952a19af-b73f31e5-ea3c88bc-315847ec-97e78512": [ + "Atelectasis" + ], + "31974755-9e36b005-a5864f33-563d64d2-76bcd471": [], + "cfce55c4-645f48d5-67d2eb78-e6c3fe6e-9489f536": [], + "d8b7273b-a7fcc609-c3282bbb-34e43194-ff77283e": [], + "fdd10576-222e8177-96e5f4ff-ecd5413a-66d01a79": [ + "No Finding" + ], + "23268708-bb681a69-9d7f6685-bf0877d4-0ea495b0": [], + "ed6fc46d-125a2981-0a4df024-4a7e34f9-d87b7c6a": [ + "Lung Opacity" + ], + "53f0718a-32e130b0-ad4681fb-ee35f9b6-f73d5251": [], + "fd5d3380-81137eb8-0fe6ff8f-e542ac2b-fbe62701": [ + "No Finding" + ], + "5e754211-f7ae671d-f26bc9e0-5fabd237-73978d1c": [], + "04d4bb7c-3e524bc2-dddbd274-58c7a633-e72d0a37": [ + "Cardiomegaly" + ], + "cdbb816d-5149649c-ae5f5de6-9c97c843-aeb02508": [ + "Cardiomegaly" + ], + "6251d8df-ca3dc2ab-d1bc3776-7ebce2ce-7992de95": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e78e7e56-3b76bfbe-c0647f3a-c8b5a476-fc847dad": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "23400c85-a9248b01-0b55c196-55c9fcec-3420c556": [], + "ffe23760-121f380d-c2ffbfd0-765ade56-1f4d55ce": [ + "Lung Opacity", + "Lung Lesion" + ], + "09a6d0fc-9eb1d482-0bbe98b0-d77733a3-e2633b7d": [ + "Fracture" + ], + "ee71a48c-d7613a73-e790a03a-f30f2402-759d7654": [], + "8fb3872f-171fa379-f8c161ed-9c191c05-b0d93589": [ + "Atelectasis" + ], + "c0c9f788-0cfe1c90-7453c818-eb4f5ba3-9bffdae8": [ + "Lung Opacity", + "Pneumonia" + ], + "2a76f69a-7be37463-26a4305d-43c7b2aa-969572ad": [], + "593ece09-48ef4c41-fea2a357-67004038-0e886e64": [ + "Atelectasis" + ], + "08705aac-020b2766-2515394a-84a9a685-4fab305b": [], + "2334929e-1e2a581e-82ff2163-5a51b1f9-316bc604": [ + "Atelectasis" + ], + "123fc641-feb28310-ea95c2e3-ba1f1635-bc669e55": [ + "Lung Opacity" + ], + "eea74349-5461aadf-23d886d2-2d1cc279-a753eb82": [], + "06b6a3e0-208c063d-2c0b4f80-9348ff49-d46e8591": [], + "22af58d7-30892703-e9699647-89e52ade-df1be193": [ + "Atelectasis" + ], + "643dcfc3-df3d87ec-c5b390e2-4483ada9-b37c922f": [], + "787e7af6-b1d3f2a1-81b39649-9ac3a846-1380d48f": [ + "No Finding" + ], + "af93629c-67d952a4-9dec1e9b-2a85b2bf-350fe109": [ + "No Finding" + ], + "39623822-10ce4ab6-684d8f03-25ca8526-4136f1fb": [ + "Lung Opacity", + "Support Devices" + ], + "7fb96c7d-d8af1662-ce79f836-f9b8bef5-cacea9ba": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "06a14fd9-8f89607b-b20836e4-7b3477f4-8434d888": [ + "Lung Opacity", + "Support Devices" + ], + "116fcb38-1309dd16-16643cd1-262b2801-bcc0a0bf": [ + "Pleural Effusion", + "Support Devices" + ], + "61fee867-8392b680-a5aba632-e3f3b946-900eddd5": [ + "Lung Opacity" + ], + "59c6d360-9e96b2ab-750786c3-b6bfac43-ba99775a": [], + "2475d419-36bd3605-ce47decf-c2d3ebce-4f860c29": [], + "4d2afd84-14eebd01-d0d9aab5-248a2e02-250a8f87": [], + "e680a6a3-8d3a8020-1efd254a-c43f36f9-2d1de5da": [ + "No Finding" + ], + "2da4bc59-601fa386-1d07436a-cbde67df-54495e0d": [ + "Lung Opacity", + "Lung Lesion" + ], + "3c38c379-9e5cc827-771ffeb4-b5d722d4-127b3224": [ + "Lung Opacity", + "Lung Lesion" + ], + "8d8a83b1-f5d26f88-bf5fc2bc-b3dd668b-33861d97": [ + "Lung Opacity", + "Lung Lesion" + ], + "041edb3b-ccbe6942-fc19c0f4-cbed6880-a76a50e5": [ + "Fracture" + ], + "1112d683-19c810c8-39aead7a-ebf7cff2-5b946e2f": [ + "Lung Opacity", + "Lung Lesion" + ], + "bca22183-8c2b4234-3bb8fbcf-d0f4efb0-678b48ae": [ + "Lung Opacity", + "Lung Lesion", + "Fracture" + ], + "a9e93c6f-04f9e839-999c9508-6890b550-8f0ee880": [ + "Lung Opacity", + "Lung Lesion" + ], + "d11dac47-eb411965-10a6bda4-51bf83b2-47e0aa38": [ + "Lung Opacity", + "Lung Lesion" + ], + "00768144-dfeb6fc1-56e7b784-7441d569-b86bc4fa": [ + "Lung Opacity" + ], + "858530aa-6e3aea34-0f6130c3-fe8639af-225e59a5": [], + "c066c96c-0ea2a9d9-9583c8f7-e770d3f7-2c120854": [], + "5d8300fe-3a3aaed5-ec3f9f49-769dcb99-a7ffa174": [ + "Atelectasis", + "Pleural Effusion" + ], + "c46e168d-041b2bfd-39d02b61-186fb589-eb881241": [], + "16693bfb-94c40990-155fb2e7-6dc3f4b0-38ac11cb": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "77d12f34-7559e3b5-ca659cda-05d2e515-b0726d99": [ + "Lung Opacity", + "Pleural Effusion" + ], + "0adba4e9-74bf6877-3500bd46-d395ecc6-75dcdc60": [], + "c710e145-280390c3-5b9ddcf7-faa611b8-b39e60c8": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion" + ], + "6046f679-3f7b627a-75ed0041-e83000f4-d459e30b": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "d28b38cf-926d0e19-852a101e-ee126190-42253668": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Pleural Effusion", + "Support Devices" + ], + "e49ba6bf-1f832e25-aa017a68-95dcb8b5-c2882106": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "f6088e83-babff51c-fe95c613-7b94b470-3aea3440": [ + "Lung Opacity", + "Pleural Effusion" + ], + "ba26edda-e207b86b-665afaa9-47ddab28-78dd3c6e": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "e73cd1d5-5e0bf9d7-abf87afe-b9825e7f-6786a135": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "9234b389-6451e413-d153fc6d-87004f87-bbfa50c1": [ + "Lung Opacity" + ], + "03d334ab-a0fdbf1a-a53d02d5-426a2ec2-80fa45d0": [ + "No Finding" + ], + "b7067dad-3c9c3cc2-595cc8fc-fc6e7efa-6f3eaece": [ + "No Finding" + ], + "cb334e09-b35ab571-8ea7a01d-31039cbc-1cab2b95": [], + "aca778c7-742b1bea-43d96050-8651ff86-174b274e": [ + "No Finding" + ], + "ed1afd44-efe36fcd-7aebec52-00292c6e-dcf06602": [ + "Pleural Other" + ], + "537c9b52-d4ee88f2-32098ca0-1f7b0cd9-b55ea22d": [ + "Lung Lesion" + ], + "fc1a0832-12355186-70c76318-a3913c89-13ceca14": [ + "No Finding" + ], + "c7eff650-472cc7f6-3dd8065f-fa42bfc7-21fcd438": [ + "No Finding" + ], + "cce80cba-0d97181b-74bf5a47-6cb9ab65-c7c06b89": [], + "ddb6d871-83f1673f-96525527-40edfaa8-32689e38": [ + "Support Devices" + ], + "328c4898-15a54df3-c97f1134-fd048ae3-d95c0107": [], + "add46527-df788627-5e7db26e-09b0fd71-16a29aa1": [ + "Lung Lesion" + ], + "30ee840e-4c41e9b0-23303f79-e117a2f5-3a93632d": [ + "Support Devices" + ], + "0b542921-dd8714bb-fe11de66-1509d729-207dc1f6": [ + "Support Devices" + ], + "89c1cb10-0f3f0d50-cdd7903e-91acfc37-51d468d3": [ + "Lung Lesion" + ], + "189951de-c5c0b41a-d14bcfd4-1e257166-1f89b5d0": [ + "No Finding" + ], + "f7a0c24f-477f3d1d-14dd5cde-6a3195b2-e0728197": [ + "No Finding" + ], + "61d53449-02330de6-e967c099-549e42a6-3346afad": [ + "No Finding" + ], + "d275e1c7-ddf3bda8-85dc221d-4c9b4fc3-17f8a621": [ + "No Finding" + ], + "75590e00-ed59b5d5-547eea97-30378a27-3389c2d4": [ + "Atelectasis", + "Support Devices" + ], + "5514784e-680e830d-5dd03b8a-fff3c159-26e51f27": [ + "Enlarged Cardiomediastinum", + "Atelectasis", + "Support Devices" + ], + "386d944b-f1474a69-668285cb-f25d2ef9-56c1ebea": [ + "Atelectasis", + "Support Devices" + ], + "4cceece9-8400f980-a48fb232-e92e5441-6745b601": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Support Devices" + ], + "41cd0cf2-1993dfdd-7f6bf2e5-a1f49826-59bd4a84": [ + "Enlarged Cardiomediastinum", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6acb1d9f-c6550f88-03c6298f-563395d2-fbb64a14": [ + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2daf4706-acb0e111-7c1f165a-1b733130-32f98a94": [ + "Enlarged Cardiomediastinum", + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Support Devices" + ], + "f73e6a43-f6ec9972-190a4db6-83b00895-bd737150": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "dd7f98a8-f0bd8f93-d89e5076-48b04556-0792d3c6": [ + "Atelectasis", + "Support Devices" + ], + "1d8209cf-367611d8-dedd4a43-a8026be1-e639022d": [ + "Enlarged Cardiomediastinum", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f9036335-d38187db-397f1b39-3e749eed-e4c6307c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6e7ae597-2cce5608-801fc546-b49044de-8b5fb4c7": [ + "Support Devices" + ], + "2174bfb6-9645eac0-eb4a2c83-0e62dc14-94b436ab": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "f67ab78a-c83676b8-efebc7a0-7b79e9df-d200dca1": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5063d302-87f10189-f63cd435-f9628cbb-ea776d10": [ + "Cardiomegaly" + ], + "df8d7e2f-54c17397-730c6a12-e6f95950-a64b3f5d": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "54096c14-0109abb4-f9341bfb-ee3fe012-50d75838": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a8cb181d-36d8820a-91ffab5c-09e53515-1aaf369c": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "0184704e-f5d6feff-cbe7f37e-d6c77a0f-db1e7472": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "41811dc3-c03a8c6d-a316dd7f-5733949b-00331055": [ + "Atelectasis", + "Pleural Effusion" + ], + "5cd9a16f-bb23b3f4-472f8d63-0cb675ed-dce9d747": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "69a50a5b-ad0ca148-ae58ef27-a1d7b4be-cbde70fe": [], + "f58ceea9-b65ddd7a-210c3c5d-64f6f523-e898d9d7": [ + "Cardiomegaly" + ], + "3f54680b-15217393-27fff50f-aeb78433-c51498b7": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "5817a4b8-c4f832fb-7a33cc26-b05e9ff5-80a03cbc": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "69bc2b07-10cc7789-3cc5f3af-4c3c6ba3-992abb1d": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "18d4660e-6dd2d7c3-fe755086-42caa066-4c278a62": [ + "Cardiomegaly", + "Support Devices" + ], + "b280f564-593c9a51-09521aea-53d9b9fd-0bd0ab38": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "00e2018e-dac15125-72be8d6c-b6f1f0e6-feecb404": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "afedd930-9d244c0b-0a2edbe6-2ceb376a-23bc266b": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "196485f6-66508452-3f992f30-5e0c4182-53d9d2d0": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "442695c7-33bbfd97-387bc062-28a11538-d366fc24": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "6ba26b3a-5314e906-7366a48a-0598d3bd-73c3ca0f": [ + "Cardiomegaly", + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "d3649518-b1379ecd-2740eee0-1ed2da79-392e0086": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "5f752c85-93a983b0-ac44e646-e4f71e52-f7d6b934": [ + "Cardiomegaly", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "50f387b8-7d09f146-8c5f7b53-5595f2e7-ef1ff2a9": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "c8a6f765-ffcff546-a4d433d1-fe00ebbf-978fb111": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c46a9297-9c4fae50-d9821fee-6a6d4d13-2111948e": [ + "No Finding" + ], + "dd5c0bf7-9ba91c35-38f3e4bc-f5a63497-a975f89f": [], + "fab89071-f6543b70-eaff3eb7-558c223b-f40a6d6f": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "5b038a10-d2936918-06b01d36-d6b919fc-be5e03b4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "ccb976bd-fe7110eb-f5b9e68c-74886c88-c2d95f6c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "022246f4-d8182172-f1188b43-fae2d2ca-0083fdb9": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "1831d2b8-848d337c-e4d5a448-5a036213-fbc79403": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "2b6058ea-1a457571-ebed852c-b6879996-ac8b1622": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "71138932-dc73f0d5-fa8be28c-a2925dc4-648b9e72": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "c03267f8-f0900e7f-f768fa2d-8ba19ccf-5d5cbc99": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "66e97c1d-0fa3fcaf-2a0046b8-80ee76c8-99993f04": [ + "Support Devices" + ], + "fd4d1714-ea5c562c-917ab796-b83f8aa8-6b82f80e": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "6127f936-4c93476d-3d0cb4aa-85926f79-3d24a610": [ + "Support Devices" + ], + "d143c4e0-d50a23bf-396d59b8-12310813-0965c112": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "bd694b87-8f969c41-a3b1bd9a-b27547e1-acefab41": [ + "Support Devices" + ], + "dedbcf5c-540d2883-d85fbcfd-dfec626d-9621d11b": [], + "377df2cf-286c0596-c5183178-7edd53f5-50475885": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "36b80f83-181f47f3-7f54839c-4f80a1f3-60de306a": [ + "Cardiomegaly", + "Fracture", + "Support Devices" + ], + "c90cae1c-784836db-33abc09e-f4490bd5-bd1f64fd": [ + "Cardiomegaly" + ], + "0b9a1d90-0d4e09e2-e651a638-81738947-249b3e35": [ + "Cardiomegaly", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "a6c52f01-34a7d3e3-2a99de86-82d9a4b5-e07086f7": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "e345b77a-fc55fbb9-01aa8bc4-55067082-884ea7ba": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "25142c57-f3723dbf-b7bd3225-66ec6472-ddc1c56c": [ + "Lung Lesion", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "17c3e7ba-8733dd0f-504a89f9-be30113e-57719df4": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Pleural Other" + ], + "0c7700b8-19401338-187bcaf9-bf35ab7d-5ffed660": [ + "Lung Lesion", + "Pleural Effusion" + ], + "2f2f1da0-4c2671bd-4b0324fd-ac4b0e0e-de4884ec": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "574a4800-1bd863fc-41b229b6-7e737994-5232ce8a": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "09524e08-b43253ba-752c8e69-fc1908b0-54cbd712": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "4969ed80-b6f01bb1-09bc5a19-c44bb4c5-70597525": [ + "Cardiomegaly" + ], + "41adeb33-4676a27f-e0c2991f-34148ef9-f7e53c97": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "81549ff4-37400bfe-77ebb7f7-9bf5005b-2a9a6381": [ + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "4aec4b05-d210e192-896bee34-0cbe5e5a-634a75d2": [ + "Lung Lesion", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "3568ad06-c4d7640e-57033b28-70d178fd-c2dd3c78": [ + "Cardiomegaly", + "Lung Opacity", + "Lung Lesion", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "ed31f48a-f429773b-c9704fad-15c7dc2f-1ad59b8f": [ + "Lung Lesion", + "Pneumothorax", + "Pleural Effusion", + "Pleural Other", + "Support Devices" + ], + "12592f0d-a371e425-2f68a639-fe69e7f1-e085f4c4": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "7692121e-81594620-38286eb8-1059dec5-06a3d2b9": [], + "d64662cd-8c2f0d44-6c22f2a5-0ea0b918-cbc0c3f3": [ + "Lung Opacity" + ], + "052836b8-b02d3f46-3faf7e36-07ce1ba1-1052a8a6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "4bff02b3-33fb0ab8-388c4cb5-8790815e-f7ef8937": [ + "Lung Opacity" + ], + "b399bd52-4c8c5e61-6bb23031-5843f7ed-c1134475": [ + "Lung Opacity", + "Pleural Effusion" + ], + "84f30297-39be3e30-021f9ceb-c14a866a-ff7053d3": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "95f4c351-08ade2e1-786e44a0-8d53ac86-c22dc8c7": [ + "Lung Opacity", + "Pleural Effusion" + ], + "bfa3140e-43c1a4f9-ad9f9649-57f9f1bd-08070a23": [ + "Lung Opacity", + "Pleural Effusion" + ], + "77e5731e-4cd67ee6-56cf33fa-772c6c6b-4e25a333": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9c83a18d-e7c2386f-1b090c1f-9d7c949f-ded90c8f": [ + "Lung Opacity", + "Pleural Effusion" + ], + "e2ae7d0f-49a52396-70e65939-9f855049-f071b61c": [], + "06d9c32d-19cead96-b9b762ac-207c77aa-8c6c7b93": [ + "No Finding" + ], + "f0cf07bf-52eaa447-3c2c74a7-55295a62-a962b099": [ + "No Finding" + ], + "befedeee-9f8df55c-4957be6a-81c9d6ff-3f641e1c": [ + "Cardiomegaly" + ], + "f42f943b-33ff540e-c7e2236b-8b3315e2-4f3ad1d9": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "4dd888d7-5b44d24e-8c4900e9-9cdfc9ca-955574e9": [ + "Lung Opacity" + ], + "aeeedb41-57ddfc8b-adfe8c04-c411349c-697bf972": [], + "0eb9ee33-ffd77386-6061cb30-c7531616-16a975c7": [ + "No Finding" + ], + "f2d4b82f-bbc3f47a-ffa13252-797ba37a-e52591b3": [ + "No Finding" + ], + "0cc44261-ed5a16ac-1b5e4caa-120d5908-ecdef9aa": [ + "No Finding" + ], + "6c4ce28b-408c6a59-f54ae6fe-dc6b0ebf-c5c1cc34": [], + "1a3c2621-ef9a3ce4-4694bb62-986c52d5-5009dbed": [ + "No Finding" + ], + "964b2018-3d3a8dc6-c637225e-16e9a8f8-dabd5c4c": [ + "No Finding" + ], + "b8d59f8b-a58efaf2-9c361139-8ce4f7c1-6f948185": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "d33d3e27-8bcf7569-af70ab28-bf25119c-49421ca2": [], + "515940a1-1597d869-4cd954d5-3c00a8fd-91659a8f": [ + "No Finding" + ], + "fe24eab1-ee7ade48-c989c10b-512e9081-036b7c17": [ + "No Finding" + ], + "2a8b4162-428841d5-78833596-19ea5555-bfe4701b": [ + "Atelectasis" + ], + "c2fc9ae4-da3745b6-66a1c465-1739af85-f61fa22d": [], + "47bc92de-7c76c78d-2af6018d-6625e000-3f694250": [], + "f7dc11e5-43c374d7-48d89864-86815a5f-388045ef": [ + "No Finding" + ], + "69993378-c937a43f-67393866-a501ac76-1a78ed84": [ + "No Finding" + ], + "c5f10e5a-dbd419da-3540dd16-cd0fd3e3-90769d0d": [ + "No Finding" + ], + "088e81ed-7922aa11-c825f648-1b390ce3-e6f8b18f": [ + "No Finding" + ], + "81363533-9fe25452-24a77836-eecde8c5-555eff61": [ + "No Finding" + ], + "6f4705d9-33c6c0d9-d5c126c5-2710e4b6-1738c4bb": [ + "No Finding" + ], + "95cfd9d1-1dc7b97a-63def69d-8bf200f9-46598573": [ + "No Finding" + ], + "25b7b359-8e6a6c36-b65ed616-8a74bb54-a2ff39b0": [ + "No Finding" + ], + "604f38a3-9910dd87-7fff1923-fd7b0ea5-228ab209": [ + "No Finding" + ], + "26ef2bde-ae5cf661-f6e14469-48db7dad-b0df367b": [], + "ad7d1cde-f67b3e6f-3420f812-641b1b2f-b2441e48": [], + "650516b3-439d0dea-680516d1-3c26e80b-256331d6": [ + "No Finding" + ], + "94559fca-c712619f-88d28bb4-241c950e-94d1d4a5": [ + "No Finding" + ], + "54f34ace-b673e34d-666a3e31-c6a5c29c-522115e8": [ + "No Finding" + ], + "918b3685-2e9bcd30-3df57797-5bff4c65-4437c8b5": [ + "No Finding" + ], + "6335e62d-9f32c216-fe6daed7-0a47391b-37301bf0": [ + "No Finding" + ], + "81578882-b1396f5d-136ebceb-d7043f2c-1a9b6643": [ + "No Finding" + ], + "c78c0eb4-e2192739-b11564a9-fdd1ae3b-2041db15": [ + "No Finding" + ], + "88848743-c43a0962-5d8b16f5-85267238-f8d9cd7e": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d72d1448-74360537-0c5320ca-23c189dc-6d06a97a": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "b3e3432f-8de35a57-84779127-6d36d4db-a8e9317f": [], + "1e7c453c-c31a14f7-14ffd1e5-de7ac337-07746c5f": [], + "7c8ae529-1be1249d-ea74aa33-e2075e92-d36b66f3": [ + "Lung Opacity", + "Atelectasis" + ], + "8e6a0848-5eb51eaf-ff31f21a-a030a9fb-daef4652": [ + "Cardiomegaly" + ], + "cc7b8e1f-7ddae921-3326c55e-50bae94b-4e8eaa76": [ + "Lung Opacity" + ], + "024c7d0b-dfaea1e0-ebebd7b0-f71a611b-acf54c04": [ + "Cardiomegaly" + ], + "e06c3657-c7a51377-0889b204-130dbf18-21af28ea": [], + "804b8d22-6d1eb472-77b4a9b3-2a62bd27-a1d390a9": [ + "Cardiomegaly", + "Atelectasis" + ], + "ada0238f-cfaaf77c-c0ff1c4c-fcb44ece-427e82d7": [], + "f45462e0-afc7a83c-261958c5-a9f01910-d68468df": [ + "Support Devices" + ], + "192b6e3d-ec405303-9b315b5d-1dd90a9c-e6310078": [ + "Cardiomegaly" + ], + "37641a6c-936a1ec4-1d6a445f-5c18d5b0-23f15501": [], + "17cf7f7c-b27bc3f4-e902bbcb-b4c608b1-5984f415": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "04f641c1-61030285-70b766ad-7189c11b-64101452": [ + "Lung Opacity" + ], + "374b061d-8ac364d9-175a127c-5c6cff5a-98e8a57c": [ + "Cardiomegaly" + ], + "bb5c15b8-775b1e4a-d704d49b-19215671-ce9ffb25": [ + "Support Devices" + ], + "c06025b9-935d32ff-0efabf34-2f711ce7-e4fc7000": [ + "Cardiomegaly", + "Edema" + ], + "4a0e4892-05ce6193-0cd30bb3-2ab7b697-539ea57d": [ + "Support Devices" + ], + "f90a985b-e0ebbe62-bfe40107-e99c6162-7df4b246": [ + "Support Devices" + ], + "0a74b069-d42f7547-3e94c466-f893a9b5-926affec": [ + "Lung Opacity", + "Atelectasis" + ], + "5efde2e0-1abd8e7b-6640d706-7a336bf2-cc8b21b0": [ + "Lung Opacity" + ], + "8f1b6c21-dc13ba3f-d1f686ad-50b5cebd-3c6fb05a": [ + "Cardiomegaly", + "Edema" + ], + "69fad06e-4d630395-0c622820-20e6af98-5a01aaa4": [ + "Cardiomegaly", + "Support Devices" + ], + "a564f5aa-11095b55-eb10d3ee-29363be4-e6a39536": [ + "Cardiomegaly", + "Support Devices" + ], + "e0ffdf00-50f31921-d4eb21c6-2f9c26c8-fa5a40e8": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "195e59ff-99dfa45c-784404dd-c284ed2f-d30e03e4": [ + "Cardiomegaly", + "Edema" + ], + "4dd14141-717a2a23-ca41af2c-d7723505-840e9c37": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "35ab1e49-b049f284-ba901484-a52ba49e-053d2c10": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Pleural Other" + ], + "680b5549-8b23749a-6d908684-c364b8db-473d4e7e": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion" + ], + "ce1b5d74-954f2a25-a1265c40-1c05ecf0-9d2a535f": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "92a5d6c1-3f56ede1-91a82ea3-97a0a28c-b540ac54": [ + "Cardiomegaly", + "Atelectasis" + ], + "e0a6f265-a3ad624e-1a24c5ee-d4931cd9-612caad9": [ + "Lung Opacity", + "Pleural Other" + ], + "9e908d18-6a7658db-5a1fbbaa-b26ea86f-ce549cba": [ + "Cardiomegaly", + "Lung Opacity" + ], + "f58f13fc-5e0dd5d2-eb74ea1e-e45cb8dd-be5cda6e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "0b54a128-2cfacc36-cc674a81-fd5c16c5-78bc9882": [ + "Cardiomegaly", + "Support Devices" + ], + "81352ea3-46dd9764-71a8e980-798f84b0-45f4f3e5": [ + "Cardiomegaly", + "Support Devices" + ], + "948bd46d-61f1d63e-56f946d2-b4c37349-5d0518ae": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "83695c6b-ee90db45-0662a38e-4f2ccb17-6bd5ab83": [ + "Atelectasis", + "Support Devices" + ], + "cc802574-9ed7ecb7-b29eaa57-59092e24-9e774cdf": [ + "Support Devices" + ], + "15c5f82d-2fbbb3f2-cf605195-ed4839ee-e71fe465": [ + "Support Devices" + ], + "69c29944-ec41cc80-daae3d71-357064e8-d6068d68": [ + "No Finding" + ], + "cfaacd99-7ac63214-6b328e63-b94c98af-9872e989": [ + "No Finding" + ], + "40437fa2-34b4ba86-3e69088c-78cbfee9-2f099d00": [], + "7f76a39b-1a9b1877-23e9be40-c0e12ec5-85d6f74f": [], + "dc37af08-8279822c-2a010ca6-ddf93db7-69abdb4e": [], + "2868887b-fff9f2f7-a10ff53d-11548e39-4332837d": [ + "No Finding" + ], + "574d9231-1ef20aac-3abcf4dd-30a9c7ac-7e5fee48": [ + "No Finding" + ], + "1d614959-6abd979f-2e3ad4a7-df209ecc-7226ff59": [], + "e33fa528-3c176030-592d4d75-9395739d-2f4c25a2": [], + "df3e801b-e7a2a583-48a4268c-95ae757e-fc8c1172": [ + "Support Devices" + ], + "6d896995-e8f0c6a9-33a67c60-4e7b80f4-9e94ac30": [ + "Lung Lesion" + ], + "74fb5360-e5fd0fe8-a6ec7e2a-b9567e77-7f9fb1de": [], + "8f5526e1-a1f8e71c-8a2d9cf4-ff6d1c1e-ed8b45d6": [ + "Fracture" + ], + "991542cf-d2c81e61-45b8469d-562fc60e-ae64175f": [ + "Fracture" + ], + "30c6c3cb-096d81f9-8a699d90-4b7b7ce4-843992b1": [], + "784739df-bb737920-7abec083-2ff0c73f-6bea7f0e": [ + "Lung Opacity", + "Lung Lesion" + ], + "ab3169d7-9bd76104-b93bd14b-30260b06-c8a02491": [], + "eb4c2fa1-018c3c01-a16cb8eb-e2fcefab-30b318bc": [], + "27f8a7d3-631bee4d-4c476ee4-65e1003c-6dcc32ea": [], + "3bdd0274-223225d7-9df7e491-ec5fb338-0acf44e8": [], + "45e75d39-3c514e99-283fc07b-71b7d0a9-2cff6966": [ + "Atelectasis" + ], + "e201cc97-09508e6a-86aabfaa-71bd9008-6859b9e4": [], + "eace0477-37c4a4fd-a3506e90-640be36b-33ed8594": [ + "Lung Opacity", + "Pleural Other" + ], + "034b38b5-ee6b2ef5-652fd73b-f0c23204-10cb9beb": [], + "845caf2b-a844a1eb-7e01fbc3-43aac027-d0d17998": [ + "Lung Opacity" + ], + "6361c6cb-2f5fe468-7fd88316-80a44c79-fbe11c02": [ + "Atelectasis", + "Pleural Effusion" + ], + "b15eb932-15df0889-519b3c56-5b813026-c65395a3": [ + "Lung Opacity", + "Pneumothorax", + "Pleural Effusion" + ], + "1c9ec94e-27e09fa4-bfa23b4a-097d03bb-a6f67389": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "c883a555-56436deb-19627be5-6be529df-c6009b0c": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "102f4ba7-1322e8d6-a5776e75-ccf4447a-7d64aa0c": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "ceca213c-88ded0e6-ac5306af-5de899b7-3c6dbaca": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "16034542-3a1b9bc2-b4765451-fa145e0a-5833793e": [], + "8516b7c2-bc3304e9-1feaa3ac-b755f740-eef350d8": [], + "61057192-2a26a2e2-8145ae0c-1295cf36-5ac93c98": [], + "b75e4086-9352431d-f07e12b0-a8669ac7-28a1f693": [ + "Lung Opacity" + ], + "c5d1f913-cd636274-029bb314-6f1e9d2b-d2593f75": [], + "108c3664-bcab3b99-5256f76e-16968545-6cc1d253": [ + "No Finding" + ], + "f212b3f4-b1b8e805-038e1a42-b7593ac7-f038a750": [ + "No Finding" + ], + "1adb0f14-f7049b06-787006f9-0cffb6fd-5a8ffe0f": [ + "Cardiomegaly", + "Fracture" + ], + "30aec0b1-60cfc839-0ad6a986-f37501cb-8ba027e3": [ + "Lung Opacity" + ], + "17bf6f39-2c117801-91df99f4-7ae12f61-6b286b7a": [], + "9cfdd15d-ffe4a5f7-674b505e-3146e5fb-a115a271": [ + "No Finding" + ], + "dc1e7454-d814d8b0-98387289-b10ecc59-9f4c8c6e": [], + "1f0954cd-43cc8945-70cc213a-d2ecdbea-ed886685": [], + "85075912-24fd6f93-372dd618-02e8b4b1-acf0b956": [ + "Lung Opacity" + ], + "18688c73-aee9c22e-18eb48d5-fa9970f6-eccbabcb": [], + "49af2ff8-ff268b7f-50035a5b-237ad933-2159c08d": [], + "57e91f33-eec51e84-628b8259-c7a15e51-86787a84": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "85b47dcf-a5b619d4-60c3593d-76bf6fec-02ea2a87": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "13f97bff-9d874f99-18558415-d3e8f313-f09288ad": [ + "Lung Opacity" + ], + "c34ed3e3-bb96ed94-9a7e3ce0-7e06cff2-ced55bdc": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "dfd26dfe-44a8e6b1-7ab24593-1166b595-2313276c": [ + "Cardiomegaly", + "Support Devices" + ], + "3c248c40-b23d88c7-d1751a15-df7e684c-37b6616f": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "44528721-44ac9b26-b1b4a67d-d234b00e-7d72db37": [], + "60e93ec9-ca47899d-97a8514e-cc353e2b-a0e7bdd7": [], + "a0860cd0-fbf4f814-8263d977-a05febe9-bf39aa75": [ + "No Finding" + ], + "cabbbf75-3fd892e6-697cd8ee-d77563dd-a174163f": [ + "No Finding" + ], + "5a40bc49-30c49ada-4ca68aa8-3d602352-d0e098b5": [ + "No Finding" + ], + "894066e5-5d358d23-4a0565ac-ebb2bd92-c882bc27": [ + "Support Devices" + ], + "695acea4-7d4be71d-9243cd6c-c90f68cc-cf5d3a75": [ + "Support Devices" + ], + "310e8148-a425915b-b9da63cf-3e0bacc3-14ca5967": [ + "No Finding" + ], + "d8215900-2a751f2f-0b74c0f8-0d436922-94f8738d": [ + "No Finding" + ], + "85c5cc51-4ca751d2-53b3b8f7-9e94a4ac-b1203644": [], + "e230a3a1-23446c9b-9196940b-ffe3a2de-5591ac72": [ + "Cardiomegaly", + "Atelectasis" + ], + "d8eac14d-acfeb227-de6bf397-eb450434-5c9a3a42": [ + "Fracture" + ], + "3a0efbc4-0a2f654f-d16374e2-fe444b6e-89f1654c": [ + "Lung Opacity" + ], + "4685452c-c8859fa5-a7250c35-3d46984c-9234a600": [ + "Lung Opacity", + "Lung Lesion" + ], + "047d2fd6-38d8ef84-728afc5d-09bf059d-a8694a24": [ + "No Finding" + ], + "4dc51885-3677558e-a6ca1223-a4e1a813-1a256e7c": [ + "No Finding" + ], + "6aa7d3dc-e654193c-68e28481-3fd0cbf6-aad4ae29": [ + "No Finding" + ], + "8820705c-97b6153e-de30a8e7-051cd9d2-cebb4f99": [ + "No Finding" + ], + "92f6680e-05166498-698d6769-130f7edf-4bbc67d4": [], + "e234016e-d9aa0dc1-ae8d3f95-6ce73d86-05fe30fa": [ + "Lung Lesion" + ], + "6520217f-d00d36ae-a55b165c-6d78b2a9-2d6cc885": [], + "14b22777-f4431fac-5af907ae-36abcace-32885dba": [ + "No Finding" + ], + "7f09ac1c-9a5c5afc-4cb933a6-1c55d079-8ef50ba0": [ + "No Finding" + ], + "aa678f37-2090bcc4-eac84811-637bb4f7-f96c6370": [ + "No Finding" + ], + "d24a8ab9-9016718b-9c276753-154be4bb-d8a94ed2": [ + "No Finding" + ], + "e4fdc78b-471e3ec0-c31f9192-82a6febe-ed119e32": [ + "No Finding" + ], + "afa7b0ef-ab36331f-40216eed-b9cb4a50-b937d72b": [ + "No Finding" + ], + "b382715f-507e867b-6b379590-4fdbbb24-df4d2116": [ + "No Finding" + ], + "cd34a1c9-3e572b08-a5dfc903-0032200e-708e4a65": [], + "68061713-5fff1c59-90ebb853-44566d77-ae9fe3c9": [ + "Fracture" + ], + "9bbce2c8-90534017-445931b8-8f207173-2068749c": [ + "No Finding" + ], + "a630e6f1-a760573b-d0a05341-d9831a18-a8de22c3": [ + "Lung Opacity" + ], + "f428c50b-ff3f758f-7ec7be0b-831ee404-7190d0ed": [ + "Lung Opacity" + ], + "2467e1fa-601fff83-f7ee16a8-fa135c0c-e9d15320": [], + "24d67d52-b980751d-ff001839-ec1fe0d5-494dd5ac": [], + "830c370a-a1f80137-f014ce2f-875aac45-4ead0285": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f6903ec6-d68cd572-11a44700-84d1d724-3af57b2a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "514cd541-74dff7cf-998b6616-ddcd3d4b-d3096e80": [ + "Support Devices" + ], + "7db47847-c66b6992-3edc1bac-364e0750-67557805": [ + "No Finding" + ], + "c31fd316-747ceb0b-7541d258-352aa94c-8ae4f713": [], + "3f8cc507-ca77e676-30fe438e-cee4bdae-7e09709e": [ + "No Finding" + ], + "45cbf41b-9e484305-b9f7cb3b-331ed033-9a492278": [ + "No Finding" + ], + "665d7742-d067640a-b25afbd2-fcb01db1-b6d6e7c9": [], + "7300ed3f-578b9a92-0404bfde-931d53a6-03d1907c": [], + "1658b53d-620ef24b-cc1913fb-1d842a7b-233b6a0d": [ + "Lung Opacity", + "Fracture" + ], + "e619f4bc-6a72c001-18ee8e31-b4b41aa1-3f57cbc5": [ + "Fracture" + ], + "d3b0b262-df43c83c-79c07524-fa37aa2e-c76d7762": [ + "No Finding" + ], + "84c6ebfe-211d33d7-178a645a-3526f767-a15ec657": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "78c48cee-1c2a502c-9a948c79-770c6b18-1c0335bf": [ + "No Finding", + "Support Devices" + ], + "abc5956e-8aef8550-9f0b9742-9da0df9a-e1a0c7cf": [], + "edd75897-885603a4-3405825d-0ecd9d36-cda173c1": [ + "No Finding" + ], + "503519a9-27880621-f7f5d51c-348734b7-d6b70e30": [ + "Lung Opacity" + ], + "639a09fa-d71c9ec9-825e615e-eabc6326-ddd33f2e": [], + "eb496f4c-741d24e7-3fded885-0de89352-634e6cca": [], + "906e0eaa-60dfa37d-c7be4868-5d9613b9-f49fd253": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2c2d37dc-72ce751c-11056009-510e46bd-65967968": [], + "66e87912-67944022-478d3e89-9e031955-97e93818": [], + "c39a2d49-30932027-84dcf97f-63bfe5de-f9b1bbf5": [ + "Support Devices" + ], + "5b884d40-dbd3f418-77c8b6b7-eecb5a18-035015c0": [ + "Fracture", + "Support Devices" + ], + "1fbaa97f-bf02c806-cdfb8891-8e156d0d-35b03261": [ + "Lung Lesion" + ], + "77cc407a-183efd69-41f0301c-20bdabc5-8e4e57c8": [ + "No Finding" + ], + "97bec5d2-5c01a348-f531a2fb-9be980b0-a17ff648": [ + "No Finding" + ], + "c13310e4-4d76ea1b-5387cec3-e71bbf20-d4e77909": [ + "Support Devices" + ], + "55a0e030-4bb997bd-b5d19ede-c9996085-f874501a": [ + "Support Devices" + ], + "77dab00f-4b12bcda-d0dfea2c-e540bb9e-fe5b3114": [ + "Atelectasis", + "Fracture", + "Support Devices" + ], + "04ac83c1-740154cd-378f0bed-f4615e94-8e883aaa": [ + "Fracture" + ], + "17c32bbc-a11cc59d-e3beafe6-d339e5f3-fd85e41e": [ + "Cardiomegaly", + "Lung Opacity" + ], + "fe3e3ba7-b7222cb7-bce60f53-58872f01-f8d40bcc": [ + "Atelectasis" + ], + "11765dae-ae3497e6-acedc8e9-0f57d4de-4c07c9c7": [], + "4cbadab1-19a3f1d7-924d71a9-80bd338b-860e33bc": [], + "c3c16638-ef4d1533-232b83a0-f2e617fc-2ed79160": [], + "9ec31391-5cb6e49a-03c0288f-469b0fea-cff8d6c8": [ + "No Finding" + ], + "e8d69f7c-a0a4aaaf-1fffa003-792382cb-c70f248e": [ + "No Finding" + ], + "581bd51a-61e5b86c-e90de29e-d6f1eaf5-f42cd0ff": [ + "No Finding" + ], + "7ae4351b-7e72e14c-eb8194a8-855b4a50-9f496411": [ + "No Finding" + ], + "1ad714a9-437bbce6-a694ad02-05512130-333e99af": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "89c1162a-5fa4ed9c-c008cc39-f0bdb24c-2fe6296b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "b3a62ca0-2dc01e32-d5450dce-c6b9c0c4-77af854a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "b6d980d3-b586c166-d29fa9de-6a7335ae-35148194": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "c192e7be-3c9c15d0-ae8a7d3d-a117f975-65afe9ad": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis" + ], + "83cada44-22eeaa71-e5622be6-dd3eb0ad-9b1ccc68": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "fb12f610-81c4f11d-89fa082e-653ba4ff-ae31e112": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "1d8b6f1b-f2623043-0b88aff3-36ffde7e-aba0484f": [ + "Cardiomegaly", + "Pleural Effusion", + "Support Devices" + ], + "b3cc74ec-d3bd5172-abf56e57-6a47cce6-7e7a9b99": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "46aa0c3b-dfb23768-f0c1ea37-80bf872e-01459617": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "14bbb4e5-1b3f6563-a2dd6104-100f4a33-0719fe11": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "382be4ba-6b111a62-d9907d36-c84223b9-6dedb3a8": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "498d4233-b79acb1f-5f5d9e8b-d128016a-377264e0": [ + "Lung Opacity", + "Lung Lesion" + ], + "bb9f6308-e8b75c46-eb75bea5-d3da1b42-7b1ddf12": [ + "Lung Lesion", + "Consolidation", + "Support Devices" + ], + "ccf326cb-6aabcbe1-c826a6fd-3815f491-5f605dc9": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis" + ], + "45f4bdf0-94ec8ad6-63252991-1a72f5bf-92cbbefe": [ + "Lung Opacity", + "Atelectasis" + ], + "b058bdb1-6a9896e5-00708569-5736cf87-151a9cd3": [ + "Cardiomegaly", + "Atelectasis", + "Fracture" + ], + "c462b5d9-11c0b64a-34a7db13-f870d54d-a5d25a19": [ + "Cardiomegaly", + "Lung Opacity" + ], + "2dca8086-7691c675-6078acc9-e190d786-24ed5466": [ + "Atelectasis" + ], + "3e1d14ba-fe736cda-ebd2ef10-3dbcdb89-da6f2980": [ + "Cardiomegaly", + "Edema" + ], + "dd797618-d289b1b9-76b0c234-cb3e2fca-197a188e": [ + "Cardiomegaly" + ], + "6231218a-08114abf-f7126f7b-47637bda-23592f97": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "6eb8281f-7dcfeab5-b9e25878-92be8a26-531519ea": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "09f76ca2-07de6658-6d7fc2c9-12690ff3-a34915f1": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "32669e3a-7cb50378-471dabe1-a85d90ce-332159a5": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema" + ], + "5c274724-63c22911-9071c43a-d456c9fc-0c009ab6": [], + "8e43c29f-78acfaff-61b1d218-90b7757b-b994e7ac": [], + "8af200b2-6d16d8b6-7cf5ca1c-30dfcdce-74779c42": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "4036f736-4f89546f-95a68b44-55bb97d3-fa07a45b": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "80394587-5cae6c52-0e47c884-fc81d7a5-aa49039a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "07455488-3fc54c14-ee5c25d1-ce6e6897-03ddef23": [ + "No Finding" + ], + "c5a10c55-fe2fbefc-135e4b8e-337a3279-db03af87": [ + "No Finding" + ], + "28f9743e-efd1d49e-a076e33b-55ff41c5-4ffe3a44": [], + "cef536f7-4e642cbb-62068854-95acc1eb-ff276ffa": [ + "No Finding" + ], + "1f74f7c8-d728f398-72d444e8-2d41431b-e5678e43": [], + "8b6ea4f6-89ae50df-87c1a2b5-dfcfcf4e-43d511e1": [], + "439c7349-1e32ce82-a012ae6b-59531908-d185d83e": [], + "be2133c9-f05ac108-0faae545-ba98a682-38e81a89": [ + "No Finding" + ], + "620e390e-9859fe21-06a3d4f4-5234159a-3a7615ba": [], + "f6238a46-332ae5d8-ea99fed8-fb2466b2-20299e40": [ + "Lung Opacity" + ], + "354d5dcb-120323c7-1f89b9fb-7756a75d-aa2cd395": [], + "ec080570-5a1cbee6-0f62cc62-5b4bcf5e-da1a8c2c": [], + "428c7b1c-097b77b2-e92655c6-0fba9227-1ad7dafe": [], + "a0860942-8c5f7179-e8e25dd3-d9e62675-f66844bd": [], + "cd819cfc-04a987a2-bc398e86-02babb97-64a9b785": [], + "d1943b3d-7739ba1b-6774964a-990c66a8-9e0db49e": [], + "d6f297e0-277785b9-0dade959-c098d1a4-1d5c202a": [ + "Atelectasis" + ], + "256d4a58-b4233463-d61ffb45-16099de5-b37ef7e6": [], + "8e49dc4a-7e939e0c-5f132e57-0b646bd8-4a2d7a60": [ + "Pleural Other" + ], + "08d3b0e9-3f6dfcf8-d9219b83-4c89a45a-7c6e8389": [], + "3e9f6639-0bc202dc-db3c1fdf-420f69f1-dd068bc5": [], + "09e51f9b-6149243e-70660f6d-66092f8e-b5342668": [ + "Cardiomegaly", + "Atelectasis" + ], + "c21ee586-84ee8466-fb0b0020-2c9730df-4f04867f": [ + "Cardiomegaly" + ], + "89ec1f5e-373a97d1-690f4859-7a555241-09da8599": [ + "Cardiomegaly" + ], + "e2107256-6f627c45-e4ac5ecd-8fdfe29f-faab1e0e": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "eecb0b8e-597db7ef-14dd9bab-52fd0da8-1f163745": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "3033aec6-9d417788-4876465f-fbb0485d-71655bc6": [ + "Cardiomegaly", + "Edema" + ], + "b60cceec-09153ad4-aa1ef87b-c8f07c6d-54da8009": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "3ddb84d9-7f9422cf-299f2e01-d271cb45-0de2ed3d": [ + "No Finding" + ], + "7040c81a-7489e2f9-9e6f51a9-f0745c64-d937fa22": [ + "No Finding" + ], + "a7b2360a-51a1d662-06afece8-5d11b64b-088479bb": [ + "No Finding" + ], + "29298227-0321faea-eb32079a-ac75e1e1-5bb9d26b": [ + "No Finding" + ], + "dda541da-8ccc3f68-97aa6c6a-6d7a5498-db3ca231": [ + "No Finding" + ], + "1abe49d1-355250d3-cea6e169-6e098201-104352ba": [ + "No Finding" + ], + "c53d4662-f55d3ef5-6178259b-9e374870-79aa413b": [ + "No Finding" + ], + "c72f3502-8d982413-ca2511b6-441e719e-a0c293c9": [ + "No Finding" + ], + "03bed479-1814df7f-0373e080-4e5d1ef0-6ebe1066": [], + "44cacbf6-9d96a84b-4fe9670d-106a3b5d-ac3ae803": [ + "Cardiomegaly" + ], + "3f158a92-aa819c5e-ed04bbfe-c4cd87bd-11325ff1": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "2ba8a7e1-5344e916-23345925-d9ce9860-ac1dee84": [ + "No Finding" + ], + "c8dca367-d7fe3dc0-4c52aca3-18ba96b0-06ac98ad": [ + "No Finding" + ], + "f1ea5a2c-ce5a610d-aff80fde-8392148f-39f4982a": [ + "Lung Opacity", + "Lung Lesion" + ], + "5998dcca-a12ec446-fdfa60b9-3a06b23e-b2d12bf6": [ + "Lung Opacity", + "Support Devices" + ], + "fe0ef5cf-90e3c227-e3b3602a-280add66-27988ed3": [ + "Lung Opacity", + "Support Devices" + ], + "aaff472f-e41c0470-87efd349-ba763de2-55568bd8": [ + "Lung Opacity", + "Pneumonia", + "Support Devices" + ], + "a105a3d9-7ee8bcfd-6682d246-26c97cb4-e6caa2d5": [ + "No Finding" + ], + "f9f2ec75-f28ac7f6-8e57221d-248fc115-82a9a1e0": [ + "No Finding" + ], + "73e0e7b4-4ffbe566-feb48f1c-6201bc17-363b1bbf": [ + "Atelectasis", + "Fracture" + ], + "93f0b74b-e85bf537-5e436a11-2b94dec1-614a4270": [ + "Cardiomegaly" + ], + "ad8acd34-24e635d2-8ec3950b-3d40bc2e-ac99a058": [ + "Lung Opacity", + "Atelectasis" + ], + "5c817d58-918d46f3-7e31bce6-2a7e7cd8-f30eaae6": [ + "Lung Opacity", + "Support Devices" + ], + "78b0f724-759138a6-255f6ef3-48d0690c-4d9405cf": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "23f1864b-dcf3fec5-0cf991ab-bbc31dd0-ba40ddfc": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "cb254c2a-704a6902-121ca734-a8fdc3e1-b5111cb3": [ + "Lung Opacity", + "Consolidation", + "Pneumonia", + "Support Devices" + ], + "464448a4-f1229c37-3a509617-2edb4a04-cef4335c": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "f30ac310-feddb6e1-a0bf1a2c-4311961b-74a32eed": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "a3b20c27-ba0b465e-3eab2b86-991f3d46-80a07aee": [], + "7438cd11-ca6cba83-c3d0b14e-b4f04d84-cdd824b4": [ + "Lung Opacity" + ], + "56381c64-278c220e-719702c4-6e5d4bf7-193da1ab": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "ecf1e9b5-8cd41bf1-aff792ed-9e5aa1f2-8392b988": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "d68e61e0-f41d1489-ba3b0c4c-ae35171f-1abd4615": [ + "Lung Lesion" + ], + "8cca0878-51f27942-9aec337b-398ae7fd-2014bdcb": [ + "Lung Opacity", + "Support Devices" + ], + "293051c7-fe34be87-e9c6cd58-0e979833-3f579639": [ + "Lung Opacity", + "Pneumothorax", + "Support Devices" + ], + "494f62af-2213616c-20174f23-c3d781fd-fed10e18": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "0cae2952-def96aa7-1e84fd97-cf21d3d3-341189c9": [ + "Lung Opacity", + "Support Devices" + ], + "94cf13e6-4ce08671-ed55ba8e-42a83718-37c56071": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "2365d0ef-d1cafbfe-24afa38d-5390baed-46e9e9ef": [ + "Lung Opacity", + "Support Devices" + ], + "20a65006-577b1db7-b2083dee-71b9a758-591cc79c": [ + "Lung Opacity", + "Consolidation", + "Support Devices" + ], + "bf8bed6d-ee8d4d92-df4bc99c-0733597b-e4a90442": [ + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "a8d102b8-6cc0e5e7-21fc3831-79e95011-003fc4f9": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "7e6df081-ae0880f5-c5c3aba7-77eaa2c1-d46f09a8": [ + "Lung Opacity", + "Support Devices" + ], + "7f934ace-2c4405ac-5ed77284-8dcc985f-175950c0": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "7cd4e7d0-69d6bb9f-93a8c61e-941e3664-68a658d2": [ + "Lung Opacity", + "Support Devices" + ], + "8bae8ab0-e159b156-5842575c-b4b8c1ae-e9c64339": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "24849e83-f5ccffbb-364e8c3a-9c1bcd91-dd0d628f": [ + "No Finding" + ], + "bc6cec9d-539f6cb9-0e023225-38e77aa8-0f61b4bb": [], + "f762bf98-b2141d3c-a5c0a0b1-4fb662f7-fce29b8d": [ + "No Finding" + ], + "d3e8fc04-74fae9fb-787da683-4705e3a6-8e7dd7a6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "51356fab-8f076a2e-2d204a97-8c47b3ca-0b015c10": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "9ab97962-156e4dae-c1188f7d-7dae9ea4-c5a69d40": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2fe28638-604a0402-b60fe5ec-6d13a376-e5a4412a": [ + "Lung Opacity", + "Lung Lesion" + ], + "30d0c13b-a8dcf71f-618ddb30-3d8864d7-491b08e1": [ + "Lung Opacity", + "Atelectasis" + ], + "468df880-10005e8e-d4fa6433-d08fa89c-7b141448": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "2e1cd5e0-fd2c7f50-176e7b18-1f7ac651-bcf8152a": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "cf1b8e9d-4f84cf87-e2281943-859fbd1a-ec648bdf": [ + "Lung Opacity", + "Atelectasis" + ], + "313ea739-0a9a0ae2-1c998dba-cdecfea2-567819cd": [ + "No Finding" + ], + "cc198721-5005f76e-8d179a23-7af3ea54-446e924b": [ + "Lung Opacity", + "Lung Lesion" + ], + "a680d992-08c800c8-27ab9581-4d70707a-cb5d31db": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "425c4fa7-0d48e151-0758d818-9e8b1ea9-e9074977": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "2a88d2ea-b4df4439-14b9c286-c0e29650-2acedd69": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "e9993aa3-51eb4a8b-349f7984-ef76541a-4aab169c": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "f2cdfb35-5e55a845-072cade1-37104e77-15844094": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "c5e117fa-2d2eb000-fb83fe99-ba779346-4bafd663": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "0c83ebb9-3b2d3376-23088ab5-17419c9b-b7f42c1f": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "8e974cb3-d8d829a1-1c0c5cce-714549df-c626020e": [ + "Cardiomegaly", + "Support Devices" + ], + "904cd93c-1da40b8a-14194a57-7ba145c9-66af87e3": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "84f56140-5f674b67-4431f058-4752511b-24be0d89": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "442f2cb0-2fcd458a-939733cf-ba72f0cc-0fed5672": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "2c953c16-8d811ce5-80404b0b-859c9b9b-87a3260e": [ + "No Finding", + "Support Devices" + ], + "f5acc5b4-1e6fd282-3453001f-e9d68af4-af0a8782": [ + "No Finding" + ], + "6096e9b5-86463a35-ae11e747-b6c244b6-e79d1436": [ + "No Finding" + ], + "74d17d6d-60d470c5-aa3e0790-ca26bda1-02853db1": [ + "No Finding" + ], + "a25de503-2ac6cbd7-0ac2c8db-82871df7-502a580a": [ + "No Finding" + ], + "231fd0bd-bf21c178-9c9bbc5a-d859a30c-7086f6a6": [ + "Lung Lesion", + "Fracture" + ], + "aec99028-85963e75-247669dd-f5c64825-6802b7c4": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "5706865f-64746402-2e5c6bfb-943aa9c1-3e276a08": [], + "9456c6be-efcc7327-7779a283-832262af-935183ba": [ + "Lung Opacity" + ], + "e63c6663-176a47bc-a0c8f2b2-68d9fe3f-a02b4dfa": [ + "Atelectasis" + ], + "1f7ba140-b003ee99-5b0b5d7d-af4aa6b4-a212ee2d": [], + "2714ef6c-7b5f7b38-83da9bd7-3e7765be-9cd30bcc": [], + "440953b1-efb8e185-cb50c4a5-18e15241-4b1a4941": [], + "a7a8a61e-714d4a79-e86852f1-39f627a4-153a8e9f": [], + "32495489-162fe31d-e0bdd6f7-adf001a8-203e9655": [], + "9dbec9b8-85e97046-6ed0693b-0756a0c9-2d7d42ea": [], + "a062348e-8d390342-1b4805ba-dc198fe5-1bd0f091": [ + "No Finding" + ], + "2dea019a-3238b00f-3b099b6d-d9a59d7e-9a34765f": [ + "No Finding" + ], + "bb7b1e88-c2f3b1bd-8d48cc78-62117964-b18a89aa": [ + "No Finding" + ], + "de69325c-e5504037-f88be1fe-9507d5f9-c55411cc": [ + "No Finding" + ], + "0927598f-e24da99d-ec445ee7-e5470dfc-978d2780": [ + "Fracture" + ], + "0a3b3e2e-35122c1a-97114ab6-a227fd83-e5af5c17": [], + "5f80a35d-198e9b95-a1b7c84d-d982ae5d-58d1e672": [], + "e1ce5809-b1cbeb24-fde041d3-54a42f81-043462f0": [ + "No Finding" + ], + "547c1419-90bc4319-c6808ba5-6fe0463d-a8f1e508": [], + "a200c4d9-39de37d9-f20906a3-87b342f8-59b476da": [ + "No Finding" + ], + "32de4fe2-db7905e0-235c099f-a12e4212-284542bd": [ + "No Finding" + ], + "a7742b8b-8d52f218-962c4ea7-dc720df1-a35bdc8b": [ + "Lung Opacity" + ], + "262aec66-02c3d815-9e02b897-1f697799-42735ce8": [ + "Cardiomegaly", + "Atelectasis" + ], + "bae736e7-d18067d5-22628077-2c19a6a3-2b6ea80a": [ + "Support Devices" + ], + "ff0e266e-6a3934bd-5c43948a-9777d9c7-8195a8cb": [ + "No Finding", + "Support Devices" + ], + "27a25899-ff86a8aa-e4233c75-794e0118-c17d38ea": [], + "82ca8995-dd37a31a-02d18a47-a0a6c734-0f8bb665": [ + "Cardiomegaly" + ], + "76b89f70-52ebf792-8b3a551f-ea727bca-0170ec15": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "c9490237-d2939ebb-637bda9a-e5a0039f-284b489b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "11f8196c-fabce921-4f144f23-5ae15c0c-791e7464": [], + "4d219b1c-e4f9c270-1dd0646e-ac5ef594-d4849258": [], + "62f76a9c-ad970999-824b1a18-304d5277-9d7467ca": [ + "Lung Opacity" + ], + "dbb5d5c8-c8b687af-eb581dc3-69916e4d-16dcdc9e": [ + "Atelectasis", + "Fracture" + ], + "04358d55-af10b770-d5efc878-5cb699d1-4c208ccc": [ + "Fracture" + ], + "ac273887-927e791a-6efc8cbb-9e16bd27-f2fc65cc": [ + "Atelectasis", + "Pneumothorax", + "Support Devices" + ], + "bce446cd-5484d7a1-e01136e6-9239033a-61d060b6": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Pleural Other", + "Fracture" + ], + "eb808317-349b706d-2c307946-be5fc3c1-9ee02e5e": [ + "Lung Opacity" + ], + "b08aaf75-27433984-2f2fe0d6-12a22932-c87cc8d7": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "1c493af8-170d3211-d1a0da94-92ced558-f2b893d8": [], + "8d3642d4-efc7352b-cad3fe46-94b15206-23bb6f02": [ + "Lung Opacity", + "Pleural Other" + ], + "b5585a72-4c67e90c-227b0a64-08b8ab8b-428a83f7": [ + "Lung Opacity", + "Pleural Effusion", + "Pleural Other" + ], + "1421aadb-056057cf-459c8a3b-f595759b-60a22305": [ + "Lung Opacity", + "Atelectasis" + ], + "424f08cc-824e5954-cd4cd47b-b96a37f8-29649294": [ + "Lung Opacity", + "Atelectasis" + ], + "8fdce4f7-e8a2f25a-1a1a6f63-0ed1ae0f-60b43684": [ + "Cardiomegaly", + "Pneumothorax", + "Fracture" + ], + "d67a6a39-f7d74ca8-28b47ca7-cb8e9364-284bebd3": [ + "Atelectasis", + "Support Devices" + ], + "9302ed70-b3b573ff-41f32027-d4a641c9-04b09ba9": [ + "Cardiomegaly", + "Lung Opacity", + "Support Devices" + ], + "ab618eee-2a493884-a478b561-100f5f42-562e5657": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "35b9c6fa-00c88823-d2b016e7-860235a2-35e10b1b": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "53aeee8a-c2f7a428-34ede058-f7d0aa79-183fc763": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "889de77f-1402d0bf-fd2d2420-a6980f4b-09ae6ed7": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "a9415ba1-3d12f1ec-964b6738-a9e76fa5-30aca88b": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "7de77f32-efc99908-c58357b5-f6898f6c-0cf286d1": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9eaa5798-a1f9ce99-1756bdf0-83b81c43-45840f0f": [ + "Lung Opacity", + "Pleural Effusion" + ], + "1164d62f-9e4a6099-a99a9a12-017229ad-7b6f71b5": [ + "Lung Opacity", + "Pneumonia", + "Pleural Effusion" + ], + "7aebfaa7-d5a1f4ed-24dfd06b-e5e86c5c-5850e00f": [ + "Lung Opacity", + "Pleural Effusion" + ], + "10012b3a-50cadc6b-2c7edc30-cd4462d7-94cc5a75": [ + "Lung Opacity" + ], + "9b8e858a-9dcf3d99-30cd9e93-a545b503-a374c56f": [], + "c068698d-421eca76-4ca6984d-94179322-8a578d56": [], + "7ecdb716-e49a94e2-ad048b9b-135f180b-c96aa97b": [ + "No Finding" + ], + "ba03cd17-84ef8c6e-04903ede-41a75c34-165e5c44": [ + "No Finding" + ], + "a6d4bff1-d42c2ba8-4e17dc8b-1cd7a3a8-46d67185": [ + "No Finding" + ], + "c8c44515-6c17950e-f2e98985-ecc89cbf-7e860f4e": [ + "No Finding" + ], + "1bfdb2fd-6ff900ec-a426db98-a566d026-6f1d6677": [ + "No Finding" + ], + "61370059-4f1745cc-d3636639-4b9629ce-bb9b8467": [ + "No Finding" + ], + "2bd18487-da8bb3a9-189e159c-1c3f65c5-670bb3fc": [ + "No Finding", + "Support Devices" + ], + "41d626a4-3a5576a4-30e9d1a1-e3bec23f-0a4059ac": [ + "Lung Opacity", + "Atelectasis" + ], + "aab8ed85-7c745624-f394ec76-c26844b8-15d892b9": [], + "1b963d3e-0bf48d72-cbaf1a14-ed74724c-b8534d5a": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "5139b8e5-f1349775-39057827-046ed642-60133e35": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "a250f743-48863d40-60cab50b-3c50f654-52796233": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "3455b174-7955b50f-69214401-26f4d34d-3672b50a": [ + "Cardiomegaly", + "Atelectasis" + ], + "57ae3cb1-97ee6261-ad57fd24-2fdfb967-9f57b03e": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "d7e76bf7-a2164a84-93ac8bab-30112b43-10fce823": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "d37198a2-d588ccee-08feb12c-5d4942b3-98453d12": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "ab80b235-0f6e4319-62504f7b-e293fad3-0ad33347": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "57949fd6-88aba5c8-27f26572-80587301-346f13c9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "9d33ba30-3b746ce7-bf969585-85fde961-8967f38c": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "9e0e4686-1372bf57-292f7d25-12a3bc81-945870b4": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "a185bea9-f95f19a1-32f0ea92-8d192ae9-1f3a5a07": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "af3f9a0c-07676bf2-1d617e8f-3296d7ff-7c04924a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "32f21aeb-76b307a2-19e6cd41-6e22837f-89b37db0": [ + "Atelectasis", + "Pleural Effusion" + ], + "903860bd-98a2aa2c-e1387e26-3c53bfbd-53e441f3": [ + "Atelectasis", + "Pleural Effusion" + ], + "ed9cb7d3-e541763d-995f4deb-46c21698-b3f3f780": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "3e62f3d0-8224f098-53a93d9b-0a0996b5-dd85c901": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "dee24a5d-8e44ec45-f88ab6f6-4846c054-3da6b73d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "5ddde0e8-36797a7f-860a133e-21c372bc-632c20b9": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "e4a62f0a-718060e7-49ef0069-e95d38ff-96fac7fd": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "b5c48946-bd1838f7-c09076f9-1427ea90-d701bf5d": [ + "Cardiomegaly" + ], + "ba46fee9-9f0df347-3c94ff1d-8e80ed2c-aeea650b": [], + "3ada78bb-a6dcb49e-ac2a09e8-3671d4fe-e3b5aa68": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "96783e57-b5dd59af-319563e6-f8f155cf-ffa2de57": [ + "Cardiomegaly", + "Lung Opacity" + ], + "031e1a10-9b03a629-29234928-e2dbc65d-7ac75537": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "54cefdc7-0441ba41-15e39589-9ca6ea57-40e19af5": [ + "Atelectasis" + ], + "87d13784-35495ec2-cffeda97-23cf108b-c05e835b": [ + "Atelectasis", + "Fracture" + ], + "8edb2caa-b49b1b29-4d8b547d-30b352ec-abc39baa": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "11362097-a0bac3fa-316e02be-b753a0b5-16e69386": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "59d4fab4-679af5b7-5d8299ee-5de4e775-51372e47": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "a56559c6-1aa73e1f-2d284a2c-337f7055-1780d9e6": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "ab01ebc0-71496a3e-2e7445dd-732ceb26-0b6aff7c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "012d47fa-4229d089-abd07205-47dad810-6a43e76b": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "2f393208-b24e24e6-cd07566f-5c9ddf8a-e8e6862d": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "e7159328-08569709-798aa964-ee7f2027-c51daa27": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "2b1a2dcd-992835fd-c9e705f3-e74f11b1-05d75de9": [ + "Atelectasis" + ], + "68ad0229-fbf719ec-6407d47e-398368ac-1c4ffe02": [], + "033e88a7-b72e1f61-9e9c608c-95650c3f-87cd1f6a": [ + "Atelectasis" + ], + "db21cdac-6b505ece-719ff0fc-4c4291ad-e52017ab": [], + "31cbe120-34a6c3e2-c1b2549f-22f5ce48-a57db40d": [], + "a06a5b51-aebbc955-b0030bd6-02f1d289-201a4233": [], + "355e43d2-bc7162e3-9c3436fc-e74a4192-f7389712": [ + "No Finding" + ], + "4d0125e1-1cc299af-9d2fccd0-d04efd8a-8f0d7220": [ + "Lung Opacity" + ], + "4fc9abbd-f405ecdb-ca896442-413d67c8-928fe3c4": [ + "No Finding" + ], + "ee8009d0-8d39c5ea-7834a7a0-14647847-d9dd7ef1": [ + "No Finding" + ], + "c7e010a6-159db893-31dac930-c5bc900b-9feb9c89": [ + "Lung Opacity" + ], + "1a102f04-c4935ccf-9ee44ac4-ab62d6f6-49575979": [ + "No Finding", + "Fracture" + ], + "17f90d58-ab2032f6-2a154aae-fe200888-93cc7dcb": [], + "82c84432-ff11fe52-0064b58c-b7bc2f43-ef86e88b": [], + "f67f5909-0dc953ec-e5e01fdb-e6c98f3b-b855ab75": [ + "Lung Opacity" + ], + "28899768-1ec862b2-b7624c9a-91e7b8f8-da17effb": [ + "No Finding" + ], + "b7b91050-b97763e5-97f0ce69-b8864ea3-c7daf556": [], + "fdbe2f56-f0015477-75607dcd-5c56304a-5d8c699e": [ + "No Finding" + ], + "5d5a7606-5db82e01-30ed2d70-68cf2b3e-01014d34": [ + "No Finding" + ], + "f0e6ae67-f29f6b22-401dbf2c-393e1029-2691d372": [ + "No Finding" + ], + "1785b82d-5e3ac09e-800e0e20-792c6780-24b63d89": [ + "No Finding" + ], + "af3990fd-dd3e3ef2-b30e6f3b-3e3db1fa-025c0d4f": [ + "No Finding" + ], + "32f085e4-a986fed6-56bf1ebe-f3cd4874-fd51818f": [ + "No Finding" + ], + "396e5b3c-00057105-b7061e7b-156f2268-0e379e3b": [ + "No Finding", + "Support Devices" + ], + "7173d21e-1df4d0c0-2f84a218-b57e994b-3c112aaf": [], + "74148346-3344cf5f-1ce06a31-e433d994-9e1fabd5": [], + "8613c804-40b6fa49-a6010f21-c895dbfe-4fe61620": [ + "Lung Opacity", + "Lung Lesion" + ], + "3e7af712-008df97e-4476ff9a-66300e98-bd0ce2be": [], + "f8080681-868cdc36-e7ccdf1d-570e4c42-ef04d221": [ + "Lung Lesion" + ], + "2616dd8d-82775207-5edd6d79-cb2caae5-77859f51": [ + "Lung Opacity" + ], + "5495cf03-882d6e53-523d1ccc-3ac2643f-f294b347": [ + "Cardiomegaly", + "Lung Opacity" + ], + "b83da8c3-f89f1640-af7d7c50-231b3560-b1313ec6": [ + "No Finding" + ], + "c26d509f-4ab96801-8ee15b4c-2f8b99b8-80e43f8c": [ + "No Finding" + ], + "707a7540-cb3bf051-5a339e77-d0bf7c09-1031feb5": [], + "93c4c79c-b00b5507-3b1a9853-af840f9b-b413930a": [], + "a6e77d86-03752397-ff4284ee-c2bc16dd-feff8cee": [ + "No Finding" + ], + "0207a7bb-11610206-8ac040e0-8e2749f5-afc70954": [ + "Atelectasis" + ], + "d5cb4f6b-7ce099e6-0bcd162e-b5ed316b-981ddbeb": [ + "Atelectasis" + ], + "1df86c6a-c5308f87-4dae24bf-5acfe642-c5e79dd4": [], + "479e390c-9327b20e-4def5215-87e07920-281e62ea": [ + "No Finding" + ], + "0529ab99-080ef67b-361cbaf0-1c178d58-07c13add": [], + "11ba7b99-79869f9b-4e54a718-f74bd86f-50205054": [ + "No Finding" + ], + "c9da4948-05264240-eb4ff71e-f2c88106-f3c8cf60": [], + "d56ec13f-3fe3f117-6b11abb3-4cb39cf6-67273b67": [], + "4bd8decb-25920510-72d388b1-8a496755-56136b26": [ + "Lung Opacity" + ], + "d58d0e27-e1c60eac-ce1656c7-d7b99a45-484b6ea5": [], + "3063fefa-19c17307-b873e001-4512111f-8a620446": [ + "Lung Lesion" + ], + "34d23bc3-2fc08ad2-36eb96f0-2fa778fb-138343b1": [], + "98938972-36f72211-d3e34220-54a0a0bc-18bc8bb8": [ + "No Finding" + ], + "a567b6d8-c57e0444-3e56f41a-a87709c3-ca1cf01e": [ + "No Finding" + ], + "66d13817-333439e1-2134a531-fed0a9cb-579956fd": [ + "No Finding" + ], + "b67cd139-11d3def4-dd27dd95-352e5abf-1593d5ae": [ + "No Finding" + ], + "9c1262ca-2e73d948-e988de44-6da23bff-79ef4e19": [ + "No Finding" + ], + "c7493a34-fa6245e8-4f50a1db-54eb6ba2-c461f0ea": [ + "No Finding" + ], + "418573f9-e9d1de26-ef5715f9-5d7c0434-177c5b61": [ + "No Finding" + ], + "6c233358-c9769f69-bf08e314-edf080d7-c9951a7c": [ + "No Finding" + ], + "1e0fedfe-9bcbb335-3fe84f33-734baf67-40b747ef": [ + "Lung Lesion", + "Pleural Other" + ], + "b4adc8a7-02440962-bb00288a-9076327f-ba931356": [], + "abc4a049-302a6e06-7b883fd5-3ba7cf2b-2417c4bc": [], + "ec4a1322-8a9bf09f-33fbd390-0a0943c8-11b3c889": [ + "Pleural Other" + ], + "361498c3-d91efc9c-455f5e28-8f586c03-6d82aeda": [], + "85d0b656-71639eb3-56a3068f-a6adcea9-b539fb4b": [], + "a7b11686-430bd527-08172ee1-1bd780f3-551fb77a": [ + "No Finding" + ], + "c7350b13-4a95608f-6f277ab2-575e6d61-37cee493": [], + "832bc387-3c9cf25c-7fb73452-7a6ee080-80be4aa8": [ + "Lung Opacity" + ], + "8564d276-76a6899e-b7cedb7e-1cfee69f-ddaeb8e9": [ + "No Finding" + ], + "48069ad7-2198507a-3a1a76f6-2f451959-3323f7de": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion" + ], + "1d01bd22-422dfa0a-8b8364e0-68924d73-beb6f4dc": [ + "Cardiomegaly" + ], + "d54665db-507b626e-61a70dc4-41fd219f-cb59c1f4": [], + "f3de0579-711a8c1f-7d79200b-cadc13ed-61edf359": [ + "Lung Opacity", + "Edema", + "Consolidation", + "Pleural Effusion" + ], + "5e4621d6-249803ba-afaa008b-2751e009-8daaa308": [ + "No Finding" + ], + "7a7f9061-9eef6733-e94cb29b-c4088494-9177b82f": [ + "No Finding" + ], + "fee15199-0d437dad-0c55b167-3a23044f-96fc8d9e": [ + "Lung Opacity" + ], + "3b09934f-106f393a-5f3d7fda-81d7cd07-48d3b226": [ + "Support Devices" + ], + "20c64870-d997ca68-0c568c8b-eaa9f10c-809cbc76": [ + "Edema", + "Consolidation", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "99dbd90a-b66a0c18-466175fd-f5fe089e-8c92b47e": [ + "Atelectasis", + "Pleural Effusion" + ], + "c1f674d5-7e36152f-fbd6eadc-a4030a72-2000a929": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "dc77150b-061bf4d5-09e23a26-52d9ada0-45856897": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "135f0d17-a5c68038-e9f9097a-b89be36b-245e82fe": [ + "Fracture" + ], + "7bb64264-3a27db3b-774da98c-671a380d-9805e329": [ + "Cardiomegaly", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "078eec80-ef37c7df-f352dd0a-ad6da42a-370e6a41": [ + "Pleural Effusion", + "Pleural Other" + ], + "13979aad-0fbe709d-a58598fb-e0033945-fa62f790": [ + "Lung Opacity" + ], + "04dd2d3b-b0cf87a9-bb364724-243aefcf-5facd320": [ + "No Finding" + ], + "65863386-93ba861b-edce159d-5d6bc336-734e0cc1": [ + "No Finding" + ], + "08fd4c57-e13761d9-96132981-e2878469-e4018317": [ + "No Finding" + ], + "f0e340f0-d387cf51-931c26a5-2c512b2f-92ba4aba": [ + "No Finding" + ], + "184bb758-6458694f-18e228fd-256ef804-8bfa0dba": [ + "Lung Opacity", + "Lung Lesion" + ], + "6abe4ea4-169e4ba1-a84d3279-9d50d94c-f5eea071": [ + "Lung Opacity", + "Lung Lesion" + ], + "b298a1e4-63c03117-5b7448ea-6d2e5afd-c1c39bd7": [ + "Lung Opacity", + "Lung Lesion" + ], + "d9dbe791-88e5c7a0-dc34613c-5913966a-50de825a": [ + "Lung Opacity", + "Lung Lesion" + ], + "e9fd9d5d-4686d244-07a3bcbf-1f4fe6d7-c8a17d5d": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "79d26270-6ac0b789-8f537c71-f31636b6-652a10b8": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "185a56ae-2eb6dd1e-40986580-fbea8091-8cea86e3": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "a509b7a8-30e8416d-85902bec-ed3ddf40-22586bf5": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Support Devices" + ], + "c2bd3ed1-3fb9aa51-ff427719-79f840dd-3d5cefd4": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "05ff4e34-05d8cfb5-a89bc7fa-e2f28c07-5b9f190f": [ + "No Finding" + ], + "1b398554-24b876ce-53da141f-517699d4-08516f6c": [ + "No Finding" + ], + "5ebc8d35-a5ece81f-8e1833b8-9605b2d7-688ef3e9": [ + "No Finding" + ], + "c502fad6-5a1460c0-33a61be8-895f2500-fe404a52": [ + "No Finding" + ], + "1843348c-a8b55a25-08721baf-8e014c14-6ce86d05": [ + "No Finding" + ], + "696a7413-9343a3f1-4d2a119b-8b6bbf79-599b2c4c": [ + "No Finding" + ], + "27db5636-5ac48338-c162ea71-78b0c5c2-eabd85fb": [ + "No Finding" + ], + "7deb3ae1-86efe564-c5517815-59b4395a-2cb08397": [], + "9a063e8a-bd122987-f2d98d01-b6af36e3-6ddb5311": [ + "Lung Lesion" + ], + "93318c78-1b671842-1af554f7-52f54a25-91a64acf": [ + "Lung Opacity", + "Lung Lesion", + "Pneumonia" + ], + "694a7591-50712b48-fbfaf08a-6b31c47d-5bce159e": [ + "Lung Opacity", + "Consolidation", + "Atelectasis", + "Pleural Effusion" + ], + "ee82f2ad-31d58c5b-8760e53b-07c17cf2-7ebebc97": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "089ab3b5-4b7f0a82-24c89f6a-d876a8f0-34b46929": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "98460d00-834dcec0-77ec3b51-61149fa4-dfdbde10": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "9a0a7c9d-1d812343-2d53c9b4-bc13998e-a629c3e5": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion" + ], + "f73732eb-00de1875-6b069814-599043c8-9c65ba0a": [ + "Lung Opacity", + "Consolidation", + "Pleural Effusion", + "Support Devices" + ], + "7f7bf68e-6d6ce67a-f6531a2b-edaf79cd-8825f540": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "cdc9c3fc-2c1de092-1ff45e6d-12accd18-918c173c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "330a14e1-0c40a813-603d2660-12ea9afb-4349743e": [ + "Atelectasis", + "Pleural Effusion" + ], + "44fbc6d0-0c39e6ef-e9181984-728748c3-7d42ff10": [ + "Cardiomegaly", + "Edema" + ], + "45efdb5c-2180d248-108c9392-5955178b-868c7a3c": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0cb02560-352c9600-b0e42b70-beca070f-e0490c9b": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion" + ], + "6a1dcdef-77f285f3-0dc88baa-e1241adf-0eba3f6b": [ + "Lung Opacity" + ], + "fd887488-95c00556-1dbb3798-7a3c05a2-0c60eacc": [ + "Lung Opacity", + "Pneumonia", + "Pleural Effusion" + ], + "20f781f3-8af7bfae-44ed8008-540a4975-ce41f5b7": [ + "Enlarged Cardiomediastinum", + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "25d32771-00781a5a-8920ea8f-ae2f4879-373b3c21": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Other" + ], + "2c7ae42e-e41f0d63-f348381f-7888cf5b-491ac2cc": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "29e8cd30-6d1c3bf6-20b37ebf-0129c596-941196da": [ + "Cardiomegaly" + ], + "52dba646-d5793a41-017a31e5-359f85e9-fdc22168": [ + "Cardiomegaly" + ], + "b29d0852-2f33563f-2443c212-e00db2ff-74a4c5d7": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "16e01908-f73fd063-90006332-eb5aeba7-50b4fe00": [], + "b1cd1859-8c39d24b-4a7eabaf-0c5ecbe3-983c532b": [], + "1c009226-64474f8f-8f47e3e0-01640769-ae6bc0ae": [ + "No Finding" + ], + "f06dc57e-95386549-8727f7a4-4e899b36-07f250d0": [ + "No Finding" + ], + "024cc0c3-67fb5ac5-621d954e-656314f7-e8ceed76": [ + "Pleural Effusion", + "Support Devices" + ], + "2bce0faf-d8f186be-2b15d6e3-a0339a41-170ec289": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "1f400fee-753579b0-b459be3b-04c5dbab-120f6074": [ + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "0d51daed-be7d1717-a01acc11-037992a6-8340357b": [ + "Lung Opacity", + "Atelectasis" + ], + "43a98704-16eea15d-90d9ddae-e5ce78e7-7321540c": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "f1f1e890-138d12a5-79b715a3-cba88b1a-39949fcf": [ + "Atelectasis", + "Support Devices" + ], + "416015bf-a5b87cdb-e0e532be-9c61feb1-ef52aed5": [ + "Atelectasis", + "Support Devices" + ], + "28de63ad-f4c09f50-2feebf2a-0a625b1e-bbb2d5ab": [ + "No Finding" + ], + "ea824a78-8cbd68db-cdc27d64-6ecd71ac-4000879e": [], + "67f234c1-478fd442-029776c8-c5f0b2d1-d6e0b994": [ + "Lung Opacity", + "Support Devices" + ], + "ca4ee096-74120228-b98bdda3-8a6b881a-616b1793": [ + "Support Devices" + ], + "db391cbe-733e6800-d302fc4f-9088941c-5412983d": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "f158d781-2937f072-b4cabcce-b2330204-b4b8eda0": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "4753a502-c0764b72-9dfef68a-2024bf26-7d348cb1": [ + "Support Devices" + ], + "af380c20-a7857620-9cbd8440-6b0b451b-3af932a9": [ + "Support Devices" + ], + "d3192abb-0a9a4cea-e86ebeea-5600dcd0-f6447318": [ + "Support Devices" + ], + "f487266f-6dea1fff-43365092-396868ad-c98b60cb": [ + "Support Devices" + ], + "1de067b7-f6abe6fa-821f73e9-23feadb6-1a2bda49": [ + "No Finding" + ], + "fbe115e8-ec164702-1ef97452-fd82e502-5ea6806a": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "af474c68-0fb2d552-26f4cb34-74f1c5d1-8ade5ca4": [ + "Lung Lesion", + "Pleural Effusion" + ], + "c5e42130-348838fa-de1e5517-65edefb9-a57952c4": [ + "Lung Opacity" + ], + "59b5b5e5-634c07ed-17d92c27-463e06df-2f15f98a": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "6f8c8386-c00f970e-7ffd5cbb-1c5c050c-802c2c88": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "76397f30-d006d063-4a74816b-c9a7771f-091df4d9": [ + "Cardiomegaly", + "Lung Opacity", + "Consolidation" + ], + "fc6b9e45-ff6ee9f1-19c02f10-9d729ec8-efe70be6": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "f0fefa76-d34f1995-4d6ab311-59a4186b-11142bb7": [], + "f51f8fb4-e8a08675-4ebd7d90-deaa4b73-bfbd51e5": [ + "Cardiomegaly" + ], + "f72a9857-c7f18038-73f34ab0-7f977374-d544ac69": [ + "Cardiomegaly" + ], + "2699223e-a2cb7790-18bf0c76-76c3652e-4e0989c7": [ + "Cardiomegaly", + "Edema" + ], + "2b07a6ee-51d37168-a67a3218-d5454eee-2a3dbae5": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "d0656529-d4148e4d-645f1099-b131dec9-41324e42": [ + "Cardiomegaly" + ], + "eed7debf-292679cb-a89b7580-25336d55-4e0d77ef": [ + "Cardiomegaly", + "Edema" + ], + "0469019a-6cd3631d-c792015d-a2891105-1e527c1a": [ + "Cardiomegaly" + ], + "f1b9387f-6abbc55f-e58e81c6-62aebe62-f030ef73": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis" + ], + "0c088f46-a898f4d0-f2c3ebaf-d0ebdf2f-26b6a95e": [ + "Cardiomegaly" + ], + "5370ba78-40e007c3-900db6e0-8e30a136-c8d87452": [ + "Cardiomegaly", + "Lung Opacity" + ], + "dcda9207-1934e86d-ee932544-116c6360-2c689e4d": [ + "Cardiomegaly" + ], + "f9336862-6f5ba32d-3b88ebe0-2e1469ca-0e802f47": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "5d6c57bc-d3142da8-3564fd8f-d31a2032-4720945c": [ + "No Finding" + ], + "87596a09-0a0d5ff2-883ad32d-b20af4df-b2e35d87": [ + "No Finding" + ], + "01ac23e4-2e8ff6db-5c62d77f-fd15e7d9-9850b8c5": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "86b05031-1d3b89d5-e0df14ec-91725abd-d7efe570": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "cb6c796c-9671f70e-c1a3ebb2-cc1a326b-ed83cfa1": [ + "Cardiomegaly", + "Atelectasis", + "Pneumothorax", + "Pleural Effusion", + "Support Devices" + ], + "7add735d-68204a28-3c833b2f-90d5f57f-3055ca58": [ + "Fracture" + ], + "c89ccc41-96dc86b4-1bc72c5c-42c36213-914fde11": [ + "Cardiomegaly" + ], + "06ca01c5-996b76a3-a56826bd-06fecf32-4a6279f9": [ + "Cardiomegaly" + ], + "2c8f15e6-d3fed417-e5c8efc5-20074fce-ef925ffa": [ + "Support Devices" + ], + "f3768928-d3c65e66-107aa29a-3ced465b-6ab722d4": [ + "Cardiomegaly" + ], + "28a5d454-4f6e8afe-c96281bb-c685dc86-984117dc": [ + "No Finding" + ], + "72335c83-f8df103c-90862052-8739001b-b46dd5c7": [ + "No Finding" + ], + "42d1d942-0aefbde6-c54835e3-15294715-8113041e": [], + "7fc62039-7d07c76e-bed2b1d5-5c06a0b3-c6684d07": [ + "Cardiomegaly", + "Pleural Effusion" + ], + "3694d980-dfbab221-6c09fb9f-436a7848-8fc1c1f9": [ + "Fracture" + ], + "51ccd2f2-81bd59a9-10d57832-76910dd4-9757fbf3": [ + "Pleural Effusion" + ], + "61ed2e08-84121124-35df49c3-878c724d-9e148da6": [ + "Lung Opacity", + "Atelectasis" + ], + "ca35468b-f8c1177c-cb354cc1-79281df8-b354b74d": [ + "Enlarged Cardiomediastinum" + ], + "83dd9edd-80c04183-0af2e87e-2ce059ea-1fe0f5e8": [], + "d991387d-c47df4dc-71e59cb0-adf1a788-5c14659b": [], + "20d9383c-3fa80c3c-94218c7f-15020bd1-e47ed769": [ + "Lung Opacity", + "Atelectasis", + "Support Devices" + ], + "ae4d45fc-815b6cd8-d29c078f-ad849410-cbb8cf47": [ + "Atelectasis", + "Support Devices" + ], + "9f997d60-cf0331fe-18c6ed7f-d56768f9-1fac8323": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "bcdccbea-2977c6e2-95eeb72a-3a7b6a89-ce41591a": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "e3bf86d4-2c188caf-80a8b447-d21fd5c8-83251226": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "d6b8c37f-5e300c14-2ef5df39-9a6aaed8-96b5e681": [ + "Lung Opacity", + "Atelectasis" + ], + "ed33263a-e35f6636-9c2018a1-259dfa81-3022c5b4": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "a5ccbb4c-fe240b55-19cfa1a7-48bc782d-22e7841a": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "2e78cb74-aa445a3d-305c634a-4e443bfd-269aec7e": [ + "Lung Opacity", + "Pneumonia" + ], + "49fbba93-49346260-5c3cc7e9-ad087106-f84c1739": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "2fd3b5dd-8f83bf00-26fd8a2f-612c5262-968772c8": [ + "Atelectasis" + ], + "eee03001-19c73647-bfb514b6-dd1597b1-3379cbc6": [ + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "1a69741a-aa169990-9b05cf75-eb6c6d2e-46fef0ae": [ + "Lung Opacity", + "Pleural Effusion" + ], + "6136ff46-3dfea390-1639cd6f-50dc91c7-f1069f7b": [ + "Lung Opacity" + ], + "deb37379-032473c6-622ef262-94526850-6baecd52": [ + "Lung Opacity", + "Atelectasis" + ], + "f9e9f170-19e813d2-a7c0fbe9-2610a969-b3913c3c": [ + "Lung Opacity", + "Pneumonia" + ], + "6f50e12e-0dcd33c3-ae2d6fa8-24696640-f1e54f40": [ + "Lung Opacity", + "Lung Lesion", + "Consolidation", + "Pleural Effusion" + ], + "756771db-5805a998-08667cd8-f505ae42-22e2414b": [ + "Pleural Effusion" + ], + "6045dc58-d2828d46-c4119b31-d6945588-c87489d8": [ + "Lung Opacity", + "Atelectasis" + ], + "bf6eb378-707fd26c-5cd1b5e6-c5ded073-83c8bd46": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "f120c01c-111b4b69-2583a40d-de1f181d-72de42e0": [ + "Lung Opacity", + "Consolidation", + "Pneumonia" + ], + "98c8ef8a-af44f96c-04eb8005-a3977408-9c9fd5f2": [], + "daad30b9-976a0ab4-d4b667cf-38d005b1-ec3a483a": [], + "6c981cc4-bd356c27-7aefca93-0d0cbb87-f8d25f29": [ + "No Finding" + ], + "9113059a-7f7d2278-1cf93415-c8add273-78e36ba7": [], + "06b75236-ced07b2e-79c9e581-f467c788-1f9b791f": [ + "Lung Opacity", + "Atelectasis" + ], + "b44db4cf-00ed4571-ed3e3788-243f9191-7dbe505b": [ + "Cardiomegaly", + "Lung Opacity", + "Pleural Effusion" + ], + "01751cc7-4bb8333e-14073a53-1c074d9c-32d10cd5": [], + "59f5f47e-bd8f07fb-0a0cd227-04f336ca-695f4502": [ + "No Finding" + ], + "d13ad04b-c27e53cc-ff9b10b6-436d461b-1193ec8b": [ + "Lung Opacity", + "Consolidation" + ], + "64a79d58-bf2c5aca-fb7bf4f7-833548bf-24fa5543": [ + "Lung Opacity" + ], + "5a0fbb50-16fcbb3c-b43ab7db-64bdd2fa-0d3ba8ae": [ + "Lung Opacity" + ], + "c3ab7330-992f2893-ebd35a90-84ee8f64-3922a960": [ + "Lung Opacity", + "Pleural Other" + ], + "6f58b90c-095967a1-12f62c81-70614815-9208a903": [ + "Lung Opacity", + "Lung Lesion" + ], + "a910b094-06011b04-d15075aa-21b8d267-25f63219": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Fracture", + "Support Devices" + ], + "96f87f7a-986127ad-254bbe00-6092f98c-b455bf5e": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Other" + ], + "cd719187-aac4497a-487e9373-f862d5a4-63a1c6b1": [ + "Lung Opacity", + "Lung Lesion" + ], + "ce99e222-d9e46e7e-1597d8a2-8da6576e-39759136": [ + "Lung Opacity" + ], + "83e5f26d-15cf2429-72ba60ba-801c754d-2a8d1fbc": [ + "Lung Opacity" + ], + "3ae34505-09ffb124-9c5fe036-82b07f1e-8705cb06": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "619e7a1b-911eac64-eb4b724e-a0b08550-9ed1342b": [ + "Lung Opacity", + "Lung Lesion" + ], + "76d88971-1492bc74-4a00303b-111fa19f-a617a23b": [ + "Lung Opacity" + ], + "c278f0af-bf6b18eb-2e0a01ad-3d3a4fbd-68d440cc": [ + "Lung Opacity", + "Lung Lesion" + ], + "d6578a26-c6384eff-9c8f4ab6-bfb13557-27002f4f": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion", + "Pleural Other" + ], + "e4532f81-d73cf78d-6747f5f7-f662d37a-93adfab2": [ + "Lung Opacity", + "Lung Lesion" + ], + "e795300e-988f4a20-2e6a36c2-86804f01-da329264": [ + "Lung Opacity", + "Lung Lesion" + ], + "d25bbe23-d111ed9c-d5ff0630-42378992-62fb128c": [ + "Lung Opacity", + "Lung Lesion" + ], + "eca38af0-486cb1f9-a049b2a7-9013ebc3-46eb8b84": [ + "Lung Opacity", + "Pleural Other" + ], + "37230aa4-c435f397-efca09f0-e71f6a7f-ccd59a4a": [ + "Lung Opacity", + "Pleural Effusion", + "Support Devices" + ], + "3b855f21-6bd34ead-a839a055-cfb4b29a-2a914e01": [ + "Lung Opacity" + ], + "feaef4bc-9543453e-5299332e-ba1069aa-f1907e03": [ + "Lung Opacity", + "Support Devices" + ], + "5a9c035a-33267a29-76c4b71b-04e91d63-e786f0ab": [ + "Lung Opacity", + "Fracture" + ], + "17563248-b5619d12-71d589df-57facf81-8d6a38bc": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "731ab0b4-e2d74d1d-aa17c85c-e9b48928-13109378": [ + "Lung Opacity", + "Lung Lesion", + "Pleural Effusion" + ], + "4c21d27a-14b093bd-9c833943-ccdfb838-1b72eec0": [ + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "861e6fd8-db9763b1-684e5bf9-a814a02e-e28cca70": [ + "Atelectasis", + "Support Devices" + ], + "da330caa-eaa7ebe9-4d1535ac-17f87653-e729c518": [ + "Cardiomegaly", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "4ac43164-3a114bed-4f423e11-4ccf1fe2-6d812258": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "641c0bab-e8835ec0-a9953bda-359a9381-a8bc717a": [ + "Lung Opacity", + "Support Devices" + ], + "98193ad7-dbc88094-a70d5ba9-b8efd531-1b352bbd": [ + "Lung Opacity", + "Support Devices" + ], + "4a8a8e66-03b9b039-c4231b00-c940972e-629116b0": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "4f168bc8-3e6328a5-313a3636-4e952ac6-a0ae095f": [ + "Lung Opacity", + "Fracture", + "Support Devices" + ], + "dbdfd86e-301abe12-26cc5618-de3c4b67-18d1034a": [ + "Lung Opacity", + "Lung Lesion", + "Support Devices" + ], + "1b308ded-6c895775-949f5d75-5be20754-a244cd15": [ + "No Finding" + ], + "a229d223-937a556a-7a395dbc-951be366-22d9e940": [ + "No Finding" + ], + "09f3187d-571caa0b-ba2aac9b-7463cf3a-9363fdbd": [ + "No Finding" + ], + "41b522c9-b2e2ce5a-20906bff-2a201af6-3c93fe87": [ + "No Finding" + ], + "013d509d-3aabeff2-5f8a03ca-0fa9071b-9475198d": [], + "fdafa989-14d5d94d-091f7100-328c5f82-033331a3": [], + "278ef848-f481280c-dc9c5c10-bbaaf9d2-37100e82": [ + "Enlarged Cardiomediastinum", + "Support Devices" + ], + "3f2efd86-6d2f7dd3-13733c06-96512585-461537e4": [ + "Pleural Other" + ], + "a0bbefae-b9205d65-6b6f009e-7a4bda2b-72871e9b": [ + "Lung Lesion", + "Pleural Effusion" + ], + "ee219be2-16844050-a207fdc4-7f70a5dc-3ef6179a": [ + "Lung Opacity", + "Lung Lesion", + "Atelectasis" + ], + "5bc72e62-d13ce48e-973d3718-f77cecda-15dfa9ff": [ + "Fracture", + "Support Devices" + ], + "98b0f854-2f8c7b87-0750ac8e-5001cfd3-4449e97b": [ + "Enlarged Cardiomediastinum" + ], + "33a787a4-d8a1118d-91a5f881-45808cfe-24723889": [ + "Lung Opacity" + ], + "a38ab00a-694908eb-0e3cac94-ff0635c9-41d52d82": [ + "Pleural Other" + ], + "48dab47e-3cb83d67-35673a0a-37fba33f-80d39c82": [ + "No Finding" + ], + "cfad9518-e9155e36-b7ddfe25-0756fe5d-a11405f1": [ + "No Finding" + ], + "0e19c90a-56616e62-58e69f3d-49b1cc24-9969f3c9": [ + "No Finding" + ], + "1abba9e2-b59f090a-f83d8ef2-43c94615-46bfa1cf": [ + "No Finding" + ], + "210b09cc-67e7effb-4dfa1ad4-b1d752d3-6bbe7b9a": [], + "368b10d5-a6b2a4df-6c666650-9ac0ca7f-d2ddd60b": [], + "c72e02f0-f6fddd10-c238dc43-3bc253ad-d86b0f72": [ + "No Finding" + ], + "a38d0d66-d35eeff5-9125eeec-4096449c-36390916": [], + "b2cbf182-9d259151-0bab637e-69dece8f-be889649": [], + "3525fe58-2ac660b2-9fe7511f-d9bc87f2-4e4514d4": [], + "4a9c54a9-b2e611eb-c5682312-61c0f546-64baeb2f": [ + "Atelectasis" + ], + "cb99dab1-a1f4878e-3675f453-2ede08f3-11caa34b": [ + "Cardiomegaly", + "Lung Opacity", + "Atelectasis", + "Pleural Effusion" + ], + "f5ff8576-31d96895-75ed689c-6b8204ea-fb3fd185": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "9878db3c-76b9d4df-5665d4e6-1cfd1b57-819c2daf": [ + "Cardiomegaly" + ], + "cab91100-869be9c1-4ef96250-cdb5c05c-ae3b4929": [ + "Lung Opacity" + ], + "7dce175c-b95f02b0-2613e6b8-bca4b708-c38779b2": [ + "Cardiomegaly", + "Lung Opacity" + ], + "8d820a74-b9dda1a1-5dd650e4-e7836290-49aa1493": [ + "Cardiomegaly" + ], + "ed75f13d-51f62718-7271bf99-9086d33c-c72f7f23": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "31c50e15-4a244cac-11d33a37-6e57019b-63c5858f": [ + "Cardiomegaly", + "Support Devices" + ], + "b5ff5541-31d765d8-cd2e6649-54d1b9d4-8fffaebf": [ + "Cardiomegaly", + "Support Devices" + ], + "ffa3942d-8bd6dde2-202b09c9-c4a8018d-cd3be89c": [], + "9f54785a-de190a20-dd1426ac-421ae5c7-cbfa9021": [ + "Support Devices" + ], + "e58282c4-fc8a5bed-aab4317b-f3dff9c8-40e5c04c": [ + "Cardiomegaly", + "Edema", + "Support Devices" + ], + "3b0258a9-d464c242-49cebbd6-2b55cfa3-be74740b": [], + "ad6d1465-2d48c76e-d3452db0-f0146bfd-54f5fdad": [], + "4ebe2c0c-2050b7f6-43722c9e-600d983c-63487359": [], + "ba261ef0-ec69edf5-01acf3b6-2e2adfc8-261d8e8b": [], + "64647c0c-e9b324f5-de4e864d-0dede615-1c4d854a": [], + "bddc330b-a7c41bb2-65f9d43f-8fb16762-4baaae99": [], + "02b4c25f-5d1b8bd0-38c29e2a-cd861d6f-92f7175b": [], + "2b2045ee-2505fd4b-e315a4e9-db4d3805-1b2ec185": [], + "3c46dc4f-b658b25f-8697ada5-6ef38005-825d9235": [ + "Cardiomegaly" + ], + "5200e5f8-3431aa0b-4687f1fc-8dfbaa5d-7e230488": [], + "a4fb4d63-a48fc7f0-fce5fdee-044f6290-6963a261": [ + "Atelectasis" + ], + "48548736-8e298f5f-e35f834e-eb62c604-3202d283": [ + "No Finding" + ], + "ac477135-251864c0-948b84f6-f4ef7865-3c754d7f": [ + "No Finding" + ], + "0388a4e4-5544bc1e-ab9208b5-f0c1e3dc-a97b6805": [ + "No Finding" + ], + "efb2c222-0fe78b2f-2bd67556-d10e01d8-72e87669": [ + "No Finding" + ], + "8edeaeb8-f9b613cc-f2ca6d82-b59942a8-ad118a88": [ + "Lung Opacity" + ], + "af3bd66e-b12a61bb-31b04389-8bfe9264-e50eef1b": [ + "Lung Opacity", + "Atelectasis" + ], + "b7960017-16d0bbad-e649c8e5-e9a4bd36-8409151f": [ + "Lung Opacity" + ], + "bbff4e3f-5c4c00dd-c356f902-530cb15d-9e6663a9": [ + "Lung Opacity", + "Atelectasis" + ], + "46a6d930-2fc44fe5-967f3273-a3e6d81d-3e4f74a0": [ + "Cardiomegaly", + "Atelectasis" + ], + "f615e0cd-8708c9de-4c3c409c-61733455-21d87814": [], + "2eccb67e-a8677000-bc5af537-c58f2e49-f4234ef1": [ + "Cardiomegaly", + "Support Devices" + ], + "837f34fb-f3caa2c0-91f85420-2a52db56-db213e08": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "ea288c46-b57777bf-b5b617cc-c21e01ab-f7a752af": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "c5157006-1a73eeaf-efe1fd1c-7c18314b-7183f206": [ + "Cardiomegaly" + ], + "6f9b4419-458e6f28-c82d6907-73e32753-6c0c1e05": [ + "Cardiomegaly", + "Atelectasis" + ], + "1327d6d9-b54a5a1f-c126df8c-46566e82-77ff57e9": [], + "1834a247-2913b335-13a0d5d6-a20329be-26d3a2bd": [ + "Cardiomegaly" + ], + "84f45a41-bb20a8f4-788c0893-ebfc60e0-d1a50ed2": [], + "8c1f9b73-cfb72331-df480911-a6810f9a-a3fcbcb9": [ + "Cardiomegaly" + ], + "8f8cbeb4-efe89885-f7a908dd-db2511d9-f36a3d86": [], + "3d798d0a-869fac09-5939ab06-011a871f-2f43260b": [ + "Cardiomegaly" + ], + "dc232a2f-f3e99d0f-a4433b11-fcccd1c7-334c161d": [ + "Cardiomegaly", + "Lung Opacity", + "Edema" + ], + "2a46f86f-aa12bf29-81681d7d-afb9c9d8-23629fe0": [ + "Lung Opacity", + "Atelectasis" + ], + "8c0f4b76-084be26f-d4273e90-5966adf2-f9cd14ab": [ + "No Finding" + ], + "b0cda8a3-ddffb15c-e8d7fdb8-00fbf9fa-a5b1a60d": [ + "No Finding" + ], + "e8b2aa8e-420f069d-51dc7f6f-2c778b27-c505a888": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "8f092636-8655ebb5-82f5c8a4-ac96ebaf-b108319a": [ + "Cardiomegaly", + "Atelectasis", + "Support Devices" + ], + "f0010041-d406dbbd-d9464b06-f9af94a5-748d7c5f": [ + "Support Devices" + ], + "0b1eec92-74e6469a-5e6bd20f-889cc052-152a9dbd": [ + "Cardiomegaly", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "174d1efe-f7714d0c-f1f99de2-c6e25477-48635320": [ + "Cardiomegaly", + "Support Devices" + ], + "a03600e3-6f4ea6f0-c413be5b-1dade32a-4447a53f": [ + "No Finding" + ], + "f20a3da2-92bbfeba-479bee91-b6741a0b-352803fa": [ + "No Finding" + ], + "ed3ea821-d5846c32-5f18d81a-657f73d8-472d55eb": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "fd85d68f-eb20917f-47c20d2b-ecd0f4e7-2bdee415": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "eac34627-0d789691-739a8249-d2bf5f3c-c4240547": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "7302c211-bcfb3845-18039b6f-551fc6f1-549ee247": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Pleural Effusion" + ], + "7836bdb5-cf4a3248-ef755485-efddc4f8-838caea7": [ + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion", + "Support Devices" + ], + "d29ffb8c-6bafdbb6-7063db30-f4646365-4f9eae6e": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "e174e22d-517ea52f-b085dd2a-be0e9ea0-7d59e8de": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "3435ed46-ac4d2fc9-701d2553-97322bab-a7090480": [ + "Lung Opacity", + "Edema", + "Support Devices" + ], + "8027d184-a9e2e118-bcdce505-fcbd9f09-34dd5c61": [ + "Lung Opacity", + "Edema", + "Pleural Effusion", + "Support Devices" + ], + "94d1cb3d-d73778f9-54fd1b3c-a3db8e00-ac37feda": [ + "No Finding" + ], + "b4ae0cda-2cd5c157-6145e13b-4f90cb33-2a458516": [ + "No Finding" + ], + "499b08f0-eadc74b7-e72cbb9c-48acb229-95d39e5f": [ + "No Finding" + ], + "fb7104eb-06978e11-1a4eaa5a-83848428-dcc8d180": [ + "No Finding" + ], + "35fe6db8-9b1e2b47-acbac4cf-7c7be2b0-4e63a836": [ + "No Finding" + ], + "7fbb1cce-8dd0a953-1266b08a-dbb89115-121dff79": [ + "No Finding" + ], + "28711812-b5fa575d-30520ea7-5add8dca-a49239fe": [], + "9d752539-c8aeb9f8-049a169c-1605c54e-90634c71": [ + "No Finding" + ], + "937ff0e8-71a2ffe2-83753442-7400aa5e-eceef12c": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Atelectasis", + "Pleural Effusion" + ], + "7d918df3-b51f08b1-b7c9a415-2be08ec7-a1b1bd81": [], + "a9e13b36-9f15b5ec-c6da8ece-3f40651b-6efa91f1": [ + "No Finding" + ], + "fc82e711-14ed01dc-ce2a326a-162251e4-aee54953": [ + "Cardiomegaly", + "Lung Opacity", + "Edema", + "Support Devices" + ], + "943f96be-7c33efa1-3665b82f-60d8f305-a6ed2d9d": [ + "Cardiomegaly" + ], + "b66f1c8b-6c12fd80-d9b69793-f7db8cd1-92ac8637": [ + "Lung Opacity" + ], + "dbd9097b-81b68048-faf162d2-5ecda5ea-5d893d73": [ + "Lung Opacity", + "Pleural Other" + ], + "1fc7bf88-79d4deaf-2efe8540-6361e421-37a2c6fa": [ + "Lung Opacity" + ], + "4e9a15d6-c451210c-9add77c8-20371722-8023beef": [ + "Lung Opacity" + ], + "6895d4bc-d096ea6d-b0c6fcba-6b5fe802-4ce2705e": [ + "Lung Opacity", + "Pleural Other" + ], + "a8db31e4-f0fa9118-7b9e02ea-16072096-503550a0": [ + "Cardiomegaly", + "Lung Opacity" + ], + "16664421-34328b5d-6c0d94e2-71285361-4233fb85": [ + "Lung Opacity" + ], + "61b2e5b3-5192e298-d28244ef-a46613e7-13ff9c2e": [ + "Lung Opacity", + "Lung Lesion" + ] +} \ No newline at end of file diff --git a/model/adapter_config.json b/model/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..b64b9e4b01fe9d87f5411622b728ca7ca735b960 --- /dev/null +++ b/model/adapter_config.json @@ -0,0 +1,26 @@ +{ + "auto_mapping": null, + "base_model_name_or_path": "liuhaotian/llava-v1.5-7b", + "bias": "none", + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layers_pattern": null, + "layers_to_transform": null, + "lora_alpha": 256, + "lora_dropout": 0.05, + "modules_to_save": null, + "peft_type": "LORA", + "r": 128, + "revision": null, + "target_modules": [ + "gate_proj", + "v_proj", + "o_proj", + "k_proj", + "down_proj", + "up_proj", + "q_proj" + ], + "task_type": "CAUSAL_LM" +} \ No newline at end of file diff --git a/model/adapter_model.bin b/model/adapter_model.bin new file mode 100644 index 0000000000000000000000000000000000000000..ddc18faf31806ef9005448363001de805f7102fc --- /dev/null +++ b/model/adapter_model.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b32d7e840da9183239ba84cb6e87882977a1ab674ecacc22a260374c7dd8a03 +size 639786637 diff --git a/model/config.json b/model/config.json new file mode 100644 index 0000000000000000000000000000000000000000..d6b197e86fbb541bd849ea6b9951763db3861ab1 --- /dev/null +++ b/model/config.json @@ -0,0 +1,46 @@ +{ + "_name_or_path": "liuhaotian/llava-v1.5-7b", + "architectures": [ + "LlavaLlamaForCausalLM" + ], + "bos_token_id": 1, + "eos_token_id": 2, + "freeze_mm_mlp_adapter": false, + "freeze_mm_vision_resampler": false, + "hidden_act": "silu", + "hidden_size": 4096, + "image_aspect_ratio": "pad", + "initializer_range": 0.02, + "intermediate_size": 11008, + "max_length": 4096, + "max_position_embeddings": 4096, + "mm_hidden_size": 512, + "mm_projector_lr": 2e-05, + "mm_projector_type": "mlp2x_gelu", + "mm_resampler_type": null, + "mm_use_im_patch_token": false, + "mm_use_im_start_end": false, + "mm_vision_select_feature": "patch", + "mm_vision_select_layer": -2, + "mm_vision_tower": "biovil", + "model_type": "llava", + "mv_type": "concat", + "num_attention_heads": 32, + "num_hidden_layers": 32, + "num_key_value_heads": 32, + "pad_token_id": 0, + "pretraining_tp": 1, + "rms_norm_eps": 1e-05, + "rope_scaling": null, + "tie_word_embeddings": false, + "tokenizer_model_max_length": 1300, + "tokenizer_padding_side": "right", + "torch_dtype": "float16", + "transformers_version": "4.31.0", + "tune_mm_mlp_adapter": false, + "tune_mm_vision_resampler": false, + "unfreeze_mm_vision_tower": false, + "use_cache": false, + "use_mm_proj": true, + "vocab_size": 32000 +} diff --git a/model/non_lora_trainables.bin b/model/non_lora_trainables.bin new file mode 100644 index 0000000000000000000000000000000000000000..be49381acab355b79675d1910993444ebb39caab --- /dev/null +++ b/model/non_lora_trainables.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:900f4fed265ec394a618f3e8ba074cc023c7dc68063d0f3b39badffca93a8fde +size 159955795 diff --git a/simple_test.py b/simple_test.py new file mode 100644 index 0000000000000000000000000000000000000000..113a456ce60db88c3ee82eef113e36198ef2f589 --- /dev/null +++ b/simple_test.py @@ -0,0 +1,89 @@ +from skimage import io as io_img +import io + +import requests +import torch +from PIL import Image +import numpy as np + +from LLAVA_Biovil.llava.mm_utils import tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria, remap_to_uint8 +from LLAVA_Biovil.llava.model.builder import load_pretrained_model +from LLAVA_Biovil.llava.conversation import SeparatorStyle, conv_vicuna_v1 + +from LLAVA_Biovil.llava.constants import IMAGE_TOKEN_INDEX +from utils import create_chest_xray_transform_for_inference + + + +if __name__ == '__main__': + config = None + model_path = "/home/guests/chantal_pellegrini/RaDialog_LLaVA/LLAVA/checkpoints/llava-v1.5-7b-task-lora_radialog_instruct_llava_biovil_unfrozen_2e-5_5epochs_v5/checkpoint-21000" #TODO hardcoded in huggingface repo probably + model_name = get_model_name_from_path(model_path) + tokenizer, model, image_processor, context_len = load_pretrained_model(model_path, model_base='liuhaotian/llava-v1.5-7b', + model_name=model_name, load_8bit=False, load_4bit=False) + model.config.tokenizer_padding_side = "left" + + findings = "edema, pleural effusion" #TODO should these come from chexpert classifier? Or not needed for this demo/test? + + conv = conv_vicuna_v1.copy() + REPORT_GEN_PROMPT = f". Predicted Findings: {findings}. You are to act as a radiologist and write the finding section of a chest x-ray radiology report for this X-ray image and the given predicted findings. Write in the style of a radiologist, write one fluent text without enumeration, be concise and don't provide explanations or reasons." + print("USER: ", REPORT_GEN_PROMPT) + conv.append_message("USER", REPORT_GEN_PROMPT) + conv.append_message("ASSISTANT", None) + text_input = conv.get_prompt() + + # get the image + vis_transforms_biovil = create_chest_xray_transform_for_inference(512, center_crop_size=448) + sample_img_path = "https://openi.nlm.nih.gov/imgs/512/10/10/CXR10_IM-0002-2001.png?keywords=Calcified%20Granuloma" #TODO find good image + + response = requests.get(sample_img_path) + image = Image.open(io.BytesIO(response.content)) + image = remap_to_uint8(np.array(image)) + image = Image.fromarray(image).convert("L") + image_tensor = vis_transforms_biovil(image).unsqueeze(0) + + image_tensor = image_tensor.to(model.device, dtype=torch.bfloat16) + input_ids = tokenizer_image_token(text_input, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).to(model.device) + + stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 + stopping_criteria = KeywordsStoppingCriteria([stop_str], tokenizer, input_ids) + + # generate a report + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=image_tensor, + do_sample=False, + use_cache=True, + max_new_tokens=300, + stopping_criteria=[stopping_criteria], + pad_token_id=tokenizer.pad_token_id + ) + + pred = tokenizer.decode(output_ids[0, input_ids.shape[1]:]).strip().replace("", "") + print("ASSISTANT: ", pred) + + # add prediction to conversation + conv.messages.pop() + conv.append_message("ASSISTANT", pred) + conv.append_message("USER", "Translate this report to easy language for a patient to understand.") + conv.append_message("ASSISTANT", None) + text_input = conv.get_prompt() + print("USER: ", "Translate this report to easy language for a patient to understand.") + + # generate easy language report + input_ids = tokenizer_image_token(text_input, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).to(model.device) + with torch.inference_mode(): + output_ids = model.generate( + input_ids, + images=image_tensor, + do_sample=False, + use_cache=True, + max_new_tokens=300, + stopping_criteria=[stopping_criteria], + pad_token_id=tokenizer.pad_token_id + ) + + pred = tokenizer.decode(output_ids[0, input_ids.shape[1]:]).strip().replace("", "") + print("ASSISTANT: ", pred) + diff --git a/simple_text.py b/simple_text.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/utils.py b/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..c44876b06b367d1254ad973fa683b67751690431 --- /dev/null +++ b/utils.py @@ -0,0 +1,62 @@ +import numpy as np +import torch +from torchvision.transforms import Compose, Resize, ToTensor, CenterCrop, transforms + +class ExpandChannels: + """ + Transforms an image with one channel to an image with three channels by copying + pixel intensities of the image along the 1st dimension. + """ + + def __call__(self, data: torch.Tensor) -> torch.Tensor: + """ + :param data: Tensor of shape [1, H, W]. + :return: Tensor with channel copied three times, shape [3, H, W]. + """ + if data.shape[0] != 1: + raise ValueError(f"Expected input of shape [1, H, W], found {data.shape}") + return torch.repeat_interleave(data, 3, dim=0) + +def create_chest_xray_transform_for_inference(resize: int, center_crop_size: int) -> Compose: + """ + Defines the image transformation pipeline for Chest-Xray datasets. + + :param resize: The size to resize the image to. Linear resampling is used. + Resizing is applied on the axis with smaller shape. + :param center_crop_size: The size to center crop the image to. Square crop is applied. + """ + + transforms = [Resize(resize), CenterCrop(center_crop_size), ToTensor(), ExpandChannels()] + return Compose(transforms) + +def remap_to_uint8(array: np.ndarray, percentiles=None) -> np.ndarray: + """Remap values in input so the output range is :math:`[0, 255]`. + + Percentiles can be used to specify the range of values to remap. + This is useful to discard outliers in the input data. + + :param array: Input array. + :param percentiles: Percentiles of the input values that will be mapped to ``0`` and ``255``. + Passing ``None`` is equivalent to using percentiles ``(0, 100)`` (but faster). + :returns: Array with ``0`` and ``255`` as minimum and maximum values. + """ + array = array.astype(float) + if percentiles is not None: + len_percentiles = len(percentiles) + if len_percentiles != 2: + message = ( + 'The value for percentiles should be a sequence of length 2,' + f' but has length {len_percentiles}' + ) + raise ValueError(message) + a, b = percentiles + if a >= b: + raise ValueError(f'Percentiles must be in ascending order, but a sequence "{percentiles}" was passed') + if a < 0 or b > 100: + raise ValueError(f'Percentiles must be in the range [0, 100], but a sequence "{percentiles}" was passed') + cutoff: np.ndarray = np.percentile(array, percentiles) + array = np.clip(array, *cutoff) + array -= array.min() + array /= array.max() + array *= 255 + return array.astype(np.uint8)