庆云古诗词

庆云古诗词

Why did we need custom hardware,and why does it scan the iris?

互联资讯 0

原文链接:

【【网址】】/blog/【【淘密令】】/opening-orb-look-inside-worldcoin-biometric-imaging-device

Given the scope of Worldcoin’s mission, we approach e【【微信】】ounding principles based on privacy, 【【微信】】.

考虑到Worldcoin的使命范围,我们会从隐私、信任和透明度的一系列基本原则出发,处理所有事务。

That’s why we remain committed to open sourcing as much of the technology we create and use as possible. We also want to enable others to develop, 【【微信】】ar devices that integrate with the World ID protocol, with the ultimate goal of fully decentralizing e【【微信】】.

这就是为什么我们一直致力于尽可能开源我们创建和使用的技术。我们也希望能够让其他人开发、构建和运营与World ID协议集成的类似设备,从而最终实现项目的完全去中心化。

The intention of this post is to share specific, substanti【【微信】】dware we’re building. After three years of R&D, we’re excited to showcase the Orb, explain at a high le【【微信】】 corresponding hardware 【【淘密令】】 files. We see this as an important step on our journey to making our commitment to transparency more credible to the global community.

本文的目的是分享我们正在构建的硬件的具体、实质性细节。经过三年的研发,我们很高兴能够展示Orb,高层次地解释它的工作原理,并发布相应的硬件工程文件。我们把这看作是我们向全球社区展示我们对透明度承诺更有可信度的重要一步。

O【【微信】】, we’ll publish more articles explaining other parts of the Orb and the sign-up flow.

在未来几个月中,我们将发布更多的文章,解释Orb的其他部分和注册流程。

When Worldcoin started, we didn’t intend to de【【微信】】, let alone one built for biometric imaging.

当Worldcoin刚开始时,我们并没有打算开发一个物理设备,更不用说一个专为生物识别图像而设计的设备了。

Building custom hardware is difficult and expensive, 【【微信】】f they can avoid it.

构建定制硬件是困难且昂贵的,如果可以避免的话,没有人愿意这样做。

Instead, our goal was to freely distribute a new digital token to e【【微信】】 way to help them access and participate in the global economy.

相反,我们的目标是免费向全世界的每个人分发一种新的数字代币,以帮助他们访问和参与全球经济。

It was only after concluding that biometrics are the sole realistic way of achie【【微信】】 out to create the Orb.

只有在得出生物识别是实现我们目标的唯一现实途径的结论之后,我们才开始创建Orb。

Learn more about the inclusi【【微信】】hy Worldcoin uses them here.

在这里了解更多关于生物识别的包容性以及Worldcoin为什么使用它们的原因。

As we explored many different ways to sol【【微信】】 prove unique personhood, our research showed that iris scanning offers the most accurate biometrics with an acceptable user experience that has been successfully tested at scale.

当我们探索许多不同的方法来解决Sybil防御和证明唯一身份时,我们的研究表明,虹膜扫描提供了最准确的生物识别,并具有可接受的用户体验,已经在大规模测试中成功应用。

This is because the iris has strong fraud resistance and data richness, meaning it can be used to accurately differentiate between billions of uni【【微信】】.

这是因为虹膜具有强大的反欺诈能力和数据丰富性,意味着它可以准确区分数十亿个独特的人类。

The more data rich the biometric marker (e.g., the iris), the fairer and more inclusi【【微信】】.

生物识别标记(例如虹膜)的数据越丰富,系统就越公平和包容。

Importantly, false rejections are not constant but increase with scale.

重要的是,错误拒绝并不是恒定的,而是随着规模增大而增加。

【【微信】】, most systems hit a wall and do not allow anyone new to join.

最终,大多数系统都会遇到瓶颈,不允许任何新人加入。

【【微信】】g technologies with less data richness like FaceID would only be able to accommodate a few million people.

这意味着像FaceID这样数据丰富度较低的现有技术只能容纳几百万人。

Since commercially a【【微信】】evices did not meet our technology or security needs, we spent years de【【微信】】le universal access to the global economy in the most inclusi【【微信】】.

由于商用虹膜成像设备不能满足我们的技术或安全需求,我们花费了多年时间开发自己的设备,以最包容的方式实现对全球经济的普遍访问。

As a first step towards open sourcing the Orb, we’re releasing all relevant, 【【微信】】neering files for its current 【【微信】】ry.

作为向开源Orb迈出的第一步,我们在我们的代码库中发布了所有相关的硬件工程文件,适用于目前版本的Orb。

You can download Eagle (PCBs) to 【【微信】】todesk’s CAD 【【微信】】.

您可以下载Eagle(PCBs)查看文件,并免费使用Autodesk的CAD查看器。

Feedback for design impro【【微信】】ighly encouraged.

欢迎并鼓励对设计改进的反馈。

We’re aware that, by de【【微信】】, we’re advancing state-of-the-art iris biometrics.

我们知道,通过开发Orb,我们正在推进最先进的虹膜生物识别技术。

That’s why all files are published under a license that’s based on the MIT license but prohibits the use of the licensed materials for sur【【微信】】s as well as any other applications that could be harmful to the rights of indi【【微信】】.

这就是为什么所有文件都是根据MIT许可证发布的,但禁止将许可材料用于监视应用程序以及可能损害个*利的任何其他应用程序。

The remainder of the article will go through a teardown of the Orb, with a few 【【淘密令】】 anecdotes included.

本文的剩余部分将介绍Orb的解构过程,并包括一些工程趣闻。

Three years of R&D, including one year of small-scale field testing and one year of transition to manufacturing at scale, ha【【微信】】sion of the Orb.

三年的研发,包括一年的小规模现场测试和一年的向大规模制造的过渡,最终导致了Orb的当前版本。

Today’s Orb represents a precise balance of de【【微信】】, compactness, user experience, cost and at-scale production with minimal compromise being made on imaging 【【微信】】.

今天的Orb代表了在开发速度、紧凑性、用户体验、成本和大规模生产方面的精确平衡,同时最小限度地在图像质量和安全性方面做出妥协。

There will likely be future 【【微信】】ized even further.

未来可能会有更进一步优化的版本。

However, 【【微信】】resents a key milestone that allows us to increase the number of Orbs in the field.

然而,当前版本代表了一个重要的里程碑,使我们能够增加现场Orb的数量。

We’ll now take you through some of the most important 【【淘密令】】 details of the Orb, as well as how the imaging system works.

现在我们将带您了解Orb的一些最重要的工程细节,以及成像系统的工作原理。

For security purposes, we will only explicitly lea【【微信】】 mechanisms that are meant to catch intrusion attempts.

出于安全考虑,我们将明确省略旨在捕获入侵尝试的篡改检测机制。

Fig. 1Orb underneath the shell外壳下的OrbThe Orb consists of two hemispheres separated by the mainboard which is tilted at 23.5°―the angle of the rotational axis of the earth.Orb由两个半球组成,由主板分隔,主板倾斜23.5度――地球的旋转轴的角度。The mainboard holds a powerful computing unit to enable local processing for maximum privacy.主板持有一个强大的计算单元,以实现本地处理,从而实现最大程度的隐私保护。The frontal half of the Orb is dedicated to the sealed optical system.Orb的前半部分专门用于密封的光学系统。The optical system consists of se【【微信】】nsors to verify liveness and a 2D gimbal-enabled narrow field of 【【微信】】igh resolution iris images.光学系统由多个多光谱传感器组成,用于验证活体,并且有一个2D万向节启用的窄视场相机,用于捕获高分辨率的虹膜图像。The other hemisphere is dedicated to the cooling system as well as speakers.另一个半球专门用于冷却系统以及扬声器。An exchangeable battery can be inserted from the bottom to enable uninterrupted operation in a mobile setting.可以从底部插入可更换电池,以实现在移动环境中的不间断运行。

When remo【【微信】】, the mainboard, optical system and cooling system become visible.

当取下外壳时,主板、光学系统和冷却系统变得可见。

Most of the optical system is hidden in an enclosure that, together with the shell, forms a dust- and water-resistant en【【微信】】g-term use even in challenging en【【微信】】.

大部分光学系统隐藏在一个外壳中,与外壳一起形成了防尘和防水环境,以实现在具有挑战性的环境中长期使用。

What you see is a de【【微信】】ed through multiple prototype and design for manufacturing (DFM) iterations.

你看到的是通过多个原型和制造设计(DFM)迭代进行了优化的设备。

Once the shell is removed, 【【微信】】to four core parts:

一旦移除外壳,Orb可以分为四个核心部分:

Front: The optical system

前部:光学系统

Middle: The mainboard separates the de【【微信】】es (note: its inclination is exactly 23.5°, e【【微信】】ation of the rotational axis of the earth)

中部:主板将设备分为两个半球(注意:它的倾斜度正好为23.5度,相当于地球的旋转轴的倾斜度)

Back: The main computing unit as well as the acti【【微信】】

背部:主计算单元以及主动冷却系统

Bottom: An exchangeable battery

底部:可更换电池

Explosion CAD of all rele【【微信】】ousing material removed (e.g. the dust-proof enclosure of the optical system), all rele【【微信】】rb become visible.清晰展示所有关键部件的爆炸CAD图移除外壳材料(例如光学系统的防尘外壳),Orb的所有关键部件都变得可见。This includes the custom lens, which is optimized for both near infrared imaging and fast, durable autofocus.这包括定制镜头,它针对近红外成像和快速、耐用的自动对焦进行了优化。The front of the optical system is sealed by an optical filter to keep dust out and minimize noise from the 【【微信】】imize image quality.光学系统的前部由一个光学滤镜密封,以防止灰尘进入并最小化可见光谱噪声,以优化图像质量。In the back, a plastic component in the otherwise chrome shell allows for optimized antenna placement.在背部,除铬质外壳外的塑料组件可实现天线的优化放置。The chrome shell is co【【微信】】 avoid deterioration of the coating o【【微信】】.铬质外壳由透明外壳覆盖,以避免随着时间的推移涂层的恶化。

We field tested our first prototypes outside the lab as early as possible. Naturally, this taught us many lessons, including:

我们尽早在实验室外进行了首批原型的现场测试。这自然使我们学到了很多经验教训,包括:

With the first prototype, the signup experience was notoriously difficult. O【【微信】】e upgraded the optical system with autofocus and eye tracking such that alignment becomes tri【【微信】】ithin an arm's length of the Orb.

在第一个原型中,注册体验非常困难。一年的时间里,我们升级了光学系统,增加了自动对焦和眼睛追踪功能,使得当人们在Orb的手臂长度范围内时,对准变得非常简单。

No battery we tried would last for a full day on a single charge. So we built a custom exchangeable battery based on 18650 Li-Ion cells―the same form factor as the cells used in a Tesla Model S.

我们试过的所有电池都无法在单次充电中持续一整天。因此,我们构建了一个基于18650锂离子电池的定制可更换电池,该电池的形状与Tesla Model S中使用的电池相同。

The battery consists of 8 cells with 3.7【【微信】】2P configuration (14.8V) 【【微信】】 to 100Wh, which is a limit imposed by regulations related to logistics.

该电池由8个电池单元组成,标称电压为3.7V,采用4S2P配置(14.8V),容量接近100Wh,这是由于物流相关法规限制的容量上限。

Now there’s no limit to Orb uptime.

现在,Orb的运行时间没有限制。

Custom exchangeable batteryThe Orb’s custom battery is made of Li-Ion 18650 cells (the same cells used in many electric cars).Orb的定制电池采用Li-Ion 18650电池单元(许多电动汽车中使用的相同电池单元)。With close to 100Wh, the capacity is optimized for battery lifetime while complying with transportation regulations.容量接近100Wh,经过优化以延长电池寿命并遵守运输法规。A USB-C connector makes recharging con【【微信】】.USB-C连接器使充电变得方便。

The coating of the shell sometimes deteriorated in the handheld use case. Therefore, we added a 2mm clear shell to both optimize 【【微信】】 chrome coating from scratches and other wear.

在手持使用情况下,外壳的涂层有时会发生退化。因此,我们添加了一个2毫米的透明外壳,既可以优化视觉效果,又可以保护铬涂层免受划痕和其他磨损。

To make the user experience more intuitive, especially in loud en【【微信】】 where a person might not be able to hear sound feedback, we added an LED ring to help guide people through the sign-up process.

为了使用户体验更加直观,特别是在嘈杂的环境中,人们可能无法听到声音反馈时,我们添加了一个LED环来帮助人们完成注册过程。

Similarly, we exposed status LEDs next to the only button on the Orb to indicate its current state.

同样地,我们在Orb的唯一按钮旁暴露了状态LED,以指示其当前状态。

Our early field tests taught us that the 【【微信】】eeded to be even simpler than we had anticipated.

我们早期的现场测试让我们意识到,验证过程需要比我们预期的更加简单。

【【微信】】, we first experimented with many approaches.

为了实现这一目标,我们首先尝试了许多方法。

These approaches featured mirrors that allowed people to use their reflection to align with the Orbs imaging system.

这些方法包括使用镜子,让人们利用自己的反射与Orb的成像系统对齐。

However, 【【微信】】 in the lab quickly broke down in the real world.

然而,这些在实验室中表现良好的设计在现实世界中很快就崩溃了。

We ended up building a two-camera system.

最终,我们建立了一个双摄像头系统。

This system featured a wide angle camera and a telephoto camera.

该系统包括一个广角摄像头和一个远摄摄像头。

The cameras had an adjustable ~5° field of 【【微信】】al.

这些摄像头可通过一个二维万向节可调整约5°的视野。

This increased the spatial 【【微信】】 can be successfully completed.

这将验证成功完成的空间范围增加了。

【【微信】】ral orders of magnitude.

这个增加是数个数量级的。

For e


spring framework


ChatGPT 是由 OpenAI 开发的强大语言模型,可以用于生成类似人类的文本。OpenAI API 允许开发人员访问该模型并在其自己的应用程序中使用。在本文中,我们将讨论如何使用 Ja【【微信】】 与 OpenAI API 生成图像。

在开始之前,您需要在 OpenAI 网站 &#【【网址】】/account/api-keys" 上注册 API 密钥。一旦拥有了 API 密钥,就可以开始向 API 发送请求。

要使用 Ja【【微信】】 与 OpenAI API,请使用可以处理 HTTP 请求的库。这方面比较常用的库是 Spring RestTemplate 库。RestTemplate 是一种强大而灵活的库,可以轻松地发送 HTTP 请求并处理响应。

首先,需要将 Spring RestTemplate 库添加到项目中。可以将以下依赖项添加到 build.【【微信】】 文件:

接下来,创建一个处理 API 调用的类。可以使用下面的示例:

这个类使用 Spring RestTemplate 库向?OpenAI API 的生成图像端点发送 POST 请求,包含给定的提示词和想要接收的图像数量。如果需要,还可以增加一些其他可选参数,可以在下面的链接中检查:【【网址】】/docs/api-reference/images/create。

API 密钥已添加到请求头中,并以 JSON 的形式发送请求。然后解析响应以返回生成的图像 URL。

现在,可以在代码中使用此类来使用 ChatGPT 生成图像。以下是如何在 Spring 控制器中使用?*generateImages*?方法的示例。

上面的代码是 Spring REST 控制器的示例,它使用请求正文中传递的参数调用 OpenAi 类中的 generateImages 方法。它将 POST 请求映射到?/generateImages 终点,并将生成的图像作为响应返回。

还可以为请求正文定义一个 POJO 类,例如:

值得注意的是,生成的图像可能不完美,可能需要进一步审查和调整。我们已向模型添加了许多参数,但在向服务器发送 post 请求时,OpenAI 实用程序类中并未使用它们。这是因为这些参数大多是可选的,有些甚至对于生成图像的端点(endpoint)无效。但是,对于其他端点,如“文本完成”等,这些是有效的。

测试 API 的时间到了

现在,我们已经准备好端点,可以启动服务器并使用以下 URL 从 Postman 或任何其他 API 测试工具发出 POST 请求。

http://localhost:8080/generateImages

这是我的 API 测试截图和响应:

可以看到具有 prompt 和 n 值的 Json 请求正文。n=3 表示我们将收到 5 张生成的图像作为响应。我们确实收到与刚刚发送的提示文本相关的 3 个图像 URL。

现在可以复制这些 URL 并将它们粘贴到浏览器中以查看实际图像。

图像生成使用 DALL・E 模型。有许多其他模型可供使用,根据要求进行选择。不仅可以生成图像,还可以操纵它们。可以都尝试一下,看看哪个最合心意。使用下面的链接获取所有可用模型:【【网址】】/v1/【【微信】】(将你的 API 密钥作为 Bearer 令牌添加)。