faster-coco-eval 1.5.6__tar.gz → 1.5.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {faster_coco_eval-1.5.6/faster_coco_eval.egg-info → faster_coco_eval-1.5.7}/PKG-INFO +1 -1
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/core/coco.py +27 -24
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/core/cocoeval.py +4 -9
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/version.py +1 -1
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7/faster_coco_eval.egg-info}/PKG-INFO +1 -1
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/LICENSE +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/MANIFEST.in +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/README.md +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/csrc/faster_eval_api/coco_eval/cocoeval.cpp +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/csrc/faster_eval_api/coco_eval/cocoeval.h +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/csrc/faster_eval_api/faster_eval_api.cpp +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/csrc/mask/common/maskApi.c +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/csrc/mask/common/maskApi.h +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/csrc/mask/pycocotools/_mask.pyx +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/__init__.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/core/__init__.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/core/faster_eval_api.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/core/mask.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/extra/__init__.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/extra/curves.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/extra/display.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/extra/draw.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/extra/extra.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval/extra/utils.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval.egg-info/SOURCES.txt +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval.egg-info/dependency_links.txt +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval.egg-info/requires.txt +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval.egg-info/top_level.txt +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/pyproject.toml +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/requirements/extra.txt +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/requirements/runtime.txt +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/requirements/tests.txt +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/setup.cfg +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/setup.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/tests/test_coco_metric.py +0 -0
- {faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/tests/test_lvis_metric.py +0 -0
|
@@ -174,40 +174,43 @@ class COCO:
|
|
|
174
174
|
:return: ids (int array) : integer array of ann ids
|
|
175
175
|
|
|
176
176
|
"""
|
|
177
|
+
imgIds = imgIds if _isArrayLike(imgIds) else [imgIds]
|
|
178
|
+
catIds = catIds if _isArrayLike(catIds) else [catIds]
|
|
177
179
|
|
|
178
|
-
|
|
180
|
+
check_area = len(areaRng) > 0
|
|
181
|
+
check_crowd = iscrowd is not None
|
|
182
|
+
check_cat = len(catIds) > 0
|
|
183
|
+
check_img = len(imgIds) > 0
|
|
179
184
|
|
|
180
|
-
if
|
|
181
|
-
for img_id in imgIds:
|
|
182
|
-
anns.extend(self.img_ann_map[img_id])
|
|
183
|
-
else:
|
|
185
|
+
if not (check_area and check_crowd and check_cat and check_img):
|
|
184
186
|
anns = self.dataset["annotations"]
|
|
187
|
+
else:
|
|
188
|
+
anns = []
|
|
185
189
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
if check_img:
|
|
191
|
+
for img_id in imgIds:
|
|
192
|
+
anns.extend(self.img_ann_map[img_id])
|
|
193
|
+
else:
|
|
194
|
+
anns = self.dataset["annotations"]
|
|
189
195
|
|
|
190
|
-
|
|
196
|
+
if check_cat:
|
|
197
|
+
anns = [ann for ann in anns if ann["category_id"] in catIds]
|
|
191
198
|
|
|
192
|
-
|
|
193
|
-
|
|
199
|
+
if check_area:
|
|
200
|
+
areaRng = [0, float("inf")]
|
|
194
201
|
|
|
195
|
-
|
|
196
|
-
|
|
202
|
+
anns = [
|
|
203
|
+
ann
|
|
204
|
+
for ann in anns
|
|
205
|
+
if ann["area"] > areaRng[0] and ann["area"] < areaRng[1]
|
|
206
|
+
]
|
|
197
207
|
|
|
198
|
-
|
|
199
|
-
|
|
208
|
+
if check_crowd:
|
|
209
|
+
anns = [ann for ann in anns if ann["iscrowd"] == iscrowd]
|
|
200
210
|
|
|
201
|
-
|
|
202
|
-
_ann["id"]
|
|
203
|
-
for _ann in anns
|
|
204
|
-
if _ann["category_id"] in cat_ids
|
|
205
|
-
and _ann["area"] > areaRng[0]
|
|
206
|
-
and _ann["area"] < areaRng[1]
|
|
207
|
-
and int(_ann.get("iscrowd", 0)) == int(iscrowd)
|
|
208
|
-
]
|
|
211
|
+
ids = [ann["id"] for ann in anns]
|
|
209
212
|
|
|
210
|
-
return
|
|
213
|
+
return ids
|
|
211
214
|
|
|
212
215
|
def getCatIds(self, catNms=[], supNms=[], catIds=[]):
|
|
213
216
|
"""Filtering parameters.
|
|
@@ -155,15 +155,10 @@ class COCOeval:
|
|
|
155
155
|
|
|
156
156
|
# set ignore flag
|
|
157
157
|
for gt in gts:
|
|
158
|
-
if "ignore"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
gt["ignore"] = gt["iscrowd"]
|
|
163
|
-
|
|
164
|
-
if p.iouType == "keypoints" and (gt["ignore"] == 0):
|
|
165
|
-
gt["ignore"] = int(gt.get("num_keypoints", 0) == 0)
|
|
166
|
-
|
|
158
|
+
gt["ignore"] = gt["ignore"] if "ignore" in gt else 0
|
|
159
|
+
gt["ignore"] = "iscrowd" in gt and gt["iscrowd"]
|
|
160
|
+
if p.iouType == "keypoints":
|
|
161
|
+
gt["ignore"] = (gt.get("num_keypoints") == 0) or gt["ignore"]
|
|
167
162
|
self._gts = defaultdict(list) # gt for evaluation
|
|
168
163
|
self._dts = defaultdict(list) # dt for evaluation
|
|
169
164
|
img_pl = defaultdict(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "1.5.
|
|
1
|
+
__version__ = "1.5.7"
|
|
2
2
|
__author__ = "MiXaiLL76"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/csrc/faster_eval_api/coco_eval/cocoeval.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{faster_coco_eval-1.5.6 → faster_coco_eval-1.5.7}/faster_coco_eval.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|