Skip to content

Commit

Permalink
Merge pull request #26 from achalddave/pr/lvis_challenge_usage
Browse files Browse the repository at this point in the history
Update LVIS challenge usage script
  • Loading branch information
rbgirshick authored Jun 28, 2021
2 parents 84ac272 + ad989b9 commit ccd6e14
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions test_challenge21.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import logging
from lvis import LVIS, LVISResults, LVISEval
from lvis import LVISEval

# result and val files for 100 randomly sampled images.
ANNOTATION_PATH = "./data/lvis_val_100.json"
RESULT_PATH = "./data/lvis_results_100.json"
if __name__ == "__main__":
# result and val files for 100 randomly sampled images.
ANNOTATION_PATH = "./data/lvis_val_100.json"
RESULT_PATH = "./data/lvis_results_100.json"

ANN_TYPE = 'bbox'

lvis_gt = LVIS(ANNOTATION_PATH)
lvis_dt = LVISResults(lvis_gt,
RESULT_PATH,
max_dets_per_cat=2,
max_dets_per_im=-1)
lvis_eval = LVISEval(lvis_gt, lvis_dt, ANN_TYPE)
lvis_eval.params.max_dets = -1
lvis_eval.params.max_dets_per_cat = 2
lvis_eval.run()
lvis_eval.print_results()
lvis_eval = LVISEval(ANNOTATION_PATH, RESULT_PATH, mode="challenge2021")
lvis_eval.run()
lvis_eval.print_results()

0 comments on commit ccd6e14

Please sign in to comment.