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

Cannot use my own image #6

Open liuhuihuii opened 5 years ago

liuhuihuii commented 5 years ago

i cannot use my own image that is not 512*512 for the model to test bc it says ValueError: setting an array element with a sequence, while the image in the sample folder is ok

rishiswethan commented 5 years ago

"setting an array element with a sequence" simply means the size of arrays inside the list are different. Example: [[1,2], [1,2,3]]

Now, in regards to this question, the input image has a different size than the images that the model has been trained upon. Refer the sample image for dimensions

liuhuihuii commented 5 years ago

is there any method to change the code so that any size of image can be used as input?

rishiswethan commented 5 years ago

It won't fit the model. You need to use a method called pooling to change the size of the image

On Sat, 29 Dec 2018, 2:50 pm Alan liu <notifications@github.com wrote:

is there any method to change the code so that any size of image can be used as input?

— 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/6#issuecomment-450478621, or mute the thread https://github.com/notifications/unsubscribe-auth/ARdPCl4bBZrq1el_DehwvJDsqHt1UHo1ks5u9zPWgaJpZM4ZkdbP .