Я использую этот репозиторий от github Python Реализация алгоритма обнаружения лица Полом Виолой и Майклом Дж. Джонсом. . Используя этот набор данных для лиц (положительный) Caltech 10 000 Web Faces И этот набор данных для не лица (отрицательный) База данных SUN
При выполнении я получаю следующую ошибку:
Loading faces..
creating integral image for training
..done. 500 faces loaded.
Loading non faces..
creating integral image for training
..done. 500 non faces loaded.
Creating haar-like features..
..done. 585138 features created.
Calculating scores for images..
0% (2 of 1000) | | Elapsed Time: 0:00:10 ETA: 1:25:05multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 44, in mapstar
return list(map(*args))
File "C:\Users\hp\Desktop\face-detection\face-detection\work\viola-jones\violajones\AdaBoost.py", line 105, in _get_feature_vote
return feature.get_vote(image)
File "C:\Users\hp\Desktop\face-detection\face-detection\work\viola-jones\violajones\HaarLikeFeature.py", line 88, in get_vote
score = self.get_score(int_img)
File "C:\Users\hp\Desktop\face-detection\face-detection\work\viola-jones\violajones\HaarLikeFeature.py", line 52, in get_score
second = ii.sum_region(int_img, (self.top_left[0], int(self.top_left[1] + self.height / 2)), self.bottom_right)
File "C:\Users\hp\Desktop\face-detection\face-detection\work\viola-jones\violajones\IntegralImage.py", line 58, in sum_region
return integral_img_arr[bottom_right] - integral_img_arr[top_right] - integral_img_arr[bottom_left] + integral_img_arr[top_left]
IndexError: index 214 is out of bounds for axis 0 with size 214
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "vj.py", line 32, in <module>
classifiers = ab.learn(faces_ii_training, non_faces_ii_training, num_classifiers, min_feature_height, max_feature_height, min_feature_width, max_feature_width)
File "C:\Users\hp\Desktop\face-detection\face-detection\work\viola-jones\violajones\AdaBoost.py", line 60, in learn
votes[i, :] = np.array(list(pool.map(partial(_get_feature_vote, image=images[i]), features)))
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 290, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 683, in get
raise self._value
IndexError: index 214 is out of bounds for axis 0 with size 214
В чем причина такой ошибки?