-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Fixed AP with Boundary IoU (#25)
* Implement Fixed AP * Implement mode="challenge2021" in LVISEval
- Loading branch information
1 parent
98b5f79
commit 84ac272
Showing
3 changed files
with
119 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import logging | ||
from lvis import LVIS, LVISResults, LVISEval | ||
|
||
# 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() |