Body: <p>I have a dataset of 20k images of infected mango. I have built a web-based app using Flask, where a user can upload a picture, and my CNN model detects the disease. I have 6 classes in the model, which correspond to 6 types of diseases.</p>
  <p>My question is: how do I train the model so that, if a user uploads any picture except infected mango, the model will show &quot;not mango&quot;?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-25T12:13:58.370Z
Comments.Text: Do you mean exactly "if an user uploads any picture except an infected mango" or "if an user uploads any picture except a mango"?
Comments.UserDisplayName: NikoNyrh
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-31T11:49:37.870Z
Comments.Text: "any picture except a mango" @NikoNyrh
Comments.UserDisplayName: Tahmeed
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-04T11:48:32.060Z
Comments.Text: We had similar questions in the past. You can check them [here](https://ai.stackexchange.com/q/18745/2444), [here](https://ai.stackexchange.com/q/4889/2444), [here](https://ai.stackexchange.com/q/26729/2444) and [here](https://ai.stackexchange.com/q/26175/2444).
Comments.UserDisplayName: nbro
Tags: <machine-learning><convolutional-neural-networks><image-recognition><supervised-learning>
Title: How can my CNN produce an "unknown" label?
UserDisplayName: Tahmeed
ThreadText: # How can my CNN produce an "unknown" label?
  
  (Asked by: username_0 on 2021-05-24)
  
  I have a dataset of 20k images of infected mango. I have built a web-based app using Flask, where a user can upload a picture, and my CNN model detects the disease. I have 6 classes in the model, which correspond to 6 types of diseases.
  
  My question is: how do I train the model so that, if a user uploads any picture except infected mango, the model will show "not mango"?
  
  **Tags:** machine-learning, convolutional-neural-networks, image-recognition, supervised-learning
  
  > **Comments:**
  > **username_1**: Do you mean exactly "if an user uploads any picture except an infected mango" or "if an user uploads any picture except a mango"?  
  > **username_0**: "any picture except a mango" @username_1  
  > **username_2**: We had similar questions in the past. You can check them [here](https://ai.stackexchange.com/q/18745/2444), [here](https://ai.stackexchange.com/q/4889/2444), [here](https://ai.stackexchange.com/q/26729/2444) and [here](https://ai.stackexchange.com/q/26175/2444).  
  
  ---
  
  ## 0 answers
  
  