motatoes / MAdetection

1 stars 2 forks source link

Testing an image #2

Open maybefreedom opened 7 years ago

maybefreedom commented 7 years ago

Hi again, I am trying to test an image but so far it is not working. I tried with flem.apply(testImagenames), but I get an error in KNNclassify, it can't find the training features.

motatoes commented 7 years ago

Actually you need to call flem.train a few times and pass in images and binary ground truths, so that the KNN classifier features can be generated. If you don't have a dataset with gorundtruths available, you can try to run it on our messidor groundtruth dataset here, or the ROC dataset here (but the performance is very bad on the ROC dataset).

On the other hand, if you want to simply generate the candidates without the use of a classifier, you can use flem.generateCandidates, but the results will not be great

pawarpooja commented 6 years ago

Hello @motatoes sir, I just want to segment MAs from the MESSIDOR input images. Can I do it without doing classification ?? Can you please tell me which file I have to use in that case, I mean what is the sequence?

motatoes commented 6 years ago

@pawarpooja you can use the generageCandidates method in the class microaneurysm.algorithm.Fleming

img = imread('path/to/image')
f = microaneurysm.algorithm.Fleming()
f.generageCandidates(img)