manojkiraneda / Machine-Perception

8 stars 12 forks source link

Using the SVM,not KNN in Features_KNN.py #1

Closed alyato closed 5 years ago

alyato commented 5 years ago

hi, i check the Features_KNN.py and the classifier is KNN. But i want to use other classifiers,svm. The describe of SIFT for each image is not same. kp, desc = sift.detectAndCompute(gray, None) image1 (12,128) image2 (8,128) how to use the SVM? Thanks.

alyato commented 5 years ago

I check the Features_SVM.py,later. but i find that the Idf don't be used. i don't why. you say that

Perform Tf-Idf vectorization

thanks.

manojkiraneda commented 5 years ago

Hi alyato,

The code for SVN is pointed in the below link : https://github.com/manojkiraneda/Machine-Perception/tree/master/Image%20Classification(ML)/code(SVM)

In information retrieval, tf–idf or TFIDF, short for term frequency–inverse document frequency, is a numerical statistic that is intended to reflect how important a word is to a document in a collection.

In the code, the tf-idf was used to assign a weight based on the repetetive features that are observed based on the frequency.

Hope it helps