Shortcuts

DumpResults

class mmengine.evaluator.DumpResults(out_file_path, collect_device='cpu', collect_dir=None)[source]

Dump model predictions to a pickle file for offline evaluation.

Parameters:
  • out_file_path (str) – Path of the dumped file. Must end with ‘.pkl’ or ‘.pickle’.

  • collect_device (str) – Device name used for collecting results from different ranks during distributed training. Must be ‘cpu’ or ‘gpu’. Defaults to ‘cpu’.

  • collect_dir (str | None) – (str, optional): Synchronize directory for collecting data from different ranks. This argument should only be configured when collect_device is ‘cpu’. Defaults to None. New in version 0.7.3.

compute_metrics(results)[source]

Dump the prediction results to a pickle file.

Parameters:

results (list) –

Return type:

dict

process(data_batch, predictions)[source]

Transfer tensors in predictions to CPU.

Parameters:
Return type:

None