icevision icon indicating copy to clipboard operation
icevision copied to clipboard

Unable to track multiple types of COCOMetric during training

Open nicjac opened this issue 3 years ago • 1 comments

🐛 Bug

Describe the bug When multiple instances of COCOMetric are used for different metric_type, only one is tracked during training

To Reproduce Steps to reproduce the behavior:

  1. Create a learner object with two different instances of COCOMetric
metrics=[COCOMetric(metric_type=COCOMetricType.mask), COCOMetric(metric_type=COCOMetricType.bbox)]
  1. During training, only a single COCOMetric is tracked

Expected behavior The different instances of COCOMetric should be tracked independently (e.g. in cases where both mask and bounding box metrics are of interest)

nicjac avatar Feb 07 '22 10:02 nicjac

It works fine for me. This is the code I'm using:

metrics = [COCOMetric(metric_type=COCOMetricType.mask), COCOMetric(metric_type=COCOMetricType.bbox)]
learn = model_type.fastai.learner(dls=[train_dl, valid_dl], model=model, metrics=metrics)

Maybe you forgot to update the metrics in the learner itself (second line)?

FacuRoffet99 avatar Jun 24 '22 12:06 FacuRoffet99