0
$\begingroup$

I have a problem, im designing a multiclass classifier to classify medic images, I have to classify in which grade of desease is it, this are 6 grades , each time the joint deforms a little, so, mi original dataset was imabalanced, each class have like 16 to 200 images that are very very similar with some little deatils of change, ,so i did some contrasts and flips to the images to have like 500 images per class aprox, i used a vgg16 architechture to train the model but, it soesnt work 30% acc, i ddid a simple model with 2 layers of convolution, I have like 70% of accurracy but my recall is very very low like 0.001 to 0.3, and when I predict with an image, all the images goes to the incorrect class, i dont know how to correct my model , use other metrics or some architechture for this type of images?.Here's a sample of the code https://github.com/Franciscogtu/OARSI-IMAGE-CLASSIFIER.git Thank you for the helpenter image description here

$\endgroup$

3 Answers 3

0
$\begingroup$

Have you tried a batch normalization layer between the conv2D layers and the dense top? I'd also keep the number of filters low ,maybe 32 or 64. Same for the number of nodes in the top, no point in having a huge dense top with hundreds of nodes.

$\endgroup$
1
  • $\begingroup$ Yes I try with a 32 batch , im new in this so i dont undestand some things but , im learning ,thank you for the tips ill try to check the normalization $\endgroup$ Commented Aug 21, 2020 at 12:38
0
$\begingroup$

Try to:

  • check that you shuffle the test and train data - make sure that the test and train data have a decent amount of example for each class
  • monitor the training and validation loss
  • clip your gradient (monitor the gradient value)
  • lower the learning rate (or schedule the learning rate)

it's complicated without more information. Can you post the model code?

$\endgroup$
1
0
$\begingroup$

If you bucket the grades of disease, 1-3 and 4-6 (or 1-2 and 3-6 etc), then use a binary classifier, choose a threshold that gives performance across both classes what happens? If the performance still sucks, then try some of the suggestions in the other posts.

If it's performant you can do this bucketing trick again (choosing your buckets so there is approximately the same number of training samples in each) to get predictions across all classes. Having the ability to choose the threshold should help tremendously with issues of high precision, low recall.

You said they are 6 "grades", does this mean the data is ordinal? If so you will want to change your evaluation metrics to take into account that it is better to predict a 2 than a 6 when the ground truth is a 1.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.