{"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":"%env CUDA_HOME=/usr/local/cuda-11.8/","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:38:16.718630Z","iopub.execute_input":"2023-06-12T19:38:16.719112Z","iopub.status.idle":"2023-06-12T19:38:16.733700Z","shell.execute_reply.started":"2023-06-12T19:38:16.719065Z","shell.execute_reply":"2023-06-12T19:38:16.732679Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!cp -r /kaggle/input/maskdino-sourcecode /kaggle/working/","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:49:45.888363Z","iopub.execute_input":"2023-06-12T19:49:45.889500Z","iopub.status.idle":"2023-06-12T19:49:47.358859Z","shell.execute_reply.started":"2023-06-12T19:49:45.889463Z","shell.execute_reply":"2023-06-12T19:49:47.357341Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!cp -r /kaggle/input/maskdino-pretrained/maskdino_r50_50ep_300q_hid2048_3sd1_instance_maskenhanced_mask46.3ap_box51.7ap.pth /kaggle/working/maskdino-sourcecode","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:49:47.452301Z","iopub.execute_input":"2023-06-12T19:49:47.452996Z","iopub.status.idle":"2023-06-12T19:49:53.116096Z","shell.execute_reply.started":"2023-06-12T19:49:47.452945Z","shell.execute_reply":"2023-06-12T19:49:53.114743Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!cp -r /kaggle/input/maskdino-pretrained/maskdino_swinl_50ep_300q_hid2048_3sd1_instance_mask52.1ap_box58.3ap.pth /kaggle/working/maskdino-sourcecode","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:49:59.795854Z","iopub.execute_input":"2023-06-12T19:49:59.796258Z","iopub.status.idle":"2023-06-12T19:50:02.010290Z","shell.execute_reply.started":"2023-06-12T19:49:59.796214Z","shell.execute_reply":"2023-06-12T19:50:02.008767Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd /kaggle/working/maskdino-sourcecode/MaskDINO/maskdino/modeling/pixel_decoder/ops","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:38:30.267510Z","iopub.execute_input":"2023-06-12T19:38:30.268209Z","iopub.status.idle":"2023-06-12T19:38:30.277641Z","shell.execute_reply.started":"2023-06-12T19:38:30.268165Z","shell.execute_reply":"2023-06-12T19:38:30.276347Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!sh make.sh","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:38:30.279768Z","iopub.execute_input":"2023-06-12T19:38:30.280111Z","iopub.status.idle":"2023-06-12T19:39:26.191823Z","shell.execute_reply.started":"2023-06-12T19:38:30.280081Z","shell.execute_reply":"2023-06-12T19:39:26.190492Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd /kaggle/working/maskdino-sourcecode/MaskDINO/","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:39:26.195458Z","iopub.execute_input":"2023-06-12T19:39:26.195793Z","iopub.status.idle":"2023-06-12T19:39:26.202533Z","shell.execute_reply.started":"2023-06-12T19:39:26.195761Z","shell.execute_reply":"2023-06-12T19:39:26.201583Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pip install -r requirements.txt","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:39:26.204192Z","iopub.execute_input":"2023-06-12T19:39:26.204532Z","iopub.status.idle":"2023-06-12T19:39:39.065885Z","shell.execute_reply.started":"2023-06-12T19:39:26.204501Z","shell.execute_reply":"2023-06-12T19:39:39.064512Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ls -la /opt/conda/lib/python3.10/site-packages/platformdirs-3.5.0.dist-info/","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:39:39.068513Z","iopub.execute_input":"2023-06-12T19:39:39.069228Z","iopub.status.idle":"2023-06-12T19:39:40.044376Z","shell.execute_reply.started":"2023-06-12T19:39:39.069195Z","shell.execute_reply":"2023-06-12T19:39:40.043154Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:39:40.046622Z","iopub.execute_input":"2023-06-12T19:39:40.047047Z","iopub.status.idle":"2023-06-12T19:43:11.854157Z","shell.execute_reply.started":"2023-06-12T19:39:40.047004Z","shell.execute_reply":"2023-06-12T19:43:11.852908Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!sh train.sh","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:50:05.459591Z","iopub.execute_input":"2023-06-12T19:50:05.460582Z","iopub.status.idle":"2023-06-12T19:53:34.654545Z","shell.execute_reply.started":"2023-06-12T19:50:05.460537Z","shell.execute_reply":"2023-06-12T19:53:34.653124Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2\nimg = cv2.imread(\"/kaggle/input/hubmap-hacking-the-human-vasculature/train/0006ff2aa7cd.tif\")","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:44:34.789158Z","iopub.execute_input":"2023-06-12T19:44:34.789563Z","iopub.status.idle":"2023-06-12T19:44:34.869771Z","shell.execute_reply.started":"2023-06-12T19:44:34.789522Z","shell.execute_reply":"2023-06-12T19:44:34.868785Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimgplot = plt.imshow(img)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:44:34.871093Z","iopub.execute_input":"2023-06-12T19:44:34.871459Z","iopub.status.idle":"2023-06-12T19:44:35.266583Z","shell.execute_reply.started":"2023-06-12T19:44:34.871424Z","shell.execute_reply":"2023-06-12T19:44:35.265762Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(img.shape)","metadata":{"execution":{"iopub.status.busy":"2023-06-12T19:44:35.269973Z","iopub.execute_input":"2023-06-12T19:44:35.270862Z","iopub.status.idle":"2023-06-12T19:44:35.276347Z","shell.execute_reply.started":"2023-06-12T19:44:35.270828Z","shell.execute_reply":"2023-06-12T19:44:35.275100Z"},"trusted":true},"execution_count":null,"outputs":[]}]}