dchen236 / FairFace

465 stars 92 forks source link

don't match bboxes per every iamge #24

Open AliMoradiVartouni opened 1 year ago

AliMoradiVartouni commented 1 year ago

As the bboxes appended in a list then, after call "predidct_age_gender_race" function the indices of bboxes don't match with origin images. For this I am added bellow line in third line of "predidct_age_gender_race" function after img_names = [os.path.join(imgs_path, x) for x in os.listdir(imgs_path)]

img_names.sort(key=lambda x: os.path.getmtime(x))

Thus, images are considered based on time that bboxes have been added.