tensort
Connell Reffo
overview
This project is a CLI tool that sorts images based on their content. It uses a pre-trained ResNet model to classify images and then sort them into folders based on the classification.
note
It is worth noting that I did not train the model. The weights were obtained from the tch.rs repository which is a Rust wrapper for Libtorch. For this reason, I do not consider this project particularly complex but it was a good exercise in working with Rust and Libtorch.
technical_details
The main concept that makes this project work is the comparison of Cosine Similarity values between the various image embeddings generated by the ResNet model. Following that, a heuristic clustering algorithm is used to group the images into a specified number of classes. There is more detail in the project repository if you are interested in the specifics.
images
Below are images that demonstrate the usage of this tool.



