代码部分
c_d = dict(zip(candidate,dist))
cd_sorted = sorted(c_d.items(), key=lambda d:d[1])
print ("\n The person is: " ,cd_sorted[0][0])
dlib.hit_enter_to_continue()
运行出错显示:
Traceback (most recent call last):
File "girl-face-rec.py", line 66, in
print ("\n The person is: " ,cd_sorted[1][5])
IndexError: list index out of range
帮忙看看问题出在哪里?