I'm working on the PlantVillage dataset and i want to predict the type of the disease from the image of a leaf. The dataset is labeled in pairs (Type of the plant,Healthy/name of the disease). I'm wondering which approach from the following is better ? Should I build 2 neural nets, one for recognizing the type of the plant, and the second for the name of the disease. Or, should i build one neural net that predicts at the same time the name of the plant and the disease. In my opinion the first approach is better because i'll have more data for each task while in the second approach i'll have more classes and less data for each class. However, there might be a correlation between the plant and the disease that might improve the performance of the model.

  • 1
    $\begingroup$ Kindly add a link to PlantVillage dataset! It's difficult ro recommend anything without understanding atleast basic structure of dataset. Also you stated that "first approach is better", could you share code to substantiate your opinion & for us to review. Thanks! $\endgroup$ – Random Nerd Jun 24 '19 at 19:45

I think this approach should work. So we need to clasify the plant and its disease. As mentioned, the disease maybe be associated with the plant's species.

  1. Build a standard CNN or Siamese CNN for identifying the plant species. The model should be able classify the name/species of the plant even when it has a disease of some another plant ( The classification should not be baised upon the plant's disease ).

  2. So, now, after the above model is ready, we build a 2nd model for disease classification. But the classification of the disease maybe be dependent on the plant species. So, for the 2nd model we will have 2 features namely, the image ( raw sample ) and the output of the 1st model ( plant name ). So, the 2nd model's prediction will be based on these two features.

The basic idea will be:

Model 1: input = image, output = plant name. Model 2: input = ( image, plant name ), output = disease name.

So this is a system of models. That's easy if you are working with Keras or PyTorch.

Hope that helps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.