Add a readme for the resnet example. (#1129)

This commit is contained in:
Laurent Mazare
2023-10-19 09:58:50 +01:00
committed by GitHub
parent 8e773cc0c6
commit 6f76383f38
2 changed files with 20 additions and 0 deletions

View File

@ -166,6 +166,7 @@ If you have an addition to this list, please submit a pull request.
- DINOv2. - DINOv2.
- ConvMixer. - ConvMixer.
- EfficientNet. - EfficientNet.
- ResNet-18/34.
- yolo-v3. - yolo-v3.
- yolo-v8. - yolo-v8.
- Segment-Anything Model (SAM). - Segment-Anything Model (SAM).

View File

@ -0,0 +1,19 @@
# candle-resnet
A candle implementation of inference using a pre-trained [ResNet](https://arxiv.org/abs/1512.03385).
This uses a classification head trained on the ImageNet dataset and returns the
probabilities for the top-5 classes.
## Running an example
```
$ cargo run --example resnet --release -- --image tiger.jpg
loaded image Tensor[dims 3, 224, 224; f32]
model built
tiger, Panthera tigris : 90.21%
tiger cat : 8.93%
lion, king of beasts, Panthera leo: 0.35%
leopard, Panthera pardus: 0.16%
jaguar, panther, Panthera onca, Felis onca: 0.09%
```