;; UPDATE: For KITTI users, you may find `br-dired-kitti-label-to-xml' useful
;; Usage for KITTI dataset (M-x means Alt+x):
;; (1) open this file in emacs.
;; (2) modify the above (setq kitti-image-root "/home/user/path-to-kitti-root/training/image/");
;; to your path to KITTI image root
;; (3) Run M-x eval-buffer or (load-file "path-to-your/table-xml.el") to load all the functions in
;; this file as well as the kitti-image-root path (after you have changed it to the correct path).
;; (4) M-x dired (go to label folder of KITTI)
;; (5) `dired-mark' or `dired-mark-files-regexp' function to mark the label files that you want to convert to XML
;; Note: do not mark too many at a time. About 2000 files a time would be good. I experienced some crashes
;; and memory problems with too many files at a time. It's probably due to an emacs internal problem.
;; (6) M-x `br-dired-kitti-label-to-xml'
;; (7) xml files will be created in ./xml folder
;; (optional) change function `etxml-KITTI-print-buffer-to-xml' and etxml-KITTI-dataset-schema to fit
;; your need. Read the below advanced tutorial if you want to know how it works. If you
;; want to customize the output XML file to some other formats, modify etxml-KITTI-dataset-schema
;; variable below.
1 首先在ubuntu下面安裝編輯器emacs :使用命令 sudo apt-get install emacs24
2 運行命令emacs打開程序,打開 exXML_0.47 ,修改KITTI的路徑
3 按下ALT+X,然后輸入 eval-buffer 加載文件中的函數。
4 按下ALT+X ,輸入dired,進入KITTI的label文件夾
5 按下ALT+X 輸入dired-mark或者用 “dired-mark-files-regexp” 正則化匹配文件 (怎么選前2000個還不會)
6 按下ALT+X ,輸入br-dired-kitti-label-to-xml,運行就轉換成功。
這個網址 http://blog.csdn.net/jesse_mx/article/details/65634482 有使用python轉換的教程。
二、 PASCAL VOC 11point 方法
1 首先對所有預測結果進行排序,score分高的排在前面,分數低的排在后面
2 按順序逐個把樣本作為正例進行預測,計算出FP和TP
3 再計算 召回率rec和精度prec
4 按照召回率t從0到1之間每0.1一個點,一共11個點,分別計算大於t的最大精度值p ,然后按照 ap=ap+p/11 ,一共計算11次。
5 ap即為檢測的值,所有的ap平均值為mAP。