Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metobom/tchrs-opencv-webcam-inference
https://github.com/metobom/tchrs-opencv-webcam-inference
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/metobom/tchrs-opencv-webcam-inference
- Owner: metobom
- Created: 2022-04-04T12:22:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-22T11:24:06.000Z (over 1 year ago)
- Last Synced: 2024-08-03T01:25:32.907Z (6 months ago)
- Language: Rust
- Size: 11.4 MB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-yolo-object-detection - metobom/tchrs-opencv-webcam-inference - opencv-webcam-inference?style=social"/> : This example shows steps for running a Python trained model on webcam feed with opencv and tch-rs. Model will run on GPU. (Other Versions of YOLO)
- awesome-yolo-object-detection - metobom/tchrs-opencv-webcam-inference - opencv-webcam-inference?style=social"/> : This example shows steps for running a Python trained model on webcam feed with opencv and tch-rs. Model will run on GPU. (Other Versions of YOLO)
- awesome-rust-list - metobom/tchrs-opencv-webcam-inference - opencv-webcam-inference?style=social"/> : This example shows steps for running a Python trained model on webcam feed with opencv and tch-rs. Model will run on GPU. (Machine Learning)
- awesome-rust-list - metobom/tchrs-opencv-webcam-inference - opencv-webcam-inference?style=social"/> : This example shows steps for running a Python trained model on webcam feed with opencv and tch-rs. Model will run on GPU. (Machine Learning)
README
# tchrs-opencv-webcam-inference
This example shows steps for running a Python trained model on webcam feed with opencv and tch-rs. Model will run on GPU.Model used in example is mobilenet_v3_small. It is trained on Cifar10 dataset for 10 epochs. Python training and testing scripts are included in:
```
/train_simple_classifier
```
To run example below lines must be added under [dependencies] in Cargo.toml```
[dependencies]
anyhow = "1.0.71"
opencv = "0.82.1"
tch = "0.13.0"
```
main.rs is commented for readers to understand easily.Pretrained model and a test video also included in repo
# Usage
To run example on a video use below command:
```
cargo run cifar10_mobilenet_v3_small.pt test_video.mp4
```
To run example on your webcam use below command:
```
cargo run cifar10_mobilenet_v3_small.pt /dev/video0
```