Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I am getting line an error-215 while training an SVM with OpenCV-Python

line 100, in <module> svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) cv2.error: D:\Build\OpenCV\opencv-3.4.0\modules\ml\src\data.cpp:259: error: (-215) samples.type() == 5 || samples.type() == 4 in function cv::ml::TrainDataImpl::setData Line 100 is: svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) train_data is an n-D numpy array with shape 60256512 and type Float 32. train_labels is a numpy array with shape 60*1. I am unable to understand what the error possibly means, and any help would be appreciated.

I am getting line an error-215 while training an SVM with OpenCV-Python

In line 100, in <module> svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) <module>svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) cv2.error: D:\Build\OpenCV\opencv-3.4.0\modules\ml\src\data.cpp:259: error: (-215) samples.type() == 5 || samples.type() == 4 in function cv::ml::TrainDataImpl::setData cv::ml::TrainDataImpl::setData

Line 100 is: svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels)

train_data is an n-D numpy array with shape 60256512 and type Float 32. 32.

train_labels is a numpy array with shape 60*1. 60*1.

I am unable to understand what the error possibly means, and any help would be appreciated.

I am getting line an error-215 while training an SVM with OpenCV-Python

In line 100, in <module>svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) cv2.error: D:\Build\OpenCV\opencv-3.4.0\modules\ml\src\data.cpp:259: error: (-215) samples.type() == 5 || samples.type() == 4 in function cv::ml::TrainDataImpl::setData

Line 100 is: svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels)

train_data is an n-D numpy array with shape 6025660 * 256 * 512 and type Float 32.

train_labels is a numpy array with shape 60*1.60 * 1.

I am unable to understand what the error possibly means, and any help would be appreciated.

I am getting line an error-215 while training an SVM with OpenCV-Python

In line 100, in <module>svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) cv2.error: D:\Build\OpenCV\opencv-3.4.0\modules\ml\src\data.cpp:259: error: (-215) samples.type() == 5 || samples.type() == 4 in function cv::ml::TrainDataImpl::setData

Line 100 is: svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels)

train_data is an n-D numpy array with shape 60 * 256 * 512 [60, 256,512] and type Float 32.

train_labels is a numpy array with shape 60 * 1.[60,1] and type int32.

I am unable to understand what the error possibly means, and any help would be appreciated.appreciated. I am working with OpenCV 3, Python 3.5.X, Windows 10, 64-bit

I am getting line an error-215 while training an SVM with OpenCV-Python

In line 100, in <module>svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels) cv2.error: D:\Build\OpenCV\opencv-3.4.0\modules\ml\src\data.cpp:259: error: (-215) samples.type() == 5 || samples.type() == 4 in function cv::ml::TrainDataImpl::setData

Line 100 is: svm.train(train_data,cv.ml.ROW_SAMPLE,train_labels)

train_data is an n-D numpy array with shape [60, 256,512] and type Float 32.

train_labels is a numpy array with shape [60,1] and type int32.

I am unable to understand what the error possibly means, and any help would be appreciated. I am working with OpenCV 3, Python 3.5.X, Windows 10, 64-bit