{"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":"markdown","source":"#  iWildCam2022 Show and Extract\ncf. https://www.kaggle.com/code/stpeteishii/iwildcam2021-make-images-extracted","metadata":{}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport os\nimport json\nimport random\nimport seaborn as sns\n\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport matplotlib.patches as patches\nimport tensorflow as tf\nimport pylab as pl\nfrom PIL import Image\nimport math\n\n#from tensorflow.keras.utils import to_categorical\n#from tensorflow.keras.preprocessing.image import load_img, img_to_array\n#from tensorflow.python.keras.preprocessing.image import ImageDataGenerator\n\n#from sklearn.metrics import classification_report, log_loss, accuracy_score\n#from sklearn.model_selection import train_test_split","metadata":{"papermill":{"duration":7.703936,"end_time":"2021-05-16T14:50:15.108474","exception":false,"start_time":"2021-05-16T14:50:07.404538","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:07.916395Z","iopub.execute_input":"2022-03-30T04:39:07.916899Z","iopub.status.idle":"2022-03-30T04:39:15.507698Z","shell.execute_reply.started":"2022-03-30T04:39:07.916656Z","shell.execute_reply":"2022-03-30T04:39:15.506712Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Check Data Structure","metadata":{"papermill":{"duration":0.018444,"end_time":"2021-05-16T14:50:15.147208","exception":false,"start_time":"2021-05-16T14:50:15.128764","status":"completed"},"tags":[]}},{"cell_type":"code","source":"data_dir = '../input/iwildcam2022-fgvc9/train'\ntest_dir = '../input/iwildcam2022-fgvc9/test'","metadata":{"papermill":{"duration":0.027851,"end_time":"2021-05-16T14:50:15.193866","exception":false,"start_time":"2021-05-16T14:50:15.166015","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:15.510027Z","iopub.execute_input":"2022-03-30T04:39:15.510320Z","iopub.status.idle":"2022-03-30T04:39:15.515815Z","shell.execute_reply.started":"2022-03-30T04:39:15.510283Z","shell.execute_reply":"2022-03-30T04:39:15.513915Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sample=pd.read_csv('../input/iwildcam2022-fgvc9/metadata/metadata/train_sequence_counts.csv')\nsample[0:3]","metadata":{"papermill":{"duration":0.360326,"end_time":"2021-05-16T14:50:15.573094","exception":false,"start_time":"2021-05-16T14:50:15.212768","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:15.517360Z","iopub.execute_input":"2022-03-30T04:39:15.517701Z","iopub.status.idle":"2022-03-30T04:39:15.576195Z","shell.execute_reply.started":"2022-03-30T04:39:15.517646Z","shell.execute_reply":"2022-03-30T04:39:15.575597Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"with open('../input/iwildcam2022-fgvc9/metadata/metadata/iwildcam2022_train_annotations.json') as json_data:\n    train_anno = json.load(json_data)\n    print(train_anno.keys())","metadata":{"papermill":{"duration":2.625255,"end_time":"2021-05-16T14:50:18.218076","exception":false,"start_time":"2021-05-16T14:50:15.592821","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:15.577865Z","iopub.execute_input":"2022-03-30T04:39:15.578504Z","iopub.status.idle":"2022-03-30T04:39:17.313878Z","shell.execute_reply.started":"2022-03-30T04:39:15.578465Z","shell.execute_reply":"2022-03-30T04:39:17.312468Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"with open('../input/iwildcam2022-fgvc9/metadata/metadata/iwildcam2022_test_information.json') as json_data:\n    test_anno = json.load(json_data)\n    print(test_anno.keys())","metadata":{"papermill":{"duration":0.47483,"end_time":"2021-05-16T14:50:18.713426","exception":false,"start_time":"2021-05-16T14:50:18.238596","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:17.314987Z","iopub.execute_input":"2022-03-30T04:39:17.315201Z","iopub.status.idle":"2022-03-30T04:39:17.624102Z","shell.execute_reply.started":"2022-03-30T04:39:17.315173Z","shell.execute_reply":"2022-03-30T04:39:17.623413Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"with open('../input/iwildcam2022-fgvc9/metadata/metadata/iwildcam2022_mdv4_detections.json') as json_data:\n    megadetect = json.load(json_data)\n    print(megadetect.keys())","metadata":{"papermill":{"duration":4.039599,"end_time":"2021-05-16T14:50:22.773676","exception":false,"start_time":"2021-05-16T14:50:18.734077","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:17.625079Z","iopub.execute_input":"2022-03-30T04:39:17.625258Z","iopub.status.idle":"2022-03-30T04:39:21.970847Z","shell.execute_reply.started":"2022-03-30T04:39:17.625234Z","shell.execute_reply":"2022-03-30T04:39:21.970087Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"with open('../input/iwildcam2022-fgvc9/metadata/metadata/gps_locations.json') as json_data:\n    location = json.load(json_data)\n    print(location.keys())","metadata":{"execution":{"iopub.status.busy":"2022-03-30T04:39:21.971910Z","iopub.execute_input":"2022-03-30T04:39:21.972289Z","iopub.status.idle":"2022-03-30T04:39:21.983403Z","shell.execute_reply.started":"2022-03-30T04:39:21.972265Z","shell.execute_reply":"2022-03-30T04:39:21.982473Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_detect = pd.DataFrame(megadetect[\"images\"])\ndf_detect\n#### YOLO info for train and test","metadata":{"papermill":{"duration":0.437163,"end_time":"2021-05-16T14:50:23.232177","exception":false,"start_time":"2021-05-16T14:50:22.795014","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:21.984471Z","iopub.execute_input":"2022-03-30T04:39:21.984726Z","iopub.status.idle":"2022-03-30T04:39:22.443128Z","shell.execute_reply.started":"2022-03-30T04:39:21.984696Z","shell.execute_reply":"2022-03-30T04:39:22.441927Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_detect.loc[0,'detections'][0]['bbox']","metadata":{"execution":{"iopub.status.busy":"2022-03-30T04:39:22.444424Z","iopub.execute_input":"2022-03-30T04:39:22.444638Z","iopub.status.idle":"2022-03-30T04:39:22.462816Z","shell.execute_reply.started":"2022-03-30T04:39:22.444611Z","shell.execute_reply":"2022-03-30T04:39:22.461827Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"with open('../input/iwildcam2022-fgvc9/metadata/metadata/iwildcam2022_test_information.json') as json_data:\n    test_info = json.load(json_data)\n    print(test_info.keys())","metadata":{"papermill":{"duration":0.310441,"end_time":"2021-05-16T14:50:23.564962","exception":false,"start_time":"2021-05-16T14:50:23.254521","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:22.466247Z","iopub.execute_input":"2022-03-30T04:39:22.466675Z","iopub.status.idle":"2022-03-30T04:39:22.689632Z","shell.execute_reply.started":"2022-03-30T04:39:22.466644Z","shell.execute_reply":"2022-03-30T04:39:22.688459Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_test_info=pd.DataFrame(test_info['images'])\ndf_test_info[0:3]","metadata":{"papermill":{"duration":0.28951,"end_time":"2021-05-16T14:50:23.876859","exception":false,"start_time":"2021-05-16T14:50:23.587349","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:22.690746Z","iopub.execute_input":"2022-03-30T04:39:22.690953Z","iopub.status.idle":"2022-03-30T04:39:22.974477Z","shell.execute_reply.started":"2022-03-30T04:39:22.690926Z","shell.execute_reply":"2022-03-30T04:39:22.973054Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_anno=pd.DataFrame(train_anno['annotations'])\ndf_anno[0:3]","metadata":{"papermill":{"duration":0.319765,"end_time":"2021-05-16T14:50:24.219397","exception":false,"start_time":"2021-05-16T14:50:23.899632","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:22.976336Z","iopub.execute_input":"2022-03-30T04:39:22.976605Z","iopub.status.idle":"2022-03-30T04:39:23.308229Z","shell.execute_reply.started":"2022-03-30T04:39:22.976574Z","shell.execute_reply":"2022-03-30T04:39:23.307111Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_cat = pd.DataFrame(train_anno[\"categories\"])\ndf_cat[0:3]","metadata":{"papermill":{"duration":0.040592,"end_time":"2021-05-16T14:50:24.283852","exception":false,"start_time":"2021-05-16T14:50:24.24326","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:23.309643Z","iopub.execute_input":"2022-03-30T04:39:23.310370Z","iopub.status.idle":"2022-03-30T04:39:23.322120Z","shell.execute_reply.started":"2022-03-30T04:39:23.310295Z","shell.execute_reply":"2022-03-30T04:39:23.320859Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"N=[]\nfor i in range(205):\n    N+=[i]\n    \ncat_id=df_cat['id']\nName=df_cat['name']\n\nNM2NU_mapping=dict(zip(Name,N))\nNU2NM_mapping=dict(zip(N,Name))\nNM2ID_mapping=dict(zip(Name,cat_id)) \nID2NM_mapping=dict(zip(cat_id,Name))\nNU2ID_mapping=dict(zip(N,cat_id))\nID2NU_mapping=dict(zip(cat_id,N))  ","metadata":{"papermill":{"duration":0.039125,"end_time":"2021-05-16T14:50:24.347092","exception":false,"start_time":"2021-05-16T14:50:24.307967","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:23.323436Z","iopub.execute_input":"2022-03-30T04:39:23.323681Z","iopub.status.idle":"2022-03-30T04:39:23.345856Z","shell.execute_reply.started":"2022-03-30T04:39:23.323652Z","shell.execute_reply":"2022-03-30T04:39:23.344747Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Function to show image and YOLO rectangle","metadata":{"papermill":{"duration":0.024369,"end_time":"2021-05-16T14:50:24.39631","exception":false,"start_time":"2021-05-16T14:50:24.371941","status":"completed"},"tags":[]}},{"cell_type":"code","source":"# for train data\n\ndef draw_bbox(img_path):\n    \n    img_file=img_path.split('/')[-2:]\n    img_id=img_path.split('/')[-1][0:-4]\n    img=mpimg.imread(img_path)\n    detects=df_detect[df_detect.file==os.path.join(img_file[0],img_file[1])].detections.tolist() \n    print(detects)\n    print(len(detects[0]))   \n    if detects==[[]]:\n        return None\n    else:\n        anno=df_anno[df_anno.image_id==img_id]    ### name\n        cat_id=anno.category_id\n        name=ID2NM_mapping[int(cat_id)]\n        _ = plt.figure(figsize = (10,10))\n        _ = plt.axis('off')\n        ax = plt.gca()\n        ax.text(10,100,f'{name}',fontsize=20,color='fuchsia')\n        for detect in detects[0]:\n            print(detect)\n            x0,y0,w0,h0=detect['bbox']    \n            H,W,_=img.shape\n            x=x0*W\n            y=y0*H\n            w=w0*W\n            h=h0*H\n            cat='animal' if detect['category']==\"1\" else 'human'\n            bbox=patches.FancyBboxPatch((x,y),w,h,alpha=0.8,capstyle='projecting',edgecolor='fuchsia',facecolor=\"none\")\n            ax.text(x+1.5,y-8,f'{cat} {detect[\"conf\"]}',fontsize=10,bbox=dict(facecolor='fuchsia',alpha=0.8,edgecolor=\"none\"))\n            ax.add_patch(bbox)\n\n    _ = plt.imshow(img)","metadata":{"execution":{"iopub.status.busy":"2022-03-30T04:39:23.347274Z","iopub.execute_input":"2022-03-30T04:39:23.347487Z","iopub.status.idle":"2022-03-30T04:39:23.364887Z","shell.execute_reply.started":"2022-03-30T04:39:23.347460Z","shell.execute_reply":"2022-03-30T04:39:23.363629Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# for test data\n\ndef draw_test_bbox(img_path):\n    \n    img_file=img_path.split('/')[-2:]\n    img_id=img_path.split('/')[-1][0:-4]\n    img=mpimg.imread(img_path)\n    detects=df_detect[df_detect.file==os.path.join(img_file[0],img_file[1])].detections.tolist()\n    print(detects)\n    print(len(detects[0])) \n    if detects==[[]]:\n        return None\n    else:\n        _ = plt.figure(figsize = (10,10))\n        _ = plt.axis('off')\n        ax = plt.gca()\n        ax.text(10,100,f'test',fontsize=20,color='fuchsia')\n        for detect in detects[0]:\n            print(detect)\n            x0,y0,w0,h0=detect['bbox']    \n            H,W,_=img.shape\n            x=x0*W\n            y=y0*H\n            w=w0*W\n            h=h0*H\n            cat='animal' if detect['category']==\"1\" else 'human'\n            bbox=patches.FancyBboxPatch((x,y),w,h,alpha=0.8,capstyle='projecting',edgecolor='fuchsia',facecolor=\"none\")\n            ax.text(x+1.5,y-8,f'{cat} {detect[\"conf\"]}',fontsize=10,bbox=dict(facecolor='fuchsia',alpha=0.8,edgecolor=\"none\"))\n            ax.add_patch(bbox)\n\n    _ = plt.imshow(img)","metadata":{"papermill":{"duration":0.039401,"end_time":"2021-05-16T14:50:24.525007","exception":false,"start_time":"2021-05-16T14:50:24.485606","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:23.366583Z","iopub.execute_input":"2022-03-30T04:39:23.366883Z","iopub.status.idle":"2022-03-30T04:39:23.383137Z","shell.execute_reply.started":"2022-03-30T04:39:23.366845Z","shell.execute_reply":"2022-03-30T04:39:23.382143Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path0 = \"../input/iwildcam2022-fgvc9/train/train/915dbc6c-21bc-11ea-a13a-137349068a90.jpg\"\n_ = plt.figure(figsize = (10,10))\n_ = plt.axis('off')\n_ = plt.imshow(mpimg.imread(path0)[100:-100])","metadata":{"papermill":{"duration":0.498425,"end_time":"2021-05-16T14:50:25.047933","exception":false,"start_time":"2021-05-16T14:50:24.549508","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:23.384969Z","iopub.execute_input":"2022-03-30T04:39:23.386223Z","iopub.status.idle":"2022-03-30T04:39:24.245359Z","shell.execute_reply.started":"2022-03-30T04:39:23.386179Z","shell.execute_reply":"2022-03-30T04:39:24.244641Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"draw_bbox(path0)","metadata":{"execution":{"iopub.status.busy":"2022-03-30T04:39:24.246321Z","iopub.execute_input":"2022-03-30T04:39:24.246640Z","iopub.status.idle":"2022-03-30T04:39:25.226535Z","shell.execute_reply.started":"2022-03-30T04:39:24.246611Z","shell.execute_reply":"2022-03-30T04:39:25.225082Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Function to extract rectangle image","metadata":{"papermill":{"duration":0.041778,"end_time":"2021-05-16T14:50:25.794328","exception":false,"start_time":"2021-05-16T14:50:25.75255","status":"completed"},"tags":[]}},{"cell_type":"code","source":"# for train data\n\nobjects=[]\nobjlabels=[]\n\ndef extract_obj(img_path, show=False):\n\n    img_file=img_path.split('/')[-2:]\n    img_id=img_path.split('/')[-1][0:-4]\n    img = mpimg.imread(img_path)\n    detects = df_detect[df_detect.file==os.path.join(img_file[0],img_file[1])].detections.tolist()\n    print(detects)\n    print(len(detects[0]))    \n    if len(detects)>0:      ######     \n        if detects==[[]]:\n            return None\n        else:\n            anno=df_anno[df_anno.image_id==img_id]\n            cat_id=anno.category_id\n            name=ID2NM_mapping[int(cat_id)]\n            for idx,detect in enumerate(detects[0]):\n                x0,y0,w0,h0=detect['bbox']    \n                H,W,_=img.shape\n                if w0*W>100 and h0*H>100:           \n                    x=math.floor(x0*W)\n                    y=math.floor(y0*H)\n                    w=math.floor(w0*W)\n                    h=math.floor(h0*H)\n                    obj=img[int(y):int(y+h),int(x):int(x+w)]\n                    obj1 = Image.fromarray(np.uint8(obj))\n                    obj2 = np.asarray(obj1.resize((32,32))) \n                    objects.append(obj2/255.0)\n                    objlabels.append(name)\n                    if show:\n                        _ = plt.figure(figsize=(3,3))\n                        _ = plt.xticks([])\n                        _ = plt.yticks([])\n                        _ = plt.imshow(obj)\n\n    return None","metadata":{"papermill":{"duration":0.063398,"end_time":"2021-05-16T14:50:25.900027","exception":false,"start_time":"2021-05-16T14:50:25.836629","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:25.228220Z","iopub.execute_input":"2022-03-30T04:39:25.228462Z","iopub.status.idle":"2022-03-30T04:39:25.245450Z","shell.execute_reply.started":"2022-03-30T04:39:25.228431Z","shell.execute_reply":"2022-03-30T04:39:25.244035Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# for test data\n\ntobjects=[]\ntestid=[]\n\ndef extract_test_obj(img_path, show=False):\n\n    img_file=img_path.split('/')[-2:]\n    img_id=img_path.split('/')[-1][0:-4]\n    img = mpimg.imread(img_path)\n    detects = df_detect[df_detect.file==os.path.join(img_file[0],img_file[1])].detections.tolist()\n    print(detects)\n    print(len(detects[0])) \n    if len(detects)>0:      ######   \n        if detects==[[]]:\n            return None\n        else:\n            for idx,detect in enumerate(detects[0]):\n                x0,y0,w0,h0=detect['bbox']    \n                H,W,_=img.shape\n                if w0*W>100 and h0*H>100:\n                    x=math.floor(x0*W)\n                    y=math.floor(y0*H)\n                    w=math.floor(w0*W)\n                    h=math.floor(h0*H)\n                    obj=img[int(y):int(y+h),int(x):int(x+w)]\n                    obj1 = Image.fromarray(np.uint8(obj))\n                    obj2 = np.asarray(obj1.resize((32,32))) \n                    tobjects.append(obj2/255.0)\n                    testid.append(img_id)\n\n                    if show:\n                        _ = plt.figure(figsize=(3,3))\n                        _ = plt.xticks([])\n                        _ = plt.yticks([])\n                        _ = plt.imshow(obj)\n            \n    return None","metadata":{"papermill":{"duration":0.059723,"end_time":"2021-05-16T14:50:26.001987","exception":false,"start_time":"2021-05-16T14:50:25.942264","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:25.247654Z","iopub.execute_input":"2022-03-30T04:39:25.248588Z","iopub.status.idle":"2022-03-30T04:39:25.266078Z","shell.execute_reply.started":"2022-03-30T04:39:25.248503Z","shell.execute_reply":"2022-03-30T04:39:25.265181Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path1='../input/iwildcam2022-fgvc9/train/train/915dbc6c-21bc-11ea-a13a-137349068a90.jpg'","metadata":{"execution":{"iopub.status.busy":"2022-03-30T04:39:25.267180Z","iopub.execute_input":"2022-03-30T04:39:25.267432Z","iopub.status.idle":"2022-03-30T04:39:25.288070Z","shell.execute_reply.started":"2022-03-30T04:39:25.267395Z","shell.execute_reply":"2022-03-30T04:39:25.287403Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"draw_bbox(path1)","metadata":{"papermill":{"duration":0.598342,"end_time":"2021-05-16T14:50:26.642761","exception":false,"start_time":"2021-05-16T14:50:26.044419","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:25.289531Z","iopub.execute_input":"2022-03-30T04:39:25.290519Z","iopub.status.idle":"2022-03-30T04:39:26.246315Z","shell.execute_reply.started":"2022-03-30T04:39:25.290450Z","shell.execute_reply":"2022-03-30T04:39:26.245039Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"extract_obj(path1, show=True)","metadata":{"papermill":{"duration":0.422425,"end_time":"2021-05-16T14:50:27.118645","exception":false,"start_time":"2021-05-16T14:50:26.69622","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:26.247966Z","iopub.execute_input":"2022-03-30T04:39:26.248250Z","iopub.status.idle":"2022-03-30T04:39:26.498930Z","shell.execute_reply.started":"2022-03-30T04:39:26.248212Z","shell.execute_reply":"2022-03-30T04:39:26.498325Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path2='../input/iwildcam2022-fgvc9/test/test/8676fd72-21bc-11ea-a13a-137349068a90.jpg'","metadata":{"execution":{"iopub.status.busy":"2022-03-30T04:39:26.500171Z","iopub.execute_input":"2022-03-30T04:39:26.500522Z","iopub.status.idle":"2022-03-30T04:39:26.504543Z","shell.execute_reply.started":"2022-03-30T04:39:26.500489Z","shell.execute_reply":"2022-03-30T04:39:26.503491Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"draw_test_bbox(path2)","metadata":{"papermill":{"duration":0.530126,"end_time":"2021-05-16T14:50:27.704672","exception":false,"start_time":"2021-05-16T14:50:27.174546","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:26.505924Z","iopub.execute_input":"2022-03-30T04:39:26.506965Z","iopub.status.idle":"2022-03-30T04:39:27.141003Z","shell.execute_reply.started":"2022-03-30T04:39:26.506924Z","shell.execute_reply":"2022-03-30T04:39:27.139984Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"extract_test_obj(path2, show=True)","metadata":{"papermill":{"duration":0.459806,"end_time":"2021-05-16T14:50:28.227144","exception":false,"start_time":"2021-05-16T14:50:27.767338","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-03-30T04:39:27.142082Z","iopub.execute_input":"2022-03-30T04:39:27.142257Z","iopub.status.idle":"2022-03-30T04:39:27.779188Z","shell.execute_reply.started":"2022-03-30T04:39:27.142235Z","shell.execute_reply":"2022-03-30T04:39:27.778372Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"papermill":{"duration":0.064088,"end_time":"2021-05-16T14:50:28.48215","exception":false,"start_time":"2021-05-16T14:50:28.418062","status":"completed"},"tags":[]},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"papermill":{"duration":0.06301,"end_time":"2021-05-16T14:50:28.608652","exception":false,"start_time":"2021-05-16T14:50:28.545642","status":"completed"},"tags":[]},"execution_count":null,"outputs":[]}]}