Skip to main content

X-ray driven peanut trait estimation: computer vision aided agri-system transformation



In India, raw peanuts are obtained by aggregators from smallholder farms in the form of whole pods and the price is based on a manual estimation of basic peanut pod and kernel characteristics. These methods of raw produce evaluation are slow and can result in procurement irregularities. The procurement delays combined with the lack of storage facilities lead to fungal contaminations and pose a serious threat to food safety in many regions. To address this gap, we investigated whether X-ray technology could be used for the rapid assessment of the key peanut qualities that are important for price estimation.


We generated 1752 individual peanut pod 2D X-ray projections using a computed tomography (CT) system (CTportable160.90). Out of these projections we predicted the kernel weight and shell weight, which are important indicators of the produce price. Two methods for the feature prediction were tested: (i) X-ray image transformation (XRT) and (ii) a trained convolutional neural network (CNN). The prediction power of these methods was tested against the gravimetric measurements of kernel weight and shell weight in diverse peanut pod varieties1. Both methods predicted the kernel mass with R2 > 0.93 (XRT: R2 = 0.93 and mean error estimate (MAE) = 0.17, CNN: R2 = 0.95 and MAE = 0.14). While the shell weight was predicted more accurately by CNN (R2 = 0.91, MAE = 0.09) compared to XRT (R2 = 0.78; MAE = 0.08).


Our study demonstrated that the X-ray based system is a relevant technology option for the estimation of key peanut produce indicators (Figure 1). The obtained results justify further research to adapt the existing X-ray system for the rapid, accurate and objective peanut procurement process. Fast and accurate estimates of produce value are a necessary pre-requisite to avoid post-harvest losses due to fungal contamination and, at the same time, allow the fair payment to farmers. Additionally, the same technology could also assist crop improvement programs in selecting and developing peanut cultivars with enhanced economic value in a high-throughput manner by skipping the shelling of the pods completely.

This study demonstrated the technical feasibility of the approach and is a first step to realize a technology-driven peanut production system transformation of the future.


Markets and value-chains linked to agricultural produce face many irregularities related to misrepresentation of the raw produce value [1, 2]. Such irregularities are common during procurement and, whether intentional or not, are percolating the emerging markets resulting in tremendous financial losses for the individual companies [3,4,5,6,7,8]. A key factor causing procurement irregularities is the non-transparent estimation of the commodity price. When coupled with poor value-chain logistics and a lack of storage facilities, which is common for the emerging markets, further challenges related to commodity quality and safety arise [3, 9,10,11]. Unfortunately, within the current agricultural commodity trade the primary producers are affected the most.

Several technologies have been used to mitigate hurdles in the agricultural commodities trade related to standardization assessments of commodity values and/or safety [12,13,14,15]. However, these technologies include classical destructive manual or laboratory testing methods (e.g., gravimetry, DNA sequencing, mass spectroscopy, biochemical analyses) but also consider the indirect methods for commodity evaluation based on sensors (e.g., near infra-red or X-ray spectroscopy) [3, 12,13,14, 16]. The technology driven solutions, especially the portable ones, are in the spotlight of the international authorities as they might provide effective means to fill the blank spots of various agricultural value-chains [12, 16,17,18,19]. Within these, the X-ray-based systems are being used for non-destructive inspections of food matter structure, density, composition and homogeneity [20,21,22,23,24,25,26,27,28] and are used for many applications related to standard grain evaluation and inspection [29,30,31,32,33,34,35,36,37,38,39,40,41,42]. Although X-ray systems are traditionally stationary, the recent technology advancement highlighted the technology can be mobilized for a range of out-doors applications. The CTportable series is one of the examples [43] demonstrating that it is possible to scale the system in terms of size and throughput for dedicated use-cases. With these kinds of X-ray systems, it is possible to skip the destructive part of material evaluation—i.e., the shelling of peanuts in this example. One of the major points is always the radiation protection needed to assure a safe operation with these mobile systems. However, not only portable CT devices but also handheld X-ray fluorescence scanners are already available. Nevertheless, the mere availability of these kinds of systems does not imply the easy and fast detection of price indicators. For this, adapted imaging pipelines are needed to generate the relevant price indicator out of the captured raw data.

In the case study presented, we investigated whether an X-ray-based system is a suitable technology option to assess the peanut commodity price indicators (Fig. 1). As a demonstration use-case, we selected the peanut value-chain in the Kalyandurg mandal (14.55°N, 77.11°E, 656 m; an administrative division of Anantapur district, Andhra Pradesh, India). In this case, the commodity is procured by aggregators from the farmers in their fields in the form of whole peanut pods. The procurement costs depend mostly on subjective visual evaluation (physical contaminations, damages, kernel size) and shelling percentage (kernel weight/total pod weight estimated gravimetrically) estimated by the aggregator [44, 45]. The pooled produce is then transported to a processing unit where the raw peanut is shelled, kernels mechanically graded and further sold based on the features of recovered kernels (physical properties and biochemical composition). At present, the procurement speed does not guarantee that all farmers in the region can be visited on time. This can result in crop value deteriorations—mainly fungal contamination [46,47,48,49]. We also argue that substituting the manual procurement method with suitable technology could, in the future, standardize and accelerate the procurement process and, at the same time, allow fair-procurement cost estimation for the producers while avoiding the produce deterioration.

Herewith, we present a proof-of-concept study which investigates whether the 2D X-ray scans of whole peanut pods in combination with several feature prediction algorithms can be used to predict peanut attributes that are important for peanut commodity price estimates (i.e., kernel weight and shell weight).

Fig. 1
figure 1

Graphical abstract showing the differences of the current process of evaluating produce compared to the described technology-based process as presented in this publication


Peanut varieties evaluation for price indicators: kernel weight, shell weight, shelling percentage

Three market price driving features of peanut pods; i.e., kernel weight (g/pod), shell weight (g/pod) and shelling percentage (100*total kernel weight/total pod weight) were analyzed in the study (details in "Peanut commodity price indicators"). The evaluated kernel weights ranged from 0.003 g to 2.47 g/pod with the average of 0.83 g/pod (Fig. 2a, Additional file 1: Table S1). Similarly, the minimum shell weight in the studied dataset was 0.05 g/pod while the maximum was 1.40 g/pod with an average of 0.38 g/pod (Fig. 2b, Additional file 1: Table S1). Shelling percentage—another parameter of economic importance—spanned across 1.5% to the maximum 87.8% with an average of 67.65% (Fig. 2c, Additional file 1: Table 1). The distributions of values for all three features in the analyzed dataset were skewed towards lower values (i.e., the lower values were over-represented in the dataset, Fig. 2a–c) which had significant implications for the construction of the CNN feature predicting algorithms (i.e., the importance of each value for CNN construction was weighted based on the frequency of its abundance in the dataset; see "Peanut pod features prediction from X-ray scans through image transformation (XRT) and a convolutional neural network (CNN) regression model", "Feature predictions methods and comparison metrics"). The in-depth analysis further revealed there were significant differences among the 39 investigated varieties in all three characters: kernel weight, shell weight and shelling percentage (Additional file 1: Fig. S1a–c).

Fig. 2
figure 2

Boxplots depicting the distribution and range of kernel weight (a), shell weight (b), and shelling percentage (c) across 39 diverse peanut varieties assessed in the study. Kernel and shell weight were quantified by gravimetric measurements as a ground truth and shelling percentage was calculated as the ratio of kernel weight to total pod weight. Details on the varieties used are further elaborated in Additional file 1: Table 1 and Fig. S1 a–c

Peanut pod features prediction from X-ray scans through image transformation (XRT) and a convolutional neural network (CNN) regression model

The peanut pods were scanned using the X-ray system CTportable160.90 ("2D X-ray images" section). The resulting X-ray projections were pre-processed ("Image treatment" section) and, consequently, two methods have been used to predict the peanut pod characters: kernel weight and shell weight (X-ray image transformation: "Features prediction using X-ray transformation (XRT) of images", and convolutional neural network: "Features prediction using CNN regression model"). To express prediction accuracies and enable the comparison of the two pod feature prediction methods, the descriptive statistics of linear correlation function between values predicted by X-ray image transformation (XRT) and the Convolutional Neural Network (CNN) method with ground truth measurements were used (Table 1a,b, Fig. 3, details in "Feature predictions methods and comparison metrics" section).

Table 1 a,b Summary of statistical indicators used to evaluate the prediction power of the direct X-ray images transformation (XRT) model and the CNN model for inferring the kernel weight and shell weight from 2D X-ray scans
Fig. 3
figure 3

Regression plots illustrating the prediction power of CNN a, b and direct X-ray images transformation (XRT; c, d) models for kernel weight (a, c, solid circle) and shell weight (b, d, solid square) parameters. Graphs visualize the relation of the 10% of the dataset (“test set”) to the actual gravimetrically estimated ground truth which was used to infer the statistical metrics. The expanded statistical metrics of this dataset is summarized in Table 1b. Kernel weight (solid circle); Shell weight (solid square); Solid line (—) depicts the linear regression between the ground truth observations and predictions; Dashed line (---) indicates the 1:1 relation

This included splitting the data set into training (see Table 1a) and test (see Table 1b, Fig. 3) set which included 90% and 10% of the data set, respectively., For both methods (XRT and CNN), the evaluation metrics, i.e. the goodness of the fit for the linear regression between ground truth characters and their predictions by XRT and CNN, are summarized in Table 1a,b (Pearson correlation coefficient (r), coefficient of determination (R2), mean square error (MSE), mean average error (MAE), slope and intercept). The correlations of the test set are visualized separately in Fig. 3a–d.

The test set metrics (Table 1b, Fig. 3b, d) for total kernel weight showed that both methods generated relevant predictions as both achieved R2 ~ 0.94 and mean absolute error (MAE) < 0.17 (MAE was slightly lower for the CNN method). The CNN model predicted the shell weight with similar accuracy (R2 = 0.91) as the total kernel weight (R2 = 0.95) but the prediction via the XRT method had notably lower R2 values (kernel: R2 = 0.93, shell: R2 = 0.78). Nevertheless, the MAE for the shell weight prediction was lower for XRT (MAE = 0.08) compared to CNN (MAE = 0.09). The linear regression slope on the test dataset was closer to 1 for the XRT method compared to CNN for kernel weight. The intercept was lower for CNN compared to XRT for the predictions of kernel weight and higher for CNN compared to XRT for shell weight predictions (Table 1b, Fig. 3).

The prediction accuracy of these two methods was also assessed using PCA biplots (Fig. 4a, b, "Feature predictions methods and comparison metrics" section). The results showed that there was generally a good agreement between predictions of features by XRT and CNN for kernel weight and shell weight (~ 99% loading on principal component 1). The principal component 2 (explaining ~ 1% variability in the dataset) pointed out that CNN predictions were closer to the ground-truth values compared to XRT for both kernel and shell weight. This method also indicated that some varieties were predicted with markedly different accuracies by XRT and CNN methods. This was apparent with genotype ICGV86564 which had the largest pods and kernels in the whole dataset (Additional file 1: Table S1).

Fig. 4
figure 4

Principal Component Analysis (PCA) and visualization of two main principal components that explained > 99% of variation in kernel weight (a) and shell weight (b). The graph represents the main relations between observed kernel weight (Obs_KW) and shell weight (Obs_SW) and their prediction by XRT (XRT_KW, XRT_SW) and CNN (CNN_KW, CNN_SW)


Analysis of peanut traits of economic significance

The analyzed peanut varieties encompassed a large range of variability for kernel weight (0.003–2.47 g/pod), shell weight (0.05–1.40 g/pod) and their ratio–shelling % (1.5%–87.8%), sufficiently representing the cultivated South Asian gene-pool [50, 51]. In many of the peanut market scenarios, the price incentives are primarily linked to a higher proportion of larger kernels and high shelling percentage (high proportion of kernel mass in total pod mass) in the raw produce [44, 45, 52]. Similarly, crop improvement programs have to breed for the same traits in order to enhance the economics of peanut farming. This is currently difficult because evaluation of these traits in both processes (i.e., market and breeding) relies on manual assessment which is time-consuming and potentially error-prone (e.g., [3, 44, 51,53, 54]. Therefore, assessing the potential of emerging X-ray technology options and advanced data analytics to close these gaps was the main motivation of the presented study.

X-ray technology options for the rapid assessment of peanut commodity features

Through this study we have demonstrated that an X-ray imaging system (CTportable160.90) [43] combined with XRT- and CNN-based algorithms is a relevant technology base suitable to assist current peanut value-chains and breeding. While the use of the XRT method for similar applications in other crops has already been established [25,26,27, 54] its applicability for the peanut crop was tested here for the very first time. Also, the utilization of CNN algorithms for similar tasks is new and has not been attempted before.

Within our dataset, both methods (XRT and CNN) predicted the peanut produce characteristics of economic value with relevant accuracies (R2 > 0.94, MSE < 0.21 for kernel weight; R2 > 0.82, MSE < 0.1 shell weight). Although both algorithms predicted features of most of the pods similarly, the CNN predictions were closer to the ground truth observations, especially while dealing with the prediction of extreme values and contaminated pods (e.g., large pods and pods with soil remnants).

With the current system, the pod holder preparation and scanning took approximately 2 min and the prediction of features took less than 1 s (XRT) and 6 secs (CNN). Thus, a rapid estimation of the quality aspects of unshelled peanuts is possible and could support the current pod-evaluation process tremendously. However, the concrete time- and cost-efficiency of the current technology set-up were beyond the scope of this feasibility study. This will be, certainly, an important next step in the technology transfer pathway for dedicated use in the peanut value-chain and breeding. Technology interventions similar to those presented hereby could support global efforts to bridge the remaining blind spots in agricultural commodity value-chains [56]. The same technology interventions in the crop improvement process would enable faster evaluation and release of more economically beneficial cultivars.

Furthermore, the approaches currently validated on peanuts can be readily adapted to other crops where the removal of the grain shell pose difficulties for kernel features evaluations (e.g. rice, barley or oats). In such cases the "virtual shelling” enabled by X-ray technology could largely offset these hurdles. X-ray scanning is also suitable for evaluation of whole panicles (cereals) or pods (legumes) where it can offset the laborious process of grain threshing as shown before [20, 21, 25, 34, 35, 42]. Also X-ray can be used for non-destructive evaluation of inner structures and physical properties of the grains, tubers etc. Many of these are important factors related to grain processing (e.g. milling) or internal tissue health [20, 21, 27, 29, 42, 59] and automation can open new avenues to agricultural research.


Many farming communities that depend on peanut production systems face numerous challenges related to irregularities in peanut produce procurement. In these market scenarios, the procurement process often begins with a slow manual shelling and weighting of peanuts at the farmers gates. Resulting delays in procurement can lead to produce contamination due to inadequate storage [47, 48]. In line with the international committee for food value and safety [3, 10, 56,57,58], we argue that the current procurement process could be streamlined using novel portable technologies [18, 40, 41]. Therefore, we tested the relevance of X-ray-based technology for the prediction of the key indicators of peanut produce price, kernel and shell mass. For the first time, we adapted a recently patented procedure building on a 2D-X-ray projection conversion method for biomass determination [59] and developed completely novel CNN algorithms to predict kernel and shell mass from whole peanut pod projections.

We showed both methodologies were relevant to predict the kernel and shell mass non-destructively from the 2D-X-ray pod projections. If operationalized on the ground, these could standardize and accelerate peanut commodity procurement. This acceleration would limit the risk of fungal contaminations due to inadequate storage and, at the same time, the non-destructive assessment of kernel weight, shell weight and shelling percentage would grant a fair price to farmers. The same technology could be used as a part of the peanut breeding process to accelerate the selection of economically viable products and assist peanut researchers in general. Beside the demonstrated application for the peanut procurement in India, the same technology can be adapted for assessing optically occluded features in harvested plant material. This can range from legume pods, rice grains up to the whole cereal panicles and thus offset the manual or destructive shelling or threshing process. Of course, this would need to adapt the presented imaging pipeline and algorithms used within this publication.

Materials and methods

Graphical overview

Raw peanut procurement price typically depends on physical parameters of the peanut pods: i.e., kernel and shell mass. These are notoriously difficult to assess manually ("Peanut commodity price indicators"). We gathered peanut varieties representing the range of the peanut commodities in South Asian markets ("Peanut varieties used and ground truth measurements"). The whole pods were scanned by X-ray (2D X-ray images) and, consequently, the manual gravimetric measurements of kernel and shell mass were measured ("Peanut varieties used and ground truth measurements"). Altogether, 1752 of 2D X-ray projections of individual peanut pods were taken. The images were pre-processed ("Image treatment") and the two methods for the prediction of peanut kernel mass and shell mass trained and applied: (a) X-ray image transformation for biomass assessment (XRT method, "Features prediction using X-ray transformation (XRT) of images") and convolution neural network (CNN method, "Features prediction using CNN regression model") (Fig. 5). The standard metrics were defined to compare these two methods for their prediction accuracy, i.e., to infer peanut kernel and shell weight from pre-processed 2D X-ray scans of peanut pods ( "Feature predictions methods and comparison metrics" section).

Fig. 5
figure 5

Overview about the workflow, the market demand and the derived metrics to rate the quality of peanut pods

Peanut commodity price indicators

The international peanut commodity market considers many traits linked to the pods and kernel features related to their physical and biochemical characters (generic guidelines for international trade, [44, 45, 58, 60]. In the selected use case for peanut value-chains (Sri Satya Sai Raithu MAC Federation Limited and commodity aggregators [61], Anantapur, Andhra Pradesh, India), only a few of these features are considered now Due to the manual processes involved in the grading, the estimation of peanut procurement cost is time consuming (typically < 30 min to assess a produce lot). Due to the lack of the storage facilities, any delay in procurement poses an additional threat to the safety of the produce (mainly the risk of fungal contaminations).

Peanut varieties used and ground truth measurements

To assess the technology potential, we used peanut varieties representing the range of the variability in pod and kernel sizes and shapes relevant to South Asian markets. These included 30 breeding lines and 4 released cultivars popular with Indian farmers obtained from the experimental field at the ICRISAT research station, South Asia peanuts improvement team. These have been grown under optimal irrigation and fertilization regimes in alfisol fields during the rainy season (June–September 2019). Each of the varieties contained a subset (~ 0.5 kg) of pods from several plants harvested from experimental plots. The typical trial plot size was 1.2 × 2 m.

We also included 5 peanut crops harvested from 5 different small-scale farmer fields (typically ~ 2 ha of the cropped land) in the Anantapur region in the rainy season (June–September 2019). Here, the peanut crop is typically raised on sandy soils and each farmer adapts different crop management strategies as per the available resources. We collected the sub-set of raw produce from 5 different fields (~ 0.5 kg), which contained a mix of pods from different plants. Altogether, 1752 peanut pods were analyzed. The details of these varieties and their analysis are in the Additional file 1: Table S1 and Fig. S1 a–c.

From each subset of collected peanut varieties ~ 40 pods were randomly selected. This roughly corresponds to the peanut pod quantity on which aggregators would estimate the price for the farmer's produce. Consequently, the X-ray 2D projection images of all pods were taken (details in "2D X-ray images"). Then, for each of the scanned pods, the ground truth measurements of kernel weight and shell weight were conducted gravimetrically (KERN balance, 0.001 accuracy, the evaluation by aggregators is also done gravimetrically). From the total kernel weight and the shell weight, the shelling percentage was calculated for each individual pod via \(s=\frac{{W}_{k}}{{W}_{p}}\cdot 100\). In this formula, \(s\) represents the shelling percentage calculated by dividing the kernel weight \({W}_{k}\) by the total weight of the pod \({W}_{p}\) and multiplying it with 100.

The distribution of all pod feature ranges (kernel weight, shell weight and shelling percentage) covered by the study were displayed in the boxplots (R software, version 4.0.2). The variation within and among the characters of different peanut varieties were visualized using the basic Quartile Box Plot method with the data distribution display (Tibco Spotfire software, version 10.7.0). The significance of differences in the peanut pod characteristics among the varieties were tested using a one-way ANOVA test followed by the Tukey–Kramer test for the pair-wise comparison of the individual varieties (Genstat software,18th Edition).

2D X-ray images

2D X-ray images were taken using the CTportable160.90 system from the Development Center X-Ray Technology (EZRT) of the Fraunhofer Institute of Integrated Circuits (Fürth, Germany). The technical details of the system can be found via [2527, 43]. In brief, the scanner consists of an X-ray source with acceleration voltages ranging from 30 to 90 kV, a current up to 160 µA and a detector size of 2304 × 1300 pixels (49.5 μm pixel size). The sample stage can be positioned between the X-ray source and the detector with a minimum focus object distance (FOD) of 16 mm and a maximum FOD of 285 mm, resulting in a maximum resolution of about 2.8 μm. The detector is a 14-bit CMOS sensor (Teledyne DALSA Shad-o-Box 3 K HS) featuring a direct-contact Gd2O2S scintillator (Kodak Min-R 2190) scintillation foil.

To test the minimum technology requirements for feature extractions, only 2D projections of peanut pods were used. For this, the peanut pod holder was designed and crafted from extruded polystyrene (eps) to hold 4 peanut pods at the time. To cover the largest field of view, the pod holder was fixed directly onto the detector, resulting in an optical magnification close to 1. The system was operated at 60 kV and 103 µA with an exposure time of 300 ms resulting in a resolution of about 49.5 µm. A total of 438 2D X-ray projections were taken with 4 pods in the holder resulting in 1752 individual pods. Including changing the pod holder, system preparation and measurement, each scan took about 2 min. The system functionalities were controlled by the software Volex10 (Fraunhofer Institute of Integrated Circuits, Germany [62]).

Image treatment

We took altogether 438 projections of the eps grid organized to carry four separate pods (1752 pods). Each image was cropped into four to display just one peanut pod and exported into an image format (TIFF). The raw images consisted of gray pixel values in a range from 5597 to 707 (mean of pixel values 4906.43).

The following steps were designed to create labels and compensate for the absorbance of the residual eps-grid projections (i.e., “border”; Fig. 6b). For this, two projections containing the empty eps grid were taken and exported as a TIFF image. Images were averaged to generate “mean blank images" (see Fig. 6c). The mean blank images were then subtracted from all the peanut images. After the subtraction of the mean blank images, some pixels had negative values. To eliminate them, each pixel of each image was squared, and the square root was taken (Fig. 6d). Afterwards, to create labels of the residuals of the eps-grid, a threshold of 5250 was iteratively determined within a subset of randomly chosen peanut images which were visually checked. All values below this threshold were set to 0 (black), the rest to a value of 65,535 (white/ highest unsigned integer value, Fig. 6e).

Fig. 6
figure 6

Individual steps involved in image processing of the individual X-ray pod projections obtained from CTportable160.90. a is the original image (within the image the parts of the pods that we attempted to predict are named). In the following steps the eps-borders were eliminated; these borders are marked with yellow ellipsoids (b); subsequently, the areas of borders not containing a peanut pod were averaged (c) and subtracted from the fig (d) (compare c and d). Consequently, for each pixel its absolute value was taken (e) and a threshold value of 5250 (c) applied to the image leading to (f). In f the small area not containing peanut or a border (indicated by an orange square) was used to set the i0. This i0 was applied to the fig and resulted in g. Consequently, the image was transformed with Eq. 1 used as an input to CNN (h). To apply the XTR method for pod feature prediction, the mask based on the Otsu-thresholding method—used to differentiate the kernel (i) and shell occupied area (j)—was further applied to 5h

For each image, the mean gray value of a small area (~ 40 × 30 pix) outside of the projected peanut was calculated (named \({i}_{0}\); Fig. 5f). The highest \({i}_{0}\) value was 5382.635, the lowest 4864.444, (these values actually represent the stability of the X-ray source operated with the settings as described above).

Consequently, the image areas containing the residual eps grid were set to the \({i}_{0}\) value (Fig. 6g). Thus, the following steps were not affected heavily from the sample holder. However, as the threshold for the label was selected manually, some of the images contained some artefacts. For the XRT and CNN method, the raw grey values within a pixel were transformed into a virtual weight estimation Fig. 6h [25].

Using this approach, the exponential absorption of X-rays within matter is corrected and transformed into a linear space correlating with the actual biomass of the absorbing matter. In this case, correlating with the total biomass of shell and peanut kernels. All values below 0 were corrected to 0 taking the intrinsic noise within the X-ray projections into account. After implementing this routine, all grey values ranged between 0 and 2. These images (as in Fig. 6h) served as direct input training data for the CNN (see Sect. "Features prediction using CNN regression model").

Further image processing steps were specifically done to extract the peanut pod features via the XRT method ("Features prediction using X-ray transformation (XRT) of images"). This required the separation of the image area occupied by the kernel and the shell. For this, a threshold was set individually for every preprocessed image (Fig. 6h) using the automatic threshold algorithm by Otsu [62]. The Otsu algorithm exhaustively searches for the threshold that maximizes the inter-class variance. In our case, the application of the Otsu thresholding method (Eq. 1) found the threshold distinguishing the image background from the kernel [63]. This algorithm found the applicable threshold minimizing the following equation.

$${{\sigma }^{2}}_{w}(t)={w}_{0}(t){{\sigma }^{2}}_{0}(t)+{w}_{1}(t){{\sigma }^{2}}_{1}(t)$$

As we aimed to define the kernels it was necessary to choose the threshold in such a way that the shell would become part of the background. After the iterations of the Otsu thresholding method, the shell was still part of the foreground. As we only wanted the kernels to be in the foreground, and the shell appeared slightly lighter, the value 50 was found suitable and finally subtracted from the Otsu threshold. This value 50 was obtained manually using a small set of peanut images to shift the threshold so that the pixel representing the shell became part of the background. All values above the threshold were set to 0 (black), all values below to 1 (white). On the resulting binary images an ellipse shaped filter mask shape = (5 × 5 pixel) was used for a morphological erosion. Additionally, the morphological dilation was performed as well, with an ellipse-shaped filter mask (shape: 9 × 9 pixel) [64] (see Fig. 6i).

The resulting binary peanut kernel images (Fig. 6i) were used to label the peanut kernels and the peanut shells of the transformed images (Fig. 6h), respectively. In the process, the binary images (Fig. 6i) were multiplied with the transformed images (Fig. 6h) to obtain only the pixels representing the kernel. The results were integrated and plotted against the actual kernel weight. For the shell weight, the binary peanut images (Fig. 6i) were used inverted to serve as a label image for the shell (Fig. 6h). All bright pixels in the label image denote foreground objects whereas dark pixels denote the image background (compare Fig. 6j). The resulting images were also integrated and plotted against the actual shell weight.

Feature predictions methods and comparison metrics

After the pretreatment of the images the dataset was randomly separated into a calibration and testing dataset 90:10%. The “calibration” dataset (90% of the data) was used to train the feature predictive algorithms and the “testing” dataset (10% of the data) to generate the metrics that indicate the predicting power of each method. For each trait (kernel weight, shell weight) and method, descriptive statistics of the relationship between ground truth measurements and predicted values were calculated, i.e., r (Pearson’s correlation coefficient), R2 (coefficient of determination), MSE (mean squared error), MAE (mean absolute error), slope, intercept of relation between the ground-truth observations and predictions. The exact same pod images were used as a “calibration” and “test” set to compare the prediction power of the two tested methodologies ("Features prediction using X-ray transformation (XRT) of images" and "Features prediction using CNN regression model").

To compare the features extraction methodologies further, principal component analysis (PCA) between the ground-truth measurements and the features predicted using methods "Features prediction using X-ray transformation (XRT) of images" and "Features prediction using CNN regression model" was performed using R Studio software (v2021.09.0 Build 351). PCA helped to clarify the source of prediction errors for particular types of peanut pods and pointed out further prediction methodology improvements, limitations and advantages of each method.

Features prediction using X-ray transformation (XRT) of images

To separate the kernel and shell biomass, the label images were applied on the processed images to dissect the pixels reflecting the peanut kernels and shells, respectively (details in "Image treatment" “label image” application process is visualized on Fig. 6h–j.). For all images in the calibration set (90% of dataset containing the same pod images as the calibration set used for CNN, "Features prediction using CNN regression model"), the grey pixel values belonging to kernel and shell projections were integrated and correlated and the actual peanut kernel and shell weight measured gravimetrically. The reliability of this prediction method was expressed through linear regression parameters between XRT predictions and gravimetric measurements for calibration (90%) and test portions (10%) of the dataset. These metrics from the linear regression are summarized in the Additional file 1: Table S1 and displayed in Fig. 3.

Features prediction using CNN regression model

The calibration dataset (i.e., 90% of the complete data set) was further split into a “training” (80% of calibration set) and “validation” set (20% of the calibration set, which was used to monitor network accuracy during the training on 80% of the calibration dataset after each epoch).

CNNs are a special kind of deep neural network designed to identify features in 2D images where numerous different mask filters are trained to identify recurring structures. To train a network, a training set is needed that contains the input images and the associated target values (i.e., ground truth measurements; see "Peanut varieties used and ground truth measurements"). Several input images (“training set”, Fig. 6h., "Image treatment" section) are fed into a pre-specified neural network structure. In the last layer, one or more output values are calculated. The output is then compared to the target values. The resulting error is backpropagated through the network to optimize the different parameters in the model structure [65].

In our case we constructed the CNN network training structure to predict the peanut kernel and shell weights from virtual biomass images (Fig. 6h). This specific network consisted of 10 convolutional layers, maximum pooling layers and fully connected layers/dense layers. The output layer consisted of two output neurons, featuring the predicted kernel and shell weight. In contrast to classic feed forward CNNs the output in this study consisted of continuous values. Hence, we refer to our network as a CNN regression model.

For this study a structure similar to the AlexNet was built [66,67,68,69]. The first convolutional layer filtered the input image with 96 filter masks (size: 11 × 11 pixels) with a stride of 4 × 4. The second convolutional layer took the max pooled output of the first convolutional layer as an input and filtered it with 256 filter masks (size: 5 × 5 pixels). The third, fourth, and fifth convolutional layers were connected without any intervening pooling layers. The third convolutional layer had 384 filter masks (size: 3 × 3 pixels) connected to the pooled outputs of the second convolutional layer. The fourth convolutional layer also had 384 filter masks of 3 × 3 pixels in size, and the fifth convolutional layer had 256 filter masks (size: 3 × 3 pixels). All fully connected layers had 200 neurons each. The first two fully connected layers also had a dropout of 50%. The last output layer consisted of two output neurons each trained to predict the peanut kernel and shell weight. The two maximum pooling layers between the first three layers had a size of 3 × 3 pixels and a stride of 2 × 2 [70]. All layers had “valid padding” meaning no padding and were activated with the ReLu activation function [71]. The loss function used was the MSE (mean squared error). During training, the MAE (mean average error) between target and predicted values was also monitored at the end of each training step. The batch size used for training was 50 images fed into the network during one training step. The optimizer of choice for updating weights (filter masks) and biases was Adaptive Moment estimation (ADAM), with a leaning rate of 0.00005, the exponential decay rates \({\beta }_{1}\) = 0.9 and \({\beta }_{2}\) = 0.999 and a convergence criterion \(\epsilon =1\cdot {10}^{-8}\) [72].

In our case, CNN was trained for 30 epochs with virtual biomass images and their corresponding peanut kernel and shell weight values as target values. Each value of the two measured parameters—shell and kernel weight values—was assigned a “sample weighting “. This value was implemented to account for peanut kernel and shell weights that are underrepresented in the training set (refer to "Peanut varieties evaluation for price indicators: kernel weight, shell weight, shelling percentage" section). It is defined as the percentage of how much the particular loss was weighted during the back-propagation process. The sample weighting was adjusted according to the number of occurrences of a specific peanut kernel and shell weight in the overall distribution. Thus, extreme values of weights for kernel and shell—that were underrepresented in the dataset—were assigned a higher sample weight than more abundant examples. This way of sample weighting assigns a higher loss to underrepresented ranges of values increasing their impact on the learning step. Before the training was initiated, the weights (filter masks) and biases of the convolutional and fully connected layers were initiated. The biases were initiated with zeros. The weights were initialized with the Glorot uniform initializer, also called Xavier uniform initializer [73]. The hardware used was the GPU GeForce GTX 1050 Ti and 16 GB RAM.

Availability of data and materials

The ground-truth dataset(s) supporting the conclusions of this article will be made available in the data repository after the peer-review process; The peanut varieties used in this study can be made available upon request after adhering to the international standards for genetic material transfer.



Analysis of variance


Convolutional neural network


Computed tomography


Mean absolute error


Mean squared error


External radition therapy


  1. Institute of Food Science & Technology Food authenticity testing part 1: The role of analysis 2019 Accessed on 1 Dec 2021.

  2. European Commission Accessed on 1 Dec 2021.

  3. FAO. Food fraud—Intention, detection and management Food safety technical toolkit for Asia and the Pacific No 5 Bangkok; 2021, p.44.

  4. Spink J, Moyer DC. Defining the public health threat of food fraud. J Food Sci. 2011;75:57–63.

    Google Scholar 

  5. European Parliament Committee on the Environment Public Health and Food Safety 2013 Report on the food crisis, fraud in the food chain and the control thereof Accessed on 1 Dec 2021.

  6. Financier Worldwide Magazine. Procurement fraud—an old fraud flourishing in emerging markets and costing businesses billions. 2017. Accessed on 1 Dec 2021.

  7. The Times of India 2018 Groundnut procurement scam: Three held in Jetpur Accessed on 1 Dec 2021.

  8. Wilson J, Otsuki T. Global trade and food safety: winners and losers in a fragmented system. Washington, DC: The world bank working paper; 2001.

    Book  Google Scholar 

  9. SomashekharI C, Raju JK, Patil HR. Agriculture supply chain management: a scenario in India. TIJ-RJSSM. 2014;4:89–99.

    Google Scholar 

  10. FAO & WHO. Prevention and reduction food and feed contamination. world health organization & food and agriculture organization of the United Nations, Rome. 2012. Pp 180.

  11. Guchi E. Aflatoxin contamination in groundnut (Arachis hypogaea L.) caused by Aspergillus species in Ethiopia. Appl Environ Microbiol. 2015;3:11–9.

    CAS  Google Scholar 

  12. Institute of food science & technology 2019 food authenticity testing part 2: analytical techniques Accessed on 1 Dec 2021.

  13. Manual for food safety officers second edition 2021. Food safety and standards authority of India, pp 328.

  14. Popping B. Necessary technical and infrastructure capacities: detection methods for adulterants—developments, challenges and needs. Paper presented at the FAO expert workshop on food fraud, November 2019.

  15. Commission of the european communities. laying down the methods of sampling and analysis for the official control of the levels of mycotoxins in foodstuffs (Commission Regulation (EC) No. 401/2006 of 23 February 2006). 2006. official journal of the european union L70:12–34.

  16. FAO Manuals of food quality control. food analysis: quality, adulteration, and tests of identity. FAO food and nutrition paper 14/8. 1986;14(8):1–326.

  17. Mignani AG, Ciaccheri L, Cucci C, Mencaglia AA, Cimato A, Attilio C, et al. EAT-by-LIGHT: Fiber-optic and micro-optic devices for food quality and safety assessment. IEEE Sens J. 2008;8(7):1342–54.

    Article  CAS  Google Scholar 

  18. Masna NVR, Paul SD, Chen C, Mandal S, Bhunia S. Eat, but Verify: Low-cost portable devices for food safety analysis in. IEEE Consumer Electron Mag. 2019;8(1):12–8.

    Article  Google Scholar 

  19. van Egmond HP, Schothorst RC, Jonker MA. Regulations relating to mycotoxins in food. Anal Bioanal Chem. 2007;389:147–57.

    Article  CAS  PubMed  Google Scholar 

  20. Grundas S, Velikanov LP, Archipov MV. Importance of wheat grain orientation for the detection of internal mechanical damage by the X-ray method. Int Agrophy. 1999;13:355–61.

    Google Scholar 

  21. Neethirajan S, Jayas DS, Karunakaran C. Dual energy X- ray image analysis for classifying vitreousness in durum wheat. Postharvest Biol Technol. 2007;45:381–4.

    Article  Google Scholar 

  22. Skrzyszewska K, Chłanda J. A study on the variation of morphological characteristics of silver fir (Abies alba Mill) seeds and their internal structure determined by X ray radiography in the Beskid Sądecki and Beskid Niski Mountain ranges of the Carpathians (southern Poland). J Sci. 2009;55(9):403–14.

    Article  Google Scholar 

  23. Gomez FE, Carvalho G, Shi F, Muliana AH, Rooney WL. High throughput phenotyping of morpho-anatomical stem properties using X-ray computed tomography in sorghum. Plant Methods. 2018;14(1):59.

    Article  PubMed  PubMed Central  Google Scholar 

  24. Hughes N, Oliveira HR, Fradgley N, Corke FMK, Cockram J, Doonan JH, et al. CT trait analysis reveals morphometric differences between domesticated temperate small grain cereals and their wild relatives. Plant J. 2019;99:98–111.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  25. Schmidt J, Claussen J, Wörlein N, Eggert A, Fleury D, Garnett T, Gerth S. Drought and heat stress tolerance screening in wheat using computed tomography. Plant Methods. 2020;16(1):1–2.

    Article  Google Scholar 

  26. Gerth S, Claußen J, Eggert A, Wörlein N, Waininger M, Wittenberg T, Uhlmann N. Semiautomated 3D root segmentation and evaluation based on X-ray CT imagery. Plant Phenomics. 2021;2021:1–13.

    Article  Google Scholar 

  27. Harsselaar JKV, Claußen J, Lubeck J, Worlein N, Uhlmann N, Sonnewald U, Gerth S. X-ray CT phenotyping reveals bi-phasic growth phases of potato tubers exposed to combined abiotic stress. Front Plant Sci. 2021;12: 613108.

    Article  PubMed  PubMed Central  Google Scholar 

  28. Varshalovich AA. Guide to Quarantine Entomological Expertise Seeds by X-ray (in Russian) USSR Ministry of Agriculture. USSR: Mascow; 1958.

    Google Scholar 

  29. Pérez-Torres E, Kirchgessner N, Pfeifer J, Walter A. Assessing potato tuber diel growth by means of X-ray computed tomography. Plant Cell Environ. 2015;38(11):2318–26.

    Article  PubMed  Google Scholar 

  30. Walter A, Liebisch F, Hund A. Plant phenotyping: from bean weighing to image analysis. Plant Methods. 2015;11(1):1–1.

    Article  Google Scholar 

  31. Zhu LJ, Dogan H, Gajula H, Gu MH, Liu QQ, Shi YC. Study of kernel structure of high-amylose and wild-type rice by X-ray microtomography and SEM. J Cereal Sci. 2012;55:1–5.

    Article  CAS  Google Scholar 

  32. Yakushev V, Grundas S, Velikanov LP, Archipov MV. 2002 X-ray pattern analysis of seeds and other vegetative materials. workshop on applied physics in life science, prague, czech Republic; 2002. p.55–60 .

  33. Velikanov LP, Grundas S, Archipov MV, Demyanchuk AM, Gusakova LP. Agrophysical direction of further development and application of X-ray method. proceedings of international conference on new trends in agrophysics. Lublin, Poland; 2008 , p.147–148.

  34. Zhou H, Whalley WR, Hawkesford MJ, Riche AB, Atkinson B, Sturrock CJ, Mooney SJ. Determination of wheat spike and spikelet architecture and grain traits using X-ray computed tomography imaging. Plant Methods. 2021;17:26.

    Article  PubMed  PubMed Central  Google Scholar 

  35. Nawrocka A, Grundas S, Grodek J. Losses caused by granary weevil larva in wheat grain using digital analysis of X-ray image. Int Agrophy. 2010;24:63–8.

    Google Scholar 

  36. Demyanchuk AM, Velikanov LP, Arhipov MV, Grundas S. X-ray Method to Evaluate Grain Quality. In: Horabik J, Lipiec J, editors. Gliński J. Dordrecht: Encyclopedia of Agrophysics. Encyclopedia of Earth Sciences Series. Springer; 2011.

    Chapter  Google Scholar 

  37. Panchal KP, Pandya NR, Albert S, Gandhi DJ. A X-ray image analysis for assessment of forage seed quality. Int J Plant Animal Env Sci. 2014;4(4):103–9.

    Google Scholar 

  38. Barcelon EG, Tojo S, Watanabe K. Nondestructive ripening assessment of mango using an X-ray computed tomography. Int Agric Eng J. 2000;9(2):73–80.

    Google Scholar 

  39. Liu W, Liu C, Jin J, Li D, Fu Y, Yuan X. High-throughput phenotyping of morphological seed and fruit characteristics using X-ray computed tomography. Front Plant Sci. 2020;11:1783.

    Google Scholar 

  40. Mathanker SK, Weckler PR, Bowser TJ. X-ray applications in food and agriculture: a review. Trans ASABE. 2013;56(3):1227–39.

    Google Scholar 

  41. Du Z, Hu Y, Ali Buttar N, Mahmood A. X-ray computed tomography for quality inspection of agricultural products: a review. Food Sci Nutr. 2019;7(10):3146–60.

    Article  PubMed  PubMed Central  Google Scholar 

  42. Hughes N, Askew K, Scotson CP, Williams K, Sauze C, Corke F, Doonan JH, Nibau C. Non-destructive, high-content analysis of wheat grain traits using X-ray micro computed tomography. Plant Methods. 2017;13(1):1–6.

    Article  Google Scholar 

  43. Fraunhofer Institute for Integrated Circuits IIS. Accessed 29 May 2021.

  44. Gazette of India. Hand Picked Selected Groundnuts Grading and Marking Rules. Gazette of India Part II, Section 3(ii) under S.O. 2294 dated 26–6–1982. Accessed on 1 Dec 2021.

  45. Agricultural and processed food products export development authority. procedures for export of peanuts and peanut products. Accessed on 1 Dec 2021.

  46. Savalia RL, Vaghasia PM, Kelaiya GR. Potential for value-addition in groundnut. In: proceedings of national symposium on enhancing productivity of peanut for sustaining food and nutritional security. junagadh, India, 2004. Pp 202–204.

  47. Waliyar F, Osiru M, Ntare BR, Kumar KVK, Sudini H, Traore A, Diarra B. Post-harvest management of aflatoxin contamination in groundnut. World Mycotoxin J. 2015;8(2):245–52.

    Article  Google Scholar 

  48. Torres AM, Barros GG, Palacios SA, Chulze SN, Battilani P. Review on pre- and post-harvest management of peanuts to minimize aflatoxin contamination. Food Res Int. 2014;62:11–9.

    Article  CAS  Google Scholar 

  49. Anitha S, Tsusaka TW, Njoroge SMC, Kumwenda N, Kachulu L, Maruwo J, Machinjiri N, et al. Knowledge, attitude and practice of malawian farmers on pre- and post-harvest crop management to mitigate aflatoxin contamination in groundnut, maize and sorghum—Implication for behavioral change. Toxins. 2019;11(716):1–14.

    Google Scholar 

  50. Chaudhari S, Khare D, Sundravadana S, Variath MT, Manohar SS, Janila P. Genetic analysis of foliar disease resistance, yield and nutritional quality traits in groundnut. Electron J Plant Breed. 2017;8(2):485–93.

    Article  Google Scholar 

  51. Abadya S, Shimelis H, Pasupuleti J, Mashilo J, Chaudhari S, Manohar SS. Assessment of the genetic diversity of groundnut (Arachis hypogaea L) genotypes for kernel yield oil and fodder quantity and quality under drought conditions. Crop Sci. 2021;61(3):1926–43 (TSI).

    Article  CAS  Google Scholar 

  52. Govindaraj G, Jain VK. Economics of non-oil value chains in peanut: A case of peanut-candy and salted-peanut small-scale units in India. J Agric Sci. 2011;56(1):37–54 (Belgrade).

    Google Scholar 

  53. Hajjarpoor A, Kholova J, Pasupuleti J, Soltani A, Burridge J, Degala SB, et al. Environmental characterization and yield gap analysis to tackle genotype-by-environment-by-management interactions and map region-specific agronomic and breeding targets in groundnut. Field Crops Res. 2021;267: 108160.

    Article  Google Scholar 

  54. Tardieu F, Cabrera-Bosquet L, Pridmore T, Bennett M. Plant phenomics, from sensors to knowledge. Curr Biol. 2017;27:R770–83.

    Article  CAS  PubMed  Google Scholar 

  55. .

  56. FAO and WHO. Food control system assessment tool: introduction and glossary. food safety and quality series no. 7/1. FAO & WHO, Rome, Italy. 2019.

  57. Food and agriculture organization. Worldwide regulations for mycotoxins in food and feed in 2003. FAO food and nutrition paper 81 food and agriculture organization of the united nations, rome, Italy 2004

  58. World Bank. Food safety and agricultural health standards. challenges and opportunities for developing country exports. Report no. 31207 of the World Bank, Washington DC USA. 2005.

  59. Fraunhofer Gesellschaft zur Forderung der Angewandten Forschung eV. Patent no. DE102015218504A1: Determination of biomass of a plant. Accessed on 1 Dec 2021.

  60. Mejia D. Groundnut post-harvest operations—Post-harvest compendium. Food and agriculture organization of the united nations, Rome, Italy. 2002.

  61. Centre for collective development. Accessed on 29 May 2021.

  62. VOLEX 10: System control—Measurement data collection—Information acquisition Accessed on 1 Dec 2021.

  63. Dongju L, Jian Y. Otsu method and K-means. In: 2009 Ninth International conference on hybrid intelligent systems. Vol. 1. IEEE. 2009. Pp 344–349.

  64. Jankowski M. Erosion, dilation and related operators. Department of electrical engineering: University of Southern Maine Portland, Maine, USA; 2006.

  65. O'Shea K, Ryan N. An introduction to convolutional neural networks. arXiv preprint arXiv:1511.08458. 2015.

  66. Sainath TN, Kingsbury B, Mohamed AR, Dahl GE, Saon G, Soltau H, Beran T, Aravkin AY, Ramabhadran B. Improvements to deep convolutional neural networks for LVCSR. In: 2013 IEEE workshop on automatic speech recognition and understanding; 2013. Pp 315–320.

  67. Sermanet P, Eigen D, Zhang X, Mathieu M, Fergus R, LeCun Y. Overfeat Integrated recognition localization and detection using convolutional networks. arXiv preprint arXiv:1312.6229 2013.

  68. Zeiler MD, Fergus R. Visualizing and understanding convolutional networks. In: Fleet D, Pajdla T, Schiele B, Tuytelaars T(eds) European conference on computer vision. Cham: Springer; 2014. p. 818–33.

  69. Liao R, Schwing A, Zemel RS, Urtasun R Learning deep parsimonious representations. In: proceedings of the 30th international conference on neural information processing systems; 2016. p. 5083–5091.

  70. Krizhevsky A, Sutskever I, Hinton GE. Imagenet classification with deep convolutional neural networks. NeurIPS. 2012;25:1097–105.

    Google Scholar 

  71. Lu L, Shin Y, Su Y, Karniadakis GE. Dying relu and initialization theory and numerical examples. arXiv preprint arXiv. 2019.

    Article  Google Scholar 

  72. Kingma DP, Ba J 2014 Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980 2014

  73. Glorot X, Bengio Y 2010 Understanding the difficulty of training deep feedforward neural networks. In: proceedings of the 13th international conference on artificial intelligence and statistics JMLR workshop and conference proceedings 249–256.

Download references


The authors acknowledge Mr. T Nataraj from CCD team for providing the peanut harvest for the study, facilitating the farmers’ interview and market analysis. We are also thankful to Dr. Janila Pasupuleti for access to peanut material and information about breeders’ requirements and consumer preferences. We thank the staff of Fraunhofer, ICRISAT, and Center for Collective Development for their assistance in this study. \We are grateful to Dr. William Nelson for thorough language corrections of the text.


Open Access funding enabled and organized by Projekt DEAL. The results and knowledge included herein have been obtained owing with support from the following grants: Internal grant agency of the Faculty of Economics and Management from the Czech University of Life Sciences Prague, grant, Life Sciences 4.0 Plus “, no. 2022B0006, and the following grants from ICRISAT: Accelerated Varietal Improvement and Seed Delivery of Legumes and Cereals in Africa (AVISA), CGIAR’s Crop to End Hunger initiative–ICRISAT (a multi-funder initiative led by USAID and including the Gates Foundation; DFID, UK; GiZ, Germany; and ACIAR, Australia; CtEH-ICRISAT; 2019–2021); and CGIAR Research Program grant for Grain Legumes and Dryland Cereals–ICRISAT (GLDC-ICRISAT; 2018–2022).

Author information

Authors and Affiliations



SG, JK, JC, EH, NW conceived the idea, designed the experiments, supervised the study. MD, DC performed the experiments. MD, DC, KA, SC analyzed the data. MV, RB aided peanut pod collection and scanning. JP provided the germplasms used and information about breeders’ requirements and consumer preferences. All of the authors contributed to writing up the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Stefan Gerth.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

All authors have given their consent for publication of the manuscript.

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Additional file 1:

Figure S1 a, b, c: Modified boxplot showing variation in kernel weight (a), shell weight (b), and shelling percentage (c) within and across 39 peanut genetic materials used in the study: advanced breeding lines (grey), elite cultivars (blue) and farmer-produced peanut crop (green). Each boxplot represents one particular genetic material. Within each boxplot the mean of each genetic material is marked by red line (−) and the values distribution within particular genetic material is shown along the vertical axes of the boxplot. Dashed line (---) depicts the average of all 39 genetic materials used in this study. Table S1: The table contains the list of peanut genetic materials used for in this study. These include peanut crop harvested from farmers in Anantapur (sequential number 1-5), elite cultivars formally released and currently cultivated across India (sequential number 6-9), advanced breeding lines obtained from the ICRISAT peanut breeding team (sequential number 10-39). Each of the genetic materials consisted of ~40 peanut pods which were gravimetrically evaluated for kernel weight, shell weight and shelling percentage. The means of these pod characters for each genetic material are presented in the table along with the results of the Tukey-Kramer test (i.e. the letters accompanying the means). The same letters occurring in the letter sequence indicate that the pod characteristics of the genetic material were not significantly different and vice versa.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit The Creative Commons Public Domain Dedication waiver ( applies to the data made available in this article, unless otherwise stated in a credit line to the data.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Domhoefer, M., Chakraborty, D., Hufnagel, E. et al. X-ray driven peanut trait estimation: computer vision aided agri-system transformation. Plant Methods 18, 76 (2022).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: