mirror of
https://github.com/dev6699/yolotriton.git
synced 2025-09-26 19:51:13 +08:00
fea4ba6dc035c62aaf461f1f5d1beff30ad60b83
yolotriton
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:
- https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html
- https://docs.ultralytics.com/modes/export/
- https://github.com/NVIDIA/TensorRT/tree/master/samples/trtexec
Start trinton server
docker compose up tritonserver
References:
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 |
---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Languages
Go
98.8%
Dockerfile
1.2%