Skip to main content

mmdetection; change scheduler, ensemble

· 2 min read
SeulGi Hong

Episode 5 for my VIPrior challenge journey link!

Issue 1. change scheduler

Using this

mmclassification doc. link

Error

Error Message

../aten/src/ATen/native/cuda/Loss.cu:115: operator(): block: [176,0,0], thread: [108,0,0] Assertion `input_val >= zero && input_val <= one` failed.

Debug

Seems like a loss scale issue due to lr, so I re-enabled auto_lr.

Reference: https://discuss.pytorch.org/t/assertion-input-val-zero-input-val-one-failed/107554/3

FYI: There is a feature to receive notifications via email or Slack in case of crashes or completion of training.

image

Issue 2. Ensemble

I investigated and summarized it on my blog: Link, kor

The tool provided there takes image inputs, but there is no need to perform inference several times. Therefore, I will receive JSON files and code for ensemble.

Requirements

Situation

  • need to provide only bbox, category id, and score to Weighted-Boxes-Fusion.
  • Perform ensemble for each image and save the results (the order should not change due to the submission format).
  • Consensus will be added, similar to preprocessing as described in my blog.

Keep using my Docker environment used for running the detection. The only thing I need for these ensemble is: pip install ensemble-boxes.

Implementation

  • Using the ensemble-boxes module
  • Take multiple JSON inference results as input -> perform ensemble -> then write the results as JSON.
  • Follow the 2022 VIPriors Object Detection Challenge submission format.
  • Consensus or other preprocessing(?) will be implemented tomorrow....

My code link: https://github.com/sghong977/Daily_AIML/blob/fc4eede51557f6870e70939c54f9db855a3f6741/Object_Detection/ensemble.py