Skip to content

πŸš€ Do not need libtorch, pure C++ TensorRT deploys SOLOv2 etc, which can be quickly ported to NX/TX2.

Notifications You must be signed in to change notification settings

Broad-sky/common-image-segmentation-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

common image segmentation algorithms

πŸš€The project will release some accelerated image segmentation algorithms, including: instance segmentation, semantic segmentation, panoramic segmentation, etc., such as: SOLOv2, Deeplab, Panoptic SegFormer, mainly using TensorRT acceleration library, all implemented in C++.

Instance segmentation part

Introduction

​ This Part is based on SOLOv2 instance segmentation, and the model is deployed with tensorRT, aiming to attract jade.

Show result

result1

Get model

Download link: https://pan.baidu.com/s/1lX6n44CtXlqdIV0NiS8jXA

Code: fw8f

Run example

1. go to the build directory.

SOLOv2-TensorRT$ cd build

2. run command.

 ./convertModel ./solov2_r50_fpn_8gpu_3x.onnx -g ./seg_coco_permute.bin

3. run command.

SOLOv2-TensorRT/build$ make clean

4. Compile the project.

SOLOv2-TensorRT/build$ make

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDA: /usr/local/cuda-11.0 (found version "11.0") 
-- Found OpenCV: /usr/local/opencv3 (found version "3.4.10") 
-- Configuring done
-- Generating done
-- Build files have been written to: ../SOLOv2-TensorRT/build
Scanning dependencies of target SOLOv2-TensorRT
[ 33%] Building CXX object CMakeFiles/SOLOv2-TensorRT.dir/src/segmentation_trt.cpp.o
[ 66%] Building CXX object CMakeFiles/SOLOv2-TensorRT.dir/src/demo.cpp.o
[100%] Linking CXX executable SOLOv2-TensorRT
[100%] Built target SOLOv2-TensorRT

5. run the demo program.

SOLOv2-TensorRT/build$ ./SOLOv2-TensorRT -image_path ../image/1.jpg -save_path ./demo1.jpg

curr opencv version 3.4.10
num of classes: 80
[04/19/2022-16:58:56] [W] [TRT] TensorRT was linked against cuDNN 8.0.5 but loaded cuDNN 8.0.2
[04/19/2022-16:58:56] [W] [TRT] TensorRT was linked against cuBLAS/cuBLAS LT 11.2.0 but loaded cuBLAS/cuBLAS LT 11.1.0
[04/19/2022-16:58:56] [W] [TRT] TensorRT was linked against cuDNN 8.0.5 but loaded cuDNN 8.0.2
[04/19/2022-16:58:56] [W] [TRT] TensorRT was linked against cuBLAS/cuBLAS LT 11.2.0 but loaded cuBLAS/cuBLAS LT 11.1.0
person 0.851572
person 0.763859
snowboard 0.460805
0.683118 seconds

Semantic segmentation part

coming soon...

Panoramic segmentation part

coming soon...

About

πŸš€ Do not need libtorch, pure C++ TensorRT deploys SOLOv2 etc, which can be quickly ported to NX/TX2.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages