which machine learning should I use? [closed]
I have 200 images and 200 classes and I try to use opencv cv :: ml :: Boost
cv :: ml :: KNearest
. But the results are not accurate.
so ,which machine learning should I use?
Create vocabulary:
cv::BOWKMeansTrainer bowtrainer(10);
bowtrainer.add(trainingDescriptors);
vocabulary = bowtrainer.cluster();
Recoginze:
cv::BOWImgDescriptorExtractor bowide(extractor, matcher);
bowide.setVocabulary(vocabulary);
std::vector<cv::KeyPoint> keypoints;
detector->detect(trainingMat, keypoints);
if (keypoints.empty()) {
return -1;
}
cv::Mat imgDescriptor;
bowide.compute(trainingMat, keypoints, imgDescriptor);
if (imgDescriptor.empty()) {
return -1;
}
Mat testResponse;
kclassifier->predict(imgDescriptor, testResponse, 0);
Some Images:
train Image : https://drive.google.com/file/d/1n2eh...
test Image : https://drive.google.com/file/d/1Txxo...
can you explain the context, what are you trying to achieve ? using what kind of data ? why the BOW approach ?
boost can only handle 2 classes (binary classifier)
A picture is a class, and I want to combine it with the recognition of AR. thank you!
you will need much more than a single sample per class to train any ml algorithm successfully.
10 clusters / features won't be enough to seperate 200 classes (try like 1000)