UMass-Rescue / ImageSearch_CLIP

A system that creates clip embedding vectors for a large corpus of images, enabling efficient retrieval of images based on natural language text.
0 stars 1 forks source link

Change os.listdir() to os.walk() for Recursive Directory Search #66

Closed sravanigona closed 1 week ago

sravanigona commented 1 week ago

The current implementation uses os.listdir() to list files in a directory while processing the dataset. However, this function only lists files in the immediate directory and does not account for files in subdirectories. This limitation can cause the application to miss important files that are nested within subdirectories, leading to incomplete processing.

To fix this issue, the code should be updated to use os.walk(), which provides a recursive directory traversal, ensuring that all files in the directory and its subdirectories are included.