Module Import alias identifier Import alias Import alias Import alias identifier FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore Dict Assign SubscriptStore NameLoad Index Str AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign SubscriptStore NameLoad Index Str AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str ListLoad Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr Call NameLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr Num Num Num body If CompareEq Call AttributeLoad NameLoad attr CompareGtE NameLoad NameLoad Num body Assign NameStore Num orelse Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index CompareGtE NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpDiv NameLoad Num orelse Assign NameStore Call AttributeLoad NameLoad attr TupleLoad ListLoad Num NameLoad ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad ListLoad Num NameLoad ListLoad Num For NameStore Call NameLoad BinOpSub AttributeLoad NameLoad attr Num Num Num body Assign SubscriptStore NameLoad Index BinOpSub NameLoad Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index BinOpSub NameLoad Num SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr CompareNotEq SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Index Num Assign NameStore Call AttributeLoad NameLoad attr BinOpMult BinOpSub SubscriptLoad NameLoad Index BinOpAdd NameLoad Num SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Dict For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareEq BinOpMod NameLoad Num Num body Print Call AttributeLoad Str attr BinOpAdd NameLoad Num Call NameLoad NameLoad Print Call AttributeLoad Str attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Assign NameStore Num For NameStore NameLoad body Assign NameStore ListComp NameLoad comprehension NameStore SubscriptLoad NameLoad Index NameLoad CompareEq SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpMult ListLoad NameLoad Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Call NameLoad UnaryOpInvert NameLoad Assign SubscriptStore NameLoad Index NameLoad Dict Str Str Str NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListComp Call AttributeLoad Call AttributeLoad NameLoad attr attr Str comprehension NameStore NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call NameLoad SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp ListComp Call NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr UnaryOpUSub NameLoad Assign NameStore Call AttributeLoad NameLoad attr UnaryOpUSub NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Index NameLoad Slice Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Index NameLoad Slice attr NameLoad Assign NameStore UnaryOpUSub AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad If CompareGt AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpSub NameLoad NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpSub NameLoad NameLoad Num Num Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpSub BinOpAdd BinOpMult BinOpAdd BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num BinOpAdd BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num BinOpMult BinOpAdd BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num Num BinOpAdd BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num Num NameLoad Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body If UnaryOpNot SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad body If UnaryOpNot SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad body Assign SubscriptStore NameLoad Index NameLoad Num Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Num orelse Assign SubscriptStore NameLoad Index NameLoad Num orelse Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A xml.etree.ElementTree ET N/A os N/A cPickle N/A numpy np parse_rec N/A N/A filename N/A N/A N/A  Parse a PASCAL VOC xml file  N/A tree N/A N/A ET parse filename N/A objects N/A N/A obj N/A N/A tree findall object N/A N/A obj_struct N/A N/A N/A obj_struct N/A name N/A N/A N/A obj find name text N/A N/A obj_struct N/A pose N/A N/A N/A obj find pose text N/A N/A obj_struct N/A truncated N/A int N/A N/A N/A obj find truncated text N/A N/A obj_struct N/A difficult N/A int N/A N/A N/A obj find difficult text N/A bbox N/A N/A obj find bndbox N/A N/A obj_struct N/A bbox N/A N/A int N/A N/A N/A bbox find xmin text N/A int N/A N/A N/A bbox find ymin text N/A int N/A N/A N/A bbox find xmax text N/A int N/A N/A N/A bbox find ymax text N/A N/A N/A objects append obj_struct N/A objects N/A voc_ap N/A N/A rec prec use_07_metric N/A False N/A N/A  ap = voc_ap(rec, prec, [use_07_metric])
    Compute VOC AP given precision and recall.
    If use_07_metric is true, uses the
    VOC 07 11 point method (default:False).
     N/A use_07_metric N/A N/A ap 0.0 N/A t N/A N/A np arange 0.0 1.1 0.1 N/A N/A N/A N/A N/A np sum N/A rec t 0 N/A N/A p 0 N/A N/A p N/A N/A np max N/A prec N/A N/A rec t N/A ap N/A ap N/A p 11.0 N/A N/A mrec N/A N/A np concatenate N/A N/A 0.0 rec N/A 1.0 N/A mpre N/A N/A np concatenate N/A N/A 0.0 prec N/A 0.0 N/A i N/A range N/A N/A mpre size 1 0 -1 N/A N/A N/A mpre N/A N/A i 1 N/A N/A np maximum N/A mpre N/A N/A i 1 N/A mpre N/A i N/A i N/A N/A N/A np where N/A N/A mrec N/A 1 N/A mrec N/A -1 N/A 0 N/A ap N/A N/A np sum N/A N/A N/A mrec N/A N/A i 1 N/A mrec N/A i N/A mpre N/A N/A i 1 N/A ap N/A voc_eval N/A N/A detpath annopath imagesetfile classname cachedir ovthresh use_07_metric N/A 0.5 False N/A N/A rec, prec, ap = voc_eval(detpath,
                                annopath,
                                imagesetfile,
                                classname,
                                [ovthresh],
                                [use_07_metric])

    Top level function that does the PASCAL VOC evaluation.

    detpath: Path to detections
        detpath.format(classname) should produce the detection results file.
    annopath: Path to annotations
        annopath.format(imagename) should be the xml annotations file.
    imagesetfile: Text file containing the list of images, one image per line.
    classname: Category name (duh)
    cachedir: Directory for caching the annotations
    [ovthresh]: Overlap threshold (default = 0.5)
    [use_07_metric]: Whether to use VOC07's 11 point AP computation
        (default False)
     N/A N/A N/A N/A N/A os path isdir cachedir N/A N/A N/A N/A os mkdir cachedir N/A cachefile N/A N/A N/A os path join cachedir annots.pkl N/A N/A open imagesetfile r f N/A N/A lines N/A N/A f readlines N/A imagenames N/A N/A N/A x strip N/A x lines N/A N/A N/A N/A N/A os path isfile cachefile N/A N/A recs N/A N/A N/A i imagename N/A enumerate imagenames N/A N/A N/A recs N/A imagename N/A parse_rec N/A N/A annopath format imagename N/A N/A N/A i 100 0 N/A N/A N/A N/A Reading annotation for {:d}/{:d} format N/A i 1 N/A len imagenames N/A N/A N/A Saving cached annotations to {:s} format cachefile N/A N/A open cachefile w f N/A N/A N/A N/A cPickle dump recs f N/A N/A N/A open cachefile r f N/A N/A recs N/A N/A cPickle load f N/A class_recs N/A N/A npos 0 N/A imagename imagenames N/A N/A R N/A obj N/A obj N/A recs N/A imagename N/A N/A obj N/A name classname N/A bbox N/A N/A np array N/A N/A x N/A bbox N/A x R N/A difficult N/A N/A N/A N/A np array N/A N/A x N/A difficult N/A x R astype N/A np bool N/A det N/A N/A False N/A len R N/A npos N/A npos N/A sum N/A difficult N/A N/A class_recs N/A imagename N/A bbox difficult det bbox difficult det N/A detfile N/A N/A detpath format classname N/A N/A open detfile r f N/A N/A lines N/A N/A f readlines N/A splitlines N/A N/A N/A N/A N/A x strip split N/A x lines N/A image_ids N/A N/A x N/A 0 N/A x splitlines N/A confidence N/A N/A np array N/A N/A float N/A x N/A 1 N/A x splitlines N/A BB N/A N/A np array N/A N/A N/A float z N/A z N/A x N/A 2 N/A x splitlines N/A sorted_ind N/A N/A np argsort N/A confidence N/A sorted_scores N/A N/A np sort N/A confidence N/A BB N/A BB N/A N/A sorted_ind N/A N/A image_ids N/A N/A image_ids N/A x N/A x sorted_ind N/A nd N/A len image_ids N/A tp N/A N/A np zeros nd N/A fp N/A N/A np zeros nd N/A d N/A range nd N/A N/A R N/A class_recs N/A N/A image_ids N/A d N/A bb N/A N/A N/A BB N/A N/A d N/A astype float N/A ovmax N/A N/A np inf N/A BBGT N/A N/A N/A R N/A bbox astype float N/A N/A N/A BBGT size 0 N/A N/A ixmin N/A N/A np maximum N/A BBGT N/A N/A N/A 0 N/A bb N/A 0 N/A iymin N/A N/A np maximum N/A BBGT N/A N/A N/A 1 N/A bb N/A 1 N/A ixmax N/A N/A np minimum N/A BBGT N/A N/A N/A 2 N/A bb N/A 2 N/A iymax N/A N/A np minimum N/A BBGT N/A N/A N/A 3 N/A bb N/A 3 N/A iw N/A N/A np maximum N/A N/A ixmax ixmin 1.0 0.0 N/A ih N/A N/A np maximum N/A N/A iymax iymin 1.0 0.0 N/A inters N/A iw ih N/A uni N/A N/A N/A N/A N/A N/A bb N/A 2 N/A bb N/A 0 1.0 N/A N/A N/A bb N/A 3 N/A bb N/A 1 1.0 N/A N/A N/A N/A BBGT N/A N/A N/A 2 N/A BBGT N/A N/A N/A 0 1.0 N/A N/A N/A BBGT N/A N/A N/A 3 N/A BBGT N/A N/A N/A 1 1.0 inters N/A overlaps N/A inters uni N/A ovmax N/A N/A np max overlaps N/A jmax N/A N/A np argmax overlaps N/A N/A ovmax ovthresh N/A N/A N/A N/A N/A R N/A difficult N/A jmax N/A N/A N/A N/A N/A R N/A det N/A jmax N/A N/A N/A tp N/A d 1.0 N/A N/A N/A R N/A det N/A jmax 1 N/A N/A N/A fp N/A d 1.0 N/A N/A N/A fp N/A d 1.0 N/A fp N/A N/A np cumsum fp N/A tp N/A N/A np cumsum tp N/A rec N/A tp N/A float npos N/A prec N/A tp N/A N/A np maximum N/A tp fp N/A N/A N/A np finfo N/A np float64 eps N/A ap N/A voc_ap rec prec use_07_metric N/A N/A rec prec ap N/A