{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import pandas as pd\nimport matplotlib.pyplot as plt\nimport pydicom \nfrom pydicom.data import get_testdata_files \nfrom pydicom.pixel_data_handlers.util import apply_voi_lut","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2021-10-26T10:28:35.294838Z","iopub.execute_input":"2021-10-26T10:28:35.295268Z","iopub.status.idle":"2021-10-26T10:28:35.56859Z","shell.execute_reply.started":"2021-10-26T10:28:35.295158Z","shell.execute_reply":"2021-10-26T10:28:35.567499Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_image_level = pd.read_csv('/kaggle/input/siim-covid19-detection/train_image_level.csv')\ntrain_study_level = pd.read_csv('/kaggle/input/siim-covid19-detection/train_study_level.csv')","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:35.570175Z","iopub.execute_input":"2021-10-26T10:28:35.570494Z","iopub.status.idle":"2021-10-26T10:28:35.639691Z","shell.execute_reply.started":"2021-10-26T10:28:35.570466Z","shell.execute_reply":"2021-10-26T10:28:35.638708Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_image_level.head()","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:35.641528Z","iopub.execute_input":"2021-10-26T10:28:35.641837Z","iopub.status.idle":"2021-10-26T10:28:35.669646Z","shell.execute_reply.started":"2021-10-26T10:28:35.641808Z","shell.execute_reply":"2021-10-26T10:28:35.668959Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_study_level.head()","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:35.6712Z","iopub.execute_input":"2021-10-26T10:28:35.671692Z","iopub.status.idle":"2021-10-26T10:28:35.683168Z","shell.execute_reply.started":"2021-10-26T10:28:35.671658Z","shell.execute_reply":"2021-10-26T10:28:35.682245Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np\ntr = train_study_level\nts = np.array(tr[: : ])\ntr['classes'] = [0 for i in range(len(tr))]\ncl = ['Negative for Pneumonia','Typical Appearance', 'Indeterminate Appearance', 'Atypical Appearance']\nfor i in range(len(ts)):\n    tem = ts[i]\n    for j in range(1,5):\n        if tem[j] == 1: \n            tr['classes'][i] = cl[j-1]\n            ","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:35.684698Z","iopub.execute_input":"2021-10-26T10:28:35.685282Z","iopub.status.idle":"2021-10-26T10:28:38.527063Z","shell.execute_reply.started":"2021-10-26T10:28:35.685219Z","shell.execute_reply":"2021-10-26T10:28:38.525823Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tr.head()","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:38.528786Z","iopub.execute_input":"2021-10-26T10:28:38.529116Z","iopub.status.idle":"2021-10-26T10:28:38.542421Z","shell.execute_reply.started":"2021-10-26T10:28:38.529081Z","shell.execute_reply":"2021-10-26T10:28:38.541157Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ty = 0 \nat = 0\nne = 0\nind = 0\nnn = 0\nfor i in range(len(tr)):\n    if tr['classes'][i] == 'Typical Appearance':\n        ty = ty + 1\n    elif tr['classes'][i] == 'Atypical Appearance':\n        at = at + 1\n    elif tr['classes'][i] == 'Negative for Pneumonia':\n        ne = ne + 1\n    elif tr['classes'][i] == 'Indeterminate Appearance' : \n        ind = ind + 1\n    else : \n        nn = nn + 1\ny = [int(ty),int(at),int(ne),int(ind)]\nplt.figure(figsize= (12,12))\nplt.bar(cl,y)\n","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:38.543854Z","iopub.execute_input":"2021-10-26T10:28:38.54437Z","iopub.status.idle":"2021-10-26T10:28:38.846484Z","shell.execute_reply.started":"2021-10-26T10:28:38.544336Z","shell.execute_reply":"2021-10-26T10:28:38.845527Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(train_image_level['boxes'])","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:38.848923Z","iopub.execute_input":"2021-10-26T10:28:38.849262Z","iopub.status.idle":"2021-10-26T10:28:38.85575Z","shell.execute_reply.started":"2021-10-26T10:28:38.849203Z","shell.execute_reply":"2021-10-26T10:28:38.854507Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_image_level['label'][0]","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:38.857805Z","iopub.execute_input":"2021-10-26T10:28:38.858148Z","iopub.status.idle":"2021-10-26T10:28:38.869006Z","shell.execute_reply.started":"2021-10-26T10:28:38.858115Z","shell.execute_reply":"2021-10-26T10:28:38.867856Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":" \ns = train_image_level['StudyInstanceUID'][0]\ns = s + '_study'\nlist(train_study_level['id']).index(s)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:38.870506Z","iopub.execute_input":"2021-10-26T10:28:38.870837Z","iopub.status.idle":"2021-10-26T10:28:38.885012Z","shell.execute_reply.started":"2021-10-26T10:28:38.870809Z","shell.execute_reply":"2021-10-26T10:28:38.884108Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_study_level['id'][2018]","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:38.886502Z","iopub.execute_input":"2021-10-26T10:28:38.886939Z","iopub.status.idle":"2021-10-26T10:28:38.900047Z","shell.execute_reply.started":"2021-10-26T10:28:38.886908Z","shell.execute_reply":"2021-10-26T10:28:38.898813Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2\nimport os\nimport pydicom\nimport glob\n#import gdcm \ninputdir = '/kaggle/input/siim-covid19-detection/test/2fb11712bc93/b056067b8455/'\noutdir = './'\n#os.mkdir(outdir)\ndef dicom_read(path, voi_lut = True, fix_monochrome= True):\n    dic = pydicom.read_file(path)\n    \n    if voi_lut : \n        data = apply_voi_lut(dic.pixel_array, dic)\n    \n    elif fix_monochrome and dicom.PhotometricInterpretation == \"MONOCHROME1\":\n        data = np.amax(data) - data\n        \n        data = data - np.min(data)\n        data = data / np.max(data)\n        data = (data * 255).astype(np.uint8)\n    else : \n        data = dic.pixel_array\n    return data\n","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:38.901497Z","iopub.execute_input":"2021-10-26T10:28:38.901788Z","iopub.status.idle":"2021-10-26T10:28:39.066718Z","shell.execute_reply.started":"2021-10-26T10:28:38.901761Z","shell.execute_reply":"2021-10-26T10:28:39.065485Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from fastai.vision.all import *\nfrom fastai.medical.imaging import *\nfs = get_dicom_files('/kaggle/input/siim-covid19-detection/test')\nfs[10]\nds = dicom_read(fs[110])\nplt.figure(figsize= (12,12))\nplt.imshow(ds,cmap=plt.cm.bone)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:39.068Z","iopub.execute_input":"2021-10-26T10:28:39.068469Z","iopub.status.idle":"2021-10-26T10:28:48.069987Z","shell.execute_reply.started":"2021-10-26T10:28:39.068431Z","shell.execute_reply":"2021-10-26T10:28:48.069247Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data = get_dicom_files('/kaggle/input/siim-covid19-detection/train')\ndr = dicom_read(train_data[116])\nplt.figure(figsize= (12,12))\nplt.imshow(dr,cmap=plt.cm.bone)\nimage= cv2.imread(str(train_data[116]),0)\nlabels = train_image_level['label']\nboxes = train_image_level['boxes']\nprint(boxes[111])\n#cv2.rectangle(image,)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:28:48.071141Z","iopub.execute_input":"2021-10-26T10:28:48.071668Z","iopub.status.idle":"2021-10-26T10:29:12.902889Z","shell.execute_reply.started":"2021-10-26T10:28:48.071635Z","shell.execute_reply":"2021-10-26T10:29:12.90203Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"classes = train_study_level.columns\nstudy_class = (classes[1:5])\nstudy_class[3]\nimage_class = ['none', 'opacity']","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:12.904344Z","iopub.execute_input":"2021-10-26T10:29:12.904795Z","iopub.status.idle":"2021-10-26T10:29:12.910109Z","shell.execute_reply.started":"2021-10-26T10:29:12.904744Z","shell.execute_reply":"2021-10-26T10:29:12.90919Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"box = boxes[116]","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:12.911588Z","iopub.execute_input":"2021-10-26T10:29:12.911911Z","iopub.status.idle":"2021-10-26T10:29:12.921919Z","shell.execute_reply.started":"2021-10-26T10:29:12.911881Z","shell.execute_reply":"2021-10-26T10:29:12.921119Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np \ndef boxes_params(box):\n    \n    bx = box.split(\"},\")\n    #print(len(bx))  # no of boxes\n    n = len(bx)\n    x = []\n    y= []\n    width = []\n    height= []\n    for i in range(n):\n        b = bx[i]\n        #print(b.split(','))\n        bxx= b.split(',')\n    \n        for i in range(1):\n            #print()\n            x.append(float(bxx[0].split(\":\")[1]))\n            y.append(float(bxx[1].split(\":\")[1]))\n            width.append(float(bxx[2].split(\":\")[1]))\n            height.append(float(bxx[3].strip('}]').split(\":\")[1]))\n    return (x,y,width,height,n)\nx,y,w,h,n = boxes_params(box)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:12.922931Z","iopub.execute_input":"2021-10-26T10:29:12.923264Z","iopub.status.idle":"2021-10-26T10:29:12.935051Z","shell.execute_reply.started":"2021-10-26T10:29:12.923209Z","shell.execute_reply":"2021-10-26T10:29:12.934213Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# x,y,w,h,n","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:12.936013Z","iopub.execute_input":"2021-10-26T10:29:12.936324Z","iopub.status.idle":"2021-10-26T10:29:12.946379Z","shell.execute_reply.started":"2021-10-26T10:29:12.936294Z","shell.execute_reply":"2021-10-26T10:29:12.945516Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2\ndef dicom_display(di,a,b,c,d,n):\n    ima = dicom_read(di)\n    for i in range(n):\n    \n        start = (int(a[i]),int(b[i]))\n        end = (int(c[i]), int(d[i]))\n        color = (255,0,0)\n        thickness = 7\n    \n    \n        im = cv2.rectangle(ima,start,end,color,thickness)\n    plt.figure(figsize=(5,5))\n    plt.imshow(im, cmap=plt.cm.bone )\ndicom_display(train_data[0],x,y,w,h,n)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:12.947407Z","iopub.execute_input":"2021-10-26T10:29:12.947854Z","iopub.status.idle":"2021-10-26T10:29:13.91487Z","shell.execute_reply.started":"2021-10-26T10:29:12.947824Z","shell.execute_reply":"2021-10-26T10:29:13.913574Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# start = (int(x[0]),int(y[0]))\n# end = (int(w[0]), int(h[0]))\n# color = (255,0,0)\n# thickness = 5\n# print(str(train_data[116]))\n# ima = dicom_read(train_data[116])\n\n# #image= cv2.imread(ima)\n\n# im ='/kaggle/input/siim-covid19-detection/test/004bd59708be/e7d024ea82d7/c39146cbda47.dcm'\n# #cv2.rectangle(img,start,end,color,thickness)\n# #cv2.imshow('fs', ima)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:13.916512Z","iopub.execute_input":"2021-10-26T10:29:13.91693Z","iopub.status.idle":"2021-10-26T10:29:13.92168Z","shell.execute_reply.started":"2021-10-26T10:29:13.916881Z","shell.execute_reply":"2021-10-26T10:29:13.920495Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"l= labels[116].split(' ')\nn_l = int(len(l)/6)\ndef labels_params(l):\n    \n    n_l = int(len(l)/6)\n    X = []\n    Y = []\n    W = []\n    H = []\n    for i in range(n_l):\n        j = i*6 \n        if l[j] == 'opacity' :\n            X.append(int(float(l[2 + 6*i])))\n            Y.append(int(float(l[3 + 6*i])))\n            W.append(int(float(l[4 + 6*i])))\n            H.append(int(float(l[5 + 6*i])))\n    return(X,Y,W,H)\nX,Y,W,H = labels_params(l)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:13.923136Z","iopub.execute_input":"2021-10-26T10:29:13.923536Z","iopub.status.idle":"2021-10-26T10:29:13.934713Z","shell.execute_reply.started":"2021-10-26T10:29:13.9235Z","shell.execute_reply":"2021-10-26T10:29:13.933977Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dicom_display(train_data[116],X,Y,W,H,n_l),dicom_display(train_data[116],x,y,w,h,n)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:13.936049Z","iopub.execute_input":"2021-10-26T10:29:13.936616Z","iopub.status.idle":"2021-10-26T10:29:17.452373Z","shell.execute_reply.started":"2021-10-26T10:29:13.936585Z","shell.execute_reply":"2021-10-26T10:29:17.451438Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nima = dicom_read(train_data[0])\nir = cv2.resize(ima, (4020,4020))\nimg2 = np.zeros((4020,4020,3))\nimg2[:,:,0] = ir\nimg2[:,:,1] = ir\nimg2[:,:,2] = ir\nbacktorgb = cv2.cvtColor(ir,cv2.COLOR_GRAY2RGB)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:17.456604Z","iopub.execute_input":"2021-10-26T10:29:17.456912Z","iopub.status.idle":"2021-10-26T10:29:17.906663Z","shell.execute_reply.started":"2021-10-26T10:29:17.45688Z","shell.execute_reply":"2021-10-26T10:29:17.905435Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x = r'{}'.format(train_data[0])\nl = len(x)\nprint(x[1:l])\nimg3 = cv2.imread(img2)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:17.908643Z","iopub.execute_input":"2021-10-26T10:29:17.908984Z","iopub.status.idle":"2021-10-26T10:29:18.083599Z","shell.execute_reply.started":"2021-10-26T10:29:17.908954Z","shell.execute_reply":"2021-10-26T10:29:18.08217Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.imshow(backtorgb)\n","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.084579Z","iopub.status.idle":"2021-10-26T10:29:18.085006Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"##### no. of channels = 1 Refer to https://dicom.innolitics.com/ciods/rt-brachy-treatment-record/rt-brachy-session-record/30080110/30080130/300a0282","metadata":{"execution":{"iopub.status.busy":"2021-05-24T15:18:52.516683Z","iopub.execute_input":"2021-05-24T15:18:52.517069Z","iopub.status.idle":"2021-05-24T15:18:52.541428Z","shell.execute_reply.started":"2021-05-24T15:18:52.517035Z","shell.execute_reply":"2021-05-24T15:18:52.54003Z"}}},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from shutil import copyfile\n\n# copy our file into the working directory (make sure it has .py suffix)\ncopyfile(src = \"../usr/lib/utils/utils.py\", dst = \"../working/utils.py\")\ncopyfile(src = \"../usr/lib/darknet/darknet.py\", dst = \"../working/darknet.py\")\n# import all our functions\nfrom utils import *\nfrom darknet import Darknet","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.086255Z","iopub.status.idle":"2021-10-26T10:29:18.086673Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# for downloading pretrained weights for yolov3 algorithm\n!wget https://pjreddie.com/media/files/yolov3.weights","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.087579Z","iopub.status.idle":"2021-10-26T10:29:18.087979Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cfg_file = '/kaggle/input/yolo-cfg/yolov3.cfg'\n\n\nnames_file = '/kaggle/input/names-study/study_names.names'\n\nweight_names = './yolov3.weights'\n\nm = Darknet(cfg_file)\nm.load_weights(weight_names)\nclass_names = load_class_names(names_file)\n","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.088806Z","iopub.status.idle":"2021-10-26T10:29:18.089207Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"class_names","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.090322Z","iopub.status.idle":"2021-10-26T10:29:18.090735Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"m.print_network()","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.091549Z","iopub.status.idle":"2021-10-26T10:29:18.091942Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"backtorgb = backtorgb.astype('uint8')","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.092746Z","iopub.status.idle":"2021-10-26T10:29:18.093135Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2\nplt.rcParams['figure.figsize'] = [24.0, 14.0]\n\n#img = cv2.imread('/kaggle/input/yolo-cfg/index.jpg')\noriginal_image = cv2.cvtColor(backtorgb, cv2.COLOR_BGR2RGB)\n#CV_Assert( ssize.area() > 0 );\nresized_image = cv2.resize(backtorgb, (m.width, m.height))\n\nplt.subplot(121)\nplt.title('Original Image')\nplt.imshow(backtorgb)\nplt.subplot(122)\nplt.title('Resized Image')\nplt.imshow(resized_image, cmap= plt.cm.bone)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.093925Z","iopub.status.idle":"2021-10-26T10:29:18.094346Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"nms_threshold = 0.6\niou_threshold = 0.4","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.095205Z","iopub.status.idle":"2021-10-26T10:29:18.095629Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"","metadata":{}},{"cell_type":"code","source":"resized_image.reshape(608,608)\nresized_image.shape","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.096436Z","iopub.status.idle":"2021-10-26T10:29:18.096845Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#from utils import *\n#plt.rcParams['figure.figsize'] = [24.0, 14.0]\n\n#mg = cv2.imread('/content/index.jpg')\n\n#original_image = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\n\n#resized_image = cv2.resize(original_image, (m.width, m.height))\nbo = detect_objects(m, resized_image, iou_threshold, nms_threshold)\n#print_objects(bo, class_names )\n#plot_boxes(backtorgb, bo, class_names, plot_labels = True)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.097755Z","iopub.status.idle":"2021-10-26T10:29:18.098171Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"bo[0]","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.099072Z","iopub.status.idle":"2021-10-26T10:29:18.099518Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dicom_display(train_data[116],list(bo[0][1].item()),list(bo[0][2].item()),list(bo[0][3].item()),list(bo[0][4].item()),1)","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.100337Z","iopub.status.idle":"2021-10-26T10:29:18.10074Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ia = dicom_read(train_data[116])\nstar =(bo[0][1].item(),bo[0][2].item())\nen = (bo[0][3].item(), bo[0][4].item())\ncolor = (255,0,0)\nthickness = 7\n    \n    \nim = cv2.rectangle(ia,star,en)\nplt.figure(figsize=(5,5))\nplt.imshow(im, cmap=plt.cm.bone )","metadata":{"execution":{"iopub.status.busy":"2021-10-26T10:29:18.101499Z","iopub.status.idle":"2021-10-26T10:29:18.101894Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}