def format_results(self, results, jsonfile_prefix=None, **kwargs):
    'Format the results to json (standard format for COCO evaluation).\n        Args:\n            results (list[tuple | numpy.ndarray]): Testing results of the\n                dataset.\n            jsonfile_prefix (str | None): The prefix of json files. It includes\n                the file path and the prefix of filename, e.g., "a/b/prefix".\n                If not specified, a temp file will be created. Default: None.\n        Returns:\n            tuple: (result_files, tmp_dir), result_files is a dict containing                 the json filepaths, tmp_dir is the temporal directory created                 for saving json files when jsonfile_prefix is not specified.\n        '
    assert isinstance(results, list), 'results must be a list'
    assert (len(results) == len(self)), 'The length of results is not equal to the dataset len: {} != {}'.format(len(results), len(self))
    if (jsonfile_prefix is None):
        tmp_dir = tempfile.TemporaryDirectory()
        jsonfile_prefix = osp.join(tmp_dir.name, 'results')
    else:
        tmp_dir = None
    result_files = self.results2json(results, jsonfile_prefix)
    return (result_files, tmp_dir)
Format the results to json (standard format for COCO evaluation).
Args:
    results (list[tuple | numpy.ndarray]): Testing results of the
        dataset.
    jsonfile_prefix (str | None): The prefix of json files. It includes
        the file path and the prefix of filename, e.g., "a/b/prefix".
        If not specified, a temp file will be created. Default: None.
Returns:
    tuple: (result_files, tmp_dir), result_files is a dict containing                 the json filepaths, tmp_dir is the temporal directory created                 for saving json files when jsonfile_prefix is not specified.
def format_results(self, results, jsonfile_prefix=None, **kwargs):
    'Format the results to json (standard format for COCO evaluation).\n        Args:\n            results (list[tuple | numpy.ndarray]): Testing results of the\n                dataset.\n            jsonfile_prefix (str | None): The prefix of json files. It includes\n                the file path and the prefix of filename, e.g., "a/b/prefix".\n                If not specified, a temp file will be created. Default: None.\n        Returns:\n            tuple: (result_files, tmp_dir), result_files is a dict containing                 the json filepaths, tmp_dir is the temporal directory created                 for saving json files when jsonfile_prefix is not specified.\n        '
    assert isinstance(results, list), 'results must be a list'
    assert (len(results) == len(self)), 'The length of results is not equal to the dataset len: {} != {}'.format(len(results), len(self))
    if (jsonfile_prefix is None):
        tmp_dir = tempfile.TemporaryDirectory()
        jsonfile_prefix = osp.join(tmp_dir.name, 'results')
    else:
        tmp_dir = None
    result_files = self.results2json(results, jsonfile_prefix)
    return (result_files, tmp_dir)