Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Add SemanticSegmentationEvaluator #238

Merged
merged 21 commits into from
Jul 3, 2017
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix doc
  • Loading branch information
yuyu2172 committed Jun 22, 2017
commit c04888444af2e6023177d7030b8cb759fbc6183f
36 changes: 19 additions & 17 deletions chainercv/extensions/evaluator/semantic_segmentation_evaluator.py
Original file line number Diff line number Diff line change
@@ -15,29 +15,29 @@ class SemanticSegmentationEvaluator(chainer.training.extensions.Evaluator):
This extension iterates over an iterator and evaluates the prediction
results of the model by common evaluation metrics for semantic
segmentation.
This extension reports the following values with keys.
This extension reports values with keys below.
Please note that :obj:`'iou/<label_names[l]>'` and
:obj:`'class_accuracy/<label_names[l]>'` are reported only if
:obj:`label_names` is specified.

* :obj:`'miou'`: Mean of IoUs (mIoU).
* :obj:`'iou/<label_names[l]>'`: IoU for class \
:obj:`label_names[l]`, where :math:`l` is the index of the class. \
For example, this evaluator reports :obj:`'iou/Sky'`, \
:obj:`'ap/Building'`, etc. if :obj:`label_names` is \
:obj:`~chainercv.datasets.camvid_label_names`. \
If there is no label assigned to class :obj:`label_names[l]` \
in ground truth, it reports :obj:`numpy.nan` as \
its IoU. \
In this case, mean IoU is computed without this class.
For example, if :obj:`label_names` is \
:obj:`~chainercv.datasets.camvid_label_names`, \
this evaluator reports :obj:`'iou/Sky'`, \
:obj:`'ap/Building'`, etc.
* :obj:`'mean_class_accuracy'`: Mean of class accuracies.
* :obj:`class_accuracy/<label_names[l]>'`: Class accuracy for class \
:obj:`label_names[l]`, where :math:`l` is the index of the class. \
If there is no label assigned to class :obj:`label_names[l]` \
in ground truth, it reports :obj:`numpy.nam` as \
its class accuracy. \
In this case, mean class accuracy is computed without this class.
* :obj:`pixel_accuracy`: Pixel accuracy.
* :obj:`'class_accuracy/<label_names[l]>'`: Class accuracy for class \
:obj:`label_names[l]`, where :math:`l` is the index of the class.
* :obj:`'pixel_accuracy'`: Pixel accuracy.

If there is no label assigned to class :obj:`label_names[l]`
in the ground truth, values corresponding to keys
:obj:`'iou/<label_names[l]>'` and :obj:`'class_accuracy/<label_names[l]>'`
are :obj:`numpy.nan`.
In that case, the means of them are calculated by excluding them from
calculation.

For details on the evaluation metrics, please see the documentation
for :func:`chainercv.evaluations.eval_semantic_segmentation`.
@@ -53,8 +53,10 @@ class SemanticSegmentationEvaluator(chainer.training.extensions.Evaluator):
have :meth:`predict` method which takes a list of images and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which -> that? #229 (comment)

returns :obj:`labels`.
label_names (iterable of strings): An iterable of names of classes.
If this value is specified, IoU for each class is
also reported with the key :obj:`'iou/<label_names[l]>'`.
If this value is specified, IoU and class accuracy for each class
is also reported with the keys
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is -> are

:obj:`'iou/<label_names[l]>'` and
:obj:`'class_accuracy/<label_names[l]>'`.

"""