- 博客(76)
- 收藏
- 关注
原创 【无标题】
Sparse4D:一种基于稀疏采样的高效多视图3D目标检测方法 本文提出Sparse4D方法,通过稀疏采样和时空特征融合实现高性能3D目标检测。创新点包括:1)设计4D关键点(固定+可学习),通过运动补偿获取多时刻关键点,实现多视角、多尺度、多时刻特征聚合;2)引入层次化特征融合模块,高效整合时空信息;3)提出深度重权模块,解决3D-2D投影模糊性问题。相比基于BEV的方法,Sparse4D避免了密集视图转换和全局注意力,计算更高效,更适合边缘设备部署。实验表明,该方法在保持稀疏检测优势的同时,显著提升了3
2025-10-09 16:28:38
809
原创 AI大模型介绍yolo
速度快准确率高可解释性强适用性广rcnn使用区域建议方法,首先在一张图像中产生可能的边界框。分类后,利用后处理对边界框进行细化,消除重复检测,并根据场景中的其他对象边界框进行重新扫描,这些复杂的流水线很慢。并且因为每个独立的部分都需要被分开训练,所以很难优化。yolo模型原理:将目标检测重新定义为一个单一的检测问题,从图像像素直接到边界框坐标和类别概率。使用过一个卷积神经网络同时预测多个边界框和这些框类别概率。模型在完整的图像上训练,并直接优化检测性能。
2025-02-12 18:16:29
1261
原创 基于轨迹信息的图像近距离可行驶区域方案验证
实时获取车辆行进过程中的固定纵向距离的轨迹点信息,使用单应性变换矩阵H反向计算轨迹信息在图像中的投影位置,从而获取到图像中检测目标的距离区间。
2024-07-04 11:23:04
476
1
原创 BEV学习--Sparse4D Multi-view 3d object detection with Sparse Spatial-Temporal Fusion
BEV方法最近在多视图3D检测任务中取得了很大进展。Sparse4D通过sparsely sampling和fusing spatial-temporal features 对anchor box进行迭代改进:(1)Sparse 4D Sampling: 对于每个3D anchor,我们分配多个4D关键点,然后将其投影到多视图/尺度/时间戳图像特征,用来采样相应的特征。
2024-03-07 15:20:43
1738
原创 yolo_nms
struct aligns(float) Detection{ float bbox[4]; float conf; float class_id;};float iou(float lbox[4], float rbox[4]){ float inner_box[] = { (std::max)(lbox[0]-lbox[2]/2.f,rbox[0]-rbox[2]/2.f),//left (std::min)(lbox[0]+lbo
2022-04-19 09:35:18
455
原创 solo分割训练1-数据准备
1. labeme数据标注2.labelme-json转cocoDatatset脚本import osfrom tqdm import tqdmimport jsonimport timelocaltime = time.localtime(time.time())path = './'file_out= "../coco/annotation/train.json"classes = {"road_tooth":1, "road":2, "w
2022-04-11 17:09:22
592
原创 Monodepth2网络论文解析即训练总结
1. 亮点最小重投影loss-处理遮挡问题全分辨率多尺度采样-减少视觉伪影auto-masking loss-忽略违反相机运动假设的像素2. loss2.1 重投影误差
2022-03-30 16:34:29
2110
原创 激光雷达和相机联合标定之-but_velodyne_camera
1. 概述1.该方法适用于相机和激光雷达朝向方向相同或者近似相同的状态,相机和激光雷达之间的R矩阵较小,主要标定误差为T矩阵。 /ps:可以先将激光雷达旋转到与相机安装坐标系相似的世界坐标系下,再使用该方法进行标定。/2.该方法分为两个主要步骤,T矩阵标定;R|T矩阵联合标定3.其中T矩阵标定基于相机的小孔成像原理中,世界坐标系下物体与像素坐标系之间的相似三角形关系获得。4.R|T矩阵联合标定通过在小范围内迭代求解获得。2.T矩阵标定2.1 图像特征圆提取2.1.1 边缘检测源代码中提供了3
2022-03-25 17:25:05
8286
4
原创 object detection with faster rCNN
Proposal and CropAndResize1 custom pluginconfig.py 是为convert_to_uff 命令定义的。config.py文件中应该通过修改op字段将自定义层映射到TensorRT中的插件名称。插件参数的名称也应该与TensorRT插件所期望的完全匹配。如果config.py定义正确。NvUffParser将能够解析网络并使用正确的参数调用适当的插件。CropAndResized插件:根据产生的ROI坐标从特征图中裁剪出补丁,并将其调整为通用目标大小,例如
2021-10-27 17:32:05
899
原创 object_detection and instance segmentation with tensorflow mask rcnn network
1 main componentResizeNearset: nearest neighbor interpolation for resizing features. 适用于(FPN-功能金字塔)模块ProposalLayer:根据RPN(region proposal network)输出[scores, bbox_deltas] 和anchors生成first stage’s proposals。PyramidROIAlign:从相应的feature layer 中裁剪并调整ROI要素(fir
2021-10-27 17:31:15
214
原创 ssd_learning
1 batch数据准备$TRT_SOURCE/samples/opensource/sampleSSD/PrepareINT8CalibrationBatches.sh2 model 准备1.Download models_VGGNet_VOC0712_SSD_300x300.tar.gz.2.Check the MD5 hash of it is 9a795fc161fff2e8f3aed07f4d488faf.md5sum models_VGGNet_VOC0712_SSD_300x300.t
2021-10-27 17:30:40
244
原创 faster R-CNN
1.dowloadingcd wget --no-check-certificate https://dl.dropboxusercontent.com/s/o6ii098bu51d139/faster_rcnn_models.tgz?dl=0 -O data/faster-rcnn/faster-rcnn.tgzunziptar zxvf data/faster-rcnn/faster-rcnn.tgz -C data/faster-rcnn --strip-components=1 --ex
2021-10-27 17:29:19
298
原创 tensorflow_ssd
1 sampleUffSSD_pluginconfig.py 定义了通过修改‘op’自定义的tensorrt插件,为‘‘convert_to_uff’’命令使用。插件参数的名称应该与TensorRT所期望的插件完全匹配。比如“GridAnchor”插件,在“config.py”中应该具有以下内容:PriorBox = gs.create_plugin_node(name="GridAnchor",op="GridAnchor_TRT", numLayers=6, minSize=0.2,
2021-10-27 17:27:53
313
原创 object detection with the onnx tensorrt backbone in python-yolov3_onnx
yolov3_to_onnx.pyfrom __future__ import print_functionfrom collections import OrderedDictimport hashlibimport os.pathimport wgetimport onnxfrom onnx import helperfrom onnx import TensorProtoimport numpy as npimport syssys.path.insert(1, os.p
2021-10-27 17:25:18
1123
原创 object detection withSSD in python
SSD网络建立在VGG-16网络上,在单个前向传播网络中完成目标检测和定位。该网络将边界框的输出离散为一组默认框,其中每个特征框的位置具有不同的横纵比和尺寸。在预测目标时,网络为每个默认框中存在的每个对象类别生成分数,并对框进行调整,以便更好的匹配对象形状。1.1 run下载预训练ssd_inception_v2_coco_2017_11_17 模型并使用该模型进行推理。preprocessor(1)resize image to [300*300*3](2)normalization [
2021-10-27 17:23:54
265
原创 Tensorrt_ Performing inference in INT8 Using Custom Calibration
1 description使用int8校准网络,并校准的输出缓存在校准文件中。int8 engine是从fp32网络定义中构建的,与32位和16位引擎类似,但是配置步骤更多。其中重要步骤是1.构建器和网络必须配置为使用int8,需要解算每个张量动态范围int8校准器可以确定图和最好的将权重和激活表示为8位整数,并响应的设置每个张量的动态范围。定义网络采用通用方式定义网络,权重需要读取fp32数据 const nvcaffeparser1::IBlobNameToTensor* blobN
2021-10-21 17:23:45
399
原创 Introduction To Importing Caffe, TensorFlow And ONNX Models Into TensorRT Using Python
1 caffe_parserimport randomfrom PIL import Imageimport numpy as npimport pycuda.driver as cudaimport pycuda.autoinitimport tensorrt as trtimport sys, ossys.path.insert(1,os.path.join(sys.path[0],".."))import commonclass ModelData(object): MOD
2021-10-21 17:23:31
155
原创 tensorrt inference of onnx models with custom layers in python
本例使用tensorrt实现packNet网络的推理。packNet网络是一种用于自动驾驶的自监督的单目深度估计网络。本例中将一个pytorch graph转换为onnx,使用tensorrt的onnx-parser解析onnx graph。在onnx graph中使用custom layers(plugin)。通过使用tensorrt的REGISTER_TENSORRT_PLUGIN 自动注册这些插件使用Onnx-graphsurgeon api更改onnx graph中的层和subgraphs。
2021-10-21 17:23:15
440
原创 Tensorrt- build and run googleNet in Tensorrt
1 descriptionbuild enginebool SampleGoogleNet::build(){ auto builder = SampleUniquePtr<nvinfer1::IBuilder>(nvinfer1::createInferBuilder(sample::gLogger.getTRTLogger())); if(!builder) { return false; } auto network = S
2021-10-20 08:08:54
173
原创 Tensorrt_Algorithm Selection API usage example based off sampleMNIST in TensorRT
[tensorRT中基于sampleMNIST的算法选择API使用示例]1 descriptionIAlgorithmSelector:使用该插件确切的创建TRT enginesIAlgorithmSelector::selectAlorithms:定义用于selction of algrithm的heuristics(启发性的)2 run—caffe使用tensorrt的caffe parser运行基础setup和initialization使用caffe parser读取一个训练过的c
2021-10-20 08:08:33
421
原创 Tensorrt_add custom layer to tensorflow network in tenorrt
pip install tensorflow-gpu==2.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple1 description通过c++实现一个clip layer编译生成共享库使用python动态加载该库文件通过TensorRT的PluginRegistry 注册插件在UFF解析中使用这个插件2 run编译clip插件mkdir build && pushd buildcmake ..make -jpo
2021-10-20 08:08:08
233
原创 tensorrt_python_network_api_pytorch_mnist
1 APIActivation layer:RELUConvolution layerFullyConnected layerPooling layer: maximum, average, maximum-average blend2 runpython sample.py3 codingimport modelfrom PIL import Imageimport numpy as npimport pycuda.driver as cudaimport pycuda.aut
2021-10-20 08:07:55
166
原创 tensorrt_python_int8_caffe_mnist
本例中,在校准过程中,校准器总共检索1003批,每批检索100幅图像。本例中简化了用python读取和写入校准缓存的福成,因此现在可以很容易的缓存校准数据以加速引擎构建(参见‘calibrator.py‘)在推断过程中,样本从校准器加载随机批次,然后对整批100幅图像执行推断1 prerequisites1.安装requirements.txt2.下载minist数据集MNIST datasettraining settest settest labelsgunzip t10k-la.
2021-10-20 08:07:37
352
原创 tensorrt_python_engine_refit_mnist
使用tensorRT网络API重新构建模型使用虚拟值作为conv_1的权重,产生错误推理结果使用训练好的weight作为conv_1的权重,产生正确的推理结果。1 TensorRT API layers and opsActivation layer:kRELUConvolution layer:2D(channel,heighr,width) convolution, with/without biasFullyConnected layer:matrix-vector product,.
2021-10-20 08:07:07
452
原创 Tensorrt-python_end2end_tensorflow_mnist
本例中在MNIST 数据集上训练一个samll,3-layer,fully-connected 模型,freezes模型并且把它写入到protobuf文件中,并且转化为UFF文件。并且通过tensorrt运行inference1.1 requirementsnumpyPillow6.2.2pycudatensorflow1.15.31.2 freezing a TensorFLOW graph为了使用命令行UFF实用程序,TensorFlow图必须冻结并保存为“.pb”文件。在此示例中,转换
2021-10-20 08:06:50
202
原创 tensorrt--在你的network中添加一个支持Int8 I/O的custom layer
本例实现了mnist 模型中的custom pooling layer(data/samples/lenet5_custom_pool.uff)。由于使用了具有浮点精度的cudnn函数cudnnPoolingForward来模拟int8内核,int8精度的性能不会被提高。本例的主要目的就是演示如何为TensorRT扩展Int8 i/o插件。需要将“IPlugin/IPuginV2/IPluginV2Ext”中的接口替换为“IPluginV2IOExt”(或者“IPluginV2DynamixExt”动态插件
2021-10-20 08:06:32
435
原创 Tensorrt- 使用API指定无格式I/O
demo展示图和使用API为Float16和int8精度的无格式I/O显式指定为TensorFOrmat::kLINEARTensorFormat::kCHW2TensorFOrmat::kHWC8实现方式:ITensor::setAllowFormats:指定预期支持的格式,不用使将I/O张量从FP32转换为FP32的格式化操作。BuilderFlag::kSTRICT_TYPES:将分配给构建器配置,以润徐构建器选择无格式路径,而不是最路径。如果自由重定义格式尉氏县,则将选择具有重定
2021-10-20 08:06:09
552
原创 Tensorrt_动态数字识别
该例子中演示如何在tensorrt中使用动态输入维度。通过创建一个具有接受不同输入形状并调整输入形态大小转化为模型可以使用的形态功能的引擎。1 预处理网络和预测网络创建创建预处理网络创建一个完全支持dims的网络 auto preprocessorNetwork = makeUnique( builder->createNetworkV2(1U << static_cast<uint32_t>(NetworkDefinit
2021-10-20 08:05:51
692
原创 TensorRT_mnist_int8校正
定义网络为INT8执行定义网络与为任何其他精度定义网络完全相同。权重作为FP32导入,构建者将校准网络,以找到适当的量化因子,从而将网络降低到INT8精度。此示例使用NvCaffeParser导入网络: const nvcaffeparser1;:IBlobNameToTensor* blobNameToTensor = parser->parse(locateFile(mParams.prototxtFileName,mParams.dataDirs).c_str().
2021-10-19 19:15:39
1055
原创 Tensorrt_mnist_onnx
7.4 mnist_onnx#include "common/argsParser.h"#include "common/buffers.h"#include "common/common.h"#include "common/logger.h"#include "common/parserOnnxConfig.h"#include "NvInfer.h"#include <cuda_runtime_api.h>#include <cstdlib>#inclu
2021-10-19 19:12:10
325
原创 Tensorrt_api
#include "common/argsParser.h"#include "common/buffers.h"#include "common/common.h"#include "common/logger.h"#include "NvUffParser.h"#include "NvInfer.h"#include <cuda_runtime_api.h>#include <algorithm>#include <cassert>#inclu.
2021-10-19 19:10:10
222
原创 Tensorrt_mnist_tensorflow
#include "common/argsParser.h"#include "common/buffers.h"#include "common/common.h"#include "common/logger.h"#include "NvUffParser.h"#include "NvInfer.h"#include <cuda_runtime_api.h>#include <algorithm>#include <cassert>#includ
2021-10-19 19:09:09
197
原创 Tensorrt-mnist_caffe
准备数据:在tensorrt安装后,从/usr/src/tensorrt/data下载pgmsexport TRT_DATADIR=/usr/src/tensorrt/datapushd $TRT_DATADIR/mnistpip install Pillowpython3 download_pgms.pypopd运行sample:#include "common/argsParser.h"#include "common/buffers.h"#include "common/comm
2021-10-19 19:05:58
199
原创 TensorRT--为caffeparser添加自定义层支持
对于我们自定义的层如果写到了caffe prototxt中,在部署模型时调用caffeparser来解析就会报错。还是以Upsample为例,如果在prototxt中有下面这段来添加了一个upsample的层layer { name: "upsample0" type: "Upsample" bottom: "ReLU11" top: "Upsample1"}这时再调用const IBlobNameToTensor *blobNameToTensor = parser->pa
2021-10-19 19:03:58
563
原创 Tensorrt --添加自定义层
tensorRT目前只支持一些非常常见的操作,有很多操作它并不支持比如上采样Upsample操作,这时候就需要我们自行将其编写为tensorRT的插件层,从而使得这些不能支持的操作能在tensorRT中使用。以定义Upsample层为例,我们首先要定义一个继承自tensorRT插件基类的Upsample类class Upsample: public IPluginExt{ //一个是传参数构建 //定义上采样倍数 Upsample(int scale = 2) : mScale(
2021-10-19 18:59:57
759
原创 Tensorrt-caffee模型tensorrt部署教程
相比与tensorflow模型caffe模型的转换更加简单,不需要有tensorflow模型转uff模型这类的操作,tensorRT能够直接解析prototxt和caffemodel文件获取模型的网络结构和权重。具体解析流程和上文描述的一致,不同的是caffe模型的parser不需要预先指定输入层,这是因为prototxt已经进行了输入层的定义,parser能够自动解析出输入,另外caffeparser解析网络后返回一个IBlobNameToTensor *blobNameToTensor记录了网络中te
2021-10-19 18:58:51
647
原创 TensorRT-tensorflow模型tensorrt部署
模型持久化部署tensorflow模型的第一步是模型持久化,将模型结构和去那种保存到一个.pb文件中。pb_graph = tf.graph_util.convert_variables_to_constants(sess, sess.graph.as_graph_def(), [v.op.name for v in outputs])with tf.gfile,FastGFile('./pbmodel_name.pb',model='wb') as f: f.write(pb_graph.
2021-10-19 18:57:53
1555
原创 Tensorrt-install
1.1.1 Debian installation下载安装os="ubuntuxx04"tag="cudax.x-trt8.x.x.x-yyyymmdd"sudo dpkg -i nv-tensorrt-repo-${os}-${tag}_1-1_amd64.debsudo apt-key add /var/nv-tensorrt-repo-${os}-${tag}/7fa2af80.pubsudo apt-get updatesudo apt-get install tensorrt
2021-10-19 18:53:38
419
原创 c++基础知识-static
1.1.1 程序的内存分布代码区全局数据区:静态数据,全局数据不会因为函数的退出而释放空间。堆区:new 产生的动态数据存在堆区栈区:函数内部的自动变量,自动变量一般会随着函数的退出而释放空间1.1.2 staticc++的static有两种用法:面向过程程序设计中的static和面向对象程序设计中的static。静态变量都在全局数据区分配内存,包括静态局部变量。全局数据区的数据不会因为函数的退出而释放空间。1.1.2.1 面向过程设计中的static静态全局变量:在全局变量前加 s
2021-10-01 21:40:00
192
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅