imagededup
imagededup copied to clipboard
maximum recursion depth exceeded
Hello, I want to use it to filter similar images, whether I just need to call find_duplicates_to_remove()
When the data volume is too large (18W), it prompts me to recurse beyond the maximum depth. What should I do

Few ways to resolve your problem:
- Split your image corpus into several smaller directories and run
find_duplicates_to_removeon each directory. You can then remove duplicates from each of these directories and then merge the leftover images in new directories and keep on repeating the process. - Your error gets triggered while constructing the bktree. To get rid of the necessity to build a bktree, you can first use
encode_imagesmethod to get hashes of each image and then usefind_duplicateswithsearch_methodset to string 'brute_force'. This will return dictionary as the output expected offind_duplicatesbut will run much slower. You would then need to write a custom logic to remove duplicates obtained from the dictionary. Refer documentation for the same: https://idealo.github.io/imagededup/user_guide/finding_duplicates/ - Use mac or linux instead of Windows: With mac/linux, the default search method will be a quick version of brute force search. So, bktree will not be constructed at all.
@Sunny-Day200 Unless you have any further comments, I would be closing the issue shortly.