University of Waikato Research
Permanent URI for this communityhttps://researchcommons.waikato.ac.nz/handle/10289/10288
Browse
94 results
Filters
Advanced Search
Filter by
Settings
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, 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, Multiple instance verification2025, Microtome PublishingWe explore multiple instance verification, a problem setting in which a query instance is verified against a bag of target instances with heterogeneous, unknown relevancy. We show that naive adaptations of attention-based multiple instance learning (MIL) methods and standard verification methods like Siamese neural networks are unsuitable for this setting: directly combining state-of-the-art (SOTA) MIL methods and Siamese networks is shown to be no better, and sometimes significantly worse, than a simple baseline model. Postulating that this may be caused by the failure of the representation of the target bag to incorporate the query instance, we introduce a new pooling approach named “cross-attention pooling” (CAP). Under the CAP framework, we propose two novel attention functions to address the challenge of distinguishing between highly similar instances in a target bag. Through empirical studies on three different verification tasks, we demonstrate that CAP outperforms adaptations of SOTA MIL methods and the baseline by substantial margins, in terms of both classification accuracy and the ability to detect key instances. The superior ability to identify key instances is attributed to the new attention functions by ablation studies.Item type:Publication, Augmenting NIR spectra in deep regression to improve calibration2023, ElsevierDeep learning, particularly with convolutional neural networks, shows promise in modelling near-infrared spectroscopy (NIRS), but the lack of robust generalisation across instruments often affects performance in practice. Here, we investigate a method to increase the robustness of this approach. The proposed method involves using a simple data augmentation technique during the training process. The performance of convolutional neural network regression is compared to partial least squares regression (PLSR) using kiwifruit data collected from multiple handheld devices over three seasons and mango data collected from a single device over four seasons. The results suggest that data augmentation for NIR spectra can prevent overfitting. In particular, augmenting the training data to mimic spectra collected over multiple devices results in a neural network model with improved performance over PLSR.Item type:Publication, Barlow Twins for semi-supervised learning in NIR spectroscopy2026-02-15, Elsevier BVNear-infrared (NIR) spectroscopy is a widely used technology in the horticulture industry for non-destructive fruit grading. Partial Least Squares (PLS) regression is the dominant method for producing fruit quality predictions from measured spectra. Alternative deep learning methods have shown promise, but often require large amounts of labelled data to train. This study proposes a semi-supervised method based on Barlow Twins to include unlabelled data in the training process. We adopt the Barlow Twins method by using repeated measurements on the same fruit from different devices as different “views” to encode into the same latent space and combine the encoder network with a regression head for prediction. Our approach demonstrates improved performance over PLS with up to 17% lower RMSE, especially when the labelled data is limited. The Barlow loss function also improves calibration transfer results.Item type:Publication, Assessing machine learning models for near-infrared regression by measuring stability towards diffeomorphisms2025, ElsevierNear infrared (NIR) spectroscopy is widely used as a tool for non-destructive assessment of fruit quality by applying measured spectra to predict quality parameters such as dry matter and soluble solids content using a suitable regression method. With continued advancements in deep learning, there is potential for improved predictive performance when neural network models are applied instead of partial least-squares regression, but choosing a model remains challenging as performance is sensitive to the model's architecture. Taking inspiration from work done in image classification, we propose model selection by assessing relative stability to diffeomorphic transformations, providing a complementary approach to standard validation methods. This is particularly useful when labelled validation data is limited. Our empirical results on several NIR regression problems indicate that the proposed approach is comparable to the use of independent validation sets. In addition to the choice of deep learning architecture, we also consider the selection of the number of components in partial least-squares regression to demonstrate the method's generality.Item type:Publication, Automatic species identification from images for Aotearoa2025, Taylor and Francis GroupImage classification for species identification has applications in areas such as conservation and education. Given New Zealand's geographic isolation and the relatively small number of species present on its islands, there is an opportunity to apply machine learning to enable accurate automatic species identification for Aotearoa, even on mobile devices without Internet access. We present neural network-based image classification models trained to classify organisms present in New Zealand. The data for model development and evaluation, obtained from the crowd-sourcing website iNaturalist, comprises 14,991 species, including 6,216 Animalia, 6,173 Plantae, and 2,407 Fungi species, alongside a small set of observations of Bacteria, Chromista, Protozoa, and Viruses. It contains organisms observed in the natural environment as well as captive and cultivated organisms. The trained models achieve over 76% classification accuracy across all species and produce class probability estimates, calibrated using temperature scaling, that can be used to gauge confidence in their classifications. Input attribution methods can be used to interpret a model's inferences by highlighting its areas of focus on images. The models are available to the public as downloadable model files and as part of both web and mobile applications for species identification that are distributed as open-source software.Item type:Publication, Pruning feature extractor stacking for cross-domain few-shot learning2025Combining knowledge from source domains to learn efficiently from a few labelled instances in a target domain is a transfer learning problem known as cross-domain few-shot learning (CDFSL). Feature extractor stacking (FES) is a state-of-the-art CDFSL method that maintains a collection of source domain feature extractors instead of a single universal extractor. FES uses stacked generalisation to build an ensemble from extractor snapshots saved during target domain fine-tuning. It outperforms several contemporary universal model-based CDFSL methods in the Meta-Dataset benchmark. However, it incurs higher storage cost because it saves a snapshot for every fine-tuning iteration for every extractor. In this work, we propose a bidirectional snapshot selection strategy for FES, leveraging its cross-validation process and the ordered nature of its snapshots, and demonstrate that a 95% snapshot reduction can be achieved while retaining the same level of accuracy.Item type:Publication, The WEKA data mining software: An update2009, ACMMore than twelve years have elapsed since the first public release of WEKA. In that time, the software has been rewritten entirely from scratch, evolved substantially and now accompanies a text on data mining. These days, WEKA enjoys widespread acceptance in both academia and business, has an active community, and has been downloaded more than 1.4 million times since being placed on Source-Forge in April 2000. This paper provides an introduction to the WEKA workbench, reviews the history of the project, and, in light of the recent 3.6 stable release, briefly discusses what has been added since the last stable version (Weka 3.4) released in 2003.Item type:Publication, Generating rule sets from model trees1999, SPRINGER-VERLAG BERLINModel trees—decision trees with linear models at the leaf nodes—have recently emerged as an accurate method for numeric prediction that produces understandable models. However, it is known that decision lists—ordered sets of If-Then rules—have the potential to be more compact and therefore more understandable than their tree counterparts. We present an algorithm for inducing simple, accurate decision lists from model trees. Model trees are built repeatedly and the best rule is selected at each iteration. This method produces rule sets that are as accurate but smaller than the model tree constructed from the entire dataset. Experimental results for various heuristics which attempt to find a compromise between rule accuracy and rule coverage are reported. We show that our method produces comparably accurate and smaller rule sets than the commercial state-of-the-art rule learning system Cubist.