首页 > 其他分享 >[3d object detection] BEVFormer

[3d object detection] BEVFormer

时间:2023-08-11 17:22:20浏览次数:32  
标签:features reference object detection points BEVFormer query BEV

paper: BEVFormer: Learning Bird's-Eye-View Representation from Multi-Camera Images via Spatiotemporal Transformers, 2022

1. Grid-shaped BEVqueries

We predefine a group of grid-shaped learnable parameters Q ∈ RH×W×C as the queries of BEVFormer, where H, W are the spatial shape of the BEV plane. To be specific, the query Qp ∈ R1×C located at p = (x, y) of Q is responsible for the corresponding grid cell region in the BEV plane. Each grid cell in the BEV plane corresponds to a real-world size of s meters. The center of BEV features corresponds to the position of the ego car by default(The NuScenes dataset camera detect range can be [-40m, -40m, -1m, 40m, 40m, 5.4m], which are symmetric.). Following common practices [ 14], we add learnable positional embedding to BEV queries Q before inputting them to BEVFormer.

2. Spatial cross-attention

each BEV query only interacts with image features in the regions of interest.
Step:

  1. First lift each query on the BEV plane to a pillar-like query, sample \(N_{ref}\) 3D reference points from the pillar.
  2. Project these points to 2D views as reference points.
  • he real world location (x′, y′) corresponding to the query \(Q_p\) located at p = (x, y) of Q.
    将栅格坐标转换到以车辆为中心的世界坐标。

\[\begin{cases} x^{'} = (x - \frac{W}{2}\cdot s) \\ y^{'} = (y - \frac{H}{2}\cdot s) \\ \end{cases} \]

  • the objects located at (x′, y′) will appear at the height of z′ on the z-axis. So we predefine a set of anchor heights \(\{z^{'}_j\}^{N_{ref}}_{j=1}\) to make sure we can capture clues that appeared at different heights. In this way, for each query \(Q_p\), we obtain a pillar of 3D reference points \((x′, y′, z')^{N_{ref}}_{j=1}\).
  • project the 3D reference points to different image views through the projection matrix of cameras. \(T_i \in R_{3×4}\) is the known projection matrix of the i-th camera.

\[z_{ij}\cdot \{x_{ij}, y_{ij}, 1\}^T = T_i·\{x′, y′, z′_j, 1\}^T \]

  1. sample the features from the hit views \(V_{hit}\) around these reference points.
  2. Perform a weighted sum of the sampled features as the output of spatial cross-attention.

3. Temporal self-attention

each BEV query interacts with two features: the BEV queries at the current timestamp and the BEV features at the previous timestamp.
Step:

  1. Given the BEV queries Q at current timestamp t and history BEV features Bt−1 preserved at timestamp t−1, we first align Bt−1 to Q according to ego-motion to make the features at the same grid correspond to the same real-world location.
    根据运动关系,将上一帧 BEV 特征对齐到 Q 的世界坐标系
  2. (It is challenging to construct the precise association of the same objects between the BEV features of different times) Model temporal connection between features through the temporal self-attention (TSA) layer.

标签:features,reference,object,detection,points,BEVFormer,query,BEV
From: https://www.cnblogs.com/liudianfengmang/p/17623125.html

相关文章

  • python dict 和 object 相互转换
    pythondict和object的相互转换dict.py借助dict,isinstance来实现对象与字典之间的相互转换defas_dict(obj):ifnothasattr(obj,"__dict__"):returnobjresult={}forkey,valinobj.__dict__.items():ifkey.startswith("_"):......
  • django的queryset和objects对象
    1.queryset是查询集,就是传到服务器上的url里面的内容。Django会对查询返回的结果集QerySet进行缓存,这里是为了提高查询效率。  也就是说,在你创建一个QuerySet对象的时候,Django并不会立即向数据库发出查询命令,只有在你需要用到这个QuerySet的时候才回去数据库查询。2.Objects......
  • CANoe:Communication Object编程基础
    引言  基于SOA的功能测试中,Someip作为核心至关重要,但是常规的功能测试(不包括协议栈)针对SomeipSD并不十分关注,用SomeipDLL实现也很麻烦。CANoe12.0版本提出了CO:CommunicationObject,CO将Someip的服务与方法抽象为具体的单独的接口来供测试工程师使用,极大降低了测试难度。本文章......
  • TypeError: a bytes-like object is required, not ‘str‘,如何解决?
    在Python编程中,当我们在处理文件或网络传输等场景时,有时可能会遇到以下错误信息:"TypeError:abytes-likeobjectisrequired,not'str'"。这个错误通常表示我们传递了一个字符串对象而不是字节对象,导致了类型不匹配。如下所示,我们对字段进行base64编码时,出现了报错:在本文中,我们......
  • Delphi应用EXCEL(3) 使用OLEOBJECT
    1、创建EXCEL的方法首先创建Excel对象,使用单元ComObj:VarExcelApp:Variant;beginExcelApp:=CreateOleObject(''Excel.Application'');使用OLEOBJECT创建的EXCEL应用程序是一个Variant类型,所以DELPHI不能自动补充语句,也没有帮助文件,需要到visualbasic......
  • Spring—ObjectProvider更加宽泛的依赖注入
    1.Spring依赖注入在Spring4.3之后,引入了一个新特性:当构造方法只有一个参数时,可以不使用@Autowired注解。@ServicepublicclassFooService{privateFooRepositoryfooRepository;publicFooService(FooRepositoryfooRepository){this.fooRepository=foo......
  • 聊聊Object
    一、Object提供的方法Object.create(obj,{配置项组})  实例和构造函数之间的关系检测:(1)、关键字:instanceof-实例instanceof构造函数 (2)、显示原型对象的方法:isPrototypeOf()-构造函数.prototype.isPrototypeOf(实例) (3)、数据检测的万能方式:(可以用来区分对象或数组)......
  • AttributeError: 'RelatedManager' object has no attribute 'name'的解决办法
    原因关联的表中没有查询对象关联的数据;注意关联的数据是多条还是单条。解决办法给查询对象关联的表中增加该对象关联的数据;单条直接.name(点用法),多条先.all()再逐条.name......
  • 关于Objective-C头文件中的property为readonly,外部还能set成功
    起初是同事和我说,property为readonly,外部还能set成功。实在没想明白。常规的写法,.m中可以直接set成功,而外部创建的FCTest对象,无法set成功(见FCObject)。FCTest.h@interfaceFCTest:NSObject@property(nonatomic,copy,readonly)NSString*name;@endFCTest.m@inte......
  • 【JavaScript05】Object的序列化与反序列化
    对象的序列化当我们需要像后端传json字符串的时候,需将JavaScript的对象转成json格式,这个过程就是序列化。varp={name:"肖文亮",age:18,wife:{name:"XXX",age:18,hobby:[......