入门
安卓
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帐户