Skip to content

jhgan00/java-ort-example-yolov5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onnxruntime Java Example : yolov5

  • An object detection example using onnxruntime and YOLO (v5 and v8)

mvn clean compile

# GUI App
# mvn exec:java -Dexec.mainClass="com.example.app.swing.SwingApp" -Dexec.classpathScope=test

# CLI APP
# mvn exec:java -Dexec.mainClass="com.example.app.cli.CLI_App" -Dexec.classpathScope=test

# API 
mvn spring-boot:run

Configs

  • See src/main/resources/model.properties
modelName=yolov5
modelPath=yolov5s.onnx
#modelName=yolov8
#modelPath=yolov8s.onnx
labelPath=coco.names
confThreshold=0.25
nmsThreshold=0.45
gpuDeviceId=-1

GUI Demo

CLI Demo

Rest API Demo

  • Endpoint: /detection
    • multipart/form-data
    • name="uploadFile"

Updates

Feb 25, 2023

  • Updated Yolov8 support
  • The model configs have been changed to be controlled through the properties file

About

Onnxruntime Java Example: yolov5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages