MobileNetV2 is a convolutional neural network architecture for classification tasks which seeks to perform well on mobile devices. You can find the Burn implementation for the MobileNetV2 in src/model/mobilenetv2.rs.
The model is no_std compatible.
Add this to your Cargo.toml
:
[dependencies]
mobilenetv2-burn = { git = "https://github.com/tracel-ai/models", package = "mobilenetv2-burn", default-features = false }
If you want to get the pre-trained ImageNet weights, enable the pretrained
feature flag.
[dependencies]
mobilenetv2-burn = { git = "https://github.com/tracel-ai/models", package = "mobilenetv2-burn", features = ["pretrained"] }
Important: this feature requires std
.
The inference example initializes a MobileNetV2 from the ImageNet
pre-trained weights
with the NdArray
backend and performs inference on the provided input image.
You can run the example with the following command:
cargo run --release --features pretrained --example inference samples/dog.jpg