2023-09-06 03:46:09 +00:00
2023-09-03 13:15:02 +00:00
2023-09-06 03:46:09 +00:00
2023-09-03 13:15:02 +00:00
2023-09-03 13:15:02 +00:00
2023-09-06 03:46:09 +00:00
2023-09-03 13:15:02 +00:00
2023-09-03 13:15:02 +00:00
2023-09-03 13:15:02 +00:00
2023-09-03 13:15:02 +00:00
2023-09-03 13:15:02 +00:00
2023-09-03 13:15:02 +00:00
2023-09-03 13:15:02 +00:00
2023-09-06 03:46:09 +00:00
2023-09-06 03:46:09 +00:00
2023-09-06 03:46:09 +00:00
2023-09-06 03:46:09 +00:00
2023-09-06 03:46:09 +00:00

yolotriton

GoDoc Go Report Card License

Go (Golang) gRPC client for YOLO-NAS, YOLOv8 inference using the Triton Inference Server.

Installation

Use go get to install this package:

go get github.com/dev6699/yolotriton

Get YOLO-NAS, YOLOv8 TensorRT model

Replace yolov8m.pt with your desired model

pip install ultralytics
yolo export model=yolov8m.pt format=onnx
trtexec --onnx=yolov8m.onnx --saveEngine=model_repository/yolov8/1/model.plan

References:

  1. https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html
  2. https://docs.ultralytics.com/modes/export/
  3. https://github.com/NVIDIA/TensorRT/tree/master/samples/trtexec

Start trinton server

docker compose up tritonserver

References:

  1. https://docs.nvidia.com/deeplearning/triton-inference-server/user-guide/docs/user_guide/model_repository.html

Sample usage

Check cmd/main.go for more details.

Available args:

  -i string
        Inference Image. (default "images/1.jpg")
  -m string
        Name of model being served (Required) (default "yolonas")
  -t string
        Type of model. Available options: [yolonas, yolov8] (default "yolonas")
  -u string
        Inference Server URL. (default "tritonserver:8001")
  -x string
        Version of model. Default: Latest Version
go run cmd/main.go

Results

prediction:  0
class:  dog
confidence: 0.96
bboxes: [ 669 130 1061 563 ]
---------------------
prediction:  1
class:  person
confidence: 0.96
bboxes: [ 440 30 760 541 ]
---------------------
prediction:  2
class:  dog
confidence: 0.93
bboxes: [ 168 83 495 592 ]
---------------------
Input YOLO-NAS Ouput YOLOv8 Output
Description
Go gRPC client for YOLO-NAS, YOLOv8 inference using the Triton Inference Server.
Readme MIT 14 MiB
Languages
Go 98.8%
Dockerfile 1.2%