harperreed / photo-similarity-search

Super simple MLX (apple silicon) CLIP based photo similarity web app
MIT License
430 stars 34 forks source link

support sub-directory in the image folder #9

Open ppodxiang opened 2 months ago

ppodxiang commented 2 months ago

I have the main branch using a simple photo folder: it have 13 .jpeg files in ./ and 13 .jpeg in ./2015_12 folder: . ├── 2015_12 │   ├── 20151201_IMG_4403.JPG │... │   └── 20151231_IMG_4435.JPG ├── DSC01938.JPG ... ├── DSC01943.JPG; the start_web.py return 404 for all files in ./2015_12 folder as it direct join image directory and filename, omit the relative path.

get_file_path_from_db(filename) use input filename and compare with info in the database and return absolute full file path.

WARNING: This may slow down the process when database is rather large!