{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.7.10","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":10338,"databundleVersionId":862042,"sourceType":"competition"},{"sourceId":2353458,"sourceType":"datasetVersion","datasetId":1421014}],"dockerImageVersionId":30097,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"<a id=\"top\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:35px;font-family:Georgia;text-align:center;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Pneumonia Detection using X-Ray Images</b></div>","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align: justify;\">\n    In this Kaggle notebook, we delve into the <a href=\"https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/\">Pneumonia Detection Challenge</a>, a significant task that involves analyzing chest X-ray images to detect early signs of pneumonia by identifying lung opacities. The dataset required for this challenge, encompassing a diverse range of X-ray images, is accessible <a href=\"https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/data\">here</a>. Our approach is grounded in utilizing a proven implementation, specifically <a href=\"https://www.kaggle.com/yakhyo/rsna-classification-87-6-best-accuracy-opytorch\">this model</a>, which leverages the robust capabilities of RESNET. RESNET, known for its deep learning prowess in image recognition, offers an advanced framework for accurately identifying and classifying lung opacities in the provided X-ray images. This notebook aims to guide you through the process of employing this implementation, demonstrating how to effectively apply RESNET in this critical medical imaging challenge.\n</div>\n","metadata":{}},{"cell_type":"markdown","source":"<a id=\"top\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:24px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Table of content</b></div>\n\n<div style=\"background-color:aliceblue; padding:30px; font-size:15px;color:#034914\">\n    \n<a id=\"TOC\"></a>\n## Table of Content\n* [Checking Kaggle Hardware Specs](#khs)\n* [Importing Required Libraries](#lib)\n* [Loading Labels](#labels)\n* [Spliting Train and Validation Sets](#split)\n* [Checking Some Samples from Dataset](#sample)\n* [Composing Transformations](#trans)\n* [Writing a Custom Dataset Function](#data)\n* [Loading a Pre-trained ResNet18 Model and its Fine-tuning](#model)\n* [Testing the Model](#test)\n* [References](#ref)","metadata":{}},{"cell_type":"markdown","source":"<a id=\"khs\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Checking Kaggle Hardware Specs</b></div> \n","metadata":{}},{"cell_type":"code","source":"!nvidia-smi\n!lscpu | head -n 15","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:28.087276Z","iopub.execute_input":"2023-12-17T23:10:28.087714Z","iopub.status.idle":"2023-12-17T23:10:30.005566Z","shell.execute_reply.started":"2023-12-17T23:10:28.087622Z","shell.execute_reply":"2023-12-17T23:10:30.004588Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"lib\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Importing Required Libraries</b></div> ","metadata":{}},{"cell_type":"code","source":"import os\nimport pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom pydicom import dcmread\nfrom PIL import Image\nimport matplotlib.pyplot as plt\nfrom tqdm import tqdm\n\n\nimport torch\nimport torch.nn as nn\nimport torchvision\nimport torchvision.transforms as transforms\nfrom torch.utils import data\n\nimport torch.nn.functional as F\nfrom torchvision.utils import make_grid, save_image\n\nfrom matplotlib import rcParams\n\nimport matplotlib.patches as patches\nfrom math import ceil","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:20:29.532180Z","iopub.execute_input":"2023-12-17T23:20:29.532569Z","iopub.status.idle":"2023-12-17T23:20:29.539092Z","shell.execute_reply.started":"2023-12-17T23:20:29.532531Z","shell.execute_reply":"2023-12-17T23:20:29.538048Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"labels\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Loading Labels</b></div> ","metadata":{}},{"cell_type":"code","source":"label_data = pd.read_csv('../input/rsna-pneumonia-detection-challenge/stage_2_train_labels.csv')\ncolumns = ['patientId', 'Target']\nall_data = label_data\n\nlabel_data = label_data.filter(columns)\nlabel_data.head(5)\n#print(all_data)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:32.483821Z","iopub.execute_input":"2023-12-17T23:10:32.484166Z","iopub.status.idle":"2023-12-17T23:10:32.585089Z","shell.execute_reply.started":"2023-12-17T23:10:32.484113Z","shell.execute_reply":"2023-12-17T23:10:32.584062Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"split\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Spliting Train and Validation Sets</b></div> ","metadata":{}},{"cell_type":"code","source":"train_labels, val_labels = train_test_split(label_data.values, test_size=0.1)\nprint(train_labels.shape)\nprint(val_labels.shape)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:32.586812Z","iopub.execute_input":"2023-12-17T23:10:32.587185Z","iopub.status.idle":"2023-12-17T23:10:32.599439Z","shell.execute_reply.started":"2023-12-17T23:10:32.587133Z","shell.execute_reply":"2023-12-17T23:10:32.598544Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(f'patientId: {train_labels[0][0]}, Target: {train_labels[0][1]}')","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:32.600528Z","iopub.execute_input":"2023-12-17T23:10:32.600847Z","iopub.status.idle":"2023-12-17T23:10:32.605897Z","shell.execute_reply.started":"2023-12-17T23:10:32.600816Z","shell.execute_reply":"2023-12-17T23:10:32.604932Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_f = '../input/rsna-pneumonia-detection-challenge/stage_2_train_images'\ntest_f = '../input/rsna-pneumonia-detection-challenge/stage_2_test_images'\n\ntrain_paths = [os.path.join(train_f, image[0]) for image in train_labels]\nval_paths = [os.path.join(train_f, image[0]) for image in val_labels]\n\nprint(len(train_paths))\nprint(len(val_paths))","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:32.607022Z","iopub.execute_input":"2023-12-17T23:10:32.607372Z","iopub.status.idle":"2023-12-17T23:10:32.706037Z","shell.execute_reply.started":"2023-12-17T23:10:32.607342Z","shell.execute_reply":"2023-12-17T23:10:32.704911Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"sample\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Checking Some Samples from Dataset</b></div> ","metadata":{}},{"cell_type":"code","source":"def imshow(num_to_show=9):\n    \n    plt.figure(figsize=(10,10))\n    \n    for i in range(num_to_show):\n        plt.subplot(3, 3, i+1)\n        plt.grid(False)\n        plt.xticks([])\n        plt.yticks([])\n        \n        img_dcm = dcmread(f'{train_paths[i+20]}.dcm')\n        img_np = img_dcm.pixel_array\n        plt.imshow(img_np, cmap=plt.cm.binary)\n        plt.xlabel(train_labels[i+20][1])\n\nimshow()","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:32.707416Z","iopub.execute_input":"2023-12-17T23:10:32.707723Z","iopub.status.idle":"2023-12-17T23:10:34.165804Z","shell.execute_reply.started":"2023-12-17T23:10:32.707692Z","shell.execute_reply":"2023-12-17T23:10:34.164895Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"trans\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Composing Transformations</b></div>  ","metadata":{}},{"cell_type":"code","source":"transform = transforms.Compose([\n    transforms.RandomHorizontalFlip(),\n    transforms.Resize(224),\n    transforms.ToTensor()])","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:34.168761Z","iopub.execute_input":"2023-12-17T23:10:34.169111Z","iopub.status.idle":"2023-12-17T23:10:34.173674Z","shell.execute_reply.started":"2023-12-17T23:10:34.169075Z","shell.execute_reply":"2023-12-17T23:10:34.172763Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"data\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Writing a Custom Dataset Function</b></div>   ","metadata":{}},{"cell_type":"code","source":"class Dataset(data.Dataset):\n    \n    def __init__(self, paths, labels, transform=None):\n        self.paths = paths\n        self.labels = labels\n        self.transform = transform\n    \n    def __getitem__(self, index):\n        image = dcmread(f'{self.paths[index]}.dcm')\n        image = image.pixel_array\n        image = image / 255.0\n\n        image = (255*image).clip(0, 255).astype(np.uint8)\n        image = Image.fromarray(image).convert('RGB')\n\n        label = self.labels[index][1]\n        \n        if self.transform is not None:\n            image = self.transform(image)\n        \n        \n        name = self.paths[index].split(\"/\")[-1]\n        GH = all_data['patientId']==name\n        FIL = all_data[GH]\n        #print(\"From the datset loader, name\", name)\n        box = [FIL['x'].values[0], FIL['y'].values[0], FIL['width'].values[0], FIL['height'].values[0]]\n            \n        return image, label, box\n    \n    def __len__(self):\n        \n        return len(self.paths)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:34.175432Z","iopub.execute_input":"2023-12-17T23:10:34.175799Z","iopub.status.idle":"2023-12-17T23:10:34.186306Z","shell.execute_reply.started":"2023-12-17T23:10:34.175761Z","shell.execute_reply":"2023-12-17T23:10:34.185442Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_dataset = Dataset(train_paths, train_labels, transform=transform)\nimage = iter(train_dataset)\n#print(train_dataset.paths)\nimg, label, box = next(image)\nprint(label, box)\n#print(f'Tensor:{img}, Label:{label}')\nimg = np.transpose(img, (1, 2, 0))\nplt.imshow(img)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:34.187628Z","iopub.execute_input":"2023-12-17T23:10:34.187990Z","iopub.status.idle":"2023-12-17T23:10:34.436704Z","shell.execute_reply.started":"2023-12-17T23:10:34.187950Z","shell.execute_reply":"2023-12-17T23:10:34.435859Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img.shape","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:34.437783Z","iopub.execute_input":"2023-12-17T23:10:34.438059Z","iopub.status.idle":"2023-12-17T23:10:34.443613Z","shell.execute_reply.started":"2023-12-17T23:10:34.438029Z","shell.execute_reply":"2023-12-17T23:10:34.442428Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Prepare training and validation dataloader","metadata":{}},{"cell_type":"code","source":"train_dataset = Dataset(train_paths, train_labels, transform=transform)\nval_dataset = Dataset(val_paths, val_labels, transform=transform)\ntrain_loader = data.DataLoader(dataset=train_dataset, batch_size=128, shuffle=True)\nval_loader = data.DataLoader(dataset=val_dataset, batch_size=128, shuffle=False)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:34.444813Z","iopub.execute_input":"2023-12-17T23:10:34.445142Z","iopub.status.idle":"2023-12-17T23:10:34.452400Z","shell.execute_reply.started":"2023-12-17T23:10:34.445112Z","shell.execute_reply":"2023-12-17T23:10:34.451548Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Check dataloader","metadata":{}},{"cell_type":"code","source":"batch = iter(train_loader)\nimages, labels, _ = next(batch)\n\nimage_grid = torchvision.utils.make_grid(images[:4])\nimage_np = image_grid.numpy()\nimg = np.transpose(image_np, (1, 2, 0))\nplt.imshow(img)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:34.453463Z","iopub.execute_input":"2023-12-17T23:10:34.453750Z","iopub.status.idle":"2023-12-17T23:10:39.951107Z","shell.execute_reply.started":"2023-12-17T23:10:34.453724Z","shell.execute_reply":"2023-12-17T23:10:39.950236Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Specify device object","metadata":{}},{"cell_type":"code","source":"device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:39.952378Z","iopub.execute_input":"2023-12-17T23:10:39.952757Z","iopub.status.idle":"2023-12-17T23:10:40.034718Z","shell.execute_reply.started":"2023-12-17T23:10:39.952713Z","shell.execute_reply":"2023-12-17T23:10:40.033781Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"model\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Loading a Pre-trained ResNet18 Model and its Fine-tuning</b></div>    ","metadata":{}},{"cell_type":"code","source":"model = torchvision.models.resnet18(pretrained=True)\nnum_ftrs = model.fc.in_features\n# Here the size of each output sample is set to 2.\n# Alternatively, it can be generalized to nn.Linear(num_ftrs, len(class_names)).\nmodel.fc = nn.Linear(num_ftrs, 2)\n\nmodel.to(device)\n\ncriterion = nn.CrossEntropyLoss()\n\n# Observe that all parameters are being optimized\noptimizer = torch.optim.SGD(model.parameters(), lr=0.001, momentum=0.9)\n\n# Decay LR by a factor of 0.1 every 7 epochs\nexp_lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=7, gamma=0.1)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:40.035943Z","iopub.execute_input":"2023-12-17T23:10:40.036285Z","iopub.status.idle":"2023-12-17T23:10:46.245620Z","shell.execute_reply.started":"2023-12-17T23:10:40.036255Z","shell.execute_reply":"2023-12-17T23:10:46.244662Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(model)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:46.246790Z","iopub.execute_input":"2023-12-17T23:10:46.247078Z","iopub.status.idle":"2023-12-17T23:10:46.252078Z","shell.execute_reply.started":"2023-12-17T23:10:46.247048Z","shell.execute_reply":"2023-12-17T23:10:46.251243Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"train\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Training the Model</b></div>    ","metadata":{}},{"cell_type":"code","source":"if 0:\n    num_epochs = 20\n    # Train the model\n    total_step = len(train_loader)\n    for epoch in range(num_epochs):\n        # Training step\n        for i, (images, labels, _) in tqdm(enumerate(train_loader)):\n            images = images.to(device)\n            labels = labels.to(device)\n\n            # Forward pass\n            outputs = model(images)\n            loss = criterion(outputs, labels)\n\n            # Backward and optimize\n            optimizer.zero_grad()\n            loss.backward()\n            optimizer.step()\n\n            if (i + 1) % 2000 == 0:\n                print(\"Epoch [{}/{}], Step [{}/{}], Loss: {:.4f}\"\n                      .format(epoch + 1, num_epochs, i + 1, total_step, loss.item()))\n\n        # Validation step\n        correct = 0\n        total = 0\n        for images, labels, _ in tqdm(val_loader):\n            images = images.to(device)\n            labels = labels.to(device)\n            predictions = model(images)\n            _, predicted = torch.max(predictions, 1)\n            total += labels.size(0)\n            correct += (labels == predicted).sum()\n        print(f'Epoch: {epoch + 1}/{num_epochs}, Val_Acc: {100 * correct / total}')","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:46.253210Z","iopub.execute_input":"2023-12-17T23:10:46.253479Z","iopub.status.idle":"2023-12-17T23:10:46.264473Z","shell.execute_reply.started":"2023-12-17T23:10:46.253452Z","shell.execute_reply":"2023-12-17T23:10:46.263615Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"test\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Testing the Model</b></div>    ","metadata":{}},{"cell_type":"code","source":"if 0:\n    model.eval()\n\n    correct = 0\n    total = 0\n    for images, labels, _ in tqdm(val_loader):\n        images = images.to(device)\n        labels = labels.to(device)\n        predictions = model(images)\n        _, predicted = torch.max(predictions, 1)\n        total += labels.size(0)\n        correct += (labels == predicted).sum()\n    print(f'Val_Acc: {100 * correct / total}')","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:46.265426Z","iopub.execute_input":"2023-12-17T23:10:46.265717Z","iopub.status.idle":"2023-12-17T23:10:46.274878Z","shell.execute_reply.started":"2023-12-17T23:10:46.265683Z","shell.execute_reply":"2023-12-17T23:10:46.274053Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"save\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Save the Model Weights</b></div>      ","metadata":{}},{"cell_type":"code","source":"#torch.save(model.state_dict(), 'weights/weights_only.pth')\n#torch.save(model, 'model/model.pth')\n#print(\"Model and weights saved.\")","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:46.275883Z","iopub.execute_input":"2023-12-17T23:10:46.276212Z","iopub.status.idle":"2023-12-17T23:10:46.287206Z","shell.execute_reply.started":"2023-12-17T23:10:46.276177Z","shell.execute_reply":"2023-12-17T23:10:46.286486Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"load\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>Loading Saved Model</b></div>     ","metadata":{}},{"cell_type":"code","source":"model = torch.load('/kaggle/input/akram-trained-model/model.pth')","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:46.288193Z","iopub.execute_input":"2023-12-17T23:10:46.288475Z","iopub.status.idle":"2023-12-17T23:10:46.747515Z","shell.execute_reply.started":"2023-12-17T23:10:46.288450Z","shell.execute_reply":"2023-12-17T23:10:46.746492Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.eval()\n\ncorrect = 0\ntotal = 0  \nfor images, labels, _ in tqdm(val_loader):\n    images = images.to(device)\n    labels = labels.to(device)\n    predictions = model(images)\n    _, predicted = torch.max(predictions, 1)\n    total += labels.size(0)\n    correct += (labels == predicted).sum()\nprint(f'Val_Acc: {100*correct/total}')","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:10:46.748966Z","iopub.execute_input":"2023-12-17T23:10:46.749367Z","iopub.status.idle":"2023-12-17T23:12:34.860184Z","shell.execute_reply.started":"2023-12-17T23:10:46.749323Z","shell.execute_reply":"2023-12-17T23:12:34.859206Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Load test image\nlabel = 0\nwhile(label==0):\n    pil_img, label, box = next(image)\n\nfig,ax = plt.subplots(1)\n\nOrig_img_size = 1024\nimg_size = 224\n\n# 'r' means relative. 'c' means center.\nrx = ceil(box[0]*img_size/Orig_img_size)\nry = ceil(box[1]*img_size/Orig_img_size)\nrw = ceil(box[2]*img_size/Orig_img_size)\nrh = ceil(box[3]*img_size/Orig_img_size)\n\n\npil_img = np.transpose(pil_img, (1, 2, 0))\nprint(pil_img.shape)\nrect = patches.Rectangle((rx, ry), rw, rh, linewidth=1, edgecolor='r', facecolor='none')\nax.imshow(pil_img)\nax.add_patch(rect)\nprint(\"Label : \", label, box)","metadata":{"execution":{"iopub.status.busy":"2023-12-17T23:20:34.982004Z","iopub.execute_input":"2023-12-17T23:20:34.982369Z","iopub.status.idle":"2023-12-17T23:20:35.338141Z","shell.execute_reply.started":"2023-12-17T23:20:34.982339Z","shell.execute_reply":"2023-12-17T23:20:35.337233Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"ref\"></a>\n# <div style=\"padding:20px;color:white;margin:0;font-size:20px;font-family:Georgia;text-align:left;display:fill;border-radius:5px;background-color:#254E58;overflow:hidden\"><b>References</b></div>    ","metadata":{}},{"cell_type":"markdown","source":"<div style=\"background-color:aliceblue; padding:30px; font-size:15px;color:#034914\">\n\n* [RSNA classification, 87.6% best accuracy PyTorch](https://www.kaggle.com/code/yakhyo/rsna-classification-87-6-best-accuracy-opytorch)\n    \n* HTML and Theme inspired from [🔥 EDA & ML on Game Play 🎮 ](https://www.kaggle.com/code/nguyenthicamlai/eda-ml-on-game-play-ongoing) by [Nguyen Thi Cam Lai](https://www.kaggle.com/nguyenthicamlai) used for HTML-based headers\n","metadata":{}},{"cell_type":"markdown","source":"<center> <a href=\"#TOC\" role=\"button\" aria-pressed=\"true\" >⬆️ Back to Table of Contents ⬆️</a>","metadata":{}},{"cell_type":"markdown","source":"<div style=\"border-radius:10px;border:#034914 solid;padding: 15px;background-color:aliceblue;font-size:90%;text-align:left\">\n\n<h4><b>by: </b>Koorosh Aslansefat and Mohammad Naveed Akram</h4>  \n    \n<center> <strong> If you liked this Notebook, please do upvote. </strong>\n    \n<center> <strong> If you have any questions, feel free to contact us! </strong>","metadata":{}},{"cell_type":"markdown","source":"<center> <img src=\"https://gregcfuzion.files.wordpress.com/2022/01/kind-regards-2.png\" style='width: 600px; height: 300px;'>","metadata":{}}]}