Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Fix icevision task metric names #1252

Merged
merged 3 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Fixed a bug where `InstanceSegmentation` would fail if samples had an inconsistent number of bboxes, labels, and masks (these will now be treated as negative samples) ([#1222](https://github.com/PyTorchLightning/lightning-flash/pull/1222))

- Fixed a bug where `ObjectDetector`, `InstanceSegmentation`, and `KeypointDetector` would log train and validation metrics with the same name ([#1252](https://github.com/PyTorchLightning/lightning-flash/pull/1252))

## [0.7.0] - 2022-02-15

### Added
Expand Down
1 change: 1 addition & 0 deletions flash/core/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
RunningStage.VALIDATING: "val",
RunningStage.PREDICTING: "predict",
RunningStage.SERVING: "serve",
RunningStage.SANITY_CHECKING: "val",
}
_STAGES_PREFIX_VALUES = {"train", "test", "val", "predict", "serve"}

Expand Down
4 changes: 2 additions & 2 deletions flash/core/integrations/icevision/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class SimpleCOCOMetric(COCOMetric):
def finalize(self) -> Dict[str, float]:
logs = super().finalize()
return {
"Precision (IoU=0.50:0.95,area=all)": logs["AP (IoU=0.50:0.95) area=all"],
"Recall (IoU=0.50:0.95,area=all,maxDets=100)": logs["AR (IoU=0.50:0.95) area=all maxDets=100"],
"precision (IoU=0.50:0.95,area=all)": logs["AP (IoU=0.50:0.95) area=all"],
"recall (IoU=0.50:0.95,area=all,maxDets=100)": logs["AR (IoU=0.50:0.95) area=all maxDets=100"],
}


Expand Down
9 changes: 6 additions & 3 deletions flash/core/integrations/icevision/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@

import torch

from flash.core.data.utils import _STAGES_PREFIX