ds--8600使用手册_我如何用57行代码复制一个价值8600万美元的项目

ds--8600使用手册

by Tait Brown

泰特·布朗(Tait Brown)

我如何用57行代码复制一个价值8600万美元的项目 (How I replicated an $86 million project in 57 lines of code)

当使用现有开源技术进行的实验做得“足够好”时 (When an experiment with existing open source technology does a “good enough” job)

The Victoria Police are the primary law enforcement agency of Victoria, Australia. With over 16,000 vehicles stolen in Victoria this past year — at a cost of about $170 million — the police department is experimenting with a variety of technology-driven solutions to crackdown on car theft. They call this system BlueNet.

维多利亚州警察局是澳大利亚维多利亚州的主要执法机构。 去年,维州有超过16,000辆汽车被盗,费用约为1亿7千万美元,警察局正在尝试各种技术驱动的解决方案,以打击汽车盗窃。 他们称此系统为BlueNet。

To help prevent fraudulent sales of stolen vehicles, there is already a VicRoads web-based service for checking the status of vehicle registrations. The department has also invested in a stationary license plate scanner — a fixed tripod camera which scans passing traffic to automatically identify stolen vehicles.

为了帮助防止欺诈性地销售被盗车辆,已经有了基于VicRoads 的基于Web的服务,用于检查车辆注册状态。 该部门还投资了固定的车牌扫描仪-固定的三脚架摄像头,该摄像头可以扫描过往的交通以自动识别被盗车辆。

Don’t ask me why, but one afternoon I had the desire to prototype a vehicle-mounted license plate scanner that would automatically notify you if a vehicle had been stolen or was unregistered. Understanding that these individual components existed, I wondered how difficult it would be to wire them together.

不要问我为什么,但是有一个下午,我希望制作一个原型的车牌扫描仪,可以自动通知您车辆是否被盗或未注册。 了解了这些单个组件的存在之后,我想知道将它们连接在一起会有多么困难。

But it was after a bit of googling that I discovered the Victoria Police had recently undergone a trial of a similar device, and the estimated cost of roll out was somewhere in the vicinity of $86,000,000. One astute commenter pointed out that the $86M cost to fit out 220 vehicles comes in at a rather thirsty $390,909 per vehicle.

但是经过一番谷歌搜索之后,我发现维多利亚警察局最近对类似设备进行了审判,估计推出费用约为8600万美元。 一位精明的评论员指出,安装220辆汽车需要花费8,600万美元,每辆汽车要390,909美元

Surely we can do a bit better than that.

当然,我们可以做得更好。

成功标准 (The Success Criteria)

Before getting started, I outlined a few key requirements for product design.

在开始之前,我概述了产品设计的一些关键要求。

要求#1:必须在本地执行图像处理 (Requirement #1: The image processing must be performed locally)

Streaming live video to a central processing warehouse seemed the least efficient approach to solving this problem. Besides the whopping bill for data traffic, you’re also introducing network latency into a process which may already be quite slow.

将实时视频流传输到中央处理仓库似乎是解决此问题的效率最低的方法。 除了巨额的数据流量费用外,您还将网络延迟引入可能已经很慢的过程中。

Although a centralized machine learning algorithm is only going to get more accurate over time, I wanted to learn if an local on-device implementation would be “good enough”.

尽管集中式机器学习算法只会随着时间的流逝而变得更加准确,但我想了解一下本地设备上的实现是否“足够好”。

要求#2:必须处理低质量的图像 (Requirement #2: It must work with low quality images)

Since I don’t have a Raspberry Pi camera or USB webcam, so I’ll be using dashcam footage — it’s readily available and an ideal source of sample data. As an added bonus, dashcam video represents the overall quality of footage you’d expect from vehicle mounted cameras.

由于我没有Raspberry Pi摄像头或USB网络摄像头,因此我将使用行车记录仪素材-它随时可用,并且是示例数据的理想来源。 另外,行车记录仪视频代表了车载摄像机所期望的整体录像质量。

要求#3:必须使用开源技术构建 (Requirement #3: It needs to be built using open source technology)

Relying upon a proprietary software means you’ll get stung every time you request a change or enhancement — and the stinging will continue for every request made thereafter. Using open source technology is a no-brainer.

依靠专有软件意味着您每次请求更改或增强功能时都会感到刺痛-并且此后每次提出的请求都会继续受到刺痛。 使用开源技术是理所当然的。

我的解决方案 (My solution)

At a high level, my solution takes an image from a dashcam video, pumps it through an open source license plate recognition system installed locally on the device, queries the registration check service, and then returns the results for display.

从较高的角度来看,我的解决方案从行车记录仪视频中获取图像,将其通过设备上本地安装的开源车牌识别系统进行泵送,查询注册检查服务,然后返回结果进行显示。

The data returned to the device installed in the law enforcement vehicle includes the vehicle’s make and model (which it only uses to verify whether the plates have been stolen), the registration status, and any notifications of the vehicle being reported stolen.

返回到安装在执法车辆中的设备的数据包括车辆的品牌和型号(仅用于验证车牌是否已被盗),注册状态以及有关被举报车辆被盗的任何通知。

If that sounds rather simple, it’s because it really is. For example, the image processing can all be handled by the openalpr library.

如果听起来很简单,那是因为确实如此。 例如,图像处理都可以由openalpr库处理。

This is really all that’s involved to recognize the characters on a license plate:

这实际上就是识别车牌上字符的全部工作:

A Minor Caveat

小警告

Here’s what the dirtiness of my proof-of-concept scraping looks like:

这就是我的概念验证刮擦的肮脏外观:

结果 (Results)

I must say I was pleasantly surprised.

我必须说我很惊喜。

I expected the open source license plate recognition to be pretty rubbish. Additionally, the image recognition algorithms are probably not optimised for Australian license plates.

我希望开放源代码的车牌识别非常垃圾。 此外,图像识别算法可能未针对澳大利亚车牌进行优化。

The solution was able to recognise license plates in a wide field of view.

该解决方案能够在广泛的视野中识别车牌。

Although, the solution would occasionally have issues with particular letters.

虽然,该解决方案有时会遇到特定字母的问题。

But … the solution would eventually get them correct.

但是……解决方案最终将使它们正确。

As you can see in the above two images, processing the image a couple of frames later jumped from a confidence rating of 87% to a hair over 91%.

如您在上面的两个图像中看到的那样,处理图像几帧之后,其置信度从87%跃升至超过91%的头发。

I’m confident, pardon the pun, that the accuracy could be improved by increasing the sample rate, and then sorting by the highest confidence rating. Alternatively a threshold could be set that only accepts a confidence of greater than 90% before going on to validate the registration number.

双关语,我有信心可以通过增加采样率,然后按最高置信度进行排序来提高准确性。 或者,可以设置一个阈值,以便在继续验证注册号之前仅接受大于90%的置信度。

Those are very straight forward code-first fixes, and don’t preclude the training of the license plate recognition software with a local data set.

这些是非常直接的代码优先修复程序,并且不排除使用本地数据集训练车牌识别软件的情况。

86,000,000美元的问题 (The $86,000,000 Question)

To be fair, I have absolutely no clue what the $86M figure includes — nor can I speak to the accuracy of my open source tool with no localized training vs. the pilot BlueNet system.

公平地讲,我绝对不知道这笔8600万美元的数字所包含的内容-我也不能说我的开源工具的准确性,而没有经过本地化的培训而没有试点BlueNet系统。

I would expect part of that budget includes the replacement of several legacy databases and software applications to support the high frequency, low latency querying of license plates several times per second, per vehicle.

我希望其中的一部分预算包括更换多个旧数据库和软件应用程序,以支持每辆车每秒几次频繁,低延迟地查询车牌。

On the other hand, the cost of ~$391k per vehicle seems pretty rich — especially if the BlueNet isn’t particularly accurate and there are no large scale IT projects to decommission or upgrade dependent systems.

另一方面,每辆车约39.1万美元的成本似乎相当昂贵-尤其是在BlueNet并非特别准确且没有大规模的IT项目来停用或升级依赖系统的情况下。

未来的应用 (Future Applications)

While it’s easy to get caught up in the Orwellian nature of an “always on” network of license plate snitchers, there are many positive applications of this technology. Imagine a passive system scanning fellow motorists for an abductors car that automatically alerts authorities and family members to their current location and direction.

尽管很容易陷入车牌窃听器“始终在线”网络的奥威尔式本质中,但该技术有许多积极的应用。 想象一下一个无源系统,它会扫描同行的驾驶员以寻找绑架者的汽车,该汽车会自动提醒当局和家人其当前位置和方向。

Teslas vehicles are already brimming with cameras and sensors with the ability to receive OTA updates — imagine turning these into a fleet of virtual good samaritans. Ubers and Lyft drivers could also be outfitted with these devices to dramatically increase the coverage area.

特斯拉的车辆已经充满了能够接收OTA更新的摄像头和传感器-想象将它们变成一批虚拟的好心人。 Uber和Lyft驾驶员也可以配备这些设备,以大大增加覆盖范围。

Using open source technology and existing components, it seems possible to offer a solution that provides a much higher rate of return — for an investment much less than $86M.

使用开源技术和现有组件,似乎有可能提供一种解决方案,该解决方案可以提供更高的回报率-投资额远低于8600万美元。

Part 2 — I’ve published an update, in which I test with my own footage and catch an unregistered vehicle, over here:

第2部分 -我发布了一个更新,其中我用自己的镜头进行测试,并在此处找到未注册的车辆:

Remember that $86 million license plate scanner I replicated? Here’s what happened next.Successes, failures, and catching one very naughty drivermedium.freecodecamp.org

还记得我复制的价值8600万美元的车牌扫描仪吗? 这是接下来发生的事情。 成功,失败和追赶一种非常顽皮的驱动程序 medium.freecodecamp.org

翻译自: https://www.freecodecamp.org/news/how-i-replicated-an-86-million-project-in-57-lines-of-code-277031330ee9/

ds--8600使用手册

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值