Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igor-yusupov/rusty-yolo
https://github.com/igor-yusupov/rusty-yolo
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/igor-yusupov/rusty-yolo
- Owner: igor-yusupov
- License: apache-2.0
- Created: 2023-04-30T18:12:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-04T22:38:03.000Z (about 1 year ago)
- Last Synced: 2024-08-06T10:41:36.059Z (5 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 13
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yolo-object-detection - igor-yusupov/rusty-yolo - yusupov/rusty-yolo?style=social"/> : rusty-yolo. (Other Versions of YOLO)
- awesome-yolo-object-detection - igor-yusupov/rusty-yolo - yusupov/rusty-yolo?style=social"/> : rusty-yolo. (Other Versions of YOLO)
- awesome-rust-list - igor-yusupov/rusty-yolo - yusupov/rusty-yolo?style=social"/> : rusty-yolo. (Machine Learning)
- awesome-rust-list - igor-yusupov/rusty-yolo - yusupov/rusty-yolo?style=social"/> : rusty-yolo. (Machine Learning)
README
# Getting started
This library relies on the [tch](https://github.com/LaurentMazare/tch-rs) crate for bindings to the C++ Libtorch API. A more detailed installation of this library can be found at the link to this repository.
# Inference
```
use rusty_yolo;
use tch;fn main() {
let device = tch::Device::cuda_if_available();
let yolo_model = rusty_yolo::YOLO::new("model.pt", 384, 640, device);
let mut original_image = tch::vision::image::load("/images/zidane.jpg").unwrap();let results = yolo_model.predict(&original_image, 0.25, 0.35);
yolo_model.draw_rectangle(&mut original_image, &results);
tch::vision::image::save(&original_image, "images/result.jpg").unwrap();
}```
![alt text](https://github.com/igor-yusupov/rusty-yolo/blob/main/examples/simple_inference/images/result.jpg?raw=true)