tensorflow detection model zoo:
在這個鏈接當中哦有訓練好的checkpoint:
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
這里的模型是基於COCO dataset, Kitti dataset, Oepn Images dataset訓練好的模型,這些模型都可以用 out-of-the-box inference, 如果需要預測的類別都存在於COCO或者是open images當中。利用這些模型作為初始化模型來訓練新的數據集也是很好的。
每個pre-trained model 都包含以下的內容
- model name, 和用來訓練這個模型的samples/configs 文件目錄(這里說的是research/object_detection/目錄之下)config file對應的用來訓練這個模型的。
- tar.gz下載鏈接
- model speed: 與硬件相關,也與模型的版本相關
- detector 性能。基於mAP measure,越高越好
- 輸出types(Boxes, Masks)
un-tar file 可以通過
tar -xzvf ssd_mobilenet_v1_coco.tar.gz
在每個解壓文件中可以找到:
- graph proto(graph.pbtxt)
- checkpoint (model.ckpt.data-00000-of-00001, model.ckpt.index, model.ckpt.meta)
- frozen graph proto,在這個圖中,所有的權重的值都是通過constant形式存在的,所以不會在訓練的過程中被update(frozen_inference_graph.pb),這個文件可以被載入用來作為out of the box inference(可以在jupyter notebook中實現)
- config file(pipline.config)用來產生graph,對應上面提到的configs文件目錄里面的同名文件,但是通常會修改score threshold。在一些heavier Faster R-CNN的模型當中,也會提供為了達到期望速度的而大量減少了proposals數目(這里應該指的就是候選的區域)的版本。
frozen inference graphs的備注:
(AP:average precison: 是precision/recall curve的總結,$$ AP = \frac{1}{11} \sum_{r \in {0,0.1,0.2,...,1} }P_{interp}(r) $$, 對應在recall=[0,0.1,...1]的時候,precision的均值。
- 當利用frozen inference graphs來評估的時候,結果會比官方提供哦的數據要低一點,因為在創建frozen graph的時候,丟棄了一些scores低於一個閾值(一般是0.3)的檢測。這樣有效的對應在detector的precision recall curve中選擇合適的點(並且丟棄在這個點過去的部分)(這里的意思值得是在precision recall curve中選擇一個合適得點,丟掉precision小於這個閾值得樣本嘛?),但是這樣會對標准得mAP得metric有副作用。
- 官方提示,這個frozen inference graph是基於Tensorflow v1.5.0版本得release,不能保證兼容於其他的版本。但是可以自己重新運行exporter部分來重新生成frozen inference graph。
這里基於COCO數據集的與訓練的model有:
ssd_mobilenet_v1,v2, ssdlite_mobilenet_v2, ssd_inception_v2, fast_RCNN基於resetnet,inception的,詳情參見上面的鏈接
kitti數據集只有一個與訓練模型
基於resnet101的faster_RCNN的model
open_image模型”
faster_rcnn de inception和resnet的集合
還有ava-model(這一部分不知道是什么)
基於resnet101的faster_RCNN的model