Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.38 KB

README.md

File metadata and controls

40 lines (27 loc) · 1.38 KB

MobileNetV2 Burn

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.

Usage

Cargo.toml

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.

Example Usage

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