rishiswethan / Cancer-detection-using-CNN

This CNN is capable of diagnosing breast cancer from an eosin stained image. This model was trained using 400 images. It has an accuracy of 80%
51 stars 31 forks source link

Wrong output for custom images #7

Open liuhuihuii opened 5 years ago

liuhuihuii commented 5 years ago

I solved the problem with the image size last night and I should thank you for that, however, after I trained the network for 24 epochs, the prediction of custom images are still far from correct. The percentage of each label it gives for custom images is around 25%, while testing random images from the data set gives very definite answer (50% for one label). Is it because of overfitting or not enough epochs? Is there any advice to improve the correctness for custom images?

rishiswethan commented 5 years ago

I originally set the epoch count to 10, maybe try that

On Sun, 30 Dec 2018, 7:45 am Alan liu <notifications@github.com wrote:

I solved the problem with the image size last night and I should thank you for that, however, after I trained the network for 24 epochs, the prediction of custom images are still far from correct. The percentage of each label it gives for custom images is around 25%, while testing random images from the data set gives very definite answer (50% for one label). Is it because of overfitting or not enough epochs? Is there any advice to improve the correctness for custom images?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rishiswethan/Cancer-detection-using-CNN/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ARdPCp6i1rrM8puUySeZ9lH1CYDYSj2eks5u-CGmgaJpZM4ZkyF0 .

liuhuihuii commented 5 years ago

But when I use your pretrianed mode 'my_model3.h5' t to predict my own cunstom image named 'InvasiveC2_2048x1536.jpg' ,then output is like: Average from all crops

Benign : 20.6134% InSitu : 31.7345% Invasive : 20.0719% Normal : 27.5802%

rishiswethan commented 5 years ago

Not sure why, are these from your images?

On Sun, 30 Dec 2018, 8:00 am Alan liu <notifications@github.com wrote:

But when I use your pretrianed mode 'my_model3.h5' t to predict my own cunstom image named 'InvasiveC2_2048x1536.jpg' ,then output is like: Average from all crops

Benign : 20.6134% InSitu : 31.7345% Invasive : 20.0719% Normal : 27.5802%

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rishiswethan/Cancer-detection-using-CNN/issues/7#issuecomment-450534964, or mute the thread https://github.com/notifications/unsubscribe-auth/ARdPCro0N9msa5nJr4cIHcnnxErRSgfmks5u-CVGgaJpZM4ZkyF0 .

liuhuihuii commented 5 years ago

I downloaded them from the internet. Maybe they are not labeled correctly, but I trust wiki anyways

liuhuihuii commented 5 years ago

For example, this image is from Wikipedia and it says normal on the site the output is Benign : 29.1999% InSitu : 21.6953% Invasive : 26.8959% Normal : 22.2089% all percentage is close to 25% normalc1_2048x1536

rishiswethan commented 5 years ago

Maybe there is some mismatch in the image formats then, I'm not sure what's wrong

On Sun, 30 Dec 2018, 8:26 am Alan liu <notifications@github.com wrote:

For example, this image is from Wikipedia and it says normal on the site the output is Benign : 29.1999% InSitu : 21.6953% Invasive : 26.8959% Normal : 22.2089% all percentage is close to 25% [image: normalc1_2048x1536] https://user-images.githubusercontent.com/40494837/50543943-59b50380-0c21-11e9-9e23-be8008375b96.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rishiswethan/Cancer-detection-using-CNN/issues/7#issuecomment-450535719, or mute the thread https://github.com/notifications/unsubscribe-auth/ARdPCu6gvRVITaCtXgi3bqcv4Nq_F5Moks5u-CtDgaJpZM4ZkyF0 .