Função para calcular acurácia dado o nome da pessoa e a quantidade de imagens que usará nos testes
-- No diretório de teste, deve-se colocar o nome da pessoa seguido de -test;
Adicionei 20 imagens de treino e 10 de teste.
Atente para o fato de que muitas imagens podem não ter a face detectada. Vai ser a parte mais chata do processo escolher as imagens, já que você não sabe quando não detectará a face;
Modifiquei o tamanho do texto que exibe na hora de marcar a pessoa para deixar proporcional à resolução da imagem;
Coloquei como critério de aceitação para confidence(distância) <= 55. Considerando que haverá uma diversidade de posições, luminosidade e de distâncias da câmera, imagino que seja um valor razoável.