{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "t8BYG2CFF6wD" }, "source": [ "### Install libraries\n", "**Make sure to restart the Colab runtime after installation**\n", "\n", "Colab Menu -> Runtime -> Restart runtime" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "nUAkSVJ90DQs", "outputId": "7f3d4fdb-8cab-4269-d10f-0e03c6e882d1" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: open_clip_torch in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (2.20.0)\n", "Requirement already satisfied: transformers in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (4.29.2)\n", "Collecting matplotlib\n", " Using cached matplotlib-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)\n", "Requirement already satisfied: torchvision in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (0.15.2)\n", "Requirement already satisfied: regex in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (2023.5.5)\n", "Requirement already satisfied: huggingface-hub in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (0.14.1)\n", "Requirement already satisfied: timm in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (0.9.2)\n", "Requirement already satisfied: torch>=1.9.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (2.0.1)\n", "Requirement already satisfied: sentencepiece in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (0.1.99)\n", "Requirement already satisfied: protobuf<4 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (3.20.3)\n", "Requirement already satisfied: tqdm in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (4.65.0)\n", "Requirement already satisfied: ftfy in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch) (6.1.1)\n", "Requirement already satisfied: filelock in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers) (3.12.0)\n", "Requirement already satisfied: numpy>=1.17 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers) (1.24.3)\n", "Requirement already satisfied: pyyaml>=5.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers) (6.0)\n", "Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers) (0.13.3)\n", "Requirement already satisfied: requests in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers) (2.31.0)\n", "Requirement already satisfied: packaging>=20.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers) (23.1)\n", "Collecting pyparsing>=2.3.1\n", " Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)\n", "Collecting cycler>=0.10\n", " Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)\n", "Collecting kiwisolver>=1.0.1\n", " Using cached kiwisolver-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)\n", "Collecting fonttools>=4.22.0\n", " Using cached fonttools-4.39.4-py3-none-any.whl (1.0 MB)\n", "Requirement already satisfied: python-dateutil>=2.7 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (2.8.2)\n", "Collecting contourpy>=1.0.1\n", " Using cached contourpy-1.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (300 kB)\n", "Requirement already satisfied: pillow>=6.2.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (9.5.0)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from huggingface-hub->open_clip_torch) (4.6.2)\n", "Requirement already satisfied: fsspec in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from huggingface-hub->open_clip_torch) (2023.5.0)\n", "Requirement already satisfied: six>=1.5 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)\n", "Requirement already satisfied: nvidia-cusparse-cu11==11.7.4.91 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (11.7.4.91)\n", "Requirement already satisfied: networkx in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (3.1)\n", "Requirement already satisfied: sympy in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (1.12)\n", "Requirement already satisfied: nvidia-cufft-cu11==10.9.0.58 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (10.9.0.58)\n", "Requirement already satisfied: nvidia-curand-cu11==10.2.10.91 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (10.2.10.91)\n", "Requirement already satisfied: nvidia-nccl-cu11==2.14.3 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (2.14.3)\n", "Requirement already satisfied: nvidia-cuda-runtime-cu11==11.7.99 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (11.7.99)\n", "Requirement already satisfied: triton==2.0.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (2.0.0)\n", "Requirement already satisfied: nvidia-cublas-cu11==11.10.3.66 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (11.10.3.66)\n", "Requirement already satisfied: jinja2 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (3.1.2)\n", "Requirement already satisfied: nvidia-cudnn-cu11==8.5.0.96 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (8.5.0.96)\n", "Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (11.7.99)\n", "Requirement already satisfied: nvidia-cusolver-cu11==11.4.0.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (11.4.0.1)\n", "Requirement already satisfied: nvidia-cuda-cupti-cu11==11.7.101 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (11.7.101)\n", "Requirement already satisfied: nvidia-nvtx-cu11==11.7.91 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch) (11.7.91)\n", "Requirement already satisfied: setuptools in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.9.0->open_clip_torch) (67.8.0)\n", "Requirement already satisfied: wheel in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.9.0->open_clip_torch) (0.38.4)\n", "Requirement already satisfied: lit in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from triton==2.0.0->torch>=1.9.0->open_clip_torch) (16.0.5)\n", "Requirement already satisfied: cmake in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from triton==2.0.0->torch>=1.9.0->open_clip_torch) (3.26.3)\n", "Requirement already satisfied: wcwidth>=0.2.5 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from ftfy->open_clip_torch) (0.2.6)\n", "Requirement already satisfied: certifi>=2017.4.17 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers) (2023.5.7)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers) (2.0.2)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers) (3.1.0)\n", "Requirement already satisfied: idna<4,>=2.5 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers) (3.4)\n", "Requirement already satisfied: safetensors in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from timm->open_clip_torch) (0.3.1)\n", "Requirement already satisfied: MarkupSafe>=2.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from jinja2->torch>=1.9.0->open_clip_torch) (2.1.2)\n", "Requirement already satisfied: mpmath>=0.19 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from sympy->torch>=1.9.0->open_clip_torch) (1.3.0)\n", "Installing collected packages: pyparsing, kiwisolver, fonttools, cycler, contourpy, matplotlib\n", "Successfully installed contourpy-1.0.7 cycler-0.11.0 fonttools-4.39.4 kiwisolver-1.4.4 matplotlib-3.7.1 pyparsing-3.0.9\n" ] } ], "source": [ "!pip install open_clip_torch transformers matplotlib" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "kaOyeKkjqnri" }, "source": [ "## Load BiomedCLIP model" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "V8Yv9g_8EQ1W", "outputId": "3ec24c9b-4c4f-4c17-8d76-6cfd74bb8bdf" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Some weights of the model checkpoint at microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract were not used when initializing BertModel: ['cls.seq_relationship.weight', 'bert.pooler.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.decoder.weight', 'bert.pooler.dense.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.decoder.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.seq_relationship.bias']\n", "- This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n", "- This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n" ] } ], "source": [ "import open_clip\n", "\n", "model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224')\n", "tokenizer = open_clip.get_tokenizer('hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224')" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "bk0hm1R7qqU_" }, "source": [ "# Download sample images" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 67, "referenced_widgets": [ "692f8c386f9743a1a12f7d6c7959ca67", "3e0f188e73294f6ea4d1e28640cfdc22", "b754e18c5c49499d92db4803cfa426b7", "6743cbc5ca2c47e7be565e0d6cd933c9", "02aa2c49f2a94a7eb48794ed783c93e8", "ad84c0ed082d4ab7abf2815fc1910efa", "87a18840cc2c45ac824e8fe3d83d5150", "0b3b4fc0e99a47d0a494aee20166337f", "2de24c12eebd4054a3e6163fb6951986", "1c9af9a39e594c689590d09ae71baeb3", "182cc15b918a45d081543a6b3f182a07" ] }, "id": "qqafKW1kqgc4", "outputId": "34c29f78-32c5-4a6f-914e-30e8a07840a6" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Fetching 20 files: 100%|██████████| 20/20 [00:00<00:00, 49.98it/s]\n" ] }, { "data": { "text/plain": [ "'/home/shezhan/sheng/repos/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224/biomed-clip-share'" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from huggingface_hub import snapshot_download\n", "snapshot_download(\"microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224\", local_dir=\"biomed-clip-share\")" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "4WOxBdKr0e_m", "outputId": "2a05beae-6f5f-4c3c-ef59-b23210b6e1b5" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "LICENSE.md\t\t example_data\t\t\ttokenizer.json\n", "README.md\t\t open_clip_config.json\ttokenizer_config.json\n", "biomed-vlp-eval.svg\t open_clip_pytorch_model.bin\tvocab.txt\n", "biomed_clip_example.ipynb special_tokens_map.json\n" ] } ], "source": [ "!ls biomed-clip-share" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "_11A5zFuGfkG" }, "source": [ "### Example: Zero-shot classifications" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "XSJw7Qpm1w-f", "outputId": "c8e69acc-09a6-41ac-a719-e0c2016e41d8" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "brain_MRI.jpg:\n", "brain MRI: 0.9566618204116821\n", "hematoxylin and eosin histopathology: 0.04133963584899902\n", "immunohistochemistry histopathology: 0.0019414774142205715\n", "pie chart: 2.7130759917781688e-05\n", "squamous cell carcinoma histopathology: 1.0197230039921124e-05\n", "bone X-ray: 8.65362562763039e-06\n", "chest X-ray: 7.961700248415582e-06\n", "adenocarcinoma histopathology: 2.764628106888267e-06\n", "covid line chart: 3.419521306113893e-07\n", "\n", "\n", "H_and_E_histopathology.jpg:\n", "hematoxylin and eosin histopathology: 0.7936634421348572\n", "immunohistochemistry histopathology: 0.19959308207035065\n", "chest X-ray: 0.005850683432072401\n", "bone X-ray: 0.0007930432911962271\n", "adenocarcinoma histopathology: 9.489018702879548e-05\n", "squamous cell carcinoma histopathology: 3.7732058899564436e-06\n", "brain MRI: 6.51921311600745e-07\n", "pie chart: 4.1540644701854035e-07\n", "covid line chart: 2.899674100831362e-08\n", "\n", "\n", "pie_chart.png:\n", "pie chart: 0.999992847442627\n", "covid line chart: 6.0871166169818025e-06\n", "brain MRI: 6.219769375093165e-07\n", "bone X-ray: 1.8695591563755443e-07\n", "chest X-ray: 1.4341613052692992e-07\n", "immunohistochemistry histopathology: 7.412729985389888e-08\n", "hematoxylin and eosin histopathology: 1.3409663601748889e-08\n", "adenocarcinoma histopathology: 7.725987849482863e-09\n", "squamous cell carcinoma histopathology: 4.545323672999757e-09\n", "\n", "\n", "adenocarcinoma_histopathology.jpg:\n", "adenocarcinoma histopathology: 0.78194659948349\n", "hematoxylin and eosin histopathology: 0.15511929988861084\n", "immunohistochemistry histopathology: 0.061492953449487686\n", "squamous cell carcinoma histopathology: 0.0014178308192640543\n", "chest X-ray: 2.0158839106443338e-05\n", "brain MRI: 1.2191155747132143e-06\n", "pie chart: 7.927876595203998e-07\n", "bone X-ray: 7.435741053996026e-07\n", "covid line chart: 4.4748358618562634e-07\n", "\n", "\n", "squamous_cell_carcinoma_histopathology.jpeg:\n", "squamous cell carcinoma histopathology: 0.9574313163757324\n", "adenocarcinoma histopathology: 0.0422009639441967\n", "hematoxylin and eosin histopathology: 0.00031557210604660213\n", "immunohistochemistry histopathology: 5.21704314451199e-05\n", "chest X-ray: 1.2092701950905393e-08\n", "pie chart: 3.8480876818347554e-10\n", "bone X-ray: 2.5390878288789054e-10\n", "brain MRI: 1.331495469436561e-10\n", "covid line chart: 1.8012779852763505e-12\n", "\n", "\n", "IHC_histopathology.jpg:\n", "immunohistochemistry histopathology: 0.949108362197876\n", "hematoxylin and eosin histopathology: 0.028994282707571983\n", "brain MRI: 0.021489139646291733\n", "adenocarcinoma histopathology: 0.0002992998342961073\n", "bone X-ray: 4.385617285151966e-05\n", "squamous cell carcinoma histopathology: 2.6255962438881397e-05\n", "covid line chart: 1.6582516764174215e-05\n", "chest X-ray: 1.2062851965310983e-05\n", "pie chart: 1.008737126539927e-05\n", "\n", "\n", "covid_line_chart.png:\n", "covid line chart: 0.9494987726211548\n", "adenocarcinoma histopathology: 0.018954863771796227\n", "squamous cell carcinoma histopathology: 0.017424575984477997\n", "immunohistochemistry histopathology: 0.006776778027415276\n", "hematoxylin and eosin histopathology: 0.0034122152719646692\n", "brain MRI: 0.0026227112393826246\n", "chest X-ray: 0.0010058172047138214\n", "bone X-ray: 0.00024727507843635976\n", "pie chart: 5.7072669733315706e-05\n", "\n", "\n", "bone_X-ray.jpg:\n", "bone X-ray: 0.9061343669891357\n", "hematoxylin and eosin histopathology: 0.0706544890999794\n", "brain MRI: 0.013412924483418465\n", "chest X-ray: 0.008189201354980469\n", "immunohistochemistry histopathology: 0.001593832392245531\n", "squamous cell carcinoma histopathology: 1.373268423776608e-05\n", "covid line chart: 1.0781039918583701e-06\n", "adenocarcinoma histopathology: 2.3308345475925307e-07\n", "pie chart: 9.174998183425487e-08\n", "\n", "\n", "chest_X-ray.jpg:\n", "chest X-ray: 0.9998348951339722\n", "hematoxylin and eosin histopathology: 0.00012049824727000669\n", "bone X-ray: 4.1031416913028806e-05\n", "immunohistochemistry histopathology: 1.0475590670466772e-06\n", "adenocarcinoma histopathology: 9.691480045148637e-07\n", "covid line chart: 9.493503512203461e-07\n", "brain MRI: 3.2328307497664355e-07\n", "squamous cell carcinoma histopathology: 2.543015966693929e-07\n", "pie chart: 3.68903418923594e-09\n", "\n", "\n" ] } ], "source": [ "import glob\n", "from collections import OrderedDict\n", "\n", "import torch\n", "from PIL import Image\n", "import open_clip\n", "\n", "dataset_path = 'biomed-clip-share/example_data/biomed_image_classification_example_data'\n", "template = 'this is a photo of '\n", "labels = [\n", " 'adenocarcinoma histopathology',\n", " 'brain MRI',\n", " 'covid line chart',\n", " 'squamous cell carcinoma histopathology',\n", " 'immunohistochemistry histopathology',\n", " 'bone X-ray',\n", " 'chest X-ray',\n", " 'pie chart',\n", " 'hematoxylin and eosin histopathology'\n", "]\n", "\n", "test_imgs = glob.glob(dataset_path + '/*')\n", "\n", "device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')\n", "model.to(device)\n", "model.eval()\n", "\n", "context_length = 256\n", "\n", "images = torch.stack([preprocess_val(Image.open(img)) for img in test_imgs]).to(device)\n", "texts = tokenizer([template + l for l in labels], context_length=context_length).to(device)\n", "with torch.no_grad():\n", " image_features, text_features, logit_scale = model(images, texts)\n", "\n", " logits = (logit_scale * image_features @ text_features.t()).detach().softmax(dim=-1)\n", " sorted_indices = torch.argsort(logits, dim=-1, descending=True)\n", "\n", " logits = logits.cpu().numpy()\n", " sorted_indices = sorted_indices.cpu().numpy()\n", "\n", "top_k = -1\n", "\n", "for i, img in enumerate(test_imgs):\n", " pred = labels[sorted_indices[i][0]]\n", "\n", " top_k = len(labels) if top_k == -1 else top_k\n", " print(img.split('/')[-1] + ':')\n", " for j in range(top_k):\n", " jth_index = sorted_indices[i][j]\n", " print(f'{labels[jth_index]}: {logits[i][jth_index]}')\n", " print('\\n')" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "kIZEaLJB5H6A" }, "source": [ "
\n", "adenocarcinoma_histopathology.jpg:\n", "adenocarcinoma histopathology: 0.7818863987922668\n", "hematoxylin and eosin histopathology: 0.15517690777778625\n", "immunohistochemistry histopathology: 0.06149514392018318\n", "squamous cell carcinoma histopathology: 0.0014182085869833827\n", "chest X-ray: 2.017213228100445e-05\n", "brain MRI: 1.2181524198240368e-06\n", "pie chart: 7.932688959044754e-07\n", "bone X-ray: 7.436410101036017e-07\n", "covid line chart: 4.482610052036762e-07\n", "\n", "\n", "covid_line_chart.png:\n", "covid line chart: 0.9493210315704346\n", "adenocarcinoma histopathology: 0.01898195780813694\n", "squamous cell carcinoma histopathology: 0.0175501499325037\n", "immunohistochemistry histopathology: 0.006791787222027779\n", "hematoxylin and eosin histopathology: 0.003417333820834756\n", "brain MRI: 0.002629919210448861\n", "chest X-ray: 0.0010041205678135157\n", "bone X-ray: 0.00024685842799954116\n", "pie chart: 5.6812208640621975e-05\n", "\n", "\n", "bone_X-ray.jpg:\n", "bone X-ray: 0.9037961959838867\n", "hematoxylin and eosin histopathology: 0.07279316335916519\n", "brain MRI: 0.013534954749047756\n", "chest X-ray: 0.00821212213486433\n", "immunohistochemistry histopathology: 0.001647887285798788\n", "squamous cell carcinoma histopathology: 1.418814281350933e-05\n", "covid line chart: 1.1351590956110158e-06\n", "adenocarcinoma histopathology: 2.3802124360372545e-07\n", "pie chart: 9.433303205241828e-08\n", "\n", "\n", "pie_chart.png:\n", "pie chart: 0.999992847442627\n", "covid line chart: 6.056906840967713e-06\n", "brain MRI: 6.212158041307703e-07\n", "bone X-ray: 1.870277799298492e-07\n", "chest X-ray: 1.4315827456812258e-07\n", "immunohistochemistry histopathology: 7.397970591682679e-08\n", "hematoxylin and eosin histopathology: 1.3329795045535775e-08\n", "adenocarcinoma histopathology: 7.695367898463701e-09\n", "squamous cell carcinoma histopathology: 4.512833662317917e-09\n", "\n", "\n", "H_and_E_histopathology.jpg:\n", "hematoxylin and eosin histopathology: 0.7953251600265503\n", "immunohistochemistry histopathology: 0.19779996573925018\n", "chest X-ray: 0.005973907187581062\n", "bone X-ray: 0.0008049230673350394\n", "adenocarcinoma histopathology: 9.133991261478513e-05\n", "squamous cell carcinoma histopathology: 3.6423973597266013e-06\n", "brain MRI: 6.688684948130685e-07\n", "pie chart: 4.278819574210502e-07\n", "covid line chart: 3.051619401617245e-08\n", "\n", "\n", "brain_MRI.jpg:\n", "brain MRI: 0.9565795660018921\n", "hematoxylin and eosin histopathology: 0.041418157517910004\n", "immunohistochemistry histopathology: 0.0019450499676167965\n", "pie chart: 2.7151252652402036e-05\n", "squamous cell carcinoma histopathology: 1.0223812751064543e-05\n", "bone X-ray: 8.662499567435589e-06\n", "chest X-ray: 7.96773747424595e-06\n", "adenocarcinoma histopathology: 2.7692055937222904e-06\n", "covid line chart: 3.420084908611898e-07\n", "\n", "\n", "chest_X-ray.jpg:\n", "chest X-ray: 0.9998347759246826\n", "hematoxylin and eosin histopathology: 0.0001205605294671841\n", "bone X-ray: 4.112880560569465e-05\n", "immunohistochemistry histopathology: 1.0486423889233265e-06\n", "adenocarcinoma histopathology: 9.66637117016944e-07\n", "covid line chart: 9.508977996119938e-07\n", "brain MRI: 3.232386518448038e-07\n", "squamous cell carcinoma histopathology: 2.53368597213921e-07\n", "pie chart: 3.6984038054299617e-09\n", "\n", "\n", "squamous_cell_carcinoma_histopathology.jpeg:\n", "squamous cell carcinoma histopathology: 0.9469489455223083\n", "adenocarcinoma histopathology: 0.05259034037590027\n", "hematoxylin and eosin histopathology: 0.0003988408425357193\n", "immunohistochemistry histopathology: 6.187965482240543e-05\n", "chest X-ray: 1.4099594380923008e-08\n", "pie chart: 3.522500624519864e-10\n", "bone X-ray: 2.9633814846441453e-10\n", "brain MRI: 1.2720452469139332e-10\n", "covid line chart: 1.8425603924565603e-12\n", "\n", "\n", "IHC_histopathology.jpg:\n", "immunohistochemistry histopathology: 0.9465934634208679\n", "hematoxylin and eosin histopathology: 0.03232448548078537\n", "brain MRI: 0.020657211542129517\n", "adenocarcinoma histopathology: 0.000304735847748816\n", "bone X-ray: 4.5735167077509686e-05\n", "squamous cell carcinoma histopathology: 3.150868360535242e-05\n", "covid line chart: 2.0559578842949122e-05\n", "chest X-ray: 1.2715442608168814e-05\n", "pie chart: 9.55282575887395e-06\n", "\n", "