{ "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": 1, "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==2.23.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (2.23.0)\n", "Requirement already satisfied: transformers==4.35.2 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (4.35.2)\n", "Requirement already satisfied: matplotlib in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (3.8.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.23.0) (2.1.1)\n", "Requirement already satisfied: torchvision in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (0.16.1)\n", "Requirement already satisfied: regex in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (2023.10.3)\n", "Requirement already satisfied: ftfy in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (6.1.3)\n", "Requirement already satisfied: tqdm in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (4.66.1)\n", "Requirement already satisfied: huggingface-hub in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (0.19.4)\n", "Requirement already satisfied: sentencepiece in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (0.1.99)\n", "Requirement already satisfied: protobuf in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (4.25.1)\n", "Requirement already satisfied: timm in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from open_clip_torch==2.23.0) (0.9.11)\n", "Requirement already satisfied: filelock in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers==4.35.2) (3.13.1)\n", "Requirement already satisfied: numpy>=1.17 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers==4.35.2) (1.26.2)\n", "Requirement already satisfied: packaging>=20.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers==4.35.2) (23.2)\n", "Requirement already satisfied: pyyaml>=5.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers==4.35.2) (6.0.1)\n", "Requirement already satisfied: requests in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers==4.35.2) (2.31.0)\n", "Requirement already satisfied: tokenizers<0.19,>=0.14 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers==4.35.2) (0.15.0)\n", "Requirement already satisfied: safetensors>=0.3.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from transformers==4.35.2) (0.4.0)\n", "Requirement already satisfied: contourpy>=1.0.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (1.2.0)\n", "Requirement already satisfied: cycler>=0.10 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (0.12.1)\n", "Requirement already satisfied: fonttools>=4.22.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (4.45.1)\n", "Requirement already satisfied: kiwisolver>=1.3.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (1.4.5)\n", "Requirement already satisfied: pillow>=8 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (10.1.0)\n", "Requirement already satisfied: pyparsing>=2.3.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from matplotlib) (3.1.1)\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", "Requirement already satisfied: fsspec>=2023.5.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from huggingface-hub->open_clip_torch==2.23.0) (2023.10.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==2.23.0) (4.8.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: sympy in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (1.12)\n", "Requirement already satisfied: networkx in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (3.2.1)\n", "Requirement already satisfied: jinja2 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (3.1.2)\n", "Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (12.1.105)\n", "Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (12.1.105)\n", "Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (12.1.105)\n", "Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (8.9.2.26)\n", "Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (12.1.3.1)\n", "Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (11.0.2.54)\n", "Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (10.3.2.106)\n", "Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (11.4.5.107)\n", "Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (12.1.0.106)\n", "Requirement already satisfied: nvidia-nccl-cu12==2.18.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (2.18.1)\n", "Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (12.1.105)\n", "Requirement already satisfied: triton==2.1.0 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from torch>=1.9.0->open_clip_torch==2.23.0) (2.1.0)\n", "Requirement already satisfied: nvidia-nvjitlink-cu12 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.9.0->open_clip_torch==2.23.0) (12.3.101)\n", "Requirement already satisfied: wcwidth<0.3.0,>=0.2.12 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from ftfy->open_clip_torch==2.23.0) (0.2.12)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers==4.35.2) (3.3.2)\n", "Requirement already satisfied: idna<4,>=2.5 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers==4.35.2) (3.4)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers==4.35.2) (2.1.0)\n", "Requirement already satisfied: certifi>=2017.4.17 in /home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages (from requests->transformers==4.35.2) (2023.11.17)\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.23.0) (2.1.3)\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==2.23.0) (1.3.0)\n" ] } ], "source": [ "!pip install open_clip_torch==2.23.0 transformers==4.35.2 matplotlib" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "kaOyeKkjqnri" }, "source": [ "## Load BiomedCLIP model" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "V8Yv9g_8EQ1W", "outputId": "3ec24c9b-4c4f-4c17-8d76-6cfd74bb8bdf" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/shezhan/anaconda3/envs/biomedclip/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n", "open_clip_pytorch_model.bin: 100%|██████████| 784M/784M [00:14<00:00, 55.4MB/s] \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "/home/shezhan/.cache/huggingface/hub/models--microsoft--BiomedCLIP-PubMedBERT_256-vit_base_patch16_224/snapshots/19a989005a398efdf80b5b44437c1a40c4a44fa9/open_clip_pytorch_model.bin\n" ] } ], "source": [ "from open_clip import create_model_from_pretrained, get_tokenizer # works on open-clip-torch>=2.23.0, timm>=0.9.8\n", "\n", "model, preprocess = create_model_from_pretrained('hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224')\n", "tokenizer = get_tokenizer('hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224')" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "_11A5zFuGfkG" }, "source": [ "### Example: Zero-shot classifications" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "XSJw7Qpm1w-f", "outputId": "c8e69acc-09a6-41ac-a719-e0c2016e41d8" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "squamous_cell_carcinoma_histopathology.jpeg:\n", "squamous cell carcinoma histopathology: 0.9974347949028015\n", "adenocarcinoma histopathology: 0.0013077895855531096\n", "hematoxylin and eosin histopathology: 0.001220701728016138\n", "immunohistochemistry histopathology: 3.675646803458221e-05\n", "chest X-ray: 1.1562086357774781e-11\n", "brain MRI: 5.135226445462937e-12\n", "pie chart: 2.5096693386655877e-12\n", "covid line chart: 8.320963818149452e-13\n", "bone X-ray: 2.3591251632868078e-14\n", "\n", "\n", "H_and_E_histopathology.jpg:\n", "hematoxylin and eosin histopathology: 0.9871525168418884\n", "immunohistochemistry histopathology: 0.01263258047401905\n", "adenocarcinoma histopathology: 0.00014957090024836361\n", "squamous cell carcinoma histopathology: 5.232706826063804e-05\n", "brain MRI: 1.0331223165849224e-05\n", "chest X-ray: 1.7938563132702257e-06\n", "bone X-ray: 6.823974558756163e-07\n", "pie chart: 2.4570314849370334e-07\n", "covid line chart: 4.083541144117575e-11\n", "\n", "\n", "bone_X-ray.jpg:\n", "bone X-ray: 0.9994791150093079\n", "pie chart: 0.00044867504038847983\n", "brain MRI: 4.2943622247548774e-05\n", "chest X-ray: 2.3478531147702597e-05\n", "hematoxylin and eosin histopathology: 5.820661954203388e-06\n", "immunohistochemistry histopathology: 2.925397701858401e-08\n", "adenocarcinoma histopathology: 5.054785923164218e-09\n", "squamous cell carcinoma histopathology: 1.2583111635988686e-11\n", "covid line chart: 1.2490023772182557e-11\n", "\n", "\n", "adenocarcinoma_histopathology.jpg:\n", "adenocarcinoma histopathology: 0.7322598695755005\n", "hematoxylin and eosin histopathology: 0.2661530375480652\n", "immunohistochemistry histopathology: 0.0014763424405828118\n", "squamous cell carcinoma histopathology: 0.00010973625467158854\n", "brain MRI: 5.758122938459564e-07\n", "chest X-ray: 3.1876800221652957e-07\n", "pie chart: 2.938464760404713e-08\n", "covid line chart: 6.052390144617448e-09\n", "bone X-ray: 9.53499057487761e-10\n", "\n", "\n", "covid_line_chart.png:\n", "covid line chart: 0.9999313354492188\n", "immunohistochemistry histopathology: 4.758761133416556e-05\n", "hematoxylin and eosin histopathology: 6.107815806899453e-06\n", "brain MRI: 5.340720235835761e-06\n", "squamous cell carcinoma histopathology: 4.4825301301898435e-06\n", "pie chart: 4.125398845644668e-06\n", "bone X-ray: 4.3938075577898417e-07\n", "chest X-ray: 4.362563856830093e-07\n", "adenocarcinoma histopathology: 2.9606898266365533e-08\n", "\n", "\n", "IHC_histopathology.jpg:\n", "immunohistochemistry histopathology: 0.9974373579025269\n", "hematoxylin and eosin histopathology: 0.0018958213040605187\n", "brain MRI: 0.0006442153244279325\n", "adenocarcinoma histopathology: 1.2659289495786652e-05\n", "squamous cell carcinoma histopathology: 8.9440345618641e-06\n", "bone X-ray: 7.17607406386378e-07\n", "chest X-ray: 1.7729635715113545e-07\n", "pie chart: 2.4384680941125225e-08\n", "covid line chart: 4.395787733812995e-09\n", "\n", "\n", "chest_X-ray.jpg:\n", "chest X-ray: 0.9999420642852783\n", "bone X-ray: 5.6779161241138354e-05\n", "hematoxylin and eosin histopathology: 8.007580163393868e-07\n", "brain MRI: 2.0064112504769582e-07\n", "immunohistochemistry histopathology: 6.691817588944105e-08\n", "covid line chart: 4.9727852058367716e-08\n", "adenocarcinoma histopathology: 4.0732953010547135e-08\n", "pie chart: 7.257632828050475e-10\n", "squamous cell carcinoma histopathology: 1.9824580865801522e-10\n", "\n", "\n", "brain_MRI.jpg:\n", "brain MRI: 0.9999922513961792\n", "hematoxylin and eosin histopathology: 5.947875251877122e-06\n", "immunohistochemistry histopathology: 1.6712781416572398e-06\n", "pie chart: 1.055264178262405e-07\n", "bone X-ray: 3.744204235545112e-08\n", "chest X-ray: 4.858804913965287e-09\n", "adenocarcinoma histopathology: 1.9369095216603682e-09\n", "squamous cell carcinoma histopathology: 2.33150582173991e-10\n", "covid line chart: 3.6202544868163544e-12\n", "\n", "\n", "pie_chart.png:\n", "pie chart: 0.9999972581863403\n", "covid line chart: 2.5176009330607485e-06\n", "immunohistochemistry histopathology: 1.5237210959639924e-07\n", "hematoxylin and eosin histopathology: 2.9775689469602185e-08\n", "chest X-ray: 7.584886496658783e-09\n", "bone X-ray: 3.2951061879060717e-09\n", "brain MRI: 2.032198631596316e-09\n", "adenocarcinoma histopathology: 1.0487891666244309e-09\n", "squamous cell carcinoma histopathology: 1.555986589574232e-10\n", "\n", "\n" ] } ], "source": [ "import torch\n", "from urllib.request import urlopen\n", "from PIL import Image\n", "\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", "dataset_url = 'https://huggingface.co/microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224/resolve/main/example_data/biomed_image_classification_example_data/'\n", "test_imgs = [\n", " 'squamous_cell_carcinoma_histopathology.jpeg',\n", " 'H_and_E_histopathology.jpg',\n", " 'bone_X-ray.jpg',\n", " 'adenocarcinoma_histopathology.jpg',\n", " 'covid_line_chart.png',\n", " 'IHC_histopathology.jpg',\n", " 'chest_X-ray.jpg',\n", " 'brain_MRI.jpg',\n", " 'pie_chart.png'\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(Image.open(urlopen(dataset_url + 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", "