Custom image classifier for agriculture

Image classification with DeepLab

Pests and plant diseases identification

Plant diseases and pests can significantly impact crop yields and quality, leading to economic losses for farmers. Early detection and accurate identification of these issues are crucial for effective management and prevention strategies. Image classification using computer vision techniques plays a vital role in this process, enabling farmers to quickly identify diseases and pests from images captured by drones or cameras.

By training custom image classifiers, farmers can leverage machine learning algorithms to recognize specific diseases and pests based on visual patterns in plant images. These classifiers can be trained on images of healthy and diseased plants, allowing them to distinguish them based on visual features. Once trained, these classifiers can analyze new images in real time, providing farmers with instant feedback on the health of their crops.

image-classification diseases

How to train a custom image classifier in 5 minutes

DeepLab provides an intuitive interface for managing datasets, annotating images, and training custom image classifiers, allowing users to create models that can accurately classify images based on specific criteria. In this tutorial, we will walk you through the process of training a custom image classifier using DeepLab, focusing on a practical example of classifying screws as either good or bad.

screws images dataset

Follow these steps to achieve this:

1. Open DeepLab and create a new folder

Sign in to your Abraia account and go to DeepLab, to start creating a new folder (related to your classification task) called "screws." This is where you'll organize your dataset and training-related files.

create new folder

2. Download the dataset and upload the images

Download the screws dataset and unzip the files to a location on your local machine. Then, click the "upload" button to select and upload the images from the unzipped dataset to the "screws" folder in DeepLab.

upload images dataset

3. Annotate the screws images as good and bad

Navigate to the "screws" folder in DeepLab. Select images that represent good screws clicking on the checkboxes in every thumbnail. After selecting the images, click on the "annotate" button, and enter "good" as label. Select the remaining images, that represent bad screws (those not annotated as good). Click on the "annotate" button again, and enter "bad" as new label.

annotate screws images

4. Configure, train, and save the classification model

Click on the "train" button to start the training process. A notebook interface will open. Input your User ID and the API Key in the notebook. These credential are necessary for accessing the Abraia's training resources.

Inside the notebook, locate the cell that handles the dataset variable. Change the dataset value to "screws". Click "run all" to execute the entire notebook, which includes loading the dataset, defining the model, and training.

train classification model

Once the notebook finished execution, the trained model will be saved in the "screws" folder.

5. Test the model in your own device with DeepLab

Navigate to the "screws" folder and select the images you want to test. Then, double-click on one of the selected images to open the testing interface. DeepLab will display the model's predictions, indicating whether the screws are classified as "good" or "bad".

test classification model

Congratulations! You have successfully trained a classifier for screws using DeepLab. This tutorial provides a basic overview, and you can further explore advanced features, optimize your model, and fine-tune parameters based on your specific use case.


Contact Us