open-mmlab / cocoapi

COCO API - Dataset @ http://cocodataset.org/
Other
46 stars 35 forks source link

customized parameter passing to accumulate function #21

Open sudo-rm-covid19 opened 3 years ago

sudo-rm-covid19 commented 3 years ago

Hi, When I pass customized parameter p with p.catIds = [15, 30] into COCOEval.accumulate, k_list would return [0, 1] since both 15 and 30 are in the original set of COCO catIds.

# retrieve E at each category, area range, and max number of detections
        for k, k0 in enumerate(k_list):
            Nk = k0 * A0 * I0
            for a, a0 in enumerate(a_list):
                Na = a0 * I0
                for m, maxDet in enumerate(m_list):
                    E = [self.evalImgs[Nk + Na + i] for i in i_list]

But E will retrieve information of category id 0, 1 instead of the specified 15, 30. The same logic applies to a_list and i_list as well.