Skip to content
/ usls Public

A Rust library integrated with ONNXRuntime, providing a collection of Computer Vison and Vision-Language models.

License

Notifications You must be signed in to change notification settings

jamjamjon/usls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

74 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

usls

Rust Continuous Integration Badge usls Version Rust MSRV ONNXRuntime MSRV CUDA MSRV TensorRT MSRV Crates.io Total Downloads

Examples usls documentation

usls is a Rust library integrated with ONNXRuntime, offering a suite of advanced models for Computer Vision and Vision-Language tasks, including:

πŸ‘‰ More Supported Models
Model Task / Description Example CoreML CUDA
FP32
CUDA
FP16
TensorRT
FP32
TensorRT
FP16
BEiT Image Classification demo βœ… βœ… βœ…
ConvNeXt Image Classification demo βœ… βœ… βœ…
FastViT Image Classification demo βœ… βœ… βœ…
MobileOne Image Classification demo βœ… βœ… βœ…
DeiT Image Classification demo βœ… βœ… βœ…
DINOv2 VisionΒ Embedding demo βœ… βœ… βœ… βœ… βœ…
YOLOv5 Image Classification
Object Detection
Instance Segmentation
demo βœ… βœ… βœ… βœ… βœ…
YOLOv6 Object Detection demo βœ… βœ… βœ… βœ… βœ…
YOLOv7 Object Detection demo βœ… βœ… βœ… βœ… βœ…
YOLOv8
YOLO11
Object Detection
Instance Segmentation
Image Classification
Oriented Object Detection
Keypoint Detection
demo βœ… βœ… βœ… βœ… βœ…
YOLOv9 Object Detection demo βœ… βœ… βœ… βœ… βœ…
YOLOv10 Object Detection demo βœ… βœ… βœ… βœ… βœ…
YOLOv12 Object Detection demo βœ… βœ… βœ… βœ… βœ…
RT-DETR Object Detection demo βœ… βœ… βœ…
PP-PicoDet Object Detection demo βœ… βœ… βœ…
DocLayout-YOLO Object Detection demo βœ… βœ… βœ…
D-FINE Object Detection demo βœ… βœ… βœ…
DEIM Object Detection demo βœ… βœ… βœ…
RTMO Keypoint Detection demo βœ… βœ… βœ… ❌ ❌
SAM Segment Anything demo βœ… βœ… βœ…
SAM2 Segment Anything demo βœ… βœ… βœ…
MobileSAM Segment Anything demo βœ… βœ… βœ…
EdgeSAM Segment Anything demo βœ… βœ… βœ…
SAM-HQ Segment Anything demo βœ… βœ… βœ…
FastSAM Instance Segmentation demo βœ… βœ… βœ… βœ… βœ…
YOLO-World Open-Set Detection With Language demo βœ… βœ… βœ… βœ… βœ…
GroundingDINO Open-Set Detection With Language demo βœ… βœ… βœ…
CLIP Vision-Language Embedding demo βœ… βœ… βœ… ❌ ❌
jina-clip-v1 Vision-Language Embedding demo βœ… βœ… βœ… ❌ ❌
BLIP Image Captioning demo βœ… βœ… βœ… ❌ ❌
DB(PaddleOCR-Det) Text Detection demo βœ… βœ… βœ… βœ… βœ…
FAST Text Detection demo βœ… βœ… βœ… βœ… βœ…
LinkNet Text Detection demo βœ… βœ… βœ… βœ… βœ…
SVTR(PaddleOCR-Rec) Text Recognition demo βœ… βœ… βœ… βœ… βœ…
SLANet Tabel Recognition demo βœ… βœ… βœ…
TrOCR Text Recognition demo βœ… βœ… βœ…
YOLOPv2 Panoptic Driving Perception demo βœ… βœ… βœ… βœ… βœ…
DepthAnything v1
DepthAnything v2
Monocular Depth Estimation demo βœ… βœ… βœ… ❌ ❌
DepthPro Monocular Depth Estimation demo βœ… βœ… βœ…
MODNet Image Matting demo βœ… βœ… βœ… βœ… βœ…
Sapiens Foundation for Human Vision Models demo βœ… βœ… βœ…
Florence2 a Variety of Vision Tasks demo βœ… βœ… βœ…
Moondream2 Open-Set Object Detection
Open-Set Keypoints Detection
ImageΒ Caption
Visual Question Answering
demo βœ… βœ… βœ…
OWLv2 Open-Set Object Detection demo βœ… βœ… βœ…
SmolVLM(256M, 500M) Visual Question Answering demo βœ… βœ… βœ…

⛳️ Cargo Features

By default, none of the following features are enabled. You can enable them as needed:

  • auto: Automatically downloads prebuilt ONNXRuntime binaries from Pyke’s CDN for supported platforms.

  • ffmpeg: Adds support for video streams, real-time frame visualization, and video export.

    • Powered by video-rs and minifb. For any issues related to ffmpeg features, please refer to the issues of these two crates.
  • cuda: Enables the NVIDIA TensorRT provider.

  • trt: Enables the NVIDIA TensorRT provider.

  • mps: Enables the Apple CoreML provider.

🎈 Example

  • Using CUDA

    cargo run -r -F cuda --example yolo -- --device cuda:0
    
  • Using Apple CoreML

    cargo run -r -F mps --example yolo -- --device mps
    
  • Using TensorRT

    cargo run -r -F trt --example yolo -- --device trt
    
  • Using CPU

    cargo run -r --example yolo
    

All examples are located in the examples directory.

πŸ₯‚ Integrate Into Your Own Project

Add usls as a dependency to your project's Cargo.toml

cargo add usls -F cuda

Or use a specific commit:

[dependencies]
usls = { git = "https://github.com/jamjamjon/usls", rev = "commit-sha" }

πŸ₯³ If you find this helpful, please give it a star ⭐

πŸ“Œ License

This project is licensed under LICENSE.