summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--candle-examples/examples/resnet/README.md19
2 files changed, 20 insertions, 0 deletions
diff --git a/README.md b/README.md
index db2eb5db..ac9f82c7 100644
--- a/README.md
+++ b/README.md
@@ -166,6 +166,7 @@ If you have an addition to this list, please submit a pull request.
- DINOv2.
- ConvMixer.
- EfficientNet.
+ - ResNet-18/34.
- yolo-v3.
- yolo-v8.
- Segment-Anything Model (SAM).
diff --git a/candle-examples/examples/resnet/README.md b/candle-examples/examples/resnet/README.md
new file mode 100644
index 00000000..df934773
--- /dev/null
+++ b/candle-examples/examples/resnet/README.md
@@ -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%
+```