Image Sorter

Using the image sorter: Click Browse and select some images (⪅ 10). Then click Load Images and proceed by clicking your 'preferred' image until all your uploaded images are automatically displayed in order at the end. A demo of the Python is in GIF form on the left. Enjoy!

This is a project I first made in Python to help me choose a bed to buy. The project aims to sort items into an ordered list qualitatively. The user can input several images and they will be displayed side by side, the user clicks their favourite of the two and this decision is stored in the code. Two new images are displayed in the same manner and the process repeats until the algorithm can determine the order of the images and displays them from least to most 'favourite'. In order to minimise the number of manual comparisons for the user, a merge-insertion sort algorithm was used which minimises the maximum number of comparisons when compared to other sorting algorithms. The algorithm here (from Dominik Peters) matches Wikipedia's listed number of comparisons. For example, the maximum possible number of comparisons you will have to complete for 5 images is 7, 10 images is 22 and 20 images is 62.  Having completed the project in Python3 using Tkinter, I converted the Python code to JavaScript (with the help of ChatGPT) for web use.