utils.evaluate.SODAeval#
- class SODAeval(labelmap: List[str])[source]#
Bases:
object
Model evaluation tool
The add method accumulates predictions. The get_eval method can be used to obtain current results for the accumulated predictions.
The COCO API is used for evaluation.
- Parameters:
labelmap (List[str]) – List of class names.
Methods
Add new predictions
Calculates network scores and prints the results to the console
Resets accumulated data
- add(gts: Tensor, preds: Tensor, img: Tensor) None [source]#
Add new predictions
- Parameters:
gts (torch.Tensor) –
Ground Truth. Shape [batch, anchor, 5].
One record contains(class id, xlu, ylu, xrd, yrd).
preds (torch.Tensor) –
Shape [batch, anchor, 6].
One preds contains (class, iou, xlu, ylu, xrd, yrd)
img (torch.Tensor) – Input img. Shape [batch, channels, h, w].