GithubHelp home page GithubHelp logo

xiesibo / yolov5_torchserve Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jdongca2003/yolov5_torchserve

0.0 1.0 0.0 1.15 MB

TorchServe for Yolov5

License: Apache License 2.0

Shell 1.12% Dockerfile 0.43% Python 36.13% Jupyter Notebook 62.32%

yolov5_torchserve's Introduction

Yolov5_torchserve

This folder contains scripts to setup Torchserve for Yolov5, popular open-source object detection method.

Usage

   1. Create env

       sh create_env.sh
       Note: assume os is linux with cuda 11.0 

   2. Download the model from YoloV5 releases
      
      cd yolov5_mar
      sh download_model.sh

   3. Archive the model files

       cd yolov5_mar
       zip -r ../yolo5.mar .
       cd ..

   4. Host the yolov5 model

       mkdir model_store
       mv yolo5.mar model_store/.

   5. Run the server
      
      nohup sh start_server.sh &

   6. Check the healthy
     
      curl "http://localhost:8081/models/yolo5"

      or check logs/ts_log.log

   7. Test object detection API

      curl -X POST http://127.0.0.1:8080/predictions/yolo5 -T kitten.jpg

Performance

Coco 2017 Val Images(5K) is used to test throughput/latency in the above setup.

   1. Server machine: Intel xeon Gold 6159 [email protected], 2 Tesla P4 with CentOS 7
   2. Test setup
      a. 10 http clients in parallel. Each client which runs in other machine sends 500 images sequentially. 
         Throughput: 26 images/second  Average latency: 384 millisec/request

      b. Native torch program (yolov5_mar/simple_batch_test.py) without torchserve. Run two processes (batch_size: 10). Each one has own gpu and dataset (#images: 2500). 
         Throughput: 26 images/second.

Reference

  1. Torchserve
  2. Ultralytics/yolov5

yolov5_torchserve's People

Contributors

jdongca2003 avatar

Watchers

James Cloos 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.