Modern industrial and clinical machinery, such as the Liquid Handler (LH) device considered in this thesis, rely on Computer Vision (CV) systems to automatically verify the correct configuration of supplies (e.g., test tubes on the racks) before the initialization of a protocol (e.g., DNA extraction procedure). The classification models employed in these systems are typically trained once, offline, on a fixed dataset. However, this static learning paradigm struggles to cope with a recurring real-world challenge, i.e., the data drift caused by the introduction of new consumable variants. The typical solution is the periodical updating of the model in use, by acquiring a large number of new types of samples and integrating them in the original dataset for training; the issue, in this sense, is that this procedure requires a high cost of manual labeling at every cycle. This thesis, carried out during an internship at M31 Srl, proposes and implements a pipeline that integrates Active Learning (AL) and Continual Learning (CL) to address these limitations directly on the pre-existing tube classification system of an LH device developed by the company. The AL module combines a softmax-based uncertainty score with a Trust Score-based distrust score, computed through per-class Nearest-Neighbor indices fitted on a memory buffer, and flags tubes for human review according to a three-zone thresholding logic. The CL module incrementally fine-tunes the model on the reviewed crops, combining experience replay (with a choice between four coreset selection strategies for the memory buffer) and an optional Knowledge Distillation term, to mitigate catastrophic forgetting. Both AL and CL phases can be performed via command-line scripts or through a graphical interface that was specifically built for the pipeline. The pipeline was trained, tuned and then tested on a newly collected dataset carrying an intentional distributional shift, organized into two sequential AL-CL training pools, a tuning subset, and two independent test sets for final evaluation, one of which was acquired at a later stage of the internship. Entropy was found to be the most effective uncertainty strategy, and the Trust Score component further improved error recognition in the confident subset (confidently wrong model predictions). Under a fixed labeling budget, the tuned AL module was successfully able to expose previously unseen tube cap variants. The first CL update increased the average accuracy across the two test sets from 86.3% to 97.8%, correcting the model’s systematic misclassification specifically present between the ’cap’ and ’small’ classes. The second update, performed with a smaller number of informative new data, produced an additional small accuracy gain (a final average of 98.1%) and no evidence of critical macroscopic forgetting. A case study on a second rack configuration confirmed that the same workflow can generalize to a different setting with minimal to no re-tuning. These results indicate that combining Active and Continual Learning methods is an efficient approach for maintaining a classification model aligned with an evolving operating environment, while also significantly reducing the manual labeling cost required by traditional re-training.
I moderni macchinari industriali e clinici, come il dispositivo di gestione dei liquidi (Liquid Handler, LH) preso in esame, si avvalgono di sistemi di visione artificiale (Computer Vision, CV) per verificare automaticamente la corretta configurazione degli oggetti e materiali di consumo (es. provette sui rack) prima dell’avvio di un protocollo (es. estrazione del DNA). I modelli di classificazione impiegati vengono generalmente addestrati una sola volta, in modalità offline, su un dataset fisso. Tuttavia, questo paradigma di apprendimento statico ha difficoltà a far fronte alla deriva della distribuzione dei dati causata dall’introduzione di nuove varianti di materiali. La soluzione tradizionale consiste nell’aggiornamento periodico del modello, acquisendo nuovi campioni e integrandoli nel dataset di training originale; la criticità è che tale procedura comporta un costo elevato di etichettatura manuale ad ogni ciclo. Nella presente tesi, svolta in tirocinio presso M31 Srl, viene proposta e valutata l’implementazione di una pipeline che combina metodi di apprendimento attivo (Active Learning, AL) e continuo (Continual Learning, CL) per superare le limitazioni di un sistema preesistente di classificazione di immagini di provette integrato nel LH sviluppato dall'azienda. Il modulo AL combina un punteggio di incertezza (uncertainty score) basato sull’output softmax con uno di sfiducia (distrust score) basato sul Trust Score, e contrassegna le immagini ritagliate di ciascuna provetta per la revisione umana secondo una logica a tre soglie. Il modulo CL ottimizza in modo incrementale il modello sui ritagli revisionati, combinando l’experience replay (con quattro metodi di coreset selection per il memory buffer) e un termine opzionale di Knowledge Distillation, al fine di prevenire o ridurre il fenomeno del "catastrophic forgetting". Sia la fase AL che CL possono essere eseguite via linea di comando o tramite un’interfaccia grafica dedicata. La pipeline è stata addestrata, calibrata e testata su un nuovo dataset, acquisito per includere uno spostamento nella distribuzione dei campioni (data distributional shift). Questo set è stato organizzato in due pool di addestramento AL-CL sequenziale, un subset di tuning e due test set indipendenti, uno dei quali acquisito in uno stadio avanzato del tirocinio. L’entropia si è rivelata la strategia di incertezza più efficace e l’aggiunta del Trust Score ha ulteriormente migliorato il riconoscimento degli errori nel sottoinsieme "confident", ossia le predizioni errate ma prodotte con elevata sicurezza. Con un budget di etichettatura fissato, il modulo AL ha individuato con successo le nuove varianti di tappi. Il primo aggiornamento CL ha aumentato l’accuratezza media nei test set dall’86,3% al 97,8%, correggendo l’errore sistematico tra le classi 'cap' e 'small'. Il secondo ciclo, con meno campioni informativi, ha prodotto un ulteriore miglioramento dell’accuratezza (valore medio finale del 98,1%) senza evidenziare casi di "catastrophic forgetting". Un caso di studio su una seconda configurazione di rack (provette ausiliarie grandi) ha infine confermato la generalizzabilità del flusso di lavoro. Tali risultati indicano che la combinazione di apprendimento attivo e continuo rappresenta un approccio efficiente per mantenere il modello allineato a un ambiente in evoluzione, riducendo significativamente i costi di etichettatura manuale.
Design and Implementation of an Active and Continual Learning pipeline for Image Classification in a Laboratory Liquid-Handling System
DI PRAMPERO, GIULIA ALBA
2025/2026
Abstract
Modern industrial and clinical machinery, such as the Liquid Handler (LH) device considered in this thesis, rely on Computer Vision (CV) systems to automatically verify the correct configuration of supplies (e.g., test tubes on the racks) before the initialization of a protocol (e.g., DNA extraction procedure). The classification models employed in these systems are typically trained once, offline, on a fixed dataset. However, this static learning paradigm struggles to cope with a recurring real-world challenge, i.e., the data drift caused by the introduction of new consumable variants. The typical solution is the periodical updating of the model in use, by acquiring a large number of new types of samples and integrating them in the original dataset for training; the issue, in this sense, is that this procedure requires a high cost of manual labeling at every cycle. This thesis, carried out during an internship at M31 Srl, proposes and implements a pipeline that integrates Active Learning (AL) and Continual Learning (CL) to address these limitations directly on the pre-existing tube classification system of an LH device developed by the company. The AL module combines a softmax-based uncertainty score with a Trust Score-based distrust score, computed through per-class Nearest-Neighbor indices fitted on a memory buffer, and flags tubes for human review according to a three-zone thresholding logic. The CL module incrementally fine-tunes the model on the reviewed crops, combining experience replay (with a choice between four coreset selection strategies for the memory buffer) and an optional Knowledge Distillation term, to mitigate catastrophic forgetting. Both AL and CL phases can be performed via command-line scripts or through a graphical interface that was specifically built for the pipeline. The pipeline was trained, tuned and then tested on a newly collected dataset carrying an intentional distributional shift, organized into two sequential AL-CL training pools, a tuning subset, and two independent test sets for final evaluation, one of which was acquired at a later stage of the internship. Entropy was found to be the most effective uncertainty strategy, and the Trust Score component further improved error recognition in the confident subset (confidently wrong model predictions). Under a fixed labeling budget, the tuned AL module was successfully able to expose previously unseen tube cap variants. The first CL update increased the average accuracy across the two test sets from 86.3% to 97.8%, correcting the model’s systematic misclassification specifically present between the ’cap’ and ’small’ classes. The second update, performed with a smaller number of informative new data, produced an additional small accuracy gain (a final average of 98.1%) and no evidence of critical macroscopic forgetting. A case study on a second rack configuration confirmed that the same workflow can generalize to a different setting with minimal to no re-tuning. These results indicate that combining Active and Continual Learning methods is an efficient approach for maintaining a classification model aligned with an evolving operating environment, while also significantly reducing the manual labeling cost required by traditional re-training.| File | Dimensione | Formato | |
|---|---|---|---|
|
diPrampero_GiuliaAlba.pdf
embargo fino al 08/10/2029
Dimensione
10.13 MB
Formato
Adobe PDF
|
10.13 MB | Adobe PDF |
The text of this website © Università degli studi di Padova. Full Text are published under a non-exclusive license. Metadata are under a CC0 License
https://hdl.handle.net/20.500.12608/116651