Is there any way to make my model only take input which is an x-ray image?

I am a newbie here in ML. I have a CNN model which predicts between 2 classes i.e. Pneumonia and Normal x-ray images.. It was great until I found that it also processes any image other than x-rays like Given a picture of a dog, it would still predict pneumonia or normal randomly. Is there any way to make it accept only x-ray images. or some workaround in Django to make it work?

Back to Top