In this repo you'll find two PowerShell scripts, one to write down files that exist twice and another one to delete these.
Here you can see that the mountain.png and the porsche.png file are present in their subfolders (cars/landscapes) but also in the main folder photos. So there you have two duplicates. You can now use the two scripts I mentioned above to delete the ones in the main folder.