Skip to content

Commit

Permalink
fix TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
MiXaiLL76 committed Aug 29, 2024
1 parent b5762ea commit 543f77b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions faster_coco_eval/extra/extra.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
import logging
from collections import defaultdict
from typing import Dict
from typing import Dict, Set

import numpy as np

Expand Down Expand Up @@ -115,15 +115,15 @@ def drop_cocodt_by_score(self, min_score: float):
del self.cocoDt.anns[ann_id]

@property
def fp_image_ann_map(self) -> Dict[set]:
def fp_image_ann_map(self) -> Dict[int, Set[int]]:
image_ann_map = defaultdict(set)
for ann_id, ann in self.cocoDt.anns.items():
if ann.get("fp"):
image_ann_map[ann["image_id"]].add(ann_id)
return image_ann_map

@property
def fn_image_ann_map(self) -> Dict[set]:
def fn_image_ann_map(self) -> Dict[int, Set[int]]:
image_ann_map = defaultdict(set)
for ann_id, ann in self.cocoGt.anns.items():
if ann.get("fn"):
Expand Down

0 comments on commit 543f77b

Please sign in to comment.