mirror of
https://github.com/huggingface/candle.git
synced 2025-06-21 04:10:46 +00:00
Add Mobilenet v4 (#2325)
* Support different resolutions in load_image() * Added MobilenetV4 model. * Add MobileNetv4 to README
This commit is contained in:
18
candle-examples/examples/mobilenetv4/README.md
Normal file
18
candle-examples/examples/mobilenetv4/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
# candle-mobilenetv4
|
||||
|
||||
[MobileNetV4 - Universal Models for the Mobile Ecosystem](https://arxiv.org/abs/2404.10518)
|
||||
This candle implementation uses pre-trained MobileNetV4 models from timm for inference.
|
||||
The classification head has been trained on the ImageNet dataset and returns the probabilities for the top-5 classes.
|
||||
|
||||
## Running an example
|
||||
|
||||
```
|
||||
$ cargo run --example mobilenetv4 --release -- --image candle-examples/examples/yolo-v8/assets/bike.jpg --which medium
|
||||
loaded image Tensor[dims 3, 256, 256; f32]
|
||||
model built
|
||||
unicycle, monocycle : 20.18%
|
||||
mountain bike, all-terrain bike, off-roader: 19.77%
|
||||
bicycle-built-for-two, tandem bicycle, tandem: 15.91%
|
||||
crash helmet : 1.15%
|
||||
tricycle, trike, velocipede: 0.67%
|
||||
```
|
Reference in New Issue
Block a user