I recently unsynced and then resynced a folder containing lots of photos using Google back-up and sync. Unsyncing the folder removed all the photos from Google Drive but not from Google Photos so when I resynced the folder my photos were uploaded to Google photos again as duplicates.

I would like to automatically delete the duplicates from Google Photos and don't want to do it manually as there are thousands of them. One copy of each photo is not stored on Google Drive and is only stored on Google Photos, meaning this method did not work.