Other Dataset
mab85 opened this issue · 2 comments
mab85 commented
@ksopyla I am new in python and i ask how to use this code to own dataset with two images folders train and test.
thanks in advance
ksopyla commented
Hi,
First of all, I read all images in line 28 in to "images" variable (https://github.com/ksopyla/svm_mnist_digit_classification/blob/master/svm_mnist_classification.py#L28)
Then normalize images pixels from 0-255 to 0-1 (line 45)
And then use sciki-learn 'train_test_split' function to split X_data into X_train and X_test
So the simplest thing you could try is to read the data from your folders to variables X_train, X_test, y_train, y_test, and normalize X_train and X_test
kevinyu1949 commented
excuse me,can you tell me how to run these py scripts?