zhouzypaul / bovw-classifier

Bag of Visual Words (BOVW) classifier for image classification; opencv-python and sklearn implementation
MIT License
1 stars 0 forks source link

issue for train #4

Open 2324773711 opened 2 years ago

2324773711 commented 2 years ago

Traceback (most recent call last): File "d:/digital-image-processing/bovw-classifier-main/bovw/train.py", line 37, in main() File "d:/digital-image-processing/bovw-classifier-main/bovw/train.py", line 19, in main classifier.fit(training_images, training_classes) File "d:\digital-image-processing\bovw-classifier-main\bovw\classifier.py", line 44, in fit self.train_kmeans(sift_features=sift_features) File "d:\digital-image-processing\bovw-classifier-main\bovw\classifier.py", line 122, in train_kmeans sift_features=np.concatenate(sift_features, axis=0) File "", line 5, in concatenate ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 49 has 0 dimension(s)

zhouzypaul commented 2 years ago

Hi

what data (images) are you training the classifier with? what are their dimensions?

can you provide what sift_features[0] and sift_features[49] look like?