GithubHelp home page GithubHelp logo

coco_improved's Introduction

COCO_improved

An improved mAP measurement tool for COCO object detection and instance segmentation.

1_person.jpg

demo2.png

Prepare

pip install pycocotools

Illustration

demonstration.png
AP: average precision, the area under the balck solid curve: PR curve, the same as official COCO API measurement.
MPP: max practical precision, a self-named calling, the max area rectangle under the PR curve
FF: fill factor, MPP/AP
P_max: the precision corresponding with MPP
R_max: the recall corresponding with MPP
Score: the class score corresponding with MPP
A good project which help understand the method of calculating mAP.

Demo

from pycocotools.coco import COCO
from cocoeval import SelfEval
coco = COCO('D:/Data/coco2017/annotations/instances_val2017.json')

coco_dt = coco.loadRes('all_detections.json')
bbox_eval = SelfEval(coco, coco_dt, all_points=True, iou_type='bbox')
bbox_eval.evaluate()
bbox_eval.accumulate()
bbox_eval.summarize()
bbox_eval.draw_curve()

segm_eval = SelfEval(coco, coco_dt, all_points=True, iou_type='segmentation')
segm_eval.evaluate()
segm_eval.accumulate()
segm_eval.summarize()
segm_eval.draw_curve()
  • You can pass your own "result.json" to it to measure the mAP.
  • For "all_points=False", a total of 101 points on PR curve are calculated, which is what the official COCO API does.
  • For "all_points=True", all the points on PR curve are calculated, so you can get the most accurate value.
  • Note that, for mAP, with "all_points=False", you can get the same value as the official COCO API does, and the most accurate value with "all_points=True". But for AR, there's always a minor difference because of a different calculation method.

coco_improved's People

Contributors

feiyuhuahuo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.