Comparison of deep learning models for cauliflower disease classification

Like
Liked

Date:

In the tropical farmlands of Bangladesh, where cauliflower is a vital crop for both food and income, farmers face a silent crisis.

Diseases like Black Rot (a bacterial infection causing V-shaped leaf lesions) and Downy Mildew (a fungal disease marked by grayish fuzz under leaves) destroy nearly a third of their harvests every year, costing millions in losses.

For small-scale farmers, this can mean the difference between sending children to school or pulling them out to work. Traditional methods of spotting these diseases—like visually inspecting leaves or sending samples to labs—are slow, expensive, and often inaccurate.

But a groundbreaking study published in 2025 offers a solution: artificial intelligence (AI), a branch of computer science that enables machines to mimic human decision-making.

Researchers from the Military Institute of Science and Technology in Dhaka tested four deep learning models (advanced AI systems that learn patterns from data) to detect cauliflower diseases, achieving up to 90% accuracy.

The Problem of Cauliflower Diseases

Cauliflower, a vegetable rich in nutrients, is especially vulnerable in tropical climates. Warm temperatures and high humidity create ideal conditions for diseases to thrive. Black Rot, caused by the bacteria Xanthomonas campestris, starts as small yellow spots on leaves before spreading into V-shaped sores.

Downy Mildew, a fungal infection, coats the undersides of leaves with a grayish fuzz, while Bacterial Spot Rot creates waterlogged lesions that rot the florets. Left unchecked, these diseases can wipe out entire fields. In Bangladesh alone, Black Rot causes annual losses of 3–

15–30 per sample and take days to process, time farmers don’t have.

How Deep Learning Enters the Picture

Deep learning, a type of AI that mimics how humans learn by processing data through layered neural networks, has shown promise in solving such challenges. Earlier studies used it to detect diseases in citrus fruits and cassava with over 97% accuracy.

However, no one had tailored these models for cauliflower in tropical environments until this study. The research team compared four AI architectures:

  • VGG16 (a 16-layer model known for image recognition),
  • Inception v3 (a model that analyzes images at multiple scales),
  • ResNet50 (a 50-layer model with “skip connections” to avoid errors in deep networks),
  • custom CNN (a simpler 5-layer model they designed).

Their goal was to find a balance between accuracy and practicality, ensuring the solution could work on smartphones in remote areas.

Building the Dataset: A Foundation for Success

The first step was gathering high-quality images of diseased and healthy plants. Using a Sony Cyber-Shot camera, the team photographed cauliflower leaves and florets across farms in Bangladesh’s Manikganj district during December 2021 and January 2022.

They captured 8,000 raw images, which were then expanded to 7,360 using a technique called data augmentation—artificially altering images to simulate real-world variations. By rotating, flipping, and adjusting the brightness of images, they created scenarios like a leaf photographed at noon versus dusk.

This ensured the AI could recognize diseases even in poor lighting or odd angles. The final dataset included four categories: Healthy (2,060 images), Black Rot (1,800), Bacterial Spot Rot (1,730), and Downy Mildew (1,770).

Training the AI Models

Next, the team trained the four models using transfer learning—a method where a pre-trained model (already skilled at recognizing general shapes and textures from a large dataset like ImageNet, a database of 14 million labeled images) is fine-tuned for a specific task.

ResNet50, a model with 50 layers, stood out because of its skip connections, which allow data to bypass certain layers to prevent vanishing gradients (a common problem where deeper layers of a neural network stop learning effectively).

The custom CNN, though simpler with just five layers, included dropout (randomly deactivating neurons during training to prevent over-reliance on specific features) and batch normalization (standardizing inputs to stabilize learning).

Training lasted 100 epochs (complete passes through the dataset), with the data split into 80% for training, 10% for validation (adjusting model parameters), and 10% for testing.

Results: ResNet50 Takes the Lead

After rigorous testing, ResNet50 emerged as the most accurate model, correctly identifying diseases in 90.85% of cases. It excelled at detecting early-stage infections, such as the faint yellow halos around Black Rot lesions.

The custom CNN followed closely with 89.04% accuracy, proving that simpler models can still deliver strong results.

Inception v3, despite its advanced architecture, scored 85.45%, likely because its complexity required more data than available.

VGG16, an older model, lagged at 70.01%, showing that deeper networks aren’t always better. The team also measured precision (how many disease alerts were correct) and recall (how many actual diseases were spotted). ResNet50 scored 82.88% and 84.12% in these categories, respectively, outperforming the others.

Why ResNet50 Works Best

ResNet50’s success lies in its design. Traditional neural networks struggle with vanishing gradients, where deeper layers fail to learn as effectively as earlier ones. ResNet50 solves this with skip connections that allow data to bypass certain layers, preserving critical information.

For example, when analyzing a leaf with Downy Mildew, the model could focus on the fuzzy texture unique to fungal growth while ignoring irrelevant details like dew droplets.

The custom CNN, while less accurate, offered speed advantages. It processed images in 0.08 seconds on average, compared to ResNet50’s 0.23 seconds—a key factor for real-time mobile apps.

Challenges and Limitations

Despite promising results, the study had limitations. The dataset, though robust, came from a single region in Bangladesh. Diseases like Clubroot (a soil-borne infection causing swollen roots) were underrepresented because they’re harder to photograph.

ResNet50’s computational demands also pose a hurdle: training it required eight hours on a GPU (Graphics Processing Unit)—a high-performance chip used for complex calculations—making it costly for widespread use.

Farmers in pilot tests raised another concern—the “black box” nature of AI, where decisions are made without clear explanations. Without understanding how the models diagnose diseases, some hesitated to trust the results.

Real-World Applications

The implications of this research are vast. Imagine a farmer snapping a photo of a suspicious leaf and getting an instant diagnosis via a mobile app.

The study estimates such tools could reduce pesticide use by 40%, as treatments become targeted rather than blanket sprays.

Drones equipped with AI could monitor large fields, flagging outbreaks before they spread. Insurance companies might use the technology to assess crop health remotely, adjusting premiums based on real-time data. In Bangladesh, where agriculture supports millions, early adoption could prevent $500/hectare in annual losses.

Future Directions

The team plans to expand their dataset with images from India and Thailand, capturing regional variations in disease presentation. They’re also exploring hybrid models that combine CNNs with vision transformers (models that analyze image patches for better context understanding), which could boost accuracy to 95%.

Explainable AI (XAI) techniques, like heatmaps showing which parts of a leaf influenced the diagnosis, may address the “black box” issue. For rural areas with limited internet, the goal is to develop lightweight models (simplified AI systems) that run offline on $50 Raspberry Pi devices (affordable mini-computers).

A New Hope for Farmers

This study isn’t just about technology—it’s about resilience. For a farmer like Fatima Begum in Dhaka, who lost half her crop to Bacterial Spot Rot last year, AI could mean the difference between profit and ruin.

As climate change (long-term shifts in temperature and weather patterns) intensifies, such tools will become critical in adapting to unpredictable growing conditions.

The researchers emphasize that AI isn’t replacing farmers but equipping them with better tools. In their words, “It’s like giving a microscope to someone who’s been squinting at the horizon.”

Conclusion

Deep learning has crossed a new threshold in agriculture, proving it can tackle one of farming’s oldest challenges: disease detection. With 90% accuracy and growing affordability, these models offer hope for tropical regions where cauliflower isn’t just a crop but a lifeline. As the technology evolves, the dream of zero hunger (a UN Sustainable Development Goal to end global hunger by 2030) edges closer—one healthy harvest at a time.

Power Terms

Deep Learning: A type of artificial intelligence (AI) that teaches computers to learn from data, much like how humans learn from experience. It uses neural networks with multiple layers to analyze complex patterns, making it useful for tasks like image recognition. In the paper, deep learning models such as VGG16 and ResNet50 are used to detect diseases in cauliflower plants by analyzing leaf images. This is important because it helps farmers quickly identify and treat diseases, improving crop yields.

Convolutional Neural Network (CNN): A deep learning model specifically designed for processing images. CNNs use filters to detect edges, textures, and shapes in pictures, making them highly effective for tasks like disease detection. In the study, a custom CNN with five layers is used to classify cauliflower diseases. CNNs are widely used because they can automatically learn important features from images without manual input.

Transfer Learning: A technique where a pre-trained model (already trained on a large dataset) is adapted for a new task. For example, the study uses models like VGG16, originally trained on ImageNet, and fine-tunes them for cauliflower disease detection. This saves time and computational power compared to training a model from scratch.

VGG16: A deep CNN model with 16 layers, known for its simple and uniform architecture. It uses small 3×3 filters to analyze images. In the paper, VGG16 is tested for disease classification but achieves only 70% accuracy due to its high computational requirements. Despite this, it remains an important benchmark in image recognition research.

Inception v3: A deep learning model that uses “inception modules” to process images at different scales efficiently. In the study, Inception v3 achieves 85% accuracy in detecting cauliflower diseases. Its design reduces computational costs while maintaining high performance, making it useful for complex tasks.

ResNet50: A CNN with 50 layers that uses “residual connections” to skip certain layers during training, preventing common issues like vanishing gradients. ResNet50 achieves the highest accuracy (90.85%) in the study, outperforming other models. Its ability to train deep networks effectively makes it a powerful tool for image analysis.

Data Augmentation: A technique to artificially increase the size of a dataset by modifying existing images (e.g., rotating, flipping, or adjusting brightness). The study uses Keras’ ImageDataGenerator to create 7,360 images from 656 originals. This helps prevent overfitting and improves the model’s ability to generalize.

Accuracy: A metric that measures how often a model’s predictions are correct. It is calculated as the number of correct predictions divided by the total number of predictions. In the paper, ResNet50 achieves 90.85% accuracy, meaning it correctly classifies 90 out of 100 images. High accuracy is crucial for reliable disease detection.

Precision: A metric that shows how many of the model’s predicted “disease” cases are actually correct. It is calculated as the number of true positives divided by the sum of true positives and false positives. For example, if a model flags 10 diseased leaves and 8 are correct, precision is 80%. High precision reduces false alarms for farmers.

Recall: A metric that indicates how many actual diseases the model detects. It is calculated as the number of true positives divided by the sum of true positives and false negatives. If there are 10 diseased leaves and the model finds 7, recall is 70%. High recall ensures fewer infections are missed.

F1 Score: A balanced measure of precision and recall. It is calculated as 2 multiplied by the product of precision and recall, divided by the sum of precision and recall. The custom CNN achieves an F1 score of 75.38%, showing it effectively balances false positives and negatives.

Black Rot: A cauliflower disease caused by the bacteria Xanthomonas campestris. Symptoms include yellow V-shaped spots on leaves and blackened veins. The study uses images of Black Rot-infected leaves to train models. Early detection helps farmers take action to prevent crop losses.

Downy Mildew: A fungal disease that causes yellow patches and fuzzy growth on cauliflower leaves, especially in humid conditions. The paper includes Downy Mildew in its dataset, and models like ResNet50 learn to identify its distinct patterns.

Bacterial Spot Rot: A disease caused by bacteria like Pseudomonas, leading to small, water-soaked spots on leaves. The study’s dataset includes this disease, and the custom CNN detects it with 75% precision. Timely detection helps control its spread.

Hyperparameters: Settings that control how a model learns, such as learning rate (how fast it updates) or batch size (number of images processed at once). In the paper, models use a learning rate of 0.001 and a batch size of 32. Proper tuning of these parameters improves model performance.

Overfitting: A problem where a model performs well on training data but poorly on new, unseen data. For example, VGG16’s flat validation curve suggests overfitting. The study uses techniques like dropout layers and data augmentation to prevent this issue.

Dataset: A collection of data used to train or test models. The study uses the VegNet dataset, which contains 7,360 images of healthy and diseased cauliflower leaves. A high-quality dataset ensures models learn real-world variations and generalize well.

ImageDataGenerator: A tool in Keras that automatically augments images by applying transformations like rotation, zooming, and flipping. The study uses it to create diverse training examples, helping models generalize better to new images.

Batch Normalization: A technique that standardizes the inputs to each layer in a neural network, making training faster and more stable. The custom CNN uses batch normalization after each layer to improve learning efficiency.

Pooling Layer: A layer in a CNN that reduces the size of an image while retaining important features. For example, max-pooling selects the highest value in a small grid of pixels. This makes the model more efficient and less sensitive to noise.

Fully Connected Layer: A layer in a neural network where every neuron connects to all inputs from the previous layer. In the custom CNN, this layer converts extracted features into probabilities for each disease class.

Softmax Activation: A function that converts the model’s final outputs into probabilities (ranging from 0 to 1). For instance, Softmax might assign an 80% probability to “Black Rot” and 20% to “Healthy.” It is used in the final layer for classification.

Adam Optimizer: An algorithm that adjusts the learning rate during training to improve efficiency. The study uses Adam with a decay rate of 0.0001 to fine-tune models effectively.

IoT (Internet of Things): A network of connected devices (e.g., sensors, drones) that collect and share data. The paper suggests IoT could be used to monitor fields in real time, providing images for disease detection models.

Edge Computing: Processing data on local devices (like smartphones) instead of relying on cloud servers. The study proposes deploying models on edge devices so farmers can diagnose diseases offline, even in remote areas.

Reference:

Arnob, A. S., Kausik, A. K., Islam, Z., Khan, R., & Rashid, A. B. (2025). Comparative result analysis of cauliflower disease classification based on deep learning approach VGG16, inception v3, ResNet, and a custom CNN model. Hybrid Advances, 10, 100440. https://doi.org/10.1016/j.hyba.2025.100440

ALT-Lab-Ad-1
ALT-Lab-Ad-2
ALT-Lab-Ad-3
ALT-Lab-Ad-4
ALT-Lab-Ad-5
ALT-Lab-Ad-6
ALT-Lab-Ad-7
ALT-Lab-Ad-8
ALT-Lab-Ad-9
ALT-Lab-Ad-10
ALT-Lab-Ad-11
ALT-Lab-Ad-12
ALT-Lab-Ad-13

Recent Articles