|
Safemotion Lib
|
Public Member Functions | |
| reset (self) | |
| preprocess_inputs (self, inputs) | |
| process (self, inputs, outputs) | |
| evaluate (self) | |
Base class for a dataset evaluator. The function :func:`inference_on_dataset` runs the model over all samples in the dataset, and have a DatasetEvaluator to process the inputs/outputs. This class will accumulate information of the inputs/outputs (by :meth:`process`), and produce evaluation results in the end (by :meth:`evaluate`).
Definition at line 12 of file evaluator.py.
| fastreid.evaluation.evaluator.DatasetEvaluator.evaluate | ( | self | ) |
Evaluate/summarize the performance, after processing all input/output pairs.
Returns:
dict:
A new evaluator class can return a dict of arbitrary format
as long as the user can process the results.
In our train_net.py, we expect the following format:
* key: the name of the task (e.g., bbox)
* value: a dict of {metric name: score}, e.g.: {"AP50": 80}
Reimplemented in fastreid.evaluation.reid_evaluation.ReidEvaluator.
Definition at line 40 of file evaluator.py.
| fastreid.evaluation.evaluator.DatasetEvaluator.preprocess_inputs | ( | self, | |
| inputs ) |
Definition at line 28 of file evaluator.py.
| fastreid.evaluation.evaluator.DatasetEvaluator.process | ( | self, | |
| inputs, | |||
| outputs ) |
Process an input/output pair.
Args:
inputs: the inputs that's used to call the model.
outputs: the return value of `model(input)`
Reimplemented in fastreid.evaluation.reid_evaluation.ReidEvaluator.
Definition at line 31 of file evaluator.py.
| fastreid.evaluation.evaluator.DatasetEvaluator.reset | ( | self | ) |
Preparation for a new round of evaluation. Should be called before starting a round of evaluation.
Reimplemented in fastreid.evaluation.reid_evaluation.ReidEvaluator.
Definition at line 21 of file evaluator.py.