{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.11.11","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":91249,"databundleVersionId":11294684,"sourceType":"competition"},{"sourceId":11341423,"sourceType":"datasetVersion","datasetId":7095616},{"sourceId":11355798,"sourceType":"datasetVersion","datasetId":7106644},{"sourceId":11357189,"sourceType":"datasetVersion","datasetId":7107722},{"sourceId":11603441,"sourceType":"datasetVersion","datasetId":7277583},{"sourceId":11849873,"sourceType":"datasetVersion","datasetId":7445745},{"sourceId":11865521,"sourceType":"datasetVersion","datasetId":7153386},{"sourceId":11938307,"sourceType":"datasetVersion","datasetId":7447807},{"sourceId":239234246,"sourceType":"kernelVersion"},{"sourceId":240527776,"sourceType":"kernelVersion"}],"dockerImageVersionId":31011,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!git clone https://github.com/ShihuaHuang95/DEIM.git","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:55:32.369803Z","iopub.execute_input":"2025-05-24T21:55:32.370451Z","iopub.status.idle":"2025-05-24T21:55:34.067915Z","shell.execute_reply.started":"2025-05-24T21:55:32.370431Z","shell.execute_reply":"2025-05-24T21:55:34.066990Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!pip install -r /kaggle/working/DEIM/requirements.txt","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:55:34.069793Z","iopub.execute_input":"2025-05-24T21:55:34.070216Z","iopub.status.idle":"2025-05-24T21:56:51.468238Z","shell.execute_reply.started":"2025-05-24T21:55:34.070184Z","shell.execute_reply":"2025-05-24T21:56:51.467246Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#change checkpoint save frequency, due to Kaggle  out of space failure.","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:51.469332Z","iopub.execute_input":"2025-05-24T21:56:51.469647Z","iopub.status.idle":"2025-05-24T21:56:51.473658Z","shell.execute_reply.started":"2025-05-24T21:56:51.469614Z","shell.execute_reply":"2025-05-24T21:56:51.472870Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/working/DEIM/configs/base/dfine_hgnetv2.yml","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:51.475582Z","iopub.execute_input":"2025-05-24T21:56:51.475789Z","iopub.status.idle":"2025-05-24T21:56:51.605436Z","shell.execute_reply.started":"2025-05-24T21:56:51.475773Z","shell.execute_reply":"2025-05-24T21:56:51.604764Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%%writefile /kaggle/working/DEIM/configs/base/dfine_hgnetv2.yml\ntask: detection\n\nmodel: DEIM\ncriterion: DEIMCriterion\npostprocessor: PostProcessor\n\nuse_focal_loss: True\neval_spatial_size: [640, 640] # h w\ncheckpoint_freq: 10   #  4    # save freq\n\nDEIM:\n  backbone: HGNetv2\n  encoder: HybridEncoder\n  decoder: DFINETransformer\n\n# Add, default for step lr scheduler \nlrsheduler: flatcosine\nlr_gamma: 1\nwarmup_iter: 500\nflat_epoch: 4000000\nno_aug_epoch: 0\n\nHGNetv2:\n  pretrained: True\n  local_model_dir: ../RT-DETR-main/D-FINE/weight/hgnetv2/\n\nHybridEncoder:\n  in_channels: [512, 1024, 2048]\n  feat_strides: [8, 16, 32]\n\n  # intra\n  hidden_dim: 256\n  use_encoder_idx: [2]\n  num_encoder_layers: 1\n  nhead: 8\n  dim_feedforward: 1024\n  dropout: 0.\n  enc_act: 'gelu'\n\n  # cross\n  expansion: 1.0\n  depth_mult: 1\n  act: 'silu'\n\n\nDFINETransformer:\n  feat_channels: [256, 256, 256]\n  feat_strides: [8, 16, 32]\n  hidden_dim: 256\n  num_levels: 3\n\n  num_layers: 6\n  eval_idx: -1\n  num_queries: 300\n\n  num_denoising: 100\n  label_noise_ratio: 0.5\n  box_noise_scale: 1.0\n\n  # NEW\n  reg_max: 32\n  reg_scale: 4\n\n  # Auxiliary decoder layers dimension scaling\n  # \"eg. If num_layers: 6 eval_idx: -4,\n  # then layer 3, 4, 5 are auxiliary decoder layers.\"\n  layer_scale: 1  # 2\n\n\n  num_points: [3, 6, 3] # [4, 4, 4] [3, 6, 3]\n  cross_attn_method: default # default, discrete\n  query_select_method: default # default, agnostic\n\n\nPostProcessor:\n  num_top_queries: 300\n\n\nDEIMCriterion:\n  weight_dict: {loss_vfl: 1, loss_bbox: 5, loss_giou: 2, loss_fgl: 0.15, loss_ddf: 1.5}\n  losses: ['vfl', 'boxes', 'local']\n  alpha: 0.75\n  gamma: 2.0\n  reg_max: 32\n\n  matcher:\n    type: HungarianMatcher\n    weight_dict: {cost_class: 2, cost_bbox: 5, cost_giou: 2}\n    alpha: 0.25\n    gamma: 2.0\n\n\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:51.606442Z","iopub.execute_input":"2025-05-24T21:56:51.606778Z","iopub.status.idle":"2025-05-24T21:56:51.614036Z","shell.execute_reply.started":"2025-05-24T21:56:51.606753Z","shell.execute_reply":"2025-05-24T21:56:51.613326Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/working/DEIM/configs/deim_dfine/dfine_hgnetv2_l_coco.yml","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:51.614862Z","iopub.execute_input":"2025-05-24T21:56:51.615561Z","iopub.status.idle":"2025-05-24T21:56:51.747185Z","shell.execute_reply.started":"2025-05-24T21:56:51.615537Z","shell.execute_reply":"2025-05-24T21:56:51.746148Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/working/DEIM/configs/dataset/custom_detection.yml","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:51.748557Z","iopub.execute_input":"2025-05-24T21:56:51.748902Z","iopub.status.idle":"2025-05-24T21:56:51.868267Z","shell.execute_reply.started":"2025-05-24T21:56:51.748867Z","shell.execute_reply":"2025-05-24T21:56:51.867539Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/input/my-custom-detect-yml/my_custom_detection.yml","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:51.869236Z","iopub.execute_input":"2025-05-24T21:56:51.869464Z","iopub.status.idle":"2025-05-24T21:56:52.565236Z","shell.execute_reply.started":"2025-05-24T21:56:51.869441Z","shell.execute_reply":"2025-05-24T21:56:52.564569Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/working/DEIM/configs/deim_dfine/dfine_hgnetv2_x_coco.yml","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.566230Z","iopub.execute_input":"2025-05-24T21:56:52.566470Z","iopub.status.idle":"2025-05-24T21:56:52.684708Z","shell.execute_reply.started":"2025-05-24T21:56:52.566446Z","shell.execute_reply":"2025-05-24T21:56:52.683799Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%%writefile /kaggle/working/DEIM/configs/deim_dfine/deim_hgnetv2_x_coco_byu.yml\n__include__: [\n  '../dataset/my_custom_detection.yml',\n  '../runtime.yml',\n  '../base/my_dataloader.yml',\n  '../base/optimizer.yml',\n  '../base/dfine_hgnetv2.yml',\n]\n\noutput_dir: ./output/dfine_hgnetv2_x_coco\n\n\nDEIM:\n  backbone: HGNetv2\n\nHGNetv2:\n  name: 'B5'\n  return_idx: [1, 2, 3]\n  freeze_stem_only: True\n  freeze_at: 0\n  freeze_norm: True\n\nHybridEncoder:\n  # intra\n  hidden_dim: 384\n  dim_feedforward: 2048\n\nDFINETransformer:\n  feat_channels: [384, 384, 384]\n  reg_scale: 8\n\noptimizer:\n  type: AdamW\n  params:\n    -\n      params: '^(?=.*backbone)(?!.*norm|bn).*$'\n      lr: 0.0000025\n    -\n      params: '^(?=.*(?:encoder|decoder))(?=.*(?:norm|bn)).*$'\n      weight_decay: 0.\n\n  lr: 0.00025\n  betas: [0.9, 0.999]\n  weight_decay: 0.000125\n\n\n# Increase to search for the optimal ema\nepoches: 80 # 72 + 2n\ntrain_dataloader:\n  dataset:\n    transforms:\n      policy:\n        epoch: 72\n  collate_fn:\n    stop_epoch: 72\n    ema_restart_decay: 0.9998\n    base_size_repeat: 3","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.687626Z","iopub.execute_input":"2025-05-24T21:56:52.687832Z","iopub.status.idle":"2025-05-24T21:56:52.693509Z","shell.execute_reply.started":"2025-05-24T21:56:52.687814Z","shell.execute_reply":"2025-05-24T21:56:52.692808Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%%writefile /kaggle/working/DEIM/configs/deim_dfine/deim_hgnetv2_l_coco_byu.yml\n__include__: [\n  '../dataset/my_custom_detection.yml',\n  '../runtime.yml',\n  '../base/my_dataloader.yml',\n  '../base/optimizer.yml',\n  '../base/dfine_hgnetv2.yml',\n]\n\noutput_dir: ./outputs/dfine_hgnetv2_l_coco\n\n\nHGNetv2:\n  name: 'B4'\n  return_idx: [1, 2, 3]\n  freeze_stem_only: True\n  freeze_at: 0\n  freeze_norm: True\n\noptimizer:\n  type: AdamW\n  params:\n    -\n      params: '^(?=.*backbone)(?!.*norm|bn).*$'\n      lr: 0.0000125\n    -\n      params: '^(?=.*(?:encoder|decoder))(?=.*(?:norm|bn)).*$'\n      weight_decay: 0.\n\n  lr: 0.00025\n  betas: [0.9, 0.999]\n  weight_decay: 0.000125\n\n\n# Increase to search for the optimal ema\nepoches: 88 # 72 + 2n\ntrain_dataloader:\n  dataset:\n    transforms:\n      policy:\n        #epoch: 72\n        epoch: 80\n  collate_fn:\n    #stop_epoch: 72\n    stop_epoch: 80\n    ema_restart_decay: 0.9999\n    base_size_repeat: 4","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.694367Z","iopub.execute_input":"2025-05-24T21:56:52.694574Z","iopub.status.idle":"2025-05-24T21:56:52.707935Z","shell.execute_reply.started":"2025-05-24T21:56:52.694551Z","shell.execute_reply":"2025-05-24T21:56:52.707380Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#deim_hgnetv2_l_coco_byu.yml  out of memory, use small model ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.708695Z","iopub.execute_input":"2025-05-24T21:56:52.709186Z","iopub.status.idle":"2025-05-24T21:56:52.722148Z","shell.execute_reply.started":"2025-05-24T21:56:52.709166Z","shell.execute_reply":"2025-05-24T21:56:52.721549Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/working/DEIM/configs/deim_dfine/dfine_hgnetv2_s_coco.yml","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.722781Z","iopub.execute_input":"2025-05-24T21:56:52.722955Z","iopub.status.idle":"2025-05-24T21:56:52.848299Z","shell.execute_reply.started":"2025-05-24T21:56:52.722942Z","shell.execute_reply":"2025-05-24T21:56:52.847574Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%%writefile /kaggle/working/DEIM/configs/deim_dfine/deim_hgnetv2_s_coco_byu.yml\n__include__: [\n  '../dataset/my_custom_detection.yml',\n  '../runtime.yml',\n  #'../base/dataloader.yml',\n  '../base/my_dataloader.yml',\n  '../base/optimizer.yml',\n  '../base/dfine_hgnetv2.yml',\n]\n\noutput_dir: ./output/dfine_hgnetv2_s_coco\n\n\nDEIM:\n  backbone: HGNetv2\n\nHGNetv2:\n  name: 'B0'\n  return_idx: [1, 2, 3]\n  freeze_at: -1\n  freeze_norm: False\n  use_lab: True\n\nDFINETransformer:\n  num_layers: 3  # 4 5 6\n  eval_idx: -1  # -2 -3 -4\n\nHybridEncoder:\n  in_channels: [256, 512, 1024]\n  hidden_dim: 256\n  depth_mult: 0.34\n  expansion: 0.5\n\noptimizer:\n  type: AdamW\n  params:\n    -\n      params: '^(?=.*backbone)(?!.*norm|bn).*$'\n      lr: 0.0001\n    -\n      params: '^(?=.*backbone)(?=.*norm|bn).*$'\n      lr: 0.0001\n      weight_decay: 0.\n    -\n      params: '^(?=.*(?:encoder|decoder))(?=.*(?:norm|bn|bias)).*$'\n      weight_decay: 0.\n\n  lr: 0.0002\n  betas: [0.9, 0.999]\n  weight_decay: 0.0001\n\n\n# Increase to search for the optimal ema\nepoches: 132 # 120 + 4n\ntrain_dataloader:\n  dataset:\n    transforms:\n      policy:\n        epoch: 120\n  collate_fn:\n    stop_epoch: 120\n    ema_restart_decay: 0.9999\n    base_size_repeat: 20","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.849313Z","iopub.execute_input":"2025-05-24T21:56:52.849586Z","iopub.status.idle":"2025-05-24T21:56:52.855356Z","shell.execute_reply.started":"2025-05-24T21:56:52.849550Z","shell.execute_reply":"2025-05-24T21:56:52.854773Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/working/DEIM/configs/base/dataloader.yml","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.856176Z","iopub.execute_input":"2025-05-24T21:56:52.856361Z","iopub.status.idle":"2025-05-24T21:56:52.988119Z","shell.execute_reply.started":"2025-05-24T21:56:52.856343Z","shell.execute_reply":"2025-05-24T21:56:52.987216Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%%writefile  /kaggle/working/DEIM/configs/base/my_dataloader.yml\n\ntrain_dataloader:\n  dataset:\n    transforms:\n      ops:\n        - {type: RandomPhotometricDistort, p: 0.5}\n        - {type: RandomZoomOut, fill: 0}\n        - {type: RandomIoUCrop, p: 0.8}\n        - {type: SanitizeBoundingBoxes, min_size: 1}\n        - {type: RandomHorizontalFlip}\n        - {type: Resize, size: [640, 640], }\n        - {type: SanitizeBoundingBoxes, min_size: 1}\n        - {type: ConvertPILImage, dtype: 'float32', scale: True}\n        - {type: ConvertBoxes, fmt: 'cxcywh', normalize: True}\n      policy:\n        name: stop_epoch\n        epoch: 64 # epoch in [71, ~) stop `ops`\n        ops: ['Mosaic', 'RandomPhotometricDistort', 'RandomZoomOut', 'RandomIoUCrop']\n\n  collate_fn:\n    type: BatchImageCollateFunction\n    base_size: 640\n    base_size_repeat: 3\n    stop_epoch: 56 # epoch in [72, ~) stop `multiscales`\n\n  shuffle: True\n  total_batch_size: 8 # total batch size equals to 32 (4 * 8)\n  num_workers: 4\n\n\nval_dataloader:\n  dataset:\n    transforms:\n      ops:\n        - {type: Resize, size: [640, 640], }\n        - {type: ConvertPILImage, dtype: 'float32', scale: True}\n  shuffle: False\n  total_batch_size: 8\n  num_workers: 4","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.989174Z","iopub.execute_input":"2025-05-24T21:56:52.989503Z","iopub.status.idle":"2025-05-24T21:56:52.995352Z","shell.execute_reply.started":"2025-05-24T21:56:52.989472Z","shell.execute_reply":"2025-05-24T21:56:52.994717Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"%%writefile  /kaggle/working/DEIM/configs/dataset/my_custom_detection.yml\ntask: detection\n\nevaluator:\n  type: CocoEvaluator\n  iou_types: ['bbox', ]\n\nnum_classes: 1 # your dataset classes\nremap_mscoco_category: False\n\ntrain_dataloader:\n  type: DataLoader\n  dataset:\n    type: CocoDetection\n    img_folder: /kaggle/input/byu-coco-dataset-no-normalized/dataset_json/train\n    ann_file: /kaggle/input/byu-coco-dataset-no-normalized/dataset_json/train/annotations_train.json\n    return_masks: False\n    transforms:\n      type: Compose\n      ops: ~\n  shuffle: True\n  num_workers: 2\n  drop_last: True\n  collate_fn:\n    type: BatchImageCollateFunction\n\n\nval_dataloader:\n  type: DataLoader\n  dataset:\n    type: CocoDetection\n    img_folder: /kaggle/input/byu-coco-dataset-no-normalized/dataset_json/val\n    ann_file: /kaggle/input/byu-coco-dataset-no-normalized/dataset_json/val/annotations_valid.json\n    return_masks: False\n    transforms:\n      type: Compose\n      ops: ~\n  shuffle: False\n  num_workers: 2\n  drop_last: False\n  collate_fn:\n    type: BatchImageCollateFunction","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:52.996093Z","iopub.execute_input":"2025-05-24T21:56:52.996386Z","iopub.status.idle":"2025-05-24T21:56:53.012915Z","shell.execute_reply.started":"2025-05-24T21:56:52.996360Z","shell.execute_reply":"2025-05-24T21:56:53.012302Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cp /kaggle/input/my-deim-wts/deim_dfine_hgnetv2_l_coco_50e.pth .","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:53.013498Z","iopub.execute_input":"2025-05-24T21:56:53.013719Z","iopub.status.idle":"2025-05-24T21:56:53.823461Z","shell.execute_reply.started":"2025-05-24T21:56:53.013705Z","shell.execute_reply":"2025-05-24T21:56:53.822231Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cp '/kaggle/input/deim-dfine-s-wts/deim_dfine_hgnetv2_s_coco_120e (1).pth' ./deim_dfine_hgnetv2_s_coco_120e.pth","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:53.824846Z","iopub.execute_input":"2025-05-24T21:56:53.826251Z","iopub.status.idle":"2025-05-24T21:56:54.206701Z","shell.execute_reply.started":"2025-05-24T21:56:53.826211Z","shell.execute_reply":"2025-05-24T21:56:54.205719Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cp '/kaggle/input/my-deim-wts/deim_dfine_hgnetv2_x_coco_50e.pth'  ./deim_dfine_hgnetv2_x_coco_50e.pth","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:54.207817Z","iopub.execute_input":"2025-05-24T21:56:54.208081Z","iopub.status.idle":"2025-05-24T21:56:55.683869Z","shell.execute_reply.started":"2025-05-24T21:56:54.208051Z","shell.execute_reply":"2025-05-24T21:56:55.682849Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import torch\nprint(f\"PyTorch version: {torch.__version__}\")\nprint(f\"CUDA available: {torch.cuda.is_available()}\")\nprint(f\"CUDA version: {torch.version.cuda}\") ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:55.684961Z","iopub.execute_input":"2025-05-24T21:56:55.685170Z","iopub.status.idle":"2025-05-24T21:56:58.710064Z","shell.execute_reply.started":"2025-05-24T21:56:55.685149Z","shell.execute_reply":"2025-05-24T21:56:58.709410Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Explicitly move model to GPU\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\nprint(f\"Using device: {device}\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:58.710831Z","iopub.execute_input":"2025-05-24T21:56:58.711160Z","iopub.status.idle":"2025-05-24T21:56:58.715471Z","shell.execute_reply.started":"2025-05-24T21:56:58.711131Z","shell.execute_reply":"2025-05-24T21:56:58.714733Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"dn=torch.cuda.get_device_name('cuda')\nprint(dn)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:56:58.716278Z","iopub.execute_input":"2025-05-24T21:56:58.716632Z","iopub.status.idle":"2025-05-24T21:57:01.860238Z","shell.execute_reply.started":"2025-05-24T21:56:58.716559Z","shell.execute_reply":"2025-05-24T21:57:01.859460Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"available_gpus = [torch.cuda.device(i) for i in range(torch.cuda.device_count())]\nprint(available_gpus)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:57:01.861051Z","iopub.execute_input":"2025-05-24T21:57:01.861630Z","iopub.status.idle":"2025-05-24T21:57:01.865533Z","shell.execute_reply.started":"2025-05-24T21:57:01.861610Z","shell.execute_reply":"2025-05-24T21:57:01.864901Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#!cp /kaggle/input/my-deim-train-wts-demo/outputs/dfine_hgnetv2_l_coco/best*.pth /kaggle/working/ ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:57:01.866231Z","iopub.execute_input":"2025-05-24T21:57:01.866480Z","iopub.status.idle":"2025-05-24T21:57:09.063401Z","shell.execute_reply.started":"2025-05-24T21:57:01.866462Z","shell.execute_reply":"2025-05-24T21:57:09.062599Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#!cp /kaggle/input/my-deim-train-wts-demo/outputs/dfine_hgnetv2_l_coco/last.pth /kaggle/working/ ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:57:09.064464Z","iopub.execute_input":"2025-05-24T21:57:09.064773Z","iopub.status.idle":"2025-05-24T21:57:12.335163Z","shell.execute_reply.started":"2025-05-24T21:57:09.064733Z","shell.execute_reply":"2025-05-24T21:57:12.334194Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#! torchrun --master_port=7777 --nproc_per_node=2 /kaggle/working/DEIM/train.py -c /kaggle/working/DEIM/configs/deim_dfine/deim_hgnetv2_l_coco_byu.yml --use-amp --seed=0 -t  deim_dfine_hgnetv2_l_coco_50e.pth ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:57:12.336188Z","iopub.execute_input":"2025-05-24T21:57:12.336464Z","iopub.status.idle":"2025-05-24T21:57:12.340345Z","shell.execute_reply.started":"2025-05-24T21:57:12.336424Z","shell.execute_reply":"2025-05-24T21:57:12.339632Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#! python   /kaggle/working/DEIM/train.py -c /kaggle/working/DEIM/configs/deim_dfine/deim_hgnetv2_s_coco_byu.yml --use-amp --seed=0 -t  deim_dfine_hgnetv2_s_coco_120e.pth","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T21:57:12.343758Z","iopub.execute_input":"2025-05-24T21:57:12.344326Z","iopub.status.idle":"2025-05-24T21:57:12.354001Z","shell.execute_reply.started":"2025-05-24T21:57:12.344307Z","shell.execute_reply":"2025-05-24T21:57:12.353300Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cp /kaggle/input/my-deim-train-wts-demo/output/dfine_hgnetv2_x_coco/checkpoint0067.pth /kaggle/working/ \n\n!cp /kaggle/input/my-deim-train-wts-demo/output/dfine_hgnetv2_x_coco/best_stg1.pth /kaggle/working/define_hgnetv2_x_coco.pth ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T22:03:56.642830Z","iopub.execute_input":"2025-05-24T22:03:56.643145Z","iopub.status.idle":"2025-05-24T22:04:11.443743Z","shell.execute_reply.started":"2025-05-24T22:03:56.643119Z","shell.execute_reply":"2025-05-24T22:04:11.442901Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"! python   /kaggle/working/DEIM/train.py -c /kaggle/working/DEIM/configs/deim_dfine/deim_hgnetv2_x_coco_byu.yml --use-amp --seed=0 -t define_hgnetv2_x_coco.pth ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-05-24T22:04:32.237166Z","iopub.execute_input":"2025-05-24T22:04:32.237450Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}