trevorlapay / UNMFall18_ML_Project4

1 stars 0 forks source link

Multilabel #2

Open trevorlapay opened 5 years ago

trevorlapay commented 5 years ago

I have a working train/test/predict using flowFromDirectory, but it doesn't even beat random selection accuracy (<5% accuracy). I bet this is because of the multilabel problem - I don't think flowFromDirectory can handle multilabel problems out of the box. I'd assumed it would be smart enough to see identical files in multiple class folders as multilabel files, but maybe not.

Looks like this person solved the issue for them:

http://www.kubacieslik.com/extending-keras-imagedatagenerator-handle-multilable-classification-tasks/

trevorlapay commented 5 years ago

I constrained the problem by reducing the labels to 1, and am easily able to get to 25% accuracy on my own private validation set. It appears that ImageDataGenerator does not help, which is a surprise, although flowFormDirectory is pretty fast (I have no need for numpy data structures - I can run a size 32 epoch in a few seconds). If anyone wants to convert that data to pickle files, I'm all for it, though.

Since we're able to use premade kernels, I'm going to try my luck with resnets and the inception stuff to see how far I get.

hankyusa commented 5 years ago

Wow. You got 25%. Did you just accepted that the model wouldn't correctly predict any of the instances with more than one label or are you counting a prediction correct so long as it is one of the correct labels?

trevorlapay commented 5 years ago

Just the one. My assumption is that if we can classify the one, we'll be able to classify the group (or at least gain some traction in that direction). I think ImageDataGenerator is a rabbit hole.

On Tue, Nov 27, 2018, 10:22 AM Luke Hanks <notifications@github.com wrote:

Wow. You got 25%. Did you just accepted that the model wouldn't correctly predict any of the instances with more than one label or are you counting a prediction correct so long as it is one of the correct labels?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trevorlapay/UNMFall18_ML_Project4/issues/2#issuecomment-442144068, or mute the thread https://github.com/notifications/unsubscribe-auth/ALDXetrnAToHUMsnvc-0aTnmlff5BMQMks5uzXTfgaJpZM4YxBgd .