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.
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.