<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>

CC BY-SA 4.0
2021-05-25T12:13:58.370Z
Do you mean exactly "if an user uploads any picture except an infected mango" or "if an user uploads any picture except a mango"?
NikoNyrh
CC BY-SA 4.0
2021-05-31T11:49:37.870Z
"any picture except a mango" @NikoNyrh
Tahmeed
CC BY-SA 4.0
2021-06-04T11:48:32.060Z
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).
nbro
<machine-learning><convolutional-neural-networks><image-recognition><supervised-learning>
How can my CNN produce an "unknown" label?
Tahmeed
# 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

