{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceType":"competition","sourceId":24800,"datasetId":1042002,"databundleVersionId":1831594},{"sourceType":"datasetVersion","sourceId":1810939,"datasetId":1075804,"databundleVersionId":1848423},{"sourceType":"datasetVersion","sourceId":1950595,"datasetId":1164135,"databundleVersionId":1989350}],"dockerImageVersionId":30043,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# VinBigData detectron2 train\n\n\nThis competition is object detaction task to find a class and location of thoracic abnormalities from chest x-ray image (radiographs).\n\n`detectron2` is one of the famous pytorch object detection library, I will introduce how to use this library to train models provided by this library with this competition's data!\n\n - https://github.com/facebookresearch/detectron2\n\n> Detectron2 is Facebook AI Research's next generation software system that implements state-of-the-art object detection algorithms. It is a ground-up rewrite of the previous version, Detectron, and it originates from maskrcnn-benchmark.\n![](https://user-images.githubusercontent.com/1381301/66535560-d3422200-eace-11e9-9123-5535d469db19.png)\n\n\n[UPDATE 2021/1/11] I published prediction kernel, please check https://www.kaggle.com/corochann/vinbigdata-detectron2-prediction too!\n\n[UPDATE 2021/1/24] I added more advanced usage to customize <code>detectron2</code>, especially:\n\n - How to define & use `mapper` to add your customized augmentation.\n - Use validation data during training.\n - Define `Evaluator` and calculating competition metric, AP40.\n - Define `Hook` to calculate validation loss & plotting training/validation loss curve.\n\n<div style=\"color:red\">\n    [UPDATE 2021/2/18] Added links to relevant useful discussions in \"Next step\" topic.</div>","metadata":{}},{"cell_type":"markdown","source":"# Table of Contents\n\n** [Dataset preparation](#dataset)** <br/>\n** [Installation](#installation)** <br/>\n** [Training method implementations](#train_method)** <br/>\n** [Customizing detectron2 trainer](#custom_trainer) ** [Advanced topic, skip it first time] <br/>\n**   - [Mapper for augmentation](#mapper)** <br/>\n**   - [Evaluator](#evaluator)** <br/>\n**   - [Loss evaluation hook](#loss_hook)** <br/>\n** [Loading Data](#load_data)** <br/>\n** [Data Visualization](#data_vis)** <br/>\n** [Training](#training)** <br/>\n** [Visualize loss curve & competition metric AP40](#vis_loss)** <br/>\n** [Visualization of augmentation by Mapper](#vis_aug)** <br/>\n** [Next step](#next_step)** <br/>","metadata":{}},{"cell_type":"markdown","source":"<a id=\"dataset\"></a>\n# Dataset preparation\n\nPreprocessing x-ray image format (dicom) into normal png image format is already done by @xhlulu in the below discussion:\n - [Multiple preprocessed datasets: 256/512/1024px, PNG and JPG, modified and original ratio](https://www.kaggle.com/c/vinbigdata-chest-xray-abnormalities-detection/discussion/207955).\n\nHere I will just use the dataset [VinBigData Chest X-ray Resized PNG (256x256)](https://www.kaggle.com/xhlulu/vinbigdata-chest-xray-resized-png-256x256) to skip the preprocessing and focus on modeling part.\n\nI also uploaded the original sized png images:\n - [vinbigdata-chest-xray-original-png](https://www.kaggle.com/corochann/vinbigdata-chest-xray-original-png) ([notebook](https://www.kaggle.com/corochann/preprocessing-image-original-size-lossless-png) on kaggle fails due to disk limit)\n\nPlease upvote the dataset as well!","metadata":{}},{"cell_type":"code","source":"import gc\nimport os\nfrom pathlib import Path\nimport random\nimport sys\n\nfrom tqdm.notebook import tqdm\nimport numpy as np\nimport pandas as pd\nimport scipy as sp\n\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfrom IPython.core.display import display, HTML\n\n# --- plotly ---\nfrom plotly import tools, subplots\nimport plotly.offline as py\npy.init_notebook_mode(connected=True)\nimport plotly.graph_objs as go\nimport plotly.express as px\nimport plotly.figure_factory as ff\nimport plotly.io as pio\npio.templates.default = \"plotly_dark\"\n\n# --- models ---\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import KFold\nimport lightgbm as lgb\nimport xgboost as xgb\nimport catboost as cb\n\n# --- setup ---\npd.set_option('display.max_columns', 50)\n","metadata":{"_kg_hide-input":true,"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:02:14.27257Z","iopub.execute_input":"2026-04-10T18:02:14.273168Z","iopub.status.idle":"2026-04-10T18:02:18.864087Z","shell.execute_reply.started":"2026-04-10T18:02:14.273138Z","shell.execute_reply":"2026-04-10T18:02:18.863276Z"}},"outputs":[{"output_type":"display_data","data":{"text/html":"        <script type=\"text/javascript\">\n        window.PlotlyConfig = {MathJaxConfig: 'local'};\n        if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n        if (typeof require !== 'undefined') {\n        require.undef(\"plotly\");\n        requirejs.config({\n            paths: {\n                'plotly': ['https://cdn.plot.ly/plotly-2.35.2.min']\n            }\n        });\n        require(['plotly'], function(Plotly) {\n            window._Plotly = Plotly;\n        });\n        }\n        </script>\n        "},"metadata":{}}],"execution_count":2},{"cell_type":"markdown","source":"<a id=\"installation\"></a>\n# Installation\n\ndetectron2 is not pre-installed in this kaggle docker, so let's install it. \nWe can follow [installation instruction](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md), we need to know CUDA and pytorch version to install correct `detectron2`.","metadata":{}},{"cell_type":"code","source":"!nvidia-smi","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:02:22.706299Z","iopub.execute_input":"2026-04-10T18:02:22.70722Z","iopub.status.idle":"2026-04-10T18:02:22.886563Z","shell.execute_reply.started":"2026-04-10T18:02:22.707188Z","shell.execute_reply":"2026-04-10T18:02:22.885837Z"}},"outputs":[{"name":"stdout","text":"Fri Apr 10 18:02:22 2026       \n+-----------------------------------------------------------------------------------------+\n| NVIDIA-SMI 580.105.08             Driver Version: 580.105.08     CUDA Version: 13.0     |\n+-----------------------------------------+------------------------+----------------------+\n| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |\n| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |\n|                                         |                        |               MIG M. |\n|=========================================+========================+======================|\n|   0  Tesla P100-PCIE-16GB           Off |   00000000:00:04.0 Off |                    0 |\n| N/A   34C    P0             25W /  250W |       0MiB /  16384MiB |      0%      Default |\n|                                         |                        |                  N/A |\n+-----------------------------------------+------------------------+----------------------+\n\n+-----------------------------------------------------------------------------------------+\n| Processes:                                                                              |\n|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |\n|        ID   ID                                                               Usage      |\n|=========================================================================================|\n|  No running processes found                                                             |\n+-----------------------------------------------------------------------------------------+\n","output_type":"stream"}],"execution_count":3},{"cell_type":"code","source":"!nvcc --version","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:02:25.17478Z","iopub.execute_input":"2026-04-10T18:02:25.175358Z","iopub.status.idle":"2026-04-10T18:02:25.306462Z","shell.execute_reply.started":"2026-04-10T18:02:25.175326Z","shell.execute_reply":"2026-04-10T18:02:25.305713Z"}},"outputs":[{"name":"stdout","text":"nvcc: NVIDIA (R) Cuda compiler driver\nCopyright (c) 2005-2025 NVIDIA Corporation\nBuilt on Fri_Feb_21_20:23:50_PST_2025\nCuda compilation tools, release 12.8, V12.8.93\nBuild cuda_12.8.r12.8/compiler.35583870_0\n","output_type":"stream"}],"execution_count":4},{"cell_type":"code","source":"!pip install --upgrade pip","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:06:18.441912Z","iopub.execute_input":"2026-04-10T18:06:18.44276Z","iopub.status.idle":"2026-04-10T18:06:20.503472Z","shell.execute_reply.started":"2026-04-10T18:06:18.442717Z","shell.execute_reply":"2026-04-10T18:06:20.502753Z"}},"outputs":[{"name":"stdout","text":"Requirement already satisfied: pip in /usr/local/lib/python3.12/dist-packages (26.0.1)\n","output_type":"stream"}],"execution_count":16},{"cell_type":"code","source":"!pip uninstall -y torch torchvision torchaudio","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:02:30.835197Z","iopub.execute_input":"2026-04-10T18:02:30.835999Z","iopub.status.idle":"2026-04-10T18:02:31.571445Z","shell.execute_reply.started":"2026-04-10T18:02:30.835962Z","shell.execute_reply":"2026-04-10T18:02:31.570641Z"}},"outputs":[{"name":"stdout","text":"\u001b[33mWARNING: Skipping torch as it is not installed.\u001b[0m\u001b[33m\n\u001b[0m\u001b[33mWARNING: Skipping torchvision as it is not installed.\u001b[0m\u001b[33m\n\u001b[0m\u001b[33mWARNING: Skipping torchaudio as it is not installed.\u001b[0m\u001b[33m\n\u001b[0m","output_type":"stream"}],"execution_count":6},{"cell_type":"code","source":"!pip install torch==2.2.2+cu118 torchvision==0.17.2+cu118 \\\n--extra-index-url https://download.pytorch.org/whl/cu118","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:02:34.202236Z","iopub.execute_input":"2026-04-10T18:02:34.202531Z","iopub.status.idle":"2026-04-10T18:03:08.174701Z","shell.execute_reply.started":"2026-04-10T18:02:34.202504Z","shell.execute_reply":"2026-04-10T18:03:08.173961Z"}},"outputs":[{"name":"stdout","text":"Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118\nCollecting torch==2.2.2+cu118\n  Downloading https://download-r2.pytorch.org/whl/cu118/torch-2.2.2%2Bcu118-cp312-cp312-linux_x86_64.whl (819.1 MB)\n\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m819.1/819.1 MB\u001b[0m \u001b[31m45.2 MB/s\u001b[0m  \u001b[33m0:00:07\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting torchvision==0.17.2+cu118\n  Downloading https://download-r2.pytorch.org/whl/cu118/torchvision-0.17.2%2Bcu118-cp312-cp312-linux_x86_64.whl (6.2 MB)\n\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.2/6.2 MB\u001b[0m \u001b[31m118.4 MB/s\u001b[0m  \u001b[33m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (3.24.3)\nRequirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (4.15.0)\nRequirement already satisfied: sympy in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (1.14.0)\nRequirement already satisfied: networkx in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (3.6.1)\nRequirement already satisfied: jinja2 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (3.1.6)\nRequirement already satisfied: fsspec in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (2026.2.0)\nRequirement already satisfied: nvidia-cuda-nvrtc-cu11==11.8.89 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.89)\nRequirement already satisfied: nvidia-cuda-runtime-cu11==11.8.89 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.89)\nRequirement already satisfied: nvidia-cuda-cupti-cu11==11.8.87 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.87)\nRequirement already satisfied: nvidia-cudnn-cu11==8.7.0.84 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (8.7.0.84)\nRequirement already satisfied: nvidia-cublas-cu11==11.11.3.6 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.11.3.6)\nRequirement already satisfied: nvidia-cufft-cu11==10.9.0.58 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (10.9.0.58)\nRequirement already satisfied: nvidia-curand-cu11==10.3.0.86 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (10.3.0.86)\nRequirement already satisfied: nvidia-cusolver-cu11==11.4.1.48 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.4.1.48)\nRequirement already satisfied: nvidia-cusparse-cu11==11.7.5.86 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.7.5.86)\nRequirement already satisfied: nvidia-nccl-cu11==2.19.3 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (2.19.3)\nRequirement already satisfied: nvidia-nvtx-cu11==11.8.86 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.86)\nRequirement already satisfied: numpy in /usr/local/lib/python3.12/dist-packages (from torchvision==0.17.2+cu118) (2.0.2)\nRequirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.12/dist-packages (from torchvision==0.17.2+cu118) (11.3.0)\nRequirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/dist-packages (from jinja2->torch==2.2.2+cu118) (3.0.3)\nRequirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.12/dist-packages (from sympy->torch==2.2.2+cu118) (1.3.0)\nInstalling collected packages: torch, torchvision\n\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/2\u001b[0m [torchvision]\u001b[0m [torchvision]\n\u001b[1A\u001b[2KSuccessfully installed torch-2.2.2+cu118 torchvision-0.17.2+cu118\n","output_type":"stream"}],"execution_count":7},{"cell_type":"code","source":"import torch\n\ntorch.__version__","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:03:21.102293Z","iopub.execute_input":"2026-04-10T18:03:21.103442Z","iopub.status.idle":"2026-04-10T18:03:21.10821Z","shell.execute_reply.started":"2026-04-10T18:03:21.103409Z","shell.execute_reply":"2026-04-10T18:03:21.107464Z"}},"outputs":[{"execution_count":9,"output_type":"execute_result","data":{"text/plain":"'2.2.2+cu118'"},"metadata":{}}],"execution_count":9},{"cell_type":"code","source":"# 1. Gỡ tận gốc PyTorch của Kaggle và các thư viện dính dáng\n!pip uninstall -y torch torchvision torchaudio detectron2 fastai\n\n# 2. Xóa sạch bộ nhớ đệm\n!pip cache purge\n\n# 3. Cài đặt bản PyTorch chính hãng từ server gốc (CUDA 12.1 siêu ổn định định)\n!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121\n\n# 4. Cài đặt bộ công cụ biên dịch\n!pip install ninja pyyaml setuptools==69.5.1 wheel \"cython<3.0.0\"\n\n# 5. Build Detectron2 dựa trên PyTorch chính hãng (Card P100)\n!TORCH_CUDA_ARCH_LIST=\"6.0\" pip install --no-build-isolation --no-cache-dir -v 'git+https://github.com/facebookresearch/detectron2.git'","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:12:32.011224Z","iopub.execute_input":"2026-04-10T18:12:32.01192Z","iopub.status.idle":"2026-04-10T18:15:19.792735Z","shell.execute_reply.started":"2026-04-10T18:12:32.011889Z","shell.execute_reply":"2026-04-10T18:15:19.791889Z"}},"outputs":[{"name":"stdout","text":"Found existing installation: torch 2.5.1+cu121\nUninstalling torch-2.5.1+cu121:\n  Successfully uninstalled torch-2.5.1+cu121\nFound existing installation: torchvision 0.20.1+cu121\nUninstalling torchvision-0.20.1+cu121:\n  Successfully uninstalled torchvision-0.20.1+cu121\nFound existing installation: torchaudio 2.5.1+cu121\nUninstalling torchaudio-2.5.1+cu121:\n  Successfully uninstalled torchaudio-2.5.1+cu121\n\u001b[33mWARNING: Skipping detectron2 as it is not installed.\u001b[0m\u001b[33m\n\u001b[0m\u001b[33mWARNING: Skipping fastai as it is not installed.\u001b[0m\u001b[33m\n\u001b[0mFiles removed: 50 (2812.3 MB)\nDirectories removed: 0\nLooking in indexes: https://download.pytorch.org/whl/cu121\nCollecting torch\n  Downloading https://download-r2.pytorch.org/whl/cu121/torch-2.5.1%2Bcu121-cp312-cp312-linux_x86_64.whl (780.4 MB)\n\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m780.4/780.4 MB\u001b[0m \u001b[31m48.3 MB/s\u001b[0m  \u001b[33m0:00:07\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting torchvision\n  Downloading https://download-r2.pytorch.org/whl/cu121/torchvision-0.20.1%2Bcu121-cp312-cp312-linux_x86_64.whl (7.3 MB)\n\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.3/7.3 MB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m  \u001b[33m0:00:02\u001b[0m0m eta \u001b[36m0:00:01\u001b[0m\n\u001b[?25hCollecting torchaudio\n  Downloading https://download-r2.pytorch.org/whl/cu121/torchaudio-2.5.1%2Bcu121-cp312-cp312-linux_x86_64.whl (3.4 MB)\n\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m118.1 MB/s\u001b[0m  \u001b[33m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.12/dist-packages (from torch) (3.24.3)\nRequirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.12/dist-packages (from torch) (4.15.0)\nRequirement already satisfied: networkx in /usr/local/lib/python3.12/dist-packages (from torch) (3.6.1)\nRequirement already satisfied: jinja2 in /usr/local/lib/python3.12/dist-packages (from torch) (3.1.6)\nRequirement already satisfied: fsspec in /usr/local/lib/python3.12/dist-packages (from torch) (2026.2.0)\nRequirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /usr/local/lib/python3.12/dist-packages (from torch) (12.1.105)\nRequirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /usr/local/lib/python3.12/dist-packages (from torch) (12.1.105)\nRequirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /usr/local/lib/python3.12/dist-packages (from torch) (12.1.105)\nRequirement already satisfied: nvidia-cudnn-cu12==9.1.0.70 in /usr/local/lib/python3.12/dist-packages (from torch) (9.1.0.70)\nRequirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /usr/local/lib/python3.12/dist-packages (from torch) (12.1.3.1)\nRequirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /usr/local/lib/python3.12/dist-packages (from torch) (11.0.2.54)\nRequirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /usr/local/lib/python3.12/dist-packages (from torch) (10.3.2.106)\nRequirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /usr/local/lib/python3.12/dist-packages (from torch) (11.4.5.107)\nRequirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /usr/local/lib/python3.12/dist-packages (from torch) (12.1.0.106)\nRequirement already satisfied: nvidia-nccl-cu12==2.21.5 in /usr/local/lib/python3.12/dist-packages (from torch) (2.21.5)\nRequirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /usr/local/lib/python3.12/dist-packages (from torch) (12.1.105)\nRequirement already satisfied: triton==3.1.0 in /usr/local/lib/python3.12/dist-packages (from torch) (3.1.0)\nRequirement already satisfied: setuptools in /usr/local/lib/python3.12/dist-packages (from torch) (69.5.1)\nRequirement already satisfied: sympy==1.13.1 in /usr/local/lib/python3.12/dist-packages (from torch) (1.13.1)\nRequirement already satisfied: nvidia-nvjitlink-cu12 in /usr/local/lib/python3.12/dist-packages (from nvidia-cusolver-cu12==11.4.5.107->torch) (12.8.93)\nRequirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.12/dist-packages (from sympy==1.13.1->torch) (1.3.0)\nRequirement already satisfied: numpy in /usr/local/lib/python3.12/dist-packages (from torchvision) (2.0.2)\nRequirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.12/dist-packages (from torchvision) (11.3.0)\nRequirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/dist-packages (from jinja2->torch) (3.0.3)\nInstalling collected packages: torch, torchvision, torchaudio\n\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3/3\u001b[0m [torchaudio]3\u001b[0m [torchaudio]]\n\u001b[1A\u001b[2KSuccessfully installed torch-2.5.1+cu121 torchaudio-2.5.1+cu121 torchvision-0.20.1+cu121\nRequirement already satisfied: ninja in /usr/local/lib/python3.12/dist-packages (1.13.0)\nRequirement already satisfied: pyyaml in /usr/local/lib/python3.12/dist-packages (6.0.3)\nRequirement already satisfied: setuptools==69.5.1 in /usr/local/lib/python3.12/dist-packages (69.5.1)\nRequirement already satisfied: wheel in /usr/local/lib/python3.12/dist-packages (0.46.3)\nRequirement already satisfied: cython<3.0.0 in /usr/local/lib/python3.12/dist-packages (0.29.37)\nRequirement already satisfied: packaging>=24.0 in /usr/local/lib/python3.12/dist-packages (from wheel) (26.0)\nUsing pip 26.0.1 from /usr/local/lib/python3.12/dist-packages/pip (python 3.12)\nCollecting git+https://github.com/facebookresearch/detectron2.git\n  Cloning https://github.com/facebookresearch/detectron2.git to /tmp/pip-req-build-t6g38i9p\n  Running command git version\n  git version 2.34.1\n  Running command git clone --filter=blob:none https://github.com/facebookresearch/detectron2.git /tmp/pip-req-build-t6g38i9p\n  Cloning into '/tmp/pip-req-build-t6g38i9p'...\n  Running command git rev-parse HEAD\n  b599f139756bd3646a26a909caf86a1a159e53a7\n  Resolved https://github.com/facebookresearch/detectron2.git to commit b599f139756bd3646a26a909caf86a1a159e53a7\n  Running command git rev-parse HEAD\n  b599f139756bd3646a26a909caf86a1a159e53a7\n  Running command Preparing metadata (pyproject.toml)\n  running dist_info\n  creating /tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info\n  writing /tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info/PKG-INFO\n  writing dependency_links to /tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info/dependency_links.txt\n  writing requirements to /tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info/requires.txt\n  writing top-level names to /tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info/top_level.txt\n  writing manifest file '/tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info/SOURCES.txt'\n  reading manifest file '/tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info/SOURCES.txt'\n  adding license file 'LICENSE'\n  writing manifest file '/tmp/pip-modern-metadata-tt2g75lk/detectron2.egg-info/SOURCES.txt'\n  creating '/tmp/pip-modern-metadata-tt2g75lk/detectron2-0.6.dist-info'\n  /usr/local/lib/python3.12/dist-packages/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.\n    warn(\n  Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\nRequirement already satisfied: Pillow>=7.1 in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (11.3.0)\nRequirement already satisfied: matplotlib in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (3.10.0)\nRequirement already satisfied: pycocotools>=2.0.2 in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (2.0.11)\nRequirement already satisfied: termcolor>=1.1 in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (3.3.0)\nCollecting yacs>=0.1.8 (from detectron2==0.6)\n  Obtaining dependency information for yacs>=0.1.8 from https://files.pythonhosted.org/packages/38/4f/fe9a4d472aa867878ce3bb7efb16654c5d63672b86dc0e6e953a67018433/yacs-0.1.8-py3-none-any.whl.metadata\n  Downloading yacs-0.1.8-py3-none-any.whl.metadata (639 bytes)\nRequirement already satisfied: tabulate in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (0.9.0)\nRequirement already satisfied: cloudpickle in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (3.1.2)\nRequirement already satisfied: tqdm>4.29.0 in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (4.67.3)\nRequirement already satisfied: tensorboard in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (2.19.0)\nCollecting fvcore<0.1.6,>=0.1.5 (from detectron2==0.6)\n  Downloading fvcore-0.1.5.post20221221.tar.gz (50 kB)\n  Running command Preparing metadata (pyproject.toml)\n  running dist_info\n  creating /tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info\n  writing /tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info/PKG-INFO\n  writing dependency_links to /tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info/dependency_links.txt\n  writing requirements to /tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info/requires.txt\n  writing top-level names to /tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info/top_level.txt\n  writing manifest file '/tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info/SOURCES.txt'\n  reading manifest file '/tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info/SOURCES.txt'\n  writing manifest file '/tmp/pip-modern-metadata-mrrf7ewc/fvcore.egg-info/SOURCES.txt'\n  creating '/tmp/pip-modern-metadata-mrrf7ewc/fvcore-0.1.5.post20221221.dist-info'\n  /usr/local/lib/python3.12/dist-packages/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.\n    warn(\n  Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\nCollecting iopath<0.1.10,>=0.1.7 (from detectron2==0.6)\n  Obtaining dependency information for iopath<0.1.10,>=0.1.7 from https://files.pythonhosted.org/packages/af/20/65dd9bd25a1eb7fa35b5ae38d289126af065f8a0c1f6a90564f4bff0f89d/iopath-0.1.9-py3-none-any.whl.metadata\n  Downloading iopath-0.1.9-py3-none-any.whl.metadata (370 bytes)\nRequirement already satisfied: omegaconf<2.4,>=2.1 in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (2.3.0)\nCollecting hydra-core>=1.1 (from detectron2==0.6)\n  Obtaining dependency information for hydra-core>=1.1 from https://files.pythonhosted.org/packages/c6/50/e0edd38dcd63fb26a8547f13d28f7a008bc4a3fd4eb4ff030673f22ad41a/hydra_core-1.3.2-py3-none-any.whl.metadata\n  Downloading hydra_core-1.3.2-py3-none-any.whl.metadata (5.5 kB)\nRequirement already satisfied: black in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (26.3.1)\nRequirement already satisfied: packaging in /usr/local/lib/python3.12/dist-packages (from detectron2==0.6) (26.0)\nRequirement already satisfied: numpy in /usr/local/lib/python3.12/dist-packages (from fvcore<0.1.6,>=0.1.5->detectron2==0.6) (2.0.2)\nRequirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.12/dist-packages (from fvcore<0.1.6,>=0.1.5->detectron2==0.6) (6.0.3)\nCollecting portalocker (from iopath<0.1.10,>=0.1.7->detectron2==0.6)\n  Obtaining dependency information for portalocker from https://files.pythonhosted.org/packages/4b/a6/38c8e2f318bf67d338f4d629e93b0b4b9af331f455f0390ea8ce4a099b26/portalocker-3.2.0-py3-none-any.whl.metadata\n  Downloading portalocker-3.2.0-py3-none-any.whl.metadata (8.7 kB)\nRequirement already satisfied: antlr4-python3-runtime==4.9.* in /usr/local/lib/python3.12/dist-packages (from omegaconf<2.4,>=2.1->detectron2==0.6) (4.9.3)\nRequirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.12/dist-packages (from black->detectron2==0.6) (8.3.1)\nRequirement already satisfied: mypy-extensions>=0.4.3 in /usr/local/lib/python3.12/dist-packages (from black->detectron2==0.6) (1.1.0)\nRequirement already satisfied: pathspec>=1.0.0 in /usr/local/lib/python3.12/dist-packages (from black->detectron2==0.6) (1.0.4)\nRequirement already satisfied: platformdirs>=2 in /usr/local/lib/python3.12/dist-packages (from black->detectron2==0.6) (4.9.2)\nRequirement already satisfied: pytokens~=0.4.0 in /usr/local/lib/python3.12/dist-packages (from black->detectron2==0.6) (0.4.1)\nRequirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.12/dist-packages (from matplotlib->detectron2==0.6) (1.3.3)\nRequirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.12/dist-packages (from matplotlib->detectron2==0.6) (0.12.1)\nRequirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.12/dist-packages (from matplotlib->detectron2==0.6) (4.61.1)\nRequirement already satisfied: kiwisolver>=1.3.1 in /usr/local/lib/python3.12/dist-packages (from matplotlib->detectron2==0.6) (1.4.9)\nRequirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.12/dist-packages (from matplotlib->detectron2==0.6) (3.3.2)\nRequirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.12/dist-packages (from matplotlib->detectron2==0.6) (2.9.0.post0)\nRequirement already satisfied: six>=1.5 in /usr/local/lib/python3.12/dist-packages (from python-dateutil>=2.7->matplotlib->detectron2==0.6) (1.17.0)\nRequirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.12/dist-packages (from tensorboard->detectron2==0.6) (1.4.0)\nRequirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.12/dist-packages (from tensorboard->detectron2==0.6) (1.78.1)\nRequirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.12/dist-packages (from tensorboard->detectron2==0.6) (3.10.2)\nRequirement already satisfied: protobuf!=4.24.0,>=3.19.6 in /usr/local/lib/python3.12/dist-packages (from tensorboard->detectron2==0.6) (5.29.5)\nRequirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.12/dist-packages (from tensorboard->detectron2==0.6) (69.5.1)\nRequirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.12/dist-packages (from tensorboard->detectron2==0.6) (0.7.2)\nRequirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.12/dist-packages (from tensorboard->detectron2==0.6) (3.1.6)\nRequirement already satisfied: typing-extensions~=4.12 in /usr/local/lib/python3.12/dist-packages (from grpcio>=1.48.2->tensorboard->detectron2==0.6) (4.15.0)\nRequirement already satisfied: markupsafe>=2.1.1 in /usr/local/lib/python3.12/dist-packages (from werkzeug>=1.0.1->tensorboard->detectron2==0.6) (3.0.3)\nDownloading iopath-0.1.9-py3-none-any.whl (27 kB)\nDownloading hydra_core-1.3.2-py3-none-any.whl (154 kB)\nDownloading yacs-0.1.8-py3-none-any.whl (14 kB)\nDownloading portalocker-3.2.0-py3-none-any.whl (22 kB)\nBuilding wheels for collected packages: detectron2, fvcore\n  Running command Building wheel for detectron2 (pyproject.toml)\n  /usr/local/lib/python3.12/dist-packages/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.\n    warn(\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  creating build/lib.linux-x86_64-cpython-312\n  creating build/lib.linux-x86_64-cpython-312/detectron2\n  copying detectron2/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2\n  creating build/lib.linux-x86_64-cpython-312/tools\n  copying tools/visualize_data.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/benchmark.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/__init__.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/lightning_train_net.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/analyze_model.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/lazyconfig_train_net.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/plain_train_net.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/visualize_json_results.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/train_net.py -> build/lib.linux-x86_64-cpython-312/tools\n  copying tools/convert-torchvision-to-d2.py -> build/lib.linux-x86_64-cpython-312/tools\n  creating build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/postprocessing.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/anchor_generator.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/poolers.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/mmdet_wrapper.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/matcher.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/test_time_augmentation.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/sampling.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  copying detectron2/modeling/box_regression.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling\n  creating build/lib.linux-x86_64-cpython-312/detectron2/projects\n  copying detectron2/projects/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects\n  creating build/lib.linux-x86_64-cpython-312/detectron2/data\n  copying detectron2/data/build.py -> build/lib.linux-x86_64-cpython-312/detectron2/data\n  copying detectron2/data/benchmark.py -> build/lib.linux-x86_64-cpython-312/detectron2/data\n  copying detectron2/data/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/data\n  copying detectron2/data/common.py -> build/lib.linux-x86_64-cpython-312/detectron2/data\n  copying detectron2/data/detection_utils.py -> build/lib.linux-x86_64-cpython-312/detectron2/data\n  copying detectron2/data/catalog.py -> build/lib.linux-x86_64-cpython-312/detectron2/data\n  copying detectron2/data/dataset_mapper.py -> build/lib.linux-x86_64-cpython-312/detectron2/data\n  creating build/lib.linux-x86_64-cpython-312/detectron2/structures\n  copying detectron2/structures/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/structures\n  copying detectron2/structures/rotated_boxes.py -> build/lib.linux-x86_64-cpython-312/detectron2/structures\n  copying detectron2/structures/keypoints.py -> build/lib.linux-x86_64-cpython-312/detectron2/structures\n  copying detectron2/structures/boxes.py -> build/lib.linux-x86_64-cpython-312/detectron2/structures\n  copying detectron2/structures/masks.py -> build/lib.linux-x86_64-cpython-312/detectron2/structures\n  copying detectron2/structures/instances.py -> build/lib.linux-x86_64-cpython-312/detectron2/structures\n  copying detectron2/structures/image_list.py -> build/lib.linux-x86_64-cpython-312/detectron2/structures\n  creating build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/pascal_voc_evaluation.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/lvis_evaluation.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/sem_seg_evaluation.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/cityscapes_evaluation.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/coco_evaluation.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/testing.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/panoptic_evaluation.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/rotated_coco_evaluation.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/evaluator.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  copying detectron2/evaluation/fast_eval_api.py -> build/lib.linux-x86_64-cpython-312/detectron2/evaluation\n  creating build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/collect_env.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/visualizer.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/torch_version_utils.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/logger.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/memory.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/registry.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/file_io.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/serialize.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/comm.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/analysis.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/events.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/testing.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/tracing.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/video_visualizer.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/colormap.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/env.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  copying detectron2/utils/develop.py -> build/lib.linux-x86_64-cpython-312/detectron2/utils\n  creating build/lib.linux-x86_64-cpython-312/detectron2/solver\n  copying detectron2/solver/build.py -> build/lib.linux-x86_64-cpython-312/detectron2/solver\n  copying detectron2/solver/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/solver\n  copying detectron2/solver/lr_scheduler.py -> build/lib.linux-x86_64-cpython-312/detectron2/solver\n  creating build/lib.linux-x86_64-cpython-312/detectron2/engine\n  copying detectron2/engine/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/engine\n  copying detectron2/engine/hooks.py -> build/lib.linux-x86_64-cpython-312/detectron2/engine\n  copying detectron2/engine/defaults.py -> build/lib.linux-x86_64-cpython-312/detectron2/engine\n  copying detectron2/engine/train_loop.py -> build/lib.linux-x86_64-cpython-312/detectron2/engine\n  copying detectron2/engine/launch.py -> build/lib.linux-x86_64-cpython-312/detectron2/engine\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo\n  copying detectron2/model_zoo/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo\n  copying detectron2/model_zoo/model_zoo.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo\n  creating build/lib.linux-x86_64-cpython-312/detectron2/checkpoint\n  copying detectron2/checkpoint/detection_checkpoint.py -> build/lib.linux-x86_64-cpython-312/detectron2/checkpoint\n  copying detectron2/checkpoint/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/checkpoint\n  copying detectron2/checkpoint/c2_model_loading.py -> build/lib.linux-x86_64-cpython-312/detectron2/checkpoint\n  copying detectron2/checkpoint/catalog.py -> build/lib.linux-x86_64-cpython-312/detectron2/checkpoint\n  creating build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/torchscript_patch.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/shared.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/caffe2_inference.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/caffe2_modeling.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/caffe2_export.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/c10.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/api.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/caffe2_patch.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/flatten.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  copying detectron2/export/torchscript.py -> build/lib.linux-x86_64-cpython-312/detectron2/export\n  creating build/lib.linux-x86_64-cpython-312/detectron2/config\n  copying detectron2/config/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/config\n  copying detectron2/config/compat.py -> build/lib.linux-x86_64-cpython-312/detectron2/config\n  copying detectron2/config/instantiate.py -> build/lib.linux-x86_64-cpython-312/detectron2/config\n  copying detectron2/config/defaults.py -> build/lib.linux-x86_64-cpython-312/detectron2/config\n  copying detectron2/config/config.py -> build/lib.linux-x86_64-cpython-312/detectron2/config\n  copying detectron2/config/lazy.py -> build/lib.linux-x86_64-cpython-312/detectron2/config\n  creating build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  copying detectron2/tracking/base_tracker.py -> build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  copying detectron2/tracking/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  copying detectron2/tracking/iou_weighted_hungarian_bbox_iou_tracker.py -> build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  copying detectron2/tracking/hungarian_tracker.py -> build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  copying detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py -> build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  copying detectron2/tracking/utils.py -> build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  copying detectron2/tracking/bbox_iou_tracker.py -> build/lib.linux-x86_64-cpython-312/detectron2/tracking\n  creating build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/wrappers.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/batch_norm.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/roi_align_rotated.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/aspp.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/rotated_boxes.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/blocks.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/deform_conv.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/losses.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/roi_align.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/nms.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/mask_ops.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  copying detectron2/layers/shape_spec.py -> build/lib.linux-x86_64-cpython-312/detectron2/layers\n  creating build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/rotated_fast_rcnn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/cascade_rcnn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/mask_head.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/roi_heads.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/fast_rcnn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/keypoint_head.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  copying detectron2/modeling/roi_heads/box_head.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads\n  creating build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/build.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/mvit.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/vit.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/swin.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/utils.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/resnet.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/backbone.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/regnet.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  copying detectron2/modeling/backbone/fpn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone\n  creating build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/build.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/rcnn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/semantic_seg.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/fcos.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/dense_detector.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/retinanet.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  copying detectron2/modeling/meta_arch/panoptic_fpn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch\n  creating build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator\n  copying detectron2/modeling/proposal_generator/build.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator\n  copying detectron2/modeling/proposal_generator/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator\n  copying detectron2/modeling/proposal_generator/rrpn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator\n  copying detectron2/modeling/proposal_generator/proposal_utils.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator\n  copying detectron2/modeling/proposal_generator/rpn.py -> build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator\n  creating build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/register_coco.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/coco_panoptic.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/pascal_voc.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/lvis_v1_category_image_count.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/builtin_meta.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/lvis.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/lvis_v0_5_categories.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/coco.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/builtin.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/cityscapes.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/lvis_v1_categories.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  copying detectron2/data/datasets/cityscapes_panoptic.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/datasets\n  creating build/lib.linux-x86_64-cpython-312/detectron2/data/transforms\n  copying detectron2/data/transforms/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/transforms\n  copying detectron2/data/transforms/augmentation_impl.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/transforms\n  copying detectron2/data/transforms/augmentation.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/transforms\n  copying detectron2/data/transforms/transform.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/transforms\n  creating build/lib.linux-x86_64-cpython-312/detectron2/data/samplers\n  copying detectron2/data/samplers/grouped_batch_sampler.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/samplers\n  copying detectron2/data/samplers/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/samplers\n  copying detectron2/data/samplers/distributed_sampler.py -> build/lib.linux-x86_64-cpython-312/detectron2/data/samplers\n  creating build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/semantic_seg.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/mask_head.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/roi_heads.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/point_head.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/config.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/color_augmentation.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  copying projects/PointRend/point_rend/point_features.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend\n  creating build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  copying projects/DeepLab/deeplab/semantic_seg.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  copying projects/DeepLab/deeplab/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  copying projects/DeepLab/deeplab/build_solver.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  copying projects/DeepLab/deeplab/lr_scheduler.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  copying projects/DeepLab/deeplab/config.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  copying projects/DeepLab/deeplab/resnet.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  copying projects/DeepLab/deeplab/loss.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab\n  creating build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab\n  copying projects/Panoptic-DeepLab/panoptic_deeplab/__init__.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab\n  copying projects/Panoptic-DeepLab/panoptic_deeplab/panoptic_seg.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab\n  copying projects/Panoptic-DeepLab/panoptic_deeplab/target_generator.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab\n  copying projects/Panoptic-DeepLab/panoptic_deeplab/config.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab\n  copying projects/Panoptic-DeepLab/panoptic_deeplab/post_processing.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab\n  copying projects/Panoptic-DeepLab/panoptic_deeplab/dataset_mapper.py -> build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs\n  copying detectron2/model_zoo/configs/Base-RCNN-DilatedC5.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs\n  copying detectron2/model_zoo/configs/Base-RetinaNet.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs\n  copying detectron2/model_zoo/configs/Base-RCNN-C4.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs\n  copying detectron2/model_zoo/configs/Base-RCNN-FPN.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying detectron2/model_zoo/configs/COCO-PanopticSegmentation/Base-Panoptic-FPN.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_101_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_normalized_training_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/retinanet_R_50_FPN_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/retinanet_R_50_FPN_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_training_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/fast_rcnn_R_50_FPN_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_training_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/rpn_R_50_FPN_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_pred_boxes_training_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_DC5_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/fast_rcnn_R_50_FPN_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_training_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/rpn_R_50_FPN_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_training_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_inference_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_training_acc_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  copying detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_GCV_instant_test.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/PascalVOC-Detection\n  copying detectron2/model_zoo/configs/PascalVOC-Detection/faster_rcnn_R_50_FPN.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/PascalVOC-Detection\n  copying detectron2/model_zoo/configs/PascalVOC-Detection/faster_rcnn_R_50_C4.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/PascalVOC-Detection\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  copying detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  copying detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  copying detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  copying detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  copying detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  copying detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Cityscapes\n  copying detectron2/model_zoo/configs/Cityscapes/mask_rcnn_R_50_FPN.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Cityscapes\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Detectron1-Comparisons\n  copying detectron2/model_zoo/configs/Detectron1-Comparisons/keypoint_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Detectron1-Comparisons\n  copying detectron2/model_zoo/configs/Detectron1-Comparisons/mask_rcnn_R_50_FPN_noaug_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Detectron1-Comparisons\n  copying detectron2/model_zoo/configs/Detectron1-Comparisons/faster_rcnn_R_50_FPN_noaug_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Detectron1-Comparisons\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_syncbn.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_gn.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_1x_dconv_c3-c5.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/semantic_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_R_50_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_gn.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_syncbn.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_1x_cls_agnostic.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/panoptic_fpn_R_101_dconv_cascade_gn_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_dconv_c3-c5.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_DC5_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_DC5_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/retinanet_R_101_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/rpn_R_50_C4_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_C4_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_C4_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_DC5_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/rpn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_C4_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints\n  copying detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints\n  copying detectron2/model_zoo/configs/COCO-Keypoints/Base-Keypoint-RCNN-FPN.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints\n  copying detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_X_101_32x8d_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints\n  copying detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints\n  copying detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_101_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_DC5_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_C4_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x_giou.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_100ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_100ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_200ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_200ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_400ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_400ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_100ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_200ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_400ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_50ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_400ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  copying detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_200ep_LSJ.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common\n  copying detectron2/model_zoo/configs/common/coco_schedule.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common\n  copying detectron2/model_zoo/configs/common/optim.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common\n  copying detectron2/model_zoo/configs/common/train.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data\n  copying detectron2/model_zoo/configs/common/data/coco.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data\n  copying detectron2/model_zoo/configs/common/data/coco_keypoint.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data\n  copying detectron2/model_zoo/configs/common/data/coco_panoptic_separated.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data\n  copying detectron2/model_zoo/configs/common/data/constants.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data\n  creating build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/cascade_rcnn.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/fcos.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/retinanet.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/panoptic_fpn.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/mask_rcnn_fpn.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/keypoint_rcnn_fpn.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/mask_rcnn_c4.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/common/models/mask_rcnn_vitdet.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models\n  copying detectron2/model_zoo/configs/Misc/torchvision_imagenet_R_50.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/Misc/mmdet_mask_rcnn_R_50_FPN_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc\n  copying detectron2/model_zoo/configs/COCO-Detection/fcos_R_50_FPN_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection\n  copying detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_regnety_4gf_dds_fpn_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_regnetx_4gf_dds_fpn_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.py -> build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  running build_ext\n  /usr/local/lib/python3.12/dist-packages/torch/utils/cpp_extension.py:416: UserWarning: The detected CUDA version (12.8) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem.\n    warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))\n  /usr/local/lib/python3.12/dist-packages/torch/utils/cpp_extension.py:426: UserWarning: There are no x86_64-linux-gnu-g++ version bounds defined for CUDA version 12.8\n    warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')\n  building 'detectron2._C' extension\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cocoeval\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable\n  creating /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated\n  Emitting ninja build file /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/build.ninja...\n  Compiling objects...\n  Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)\n  [1/11] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cuda_version.o.d -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cuda_version.cu -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cuda_version.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''\"'\"'-fPIC'\"'\"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_60,code=sm_60 -std=c++17\n  nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n  [2/11] c++ -MMD -MF /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cocoeval/cocoeval.o.d -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cocoeval/cocoeval.cpp -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cocoeval/cocoeval.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17\n  [3/11] c++ -MMD -MF /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.o.d -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.cpp -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17\n  [4/11] c++ -MMD -MF /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.o.d -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.cpp -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17\n  [5/11] c++ -MMD -MF /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cpu.o.d -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cpu.cpp -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17\n  [6/11] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o.d -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''\"'\"'-fPIC'\"'\"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_60,code=sm_60 -std=c++17\n  nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n  [7/11] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o.d -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''\"'\"'-fPIC'\"'\"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_60,code=sm_60 -std=c++17\n  nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n  [8/11] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda.o.d -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda.cu -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''\"'\"'-fPIC'\"'\"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_60,code=sm_60 -std=c++17\n  nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n  [9/11] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o.d -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''\"'\"'-fPIC'\"'\"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_60,code=sm_60 -std=c++17\n  nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n  [10/11] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o.d -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''\"'\"'-fPIC'\"'\"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_60,code=sm_60 -std=c++17\n  nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n  [11/11] c++ -MMD -MF /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.o.d -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DWITH_CUDA -I/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc -I/usr/local/lib/python3.12/dist-packages/torch/include -I/usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.12/dist-packages/torch/include/TH -I/usr/local/lib/python3.12/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.12 -c -c /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.cpp -o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE=\"_gcc\"' '-DPYBIND11_STDLIB=\"_libstdcpp\"' '-DPYBIND11_BUILD_ABI=\"_cxxabi1011\"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17\n  In file included from /usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/Exceptions.h:12,\n                   from /usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include/torch/python.h:11,\n                   from /usr/local/lib/python3.12/dist-packages/torch/include/torch/extension.h:9,\n                   from /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.cpp:3:\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h: In instantiation of ‘class pybind11::class_<detectron2::COCOeval::InstanceAnnotation>’:\n  /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.cpp:109:73:   required from here\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h:1588:7: warning: ‘pybind11::class_<detectron2::COCOeval::InstanceAnnotation>’ declared with greater visibility than its base ‘pybind11::detail::generic_type’ [-Wattributes]\n   1588 | class class_ : public detail::generic_type {\n        |       ^~~~~~\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h: In instantiation of ‘class pybind11::class_<detectron2::COCOeval::ImageEvaluation>’:\n  /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.cpp:111:67:   required from here\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h:1588:7: warning: ‘pybind11::class_<detectron2::COCOeval::ImageEvaluation>’ declared with greater visibility than its base ‘pybind11::detail::generic_type’ [-Wattributes]\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h: In instantiation of ‘pybind11::class_< <template-parameter-1-1>, <template-parameter-1-2> >::class_(pybind11::handle, const char*, const Extra& ...) [with Extra = {}; type_ = detectron2::COCOeval::InstanceAnnotation; options = {}]’:\n  /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.cpp:109:73:   required from here\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h:1648:28: warning: ‘pybind11::class_<detectron2::COCOeval::InstanceAnnotation>::class_<>(pybind11::handle, const char*)::<lambda(pybind11::detail::internals&)>’ declared with greater visibility than the type of its field ‘pybind11::class_<detectron2::COCOeval::InstanceAnnotation>::class_<>(pybind11::handle, const char*)::<lambda(pybind11::detail::internals&)>::<record capture>’ [-Wattributes]\n   1648 |             with_internals([&](internals &internals) {\n        |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~\n   1649 |                 auto &instances = record.module_local ? get_local_internals().registered_types_cpp\n        |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n   1650 |                                                       : internals.registered_types_cpp;\n        |                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n   1651 |                 instances[std::type_index(typeid(type_alias))]\n        |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n   1652 |                     = instances[std::type_index(typeid(type))];\n        |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n   1653 |             });\n        |             ~\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h: In instantiation of ‘pybind11::class_< <template-parameter-1-1>, <template-parameter-1-2> >::class_(pybind11::handle, const char*, const Extra& ...) [with Extra = {}; type_ = detectron2::COCOeval::ImageEvaluation; options = {}]’:\n  /tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.cpp:111:67:   required from here\n  /usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h:1648:28: warning: ‘pybind11::class_<detectron2::COCOeval::ImageEvaluation>::class_<>(pybind11::handle, const char*)::<lambda(pybind11::detail::internals&)>’ declared with greater visibility than the type of its field ‘pybind11::class_<detectron2::COCOeval::ImageEvaluation>::class_<>(pybind11::handle, const char*)::<lambda(pybind11::detail::internals&)>::<record capture>’ [-Wattributes]\n  x86_64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cocoeval/cocoeval.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/cuda_version.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cpu.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o /tmp/pip-req-build-t6g38i9p/build/temp.linux-x86_64-cpython-312/tmp/pip-req-build-t6g38i9p/detectron2/layers/csrc/vision.o -L/usr/local/lib/python3.12/dist-packages/torch/lib -L/usr/local/cuda/lib64 -L/usr/lib/x86_64-linux-gnu -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-312/detectron2/_C.cpython-312-x86_64-linux-gnu.so\n  installing to build/bdist.linux-x86_64/wheel\n  running install\n  running install_lib\n  creating build/bdist.linux-x86_64\n  creating build/bdist.linux-x86_64/wheel\n  creating build/bdist.linux-x86_64/wheel/detectron2\n  creating build/bdist.linux-x86_64/wheel/detectron2/modeling\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/postprocessing.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/anchor_generator.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/poolers.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  creating build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/rotated_fast_rcnn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/cascade_rcnn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/mask_head.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/roi_heads.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/fast_rcnn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/keypoint_head.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/roi_heads/box_head.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/roi_heads\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/mmdet_wrapper.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  creating build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/build.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/mvit.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/vit.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/swin.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/utils.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/resnet.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/backbone.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/regnet.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/backbone/fpn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/backbone\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/matcher.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  creating build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/build.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/rcnn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/semantic_seg.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/fcos.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/dense_detector.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/retinanet.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/meta_arch/panoptic_fpn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/meta_arch\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/test_time_augmentation.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/sampling.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/box_regression.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling\n  creating build/bdist.linux-x86_64/wheel/detectron2/modeling/proposal_generator\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator/build.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/proposal_generator\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/proposal_generator\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator/rrpn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/proposal_generator\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator/proposal_utils.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/proposal_generator\n  copying build/lib.linux-x86_64-cpython-312/detectron2/modeling/proposal_generator/rpn.py -> build/bdist.linux-x86_64/wheel/detectron2/modeling/proposal_generator\n  copying build/lib.linux-x86_64-cpython-312/detectron2/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2\n  creating build/bdist.linux-x86_64/wheel/detectron2/projects\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/projects\n  creating build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab/semantic_seg.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab/build_solver.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab/lr_scheduler.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab/config.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab/resnet.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/deeplab/loss.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/deeplab\n  creating build/bdist.linux-x86_64/wheel/detectron2/projects/panoptic_deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/panoptic_deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab/panoptic_seg.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/panoptic_deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab/target_generator.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/panoptic_deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab/config.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/panoptic_deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab/post_processing.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/panoptic_deeplab\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/panoptic_deeplab/dataset_mapper.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/panoptic_deeplab\n  creating build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/semantic_seg.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/mask_head.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/roi_heads.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/point_head.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/config.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/color_augmentation.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  copying build/lib.linux-x86_64-cpython-312/detectron2/projects/point_rend/point_features.py -> build/bdist.linux-x86_64/wheel/detectron2/projects/point_rend\n  creating build/bdist.linux-x86_64/wheel/detectron2/data\n  creating build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/register_coco.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/coco_panoptic.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/pascal_voc.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/lvis_v1_category_image_count.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/builtin_meta.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/lvis.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/lvis_v0_5_categories.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/coco.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/builtin.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/cityscapes.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/lvis_v1_categories.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/datasets/cityscapes_panoptic.py -> build/bdist.linux-x86_64/wheel/detectron2/data/datasets\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/build.py -> build/bdist.linux-x86_64/wheel/detectron2/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/benchmark.py -> build/bdist.linux-x86_64/wheel/detectron2/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/data\n  creating build/bdist.linux-x86_64/wheel/detectron2/data/transforms\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/transforms/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/data/transforms\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/transforms/augmentation_impl.py -> build/bdist.linux-x86_64/wheel/detectron2/data/transforms\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/transforms/augmentation.py -> build/bdist.linux-x86_64/wheel/detectron2/data/transforms\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/transforms/transform.py -> build/bdist.linux-x86_64/wheel/detectron2/data/transforms\n  creating build/bdist.linux-x86_64/wheel/detectron2/data/samplers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/samplers/grouped_batch_sampler.py -> build/bdist.linux-x86_64/wheel/detectron2/data/samplers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/samplers/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/data/samplers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/samplers/distributed_sampler.py -> build/bdist.linux-x86_64/wheel/detectron2/data/samplers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/common.py -> build/bdist.linux-x86_64/wheel/detectron2/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/detection_utils.py -> build/bdist.linux-x86_64/wheel/detectron2/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/catalog.py -> build/bdist.linux-x86_64/wheel/detectron2/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/data/dataset_mapper.py -> build/bdist.linux-x86_64/wheel/detectron2/data\n  creating build/bdist.linux-x86_64/wheel/detectron2/structures\n  copying build/lib.linux-x86_64-cpython-312/detectron2/structures/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/structures\n  copying build/lib.linux-x86_64-cpython-312/detectron2/structures/rotated_boxes.py -> build/bdist.linux-x86_64/wheel/detectron2/structures\n  copying build/lib.linux-x86_64-cpython-312/detectron2/structures/keypoints.py -> build/bdist.linux-x86_64/wheel/detectron2/structures\n  copying build/lib.linux-x86_64-cpython-312/detectron2/structures/boxes.py -> build/bdist.linux-x86_64/wheel/detectron2/structures\n  copying build/lib.linux-x86_64-cpython-312/detectron2/structures/masks.py -> build/bdist.linux-x86_64/wheel/detectron2/structures\n  copying build/lib.linux-x86_64-cpython-312/detectron2/structures/instances.py -> build/bdist.linux-x86_64/wheel/detectron2/structures\n  copying build/lib.linux-x86_64-cpython-312/detectron2/structures/image_list.py -> build/bdist.linux-x86_64/wheel/detectron2/structures\n  creating build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/pascal_voc_evaluation.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/lvis_evaluation.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/sem_seg_evaluation.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/cityscapes_evaluation.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/coco_evaluation.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/testing.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/panoptic_evaluation.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/rotated_coco_evaluation.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/evaluator.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/evaluation/fast_eval_api.py -> build/bdist.linux-x86_64/wheel/detectron2/evaluation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/_C.cpython-312-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/detectron2\n  creating build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/collect_env.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/visualizer.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/torch_version_utils.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/logger.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/memory.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/registry.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/file_io.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/serialize.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/comm.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/analysis.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/events.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/testing.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/tracing.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/video_visualizer.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/colormap.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/env.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  copying build/lib.linux-x86_64-cpython-312/detectron2/utils/develop.py -> build/bdist.linux-x86_64/wheel/detectron2/utils\n  creating build/bdist.linux-x86_64/wheel/detectron2/solver\n  copying build/lib.linux-x86_64-cpython-312/detectron2/solver/build.py -> build/bdist.linux-x86_64/wheel/detectron2/solver\n  copying build/lib.linux-x86_64-cpython-312/detectron2/solver/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/solver\n  copying build/lib.linux-x86_64-cpython-312/detectron2/solver/lr_scheduler.py -> build/bdist.linux-x86_64/wheel/detectron2/solver\n  creating build/bdist.linux-x86_64/wheel/detectron2/engine\n  copying build/lib.linux-x86_64-cpython-312/detectron2/engine/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/engine\n  copying build/lib.linux-x86_64-cpython-312/detectron2/engine/hooks.py -> build/bdist.linux-x86_64/wheel/detectron2/engine\n  copying build/lib.linux-x86_64-cpython-312/detectron2/engine/defaults.py -> build/bdist.linux-x86_64/wheel/detectron2/engine\n  copying build/lib.linux-x86_64-cpython-312/detectron2/engine/train_loop.py -> build/bdist.linux-x86_64/wheel/detectron2/engine\n  copying build/lib.linux-x86_64-cpython-312/detectron2/engine/launch.py -> build/bdist.linux-x86_64/wheel/detectron2/engine\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/model_zoo.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation/Base-Panoptic-FPN.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_101_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-PanopticSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Base-RCNN-DilatedC5.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Base-RetinaNet.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_100ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_100ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_200ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_200ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_400ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_400ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_100ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_200ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_400ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_50ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_400ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_200ep_LSJ.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/new_baselines\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_normalized_training_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/retinanet_R_50_FPN_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/retinanet_R_50_FPN_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_training_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/fast_rcnn_R_50_FPN_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_training_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/rpn_R_50_FPN_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_pred_boxes_training_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_DC5_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/fast_rcnn_R_50_FPN_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_training_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/rpn_R_50_FPN_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_training_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_inference_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_training_acc_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_GCV_instant_test.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/quick_schedules\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/PascalVOC-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/PascalVOC-Detection/faster_rcnn_R_50_FPN.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/PascalVOC-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/PascalVOC-Detection/faster_rcnn_R_50_C4.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/PascalVOC-Detection\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/LVISv1-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Base-RCNN-C4.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Cityscapes\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Cityscapes/mask_rcnn_R_50_FPN.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Cityscapes\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Detectron1-Comparisons\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Detectron1-Comparisons/keypoint_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Detectron1-Comparisons\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Detectron1-Comparisons/mask_rcnn_R_50_FPN_noaug_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Detectron1-Comparisons\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Detectron1-Comparisons/faster_rcnn_R_50_FPN_noaug_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Detectron1-Comparisons\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Base-RCNN-FPN.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/coco_schedule.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data/coco.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data/coco_keypoint.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data/coco_panoptic_separated.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/data/constants.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/data\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/optim.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/train.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/cascade_rcnn.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/fcos.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/retinanet.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/panoptic_fpn.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/mask_rcnn_fpn.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/keypoint_rcnn_fpn.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/mask_rcnn_c4.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/common/models/mask_rcnn_vitdet.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/common/models\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_syncbn.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_gn.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_1x_dconv_c3-c5.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/semantic_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_R_50_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/torchvision_imagenet_R_50.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_gn.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_syncbn.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_1x_cls_agnostic.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/mmdet_mask_rcnn_R_50_FPN_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/panoptic_fpn_R_101_dconv_cascade_gn_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_dconv_c3-c5.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/Misc\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_DC5_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_DC5_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/retinanet_R_101_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/fcos_R_50_FPN_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/rpn_R_50_C4_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_C4_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_C4_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_DC5_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/rpn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_C4_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Detection\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Keypoints\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Keypoints\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints/Base-Keypoint-RCNN-FPN.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Keypoints\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_X_101_32x8d_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Keypoints\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Keypoints\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_101_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Keypoints\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-Keypoints\n  creating build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_regnety_4gf_dds_fpn_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_DC5_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_C4_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_regnetx_4gf_dds_fpn_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.py -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x_giou.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  copying build/lib.linux-x86_64-cpython-312/detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml -> build/bdist.linux-x86_64/wheel/detectron2/model_zoo/configs/COCO-InstanceSegmentation\n  creating build/bdist.linux-x86_64/wheel/detectron2/checkpoint\n  copying build/lib.linux-x86_64-cpython-312/detectron2/checkpoint/detection_checkpoint.py -> build/bdist.linux-x86_64/wheel/detectron2/checkpoint\n  copying build/lib.linux-x86_64-cpython-312/detectron2/checkpoint/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/checkpoint\n  copying build/lib.linux-x86_64-cpython-312/detectron2/checkpoint/c2_model_loading.py -> build/bdist.linux-x86_64/wheel/detectron2/checkpoint\n  copying build/lib.linux-x86_64-cpython-312/detectron2/checkpoint/catalog.py -> build/bdist.linux-x86_64/wheel/detectron2/checkpoint\n  creating build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/torchscript_patch.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/shared.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/caffe2_inference.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/caffe2_modeling.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/caffe2_export.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/c10.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/api.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/caffe2_patch.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/flatten.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  copying build/lib.linux-x86_64-cpython-312/detectron2/export/torchscript.py -> build/bdist.linux-x86_64/wheel/detectron2/export\n  creating build/bdist.linux-x86_64/wheel/detectron2/config\n  copying build/lib.linux-x86_64-cpython-312/detectron2/config/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/config\n  copying build/lib.linux-x86_64-cpython-312/detectron2/config/compat.py -> build/bdist.linux-x86_64/wheel/detectron2/config\n  copying build/lib.linux-x86_64-cpython-312/detectron2/config/instantiate.py -> build/bdist.linux-x86_64/wheel/detectron2/config\n  copying build/lib.linux-x86_64-cpython-312/detectron2/config/defaults.py -> build/bdist.linux-x86_64/wheel/detectron2/config\n  copying build/lib.linux-x86_64-cpython-312/detectron2/config/config.py -> build/bdist.linux-x86_64/wheel/detectron2/config\n  copying build/lib.linux-x86_64-cpython-312/detectron2/config/lazy.py -> build/bdist.linux-x86_64/wheel/detectron2/config\n  creating build/bdist.linux-x86_64/wheel/detectron2/tracking\n  copying build/lib.linux-x86_64-cpython-312/detectron2/tracking/base_tracker.py -> build/bdist.linux-x86_64/wheel/detectron2/tracking\n  copying build/lib.linux-x86_64-cpython-312/detectron2/tracking/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/tracking\n  copying build/lib.linux-x86_64-cpython-312/detectron2/tracking/iou_weighted_hungarian_bbox_iou_tracker.py -> build/bdist.linux-x86_64/wheel/detectron2/tracking\n  copying build/lib.linux-x86_64-cpython-312/detectron2/tracking/hungarian_tracker.py -> build/bdist.linux-x86_64/wheel/detectron2/tracking\n  copying build/lib.linux-x86_64-cpython-312/detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py -> build/bdist.linux-x86_64/wheel/detectron2/tracking\n  copying build/lib.linux-x86_64-cpython-312/detectron2/tracking/utils.py -> build/bdist.linux-x86_64/wheel/detectron2/tracking\n  copying build/lib.linux-x86_64-cpython-312/detectron2/tracking/bbox_iou_tracker.py -> build/bdist.linux-x86_64/wheel/detectron2/tracking\n  creating build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/wrappers.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/batch_norm.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/__init__.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/roi_align_rotated.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/aspp.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/rotated_boxes.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/blocks.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/deform_conv.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/losses.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/roi_align.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/nms.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/mask_ops.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  copying build/lib.linux-x86_64-cpython-312/detectron2/layers/shape_spec.py -> build/bdist.linux-x86_64/wheel/detectron2/layers\n  creating build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/visualize_data.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/benchmark.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/__init__.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/lightning_train_net.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/analyze_model.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/lazyconfig_train_net.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/plain_train_net.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/visualize_json_results.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/train_net.py -> build/bdist.linux-x86_64/wheel/tools\n  copying build/lib.linux-x86_64-cpython-312/tools/convert-torchvision-to-d2.py -> build/bdist.linux-x86_64/wheel/tools\n  running install_egg_info\n  running egg_info\n  creating detectron2.egg-info\n  writing detectron2.egg-info/PKG-INFO\n  writing dependency_links to detectron2.egg-info/dependency_links.txt\n  writing requirements to detectron2.egg-info/requires.txt\n  writing top-level names to detectron2.egg-info/top_level.txt\n  writing manifest file 'detectron2.egg-info/SOURCES.txt'\n  reading manifest file 'detectron2.egg-info/SOURCES.txt'\n  adding license file 'LICENSE'\n  writing manifest file 'detectron2.egg-info/SOURCES.txt'\n  Copying detectron2.egg-info to build/bdist.linux-x86_64/wheel/detectron2-0.6-py3.12.egg-info\n  running install_scripts\n  creating build/bdist.linux-x86_64/wheel/detectron2-0.6.dist-info/WHEEL\n  creating '/tmp/pip-ephem-wheel-cache-kpo_23bj/wheels/d3/6e/bd/1969578f1456a6be2d6f083da65c669f450b23b8f3d1ac14c1/tmpbww1uosb/.tmp-s3_3n8jo/detectron2-0.6-cp312-cp312-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it\n  adding 'detectron2/_C.cpython-312-x86_64-linux-gnu.so'\n  adding 'detectron2/__init__.py'\n  adding 'detectron2/checkpoint/__init__.py'\n  adding 'detectron2/checkpoint/c2_model_loading.py'\n  adding 'detectron2/checkpoint/catalog.py'\n  adding 'detectron2/checkpoint/detection_checkpoint.py'\n  adding 'detectron2/config/__init__.py'\n  adding 'detectron2/config/compat.py'\n  adding 'detectron2/config/config.py'\n  adding 'detectron2/config/defaults.py'\n  adding 'detectron2/config/instantiate.py'\n  adding 'detectron2/config/lazy.py'\n  adding 'detectron2/data/__init__.py'\n  adding 'detectron2/data/benchmark.py'\n  adding 'detectron2/data/build.py'\n  adding 'detectron2/data/catalog.py'\n  adding 'detectron2/data/common.py'\n  adding 'detectron2/data/dataset_mapper.py'\n  adding 'detectron2/data/detection_utils.py'\n  adding 'detectron2/data/datasets/__init__.py'\n  adding 'detectron2/data/datasets/builtin.py'\n  adding 'detectron2/data/datasets/builtin_meta.py'\n  adding 'detectron2/data/datasets/cityscapes.py'\n  adding 'detectron2/data/datasets/cityscapes_panoptic.py'\n  adding 'detectron2/data/datasets/coco.py'\n  adding 'detectron2/data/datasets/coco_panoptic.py'\n  adding 'detectron2/data/datasets/lvis.py'\n  adding 'detectron2/data/datasets/lvis_v0_5_categories.py'\n  adding 'detectron2/data/datasets/lvis_v1_categories.py'\n  adding 'detectron2/data/datasets/lvis_v1_category_image_count.py'\n  adding 'detectron2/data/datasets/pascal_voc.py'\n  adding 'detectron2/data/datasets/register_coco.py'\n  adding 'detectron2/data/samplers/__init__.py'\n  adding 'detectron2/data/samplers/distributed_sampler.py'\n  adding 'detectron2/data/samplers/grouped_batch_sampler.py'\n  adding 'detectron2/data/transforms/__init__.py'\n  adding 'detectron2/data/transforms/augmentation.py'\n  adding 'detectron2/data/transforms/augmentation_impl.py'\n  adding 'detectron2/data/transforms/transform.py'\n  adding 'detectron2/engine/__init__.py'\n  adding 'detectron2/engine/defaults.py'\n  adding 'detectron2/engine/hooks.py'\n  adding 'detectron2/engine/launch.py'\n  adding 'detectron2/engine/train_loop.py'\n  adding 'detectron2/evaluation/__init__.py'\n  adding 'detectron2/evaluation/cityscapes_evaluation.py'\n  adding 'detectron2/evaluation/coco_evaluation.py'\n  adding 'detectron2/evaluation/evaluator.py'\n  adding 'detectron2/evaluation/fast_eval_api.py'\n  adding 'detectron2/evaluation/lvis_evaluation.py'\n  adding 'detectron2/evaluation/panoptic_evaluation.py'\n  adding 'detectron2/evaluation/pascal_voc_evaluation.py'\n  adding 'detectron2/evaluation/rotated_coco_evaluation.py'\n  adding 'detectron2/evaluation/sem_seg_evaluation.py'\n  adding 'detectron2/evaluation/testing.py'\n  adding 'detectron2/export/__init__.py'\n  adding 'detectron2/export/api.py'\n  adding 'detectron2/export/c10.py'\n  adding 'detectron2/export/caffe2_export.py'\n  adding 'detectron2/export/caffe2_inference.py'\n  adding 'detectron2/export/caffe2_modeling.py'\n  adding 'detectron2/export/caffe2_patch.py'\n  adding 'detectron2/export/flatten.py'\n  adding 'detectron2/export/shared.py'\n  adding 'detectron2/export/torchscript.py'\n  adding 'detectron2/export/torchscript_patch.py'\n  adding 'detectron2/layers/__init__.py'\n  adding 'detectron2/layers/aspp.py'\n  adding 'detectron2/layers/batch_norm.py'\n  adding 'detectron2/layers/blocks.py'\n  adding 'detectron2/layers/deform_conv.py'\n  adding 'detectron2/layers/losses.py'\n  adding 'detectron2/layers/mask_ops.py'\n  adding 'detectron2/layers/nms.py'\n  adding 'detectron2/layers/roi_align.py'\n  adding 'detectron2/layers/roi_align_rotated.py'\n  adding 'detectron2/layers/rotated_boxes.py'\n  adding 'detectron2/layers/shape_spec.py'\n  adding 'detectron2/layers/wrappers.py'\n  adding 'detectron2/model_zoo/__init__.py'\n  adding 'detectron2/model_zoo/model_zoo.py'\n  adding 'detectron2/model_zoo/configs/Base-RCNN-C4.yaml'\n  adding 'detectron2/model_zoo/configs/Base-RCNN-DilatedC5.yaml'\n  adding 'detectron2/model_zoo/configs/Base-RCNN-FPN.yaml'\n  adding 'detectron2/model_zoo/configs/Base-RetinaNet.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_C4_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_DC5_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_C4_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_C4_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_DC5_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_DC5_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/fcos_R_50_FPN_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/retinanet_R_101_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/retinanet_R_50_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/rpn_R_50_C4_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Detection/rpn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_C4_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_DC5_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x_giou.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_regnetx_4gf_dds_fpn_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-InstanceSegmentation/mask_rcnn_regnety_4gf_dds_fpn_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-Keypoints/Base-Keypoint-RCNN-FPN.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_101_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-Keypoints/keypoint_rcnn_X_101_32x8d_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-PanopticSegmentation/Base-Panoptic-FPN.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_101_3x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.py'\n  adding 'detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.yaml'\n  adding 'detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_3x.yaml'\n  adding 'detectron2/model_zoo/configs/Cityscapes/mask_rcnn_R_50_FPN.yaml'\n  adding 'detectron2/model_zoo/configs/Detectron1-Comparisons/faster_rcnn_R_50_FPN_noaug_1x.yaml'\n  adding 'detectron2/model_zoo/configs/Detectron1-Comparisons/keypoint_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/Detectron1-Comparisons/mask_rcnn_R_50_FPN_noaug_1x.yaml'\n  adding 'detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/LVISv1-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_R_50_FPN_3x.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_1x_cls_agnostic.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_1x_dconv_c3-c5.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_dconv_c3-c5.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_gn.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/mask_rcnn_R_50_FPN_3x_syncbn.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/mmdet_mask_rcnn_R_50_FPN_1x.py'\n  adding 'detectron2/model_zoo/configs/Misc/panoptic_fpn_R_101_dconv_cascade_gn_3x.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_gn.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_syncbn.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/semantic_R_50_FPN_1x.yaml'\n  adding 'detectron2/model_zoo/configs/Misc/torchvision_imagenet_R_50.py'\n  adding 'detectron2/model_zoo/configs/PascalVOC-Detection/faster_rcnn_R_50_C4.yaml'\n  adding 'detectron2/model_zoo/configs/PascalVOC-Detection/faster_rcnn_R_50_FPN.yaml'\n  adding 'detectron2/model_zoo/configs/common/coco_schedule.py'\n  adding 'detectron2/model_zoo/configs/common/optim.py'\n  adding 'detectron2/model_zoo/configs/common/train.py'\n  adding 'detectron2/model_zoo/configs/common/data/coco.py'\n  adding 'detectron2/model_zoo/configs/common/data/coco_keypoint.py'\n  adding 'detectron2/model_zoo/configs/common/data/coco_panoptic_separated.py'\n  adding 'detectron2/model_zoo/configs/common/data/constants.py'\n  adding 'detectron2/model_zoo/configs/common/models/cascade_rcnn.py'\n  adding 'detectron2/model_zoo/configs/common/models/fcos.py'\n  adding 'detectron2/model_zoo/configs/common/models/keypoint_rcnn_fpn.py'\n  adding 'detectron2/model_zoo/configs/common/models/mask_rcnn_c4.py'\n  adding 'detectron2/model_zoo/configs/common/models/mask_rcnn_fpn.py'\n  adding 'detectron2/model_zoo/configs/common/models/mask_rcnn_vitdet.py'\n  adding 'detectron2/model_zoo/configs/common/models/panoptic_fpn.py'\n  adding 'detectron2/model_zoo/configs/common/models/retinanet.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_100ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_200ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_101_FPN_400ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_100ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_200ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_400ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_R_50_FPN_50ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_100ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_200ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_400ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_200ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_400ep_LSJ.py'\n  adding 'detectron2/model_zoo/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/fast_rcnn_R_50_FPN_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/fast_rcnn_R_50_FPN_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_normalized_training_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/keypoint_rcnn_R_50_FPN_training_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_GCV_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_C4_training_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_DC5_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_pred_boxes_training_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/mask_rcnn_R_50_FPN_training_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/panoptic_fpn_R_50_training_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/retinanet_R_50_FPN_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/retinanet_R_50_FPN_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/rpn_R_50_FPN_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/rpn_R_50_FPN_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_inference_acc_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_instant_test.yaml'\n  adding 'detectron2/model_zoo/configs/quick_schedules/semantic_R_50_FPN_training_acc_test.yaml'\n  adding 'detectron2/modeling/__init__.py'\n  adding 'detectron2/modeling/anchor_generator.py'\n  adding 'detectron2/modeling/box_regression.py'\n  adding 'detectron2/modeling/matcher.py'\n  adding 'detectron2/modeling/mmdet_wrapper.py'\n  adding 'detectron2/modeling/poolers.py'\n  adding 'detectron2/modeling/postprocessing.py'\n  adding 'detectron2/modeling/sampling.py'\n  adding 'detectron2/modeling/test_time_augmentation.py'\n  adding 'detectron2/modeling/backbone/__init__.py'\n  adding 'detectron2/modeling/backbone/backbone.py'\n  adding 'detectron2/modeling/backbone/build.py'\n  adding 'detectron2/modeling/backbone/fpn.py'\n  adding 'detectron2/modeling/backbone/mvit.py'\n  adding 'detectron2/modeling/backbone/regnet.py'\n  adding 'detectron2/modeling/backbone/resnet.py'\n  adding 'detectron2/modeling/backbone/swin.py'\n  adding 'detectron2/modeling/backbone/utils.py'\n  adding 'detectron2/modeling/backbone/vit.py'\n  adding 'detectron2/modeling/meta_arch/__init__.py'\n  adding 'detectron2/modeling/meta_arch/build.py'\n  adding 'detectron2/modeling/meta_arch/dense_detector.py'\n  adding 'detectron2/modeling/meta_arch/fcos.py'\n  adding 'detectron2/modeling/meta_arch/panoptic_fpn.py'\n  adding 'detectron2/modeling/meta_arch/rcnn.py'\n  adding 'detectron2/modeling/meta_arch/retinanet.py'\n  adding 'detectron2/modeling/meta_arch/semantic_seg.py'\n  adding 'detectron2/modeling/proposal_generator/__init__.py'\n  adding 'detectron2/modeling/proposal_generator/build.py'\n  adding 'detectron2/modeling/proposal_generator/proposal_utils.py'\n  adding 'detectron2/modeling/proposal_generator/rpn.py'\n  adding 'detectron2/modeling/proposal_generator/rrpn.py'\n  adding 'detectron2/modeling/roi_heads/__init__.py'\n  adding 'detectron2/modeling/roi_heads/box_head.py'\n  adding 'detectron2/modeling/roi_heads/cascade_rcnn.py'\n  adding 'detectron2/modeling/roi_heads/fast_rcnn.py'\n  adding 'detectron2/modeling/roi_heads/keypoint_head.py'\n  adding 'detectron2/modeling/roi_heads/mask_head.py'\n  adding 'detectron2/modeling/roi_heads/roi_heads.py'\n  adding 'detectron2/modeling/roi_heads/rotated_fast_rcnn.py'\n  adding 'detectron2/projects/__init__.py'\n  adding 'detectron2/projects/deeplab/__init__.py'\n  adding 'detectron2/projects/deeplab/build_solver.py'\n  adding 'detectron2/projects/deeplab/config.py'\n  adding 'detectron2/projects/deeplab/loss.py'\n  adding 'detectron2/projects/deeplab/lr_scheduler.py'\n  adding 'detectron2/projects/deeplab/resnet.py'\n  adding 'detectron2/projects/deeplab/semantic_seg.py'\n  adding 'detectron2/projects/panoptic_deeplab/__init__.py'\n  adding 'detectron2/projects/panoptic_deeplab/config.py'\n  adding 'detectron2/projects/panoptic_deeplab/dataset_mapper.py'\n  adding 'detectron2/projects/panoptic_deeplab/panoptic_seg.py'\n  adding 'detectron2/projects/panoptic_deeplab/post_processing.py'\n  adding 'detectron2/projects/panoptic_deeplab/target_generator.py'\n  adding 'detectron2/projects/point_rend/__init__.py'\n  adding 'detectron2/projects/point_rend/color_augmentation.py'\n  adding 'detectron2/projects/point_rend/config.py'\n  adding 'detectron2/projects/point_rend/mask_head.py'\n  adding 'detectron2/projects/point_rend/point_features.py'\n  adding 'detectron2/projects/point_rend/point_head.py'\n  adding 'detectron2/projects/point_rend/roi_heads.py'\n  adding 'detectron2/projects/point_rend/semantic_seg.py'\n  adding 'detectron2/solver/__init__.py'\n  adding 'detectron2/solver/build.py'\n  adding 'detectron2/solver/lr_scheduler.py'\n  adding 'detectron2/structures/__init__.py'\n  adding 'detectron2/structures/boxes.py'\n  adding 'detectron2/structures/image_list.py'\n  adding 'detectron2/structures/instances.py'\n  adding 'detectron2/structures/keypoints.py'\n  adding 'detectron2/structures/masks.py'\n  adding 'detectron2/structures/rotated_boxes.py'\n  adding 'detectron2/tracking/__init__.py'\n  adding 'detectron2/tracking/base_tracker.py'\n  adding 'detectron2/tracking/bbox_iou_tracker.py'\n  adding 'detectron2/tracking/hungarian_tracker.py'\n  adding 'detectron2/tracking/iou_weighted_hungarian_bbox_iou_tracker.py'\n  adding 'detectron2/tracking/utils.py'\n  adding 'detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py'\n  adding 'detectron2/utils/__init__.py'\n  adding 'detectron2/utils/analysis.py'\n  adding 'detectron2/utils/collect_env.py'\n  adding 'detectron2/utils/colormap.py'\n  adding 'detectron2/utils/comm.py'\n  adding 'detectron2/utils/develop.py'\n  adding 'detectron2/utils/env.py'\n  adding 'detectron2/utils/events.py'\n  adding 'detectron2/utils/file_io.py'\n  adding 'detectron2/utils/logger.py'\n  adding 'detectron2/utils/memory.py'\n  adding 'detectron2/utils/registry.py'\n  adding 'detectron2/utils/serialize.py'\n  adding 'detectron2/utils/testing.py'\n  adding 'detectron2/utils/torch_version_utils.py'\n  adding 'detectron2/utils/tracing.py'\n  adding 'detectron2/utils/video_visualizer.py'\n  adding 'detectron2/utils/visualizer.py'\n  adding 'tools/__init__.py'\n  adding 'tools/analyze_model.py'\n  adding 'tools/benchmark.py'\n  adding 'tools/convert-torchvision-to-d2.py'\n  adding 'tools/lazyconfig_train_net.py'\n  adding 'tools/lightning_train_net.py'\n  adding 'tools/plain_train_net.py'\n  adding 'tools/train_net.py'\n  adding 'tools/visualize_data.py'\n  adding 'tools/visualize_json_results.py'\n  adding 'detectron2-0.6.dist-info/LICENSE'\n  adding 'detectron2-0.6.dist-info/METADATA'\n  adding 'detectron2-0.6.dist-info/WHEEL'\n  adding 'detectron2-0.6.dist-info/top_level.txt'\n  adding 'detectron2-0.6.dist-info/RECORD'\n  removing build/bdist.linux-x86_64/wheel\n  Building wheel for detectron2 (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n  Created wheel for detectron2: filename=detectron2-0.6-cp312-cp312-linux_x86_64.whl size=6220275 sha256=394ff2f1606705913306c52b7a3fe2e500da394b110aa3bb3d0fd173b37e2314\n  Stored in directory: /tmp/pip-ephem-wheel-cache-kpo_23bj/wheels/d3/6e/bd/1969578f1456a6be2d6f083da65c669f450b23b8f3d1ac14c1\n  Running command Building wheel for fvcore (pyproject.toml)\n  /usr/local/lib/python3.12/dist-packages/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.\n    warn(\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  creating build/lib\n  creating build/lib/fvcore\n  copying fvcore/__init__.py -> build/lib/fvcore\n  creating build/lib/fvcore/transforms\n  copying fvcore/transforms/__init__.py -> build/lib/fvcore/transforms\n  copying fvcore/transforms/transform.py -> build/lib/fvcore/transforms\n  copying fvcore/transforms/transform_util.py -> build/lib/fvcore/transforms\n  creating build/lib/fvcore/nn\n  copying fvcore/nn/smooth_l1_loss.py -> build/lib/fvcore/nn\n  copying fvcore/nn/focal_loss.py -> build/lib/fvcore/nn\n  copying fvcore/nn/__init__.py -> build/lib/fvcore/nn\n  copying fvcore/nn/flop_count.py -> build/lib/fvcore/nn\n  copying fvcore/nn/weight_init.py -> build/lib/fvcore/nn\n  copying fvcore/nn/parameter_count.py -> build/lib/fvcore/nn\n  copying fvcore/nn/jit_analysis.py -> build/lib/fvcore/nn\n  copying fvcore/nn/squeeze_excitation.py -> build/lib/fvcore/nn\n  copying fvcore/nn/giou_loss.py -> build/lib/fvcore/nn\n  copying fvcore/nn/print_model_statistics.py -> build/lib/fvcore/nn\n  copying fvcore/nn/jit_handles.py -> build/lib/fvcore/nn\n  copying fvcore/nn/activation_count.py -> build/lib/fvcore/nn\n  copying fvcore/nn/precise_bn.py -> build/lib/fvcore/nn\n  copying fvcore/nn/distributed.py -> build/lib/fvcore/nn\n  creating build/lib/fvcore/common\n  copying fvcore/common/benchmark.py -> build/lib/fvcore/common\n  copying fvcore/common/__init__.py -> build/lib/fvcore/common\n  copying fvcore/common/history_buffer.py -> build/lib/fvcore/common\n  copying fvcore/common/registry.py -> build/lib/fvcore/common\n  copying fvcore/common/file_io.py -> build/lib/fvcore/common\n  copying fvcore/common/timer.py -> build/lib/fvcore/common\n  copying fvcore/common/config.py -> build/lib/fvcore/common\n  copying fvcore/common/param_scheduler.py -> build/lib/fvcore/common\n  copying fvcore/common/checkpoint.py -> build/lib/fvcore/common\n  copying fvcore/common/download.py -> build/lib/fvcore/common\n  installing to build/bdist.linux-x86_64/wheel\n  running install\n  running install_lib\n  creating build/bdist.linux-x86_64\n  creating build/bdist.linux-x86_64/wheel\n  creating build/bdist.linux-x86_64/wheel/fvcore\n  copying build/lib/fvcore/__init__.py -> build/bdist.linux-x86_64/wheel/fvcore\n  creating build/bdist.linux-x86_64/wheel/fvcore/transforms\n  copying build/lib/fvcore/transforms/__init__.py -> build/bdist.linux-x86_64/wheel/fvcore/transforms\n  copying build/lib/fvcore/transforms/transform.py -> build/bdist.linux-x86_64/wheel/fvcore/transforms\n  copying build/lib/fvcore/transforms/transform_util.py -> build/bdist.linux-x86_64/wheel/fvcore/transforms\n  creating build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/smooth_l1_loss.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/focal_loss.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/__init__.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/flop_count.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/weight_init.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/parameter_count.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/jit_analysis.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/squeeze_excitation.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/giou_loss.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/print_model_statistics.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/jit_handles.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/activation_count.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/precise_bn.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  copying build/lib/fvcore/nn/distributed.py -> build/bdist.linux-x86_64/wheel/fvcore/nn\n  creating build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/benchmark.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/__init__.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/history_buffer.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/registry.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/file_io.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/timer.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/config.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/param_scheduler.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/checkpoint.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  copying build/lib/fvcore/common/download.py -> build/bdist.linux-x86_64/wheel/fvcore/common\n  running install_egg_info\n  running egg_info\n  writing fvcore.egg-info/PKG-INFO\n  writing dependency_links to fvcore.egg-info/dependency_links.txt\n  writing requirements to fvcore.egg-info/requires.txt\n  writing top-level names to fvcore.egg-info/top_level.txt\n  reading manifest file 'fvcore.egg-info/SOURCES.txt'\n  writing manifest file 'fvcore.egg-info/SOURCES.txt'\n  Copying fvcore.egg-info to build/bdist.linux-x86_64/wheel/fvcore-0.1.5.post20221221-py3.12.egg-info\n  running install_scripts\n  creating build/bdist.linux-x86_64/wheel/fvcore-0.1.5.post20221221.dist-info/WHEEL\n  creating '/tmp/pip-ephem-wheel-cache-kpo_23bj/wheels/ed/9f/a5/e4f5b27454ccd4596bd8b62432c7d6b1ca9fa22aef9d70a16a/tmpct8menpd/.tmp-61_67byb/fvcore-0.1.5.post20221221-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it\n  adding 'fvcore/__init__.py'\n  adding 'fvcore/common/__init__.py'\n  adding 'fvcore/common/benchmark.py'\n  adding 'fvcore/common/checkpoint.py'\n  adding 'fvcore/common/config.py'\n  adding 'fvcore/common/download.py'\n  adding 'fvcore/common/file_io.py'\n  adding 'fvcore/common/history_buffer.py'\n  adding 'fvcore/common/param_scheduler.py'\n  adding 'fvcore/common/registry.py'\n  adding 'fvcore/common/timer.py'\n  adding 'fvcore/nn/__init__.py'\n  adding 'fvcore/nn/activation_count.py'\n  adding 'fvcore/nn/distributed.py'\n  adding 'fvcore/nn/flop_count.py'\n  adding 'fvcore/nn/focal_loss.py'\n  adding 'fvcore/nn/giou_loss.py'\n  adding 'fvcore/nn/jit_analysis.py'\n  adding 'fvcore/nn/jit_handles.py'\n  adding 'fvcore/nn/parameter_count.py'\n  adding 'fvcore/nn/precise_bn.py'\n  adding 'fvcore/nn/print_model_statistics.py'\n  adding 'fvcore/nn/smooth_l1_loss.py'\n  adding 'fvcore/nn/squeeze_excitation.py'\n  adding 'fvcore/nn/weight_init.py'\n  adding 'fvcore/transforms/__init__.py'\n  adding 'fvcore/transforms/transform.py'\n  adding 'fvcore/transforms/transform_util.py'\n  adding 'fvcore-0.1.5.post20221221.dist-info/METADATA'\n  adding 'fvcore-0.1.5.post20221221.dist-info/WHEEL'\n  adding 'fvcore-0.1.5.post20221221.dist-info/top_level.txt'\n  adding 'fvcore-0.1.5.post20221221.dist-info/RECORD'\n  removing build/bdist.linux-x86_64/wheel\n  Building wheel for fvcore (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n  Created wheel for fvcore: filename=fvcore-0.1.5.post20221221-py3-none-any.whl size=61398 sha256=71f1b14759c970787ad33e9448ef21fdda1386bc3b3032bd727d1ffc97028209\n  Stored in directory: /tmp/pip-ephem-wheel-cache-kpo_23bj/wheels/ed/9f/a5/e4f5b27454ccd4596bd8b62432c7d6b1ca9fa22aef9d70a16a\nSuccessfully built detectron2 fvcore\nInstalling collected packages: yacs, portalocker, iopath, hydra-core, fvcore, detectron2\n\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6/6\u001b[0m [detectron2]6\u001b[0m [detectron2]\n\u001b[1A\u001b[2KSuccessfully installed detectron2-0.6 fvcore-0.1.5.post20221221 hydra-core-1.3.2 iopath-0.1.9 portalocker-3.2.0 yacs-0.1.8\n","output_type":"stream"}],"execution_count":21},{"cell_type":"code","source":"!pip uninstall -y detectron2","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:20:10.937036Z","iopub.execute_input":"2026-04-10T18:20:10.937641Z","iopub.status.idle":"2026-04-10T18:20:11.641826Z","shell.execute_reply.started":"2026-04-10T18:20:10.937602Z","shell.execute_reply":"2026-04-10T18:20:11.641061Z"}},"outputs":[{"name":"stdout","text":"Found existing installation: detectron2 0.6\nUninstalling detectron2-0.6:\n  Successfully uninstalled detectron2-0.6\n","output_type":"stream"}],"execution_count":26},{"cell_type":"code","source":"!pip install torch==2.2.2+cu118 torchvision==0.17.2+cu118 \\\n--extra-index-url https://download.pytorch.org/whl/cu118","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:20:19.543513Z","iopub.execute_input":"2026-04-10T18:20:19.544329Z","iopub.status.idle":"2026-04-10T18:20:59.836715Z","shell.execute_reply.started":"2026-04-10T18:20:19.544293Z","shell.execute_reply":"2026-04-10T18:20:59.835748Z"}},"outputs":[{"name":"stdout","text":"Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118\nCollecting torch==2.2.2+cu118\n  Downloading https://download-r2.pytorch.org/whl/cu118/torch-2.2.2%2Bcu118-cp312-cp312-linux_x86_64.whl (819.1 MB)\n\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m819.1/819.1 MB\u001b[0m \u001b[31m42.2 MB/s\u001b[0m  \u001b[33m0:00:10\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[?25hCollecting torchvision==0.17.2+cu118\n  Downloading https://download-r2.pytorch.org/whl/cu118/torchvision-0.17.2%2Bcu118-cp312-cp312-linux_x86_64.whl (6.2 MB)\n\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.2/6.2 MB\u001b[0m \u001b[31m122.8 MB/s\u001b[0m  \u001b[33m0:00:00\u001b[0m\n\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (3.24.3)\nRequirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (4.15.0)\nRequirement already satisfied: sympy in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (1.13.1)\nRequirement already satisfied: networkx in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (3.6.1)\nRequirement already satisfied: jinja2 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (3.1.6)\nRequirement already satisfied: fsspec in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (2026.2.0)\nRequirement already satisfied: nvidia-cuda-nvrtc-cu11==11.8.89 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.89)\nRequirement already satisfied: nvidia-cuda-runtime-cu11==11.8.89 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.89)\nRequirement already satisfied: nvidia-cuda-cupti-cu11==11.8.87 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.87)\nRequirement already satisfied: nvidia-cudnn-cu11==8.7.0.84 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (8.7.0.84)\nRequirement already satisfied: nvidia-cublas-cu11==11.11.3.6 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.11.3.6)\nRequirement already satisfied: nvidia-cufft-cu11==10.9.0.58 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (10.9.0.58)\nRequirement already satisfied: nvidia-curand-cu11==10.3.0.86 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (10.3.0.86)\nRequirement already satisfied: nvidia-cusolver-cu11==11.4.1.48 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.4.1.48)\nRequirement already satisfied: nvidia-cusparse-cu11==11.7.5.86 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.7.5.86)\nRequirement already satisfied: nvidia-nccl-cu11==2.19.3 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (2.19.3)\nRequirement already satisfied: nvidia-nvtx-cu11==11.8.86 in /usr/local/lib/python3.12/dist-packages (from torch==2.2.2+cu118) (11.8.86)\nRequirement already satisfied: numpy in /usr/local/lib/python3.12/dist-packages (from torchvision==0.17.2+cu118) (2.0.2)\nRequirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.12/dist-packages (from torchvision==0.17.2+cu118) (11.3.0)\nRequirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/dist-packages (from jinja2->torch==2.2.2+cu118) (3.0.3)\nRequirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.12/dist-packages (from sympy->torch==2.2.2+cu118) (1.3.0)\nInstalling collected packages: torch, torchvision\n\u001b[2K  Attempting uninstall: torch\n\u001b[2K    Found existing installation: torch 2.5.1+cu121\n\u001b[2K    Uninstalling torch-2.5.1+cu121:━━━━━━━━━━━━━\u001b[0m \u001b[32m0/2\u001b[0m [torch]\n\u001b[2K      Successfully uninstalled torch-2.5.1+cu121 \u001b[32m0/2\u001b[0m [torch]\n\u001b[2K  Attempting uninstall: torchvision━━━━━━━━━━━━━\u001b[0m \u001b[32m0/2\u001b[0m [torch]\n\u001b[2K    Found existing installation: torchvision 0.20.1+cu121\u001b[0m [torch]\n\u001b[2K    Uninstalling torchvision-0.20.1+cu121:━━\u001b[0m \u001b[32m0/2\u001b[0m [torch]\n\u001b[2K      Successfully uninstalled torchvision-0.20.1+cu121/2\u001b[0m [torch]\n\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2/2\u001b[0m [torchvision]\u001b[0m [torchvision]\n\u001b[1A\u001b[2K\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\ntorchaudio 2.5.1+cu121 requires torch==2.5.1, but you have torch 2.2.2+cu118 which is incompatible.\u001b[0m\u001b[31m\n\u001b[0mSuccessfully installed torch-2.2.2+cu118 torchvision-0.17.2+cu118\n","output_type":"stream"}],"execution_count":27},{"cell_type":"code","source":"!pip install ninja cython setuptools==69.5.1 wheel","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:20:59.838325Z","iopub.execute_input":"2026-04-10T18:20:59.838613Z","iopub.status.idle":"2026-04-10T18:21:01.760518Z","shell.execute_reply.started":"2026-04-10T18:20:59.838585Z","shell.execute_reply":"2026-04-10T18:21:01.759822Z"}},"outputs":[{"name":"stdout","text":"Requirement already satisfied: ninja in /usr/local/lib/python3.12/dist-packages (1.13.0)\nRequirement already satisfied: cython in /usr/local/lib/python3.12/dist-packages (0.29.37)\nRequirement already satisfied: setuptools==69.5.1 in /usr/local/lib/python3.12/dist-packages (69.5.1)\nRequirement already satisfied: wheel in /usr/local/lib/python3.12/dist-packages (0.46.3)\nRequirement already satisfied: packaging>=24.0 in /usr/local/lib/python3.12/dist-packages (from wheel) (26.0)\n","output_type":"stream"}],"execution_count":28},{"cell_type":"code","source":"!pip install -U wandb","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:15:19.794446Z","iopub.execute_input":"2026-04-10T18:15:19.794736Z","iopub.status.idle":"2026-04-10T18:15:27.366209Z","shell.execute_reply.started":"2026-04-10T18:15:19.794707Z","shell.execute_reply":"2026-04-10T18:15:27.36541Z"}},"outputs":[{"name":"stdout","text":"Requirement already satisfied: wandb in /usr/local/lib/python3.12/dist-packages (0.25.0)\nCollecting wandb\n  Downloading wandb-0.25.1-py3-none-manylinux_2_28_x86_64.whl.metadata (11 kB)\nRequirement already satisfied: click>=8.0.1 in /usr/local/lib/python3.12/dist-packages (from wandb) (8.3.1)\nRequirement already satisfied: gitpython!=3.1.29,>=1.0.0 in /usr/local/lib/python3.12/dist-packages (from wandb) (3.1.46)\nRequirement already satisfied: packaging in /usr/local/lib/python3.12/dist-packages (from wandb) (26.0)\nRequirement already satisfied: platformdirs in /usr/local/lib/python3.12/dist-packages (from wandb) (4.9.2)\nRequirement already satisfied: protobuf!=5.28.0,!=5.29.0,<7,>4.21.0 in /usr/local/lib/python3.12/dist-packages (from wandb) (5.29.5)\nRequirement already satisfied: pydantic<3 in /usr/local/lib/python3.12/dist-packages (from wandb) (2.12.3)\nRequirement already satisfied: pyyaml in /usr/local/lib/python3.12/dist-packages (from wandb) (6.0.3)\nRequirement already satisfied: requests<3,>=2.0.0 in /usr/local/lib/python3.12/dist-packages (from wandb) (2.32.4)\nRequirement already satisfied: sentry-sdk>=2.0.0 in /usr/local/lib/python3.12/dist-packages (from wandb) (2.53.0)\nRequirement already satisfied: typing-extensions<5,>=4.8 in /usr/local/lib/python3.12/dist-packages (from wandb) (4.15.0)\nRequirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.12/dist-packages (from pydantic<3->wandb) (0.7.0)\nRequirement already satisfied: pydantic-core==2.41.4 in /usr/local/lib/python3.12/dist-packages (from pydantic<3->wandb) (2.41.4)\nRequirement already satisfied: typing-inspection>=0.4.2 in /usr/local/lib/python3.12/dist-packages (from pydantic<3->wandb) (0.4.2)\nRequirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib/python3.12/dist-packages (from requests<3,>=2.0.0->wandb) (3.4.4)\nRequirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.12/dist-packages (from requests<3,>=2.0.0->wandb) (3.11)\nRequirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.12/dist-packages (from requests<3,>=2.0.0->wandb) (2.5.0)\nRequirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.12/dist-packages (from requests<3,>=2.0.0->wandb) (2026.1.4)\nRequirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.12/dist-packages (from gitpython!=3.1.29,>=1.0.0->wandb) (4.0.12)\nRequirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.12/dist-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.29,>=1.0.0->wandb) (5.0.2)\nDownloading wandb-0.25.1-py3-none-manylinux_2_28_x86_64.whl (25.6 MB)\n\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m25.6/25.6 MB\u001b[0m \u001b[31m54.1 MB/s\u001b[0m  \u001b[33m0:00:00\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n\u001b[?25hInstalling collected packages: wandb\n  Attempting uninstall: wandb\n    Found existing installation: wandb 0.25.0\n    Uninstalling wandb-0.25.0:\n      Successfully uninstalled wandb-0.25.0\nSuccessfully installed wandb-0.25.1\n","output_type":"stream"}],"execution_count":22},{"cell_type":"code","source":"import wandb\n\nwandb.login()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:17:03.344151Z","iopub.execute_input":"2026-04-10T18:17:03.344785Z","iopub.status.idle":"2026-04-10T18:17:20.58948Z","shell.execute_reply.started":"2026-04-10T18:17:03.344748Z","shell.execute_reply":"2026-04-10T18:17:20.588942Z"}},"outputs":[{"name":"stderr","text":"/usr/local/lib/python3.12/dist-packages/notebook/notebookapp.py:191: SyntaxWarning:\n\ninvalid escape sequence '\\/'\n\n\u001b[34m\u001b[1mwandb\u001b[0m: (1) Create a W&B account\n\u001b[34m\u001b[1mwandb\u001b[0m: (2) Use an existing W&B account\n\u001b[34m\u001b[1mwandb\u001b[0m: (3) Don't visualize my results\n\u001b[34m\u001b[1mwandb\u001b[0m: Enter your choice:","output_type":"stream"},{"output_type":"stream","name":"stdin","text":"  2\n"},{"name":"stderr","text":"\u001b[34m\u001b[1mwandb\u001b[0m: You chose 'Use an existing W&B account'\n\u001b[34m\u001b[1mwandb\u001b[0m: Logging into https://api.wandb.ai. (Learn how to deploy a W&B server locally: https://wandb.me/wandb-server)\n\u001b[34m\u001b[1mwandb\u001b[0m: Create a new API key at: https://wandb.ai/authorize?ref=models\n\u001b[34m\u001b[1mwandb\u001b[0m: Store your API key securely and do not share it.\n\u001b[34m\u001b[1mwandb\u001b[0m: Paste your API key and hit enter:","output_type":"stream"},{"output_type":"stream","name":"stdin","text":"  ········\n"},{"name":"stderr","text":"\u001b[34m\u001b[1mwandb\u001b[0m: No netrc file found, creating one.\n\u001b[34m\u001b[1mwandb\u001b[0m: Appending key for api.wandb.ai to your netrc file: /root/.netrc\n\u001b[34m\u001b[1mwandb\u001b[0m: Currently logged in as: \u001b[33mquyet-dinhxuan\u001b[0m (\u001b[33mquyet-dinhxuan-ho-chi-minh-city-university-of-technology\u001b[0m) to \u001b[32mhttps://api.wandb.ai\u001b[0m. Use \u001b[1m`wandb login --relogin`\u001b[0m to force relogin\n","output_type":"stream"},{"execution_count":23,"output_type":"execute_result","data":{"text/plain":"True"},"metadata":{}}],"execution_count":23},{"cell_type":"markdown","source":"<a id=\"train_method\"></a>\n# Training method implementations\n\nBasically we don't need to implement neural network part, `detectron2` already implements famous architectures and provides its pre-trained weights. We can finetune these pre-trained architectures.\n\nThese models are summarized in [MODEL_ZOO.md](https://github.com/facebookresearch/detectron2/blob/master/MODEL_ZOO.md).\n\nIn this competition, we need object detection model, I will choose [R50-FPN](https://github.com/facebookresearch/detectron2/blob/master/configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml) for this kernel.","metadata":{}},{"cell_type":"markdown","source":"## Data preparation\n\n`detectron2` provides high-level API for training custom dataset.\n\nTo define custom dataset, we need to create **list of dict** (`dataset_dicts`) where each dict contains following:\n\n - file_name: file name of the image.\n - image_id: id of the image, index is used here.\n - height: height of the image.\n - width: width of the image.\n - annotation: This is the ground truth annotation data for object detection, which contains following\n     - bbox: bounding box pixel location with shape (n_boxes, 4)\n     - bbox_mode: `BoxMode.XYXY_ABS` is used here, meaning that absolute value of (xmin, ymin, xmax, ymax) annotation is used in the `bbox`.\n     - category_id: class label id for each bounding box, with shape (n_boxes,)\n\n`get_vinbigdata_dicts` is for train dataset preparation and `get_vinbigdata_dicts_test` is for test dataset preparation.\n\nThis `dataset_dicts` contains the metadata for actual data fed into the neural network.<br/>\nIt is loaded beforehand of the training **on memory**, so it should contain all the metadata (image filepath etc) to construct training dataset, but **should not contain heavy data**.<br/>\n\nIn practice, loading all the taining image arrays are too heavy to be loaded on memory, so these are loaded inside `DataLoader` on-demand (This is done by mapper class in `detectron2`, as I will expain later).","metadata":{}},{"cell_type":"code","source":"import pickle\nfrom pathlib import Path\nfrom typing import Optional\n\nimport cv2\nimport numpy as np\nimport pandas as pd\nfrom detectron2.structures import BoxMode\nfrom tqdm import tqdm\n\n\ndef get_vinbigdata_dicts(\n    imgdir: Path,\n    train_df: pd.DataFrame,\n    train_data_type: str = \"original\",\n    use_cache: bool = True,\n    debug: bool = True,\n    target_indices: Optional[np.ndarray] = None,\n    use_class14: bool = False,\n):\n    debug_str = f\"_debug{int(debug)}\"\n    train_data_type_str = f\"_{train_data_type}\"\n    class14_str = f\"_14class{int(use_class14)}\"\n    cache_path = Path(\".\") / f\"dataset_dicts_cache{train_data_type_str}{class14_str}{debug_str}.pkl\"\n    if not use_cache or not cache_path.exists():\n        print(\"Creating data...\")\n        train_meta = pd.read_csv(imgdir / \"train_meta.csv\")\n        if debug:\n            train_meta = train_meta.iloc[:500]  # For debug....\n\n        # Load 1 image to get image size.\n        image_id = train_meta.loc[0, \"image_id\"]\n        image_path = str(imgdir / \"train\" / f\"{image_id}.png\")\n        image = cv2.imread(image_path)\n        resized_height, resized_width, ch = image.shape\n        print(f\"image shape: {image.shape}\")\n\n        dataset_dicts = []\n        for index, train_meta_row in tqdm(train_meta.iterrows(), total=len(train_meta)):\n            record = {}\n\n            image_id, height, width = train_meta_row.values\n            filename = str(imgdir / \"train\" / f\"{image_id}.png\")\n            record[\"file_name\"] = filename\n            record[\"image_id\"] = image_id\n            record[\"height\"] = resized_height\n            record[\"width\"] = resized_width\n            objs = []\n            for index2, row in train_df.query(\"image_id == @image_id\").iterrows():\n                # print(row)\n                # print(row[\"class_name\"])\n                # class_name = row[\"class_name\"]\n                class_id = row[\"class_id\"]\n                if class_id == 14:\n                    # It is \"No finding\"\n                    if use_class14:\n                        # Use this No finding class with the bbox covering all image area.\n                        bbox_resized = [0, 0, resized_width, resized_height]\n                        obj = {\n                            \"bbox\": bbox_resized,\n                            \"bbox_mode\": BoxMode.XYXY_ABS,\n                            \"category_id\": class_id,\n                        }\n                        objs.append(obj)\n                    else:\n                        # This annotator does not find anything, skip.\n                        pass\n                else:\n                    # bbox_original = [int(row[\"x_min\"]), int(row[\"y_min\"]), int(row[\"x_max\"]), int(row[\"y_max\"])]\n                    h_ratio = resized_height / height\n                    w_ratio = resized_width / width\n                    bbox_resized = [\n                        float(row[\"x_min\"]) * w_ratio,\n                        float(row[\"y_min\"]) * h_ratio,\n                        float(row[\"x_max\"]) * w_ratio,\n                        float(row[\"y_max\"]) * h_ratio,\n                    ]\n                    obj = {\n                        \"bbox\": bbox_resized,\n                        \"bbox_mode\": BoxMode.XYXY_ABS,\n                        \"category_id\": class_id,\n                    }\n                    objs.append(obj)\n            record[\"annotations\"] = objs\n            dataset_dicts.append(record)\n        with open(cache_path, mode=\"wb\") as f:\n            pickle.dump(dataset_dicts, f)\n\n    print(f\"Load from cache {cache_path}\")\n    with open(cache_path, mode=\"rb\") as f:\n        dataset_dicts = pickle.load(f)\n    if target_indices is not None:\n        dataset_dicts = [dataset_dicts[i] for i in target_indices]\n    return dataset_dicts\n\n\ndef get_vinbigdata_dicts_test(\n    imgdir: Path, test_meta: pd.DataFrame, use_cache: bool = True, debug: bool = True,\n):\n    debug_str = f\"_debug{int(debug)}\"\n    cache_path = Path(\".\") / f\"dataset_dicts_cache_test{debug_str}.pkl\"\n    if not use_cache or not cache_path.exists():\n        print(\"Creating data...\")\n        # test_meta = pd.read_csv(imgdir / \"test_meta.csv\")\n        if debug:\n            test_meta = test_meta.iloc[:500]  # For debug....\n\n        # Load 1 image to get image size.\n        image_id = test_meta.loc[0, \"image_id\"]\n        image_path = str(imgdir / \"test\" / f\"{image_id}.png\")\n        image = cv2.imread(image_path)\n        resized_height, resized_width, ch = image.shape\n        print(f\"image shape: {image.shape}\")\n\n        dataset_dicts = []\n        for index, test_meta_row in tqdm(test_meta.iterrows(), total=len(test_meta)):\n            record = {}\n\n            image_id, height, width = test_meta_row.values\n            filename = str(imgdir / \"test\" / f\"{image_id}.png\")\n            record[\"file_name\"] = filename\n            # record[\"image_id\"] = index\n            record[\"image_id\"] = image_id\n            record[\"height\"] = resized_height\n            record[\"width\"] = resized_width\n            # objs = []\n            # record[\"annotations\"] = objs\n            dataset_dicts.append(record)\n        with open(cache_path, mode=\"wb\") as f:\n            pickle.dump(dataset_dicts, f)\n\n    print(f\"Load from cache {cache_path}\")\n    with open(cache_path, mode=\"rb\") as f:\n        dataset_dicts = pickle.load(f)\n    return dataset_dicts\n","metadata":{"_kg_hide-input":true,"trusted":true,"execution":{"iopub.status.busy":"2026-04-10T18:17:25.333548Z","iopub.execute_input":"2026-04-10T18:17:25.334293Z","iopub.status.idle":"2026-04-10T18:17:25.758639Z","shell.execute_reply.started":"2026-04-10T18:17:25.334262Z","shell.execute_reply":"2026-04-10T18:17:25.757641Z"}},"outputs":[{"traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mRuntimeError\u001b[0m                              Traceback (most recent call last)","\u001b[0;32m/tmp/ipykernel_137/2800065572.py\u001b[0m in \u001b[0;36m<cell line: 0>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      7\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mdetectron2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstructures\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mBoxMode\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtqdm\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtqdm\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     10\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/detectron2/structures/__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;31m# Copyright (c) Facebook, Inc. and its affiliates.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mboxes\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mBoxes\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mBoxMode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpairwise_iou\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpairwise_ioa\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpairwise_point_box_distance\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mimage_list\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mImageList\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0minstances\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mInstances\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/detectron2/structures/image_list.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnn\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mfunctional\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mF\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mdetectron2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlayers\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwrappers\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmove_device_like\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mshapes_to_tensor\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mdetectron2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mutils\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtorch_version_utils\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmin_torch_version\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     10\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/detectron2/layers/__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;31m# Copyright (c) Facebook, Inc. and its affiliates.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbatch_norm\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mFrozenBatchNorm2d\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mget_norm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNaiveSyncBatchNorm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mCycleBatchNormList\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      3\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mdeform_conv\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mDeformConv\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mModulatedDeformConv\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mmask_ops\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpaste_masks_in_image\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mnms\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mbatched_nms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbatched_nms_rotated\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnms_rotated\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/detectron2/layers/batch_norm.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdistributed\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mdist\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mfvcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdistributed\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdifferentiable_all_reduce\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtorch\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnn\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mfunctional\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mF\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/fvcore/nn/__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mactivation_count\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mactivation_count\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mActivationCountAnalysis\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      3\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mflop_count\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mflop_count\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFlopCountAnalysis\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m from .focal_loss import (\n\u001b[0m\u001b[1;32m      5\u001b[0m     \u001b[0msigmoid_focal_loss\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m     \u001b[0msigmoid_focal_loss_jit\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/fvcore/nn/focal_loss.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m     50\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     51\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 52\u001b[0;31m \u001b[0msigmoid_focal_loss_jit\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"torch.jit.ScriptModule\"\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjit\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscript\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msigmoid_focal_loss\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     53\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     54\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/jit/_script.py\u001b[0m in \u001b[0;36mscript\u001b[0;34m(obj, optimize, _frames_up, _rcb, example_inputs)\u001b[0m\n\u001b[1;32m   1393\u001b[0m                     \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtraining\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1394\u001b[0m                         \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython_only_fn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1395\u001b[0;31m                     \u001b[0;32mreturn\u001b[0m \u001b[0minput\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m99\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1396\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1397\u001b[0m             \u001b[0mscripted_module\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjit\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscript\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mMyModule\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/jit/_recursive.py\u001b[0m in \u001b[0;36mtry_compile_fn\u001b[0;34m(fn, loc)\u001b[0m\n\u001b[1;32m   1001\u001b[0m     \u001b[0mrcb\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_jit_internal\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreateResolutionCallbackFromClosure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1002\u001b[0m     \u001b[0;32mreturn\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjit\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscript\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_rcb\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrcb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1003\u001b[0;31m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1004\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1005\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mwrap_cpp_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcpp_class\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/jit/_script.py\u001b[0m in \u001b[0;36mscript\u001b[0;34m(obj, optimize, _frames_up, _rcb, example_inputs)\u001b[0m\n\u001b[1;32m   1393\u001b[0m                     \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtraining\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1394\u001b[0m                         \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython_only_fn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1395\u001b[0;31m                     \u001b[0;32mreturn\u001b[0m \u001b[0minput\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m99\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1396\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1397\u001b[0m             \u001b[0mscripted_module\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjit\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscript\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mMyModule\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mRuntimeError\u001b[0m: \n\nlegacy_get_string(str reduction) -> int:\nExpected a value of type 'str' for argument 'reduction' but instead found type 'Optional[bool]'.\n:\n  File \"/usr/local/lib/python3.12/dist-packages/torch/nn/functional.py\", line 3147\n        )\n    if size_average is not None or reduce is not None:\n        reduction = _Reduction.legacy_get_string(size_average, reduce)\n                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\n    return torch._C._nn.nll_loss_nd(\n        input, target, weight, _Reduction.get_enum(reduction), ignore_index\n'binary_cross_entropy_with_logits' is being compiled since it was called from 'sigmoid_focal_loss'\n  File \"/usr/local/lib/python3.12/dist-packages/fvcore/nn/focal_loss.py\", line 36\n    targets = targets.float()\n    p = torch.sigmoid(inputs)\n    ce_loss = F.binary_cross_entropy_with_logits(inputs, targets, reduction=\"none\")\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\n    p_t = p * targets + (1 - p) * (1 - targets)\n    loss = ce_loss * ((1 - p_t) ** gamma)\n"],"ename":"RuntimeError","evalue":"\n\nlegacy_get_string(str reduction) -> int:\nExpected a value of type 'str' for argument 'reduction' but instead found type 'Optional[bool]'.\n:\n  File \"/usr/local/lib/python3.12/dist-packages/torch/nn/functional.py\", line 3147\n        )\n    if size_average is not None or reduce is not None:\n        reduction = _Reduction.legacy_get_string(size_average, reduce)\n                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\n    return torch._C._nn.nll_loss_nd(\n        input, target, weight, _Reduction.get_enum(reduction), ignore_index\n'binary_cross_entropy_with_logits' is being compiled since it was called from 'sigmoid_focal_loss'\n  File \"/usr/local/lib/python3.12/dist-packages/fvcore/nn/focal_loss.py\", line 36\n    targets = targets.float()\n    p = torch.sigmoid(inputs)\n    ce_loss = F.binary_cross_entropy_with_logits(inputs, targets, reduction=\"none\")\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE\n    p_t = p * targets + (1 - p) * (1 - targets)\n    loss = ce_loss * ((1 - p_t) ** gamma)\n","output_type":"error"}],"execution_count":24},{"cell_type":"code","source":"# --- utils ---\nfrom pathlib import Path\nfrom typing import Any, Union\n\nimport yaml\n\n\ndef save_yaml(filepath: Union[str, Path], content: Any, width: int = 120):\n    with open(filepath, \"w\") as f:\n        yaml.dump(content, f, width=width)\n\n\ndef load_yaml(filepath: Union[str, Path]) -> Any:\n    with open(filepath, \"r\") as f:\n        content = yaml.full_load(f)\n    return content\n","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# --- configs ---\nthing_classes = [\n    \"Aortic enlargement\",\n    \"Atelectasis\",\n    \"Calcification\",\n    \"Cardiomegaly\",\n    \"Consolidation\",\n    \"ILD\",\n    \"Infiltration\",\n    \"Lung Opacity\",\n    \"Nodule/Mass\",\n    \"Other lesion\",\n    \"Pleural effusion\",\n    \"Pleural thickening\",\n    \"Pneumothorax\",\n    \"Pulmonary fibrosis\"\n]\ncategory_name_to_id = {class_name: index for index, class_name in enumerate(thing_classes)}\n","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"<a id=\"custom_trainer\"></a>\n# Customizing detectron2 trainer\n\n※ This section is advanced, I recommend to jump to **Training scripts** section for the first time of reading.\n\nYou can refer the [Detectron2 Beginner's Tutorial](https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5#scrollTo=QHnVupBBn9eR) Colab Notebook (or [version 7 of this kernel](https://www.kaggle.com/corochann/vinbigdata-detectron2-train?scriptVersionId=51628272)) for the simple usage of detectron2 how to train custom dataset. `DefaultTrainer` is used in the example which provides the starting point to train your model with custom dataset.\n\nIt is nice to start with, however I want to customize the training behavior more to improve the model's performance.\nWe can make own Trainer class (`MyTrainer` here) for this purpose, and override methods to provide customized behavior.","metadata":{}},{"cell_type":"markdown","source":"<a id=\"mapper\"></a>\n## Mapper for augmentation\n\n`Mapper` class is used inside pytorch `DataLoader`. It is responsible for converting `dataset_dicts` into actual data fed into the neural network, and we can insert augmentation process in this Mapper class.\n\n - Ref: [detectron2 docs \"Dataloader\"](https://detectron2.readthedocs.io/en/latest/tutorials/data_loading.html)\n\nI implemented `MyMapper` which uses augmentations implemented in `detectron2`, and `AlbumentationsMapper` which uses albumentations library augmentations.<br/> \nI will demonstrate these augmentations later, so you can skip reading the code and please just jump to next.","metadata":{}},{"cell_type":"code","source":"\"\"\"\nReferenced:\n - https://detectron2.readthedocs.io/en/latest/tutorials/data_loading.html\n - https://www.kaggle.com/dhiiyaur/detectron-2-compare-models-augmentation/#data\n\"\"\"\nimport copy\nimport logging\n\nimport detectron2.data.transforms as T\nimport torch\nfrom detectron2.data import detection_utils as utils\n\n\nclass MyMapper:\n    \"\"\"Mapper which uses `detectron2.data.transforms` augmentations\"\"\"\n\n    def __init__(self, cfg, is_train: bool = True):\n        aug_kwargs = cfg.aug_kwargs\n        aug_list = [\n            # T.Resize((800, 800)),\n        ]\n        if is_train:\n            aug_list.extend([getattr(T, name)(**kwargs) for name, kwargs in aug_kwargs.items()])\n        self.augmentations = T.AugmentationList(aug_list)\n        self.is_train = is_train\n\n        mode = \"training\" if is_train else \"inference\"\n        print(f\"[MyDatasetMapper] Augmentations used in {mode}: {self.augmentations}\")\n\n    def __call__(self, dataset_dict):\n        dataset_dict = copy.deepcopy(dataset_dict)  # it will be modified by code below\n        image = utils.read_image(dataset_dict[\"file_name\"], format=\"BGR\")\n\n        aug_input = T.AugInput(image)\n        transforms = self.augmentations(aug_input)\n        image = aug_input.image\n\n        # if not self.is_train:\n        #     # USER: Modify this if you want to keep them for some reason.\n        #     dataset_dict.pop(\"annotations\", None)\n        #     dataset_dict.pop(\"sem_seg_file_name\", None)\n        #     return dataset_dict\n\n        image_shape = image.shape[:2]  # h, w\n        dataset_dict[\"image\"] = torch.as_tensor(image.transpose(2, 0, 1).astype(\"float32\"))\n        annos = [\n            utils.transform_instance_annotations(obj, transforms, image_shape)\n            for obj in dataset_dict.pop(\"annotations\")\n            if obj.get(\"iscrowd\", 0) == 0\n        ]\n        instances = utils.annotations_to_instances(annos, image_shape)\n        dataset_dict[\"instances\"] = utils.filter_empty_instances(instances)\n        return dataset_dict","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"\"\"\"\nReferenced:\n - https://detectron2.readthedocs.io/en/latest/tutorials/data_loading.html\n - https://www.kaggle.com/dhiiyaur/detectron-2-compare-models-augmentation/#data\n\"\"\"\nimport albumentations as A\nimport copy\nimport numpy as np\n\nimport torch\nfrom detectron2.data import detection_utils as utils\n\n\nclass AlbumentationsMapper:\n    \"\"\"Mapper which uses `albumentations` augmentations\"\"\"\n    def __init__(self, cfg, is_train: bool = True):\n        aug_kwargs = cfg.aug_kwargs\n        aug_list = [\n        ]\n        if is_train:\n            aug_list.extend([getattr(A, name)(**kwargs) for name, kwargs in aug_kwargs.items()])\n        self.transform = A.Compose(\n            aug_list, bbox_params=A.BboxParams(format=\"pascal_voc\", label_fields=[\"category_ids\"])\n        )\n        self.is_train = is_train\n\n        mode = \"training\" if is_train else \"inference\"\n        print(f\"[AlbumentationsMapper] Augmentations used in {mode}: {self.transform}\")\n\n    def __call__(self, dataset_dict):\n        dataset_dict = copy.deepcopy(dataset_dict)  # it will be modified by code below\n        image = utils.read_image(dataset_dict[\"file_name\"], format=\"BGR\")\n\n        # aug_input = T.AugInput(image)\n        # transforms = self.augmentations(aug_input)\n        # image = aug_input.image\n\n        prev_anno = dataset_dict[\"annotations\"]\n        bboxes = np.array([obj[\"bbox\"] for obj in prev_anno], dtype=np.float32)\n        # category_id = np.array([obj[\"category_id\"] for obj in dataset_dict[\"annotations\"]], dtype=np.int64)\n        category_id = np.arange(len(dataset_dict[\"annotations\"]))\n\n        transformed = self.transform(image=image, bboxes=bboxes, category_ids=category_id)\n        image = transformed[\"image\"]\n        annos = []\n        for i, j in enumerate(transformed[\"category_ids\"]):\n            d = prev_anno[j]\n            d[\"bbox\"] = transformed[\"bboxes\"][i]\n            annos.append(d)\n        dataset_dict.pop(\"annotations\", None)  # Remove unnecessary field.\n\n        # if not self.is_train:\n        #     # USER: Modify this if you want to keep them for some reason.\n        #     dataset_dict.pop(\"annotations\", None)\n        #     dataset_dict.pop(\"sem_seg_file_name\", None)\n        #     return dataset_dict\n\n        image_shape = image.shape[:2]  # h, w\n        dataset_dict[\"image\"] = torch.as_tensor(image.transpose(2, 0, 1).astype(\"float32\"))\n        instances = utils.annotations_to_instances(annos, image_shape)\n        dataset_dict[\"instances\"] = utils.filter_empty_instances(instances)\n        return dataset_dict\n","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"<a id=\"evaluator\"></a>\n## Evaluator\n\nTo evaluate validation dataset to calculate competition metric, we need `Evaluator`.\n\nFamouns dataset's evaluator is already implemented in `detectron2`. <br/>\nFor example, many kinds of AP (Average Precision) is calculted in `COCOEvaluator`.<br/>\n`COCOEvaluator` only calculates AP with IoU from 0.50 to 0.95, but we need AP with IoU 0.40.\n\nHere, I modified `COCOEvaluator` implementation to calculate AP with IoU 0.40 and replaced to show this value instead of AP with IoU 0.70.","metadata":{}},{"cell_type":"code","source":"\"\"\"\nOriginal code from https://github.com/cocodataset/cocoapi/blob/8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9/PythonAPI/pycocotools/cocoeval.py\nJust modified to show AP@40\n\"\"\"\n# Copyright (c) Facebook, Inc. and its affiliates.\nimport contextlib\nimport copy\nimport io\nimport itertools\nimport json\nimport logging\nimport numpy as np\nimport os\nimport pickle\nfrom collections import OrderedDict\nimport pycocotools.mask as mask_util\nimport torch\nfrom pycocotools.coco import COCO\nfrom pycocotools.cocoeval import COCOeval\nfrom tabulate import tabulate\n\nimport detectron2.utils.comm as comm\nfrom detectron2.config import CfgNode\nfrom detectron2.data import MetadataCatalog\nfrom detectron2.data.datasets.coco import convert_to_coco_json\nfrom detectron2.evaluation.evaluator import DatasetEvaluator\nfrom detectron2.evaluation.fast_eval_api import COCOeval_opt\nfrom detectron2.structures import Boxes, BoxMode, pairwise_iou\nfrom detectron2.utils.file_io import PathManager\nfrom detectron2.utils.logger import create_small_table\n\n\ndef vin_summarize(self):\n    '''\n    Compute and display summary metrics for evaluation results.\n    Note this functin can *only* be applied on the default parameter setting\n    '''\n\n    def _summarize(ap=1, iouThr=None, areaRng='all', maxDets=100):\n        p = self.params\n        iStr = ' {:<18} {} @[ IoU={:<9} | area={:>6s} | maxDets={:>3d} ] = {:0.3f}'\n        titleStr = 'Average Precision' if ap == 1 else 'Average Recall'\n        typeStr = '(AP)' if ap == 1 else '(AR)'\n        iouStr = '{:0.2f}:{:0.2f}'.format(p.iouThrs[0], p.iouThrs[-1]) \\\n            if iouThr is None else '{:0.2f}'.format(iouThr)\n\n        aind = [i for i, aRng in enumerate(p.areaRngLbl) if aRng == areaRng]\n        mind = [i for i, mDet in enumerate(p.maxDets) if mDet == maxDets]\n        if ap == 1:\n            # dimension of precision: [TxRxKxAxM]\n            s = self.eval['precision']\n            # IoU\n            if iouThr is not None:\n                t = np.where(iouThr == p.iouThrs)[0]\n                s = s[t]\n            s = s[:, :, :, aind, mind]\n        else:\n            # dimension of recall: [TxKxAxM]\n            s = self.eval['recall']\n            if iouThr is not None:\n                t = np.where(iouThr == p.iouThrs)[0]\n                s = s[t]\n            s = s[:, :, aind, mind]\n        if len(s[s > -1]) == 0:\n            mean_s = -1\n        else:\n            mean_s = np.mean(s[s > -1])\n        print(iStr.format(titleStr, typeStr, iouStr, areaRng, maxDets, mean_s))\n        return mean_s\n\n    def _summarizeDets():\n        stats = np.zeros((12,))\n        stats[0] = _summarize(1)\n        stats[1] = _summarize(1, iouThr=.5, maxDets=self.params.maxDets[2])\n        # stats[2] = _summarize(1, iouThr=.75, maxDets=self.params.maxDets[2])\n        stats[2] = _summarize(1, iouThr=.4, maxDets=self.params.maxDets[2])\n        stats[3] = _summarize(1, areaRng='small', maxDets=self.params.maxDets[2])\n        stats[4] = _summarize(1, areaRng='medium', maxDets=self.params.maxDets[2])\n        stats[5] = _summarize(1, areaRng='large', maxDets=self.params.maxDets[2])\n        stats[6] = _summarize(0, maxDets=self.params.maxDets[0])\n        stats[7] = _summarize(0, maxDets=self.params.maxDets[1])\n        stats[8] = _summarize(0, maxDets=self.params.maxDets[2])\n        stats[9] = _summarize(0, areaRng='small', maxDets=self.params.maxDets[2])\n        stats[10] = _summarize(0, areaRng='medium', maxDets=self.params.maxDets[2])\n        stats[11] = _summarize(0, areaRng='large', maxDets=self.params.maxDets[2])\n        return stats\n\n    def _summarizeKps():\n        stats = np.zeros((10,))\n        stats[0] = _summarize(1, maxDets=20)\n        stats[1] = _summarize(1, maxDets=20, iouThr=.5)\n        stats[2] = _summarize(1, maxDets=20, iouThr=.75)\n        stats[3] = _summarize(1, maxDets=20, areaRng='medium')\n        stats[4] = _summarize(1, maxDets=20, areaRng='large')\n        stats[5] = _summarize(0, maxDets=20)\n        stats[6] = _summarize(0, maxDets=20, iouThr=.5)\n        stats[7] = _summarize(0, maxDets=20, iouThr=.75)\n        stats[8] = _summarize(0, maxDets=20, areaRng='medium')\n        stats[9] = _summarize(0, maxDets=20, areaRng='large')\n        return stats\n\n    if not self.eval:\n        raise Exception('Please run accumulate() first')\n    iouType = self.params.iouType\n    if iouType == 'segm' or iouType == 'bbox':\n        summarize = _summarizeDets\n    elif iouType == 'keypoints':\n        summarize = _summarizeKps\n    self.stats = summarize()\n\n\nprint(\"HACKING: overriding COCOeval.summarize = vin_summarize...\")\nCOCOeval.summarize = vin_summarize\n\n\nclass VinbigdataEvaluator(DatasetEvaluator):\n    \"\"\"\n    Evaluate AR for object proposals, AP for instance detection/segmentation, AP\n    for keypoint detection outputs using COCO's metrics.\n    See http://cocodataset.org/#detection-eval and\n    http://cocodataset.org/#keypoints-eval to understand its metrics.\n\n    In addition to COCO, this evaluator is able to support any bounding box detection,\n    instance segmentation, or keypoint detection dataset.\n    \"\"\"\n\n    def __init__(\n        self,\n        dataset_name,\n        tasks=None,\n        distributed=True,\n        output_dir=None,\n        *,\n        use_fast_impl=True,\n        kpt_oks_sigmas=(),\n    ):\n        \"\"\"\n        Args:\n            dataset_name (str): name of the dataset to be evaluated.\n                It must have either the following corresponding metadata:\n\n                    \"json_file\": the path to the COCO format annotation\n\n                Or it must be in detectron2's standard dataset format\n                so it can be converted to COCO format automatically.\n            tasks (tuple[str]): tasks that can be evaluated under the given\n                configuration. A task is one of \"bbox\", \"segm\", \"keypoints\".\n                By default, will infer this automatically from predictions.\n            distributed (True): if True, will collect results from all ranks and run evaluation\n                in the main process.\n                Otherwise, will only evaluate the results in the current process.\n            output_dir (str): optional, an output directory to dump all\n                results predicted on the dataset. The dump contains two files:\n\n                1. \"instances_predictions.pth\" a file in torch serialization\n                   format that contains all the raw original predictions.\n                2. \"coco_instances_results.json\" a json file in COCO's result\n                   format.\n            use_fast_impl (bool): use a fast but **unofficial** implementation to compute AP.\n                Although the results should be very close to the official implementation in COCO\n                API, it is still recommended to compute results with the official API for use in\n                papers. The faster implementation also uses more RAM.\n            kpt_oks_sigmas (list[float]): The sigmas used to calculate keypoint OKS.\n                See http://cocodataset.org/#keypoints-eval\n                When empty, it will use the defaults in COCO.\n                Otherwise it should be the same length as ROI_KEYPOINT_HEAD.NUM_KEYPOINTS.\n        \"\"\"\n        self._logger = logging.getLogger(__name__)\n        self._distributed = distributed\n        self._output_dir = output_dir\n        self._use_fast_impl = use_fast_impl\n\n        if tasks is not None and isinstance(tasks, CfgNode):\n            kpt_oks_sigmas = (\n                tasks.TEST.KEYPOINT_OKS_SIGMAS if not kpt_oks_sigmas else kpt_oks_sigmas\n            )\n            self._logger.warn(\n                \"COCO Evaluator instantiated using config, this is deprecated behavior.\"\n                \" Please pass in explicit arguments instead.\"\n            )\n            self._tasks = None  # Infering it from predictions should be better\n        else:\n            self._tasks = tasks\n\n        self._cpu_device = torch.device(\"cpu\")\n\n        self._metadata = MetadataCatalog.get(dataset_name)\n        if not hasattr(self._metadata, \"json_file\"):\n            self._logger.info(\n                f\"'{dataset_name}' is not registered by `register_coco_instances`.\"\n                \" Therefore trying to convert it to COCO format ...\"\n            )\n\n            cache_path = os.path.join(output_dir, f\"{dataset_name}_coco_format.json\")\n            self._metadata.json_file = cache_path\n            convert_to_coco_json(dataset_name, cache_path)\n\n        json_file = PathManager.get_local_path(self._metadata.json_file)\n        with contextlib.redirect_stdout(io.StringIO()):\n            self._coco_api = COCO(json_file)\n\n        # Test set json files do not contain annotations (evaluation must be\n        # performed using the COCO evaluation server).\n        self._do_evaluation = \"annotations\" in self._coco_api.dataset\n        if self._do_evaluation:\n            self._kpt_oks_sigmas = kpt_oks_sigmas\n\n    def reset(self):\n        self._predictions = []\n\n    def process(self, inputs, outputs):\n        \"\"\"\n        Args:\n            inputs: the inputs to a COCO model (e.g., GeneralizedRCNN).\n                It is a list of dict. Each dict corresponds to an image and\n                contains keys like \"height\", \"width\", \"file_name\", \"image_id\".\n            outputs: the outputs of a COCO model. It is a list of dicts with key\n                \"instances\" that contains :class:`Instances`.\n        \"\"\"\n        for input, output in zip(inputs, outputs):\n            prediction = {\"image_id\": input[\"image_id\"]}\n\n            if \"instances\" in output:\n                instances = output[\"instances\"].to(self._cpu_device)\n                prediction[\"instances\"] = instances_to_coco_json(instances, input[\"image_id\"])\n            if \"proposals\" in output:\n                prediction[\"proposals\"] = output[\"proposals\"].to(self._cpu_device)\n            if len(prediction) > 1:\n                self._predictions.append(prediction)\n\n    def evaluate(self, img_ids=None):\n        \"\"\"\n        Args:\n            img_ids: a list of image IDs to evaluate on. Default to None for the whole dataset\n        \"\"\"\n        if self._distributed:\n            comm.synchronize()\n            predictions = comm.gather(self._predictions, dst=0)\n            predictions = list(itertools.chain(*predictions))\n\n            if not comm.is_main_process():\n                return {}\n        else:\n            predictions = self._predictions\n\n        if len(predictions) == 0:\n            self._logger.warning(\"[VinbigdataEvaluator] Did not receive valid predictions.\")\n            return {}\n\n        if self._output_dir:\n            PathManager.mkdirs(self._output_dir)\n            file_path = os.path.join(self._output_dir, \"instances_predictions.pth\")\n            with PathManager.open(file_path, \"wb\") as f:\n                torch.save(predictions, f)\n\n        self._results = OrderedDict()\n        if \"proposals\" in predictions[0]:\n            self._eval_box_proposals(predictions)\n        if \"instances\" in predictions[0]:\n            self._eval_predictions(predictions, img_ids=img_ids)\n        # Copy so the caller can do whatever with results\n        return copy.deepcopy(self._results)\n\n    def _tasks_from_predictions(self, predictions):\n        \"\"\"\n        Get COCO API \"tasks\" (i.e. iou_type) from COCO-format predictions.\n        \"\"\"\n        tasks = {\"bbox\"}\n        for pred in predictions:\n            if \"segmentation\" in pred:\n                tasks.add(\"segm\")\n            if \"keypoints\" in pred:\n                tasks.add(\"keypoints\")\n        return sorted(tasks)\n\n    def _eval_predictions(self, predictions, img_ids=None):\n        \"\"\"\n        Evaluate predictions. Fill self._results with the metrics of the tasks.\n        \"\"\"\n        self._logger.info(\"Preparing results for COCO format ...\")\n        coco_results = list(itertools.chain(*[x[\"instances\"] for x in predictions]))\n        tasks = self._tasks or self._tasks_from_predictions(coco_results)\n\n        # unmap the category ids for COCO\n        if hasattr(self._metadata, \"thing_dataset_id_to_contiguous_id\"):\n            dataset_id_to_contiguous_id = self._metadata.thing_dataset_id_to_contiguous_id\n            all_contiguous_ids = list(dataset_id_to_contiguous_id.values())\n            num_classes = len(all_contiguous_ids)\n            assert min(all_contiguous_ids) == 0 and max(all_contiguous_ids) == num_classes - 1\n\n            reverse_id_mapping = {v: k for k, v in dataset_id_to_contiguous_id.items()}\n            for result in coco_results:\n                category_id = result[\"category_id\"]\n                assert category_id < num_classes, (\n                    f\"A prediction has class={category_id}, \"\n                    f\"but the dataset only has {num_classes} classes and \"\n                    f\"predicted class id should be in [0, {num_classes - 1}].\"\n                )\n                result[\"category_id\"] = reverse_id_mapping[category_id]\n\n        if self._output_dir:\n            file_path = os.path.join(self._output_dir, \"coco_instances_results.json\")\n            self._logger.info(\"Saving results to {}\".format(file_path))\n            with PathManager.open(file_path, \"w\") as f:\n                f.write(json.dumps(coco_results))\n                f.flush()\n\n        if not self._do_evaluation:\n            self._logger.info(\"Annotations are not available for evaluation.\")\n            return\n\n        self._logger.info(\n            \"Evaluating predictions with {} COCO API...\".format(\n                \"unofficial\" if self._use_fast_impl else \"official\"\n            )\n        )\n        for task in sorted(tasks):\n            coco_eval = (\n                _evaluate_predictions_on_coco(\n                    self._coco_api,\n                    coco_results,\n                    task,\n                    kpt_oks_sigmas=self._kpt_oks_sigmas,\n                    use_fast_impl=self._use_fast_impl,\n                    img_ids=img_ids,\n                )\n                if len(coco_results) > 0\n                else None  # cocoapi does not handle empty results very well\n            )\n\n            res = self._derive_coco_results(\n                coco_eval, task, class_names=self._metadata.get(\"thing_classes\")\n            )\n            self._results[task] = res\n\n    def _eval_box_proposals(self, predictions):\n        \"\"\"\n        Evaluate the box proposals in predictions.\n        Fill self._results with the metrics for \"box_proposals\" task.\n        \"\"\"\n        if self._output_dir:\n            # Saving generated box proposals to file.\n            # Predicted box_proposals are in XYXY_ABS mode.\n            bbox_mode = BoxMode.XYXY_ABS.value\n            ids, boxes, objectness_logits = [], [], []\n            for prediction in predictions:\n                ids.append(prediction[\"image_id\"])\n                boxes.append(prediction[\"proposals\"].proposal_boxes.tensor.numpy())\n                objectness_logits.append(prediction[\"proposals\"].objectness_logits.numpy())\n\n            proposal_data = {\n                \"boxes\": boxes,\n                \"objectness_logits\": objectness_logits,\n                \"ids\": ids,\n                \"bbox_mode\": bbox_mode,\n            }\n            with PathManager.open(os.path.join(self._output_dir, \"box_proposals.pkl\"), \"wb\") as f:\n                pickle.dump(proposal_data, f)\n\n        if not self._do_evaluation:\n            self._logger.info(\"Annotations are not available for evaluation.\")\n            return\n\n        self._logger.info(\"Evaluating bbox proposals ...\")\n        res = {}\n        areas = {\"all\": \"\", \"small\": \"s\", \"medium\": \"m\", \"large\": \"l\"}\n        for limit in [100, 1000]:\n            for area, suffix in areas.items():\n                stats = _evaluate_box_proposals(predictions, self._coco_api, area=area, limit=limit)\n                key = \"AR{}@{:d}\".format(suffix, limit)\n                res[key] = float(stats[\"ar\"].item() * 100)\n        self._logger.info(\"Proposal metrics: \\n\" + create_small_table(res))\n        self._results[\"box_proposals\"] = res\n\n    def _derive_coco_results(self, coco_eval, iou_type, class_names=None):\n        \"\"\"\n        Derive the desired score numbers from summarized COCOeval.\n\n        Args:\n            coco_eval (None or COCOEval): None represents no predictions from model.\n            iou_type (str):\n            class_names (None or list[str]): if provided, will use it to predict\n                per-category AP.\n\n        Returns:\n            a dict of {metric name: score}\n        \"\"\"\n\n        metrics = {\n            \"bbox\": [\"AP\", \"AP50\", \"AP75\", \"APs\", \"APm\", \"APl\"],\n            \"segm\": [\"AP\", \"AP50\", \"AP75\", \"APs\", \"APm\", \"APl\"],\n            \"keypoints\": [\"AP\", \"AP50\", \"AP75\", \"APm\", \"APl\"],\n        }[iou_type]\n\n        if coco_eval is None:\n            self._logger.warn(\"No predictions from the model!\")\n            return {metric: float(\"nan\") for metric in metrics}\n\n        # the standard metrics\n        results = {\n            metric: float(coco_eval.stats[idx] * 100 if coco_eval.stats[idx] >= 0 else \"nan\")\n            for idx, metric in enumerate(metrics)\n        }\n        self._logger.info(\n            \"Evaluation results for {}: \\n\".format(iou_type) + create_small_table(results)\n        )\n        if not np.isfinite(sum(results.values())):\n            self._logger.info(\"Some metrics cannot be computed and is shown as NaN.\")\n\n        if class_names is None or len(class_names) <= 1:\n            return results\n        # Compute per-category AP\n        # from https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L222-L252 # noqa\n        precisions = coco_eval.eval[\"precision\"]\n        # precision has dims (iou, recall, cls, area range, max dets)\n        assert len(class_names) == precisions.shape[2]\n\n        results_per_category = []\n        for idx, name in enumerate(class_names):\n            # area range index 0: all area ranges\n            # max dets index -1: typically 100 per image\n            precision = precisions[:, :, idx, 0, -1]\n            precision = precision[precision > -1]\n            ap = np.mean(precision) if precision.size else float(\"nan\")\n            results_per_category.append((\"{}\".format(name), float(ap * 100)))\n\n        # tabulate it\n        N_COLS = min(6, len(results_per_category) * 2)\n        results_flatten = list(itertools.chain(*results_per_category))\n        results_2d = itertools.zip_longest(*[results_flatten[i::N_COLS] for i in range(N_COLS)])\n        table = tabulate(\n            results_2d,\n            tablefmt=\"pipe\",\n            floatfmt=\".3f\",\n            headers=[\"category\", \"AP\"] * (N_COLS // 2),\n            numalign=\"left\",\n        )\n        self._logger.info(\"Per-category {} AP: \\n\".format(iou_type) + table)\n\n        results.update({\"AP-\" + name: ap for name, ap in results_per_category})\n        return results\n\n\ndef instances_to_coco_json(instances, img_id):\n    \"\"\"\n    Dump an \"Instances\" object to a COCO-format json that's used for evaluation.\n\n    Args:\n        instances (Instances):\n        img_id (int): the image id\n\n    Returns:\n        list[dict]: list of json annotations in COCO format.\n    \"\"\"\n    num_instance = len(instances)\n    if num_instance == 0:\n        return []\n\n    boxes = instances.pred_boxes.tensor.numpy()\n    boxes = BoxMode.convert(boxes, BoxMode.XYXY_ABS, BoxMode.XYWH_ABS)\n    boxes = boxes.tolist()\n    scores = instances.scores.tolist()\n    classes = instances.pred_classes.tolist()\n\n    has_mask = instances.has(\"pred_masks\")\n    if has_mask:\n        # use RLE to encode the masks, because they are too large and takes memory\n        # since this evaluator stores outputs of the entire dataset\n        rles = [\n            mask_util.encode(np.array(mask[:, :, None], order=\"F\", dtype=\"uint8\"))[0]\n            for mask in instances.pred_masks\n        ]\n        for rle in rles:\n            # \"counts\" is an array encoded by mask_util as a byte-stream. Python3's\n            # json writer which always produces strings cannot serialize a bytestream\n            # unless you decode it. Thankfully, utf-8 works out (which is also what\n            # the pycocotools/_mask.pyx does).\n            rle[\"counts\"] = rle[\"counts\"].decode(\"utf-8\")\n\n    has_keypoints = instances.has(\"pred_keypoints\")\n    if has_keypoints:\n        keypoints = instances.pred_keypoints\n\n    results = []\n    for k in range(num_instance):\n        result = {\n            \"image_id\": img_id,\n            \"category_id\": classes[k],\n            \"bbox\": boxes[k],\n            \"score\": scores[k],\n        }\n        if has_mask:\n            result[\"segmentation\"] = rles[k]\n        if has_keypoints:\n            # In COCO annotations,\n            # keypoints coordinates are pixel indices.\n            # However our predictions are floating point coordinates.\n            # Therefore we subtract 0.5 to be consistent with the annotation format.\n            # This is the inverse of data loading logic in `datasets/coco.py`.\n            keypoints[k][:, :2] -= 0.5\n            result[\"keypoints\"] = keypoints[k].flatten().tolist()\n        results.append(result)\n    return results\n\n\n# inspired from Detectron:\n# https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L255 # noqa\ndef _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=None, area=\"all\", limit=None):\n    \"\"\"\n    Evaluate detection proposal recall metrics. This function is a much\n    faster alternative to the official COCO API recall evaluation code. However,\n    it produces slightly different results.\n    \"\"\"\n    # Record max overlap value for each gt box\n    # Return vector of overlap values\n    areas = {\n        \"all\": 0,\n        \"small\": 1,\n        \"medium\": 2,\n        \"large\": 3,\n        \"96-128\": 4,\n        \"128-256\": 5,\n        \"256-512\": 6,\n        \"512-inf\": 7,\n    }\n    area_ranges = [\n        [0 ** 2, 1e5 ** 2],  # all\n        [0 ** 2, 32 ** 2],  # small\n        [32 ** 2, 96 ** 2],  # medium\n        [96 ** 2, 1e5 ** 2],  # large\n        [96 ** 2, 128 ** 2],  # 96-128\n        [128 ** 2, 256 ** 2],  # 128-256\n        [256 ** 2, 512 ** 2],  # 256-512\n        [512 ** 2, 1e5 ** 2],\n    ]  # 512-inf\n    assert area in areas, \"Unknown area range: {}\".format(area)\n    area_range = area_ranges[areas[area]]\n    gt_overlaps = []\n    num_pos = 0\n\n    for prediction_dict in dataset_predictions:\n        predictions = prediction_dict[\"proposals\"]\n\n        # sort predictions in descending order\n        # TODO maybe remove this and make it explicit in the documentation\n        inds = predictions.objectness_logits.sort(descending=True)[1]\n        predictions = predictions[inds]\n\n        ann_ids = coco_api.getAnnIds(imgIds=prediction_dict[\"image_id\"])\n        anno = coco_api.loadAnns(ann_ids)\n        gt_boxes = [\n            BoxMode.convert(obj[\"bbox\"], BoxMode.XYWH_ABS, BoxMode.XYXY_ABS)\n            for obj in anno\n            if obj[\"iscrowd\"] == 0\n        ]\n        gt_boxes = torch.as_tensor(gt_boxes).reshape(-1, 4)  # guard against no boxes\n        gt_boxes = Boxes(gt_boxes)\n        gt_areas = torch.as_tensor([obj[\"area\"] for obj in anno if obj[\"iscrowd\"] == 0])\n\n        if len(gt_boxes) == 0 or len(predictions) == 0:\n            continue\n\n        valid_gt_inds = (gt_areas >= area_range[0]) & (gt_areas <= area_range[1])\n        gt_boxes = gt_boxes[valid_gt_inds]\n\n        num_pos += len(gt_boxes)\n\n        if len(gt_boxes) == 0:\n            continue\n\n        if limit is not None and len(predictions) > limit:\n            predictions = predictions[:limit]\n\n        overlaps = pairwise_iou(predictions.proposal_boxes, gt_boxes)\n\n        _gt_overlaps = torch.zeros(len(gt_boxes))\n        for j in range(min(len(predictions), len(gt_boxes))):\n            # find which proposal box maximally covers each gt box\n            # and get the iou amount of coverage for each gt box\n            max_overlaps, argmax_overlaps = overlaps.max(dim=0)\n\n            # find which gt box is 'best' covered (i.e. 'best' = most iou)\n            gt_ovr, gt_ind = max_overlaps.max(dim=0)\n            assert gt_ovr >= 0\n            # find the proposal box that covers the best covered gt box\n            box_ind = argmax_overlaps[gt_ind]\n            # record the iou coverage of this gt box\n            _gt_overlaps[j] = overlaps[box_ind, gt_ind]\n            assert _gt_overlaps[j] == gt_ovr\n            # mark the proposal box and the gt box as used\n            overlaps[box_ind, :] = -1\n            overlaps[:, gt_ind] = -1\n\n        # append recorded iou coverage level\n        gt_overlaps.append(_gt_overlaps)\n    gt_overlaps = (\n        torch.cat(gt_overlaps, dim=0) if len(gt_overlaps) else torch.zeros(0, dtype=torch.float32)\n    )\n    gt_overlaps, _ = torch.sort(gt_overlaps)\n\n    if thresholds is None:\n        step = 0.05\n        # thresholds = torch.arange(0.5, 0.95 + 1e-5, step, dtype=torch.float32)\n        thresholds = torch.arange(0.4, 0.95 + 1e-5, step, dtype=torch.float32)\n    recalls = torch.zeros_like(thresholds)\n    # compute recall for each iou threshold\n    for i, t in enumerate(thresholds):\n        recalls[i] = (gt_overlaps >= t).float().sum() / float(num_pos)\n    # ar = 2 * np.trapz(recalls, thresholds)\n    ar = recalls.mean()\n    return {\n        \"ar\": ar,\n        \"recalls\": recalls,\n        \"thresholds\": thresholds,\n        \"gt_overlaps\": gt_overlaps,\n        \"num_pos\": num_pos,\n    }\n\n\ndef _evaluate_predictions_on_coco(\n    coco_gt, coco_results, iou_type, kpt_oks_sigmas=None, use_fast_impl=True, img_ids=None\n):\n    \"\"\"\n    Evaluate the coco results using COCOEval API.\n    \"\"\"\n    assert len(coco_results) > 0\n\n    if iou_type == \"segm\":\n        coco_results = copy.deepcopy(coco_results)\n        # When evaluating mask AP, if the results contain bbox, cocoapi will\n        # use the box area as the area of the instance, instead of the mask area.\n        # This leads to a different definition of small/medium/large.\n        # We remove the bbox field to let mask AP use mask area.\n        for c in coco_results:\n            c.pop(\"bbox\", None)\n\n    coco_dt = coco_gt.loadRes(coco_results)\n    coco_eval = (COCOeval_opt if use_fast_impl else COCOeval)(coco_gt, coco_dt, iou_type)\n\n    # HACKING: overwrite iouThrs to calc ious 0.4\n    coco_eval.params.iouThrs = np.linspace(\n        .4, 0.95, int(np.round((0.95 - .4) / .05)) + 1, endpoint=True)\n\n    if img_ids is not None:\n        coco_eval.params.imgIds = img_ids\n\n    if iou_type == \"keypoints\":\n        # Use the COCO default keypoint OKS sigmas unless overrides are specified\n        if kpt_oks_sigmas:\n            assert hasattr(coco_eval.params, \"kpt_oks_sigmas\"), \"pycocotools is too old!\"\n            coco_eval.params.kpt_oks_sigmas = np.array(kpt_oks_sigmas)\n        # COCOAPI requires every detection and every gt to have keypoints, so\n        # we just take the first entry from both\n        num_keypoints_dt = len(coco_results[0][\"keypoints\"]) // 3\n        num_keypoints_gt = len(next(iter(coco_gt.anns.values()))[\"keypoints\"]) // 3\n        num_keypoints_oks = len(coco_eval.params.kpt_oks_sigmas)\n        assert num_keypoints_oks == num_keypoints_dt == num_keypoints_gt, (\n            f\"[VinbigdataEvaluator] Prediction contain {num_keypoints_dt} keypoints. \"\n            f\"Ground truth contains {num_keypoints_gt} keypoints. \"\n            f\"The length of cfg.TEST.KEYPOINT_OKS_SIGMAS is {num_keypoints_oks}. \"\n            \"They have to agree with each other. For meaning of OKS, please refer to \"\n            \"http://cocodataset.org/#keypoints-eval.\"\n        )\n\n    coco_eval.evaluate()\n    coco_eval.accumulate()\n    coco_eval.summarize()\n\n    return coco_eval\n","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"<a id=\"loss_hook\"></a>\n## Loss evaluation hook\n\nWe implemented Evaluator and now we can calculate competition metric, however, validation loss is not calculated inside Evaluator. This is because model's evaluation is done in `model.eval()` mode and it outputs bounding box prediction but does not output `loss`.\n\nTo calculate validation loss, we need to call `model` with the training mode. This can be done by adding `Hook` which calculates the loss to the trainer.<br/>\nTrainer has attribute `storage` and calculated metrics are summarized. Its content is saved to `metric.json` (jsonl format) during training.\n\nBelow `LossEvalHook` calculates validation loss in `_do_loss_eval` method, and `self.trainer.storage.put_scalars(validation_loss=mean_loss)` is called to put this validation loss to the `storage`, which will be saved to `metrics.json`.<br/>\nNote that current implementation is not efficient in the sense that Evaluator's evaluation and `LossEvalHook`'s loss calculation run separately, even if both need a model forward calculation for same validation data.\n\n - Ref: [Training on Detectron2 with a Validation set, and plot loss on it to avoid overfitting](https://medium.com/@apofeniaco/training-on-detectron2-with-a-validation-set-and-plot-loss-on-it-to-avoid-overfitting-6449418fbf4e)","metadata":{}},{"cell_type":"code","source":"\"\"\"\nTo calculate & record validation loss\n\nOriginal code from https://medium.com/@apofeniaco/training-on-detectron2-with-a-validation-set-and-plot-loss-on-it-to-avoid-overfitting-6449418fbf4e\nby @apofeniaco\n\"\"\"\nimport numpy as np\nimport logging\n\nfrom detectron2.engine.hooks import HookBase\nfrom detectron2.utils.logger import log_every_n_seconds\nimport detectron2.utils.comm as comm\nimport torch\nimport time\nimport datetime\n\n\nclass LossEvalHook(HookBase):\n    def __init__(self, eval_period, model, data_loader):\n        self._model = model\n        self._period = eval_period\n        self._data_loader = data_loader\n\n    def _do_loss_eval(self):\n        # Copying inference_on_dataset from evaluator.py\n        total = len(self._data_loader)\n        num_warmup = min(5, total - 1)\n\n        start_time = time.perf_counter()\n        total_compute_time = 0\n        losses = []\n        for idx, inputs in enumerate(self._data_loader):\n            if idx == num_warmup:\n                start_time = time.perf_counter()\n                total_compute_time = 0\n            start_compute_time = time.perf_counter()\n            if torch.cuda.is_available():\n                torch.cuda.synchronize()\n            total_compute_time += time.perf_counter() - start_compute_time\n            iters_after_start = idx + 1 - num_warmup * int(idx >= num_warmup)\n            seconds_per_img = total_compute_time / iters_after_start\n            if idx >= num_warmup * 2 or seconds_per_img > 5:\n                total_seconds_per_img = (time.perf_counter() - start_time) / iters_after_start\n                eta = datetime.timedelta(seconds=int(total_seconds_per_img * (total - idx - 1)))\n                log_every_n_seconds(\n                    logging.INFO,\n                    \"Loss on Validation  done {}/{}. {:.4f} s / img. ETA={}\".format(\n                        idx + 1, total, seconds_per_img, str(eta)\n                    ),\n                    n=5,\n                )\n            loss_batch = self._get_loss(inputs)\n            losses.append(loss_batch)\n        mean_loss = np.mean(losses)\n        # self.trainer.storage.put_scalar('validation_loss', mean_loss)\n        comm.synchronize()\n\n        # return losses\n        return mean_loss\n\n    def _get_loss(self, data):\n        # How loss is calculated on train_loop\n        metrics_dict = self._model(data)\n        metrics_dict = {\n            k: v.detach().cpu().item() if isinstance(v, torch.Tensor) else float(v)\n            for k, v in metrics_dict.items()\n        }\n        total_losses_reduced = sum(loss for loss in metrics_dict.values())\n        return total_losses_reduced\n\n    def after_step(self):\n        next_iter = int(self.trainer.iter) + 1\n        is_final = next_iter == self.trainer.max_iter\n        if is_final or (self._period > 0 and next_iter % self._period == 0):\n            mean_loss = self._do_loss_eval()\n            self.trainer.storage.put_scalars(validation_loss=mean_loss)\n            print(\"validation do loss eval\", mean_loss)\n        else:\n            pass\n            # self.trainer.storage.put_scalars(timetest=11)\n","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"Now all the preparation has done!\n\n`MyTrainer` overwraps `build_evaluator` method of `DefaultTrainer` provided by `detectron2` to support validation dataset evaluation.\n\n\n1. `build_train_loader` & `build_test_loader`: \nThese class methods deine how to construct DataLoader for training data & validation data respectively.\nHere `AlbumentationMapper` is passed to construct DataLoader to insert customized augmentation process.\n\n2. `build_evaluator`:\nThis class method defines how to construct Evaluator. \nHere implemented `VinbigdataEvaluator` is constructed (we can also use `COCOEvaluator` here).\n\n3. `build_hooks`:\nThis method defines how to construct hooks. I insert `LossEvalHook` before evalutor to work well.","metadata":{}},{"cell_type":"code","source":"import os\n\nfrom detectron2.data import build_detection_test_loader, build_detection_train_loader\nfrom detectron2.engine import DefaultPredictor, DefaultTrainer, launch\n\n# from detectron2.evaluation import COCOEvaluator, PascalVOCDetectionEvaluator\n\n\nclass MyTrainer(DefaultTrainer):\n    @classmethod\n    def build_train_loader(cls, cfg, sampler=None):\n        return build_detection_train_loader(\n            cfg, mapper=AlbumentationsMapper(cfg, True), sampler=sampler\n        )\n\n    @classmethod\n    def build_test_loader(cls, cfg, dataset_name):\n        return build_detection_test_loader(\n            cfg, dataset_name, mapper=AlbumentationsMapper(cfg, False)\n        )\n\n    @classmethod\n    def build_evaluator(cls, cfg, dataset_name, output_folder=None):\n        if output_folder is None:\n            output_folder = os.path.join(cfg.OUTPUT_DIR, \"inference\")\n        # return PascalVOCDetectionEvaluator(dataset_name)  # not working\n        # return COCOEvaluator(dataset_name, (\"bbox\",), False, output_dir=output_folder)\n        return VinbigdataEvaluator(dataset_name, (\"bbox\",), False, output_dir=output_folder)\n\n    def build_hooks(self):\n        hooks = super(MyTrainer, self).build_hooks()\n        cfg = self.cfg\n        if len(cfg.DATASETS.TEST) > 0:\n            loss_eval_hook = LossEvalHook(\n                cfg.TEST.EVAL_PERIOD,\n                self.model,\n                MyTrainer.build_test_loader(cfg, cfg.DATASETS.TEST[0]),\n            )\n            hooks.insert(-1, loss_eval_hook)\n\n        return hooks\n","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## LR scheduling\n\nTo further customize learning rate scheduling you may override `build_lr_scheduler` class method to construct any pytorch LRScheduler.\n\nDefault `build_lr_schduler` method ([docs](https://detectron2.readthedocs.io/en/latest/_modules/detectron2/solver/build.html#build_lr_scheduler)) supports only 2 types of LR scheduling, WarmupMultiStepLR (default) & WarmupCosineLR. You can change which one to use by setting `cfg.SOLVER.LR_SCHEDULER_NAME` as you can see from the docs.","metadata":{}},{"cell_type":"markdown","source":"Now the methods are ready. main scripts starts from here.","metadata":{}},{"cell_type":"markdown","source":"<a id=\"load_data\"></a>\n# Loading Data\n\nThis `Flags` class is to manage experiments. I will tune these parameters through the competition to improve model's performance.","metadata":{}},{"cell_type":"code","source":"import argparse\nimport dataclasses\nimport json\nimport os\nimport pickle\nimport random\nimport sys\nfrom dataclasses import dataclass\nfrom distutils.util import strtobool\nfrom pathlib import Path\n\nimport cv2\nimport detectron2\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom detectron2 import model_zoo\nfrom detectron2.config import get_cfg\nfrom detectron2.data import DatasetCatalog, MetadataCatalog\nfrom detectron2.engine import DefaultPredictor, DefaultTrainer, launch\nfrom detectron2.evaluation import COCOEvaluator\nfrom detectron2.structures import BoxMode\nfrom detectron2.utils.logger import setup_logger\nfrom detectron2.utils.visualizer import Visualizer\nfrom tqdm import tqdm\n\nsetup_logger()","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# --- flags ---\nfrom dataclasses import dataclass, field\nfrom typing import Dict\n\n\n@dataclass\nclass Flags:\n    # General\n    debug: bool = True\n    outdir: str = \"results/det\"\n\n    # Data config\n    imgdir_name: str = \"vinbigdata-chest-xray-resized-png-256x256\"\n    split_mode: str = \"all_train\"  # all_train or valid20\n    seed: int = 111\n    train_data_type: str = \"original\"  # original or wbf\n    use_class14: bool = False\n    # Training config\n    iter: int = 10000\n    ims_per_batch: int = 2  # images per batch, this corresponds to \"total batch size\"\n    num_workers: int = 4\n    lr_scheduler_name: str = \"WarmupMultiStepLR\"  # WarmupMultiStepLR (default) or WarmupCosineLR\n    base_lr: float = 0.00025\n    roi_batch_size_per_image: int = 512\n    eval_period: int = 10000\n    aug_kwargs: Dict = field(default_factory=lambda: {})\n\n    def update(self, param_dict: Dict) -> \"Flags\":\n        # Overwrite by `param_dict`\n        for key, value in param_dict.items():\n            if not hasattr(self, key):\n                raise ValueError(f\"[ERROR] Unexpected key for flag = {key}\")\n            setattr(self, key, value)\n        return self","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# flags_dict = {\n#     \"debug\": True,\n#     \"outdir\": \"results/debug\", \n#     \"imgdir_name\": \"vinbigdata-chest-xray-resized-png-256x256\",\n#     \"split_mode\": \"valid20\",\n#     \"iter\": 100,  # debug, small value should be set.\n#     \"roi_batch_size_per_image\": 128,  # faster, and good enough for this toy dataset (default: 512)\n#     \"eval_period\": 20,\n#     \"aug_kwargs\": {\n#         \"HorizontalFlip\": {\"p\": 0.5},\n#         \"ShiftScaleRotate\": {\"scale_limit\": 0.15, \"rotate_limit\": 10, \"p\": 0.5},\n#         \"RandomBrightnessContrast\": {\"p\": 0.5}\n#     }\n# }","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"flags_dict = {\n    \"debug\": False,\n    \"outdir\": \"results/v9\", \n    \"imgdir_name\": \"vinbigdata-chest-xray-resized-png-256x256\",\n    \"split_mode\": \"valid20\",\n    \"iter\": 10000,\n    \"roi_batch_size_per_image\": 512,\n    \"eval_period\": 1000,\n    \"lr_scheduler_name\": \"WarmupCosineLR\",\n    \"base_lr\": 0.001,\n    \"num_workers\": 4,\n    \"aug_kwargs\": {\n        \"HorizontalFlip\": {\"p\": 0.5},\n        \"ShiftScaleRotate\": {\"scale_limit\": 0.15, \"rotate_limit\": 10, \"p\": 0.5},\n        \"RandomBrightnessContrast\": {\"p\": 0.5}\n    }\n}","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# args = parse()\nprint(\"torch\", torch.__version__)\nflags = Flags().update(flags_dict)\nprint(\"flags\", flags)\ndebug = flags.debug\noutdir = Path(flags.outdir)\nos.makedirs(str(outdir), exist_ok=True)\nflags_dict = dataclasses.asdict(flags)\nsave_yaml(outdir / \"flags.yaml\", flags_dict)\n\n# --- Read data ---\ninputdir = Path(\"/kaggle/input\")\ndatadir = inputdir / \"vinbigdata-chest-xray-abnormalities-detection\"\nimgdir = inputdir / flags.imgdir_name\n\n# Read in the data CSV files\ntrain_df = pd.read_csv(datadir / \"train.csv\")\ntrain = train_df  # alias\n# sample_submission = pd.read_csv(datadir / 'sample_submission.csv')","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train_data_type = flags.train_data_type\nif flags.use_class14:\n    thing_classes.append(\"No finding\")\n\nsplit_mode = flags.split_mode\nif split_mode == \"all_train\":\n    DatasetCatalog.register(\n        \"vinbigdata_train\",\n        lambda: get_vinbigdata_dicts(\n            imgdir, train_df, train_data_type, debug=debug, use_class14=flags.use_class14\n        ),\n    )\n    MetadataCatalog.get(\"vinbigdata_train\").set(thing_classes=thing_classes)\nelif split_mode == \"valid20\":\n    # To get number of data...\n    n_dataset = len(\n        get_vinbigdata_dicts(\n            imgdir, train_df, train_data_type, debug=debug, use_class14=flags.use_class14\n        )\n    )\n    n_train = int(n_dataset * 0.8)\n    print(\"n_dataset\", n_dataset, \"n_train\", n_train)\n    rs = np.random.RandomState(flags.seed)\n    inds = rs.permutation(n_dataset)\n    train_inds, valid_inds = inds[:n_train], inds[n_train:]\n    DatasetCatalog.register(\n        \"vinbigdata_train\",\n        lambda: get_vinbigdata_dicts(\n            imgdir,\n            train_df,\n            train_data_type,\n            debug=debug,\n            target_indices=train_inds,\n            use_class14=flags.use_class14,\n        ),\n    )\n    MetadataCatalog.get(\"vinbigdata_train\").set(thing_classes=thing_classes)\n    DatasetCatalog.register(\n        \"vinbigdata_valid\",\n        lambda: get_vinbigdata_dicts(\n            imgdir,\n            train_df,\n            train_data_type,\n            debug=debug,\n            target_indices=valid_inds,\n            use_class14=flags.use_class14,\n        ),\n    )\n    MetadataCatalog.get(\"vinbigdata_valid\").set(thing_classes=thing_classes)\nelse:\n    raise ValueError(f\"[ERROR] Unexpected value split_mode={split_mode}\")\n","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"dataset_dicts = get_vinbigdata_dicts(imgdir, train, debug=debug)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"<a id=\"data_vis\"></a>\n# Data Visualization\n\nIt's also very easy to visualize prepared training dataset with `detectron2`.<br/>\nIt provides `Visualizer` class, we can use it to draw an image with bounding box as following.","metadata":{}},{"cell_type":"code","source":"# Visualize data...\nanomaly_image_ids = train.query(\"class_id != 14\")[\"image_id\"].unique()\ntrain_meta = pd.read_csv(imgdir/\"train_meta.csv\")\nanomaly_inds = np.argwhere(train_meta[\"image_id\"].isin(anomaly_image_ids).values)[:, 0]\n\nvinbigdata_metadata = MetadataCatalog.get(\"vinbigdata_train\")\n\ncols = 3\nrows = 3\nfig, axes = plt.subplots(rows, cols, figsize=(18, 18))\naxes = axes.flatten()\n\nfor index, anom_ind in enumerate(anomaly_inds[:cols * rows]):\n    ax = axes[index]\n    # print(anom_ind)\n    d = dataset_dicts[anom_ind]\n    img = cv2.imread(d[\"file_name\"])\n    visualizer = Visualizer(img[:, :, ::-1], metadata=vinbigdata_metadata, scale=0.5)\n    out = visualizer.draw_dataset_dict(d)\n    # cv2_imshow(out.get_image()[:, :, ::-1])\n    #cv2.imwrite(str(outdir / f\"vinbigdata{index}.jpg\"), out.get_image()[:, :, ::-1])\n    ax.imshow(out.get_image()[:, :, ::-1])\n    ax.set_title(f\"{anom_ind}: image_id {anomaly_image_ids[index]}\")","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"<a id=\"training\"></a>\n# Training","metadata":{}},{"cell_type":"code","source":"from detectron2.config.config import CfgNode as CN\n\ncfg = get_cfg()\ncfg.aug_kwargs = CN(flags.aug_kwargs)  # pass aug_kwargs to cfg\n\noriginal_output_dir = cfg.OUTPUT_DIR\ncfg.OUTPUT_DIR = str(outdir)\nprint(f\"cfg.OUTPUT_DIR {original_output_dir} -> {cfg.OUTPUT_DIR}\")\n\nconfig_name = \"COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml\"\ncfg.merge_from_file(model_zoo.get_config_file(config_name))\ncfg.DATASETS.TRAIN = (\"vinbigdata_train\",)\nif split_mode == \"all_train\":\n    cfg.DATASETS.TEST = ()\nelse:\n    cfg.DATASETS.TEST = (\"vinbigdata_valid\",)\n    cfg.TEST.EVAL_PERIOD = flags.eval_period\n\ncfg.DATALOADER.NUM_WORKERS = flags.num_workers\n# Let training initialize from model zoo\ncfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(config_name)\ncfg.SOLVER.IMS_PER_BATCH = flags.ims_per_batch\ncfg.SOLVER.LR_SCHEDULER_NAME = flags.lr_scheduler_name\ncfg.SOLVER.BASE_LR = flags.base_lr  # pick a good LR\ncfg.SOLVER.MAX_ITER = flags.iter\ncfg.SOLVER.CHECKPOINT_PERIOD = 100000  # Small value=Frequent save need a lot of storage.\ncfg.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = flags.roi_batch_size_per_image\ncfg.MODEL.ROI_HEADS.NUM_CLASSES = len(thing_classes)\n# NOTE: this config means the number of classes,\n# but a few popular unofficial tutorials incorrect uses num_classes+1 here.\n\nos.makedirs(cfg.OUTPUT_DIR, exist_ok=True)\n","metadata":{"trusted":true,"_kg_hide-output":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"trainer = MyTrainer(cfg)\ntrainer.resume_or_load(resume=False)\ntrainer.train()","metadata":{"trusted":true,"_kg_hide-output":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"It's actually very easy to use multiple gpus for training.\n\nYou just need to wrap above training scripts by `main` method and use `launch` method provided by `detectron2`.\n\nPlease refer official example [train_net.py](https://github.com/facebookresearch/detectron2/blob/master/tools/train_net.py#L161) for details.","metadata":{}},{"cell_type":"markdown","source":"<a id=\"vis_loss\"></a>\n# Visualize loss curve & competition metric AP40\n\nAs I explained, the calculated metrics are saved in `metrics.json`. We can analyze/plot them to check how the training proceeded.","metadata":{}},{"cell_type":"code","source":"metrics_df = pd.read_json(outdir / \"metrics.json\", orient=\"records\", lines=True)\nmdf = metrics_df.sort_values(\"iteration\")\nmdf","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# 1. Loss curve\nfig, ax = plt.subplots()\n\nmdf1 = mdf[~mdf[\"total_loss\"].isna()]\nax.plot(mdf1[\"iteration\"], mdf1[\"total_loss\"], c=\"C0\", label=\"train\")\nif \"validation_loss\" in mdf.columns:\n    mdf2 = mdf[~mdf[\"validation_loss\"].isna()]\n    ax.plot(mdf2[\"iteration\"], mdf2[\"validation_loss\"], c=\"C1\", label=\"validation\")\n\n# ax.set_ylim([0, 0.5])\nax.legend()\nax.set_title(\"Loss curve\")\nplt.show()\nplt.savefig(outdir/\"loss.png\")","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"fig, ax = plt.subplots()\nmdf3 = mdf[~mdf[\"bbox/AP75\"].isna()]\nax.plot(mdf3[\"iteration\"], mdf3[\"bbox/AP75\"] / 100., c=\"C2\", label=\"validation\")\n\nax.legend()\nax.set_title(\"AP40\")\nplt.show()\nplt.savefig(outdir / \"AP40.png\")","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"fig, ax = plt.subplots()\nmdf_bbox_class = mdf3.iloc[-1][[f\"bbox/AP-{col}\" for col in thing_classes]]\nmdf_bbox_class.plot(kind=\"bar\", ax=ax)\n_ = ax.set_title(\"AP by class\")","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"Our Evaluator calculaes AP by class, and it is easy to check which class is diffucult to train.\n\nIn my experiment, **\"Calcification\" seems to be the most difficult class to predict**.","metadata":{}},{"cell_type":"markdown","source":"<a id=\"vis_aug\"></a>\n# Visualization of augmentation by Mapper\n\nLet's check the behavior of Mapper method. Since mapper is used inside DataLoader, we can check its behavior by constucting DataLoader and visualize the data processed by the DataLoader.\n\nThe defined Trainer class has **class method** `build_train_loader`. We can construct train_loader purely from `cfg`, without instantiating `trainer` since it's class method.\n\nBelow code is to visualize the same data 4 times. You can check that augmentation is applied and every time the image looks different.\n\nNote that both `detectron2.data.transforms` & `albumentations` augmentations properly handles bounding box. Thus bounding box is adjusted when the image is scaled, rotated etc!\n\nAt first I was using `detectron2.data.transforms` with `MyMapper` class, it provides basic augmentations.<br/>\nThen I noticed that we can use many augmentations in `albumentations`, so I implemented `AlbumentationsMapper` to support it.<br/>\nHow many augmentations can be used in albumentations?<br/>\nYou can see official github page, all [Pixel-level transforms](https://github.com/albumentations-team/albumentations#pixel-level-transforms) and [Spatial-level transforms](https://github.com/albumentations-team/albumentations#spatial-level-transforms) with \"BBoxes\" checked can be used. There are really many!!!","metadata":{}},{"cell_type":"code","source":"# Visualize data...\n# import matplotlib.pyplot as plt\nfrom detectron2.data.samplers import TrainingSampler\n\nn_images = 2\nn_aug = 4\n\nfig, axes = plt.subplots(n_images, n_aug, figsize=(16, 8))\n\n# Ref https://github.com/facebookresearch/detectron2/blob/22b70a8078eb09da38d0fefa130d0f537562bebc/tools/visualize_data.py#L79-L88\nfor i in range(n_aug):\n    sampler = TrainingSampler(len(dataset_dicts), shuffle=False)\n    train_vis_loader = MyTrainer.build_train_loader(\n        cfg, sampler=sampler\n    )  # For visualization...\n    for batch in train_vis_loader:\n        for j, per_image in enumerate(batch):\n            ax = axes[j, i]\n\n            img_arr = per_image[\"image\"].cpu().numpy().transpose((1, 2, 0))\n            visualizer = Visualizer(\n                img_arr[:, :, ::-1], metadata=vinbigdata_metadata, scale=1.0\n            )\n            target_fields = per_image[\"instances\"].get_fields()\n            labels = [\n                vinbigdata_metadata.thing_classes[i] for i in target_fields[\"gt_classes\"]\n            ]\n            out = visualizer.overlay_instances(\n                labels=labels,\n                boxes=target_fields.get(\"gt_boxes\", None),\n                masks=target_fields.get(\"gt_masks\", None),\n                keypoints=target_fields.get(\"gt_keypoints\", None),\n            )\n            # out = visualizer.draw_dataset_dict(per_image)\n\n            img = out.get_image()[:, :, ::-1]\n            filepath = str(outdir / f\"vinbigdata_{j}_aug{i}.jpg\")\n            cv2.imwrite(filepath, img)\n            print(f\"Visualization img {img_arr.shape} saved in {filepath}\")\n            ax.imshow(img)\n            ax.set_title(f\"image{j}, {i}-th aug\")\n        break","metadata":{"_kg_hide-input":true,"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"That's all! \n\nI found that the competition data is not so many (15000 for all images, 4000 images after filtering \"No finding\" images).<br/>\nIt does not take long time to train (less than a day), so this competition may be a good choice for beginners who want to learn object detection!\n\n<h3 style=\"color:red\">If this kernel helps you, please upvote to keep me motivated 😁<br>Thanks!</h3>","metadata":{}},{"cell_type":"markdown","source":"<a id=\"next_step\"></a>\n# Next step\n\n[📸VinBigData detectron2 prediction](https://www.kaggle.com/corochann/vinbigdata-detectron2-prediction) kernel explains how to use trained model for the prediction and submisssion for this competition.\n\n[📸VinBigData 2-class classifier complete pipeline](https://www.kaggle.com/corochann/vinbigdata-2-class-classifier-complete-pipeline) kernel explains how to train 2 class classifier model for the prediction and submisssion for this competition.\n\n## Discussions\nThese discussions are useful to further utilize this training notebook to conduct deeper experiment.\n\n - [1-step training & prediction](https://www.kaggle.com/c/vinbigdata-chest-xray-abnormalities-detection/discussion/219672): The 1-step pipeline which does not use any 2-class classifier approach is proposed.\n - [What anchor size & aspect ratio should be used?](https://www.kaggle.com/c/vinbigdata-chest-xray-abnormalities-detection/discussion/220295): Suggests how to predict more smaller sized, high aspect ratio bonding boxes. It affects to the score a lot!!!\n - [Preferable radiologist's id in the test dataset?](https://www.kaggle.com/c/vinbigdata-chest-xray-abnormalities-detection/discussion/219221): Investigation of test dataset annotation distribution.\n","metadata":{}},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimport cv2\nimport numpy as np\nfrom detectron2.utils.visualizer import Visualizer\nfrom detectron2.data import MetadataCatalog\n\n# 1. Khởi tạo metadata (để map category_id sang tên bệnh lý)\n# thing_classes đã được định nghĩa ở Cell 17\nvinbigdata_metadata = MetadataCatalog.get(\"vinbigdata_train\")\n\n# 2. Lọc ra các ảnh có chứa tổn thương (bỏ qua ảnh \"No finding\" nếu cần)\n# Trong dataset_dicts, nếu class_id != 14 thì đó là ảnh có bệnh lý\nanomaly_dicts = [d for d in dataset_dicts if any(ann['category_id'] != 14 for ann in d['annotations'])]\n\n# 3. Thiết lập lưới 2 hàng x 4 cột giống mẫu\nrows, cols = 2, 4\nfig, axes = plt.subplots(rows, cols, figsize=(20, 10))\naxes = axes.flatten()\n\n# 4. Vẽ 8 ảnh đầu tiên tìm thấy\nfor i in range(rows * cols):\n    if i >= len(anomaly_dicts): break\n    \n    d = anomaly_dicts[i]\n    # Đọc ảnh gốc (size 256x256 như trong ảnh preprocess của bạn)\n    img = cv2.imread(d[\"file_name\"])\n    \n    # Khởi tạo Visualizer với hệ màu RGB\n    visualizer = Visualizer(img[:, :, ::-1], metadata=vinbigdata_metadata, scale=1.2)\n    \n    # Tự động vẽ các box từ trường 'annotations' trong data preprocess của bạn\n    out = visualizer.draw_dataset_dict(d)\n    \n    # Hiển thị lên subplots\n    axes[i].imshow(out.get_image())\n    axes[i].set_title(f\"Image ID: {d['image_id'][:10]}...\", fontsize=10)\n    axes[i].axis('off')\n\nplt.tight_layout()\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-04-13T15:54:32.87161Z","iopub.execute_input":"2026-04-13T15:54:32.871884Z","iopub.status.idle":"2026-04-13T15:54:33.241299Z","shell.execute_reply.started":"2026-04-13T15:54:32.871851Z","shell.execute_reply":"2026-04-13T15:54:33.240162Z"}},"outputs":[{"traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)","\u001b[0;32m/tmp/ipykernel_55/3122605197.py\u001b[0m in \u001b[0;36m<cell line: 0>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcv2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mdetectron2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mutils\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvisualizer\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mVisualizer\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mdetectron2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mMetadataCatalog\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'detectron2'"],"ename":"ModuleNotFoundError","evalue":"No module named 'detectron2'","output_type":"error"}],"execution_count":1}]}