A while ago, I wrote two blogposts about image classification with Keras and about how to use your own models or pretrained models for predictions and using LIME to explain to predictions.
Recently, I came across this blogpost on using Keras to extract learned features from models and use those to cluster images. It is written in Python, though - so I adapted the code to R. You find the results below.
![](https://shirinsplayground.netlify.app/post/2018-10-06_keras_fruits_cluster_files/figure-html/unnamed-chunk-16-1.png)