{"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":"This is an example of mmdetection using Faster RCNN,you can change the configuration file code and the weight path to fit your own model. ","metadata":{"papermill":{"duration":0.016492,"end_time":"2021-12-21T15:54:28.099845","exception":false,"start_time":"2021-12-21T15:54:28.083353","status":"completed"},"tags":[]}},{"cell_type":"markdown","source":"Reference:https://www.kaggle.com/mlneo07/mmdetection-swin-transfomer-frcnn-inference-0-443","metadata":{}},{"cell_type":"markdown","source":"# **Install libraries**","metadata":{}},{"cell_type":"code","source":"!pip install '../input/faster-rcnn-mmdetection/fcnn_dep_0/fcnn_dep_0/addict-2.4.0-py3-none-any.whl'\n!pip install '../input/faster-rcnn-mmdetection/fcnn_dep_0/fcnn_dep_0/asttokens-2.0.5-py2.py3-none-any.whl'\n!pip install '../input/faster-rcnn-mmdetection/fcnn_dep_0/fcnn_dep_0/executing-0.8.2-py2.py3-none-any.whl'\n!pip install '../input/faster-rcnn-mmdetection/fcnn_dep_0/fcnn_dep_0/yapf-0.32.0-py2.py3-none-any.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/torch-1.7.0+cu110-cp37-cp37m-linux_x86_64.whl'\n#!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/torchvision-0.8.1+cu110-cp37-cp37m-linux_x86_64.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/terminaltables-3.1.10-py2.py3-none-any.whl' \n#!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/setuptools-46.4.0-py3-none-any.whl' \n#!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/numpy-1.16.0-cp37-cp37m-manylinux1_x86_64.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/mmcv_full-1.3.9-cp37-cp37m-manylinux1_x86_64.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/imagecorruptions-1.1.2-py3-none-any.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/icecream-2.0.0-py2.py3-none-any.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/ensemble_boxes-1.0.8-py3-none-any.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/albumentations-0.5.0-py3-none-any.whl'\n#!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/Pillow-6.2.2-cp37-cp37m-manylinux1_x86_64.whl'\n#!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/Cython-0.29.15-cp37-cp37m-manylinux1_x86_64.whl'\n!pip install '../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_dep/mmpycocotools-12.0.3'","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"papermill":{"duration":250.419371,"end_time":"2021-12-21T16:00:29.906187","exception":false,"start_time":"2021-12-21T15:56:19.486816","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:18:12.020758Z","iopub.execute_input":"2022-01-21T17:18:12.021076Z","iopub.status.idle":"2022-01-21T17:24:44.864784Z","shell.execute_reply.started":"2022-01-21T17:18:12.020993Z","shell.execute_reply":"2022-01-21T17:24:44.863955Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!cp -r ../input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/kaggle_mmdetection /kaggle/working/\n%cd /kaggle/working/kaggle_mmdetection\n!pip install -e .\n%cd ..","metadata":{"execution":{"iopub.status.busy":"2022-01-21T17:24:44.868121Z","iopub.execute_input":"2022-01-21T17:24:44.868605Z","iopub.status.idle":"2022-01-21T17:26:14.397885Z","shell.execute_reply.started":"2022-01-21T17:24:44.868539Z","shell.execute_reply":"2022-01-21T17:26:14.397035Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# **Import libraries**","metadata":{"papermill":{"duration":0.02739,"end_time":"2021-12-21T16:00:30.023448","exception":false,"start_time":"2021-12-21T16:00:29.996058","status":"completed"},"tags":[]}},{"cell_type":"code","source":"import sys, os\nsys.path.append(r'./kaggle_mmdetection')\nsys.path.append(r'../input/tensorflow-great-barrier-reef/greatbarrierreef')\nimport numpy as np\nimport mmdet\nimport mmcv\nfrom mmdet.datasets.builder import build_dataset\nfrom mmdet.models.builder import build_detector\nfrom mmdet.apis.train import train_detector,set_random_seed\nfrom mmdet.apis.inference import inference_detector, init_detector, show_result_pyplot","metadata":{"papermill":{"duration":23.665185,"end_time":"2021-12-21T16:00:53.716392","exception":false,"start_time":"2021-12-21T16:00:30.051207","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:26:14.399725Z","iopub.execute_input":"2022-01-21T17:26:14.40029Z","iopub.status.idle":"2022-01-21T17:26:34.961129Z","shell.execute_reply.started":"2022-01-21T17:26:14.400252Z","shell.execute_reply":"2022-01-21T17:26:34.960367Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# **Model**","metadata":{"papermill":{"duration":0.027024,"end_time":"2021-12-21T16:00:53.890916","exception":false,"start_time":"2021-12-21T16:00:53.863892","status":"completed"},"tags":[]}},{"cell_type":"code","source":"\n\n%%writefile /kaggle/working/kaggle_mmdetection/output/faster_rcnn/faster_rcnn_r50_fpn_1x_coco_starfish.py\n\n\nfp16 = dict(loss_scale=512.)  #混合精度训练\n# model settings\nmodel = dict(\n    type='FasterRCNN',  #检测算法\n    pretrained=None,  # 预训练模型,None:自己加载，不选择在线下载\n    backbone=dict(\n        type='ResNet',  #骨干网\n        depth=50,       #层数：50,101,152\n        num_stages=4,   #resnet的stage数量\n        out_indices=(0, 1, 2, 3), # 输出的stage的序号\n        frozen_stages=1, #冻结第一个stage, 即该stage不更新参数\n        norm_cfg=dict(type='BN', requires_grad=True),\n        norm_eval=True,\n        style='pytorch',\n        #init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),\n    ),\n    neck=dict(\n        type='FPN',  # neck类型\n        in_channels=[256, 512, 1024, 2048],  # 输入的各个stage的通道数\n        out_channels=256,  # 输出的特征层的通道数\n        num_outs=5),     # 输出的特征层的数量\n    rpn_head=dict(\n        type='RPNHead',    # RPN网络类型\n        in_channels=256,   # RPN网络的输入通道数\n        feat_channels=256, # 特征层的通道数\n        anchor_generator=dict(\n            type='AnchorGenerator',\n            scales=[8],    # 生成的anchor的baselen，baselen = sqrt(w*h)，w和h为anchor的宽和高\n            ratios=[0.5, 1.0, 2.0],  # anchor的宽高比\n            strides=[4, 8, 16, 32, 64]),  # 在每个特征层上的anchor的步长（对应于原图）\n        bbox_coder=dict(\n            type='DeltaXYWHBBoxCoder',\n            target_means=[.0, .0, .0, .0],  # 均值\n            target_stds=[1.0, 1.0, 1.0, 1.0]),  # 方差\n        loss_cls=dict(\n            type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),   \n            # 是否使用sigmoid来进行分类，如果False则使用softmax来分类\n        loss_bbox=dict(type='L1Loss', loss_weight=1.0)),\n    roi_head=dict(\n        type='StandardRoIHead',  # RoIExtractor类型\n        bbox_roi_extractor=dict(\n            type='SingleRoIExtractor',\n            roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),  \n            # ROI具体参数：ROI类型为ROIalign，输出尺寸为7，sample数为2\n            out_channels=256,    # 输出通道数\n            featmap_strides=[4, 8, 16, 32]),   # 特征图的步长\n        bbox_head=dict(\n            type='Shared2FCBBoxHead',   # 全连接层类型\n            in_channels=256,             # 全连接层数量\n            fc_out_channels=1024,       # 输入通道数\n            roi_feat_size=7,            # 输出通道数\n            #num_classes=12,             # 分类器的类别数量\n            num_classes=1,             # 分类器的类别数量\n            bbox_coder=dict(\n                type='DeltaXYWHBBoxCoder',\n                target_means=[0., 0., 0., 0.],\n                target_stds=[0.1, 0.1, 0.2, 0.2]),\n            reg_class_agnostic=False,    \n            # 是否采用class_agnostic的方式来预测，class_agnostic表示输出bbox时只考虑其是否为前景，\n            # 后续分类的时候再根据该bbox在网络中的类别得分来分类，也就是说一个框可以对应多个类别\n            loss_cls=dict(\n                type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),\n            loss_bbox=dict(type='L1Loss', loss_weight=1.0))))\n\n# model training and testing settings\ntrain_cfg=dict(\n    rpn=dict(\n        assigner=dict(\n            type='MaxIoUAssigner',  # RPN网络的正负样本划分\n            pos_iou_thr=0.7,        # 正样本的iou阈值\n            neg_iou_thr=0.3,        # 负样本的iou阈值\n            min_pos_iou=0.3,        # 正样本的iou最小值。\n            #如果assign给ground truth的anchors中最大的IOU低于0.3，则忽略所有的anchors，否则保留最大IOU的anchor\n            match_low_quality=True,\n            ignore_iof_thr=-1),     # 忽略bbox的阈值，当ground truth中包含需要忽略的bbox时使用，-1表示不忽略\n        sampler=dict(\n            type='RandomSampler',   # 正负样本提取器类型\n            num=256,                # 需提取的正负样本数量\n            pos_fraction=0.5,        # 正样本比例\n            neg_pos_ub=-1,          # 最大负样本比例，大于该比例的负样本忽略，-1表示不忽略\n            add_gt_as_proposals=False),  # 把ground truth加入proposal作为正样本\n        allowed_border=-1,          # 不允许在bbox周围外扩一定的像素, 0允许\n        pos_weight=-1,              # 正样本权重，-1表示不改变原始的权重\n        debug=False),               \n    rpn_proposal=dict(\n        nms_pre=2000,               # 在nms之前保留的的得分最高的proposal数量\n        max_per_img=1000,           # 在nms之后保留的的得分最高的proposal数量\n        nms=dict(type='nms', iou_threshold=0.7), # nms阈值\n        min_bbox_size=0),           # 最小bbox尺寸\n    rcnn=dict(\n        assigner=dict(\n            type='MaxIoUAssigner',    # RCNN网络正负样本划分\n            pos_iou_thr=0.3,           # 正样本的iou阈值\n            neg_iou_thr=0.3,           # 负样本的iou阈值\n            min_pos_iou=0.3,           \n# 正样本的iou最小值。如果assign给ground truth的anchors中最大的IOU低于0.3，则忽略所有的anchors，否则保留最大IOU的anchor\n            match_low_quality=False,\n            ignore_iof_thr=-1),        # 忽略bbox的阈值，当ground truth中包含需要忽略的bbox时使用，-1表示不忽略\n        sampler=dict(\n            type='RandomSampler',      # 正负样本提取器类型\n            num=512,                   # 需提取的正负样本数量\n            pos_fraction=0.25,         # 正样本比例\n            neg_pos_ub=-1,             # 最大负样本比例，大于该比例的负样本忽略，-1表示不忽略\n            add_gt_as_proposals=True), # 把ground truth加入proposal作为正样本\n        pos_weight=-1,                 # 正样本权重，-1表示不改变原始的权重\n        debug=False))\n\ntest_cfg=dict(\n    rpn=dict(\n        nms_pre=1000,\n        max_per_img=1000,\n        nms=dict(type='nms', iou_threshold=0.7),\n        min_bbox_size=0),\n    rcnn=dict(\n        score_thr=0.05,\n        nms=dict(type='nms', iou_threshold=0.5),\n        max_per_img=100)\n)\n\n# data setting\ndataset_type = 'StarfishDataset'   # 数据集类型\n#data_root = '/cache/kaggle_dataset/'  # 数据集根目录\ndata_root = '/kaggle/working/kaggle_mmdetection/kaggle_dataset/'  # 数据集根目录\nimg_norm_cfg = dict(\n    mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) \n    # 输入图像初始化，减去均值mean并处以方差std，to_rgb表示将bgr转为rgb\ntrain_pipeline = [\ndict(type='LoadImageFromFile'),\n    dict(type='LoadAnnotations', with_bbox=True),\n    #dict(type='MixUp',p=0.5, lambd=0.5),   #图像混合\n    dict(type='Resize', img_scale=[(4096, 600), (4096, 1000)],\n         multiscale_mode='range', keep_ratio=True),\n    #dict(type='Rotate', prob=0.5,level=10, max_rotate_angle=30), #图像旋转 30\n    dict(type='RandomFlip', direction=['horizontal'], flip_ratio=0.5),\n    #dict(type='BBoxJitter', min=0.95, max=1.05),   #框抖动\n    dict(type='Normalize', **img_norm_cfg),\n    dict(type='Pad', size_divisor=32),\n    #dict(type='Grid', use_w=True, use_h=True),  #掩码遮挡\n    dict(type='DefaultFormatBundle'),\n    dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),\n]\ntest_pipeline = [\n    dict(type='LoadImageFromFile'),\n    dict(\n        type='MultiScaleFlipAug',\n        img_scale=[(4096, 600),(4096, 800),(4096, 1000)], # 输入图像尺寸\n        flip=True,  # 是否翻转\n        transforms=[\n            dict(type='Resize', keep_ratio=True),   \n            dict(type='RandomFlip'), \n            dict(type='Normalize', **img_norm_cfg),\n            dict(type='Pad', size_divisor=32),  \n            dict(type='ImageToTensor', keys=['img']),\n            dict(type='Collect', keys=['img']),\n        ])\n]\ndata = dict(\n    samples_per_gpu=1,   # 每个gpu计算的图像数量\n    workers_per_gpu=1,   # 每个gpu分配的线程数\n    train=dict(\n        type=dataset_type,\n        ann_file=data_root + 'annotations/train.json',  # 数据集annotation路径\n        img_prefix=data_root + 'train2017',    # 数据集annotation路径\n        pipeline=train_pipeline),\n    val=dict(\n        type=dataset_type,\n        #ann_file=data_root + 'annotations/instances_train2017.json',\n        ann_file=data_root + 'annotations/valid.json',\n        img_prefix=data_root + 'val2017',\n        pipeline=test_pipeline),\n    test=dict(\n        type=dataset_type,\n        ann_file='cache/test.json',\n        img_prefix='cache/test',\n        pipeline=test_pipeline))\n\n# optimizer\noptimizer = dict(type='SGD',lr=0.00125, momentum=0.9, weight_decay=0.0001)\noptimizer_config = dict(grad_clip=None)\n# learning policy\nlr_config = dict(policy='step', warmup='linear', warmup_iters=500,  \nwarmup_ratio=1.0 / 3, step=[8, 11])   \n# 优化策略, 初始的学习率增加的策略，linear为线性增加\n# 在初始的500次迭代中学习率逐渐增加\n# 起始的学习率,在第8和11个epoch时降低学习率\nlog_config = dict(interval=100,   # 每100个batch输出一次信息\n    hooks=[\n        dict(type='TextLoggerHook'),   # 控制台输出信息的风格\n    ])\ncustom_hooks = [dict(type='NumClassCheckHook')] \ndist_params = dict(backend='nccl')\nlog_level = 'INFO'\ncheckpoint_config = dict(interval=1) # 每1个epoch存储一次模型\n#evaluation = dict(interval=4, metric='bbox') # 每4个epoch测试一次\nevaluation = dict(interval=2, metric='bbox') # 每2个epoch测试一次\n#runner = dict(type='EpochBasedRunner', max_epochs=12)  # 最大epoch数\nrunner = dict(type='EpochBasedRunner', max_epochs=30)  # 最大epoch数\n# runtime\n#load_from = r'/cache/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth'\nload_from = r'/kaggle/working/pre_model/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth'\n# 加载模型的路径，None表示从预训练模型加载\n#work_dir = r'/cache/log/'  # log文件和模型文件存储路径\nwork_dir = r'/kaggle/working/kaggle_mmdetection/output/faster_rcnn'  # log文件和模型文件存储路径\nresume_from = None    # 恢复训练模型的路径\nworkflow = [('train', 1)]   # 当前工作区名称\n","metadata":{"execution":{"iopub.status.busy":"2022-01-21T17:26:34.962751Z","iopub.execute_input":"2022-01-21T17:26:34.963019Z","iopub.status.idle":"2022-01-21T17:26:34.975696Z","shell.execute_reply.started":"2022-01-21T17:26:34.962982Z","shell.execute_reply":"2022-01-21T17:26:34.974121Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from mmcv import Config\ncfg = Config.fromfile('/kaggle/working/kaggle_mmdetection/output/faster_rcnn/faster_rcnn_r50_fpn_1x_coco_starfish.py')","metadata":{"papermill":{"duration":0.050086,"end_time":"2021-12-21T16:00:53.968304","exception":false,"start_time":"2021-12-21T16:00:53.918218","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:26:34.978147Z","iopub.execute_input":"2022-01-21T17:26:34.978551Z","iopub.status.idle":"2022-01-21T17:26:35.001998Z","shell.execute_reply.started":"2022-01-21T17:26:34.978395Z","shell.execute_reply":"2022-01-21T17:26:35.0013Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%writefile labels.txt \nstarfish","metadata":{"papermill":{"duration":0.03324,"end_time":"2021-12-21T16:00:54.029361","exception":false,"start_time":"2021-12-21T16:00:53.996121","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:26:35.003469Z","iopub.execute_input":"2022-01-21T17:26:35.003733Z","iopub.status.idle":"2022-01-21T17:26:35.008428Z","shell.execute_reply.started":"2022-01-21T17:26:35.003701Z","shell.execute_reply":"2022-01-21T17:26:35.007701Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# **Inference**","metadata":{"papermill":{"duration":0.02723,"end_time":"2021-12-21T16:00:59.219889","exception":false,"start_time":"2021-12-21T16:00:59.192659","status":"completed"},"tags":[]}},{"cell_type":"code","source":"def format_prediction_string(boxes, scores):\n    pred_strings = []\n    for j in zip(scores, boxes):\n        pred_strings.append(\"{0:.4f} {1} {2} {3} {4}\".format(j[0], j[1][0], j[1][1], j[1][2], j[1][3]))\n\n    return \" \".join(pred_strings)","metadata":{"papermill":{"duration":0.034545,"end_time":"2021-12-21T16:00:59.281946","exception":false,"start_time":"2021-12-21T16:00:59.247401","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:26:35.009985Z","iopub.execute_input":"2022-01-21T17:26:35.010516Z","iopub.status.idle":"2022-01-21T17:26:35.017407Z","shell.execute_reply.started":"2022-01-21T17:26:35.010479Z","shell.execute_reply":"2022-01-21T17:26:35.01655Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import greatbarrierreef\n\nenv = greatbarrierreef.make_env()   # initialize the environment\niter_test = env.iter_test()  ","metadata":{"papermill":{"duration":0.053024,"end_time":"2021-12-21T16:00:59.362173","exception":false,"start_time":"2021-12-21T16:00:59.309149","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:26:35.018927Z","iopub.execute_input":"2022-01-21T17:26:35.019224Z","iopub.status.idle":"2022-01-21T17:26:35.049216Z","shell.execute_reply.started":"2022-01-21T17:26:35.01919Z","shell.execute_reply":"2022-01-21T17:26:35.048603Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model = init_detector(cfg, '/kaggle/input/faster-rcnn-mmdetection/faster_rcnn_mmdetection/fcnn_pth/epoch_4.pth')","metadata":{"papermill":{"duration":10.386356,"end_time":"2021-12-21T16:01:09.776809","exception":false,"start_time":"2021-12-21T16:00:59.390453","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:26:35.050243Z","iopub.execute_input":"2022-01-21T17:26:35.050555Z","iopub.status.idle":"2022-01-21T17:26:47.241776Z","shell.execute_reply.started":"2022-01-21T17:26:35.050519Z","shell.execute_reply":"2022-01-21T17:26:47.24103Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#################################### faster rcnn ############################################\n# device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')\n\n# model = build_detector(cfg.model, train_cfg=None, test_cfg=cfg.test_cfg)\n# checkpoint = load_checkpoint(model, WEIGHTS_FILE, map_location='cpu')\n\n# model.CLASSES = dataset.CLASSES\n\n# model = MMDataParallel(model, device_ids=[0])\n# outputs = single_gpu_test(model, data_loader, False, None, 0.5)\n\nresults = []\n\nfor (pixel_array, sample_prediction_df) in iter_test:\n    result = inference_detector(model, pixel_array[:, :, ::-1])\n#     show_result_pyplot(model, pixel_array[:, :, ::-1], result)    \n    boxes = result[0][:, :4]\n    scores = result[0][:, 4]\n\n    boxes[:, 2] = boxes[:, 2] - boxes[:, 0]\n    boxes[:, 3] = boxes[:, 3] - boxes[:, 1]\n\n    \n    sample_prediction_df['annotations'] = format_prediction_string(boxes, scores)\n    \n    env.predict(sample_prediction_df)","metadata":{"papermill":{"duration":0.948072,"end_time":"2021-12-21T16:01:10.754265","exception":false,"start_time":"2021-12-21T16:01:09.806193","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2022-01-21T17:26:47.243223Z","iopub.execute_input":"2022-01-21T17:26:47.243451Z","iopub.status.idle":"2022-01-21T17:26:49.735056Z","shell.execute_reply.started":"2022-01-21T17:26:47.243418Z","shell.execute_reply":"2022-01-21T17:26:49.734195Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%rm -rf kaggle_mmdetection\n%rm labels.txt","metadata":{"execution":{"iopub.status.busy":"2022-01-21T17:27:44.846266Z","iopub.execute_input":"2022-01-21T17:27:44.846844Z","iopub.status.idle":"2022-01-21T17:27:45.674469Z","shell.execute_reply.started":"2022-01-21T17:27:44.846804Z","shell.execute_reply":"2022-01-21T17:27:45.673505Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}