Giter Site home page Giter Site logo

wangjl1993 / yolov5_optimization_on_triton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bug-developer021/yolov5_optimization_on_triton

0.0 0.0 0.0 2.18 MB

Compare multiple optimization methods on triton to imporve model service performance

License: MIT License

Shell 0.15% Python 39.14% Jupyter Notebook 60.45% Dockerfile 0.26%

yolov5_optimization_on_triton's Introduction

English | Zh-CN

YOLOV5 optimization on Triton Inference Server

Deploy Yolov5 object detection service in Triton. The following optimizations have been made:

  1. Lightweight Detect layer Output

  2. Integrate TensorRT BatchedNMSPlugin into engine

  3. Deploy via Triton Pipelines

Pipelines are implemented through Ensemble and BLS respectively. The infer module in Pipelines is based on the optimized TensorRT Engine in item 1 above, and the Postprocess module is implemented through Python Backend. The workflow refers to [How to deploy Triton Pipelines](./docs/pipelines_EN.md#3-How to deploy Triton Pipelines).


Environment

  • CPU: 4cores 16GB
  • GPU: Nvidia Tesla T4
  • Cuda: 11.6
  • TritonServer: 2.20.0
  • TensorRT: 8.2.3
  • Yolov5: v6.1

Benchmark

Triton Inference Server is deployed on one machine. Perf_analyzer is used to call the gRPC interface on another machine to compare the performance of BLS Pipelines, Ensemble Pipelines, and BatchedNMS under gradually increasing concurrency.

  • Generate real data

    python generate_input.py --input_images <image_path> ----output_file <real_data>.json
  • Test with real data

    perf_analyzer  -m <triton_model_name>  -b 8  --input-data <real_data>.json  --concurrency-range 1:10  --measurement-interval 10000  -u <triton server endpoint> -i gRPC  -f <triton_model_name>.csv

The data shows that BatchedNMS performs better overall, converging to optimal performance faster under high concurrency, and achieving higher throughput at lower latency. Ensemble Pipelines and BLS Pipelines perform better at lower concurrency, but performance degrades more as concurrency increases.

Six metrics are selected for comparison. Each metric is processed and normalized to the 0-1 interval. The original meaning of each metric is as follows:

  • Server Queue: Data waiting time in Triton queue
  • Server Compute Input: Triton input tensor processing time
  • Server Compute Infer: Triton inference execution time
  • Server Compute Output: Triton output tensor processing time
  • latency: 90th percentile end-to-end latency
  • throughput: throughput

See here for results analysis.

REFERENCES

yolov5_optimization_on_triton's People

Contributors

bug-developer021 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.