Migrate `IoU` segmentaiton metrics from `keras.metrics` to `keras_cv.metrics`
See original GitHub issueIntersection-Over-Union is a common evaluation metric for semantic image segmentation.
- tf.keras.metrics.MeanIoU
- tf.keras.metrics.IoU
- tf.keras.metrics.BinaryIoU
- tf.keras.metrics.OneHotMeanIoU
- tf.keras.metrics.OneHotIoU
tf.keras.metrics.OneHotIoU(
num_classes: int,
target_class_ids: Union[List[int], Tuple[int, ...]],
name=None,
dtype=None,
ignore_class: Optional[int] = None,
sparse_y_pred: bool = False,
axis: int = -1
)
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
tf.keras.metrics.MeanIoU | TensorFlow v2.11.0
Intersection-Over-Union is a common evaluation metric for semantic image segmentation. For an individual class, the IoU metric is defined as ...
Read more >Metrics - Keras
Metrics. A metric is a function that is used to judge the performance of your model. Metric functions are ... Image segmentation metrics...
Read more >tf.keras.metrics.MeanIoU - TensorFlow 2.4 - W3cubDocs
Main aliases. tf.metrics.MeanIoU. Compat aliases for migration ... evaluation metric for semantic image segmentation, which first computes the IOU for each ...
Read more >Metrics for semantic segmentation - Excursions in data
The Jaccard index is also known as Intersection over Union (IoU) and because of its simple and intuitive expression is widely used in...
Read more >Intersection over union (IOU) metric for multi-class semantic ...
But I'm not sure is the IOU function the correct implementation or not,. could you clarify this. python · tensorflow · keras ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue with the class was that it was expecting exclusively categorical vectors, so when using sparse categorical crossentropy and an output fit for it - there would be a shape mismatch. The common fix was to simply get the argmax and thus convert it into a sparse representation.
However, as @tanzhenyu pointed out in the previous comment:
Not sure if it’s a better API choice to have
MeanIoU(arg)
orSparseMeanIoU
andCategoricalMeanIoU
. KerasCV losses have gone with the latter format so far, which also allows for more specialization down the line.Yeah gotcha, that makes sense to me. We also could use a bounding box variant of IOU too.