Api based automated plant disease analysis using transfer learning on pre-trained vision transformer model
摘要
Plant disease significantly impacts the agricultural economy. It also affects the morphology and colour of leaves, which serve as key markers for diagnosis. Manual classification of disease requires trained professionals; it is tedious and time consuming. Deep Neural Networks and other machine-learning techniques have been extensively used on diverse data sets for this purpose. Here, we have realized an efficient multiple-plant disease diagnostic model by implementing transfer learning on a pre-trained SWin Transformer. An efficient transformer architecture (hyperparameters and optimization methods) integrated with API has been developed to classify 38 types of plant diseases including apple scab, black rot and mosaic study. The model was trained using SWin Transformer architecture under controlled conditions. The proposed model was applied on “plant village dataset” comprising 55,448 images. The study demonstrates that transfer learning can help address the limitations of Vision Transformers, which are vulnerable to over-fitting and local optimality issues. Proposed hyper-parameters and optimization methods using transfer learning on SWin Transformer model yield 100% classification accuracy training dataset. The trained model was deployed on Google Cloud to overcome local device limitations. A Flask- based API, packaged in a Docker image and hosted on Google Cloud Run, helps retrieve the model from cloud storage on the client POST requests. The predicted results are returned via a JSON. The proposed API-based automated plant disease system can be integrated to mobile or drone-based field imaging systems, enabling a fast and cost-effective tool for mass screening of plan leaves in remote settings.