# TensorRTx
TensorRTx aims to implement popular deep learning networks with tensorrt network definition APIs. As we know, tensorrt has builtin parsers, including caffeparser, uffparser, onnxparser, etc. But when we use these parsers, we often run into some "unsupported operations or layers" problems, especially some state-of-the-art models are using new type of layers.
So why don't we just skip all parsers? We just use TensorRT network definition APIs to build the whole network, it's not so complicated.
I wrote this project to get familiar with tensorrt API, and also to share and learn from the community.
All the models are implemented in pytorch/mxnet/tensorflown first, and export a weights file xxx.wts, and then use tensorrt to load weights, define network and do inference. Some pytorch implementations can be found in my repo [Pytorchx](https://github.com/wang-xinyu/pytorchx), the remaining are from polular open-source implementations.
## News
- `31 Aug 2021`. [FamousDirector](https://github.com/FamousDirector): update retinaface to support TensorRT 8.0.
- `27 Aug 2021`. [HaiyangPeng](https://github.com/HaiyangPeng): add a python wrapper for hrnet segmentation.
- `1 Jul 2021`. [freedenS](https://github.com/freedenS): DE⫶TR: End-to-End Object Detection with Transformers. First Transformer model!
- `10 Jun 2021`. [upczww](https://github.com/upczww): EfficientNet b0-b8 and l2.
- `23 May 2021`. [SsisyphusTao](https://github.com/SsisyphusTao): CenterNet DLA-34 with DCNv2 plugin.
- `17 May 2021`. [ybw108](https://github.com/ybw108): arcface LResNet100E-IR and MobileFaceNet.
- `6 May 2021`. [makaveli10](https://github.com/makaveli10): scaled-yolov4 yolov4-csp.
- `29 Apr 2021`. [upczww](https://github.com/upczww): hrnet segmentation w18/w32/w48, ocr branch also.
- `28 Apr 2021`. [aditya-dl](https://github.com/aditya-dl): mobilenetv2, alexnet, densenet121, mobilenetv3 with python API.
- `26 Apr 2021`. [makaveli10](https://github.com/makaveli10) add Inceptionv4.
- `25 Apr 2021`. YOLOv5 updated to v5.0, supporting s/m/l/x/s6/m6/l6/x6.
- `23 Apr 2021`. [irvingzhang0512](https://github.com/irvingzhang0512) add TSM: Temporal Shift Module for Efficient Video Understanding, ICCV2019.
- `23 Apr 2021`. [freedenS](https://github.com/freedenS) implement MaskRCNN, till now the MOST complicated model in this repo.
- `16 Apr 2021`. [irvingzhang0512](https://github.com/irvingzhang0512) implement lenet and resnet50 with Python API, [freedenS](https://github.com/freedenS) implement FasterRCNN with five plugins, cheers!
- `2 Apr 2021`. [mingyu6yang](https://github.com/mingyu6yang) added a python wrapper for retinaface, [makaveli10](https://github.com/makaveli10) added DenseNet-121.
## Tutorials
- [Install the dependencies.](./tutorials/install.md)
- [A guide for quickly getting started, taking lenet5 as a demo.](./tutorials/getting_started.md)
- [The .wts file content format](./tutorials/getting_started.md#the-wts-content-format)
- [Frequently Asked Questions (FAQ)](./tutorials/faq.md)
- [Migrating from TensorRT 4 to 7](./tutorials/migrating_from_tensorrt_4_to_7.md)
- [How to implement multi-GPU processing, taking YOLOv4 as example](./tutorials/multi_GPU_processing.md)
- [Check if Your GPU support FP16/INT8](./tutorials/check_fp16_int8_support.md)
- [How to Compile and Run on Windows](./tutorials/run_on_windows.md)
- [Deploy YOLOv4 with Triton Inference Server](https://github.com/isarsoft/yolov4-triton-tensorrt)
- [From pytorch to trt step by step, hrnet as example(Chinese)](./tutorials/from_pytorch_to_trt_stepbystep_hrnet.md)
## Test Environment
1. GTX1080 / Ubuntu16.04 / cuda10.0 / cudnn7.6.5 / tensorrt7.0.0 / nvinfer7.0.0 / opencv3.3
## How to run
Each folder has a readme inside, which explains how to run the models inside.
## Models
Following models are implemented.
|Name | Description |
|-|-|
|[lenet](./lenet) | the simplest, as a "hello world" of this project |
|[alexnet](./alexnet)| easy to implement, all layers are supported in tensorrt |
|[googlenet](./googlenet)| GoogLeNet (Inception v1) |
|[inception](./inception)| Inception v3, v4 |
|[mnasnet](./mnasnet)| MNASNet with depth multiplier of 0.5 from the paper |
|[mobilenet](./mobilenet)| MobileNet v2, v3-small, v3-large |
|[resnet](./resnet)| resnet-18, resnet-50 and resnext50-32x4d are implemented |
|[senet](./senet)| se-resnet50 |
|[shufflenet](./shufflenetv2)| ShuffleNet v2 with 0.5x output channels |
|[squeezenet](./squeezenet)| SqueezeNet 1.1 model |
|[vgg](./vgg)| VGG 11-layer model |
|[yolov3-tiny](./yolov3-tiny)| weights and pytorch implementation from [ultralytics/yolov3](https://github.com/ultralytics/yolov3) |
|[yolov3](./yolov3)| darknet-53, weights and pytorch implementation from [ultralytics/yolov3](https://github.com/ultralytics/yolov3) |
|[yolov3-spp](./yolov3-spp)| darknet-53, weights and pytorch implementation from [ultralytics/yolov3](https://github.com/ultralytics/yolov3) |
|[yolov4](./yolov4)| CSPDarknet53, weights from [AlexeyAB/darknet](https://github.com/AlexeyAB/darknet#pre-trained-models), pytorch implementation from [ultralytics/yolov3](https://github.com/ultralytics/yolov3) |
|[yolov5](./yolov5)| yolov5 v1.0-v5.0, pytorch implementation from [ultralytics/yolov5](https://github.com/ultralytics/yolov5) |
|[retinaface](./retinaface)| resnet50 and mobilnet0.25, weights from [biubug6/Pytorch_Retinaface](https://github.com/biubug6/Pytorch_Retinaface) |
|[arcface](./arcface)| LResNet50E-IR, LResNet100E-IR and MobileFaceNet, weights from [deepinsight/insightface](https://github.com/deepinsight/insightface) |
|[retinafaceAntiCov](./retinafaceAntiCov)| mobilenet0.25, weights from [deepinsight/insightface](https://github.com/deepinsight/insightface), retinaface anti-COVID-19, detect face and mask attribute |
|[dbnet](./dbnet)| Scene Text Detection, weights from [BaofengZan/DBNet.pytorch](https://github.com/BaofengZan/DBNet.pytorch) |
|[crnn](./crnn)| pytorch implementation from [meijieru/crnn.pytorch](https://github.com/meijieru/crnn.pytorch) |
|[ufld](./ufld)| pytorch implementation from [Ultra-Fast-Lane-Detection](https://github.com/cfzd/Ultra-Fast-Lane-Detection), ECCV2020 |
|[hrnet](./hrnet)| hrnet-image-classification and hrnet-semantic-segmentation, pytorch implementation from [HRNet-Image-Classification](https://github.com/HRNet/HRNet-Image-Classification) and [HRNet-Semantic-Segmentation](https://github.com/HRNet/HRNet-Semantic-Segmentation) |
|[psenet](./psenet)| PSENet Text Detection, tensorflow implementation from [liuheng92/tensorflow_PSENet](https://github.com/liuheng92/tensorflow_PSENet) |
|[ibnnet](./ibnnet)| IBN-Net, pytorch implementation from [XingangPan/IBN-Net](https://github.com/XingangPan/IBN-Net), ECCV2018 |
|[unet](./unet)| U-Net, pytorch implementation from [milesial/Pytorch-UNet](https://github.com/milesial/Pytorch-UNet) |
|[repvgg](./repvgg)| RepVGG, pytorch implementation from [DingXiaoH/RepVGG](https://github.com/DingXiaoH/RepVGG) |
|[lprnet](./lprnet)| LPRNet, pytorch implementation from [xuexingyu24/License_Plate_Detection_Pytorch](https://github.com/xuexingyu24/License_Plate_Detection_Pytorch) |
|[refinedet](./refinedet)| RefineDet, pytorch implementation from [luuuyi/RefineDet.PyTorch](https://github.com/luuuyi/RefineDet.PyTorch) |
|[densenet](./densenet)| DenseNet-121, from torchvision.models |
|[rcnn](./rcnn)| FasterRCNN and MaskRCNN, model from [detectron2](https://github.com/facebookresearch/detectron2) |
|[tsm](./tsm)| TSM: Temporal Shift Module for Efficient Video Understanding, ICCV2019 |
|[scaled-yolov4](./scaled-yolov4)| yolov4-csp, pytorch from [WongKinYiu/ScaledYOLOv4](https://github.com/WongKinYiu/ScaledYOLOv4) |
|[centernet](./centernet)| CenterNet DLA-34, pytorch from [xingyizhou/CenterNet](https://github.com/xingyizhou/CenterNet) |
|[efficientnet](./efficientnet)| EfficientNet b0-b8 and l2, pytorch from [lukemelas/EfficientNet-PyTorch](https://github.com/lukemelas/EfficientNet-PyTorch) |
|[detr](./detr)| DE⫶TR, pytorch from [faceboo
没有合适的资源?快使用搜索试试~ 我知道了~
YOLO的tensorrt加速
共319个文件
h:84个
cpp:62个
md:50个
需积分: 5 1 下载量 179 浏览量
2022-04-24
13:47:23
上传
评论
收藏 1.36MB ZIP 举报
温馨提示
YOLOv5,tensorrt,加速,模型转换,对应的v5版本
资源详情
资源评论
资源推荐
收起资源包目录
YOLO的tensorrt加速 (319个子文件)
clipper.cpp 134KB
hrnet.cpp 48KB
hrnet_ocr.cpp 46KB
refinedet.cpp 43KB
hrnet.cpp 41KB
yolov4.cpp 33KB
yolov3-spp.cpp 27KB
detr.cpp 27KB
yolov4_csp.cpp 27KB
retinafaceAntiCov.cpp 27KB
yolov3.cpp 25KB
rcnn.cpp 23KB
dbnet.cpp 23KB
yolov5.cpp 23KB
mobilenet_v3.cpp 21KB
arcface-r100.cpp 20KB
inception_v3.cpp 20KB
LPRnet.cpp 20KB
retina_r50.cpp 19KB
arcface-mobilefacenet.cpp 19KB
psenet.cpp 19KB
retina_mnet.cpp 18KB
yolov3-tiny.cpp 18KB
crnn.cpp 18KB
arcface-r50.cpp 17KB
tsm_r50.cpp 17KB
lane_det.cpp 16KB
shufflenet_v2.cpp 16KB
layers_api.cpp 15KB
unet.cpp 15KB
dcnv2Plugin.cpp 14KB
se_resnet50.cpp 14KB
densenet121.cpp 14KB
mobilenet_v2.cpp 14KB
mnasnet.cpp 14KB
googlenet.cpp 14KB
resnext50_32x4d.cpp 14KB
wideresnet50.cpp 14KB
resnet50.cpp 14KB
resnet34.cpp 13KB
repvgg.cpp 13KB
resnet18.cpp 13KB
squeezenet.cpp 11KB
vgg11.cpp 11KB
alex.cpp 10KB
efficientnet.cpp 10KB
lenet.cpp 10KB
layers.cpp 9KB
inception_v4.cpp 9KB
ibnnet.cpp 8KB
layers.cpp 5KB
InferenceEngine.cpp 4KB
calibrator.cpp 3KB
main.cpp 3KB
calibrator.cpp 3KB
calibrator.cpp 3KB
calibrator.cpp 3KB
main.cpp 2KB
utils.cpp 2KB
utils.cpp 1KB
utils.cpp 1KB
main.cpp 952B
dcn_v2_im2col_cuda.cu 19KB
yololayer.cu 12KB
yololayer.cu 9KB
yololayer.cu 9KB
yololayer.cu 9KB
decode.cu 9KB
yololayer.cu 9KB
yololayer.cu 9KB
decode.cu 7KB
prelu.cu 7KB
mish.cu 6KB
mish.cu 6KB
RoiAlign.cu 6KB
RpnDecode.cu 5KB
BatchedNms.cu 5KB
RpnNms.cu 5KB
PredictorDecode.cu 4KB
MaskRcnnInference.cu 2KB
Dockerfile 488B
.gitignore 40B
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
logging.h 16KB
共 319 条
- 1
- 2
- 3
- 4
凤枭香
- 粉丝: 50
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0