Skip to content

Get the best image out of a exact/near duplicate set #245

Answered by schm0
schm0 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not that much into python but I think this will do it?
The goal is to create a list of images that should be trashed/moved.
e.g. removing the best quality images from the list.

# Remove one image from each exact duplicate set
# e.g. One image will be kept, all others get trashed
exact_duplicates_images = list(chain(*[ set[1:] for set in imagelab.info['exact_duplicates']['sets'] ]))

# Group near duplicates into sets
near_duplicates_image_sets = imagelab.info['near_duplicates']['sets']

# Get blurry score of each near duplicate image
near_duplicates_image_scores = (imagelab.issues[imagelab.issues["is_near_duplicates_issue"] == True]
                                    .sort_values(by='…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sanjanag
Comment options

Answer selected by sanjanag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants