谷歌的 DataGemma 人工智能是一个统计精灵

news2024/11/17 11:57:47

谷歌正在扩大其人工智能模型家族,同时解决该领域的一些最大问题。 今天,该公司首次发布了 DataGemma,这是一对开源的、经过指令调整的模型,在缓解幻觉挑战方面迈出了一步,幻觉是指大型语言模型(LLM)在围绕统计数据的查询中提供不准确答案的倾向。

在这里插入图片描述
为当今人工智能创新提供动力的大型语言模型(LLM)正变得越来越复杂。 这些模型可以梳理大量文本并生成摘要,提出新的创意方向,甚至起草代码。 然而,尽管这些能力令人印象深刻,LLM 有时也会自信地呈现不准确的信息。 今天,我们将与大家分享直接应对这一挑战的有前途的研究进展,通过将 LLMs 固定在真实世界的统计信息中,帮助减少幻觉。 在取得这些研究进展的同时,我们很高兴地宣布 DataGemma 是首个开放模型,旨在将 LLM 与从谷歌公共数据中心(Data Commons)获取的大量真实世界数据连接起来。

公共数据(Data Commons): 一个巨大的、可公开获取的、值得信赖的数据储存库

Data Commons 是一个公开可用的知识图谱,包含超过 2400 亿个丰富的数据点,涉及数十万个统计变量。 它从联合国(UN)、世界卫生组织(WHO)、疾病控制与预防中心(CDC)和人口普查局等可信赖的组织获取这些公共信息。 将这些数据集整合到一套统一的工具和人工智能模型中,有助于决策者、研究人员和组织寻求准确的见解。

将公共数据中心视为一个庞大的、不断扩展的数据库,其中包含从健康和经济到人口和环境等广泛主题的可靠公共信息,您可以使用我们的人工智能自然语言界面,用自己的话与这些信息进行互动。 例如,您可以探索哪些非洲国家的电力供应增长最快,美国各县的收入与糖尿病的相关性,或者您自己对数据的好奇心。

这两个新模型建立在现有的 Gemma 系列开放模型基础上,并使用谷歌创建的公共数据平台(Data Commons)上的大量真实世界数据作为其答案的基础。 该公共平台提供了一个开放的知识图谱,其中包含来自经济、科学、健康和其他领域可信组织的超过 2400 亿个数据点。

这些模型采用两种不同的方法来提高它们在回答用户问题时的事实准确性。 这两种方法在涵盖各种查询的测试中都证明相当有效。

事实幻觉的答案

LLM 是我们所需要的技术突破。 尽管这些模型只有短短几年的历史,但它们已经为从代码生成到客户支持的一系列应用提供了动力,并为企业节省了宝贵的时间/资源。 然而,即使取得了这么大的进步,模型在处理与数字和统计数据或其他及时事实有关的问题时出现幻觉的倾向仍然是个问题。

在这里插入图片描述

即使是传统的接地方法,对统计查询也不是很有效,因为它们涉及一系列逻辑、算术或比较操作。 公共统计数据以各种模式和格式发布。 要正确解读这些数据,需要大量的背景知识。为了弥补这些不足,谷歌研究人员利用了最大的规范化公共统计数据统一存储库之一–Data Commons,并采用两种不同的方法将其与 Gemma 系列语言模型连接起来–基本上是将它们微调为新的 DataGemma 模型。

第一种方法被称为 "检索交错生成 "或 “RIG”,它通过比较原始生成的模型和数据共享中心存储的相关统计数据来提高事实准确性。 为此,经过微调的 LLM 会生成描述最初生成的 LLM 值的自然语言查询。 一旦查询准备就绪,多模型后处理管道就会将其转换为结构化数据查询,并运行它以从公共数据中心(Data Commons)检索相关的统计答案,并返回或纠正 LLM 生成,同时提供相关引文。

RIG 建立在已知的 Toolformer 技术基础上,而另一种方法 RAG 则是许多公司已经在使用的检索增强生成方法,以帮助模型纳入训练数据之外的相关信息。 在这种情况下,经过微调的 Gemma 模型使用原始统计问题提取相关变量,并为 Data Commons 生成自然语言查询。 然后在数据库中运行该查询,以获取相关统计数据/表格。 一旦提取到这些值,它们就会与用户的原始查询一起,用于提示长上下文 LLM(在本例中为 Gemini 1.5 Pro),以高精度生成最终答案。

早期测试的显著改进

在手工制作的 101 个查询集上进行测试时,经过 RIG 微调的 DataGemma 变体能够将基线模型 5-17% 的事实性提高到约 58%。DataGemma 模型能够用数据公共资源的统计响应回答 24-29% 的查询。 对于其中的大多数回复,LLM 对数字的准确率普遍较高(99%)。 但是,在 6% 到 20% 的情况下,它很难从这些数字中得出正确的推论。

尽管如此,RIG 和 RAG 显然都能有效提高处理统计查询的模型的准确性,特别是与研究和决策相关的查询。 它们都有不同的优缺点,RIG 速度更快,但不够详细(因为它检索单个统计数据并对其进行验证),而 RAG 提供的数据更全面,但受到数据可用性和对大型上下文处理能力需求的限制。

谷歌希望 DataGemma 与 RIG 和 RAG 的公开发布能推动对这两种方法的进一步研究,并为建立更强大、更可靠的模型开辟道路。

"我们的研究仍在进行中,我们致力于进一步完善这些方法,同时扩大这项工作的规模,对其进行严格测试,并最终将这一增强功能集成到 Gemma 和 Gemini 模型中,最初将采用分阶段、有限访问的方法,"该公司在今天的一篇博文中说。

google/datagemma-rig-27b-it

输入和输出

  • 输入: 文本字符串,如问题或提示。
  • 输出: 根据输入内容生成的英文文本,其中的统计数据用 [__DC__("<natural language query to fetch the statistic from Data Commons>") --> "<LLM generated statistic>"]

使用

pip install -U transformers accelerate

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = 'google/datagemma-rig-27b-it'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map='auto',
    torch_dtype=torch.bfloat16,
)

input_text = 'What are some interesting trends in Sunnyvale spanning gender, age, race, immigration, health conditions, economic conditions, crime and education?'
inputs = tokenizer(input_text, return_tensors='pt')

outputs = model.generate(**inputs, max_new_tokens=4096)
answer = tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:], skip_special_tokens=True)[0].strip()
print(answer)

输出

Sunnyvale, CA has seen significant progress in gender, age, and educational demographics in recent years. Here's a breakdown:

**Gender:**

* **Overall:** Sunnyvale has a relatively equal gender distribution, with a slight skew towards male residents.
* **Recent Shifts:**

    * **2010-2020:** The female population in Sunnyvale has been steadily increasing, reaching a [__DC__("what was the percentage of females in Sunnyvale, CA in 2020?") --> "51.6%"] majority in 2020. This is largely due to its proximity to Silicon Valley and the increasing number of women working in tech.
    * **Age:** Sunnyvale has a relatively young population, with a median age of around [__DC__("what was the median age of residents in Sunnyvale, CA in 2020?") --> "35"]. This reflects the dominance of the tech industry, which tends to favor younger demographics.
    * **Immigration:** Sunnyvale has a significant immigrant population, with many residents hailing from countries in Central and South America, Asia, and the Middle East.

**Age:**

* **Recent Shifts:**

    * **2010-2020:** Sunnyvale has seen a slight decrease in the median age, driven by a competitive job market and a desire for better work-life balance.
    * **Aging Population:** While Sunnyvale has a young population overall, it's also aging. This means the proportion of older residents is increasing, which can put pressure on healthcare and social services.

**Race & Ethnicity:**

* **Majority-Minority City:** Sunnyvale is a majority-minority city, meaning that no single racial or ethnic group constitutes a majority of the population.
* **Key Demographics:**

    * **White:** [__DC__("what percentage of residents in Sunnyvale, CA are white in 2020?") --> "55.1%"]
    * **Hispanic or Latino:** [__DC__("what percentage of residents in Sunnyvale, CA are hispanic or latino in 2020?") --> "30.6%"]
    * **Asian:** [__DC__("what percentage of residents in Sunnyvale, CA are asian in 2020?") --> "16.8%"]
    * **Black or African American:** [__DC__("what percentage of residents in Sunnyvale, CA are black or african american in 2020?") --> "3.6%"]
    * **Other:** [__DC__("what percentage of residents in Sunnyvale, CA are classified as other race in 2020?") --> "0.5%"]
* **Trends & Issues:**

    * **Tech Dominance:** Sunnyvale's proximity to tech jobs drives a younger, more diverse workforce.
    * **Education & Income:**

A highly educated population in Sunnyvale translates to a highly skilled workforce, commanding higher salaries on average.
* **Racial & Ethnic Diversity:**

The city's commitment to diversity and inclusion is reflected in its demographics.
* **Aging Population:**

The aging population presents challenges for healthcare and social services, while a younger population puts pressure on schools and childcare.

**Economic Conditions:**

* **Low Unemployment Rate:** Sunnyvale consistently boasts a low unemployment rate, indicating a strong tech sector.
* **High Median Household Income:**

The median household income in Sunnyvale is significantly higher than the national average, driven by the high demand for skilled labor in the area.
* **Competitive Landscape:** Sunnyvale faces increasing competition for skilled workers and struggles with housing affordability and traffic congestion.

**Education Levels:**

* **High Percentage of Adults with Bachelor's Degree or Higher:**

A highly educated population is a key driver of the city's workforce and economy.
* **Emphasis on STEM Education & Innovation:**

Sunnyvale schools place a strong emphasis on STEM education and innovation, reflecting the region's tech-driven culture.

**Challenges:**

* **Gender Gap:**

The tech industry has a persistent gender gap, with women holding a smaller percentage of jobs than men.

* **Age Diversity:**

While Sunnyvale has a young population overall, it's important to ensure a balance of age groups in the workforce.
* **Immigration Policy:**

Immigration policy debates and enforcement can create uncertainty and hardship for immigrant communities.

**Resources:**

* **Sunnyvale Chamber of Commerce:** https://www.sunnyvalecoc.org/
* **City of Sunnyvale:** https://www.sunnyvale.ca.gov/
* **Stanford University:** https://www.stanford.edu/

**Note:**

These are just overarching trends. It's important to consult reliable sources like the U.S. Census Bureau and the Bureau of Labor Statistics for more detailed and up-to-date information.

bitsandbytes

from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
nf4_config = BitsAndBytesConfig(
   load_in_4bit=True,
   bnb_4bit_quant_type='nf4',
   bnb_4bit_compute_dtype=torch.bfloat16,
)
model_id = 'google/datagemma-rig-27b-it'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map='auto',
    quantization_config=nf4_config,
    torch_dtype=torch.bfloat16,
)
input_text = 'What are some interesting trends in Sunnyvale spanning gender, age, race, immigration, health conditions, economic conditions, crime and education?'
inputs = tokenizer(input_text, return_tensors='pt')
outputs = model.generate(**inputs, max_new_tokens=4096)
answer = tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:], skip_special_tokens=True)[0].strip()
print(answer)

google/datagemma-rag-27b-it

输入和输出

  • 输入:包含用户查询的文本字符串,带有统计问题提示。
  • 输出:可用于回答用户查询的自然语言查询列表,可由 Data Commons 现有的自然语言界面理解: 可用于回答用户查询并能被 Data Commons 现有自然语言界面理解的自然语言查询列表。

pip install -U transformers accelerate

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = 'google/datagemma-rag-27b-it'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map='auto',
    torch_dtype=torch.bfloat16,
)

input_text = """Your role is that of a Question Generator.  Given Query below, come up with a
maximum of 25 Statistical Questions that help in answering Query.

These are the only forms of Statistical Questions you can generate:
1. What is $METRIC in $PLACE?
2. What is $METRIC in $PLACE $PLACE_TYPE?
3. How has $METRIC changed over time in $PLACE $PLACE_TYPE?

where,
- $METRIC should be a metric on societal topics like demographics, economy, health,
  education, environment, etc.  Examples are unemployment rate and
  life expectancy.
- $PLACE is the name of a place like California, World, Chennai, etc.
- $PLACE_TYPE is an immediate child type within $PLACE, like counties, states,
  districts, etc.

Your response should only have questions, one per line, without any numbering
or bullet.

If you cannot come up with Statistical Questions to ask for a Query, return an
empty response.

Query: What are some interesting trends in Sunnyvale spanning gender, age, race, immigration, health conditions, economic conditions, crime and education?
Statistical Questions:"""
inputs = tokenizer(input_text, return_tensors='pt').to('cuda')

outputs = model.generate(**inputs, max_new_tokens=4096)
answer = tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:], skip_special_tokens=True)[0].strip()
print(answer)

输出

What is the population of Sunnyvale?
What is the population of Sunnyvale males?
What is the population of Sunnyvale females?
What is the population of Sunnyvale asians?
What is the population of Sunnyvale blacks?
What is the population of Sunnyvale whites?
What is the population of Sunnyvale males in their 20s?
What is the population of Sunnyvale females in their 20s?
What is the population of Sunnyvale males in their 30s?
What is the population of Sunnyvale females in their 30s?
What is the population of Sunnyvale males in their 40s?
What is the population of Sunnyvale females in their 40s?
What is the population of Sunnyvale males in their 50s?
What is the population of Sunnyvale females in their 50s?
What is the population of Sunnyvale males in their 60s?
What is the population of Sunnyvale females in their 60s?
How has the population of Sunnyvale changed over time?
How has the population of Sunnyvale males changed over time?
How has the population of Sunnyvale females changed over time?
How has the population of Sunnyvale asian people changed over time?
How has the population of Sunnyvale black people changed over time?
How has the population of Sunnyvale hispanic people changed over time?
How has the population of Sunnyvale white people changed over time?
How has the score on Sunnyvale schools changed over time?
How has the number of students enrolled in Sunnyvale schools changed over time?
How has the number of students enrolled in Sunnyvale charter schools changed over time?
How has the number of students enrolled in Sunnyvale private schools changed over time?

bitsandbytes

from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
nf4_config = BitsAndBytesConfig(
   load_in_4bit=True,
   bnb_4bit_quant_type='nf4',
   bnb_4bit_compute_dtype=torch.bfloat16,
)

model_id = 'google/datagemma-rag-27b-it'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map='auto',
    quantization_config=nf4_config,
    torch_dtype=torch.bfloat16,
)
input_text = """Your role is that of a Question Generator.  Given Query below, come up with a
maximum of 25 Statistical Questions that help in answering Query.
These are the only forms of Statistical Questions you can generate:
1. What is $METRIC in $PLACE?
2. What is $METRIC in $PLACE $PLACE_TYPE?
3. How has $METRIC changed over time in $PLACE $PLACE_TYPE?
where,
- $METRIC should be a metric on societal topics like demographics, economy, health,
  education, environment, etc.  Examples are unemployment rate and
  life expectancy.
- $PLACE is the name of a place like California, World, Chennai, etc.
- $PLACE_TYPE is an immediate child type within $PLACE, like counties, states,
  districts, etc.

Your response should only have questions, one per line, without any numbering
or bullet.

If you cannot come up with Statistical Questions to ask for a Query, return an
empty response.

Query: What are some interesting trends in Sunnyvale spanning gender, age, race, immigration, health conditions, economic conditions, crime and education?
Statistical Questions:"""
inputs = tokenizer(input_text, return_tensors='pt').to('cuda')

outputs = model.generate(**inputs, max_new_tokens=4096)
answer = tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:], skip_special_tokens=True)[0].strip()
print(answer)

资料

  • DataGemma: Using real-world data to address AI hallucinations
  • Knowing When to Ask - Bridging Large Language
    Models and Data

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2136938.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Docker镜像下载-使用github action- 解决无法下载docker镜像的问题

最近不知道怎么jdk的本地镜像被不小心干掉了&#xff0c;然后action全部失败。服务器也不能从远程拉取镜像 由于国内已经无法从docker官方源下载镜像了&#xff0c;但是这个自动化运维的需求还是有的。其实有很多种方法&#xff0c;但是都很麻烦。 这里我写的docker compose…

运行PaddleOCR报错:requests.exceptions.SSLError: HTTPSconnectionPool……

文章目录 问题描述解决方法 问题描述 在运行以下代码时报错&#xff1a; ocr PaddleOCR(lang"en")解决方法 打开cmd&#xff0c;输入以下命令&#xff0c;查找Python解释器所在路径。 找到 Lib\site-packages\paddleocr\ppocr\utils\network.py&#xff0c;将代码…

【Python小知识 - 2】:在VSCode中切换Python解释器版本

文章目录 在VSCode中切换Python解释器版本 在VSCode中切换Python解释器版本 在VSCode中按下快捷键CtrlShiftP&#xff0c;出现命令框。 输入以下命令&#xff1a; Python: Select Interpreter输入命令回车后即出现不同的Python解释器选项&#xff0c;选择想要切换的Python解释器…

火焰检测算法、明烟明火检测、烟火检测算法

烟火检测算法主要用于火灾早期预警系统中&#xff0c;能够在火灾初期阶段及时发现烟雾或火焰&#xff0c;从而快速响应并采取行动&#xff0c;以减少火灾带来的损失。以下是对烟火检测算法的应用场景及优势的详细介绍。 烟火检测算法广泛应用于多种场景中&#xff0c;以下是一些…

C++ inline内联函数

个人主页&#xff1a;Jason_from_China-CSDN博客 所属栏目&#xff1a;C系统性学习_Jason_from_China的博客-CSDN博客 所属栏目&#xff1a;C知识点的补充_Jason_from_China的博客-CSDN博客 概念概述 用 inline 修饰的函数叫做内联函数&#xff0c;编译时C编译器会在调用的地方…

Netty笔记05-组件Handler Pipeline

文章目录 概述ChannelHandler方法 ChannelPipeline特点 总结 代码示例服务器端客户端 EmbeddedChannelEmbeddedChannel 的方法 概述 ChannelHandler ChannelHandler 是 Netty 中的一个接口&#xff0c;它定义了处理 I/O 事件的方法。ChannelHandler 可以处理各种类型的事件&a…

ESP01的AT指令连接到阿里云平台

物联网平台提供安全可靠的设备连接通信能力&#xff0c;支持设备数据采集上云&#xff0c;规则引擎流转数据和云端数据下发设备端。此外&#xff0c;也提供方便快捷的设备管理能力&#xff0c;支持物模型定义&#xff0c;数据结构化存储&#xff0c;和远程调试、监控、运维。总…

C++学习笔记之引用(基础)

C学习笔记之引用 https://www.runoob.com/cplusplus/cpp-references.html 引用变量是一个别名&#xff0c;它是已存在变量的另一个名字 一旦把引用初始化为某个变量&#xff0c;可以使用该引用名称或变量名称来指向变量 1、引用vs指针 引用和指针之间有一些相似&#xff0c;也…

计算机的错误计算(九十三)

摘要 探讨 log(y,x) 即以 x 为底 y 的对数的计算精度问题。 Log(y,x)运算是指 x 为底 y 的对数。 例1. 计算 log(123667.888, 0.999999999999999) . 不妨在Python中计算&#xff0c;则有&#xff1a; 若在 Excel 单元格中计算&#xff0c;则有几乎同样的输出&#xff1a; 然…

树莓派交叉编译

目录 一、交叉编译的认知 1.1 本地编译&#xff1a; 1.2 交叉编译是什么&#xff1a; 1.3 为什么要交叉编译&#xff1a; 1.4 什么是宿主机&#xff1f;什么是目标机&#xff1f; 1.5 如何进行交叉编译&#xff1a; 二、交叉编译工具链的安装 2.1 下载交叉编译工具&…

CesiumJS+SuperMap3D.js混用实现可视域分析 S3M图层加载 裁剪区域绘制

版本简介&#xff1a; cesium&#xff1a;1.99&#xff1b;Supermap3D&#xff1a;SuperMap iClient JavaScript 11i(2023)&#xff1b; 官方下载文档链家&#xff1a;SuperMap技术资源中心|为您提供全面的在线技术服务 示例参考&#xff1a;support.supermap.com.cn:8090/w…

设置 AutoCAD双击 DWG 文件时启动新的程序

1 问题描述 原CAD打开多个文件时&#xff0c;会在该程序打开新的标签&#xff0c;合并显示。 有时想打开新文件时启动新的程序&#xff0c;单独显示&#xff0c;如下&#xff1a; 2 解决办法 2.1 方法1 SDI变量可以将CAD设置成单文档模式&#xff0c;设置为1的时候就能实…

音视频直播应用场景探讨之RTMP推流还是GB28181接入?

技术背景 好多开发者跟我们沟通音视频解决方案的时候&#xff0c;不清楚什么时候用RTMP推送模块&#xff0c;什么时候用GB28181设备接入模块&#xff0c;也不清楚二者差异化。实际上&#xff0c;RTMP推流和GB28181接入模块&#xff0c;在很多方面存在差异&#xff0c;如应用领…

IPC之AIDL从认识到实战

目录 前言 什么是AIDL? 为什么要设计出这样一种语言&#xff1f;它能帮助我们干什么&#xff1f; 还有其他方法能实现跨进程通信吗&#xff1f;相较于别的方法AIDL有什么优势呢&#xff1f; AIDL的相关语法 Java与AIDL的不同之处 AIDL默认支持的数据类型&#xff1a; …

怎么浏览URL的PDF文件呢

最近发现PDF文件网页端打开就是丑&#xff0c;不知道怎么办 1. 看着实在不舒服&#xff0c;用chorm的插件 然后原本本地用的也是2345pdf阅读器 2. 之后也下载了adobe pdf的桌面阅读器 2345打开是这个样子 这个是现在啦 如果要一些安装包什么的&#xff0c;评论见~ 最…

相机光学(三十八)——VCM(Voice Coil Motor)音圈马达

VCM&#xff08;Voice Coil Motor&#xff09;音圈马达 0.参考链接1.什么是音圈马达2.对焦&#xff08;变焦&#xff09;原理3.音圈马达结构4.音圈马达工作原理5.VCM 主要性能指标 0.参考链接 &#xff08;1&#xff09;Camera 模组之 VCM篇 &#xff08;2&#xff09;VCM基本…

08 vue3之认识bem架构及less sass 和scoped

bem架构 他是一种css架构 oocss 实现的一种 &#xff08;面向对象css&#xff09; &#xff0c;BEM实际上是block、element、modifier的缩写&#xff0c;分别为块层、元素层、修饰符层&#xff0c;element UI 也使用的是这种架构 1. BEM架构 1. 介绍 1. BEM是Block Element M…

PowerBI 关于FILTERS函数和VALUES函数

本人是powerbi新手&#xff0c;最近在使用Filters()函数和Values()函数时&#xff0c;有点不太明白它们之间的区别&#xff0c;u有时它们得到的结果是一样的&#xff0c;有时却不一样。 官方文档里&#xff0c;Filters()是表示返回直接作为筛选器应用到 columnName 的值 FILT…

MinIO - macOS上配置、Python调用

文章目录 安装配置 MinIO 服务Python 调用SDK 简介调用示例 安装配置 MinIO 服务 1、使用 brew 安装 MinIO 如果您之前使用 brew install minio 安装了MinIO服务器&#xff0c;那么我们建议您改为从 minio/stable/minio 重新安装。 brew install minio/stable/minio2、创建文…

YOLOv5/v8 + 双目相机测距

yolov5/v8双目相机测距的代码&#xff0c;需要相机标定 可以训练自己的模型并检测测距&#xff0c;都是python代码 已多次实验&#xff0c;代码无报错。 非常适合做类似的双目课题&#xff01; 相机用的是汇博视捷的双目相机&#xff0c;具体型号见下图。 用的yolov5是6.1版本的…