開源代碼:https://github.com/zhongqianli/iris_detector
文章目錄
如何用SSD訓練虹膜檢測模型
網絡設計
ResNet10-SSD
使用4個殘差模塊作爲base network, 然後添加SSD的extra layers.
Visualization of network structure (tools from ethereon)
http://ethereon.github.io/netscope/#/gist/bc73857987941a56bc45bf4c4ae870b0
ResNet10-SSD-Half
和前面的ResNet10-SSD結構一樣,當濾波器的數量大於32時,將其減半.
網絡結構可視化 (tools from ethereon)
http://ethereon.github.io/netscope/#/gist/cf4dccec1f9a6c8f3f125000cd7b97f9
MobileNet-SSD
見 https://github.com/chuanqi305/MobileNet-SSD
網絡結構可視化 (tools from ethereon)
http://ethereon.github.io/netscope/#/gist/e1e8c3c3a450f0502ef8ff6547d5dedb
實驗
我們的iris dataset包含12800個訓練樣本和3200個測試樣本。在GTX1080Ti上訓練。在Intel i5 CPU和GTX1080Ti GPU上測試。
速度測試結果
ResNet10-SSD-half比其他兩個網絡都快。
Network | mAP | Speed on Intel i5 CPU(ms) | Speed on GTX1080Ti(ms) | Input resolution |
---|---|---|---|---|
ResNet10-SSD | 1.0 | 20 | 13 | 640x480 |
ResNet10-SSD-Half | 1.0 | 10 | 7 | 640x480 |
MobileNet+SSD | - | 27 | 18 | 640x480 |
ResNet10-SSD
模型訓練
detection_eval = 1
模型測試
Intel i5 CPU
-
opencv3.4 Python測試結果:
-
opencv3.4 C++測試結果:
GTX1080Ti GPU
ResNet10-SSD-Half
模型訓練
detection_eval = 1
模型測試
Intel i5 CPU
opencv3.4 Python測試結果:
opencv3.4 C++ 測試結果:
GTX1080Ti GPU
MobileNet-SSD
模型測試
我們只測試了mobilenet_300x300_ssd_iter_3000.caffemodel. 速度比ResNet10-SSD慢很多,所以我們不再繼續訓練下去。