入門
安卓
Raspberry Pi(Raspbian OS),Linux,Nvidia Jetson,Windows等
得到幫助
在線網絡演示,網址為https://www.doubango.org/webapps/alpr/
https://www.doubango.org/sdks/anpr/docs/
支持語言(API): C ++ , C# , Java和Python
開源計算機視覺庫:https://github.com/doubangotelecom/compv
關鍵字: Image Enhancement for Night-Vision (IENV) , License Plate Recognition (LPR) , License Plate Country Identification (LPCI) , Vehicle Color Recognition (VCR) ), Vehicle Make Model Recognition (VMMR) , Vehicle Body Style Recognition (VBSR) ,車輛方向跟踪(VDT)和Vehicle Speed Estimation (VSE) Vehicle Direction Tracking (VDT)
您是否曾經見過基於深度學習的ANPR/ALPR(自動號碼/車牌識別)發動機,在$ 99的ARM設備(Khadas Vim3,720p視頻分辨率)上運行64fps ?
UltimateAlpr是您在市場上找到的最快的ANPR/ALPR實施。快速很重要,但準確是至關重要的。
我們使用最先進的深度學習技術來提供無與倫比的準確性和精確度。作為比較,這比Android上的OpenAlpr快33倍。 (有關更多信息,請參見基準部分)。
不需要特殊或專用的GPU,一切都在CPU上運行,具有SIMD ARM霓虹燈優化,定點數學操作和多線程。這為跑步的可能性打開了大門,該跑步完全由相機上的(智能運輸系統)解決方案提供,而無需徵求雲。能夠在設備上運行所有應用程序將大大降低獲取,部署和維護此類系統的成本。請檢查基於設備的基於雲的解決方案部分,以獲取有關如何降低成本的更多信息。
下一個視頻顯示在Windows上運行的識別器樣本:
由於CUDA,NVIDIA TENSORRT和INTEL OPERVINO,該代碼在CPU , GPU , VPU和FPGA上加速了。
除車牌識別(LPR)外,我們還支持夜視(IENV),車牌國家識別(LPCI),車輛顏色識別(VCR),車輛製造型號識別(VMMR),車輛體型識別(VBSR),車輛方向跟踪(VDT)和車輛速度估算(VSE)(VSE)的圖像增強。
在Tesla V100(Tesla v100)的高端NVIDIA GPU上,幀速率為315 fps,意味著3.17毫秒的推理時間。在Intel Xeon等高端CPU上,得益於OpenVino,最大幀速率可能高達237fps 。在像Raspberry Pi 4這樣的低端CPU上,平均幀速率為12fps 。
不要說出我們的諾言,請檢查我們的實施。無需註冊,許可密鑰或Internet連接,只需克隆代碼並開始編碼/測試即可。一切都在設備上運行,沒有數據離開您的計算機。此處發布的代碼配備了許多用於使用Android,Raspberry Pi,Linux和Windows的現成樣品,以幫助您輕鬆啟動。
您還可以在開始使用SDK之前檢查我們的在線基於雲的實現(無需註冊),以查看準確性和精度。
請在https://www.doubango.org/sdks/anpr/docs/上查看完整文檔
SDK在許多平台上工作,並支持許多編程語言,但下一節專注於Android,Raspberry Pi,Linux和Windows。
下一個部分是關於Android和Java API。
源代碼帶有#4 Android示例應用程序:基準,視頻平行,VideSosequential和ImagesNAP。
此應用程序用於檢查所有內容都可以,並且運行速度盡可能快地運行。可以使用此應用程序檢查有關最大幀速率(Intel Xeon上的237fps ,Khadas Vim3上的64fps和12fps )的信息。它是開源的,不需要註冊或許可密鑰。
任何開發人員都應將該應用程序用作參考代碼,以將UltiMateAlpr添加到其產品中。它顯示瞭如何使用相機實時視頻流實時檢測和識別車牌。請檢查並行與順序處理部分,以獲取有關Parellel模式的更多信息。
與視頻平行相同,但在順序模式下工作,這意味著較慢。提供此應用程序以簡化比較模式:並行與順序。
該應用程序讀取並顯示來自相機的實時視頻流,但僅識別按需流中的圖像。
在Android上嘗試示例應用程序:
打開Android Studio,然後選擇“打開現有的Android Studio項目”
導航到UltimatealPr-SDK/樣本,選擇Android文件夾,然後單擊“確定”
選擇您要嘗試的示例(例如視頻平行),然後按Run 。確保將設備處於景觀模式上,以獲得更好的體驗。
SDK作為Android Studio模塊分發,您可以將其添加為參考,也可以構建它並將AAR添加到項目中。但是,將SDK添加到項目的最簡單方法是直接包括來源。
在您的build.gradle文件中添加:
android {
# This is the block to add within "android { } " section
sourceSets {
main {
jniLibs . srcDirs + = [ 'path-to-your-ultimateALPR-SDK/binaries/android/jniLibs' ]
java . srcDirs + = [ 'path-to-your-ultimateALPR-SDK/java/android' ]
assets . srcDirs + = [ 'path-to-your-ultimateALPR-SDK/assets/models' ]
}
}
}當您嘗試使用API時,很難丟失,因為只有3個有用的功能:Init,Process和Deinit。
C ++ API在此處定義。
import org . doubango . ultimateAlpr . Sdk . ULTALPR_SDK_IMAGE_TYPE ;
import org . doubango . ultimateAlpr . Sdk . UltAlprSdkEngine ;
import org . doubango . ultimateAlpr . Sdk . UltAlprSdkParallelDeliveryCallback ;
import org . doubango . ultimateAlpr . Sdk . UltAlprSdkResult ;
final static String CONFIG = "{" +
" " debug_level " : " info " ," +
" " gpgpu_enabled " : true," +
" " openvino_enabled " : true," +
" " openvino_device " : " CPU " ," +
" " detect_minscore " : 0.1," +
" " detect_quantization_enabled " : true," +
" " pyramidal_search_enabled " : true," +
" " pyramidal_search_sensitivity " : 0.28," +
" " pyramidal_search_minscore " : 0.5," +
" " pyramidal_search_quantization_enabled " : true," +
" " klass_lpci_enabled " : true," +
" " klass_vcr_enabled " : true," +
" " klass_vmmr_enabled " : true," +
" " recogn_score_type " : " min " ," +
" " recogn_minscore " : 0.3," +
" " recogn_rectify_enabled " : false," +
" " recogn_quantization_enabled " : true" +
"}" ;
/**
* Parallel callback delivery function used to notify about new results.
* This callback will be called few milliseconds (before next frame is completely processed)
* after process function is called.
*/
static class MyUltAlprSdkParallelDeliveryCallback extends UltAlprSdkParallelDeliveryCallback {
@ Override
public void onNewResult ( UltAlprSdkResult result ) { }
}
final MyUltAlprSdkParallelDeliveryCallback mCallback = new MyUltAlprSdkParallelDeliveryCallback (); // set to null to disable parallel mode
@ Override
protected void onCreate ( Bundle savedInstanceState ) {
super . onCreate ( savedInstanceState );
// Initialize the engine
assert UltAlprSdkEngine . init (
getAssets (),
CONFIG ,
mCallback
). isOK ();
}
// Camera listener: https://developer.android.com/reference/android/media/ImageReader.OnImageAvailableListener
final ImageReader . OnImageAvailableListener mOnImageAvailableListener = new ImageReader . OnImageAvailableListener () {
@ Override
public void onImageAvailable ( ImageReader reader ) {
try {
final Image image = reader . acquireLatestImage ();
if ( image == null ) {
return ;
}
// ANPR/ALPR recognition
final Image . Plane [] planes = image . getPlanes ();
final UltAlprSdkResult result = UltAlprSdkEngine . process (
ULTALPR_SDK_IMAGE_TYPE . ULTALPR_SDK_IMAGE_TYPE_YUV420P ,
planes [ 0 ]. getBuffer (),
planes [ 1 ]. getBuffer (),
planes [ 2 ]. getBuffer (),
image . getWidth (),
image . getHeight (),
planes [ 0 ]. getRowStride (),
planes [ 1 ]. getRowStride (),
planes [ 2 ]. getRowStride (),
planes [ 1 ]. getPixelStride ()
);
assert result . isOK ();
image . close ();
} catch ( final Exception e ) {
e . printStackTrace ();
}
}
};
@ Override
public void onDestroy () {
// DeInitialize the engine
assert UltAlprSdkEngine . deInit (). isOK ();
super . onDestroy ();
}同樣,請檢查示例應用程序中的Android,Raspberry Pi,Linux和Windows以及完整文檔以獲取更多信息。
源代碼帶有#2 C ++示例應用程序:基準和識別器。這些示例應用程序可在所有受支持的平台上使用: Android , Windows , Raspberry Pi , iOS , OSX , Linux ...
此應用程序用於檢查所有內容都可以,並且運行速度盡可能快地運行。有關最大幀速率(Intel Xeon上的237fps ,Snapdragon 855上的47FPS ,Jetson NX上的152FPS ,Khadas Vim3上的64fps ,Jetson Nano上的64fps ,Raspberry Pi 4上的30fps )可以使用此應用程序進行檢查。它是開源的,不需要註冊或許可密鑰。
有關如何構建和運行此樣本的更多信息,請檢查樣本/C ++/基準測試。
這是一個命令行應用程序,用於檢測和識別來自任何JPEG/PNG/BMP圖像的車牌。
有關如何構建和運行此樣本的更多信息,請檢查:
C ++ API在https://www.doubango.org/sdks/anpr/docs/cpp-api.html上定義。
# include < ultimateALPR-SDK-API-PUBLIC.h > // Include the API header file
// JSON configuration string
// More info at https://www.doubango.org/SDKs/anpr/docs/Configuration_options.html
static const char * __jsonConfig =
" { "
" " debug_level " : " info " , "
" " debug_write_input_image_enabled " : false, "
" " debug_internal_data_path " : " . " , "
" "
" " num_threads " : -1, "
" " gpgpu_enabled " : true, "
" " openvino_enabled " : true, "
" " openvino_device " : " CPU " , "
" "
" " detect_roi " : [0, 0, 0, 0], "
" " detect_minscore " : 0.1, "
" "
" " pyramidal_search_enabled " : true, "
" " pyramidal_search_sensitivity " : 0.28, "
" " pyramidal_search_minscore " : 0.3, "
" " pyramidal_search_min_image_size_inpixels " : 800, "
" "
" " klass_lpci_enabled " : true, "
" " klass_vcr_enabled " : true, "
" " klass_vmm_enabled " : true, "
" "
" " recogn_minscore " : 0.3, "
" " recogn_score_type " : " min " "
" } " ;
// Local variable
UltAlprSdkResult result;
// Initialize the engine (should be done once)
ULTALPR_SDK_ASSERT ((result = UltAlprSdkEngine::init(
__jsonConfig
)).isOK());
// Processing (detection + recognition)
// Call this function for every video frame
const void * imageData = nullptr ;
ULTALPR_SDK_ASSERT ((result = UltAlprSdkEngine::process(
ULTMICR_SDK_IMAGE_TYPE_RGB24,
imageData,
imageWidth,
imageHeight
)).isOK());
// DeInit
// Call this function before exiting the app to free the allocate resources
// You must not call process() after calling this function
ULTALPR_SDK_ASSERT ((result = UltAlprSdkEngine::deInit()).isOK());同樣,請檢查示例應用程序以獲取有關如何使用API的更多信息。
請檢查我們的討論小組或Twitter帳戶