diff --git "a/COLIPRI_demo.ipynb" "b/COLIPRI_demo.ipynb" new file mode 100644--- /dev/null +++ "b/COLIPRI_demo.ipynb" @@ -0,0 +1,2895 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "GUyE8zKeOGJi" + }, + "source": [ + "# COLIPRI\n", + "\n", + "This is a demo with usage examples for COLIPRI, the vision–language CT encoder described in [_Comprehensive language–image pre-training\n", + "for 3D medical image understanding_](https://arxiv.org/abs/2510.15042) (Wald et al. 2026)." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "WY_F8zjR3-k4" + }, + "source": [ + "## Installation\n", + "\n", + "The [`colipri` package](https://pypi.org/project/colipri/) is available on PyPI.\n", + "Here, we use the `demo` extra to install the required dependencies for running this demo." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "yEM-bYQxwIFD" + }, + "outputs": [], + "source": [ + "%pip install --quiet git+https://huggingface.co/microsoft/colipri.git[demo]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "d4jMU1Bh4TKs" + }, + "source": [ + "## Preliminaries" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "collapsed": true, + "id": "3rZlVFCndKYP", + "outputId": "397aef71-5418-4205-fdbd-d11e113f6a25" + }, + "outputs": [], + "source": [ + "# @title [Some uninteresting code to improve visualization]\n", + "%load_ext rich\n", + "\n", + "import lovely_tensors as lt\n", + "import matplotlib.pyplot as plt\n", + "from rich import print\n", + "from torchinfo import summary\n", + "\n", + "lt.monkey_patch()\n", + "plt.rcParams[\"figure.figsize\"] = 12, 4" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "b3WzYwmJ2AvF" + }, + "outputs": [], + "source": [ + "import torch\n", + "import torchio as tio\n", + "\n", + "from colipri import get_model\n", + "from colipri import get_processor\n", + "from colipri import load_sample_ct\n", + "from colipri import ZeroShotImageClassificationPipeline\n", + "\n", + "device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n", + "print(f\"Using device: {device}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "DKvRgSbh23uj" + }, + "source": [ + "### Image input\n", + "\n", + "We will use a [chest CT from the 3D Slicer Sample Data module](https://www.slicer.org/wiki/SampleData) for this demo." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 439 + }, + "id": "1859KPqK4Ib-", + "outputId": "72c81372-7a1c-4416-8abc-f3cb72370229" + }, + "outputs": [], + "source": [ + "image = load_sample_ct()\n", + "image.plot(indices=(180, 341, 76))\n", + "image" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "giLmSmzk4fft" + }, + "source": [ + "### Preprocessing\n", + "\n", + "We will instantiate a `Processor` to preprocess medical images using [TorchIO](https://docs.torchio.org/) and strings using the tokenizer of [BiomedVLP-CXR-BERT-specialized](https://huggingface.co/microsoft/BiomedVLP-CXR-BERT-specialized)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 423, + "referenced_widgets": [ + "4156734135eb403ba1dda34e3eb7788f", + "b67d761cb46b49b39cbf0adcc258c6b6", + "2fafd984ed094f27bc820799483b3e93", + "a38cf85ac0a94987af27858f76186381", + "63ce627f38cd4e72a3d7e925cafbe261", + "8287e32282f641e4bf8f7da445b9e689", + "c5143bc351224272ad9a97ed85795528", + "56613cb095f74b828cd0481cffa7200e", + "f0c30c679c1245d5a3bd783e07f30b1a", + "e03c7363d59a47588c0d205e9a2fd813", + "99538675010940f9816789bb45e8b775", + "72a98db5dcaf4b16aacc84ee21dd7808", + "9f7048a68b544fe9a9cd868fd6b8e243", + "a21741dbaf9441a7a0b89dacd6202f1e", + "f8693e1e896c48fb806fb70ffc563141", + "a664fb1a5b00496f8cb0b77b593f0f1f", + "bc5899292bb346fd88badfd99a511d2b", + "84885359e0924534ad225cf1631fe263", + "1efc9391e74340aca4c4f7057417cfe6", + "21326879fb2c4bba981f0a0d758c21d0", + "87aa3bc930034457ae98238f7fa59032", + "81967c58cd5447e9a92f218029800431", + "269a95c6360c4054aebeb1f0f3a17fab", + "e45d0d5a89b947568bc3c28cde21da1f", + "b76b6543623c42b6b470471ea817991b", + "77d8967fb58948e9aacc94cab3ac11fe", + "a436684c189d46eb86329e00dc460c89", + "51b9f94f274f46d684833473fa6e91a0", + "793bea5ffd0a4265817566f75a62173a", + "c288dd1c24ca496f989acef5fb122ec5", + "719a795245f54cb8bb16389551a00308", + "bac00d23a8634f0490e8f7fa2d325647", + "4271bb1bb59c465f9283840e312145b2", + "a7b7b3ba28c345ec90f76d3d4396a9af", + "b4c0f9d121d94a2bb4fe77fbf9005341", + "5b7ebd4830b44fc6be124b7ac17db903", + "cdfe00703ae14d4499511be8e002c4ac", + "01b3d7b8cec84cd0a8f9d39dee0cd3ae", + "4c63310c321f445aa6d89eee098d9874", + "174c91d07edc4bddaf4b7d779212c905", + "661434859875484ebaa34df5a7606a67", + "454d9b275ccb4fc4b2aa182d9c2a1b18", + "bb55060ae12a48038349efc5308d1236", + "bccf4b20e4cf432f838a2aee65c15fd1" + ] + }, + "id": "ygUBs2nubRm-", + "outputId": "038d5516-ad79-4b94-ea51-26749c91aac7" + }, + "outputs": [], + "source": [ + "processor = get_processor()\n", + "processor" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "-MZwzHIs5FoI" + }, + "source": [ + "### Model\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 434 + }, + "id": "GR43YRJi4Z-2", + "outputId": "a634c18c-c115-4c52-f7d1-95ce82d10ad8" + }, + "outputs": [], + "source": [ + "model = get_model().to(device)\n", + "summary(model)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "j9BPLaEqOpFd" + }, + "source": [ + "## Zero-shot classification" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 104 + }, + "id": "Bw_7dglN6gLx", + "outputId": "0272c00d-1077-446f-a3ee-cb4d8c7296f1" + }, + "outputs": [], + "source": [ + "pipeline = ZeroShotImageClassificationPipeline(model, processor)\n", + "pipeline(image, [\"No lung nodules\", \"Lung nodules\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "AYkCOoDGOuyq" + }, + "source": [ + "## Feature extraction" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "SmGPDqtqOyMC" + }, + "source": [ + "### Image processing\n", + "\n", + "Here, we transform the image so it has the expected spacing, shape, and orientation.\n", + "\n", + "We have hard-coded the slices on which a lung nodule can be seen (near the heart)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 440 + }, + "id": "H_RDsmnB4zXE", + "outputId": "b36fcbb9-948c-40a3-ee10-18f867a168a1" + }, + "outputs": [], + "source": [ + "preprocessed_images = processor.process_images(image)\n", + "nodule_indices_preprocessed = 67, 127, 104\n", + "preprocessed_images[0].plot(indices=nodule_indices_preprocessed)\n", + "preprocessed_images[0]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "jmpSlXdZPVzq" + }, + "source": [ + "The output of the processor is a list of TorchIO images.\n", + "Next, we stack the tensor data so it's ready for the network." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 34 + }, + "id": "nUTAo1yX5mVV", + "outputId": "e5caf14b-3325-489d-9f4e-ec02553f97dc" + }, + "outputs": [], + "source": [ + "images_batch = processor.to_images_batch(preprocessed_images).to(device)\n", + "images_batch" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "apoj22TbPfrM" + }, + "source": [ + "### Encoding images\n", + "\n", + "We can compute pooled embeddings..." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 34 + }, + "id": "PlrMcflh6KGI", + "outputId": "8d6faffd-842b-459f-9379-397ea90c11f0" + }, + "outputs": [], + "source": [ + "with torch.no_grad():\n", + " pooled_embeddings = model.encode_image(\n", + " images_batch,\n", + " pool=True,\n", + " project=True,\n", + " normalize=True,\n", + " )\n", + "pooled_embeddings" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "OOJ6WEoYPpJx" + }, + "source": [ + "...or patch embeddings." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 34 + }, + "id": "_kBqixbY5Cbd", + "outputId": "4da2a6ec-4b97-4183-877d-5b9878d93e6f" + }, + "outputs": [], + "source": [ + "with torch.no_grad():\n", + " patch_embeddings = model.encode_image(images_batch)\n", + "patch_embeddings" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "1t_0Q7idPsiZ" + }, + "source": [ + "Let's run principal component analysis (PCA) and look at the first three components." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 435 + }, + "id": "T9xmFphV6t9f", + "outputId": "d04bd543-b741-49bb-b253-afd6d33c8b2a" + }, + "outputs": [], + "source": [ + "image_embeddings = patch_embeddings[0].cpu()\n", + "embeddings_image = tio.ToReferenceSpace.from_tensor(\n", + " image_embeddings,\n", + " preprocessed_images[0],\n", + ")\n", + "pca = tio.PCA()(embeddings_image)\n", + "zipped = zip(nodule_indices_preprocessed, model.patch_size, strict=True)\n", + "indices = [i // patch_size for (i, patch_size) in zipped]\n", + "pca.plot(indices=indices)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "SiB5iyvUQRXY" + }, + "source": [ + "Let's double the image resolution and compute the embeddings using a sliding window, for fun." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "Wtek-_vn_caj" + }, + "outputs": [], + "source": [ + "up_factor = 2\n", + "processor_hires = get_processor(spacing=2 / up_factor, input_size=192 * up_factor)\n", + "preprocessed_images_hires = processor_hires.process_images(image)\n", + "images_batch_hires = processor.to_images_batch(preprocessed_images_hires)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000, + "referenced_widgets": [ + "c34aab87149044cbbe1af5da84d99509", + "b238578590384fc9b5d0af0b9b1cb1c9", + "6c6840777c40469b837afdf9d07880f5", + "b5c5ddf423834450bf5bcb19ed5e0755", + "801105bcdeb043dcb69db244e3cb4d1e", + "fec9f5d6c64a415c8f193a33ba9779cb", + "16465852dee8431d9a977b15fe726d97", + "f3ae5bc3d3fa4c6bbf7909975d36d275", + "978b98172886445892dfd6e925c78eae", + "9fbbe9e95a814822ab28f2e82288b52b", + "bf1381ad2fad42aa925c0e1bae7ec490" + ] + }, + "id": "AcYY-oA4_fGL", + "outputId": "cd4fb590-7691-4137-c181-54e4c750022e" + }, + "outputs": [], + "source": [ + "with torch.no_grad():\n", + " image_embeddings_batch_hires = model.encode_image(\n", + " images_batch_hires,\n", + " window_size=192,\n", + " )\n", + "image_embeddings_batch_hires" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "6axS8Cw3AiH0" + }, + "outputs": [], + "source": [ + "image_embeddings_hires = image_embeddings_batch_hires[0].cpu()\n", + "embeddings_image_hires = tio.ToReferenceSpace.from_tensor(\n", + " image_embeddings_hires, preprocessed_images_hires[0]\n", + ")\n", + "embeddings_image_hires" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "cN6SEnuiAlFb" + }, + "outputs": [], + "source": [ + "pca_hires = tio.PCA()(embeddings_image_hires)\n", + "zipped = zip(nodule_indices_preprocessed, model.patch_size, strict=True)\n", + "indices = [up_factor * i // patch_size for (i, patch_size) in zipped]\n", + "pca_hires.plot(indices=indices)\n", + "pca_hires" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TPeOAooARNCR" + }, + "source": [ + "### Encoding text" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "YCe5oNXURWC_" + }, + "outputs": [], + "source": [ + "text = \"Airway wall thickening with tree-in-bud pattern\"\n", + "token_ids, attention_mask = processor.process_text(text)\n", + "token_ids" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "yu_MWblVTKZF" + }, + "outputs": [], + "source": [ + "decoded_tokens = []\n", + "for token_id in token_ids[0]:\n", + " if token_id == 0: # stop when a padding token is found\n", + " break\n", + " decoded_tokens.append((token_id, processor._text_tokenizer.decode(token_id)))\n", + "\n", + "for i, token_text in decoded_tokens:\n", + " print(f\"Token {i}: {token_text}\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "Y_radYBKSjcJ" + }, + "outputs": [], + "source": [ + "with torch.no_grad():\n", + " embeddings_text = model.encode_text(token_ids, attention_mask)\n", + "embeddings_text" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.3" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "01b3d7b8cec84cd0a8f9d39dee0cd3ae": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0bd33a13c4444c438f1bf333d167dc8c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "LabelModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "LabelModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "LabelView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_25ed5f92459845d08c121af8859fe503", + "placeholder": "", + "style": "IPY_MODEL_45a7dc8631684ab1b7106c45374437bd", + "value": "Connecting..." + } + }, + "16465852dee8431d9a977b15fe726d97": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "164d1f5bfd534080bf1a8140d895ccf1": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ButtonStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ButtonStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "button_color": null, + "font_weight": "" + } + }, + "174c91d07edc4bddaf4b7d779212c905": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1a82706b1c634970ae50fecfc270dae4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f33c85f5fd554d158662c83043844d52", + "placeholder": "", + "style": "IPY_MODEL_7d7d65909d9e4ae6b4458f0b614b4c33", + "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. " + } + }, + "1efc9391e74340aca4c4f7057417cfe6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "21326879fb2c4bba981f0a0d758c21d0": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "25ed5f92459845d08c121af8859fe503": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "269a95c6360c4054aebeb1f0f3a17fab": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_e45d0d5a89b947568bc3c28cde21da1f", + "IPY_MODEL_b76b6543623c42b6b470471ea817991b", + "IPY_MODEL_77d8967fb58948e9aacc94cab3ac11fe" + ], + "layout": "IPY_MODEL_a436684c189d46eb86329e00dc460c89" + } + }, + "2fafd984ed094f27bc820799483b3e93": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_56613cb095f74b828cd0481cffa7200e", + "max": 659, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f0c30c679c1245d5a3bd783e07f30b1a", + "value": 659 + } + }, + "4156734135eb403ba1dda34e3eb7788f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_b67d761cb46b49b39cbf0adcc258c6b6", + "IPY_MODEL_2fafd984ed094f27bc820799483b3e93", + "IPY_MODEL_a38cf85ac0a94987af27858f76186381" + ], + "layout": "IPY_MODEL_63ce627f38cd4e72a3d7e925cafbe261" + } + }, + "4271bb1bb59c465f9283840e312145b2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "454d9b275ccb4fc4b2aa182d9c2a1b18": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "45a7dc8631684ab1b7106c45374437bd": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4c63310c321f445aa6d89eee098d9874": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4d461485ad234aa987fef40259584a34": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "51b9f94f274f46d684833473fa6e91a0": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "56613cb095f74b828cd0481cffa7200e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5b7ebd4830b44fc6be124b7ac17db903": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_661434859875484ebaa34df5a7606a67", + "max": 112, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_454d9b275ccb4fc4b2aa182d9c2a1b18", + "value": 112 + } + }, + "62f7e0936e494ffc902c1802bc7c4346": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "PasswordModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "PasswordModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "PasswordView", + "continuous_update": true, + "description": "Token:", + "description_tooltip": null, + "disabled": false, + "layout": "IPY_MODEL_a41a373d2bdb4f6bb3c125ae7a08bcd2", + "placeholder": "", + "style": "IPY_MODEL_9301c7cc90054e2684bf274ec8600c60", + "value": "" + } + }, + "63ce627f38cd4e72a3d7e925cafbe261": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "63fe80964c0540d483aece6bd8b7f5f6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "661434859875484ebaa34df5a7606a67": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6c6840777c40469b837afdf9d07880f5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "danger", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f3ae5bc3d3fa4c6bbf7909975d36d275", + "max": 8, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_978b98172886445892dfd6e925c78eae", + "value": 3 + } + }, + "719a795245f54cb8bb16389551a00308": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "72a98db5dcaf4b16aacc84ee21dd7808": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_9f7048a68b544fe9a9cd868fd6b8e243", + "IPY_MODEL_a21741dbaf9441a7a0b89dacd6202f1e", + "IPY_MODEL_f8693e1e896c48fb806fb70ffc563141" + ], + "layout": "IPY_MODEL_a664fb1a5b00496f8cb0b77b593f0f1f" + } + }, + "77d8967fb58948e9aacc94cab3ac11fe": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_bac00d23a8634f0490e8f7fa2d325647", + "placeholder": "", + "style": "IPY_MODEL_4271bb1bb59c465f9283840e312145b2", + "value": " 235k/? [00:00<00:00, 5.54MB/s]" + } + }, + "793bea5ffd0a4265817566f75a62173a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7d7d65909d9e4ae6b4458f0b614b4c33": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "801105bcdeb043dcb69db244e3cb4d1e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "81967c58cd5447e9a92f218029800431": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "8287e32282f641e4bf8f7da445b9e689": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "84885359e0924534ad225cf1631fe263": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "87aa3bc930034457ae98238f7fa59032": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8a06c1f8e3f94d21b7773b9fc00d4d63": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "VBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "VBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "VBoxView", + "box_style": "", + "children": [], + "layout": "IPY_MODEL_d1cda84fc6af4b549dbb86b4dd587c7c" + } + }, + "8c1767171ba847b08bdbe0d61f3ed5d2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "907b930ab9bd4038b25eaa4af6facc88": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4d461485ad234aa987fef40259584a34", + "placeholder": "", + "style": "IPY_MODEL_63fe80964c0540d483aece6bd8b7f5f6", + "value": "