Skip to content

Commit

Permalink
update warning info
Browse files Browse the repository at this point in the history
  • Loading branch information
kennymckormick committed Jan 27, 2021
1 parent adcdc23 commit 3a4f68d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions mmaction/datasets/ava_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,14 @@ def dump_results(self, results, out):

def evaluate(self,
results,
metrics=('mAP'),
metrics=('mAP', ),
metric_options=None,
logger=None):
# need to create a temp result file
assert len(metrics) == 1 and metrics[0] == 'mAP', (
'For evaluation on '
'AVADataset, you need to use metrics "mAP"')
'For evaluation on AVADataset, you need to use metrics "mAP" '
'See https://github.com/open-mmlab/mmaction2/pull/567 '
'for more info.')
time_now = datetime.now().strftime('%Y%m%d_%H%M%S')
temp_file = f'AVA_{time_now}_result.csv'
results2csv(self, results, temp_file)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_data/test_datasets/test_ava_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,4 @@ def test_ava_evaluate(self):
[0.106, 0.445, 0.782, 0.673, 0.367]])
]]
res = ava_dataset.evaluate(fake_result)
assert_array_almost_equal(res['Recall@0.5@100'], 0.33333333)
assert_array_almost_equal(res['AR@100'], 0.15833333)
assert_array_almost_equal(res['mAP@0.5IOU'], 0.027777778)

0 comments on commit 3a4f68d

Please # to comment.