Farmers want to know leaf areas and often resort to counting leaves. Leaf areas provide farmers with critical data on photosynthetic capacity, crop health, and yield potential, enabling precise management decisions. Knowing the leaf area can allow farmers to tailor irrigation and fertilization to specific crop needs, preventing overuse and reducing costs while boosting efficiency. At the same time changes in leaf area reveal stresses like drought, disease, or nutrient deficiency, allowing for early intervention. Since leaves produce approximately 90% of plant biomass, measuring leaf area helps estimate crop yield. Farmers used to judge it with their eyes, fancier systems could measure it exactly but were time consuming and expensive. A new open-source computer vision study offers free software and a new option. Simply take a picture and let the software count for you.

Leaf area for tomatoes needs free software

Until recently, research was limited in leaf counting across different growth phases of tomatoes, particularly for agrivoltaics where variations in light and surrounding environmental conditions can influence plant structure and growth. Practical greenhouse monitoring requires a lightweight method for consistent, automated leaf counting that can adapt to noisy backgrounds, overlapping leaves, and variations in canopy structure.

Free software for counting leaves of tomatoes

This new study presents the first tomato-focused leaf counting pipeline developed and validated using weekly image data collected under greenhouse and agrivoltaic greenhouse conditions. The dataset includes ground truth counts and pseudo-labeled counts where manual counting was infeasible. The pipeline is based on a two-stage deep learning approach: 1) convolutional neural network (CNN) regression model based on MobileNetV2 is trained directly to predict the leaf counts from top-view crop images and 2) U-Net segmentation model based on a subset of manually annotated images enhances predictions, especially in cases of occluded and overlapped leaves.

Across the test datasets, the CNN regression model consistently produced good predictions within a ± 3 margin for actual leaf manual counts. The model’s performance was evaluated using the coefficient of determination (R2) which ranges between 0.7 and 0.9, which is comparable or exceeds the performance reported in recent leaf-counting studies. The CNN regression stage efficiently learned structural and textural features from limited data, while the U-Net refinement enhanced spatial understanding which provides segmentation-based visual validation. You can download the open source software for free here, whether you work for Heinz or just want to take better care of the tomatoes in your garden . The software is released under GNU General Public License (GPL) 3.0 so anyone is allowed to use it.

What this all means is that this combination ensured both computational efficiency and model transparency which is important for operational use in greenhouse monitoring and edge-AI deployment. In the end this means more tomatoes at lower costs. This is good because tomatoes are good for you. They are nutrient-dense, low-calorie foods packed with essential vitamins, minerals, and powerful antioxidants. Their primary health benefits stem from lycopene, vitamin C, potassium, and vitamin K, which collectively support heart health, reduce inflammation, and protect against chronic diseases.

Enjoy your tomatoes and the open-source and free software that takes the tedium out of measuring leaf area with a simple camera and a few photos.