icevision
icevision copied to clipboard
Unable to track multiple types of COCOMetric during training
🐛 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:
- Create a learner object with two different instances of
COCOMetric
metrics=[COCOMetric(metric_type=COCOMetricType.mask), COCOMetric(metric_type=COCOMetricType.bbox)]
- 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)
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)?