MCPcopy Create free account
hub / github.com/Supernova1744/Vision.rs

github.com/Supernova1744/Vision.rs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
167 symbols 286 edges 32 files ⚖ MIT 20 documented · 12% updated 16mo ago★ 383 open issues

Browse by type

Functions 140 Types & classes 27
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Rust Logo

Vision.rs

Vision.rs is a high-performance computer vision library written in Rust. It leverages Rust’s speed and safety for efficient image processing and offers a gRPC API for building scalable microservices. This enables seamless integration and remote inference in distributed systems.

Features

  • High Performance: Utilizes Rust for safe and fast execution.
  • Scalable Microservices: gRPC API makes it easy to integrate with microservice architectures.
  • Remote Inference: Supports remote inference for flexible deployment.
  • CUDA Support: Optionally enable CUDA for hardware acceleration.

Prerequisites

  • Rust: Ensure that you have Rust installed. Visit rust-lang.org for installation instructions.
  • Protoc: Verify that the Protocol Buffer compiler (protoc.exe) is correctly configured. You may need to update the path on line 6 of build.rs if necessary.
  • CUDA (Optional): Install CUDA drivers and libraries if you plan to run with GPU support.

Running the Application

To run Vision.rs using the provided YOLOv8n ONNX model and an input image, execute the following command:

$ cargo run --release -- --model assets/weights/yolov8n.onnx

To enable CUDA support, append the --cuda flag along with the device ID:

$ cargo run --release -- --model assets/weights/yolov8n.onnx --cuda --device_id <id>

Generating Python gRPC Scripts

To generate Python encoding/decoding scripts for gRPC communication, run:

$ python -m grpc_tools.protoc -I./proto --python_out=. --grpc_python_out=. ./proto/result.proto

This command creates the necessary Python files based on your gRPC .proto definitions.

Note: To utilize CUDA acceleration in this repository, ensure that your system has CUDA 12.x and cuDNN 9.x installed. Compatibility between CUDA and cuDNN versions is crucial for optimal performance. For detailed compatibility information, refer to NVIDIA's support matrix.

Testing

for API testing you can use the python scripts under tests dir

You need to run the following command to generate

$ pip install grpcio-tools opencv-python

$ python -m grpc_tools.protoc -I . --proto_path=proto\result.proto --python_out=tests --grpc_python_out=tests proto\result.proto

$ python tests\video_client.py VIDEO_PATH
(or)
$ python tests\image_client.py IMAGE_PATH

Contributing

Contributions are welcome! If you have any suggestions or improvements, please open an issue or submit a pull request.

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 119
Class 24
Function 21
Enum 3

Languages

Rust98%
Python2%

Modules by API surface

YOLOv8-ONNXRuntime-Rust/src/ort_backend.rs37 symbols
YOLOv8-ONNXRuntime-Rust/src/yolo_result.rs34 symbols
YOLOv8-ONNXRuntime-Rust/src/model.rs22 symbols
RF-DETR/src/postprocess.rs9 symbols
yolov8_train/src/head.rs7 symbols
yolov8_train/src/conv.rs6 symbols
yolov8_train/src/model.rs5 symbols
YOLOv8-ONNXRuntime-Rust/src/yolo_service.rs4 symbols
YOLOv8-ONNXRuntime-Rust/src/lib.rs4 symbols
RF-DETR/src/service.rs4 symbols
RF-DETR/src/preprocess.rs4 symbols
yolov8_train/src/sppf.rs3 symbols

For agents

$ claude mcp add Vision.rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page