University of Waikato Research
Permanent URI for this communityhttps://researchcommons.waikato.ac.nz/handle/10289/10288
Browse
10 results
Search Results
Item type:Publication, Exploring prompt engineering for grapevine pruning decision making with limited data2025, Australian Robotics & Automation Association (ARAA)To address the challenges posed by the shortage of agricultural labour, this paper explores the use of Prompt Engineering (PE) to guide Large Language Models (LLMs) for grapevine pruning decision-making. Based on real grapevine images and structured data, five prompt templates were designed and tested on four mainstream LLMs: Gemma-3, Llama-4, Gemini 2.5 Pro, and GPT-o3. Experimental results show that some models excel in consistency—GPT-o3 achieved full consistency (1.0) under Prompt 3, and Gemma-3 performed well under Prompts 2 and 3 (0.98 and 0.96). However, inter-model agreement remained low (Fleiss’ Kappa < 0.07) across all conditions. These findings confirm the feasibility of using PE to simulate expert pruning in data-scarce environments and offer insights for building scalable, interpretable decision-support systems in agriculture.Item type:Publication, Proximal near-infrared hyperspectral imaging dataset for identifying epicuticular wax loss in Masena blueberries to evaluate post-harvest quality2025-08-05, ElsevierThe dataset presented in this paper consists of hyperspectral images of Masena blueberries that were harvested on November 24, 2023, from an orchard in Pukehina, New Zealand. Blueberries were hand-harvested with gloves (intact wax), hand-harvested (without gloves), and mechanically aided by picking via a handheld shaker. Some berries were also wiped to eliminate degrading epicuticular wax (EW) for comparison. Imaging was performed within 9 hours of harvest using a Specim FX17e hyperspectral camera (900–1700 nm, 224 bands) under controlled lighting conditions. The data were white and dark reference-normalized, annotated using the in-house HAPPy tool (ENVI Software), and saved in MATLAB (.mat) format for analysis. A total of 49 individual hyperspectral images were captured from 39 blueberry fruits to capture multiple views or surface states. We provide 5 spectral hypercube sets of data collected with the hyperspectral camera: ‘Assisted Harvested Blueberries (AHB)’ (10 images), ‘Hand Harvested Blueberries (HHB)’ (10 images), ‘Perfect EW’ (10 images), ‘No EW’ (9 images), and ‘No EW vs. Perfect EW‘ (10 images: 5 from ‘No EW‘ and 5 from ‘Perfect EW‘). This dataset, collected and archived by the University of Waikato (WaI2M: Waikato Instrumentation and Measurement Research Group, Hyperspectral Imaging Group), enables near-infrared hyperspectral imaging research in agriculture for EW classification and detection, harvesting method classification, and fruit surface property spectral analysis using machine/deep learning methods.Item type:Publication, Rethinking the concept of pixel intensity contrast from a machine learning perspective2025, IEEEImage contrast is a critical factor for machine vision tasks. A promising approach for enhancing contrast involves the use of algorithmically optimized, spectrally tunable illumination. However, the very definition of 'contrast' is often rooted in principles of human perception, which may not be optimal for a machine observer. For an algorithm, contrast is an objective, task-driven metric that can be mathematically defined. To investigate the impact of this definition, we first use eigenvalue-based optimization algorithms to compute optimal illumination spectra. We then systematically evaluate these spectra using four distinct, physically realizable contrast formulations. Our analysis reveals that the performance of a given optimization algorithm is entirely dependent on the subsequent choice of evaluation metric. An illumination spectrum considered optimal under one metric can be significantly suboptimal when measured by another. This demonstrates that the choice of contrast metric is not a passive measurement, but an active design parameter with tangible physical consequences. From a machine learning perspective, the choice of this 'loss function' should be codesigned with the physical hardware and the ultimate downstream task to achieve true system-level optimization.Item type:Publication, An overview of integrating deep learning methods with close-range hyperspectral imaging for agriculture2025-07-10, IEEEHyperspectral imaging combines spectroscopy with imaging, thus capturing both spectral and spatial features. This makes it a useful technology in several application areas such as remote sensing and smart agriculture. Extracting spatial-spectral information of objects-of-interest from hyperspectral images requires sophisticated computational methods. The last decade saw the rapid advancement of deep learning methods due to their superior automatic feature extraction capability from images, and hence it is no surprise that these methods have been adapted and used for hyperspectral image analysis. Yet, while deep learning methods have achieved some success for hyperspectral remote sensing, it has been less explored in close range (or proximal) hyperspectral imaging, which is likely because at this range, it is more akin to spectroscopy with spatial information, rather than the case of remote sensing, which is more akin to imaging with higher spectral resolution. Close-range HSI allows for fine-scale analysis of plant health, nutrient levels, disease detection, and crop quality, which is very important in precision agriculture. In light of the new computational methods in deep learning, this review article provides an in-depth analysis and comparisons of such methods when applied to proximal hyperspectral imagery, with a particular emphasis on unsolved challenges (e.g., limited availability of annotated datasets, the need for robust models under real-world conditions, and the integration of spatial and spectral information) and potential future research directions for agricultural applications. The review emphasizes the importance of further explorations and has provided recommended directions for future research that could elevate close-range hyperspectral imaging technology from research to industry use for smart agriculture applications.Item type:Publication, Image classification using class-agnostic object detection2023, SpringerHuman-in-the-loop interfaces for machine learning provide a promising way to reduce the annotation effort required to obtain an accurate machine learning model, particularly when it is used with transfer learning to exploit existing knowledge gleaned from another domain. This paper explores the use of a human-in-the-loop strategy that is designed to build a deep-learning image classification model iteratively using successive batches of images that the user labels. Specifically, we examine whether class-agnostic object detection can improve performance by providing a focus area for image classification in the form of a bounding box. The goal is to reduce the amount of effort required to label a batch of images by presenting the user with the current predictions of the model on a new batch of data and only requiring correction of those predictions. User effort is measured in terms of the number of corrections made. Results show that the use of bounding boxes always leads to fewer corrections. The benefit of a bounding box is that it also provides feedback to the user because it indicates whether or not the classification of the deep learning model is based on the appropriate part of the image. This has implications for the design of user interfaces in this application scenario.Item type:Publication, Efficiently correcting machine learning: considering the role of example ordering in human-in-the-loop training of image classification models2022, ACMArguably the most popular application task in artificial intelligence is image classification using transfer learning. Transfer learning enables models pre-trained on general classes of images, available in large numbers, to be refined for a specific application. This enables domain experts with their own—generally, substantially smaller—collections of images to build deep learning models. The good performance of such models poses the question of whether it is possible to further reduce the effort required to label training data by adopting a human-in-the-loop interface that presents the expert with the current predictions of the model on a new batch of data and only requires correction of these predictions—rather than de novo labelling by the expert—before retraining the model on the extended data. This paper looks at how to order the data in this iterative training scheme to achieve the highest model performance while minimising the effort needed to correct misclassified examples. Experiments are conducted involving five methods of ordering, using four image classification datasets, and three popular pre-trained models. Two of the methods we consider order the examples a priori whereas the other three employ an active learning approach where the ordering is updated iteratively after each new batch of data and retraining of the model. The main finding is that it is important to consider accuracy of the model in relation to the number of corrections that are required: using accuracy in relation to the number of labelled training examples—as is common practice in the literature—can be misleading. More specifically, active methods require more cumulative corrections than a priori methods for a given level of accuracy. Within their groups, active and a priori methods perform similarly. Preliminary evidence is provided that suggests that for “simple” problems, i.e., those involving fewer examples and classes, no method improves upon random selection of examples. For more complex problems, an a priori strategy based on a greedy sample selection method known as “kernel herding” performs best.Item type:Publication, An application of data mining to fruit and vegetable sample identification using Gas Chromatography-Mass Spectrometry2012, iEMSsOne of the uses of Gas Chromatography-Mass Spectrometry (GC-MS) is in the detection of pesticide residues in fruit and vegetables. In a high throughput laboratory there is the potential for sample swaps or mislabelling, as once a sample has been pre-processed to be injected into the GC-MS analyser, it is no longer distinguishable by eye. Possible consequences of such mistakes can be the destruction of large amounts of actually safe produce or pesticide-contaminated produce reaching the consumer. For the purposes of food safety and traceability, it can also be extremely valuable to know the source (country of origin) of a food product. This can help uncover fraudulent attempts of trying to sell food originating from countries deemed unsafe. In this study, we use the workflow environment ADAMS to examine whether we can determine the fruit/vegetable, and the country of origin of a sample from a GC-MS chromatogram. A workflow is used to generate data sets using different data pre-processing methods, and data representations from a database of over 8000 GC-MS chromatograms, consisting of more than 100 types of fruit and vegetables from more than 120 countries. A variety of classification algorithms are evaluated using the WEKA data mining workbench. We demonstrate excellent results, both for the determination of fruit/vegetable type and for the country of origin, using a histogram of ion counts, and Classification by Regression using Random Regression Forest with PLS-transformed data.Item type:Publication, Predicting polycyclic aromatic hydrocarbon concentrations in soil and water samples2010, International Environmental Modelling and Software SocietyPolycyclic Aromatic Hydrocarbons (PAHs) are compounds found in the environment that can be harmful to humans. They are typically formed due to incomplete combustion and as such remain after burning coal, oil, petrol, diesel, wood, household waste and so forth. Testing laboratories routinely screen soil and water samples taken from potentially contaminated sites for PAHs using Gas Chromatography Mass Spectrometry (GC-MS). A GC-MS device produces a chromatogram which is processed by an analyst to determine the concentrations of PAH compounds of interest. In this paper we investigate the application of data mining techniques to PAH chromatograms in order to provide reliable prediction of compound concentrations. A workflow engine with an easy-to-use graphical user interface is at the heart of processing the data. This engine allows a domain expert to set up workflows that can load the data, preprocess it in parallel in various ways and convert it into data suitable for data mining toolkits. The generated output can then be evaluated using different data mining techniques, to determine the impact of preprocessing steps on the performance of the generated models and for picking the best approach. Encouraging results for predicting PAH compound concentrations, in terms of correlation coefficients and root-mean-squared error are demonstrated.Item type:Publication, Analysing chromatographic data using data mining to monitor petroleum content in water2009, SpringerChromatography is an important analytical technique that has widespread use in environmental applications. A typical application is the monitoring of water samples to determine if they contain petroleum. These tests are mandated in many countries to enable environmental agencies to determine if tanks used to store petrol are leaking into local water systems. Chromatographic techniques, typically using gas or liquid chromatography coupled with mass spectrometry, allow an analyst to detect a vast array of compounds—potentially in the order of thousands. Accurate analysis relies heavily on the skills of a limited pool of experienced analysts utilising semi-automatic techniques to analyse these datasets—making the outcomes subjective. The focus of current laboratory data analysis systems has been on refinements of existing approaches. The work described here represents a paradigm shift achieved through applying data mining techniques to tackle the problem. These techniques are compelling because the efficacy of preprocessing methods, which are essential in this application area, can be objectively evaluated. This paper presents preliminary results using a data mining framework to predict the concentrations of petroleum compounds in water samples. Experiments demonstrate that the framework can be used to produce models of sufficient accuracy—measured in terms of root mean squared error and correlation coefficients—to offer the potential for significantly reducing the time spent by analysts on this task.Item type:Publication, Facilitating multiple copy/past operations1999-05, Computer science.university of WaikatoCopy and paste, or cut and paste, using a clipboard or paste buffer has long been the principle facility provided to users for transferring data between and within GUI applications. We argue that this mechanism can be clumsy in circumstances where several pieces of information must be moved systematically. In two situations - extraction of data fields from unstructured data found in a directed search process, and reorganisation of computer program source text - we present alternative, more natural, user interface facilities to make the task less onerous, and to provide improved visual feedback during the operation. For the data extraction task we introduce the Stretchable Selection Tool, a semi-transparent overlay augmenting the mouse pointer to automate paste operations and provide information to prompt the user. We describe a prototype implementation that functions in a collaborative software environment, allowing users to cooperate on a multiple copy/paste operation. For text reorganisation, we present an extension to Emacs, providing similar functionality, but without the collaborative features.