COCOeval
- class faster_coco_eval.core.cocoeval.COCOeval(cocoGt=None, cocoDt=None, iouType='segm', print_function=<bound method Logger.info of <Logger faster_coco_eval.core.cocoeval (WARNING)>>, extra_calc=False, kpt_oks_sigmas=None, use_area=True, lvis_style=False, separate_eval=False, boundary_dilation_ratio=0.02, boundary_cpu_count=4)
Bases:
object
- accumulate(p=None)
Deprecated. Use COCOeval_faster.accumulate instead.
- Parameters:
p – Unused.
- Raises:
DeprecationWarning – Always.
- computeIoU(imgId, catId)
Compute IoU between ground truth and detection for a given image and category.
- Parameters:
imgId (int) – Image ID.
catId (int) – Category ID.
- Returns:
IoUs between gt and dt for the given image and category.
- Return type:
Union[List[float], np.ndarray]
- computeOks(imgId, catId)
Compute OKS between ground truth and detection for a given image and category.
- Parameters:
imgId (int) – Image ID.
catId (int) – Category ID.
- Returns:
OKS between gt and dt for the given image and category.
- Return type:
np.ndarray
- evaluate()
Deprecated. Use COCOeval_faster.evaluate instead.
- Raises:
DeprecationWarning – Always.
- evaluateImg(imgId, catId, aRng, maxDet)
Deprecated. Use COCOeval_faster.evaluateImg instead.
- Parameters:
imgId – Image ID.
catId – Category ID.
aRng – Area range.
maxDet – Maximum detections.
- Raises:
DeprecationWarning – Always.
- get_type_result(first=0.01, second=0.85)
Calculate type results for easy, medium, and hard splits.
- Parameters:
first (float) – Threshold for ‘easy’ crowdIndex.
second (float) – Threshold for ‘medium’ crowdIndex.
- Returns:
List of scores for [easy, medium, hard].
- Return type:
list
- property print_function: Callable
Returns: Callable: The function used for printing/logging.
- split(gt_file, first=0.01, second=0.85)
Split images into easy, medium, hard according to ‘crowdIndex’.
- Parameters:
gt_file (str) – Path to the ground truth file.
first (float) – Threshold for ‘easy’ crowdIndex.
second (float) – Threshold for ‘medium’ crowdIndex.
- Returns:
Lists of image ids for (easy, medium, hard).
- Return type:
tuple
- summarize()
Compute and display summary metrics for evaluation results.
Note
This function can only be applied on the default parameter setting.