ahmetozlu / color_recognition

:art: Color recognition & classification & detection on webcam stream / on video / on single image using K-Nearest Neighbors (KNN) is trained with color histogram features by OpenCV.
https://youtu.be/05PYXwBw3Z0
MIT License
325 stars 122 forks source link

IndexError at 'knn_classifier.py' #3

Closed utkudmir closed 5 years ago

utkudmir commented 5 years ago
training data is ready, classifier is loading...
Traceback (most recent call last):
  File ".\src\color_classification_image.py", line 32, in <module>
    prediction = knn_classifier.main('training.data', 'test.data')
  File "...\color_recognition-master\color_recognition-master\src\color_recognition_api\knn_classifier.py", line 87, in main
    return classifier_prediction[0])
IndexError: list index out of range
KeramKeram commented 5 years ago

Het @utkudmir I know it's propably to late but problem is lack of black_cat.jpg in folder.

ahmetozlu commented 5 years ago

@utkudmir could you share your test image, please? The error must be caused by your input file structure.