During development of an industrial defect-inspection pipeline you learn that, for each new product variant, manufacturing can supply only a single defect-free reference image. The model must then accept or reject future images as belonging to that variant without full retraining whenever a new variant appears. A large archive of labeled images from thousands of earlier variants is available for offline training.
Which approach BEST meets this one-shot learning requirement?
Fine-tune the final layer of a pretrained convolutional classifier on the single photo of each new variant while freezing earlier layers.
Train a Siamese or prototypical network with contrastive/triplet loss to learn an embedding space, then classify each new variant by nearest-neighbor distance to its single reference image.
Apply k-means clustering on raw pixel intensities of all images-including the new variant-and use the resulting cluster IDs as labels.
Generate random crops and flips of the single reference image to create a larger synthetic dataset, then retrain a soft-max classifier from scratch.
One-shot learning problems require the model to correctly recognize instances of a previously unseen class after seeing just one labeled example of that class. Metric-learning architectures such as Siamese or prototypical networks are trained on a separate, larger dataset to learn an embedding space where samples from the same class lie close together and those from different classes are far apart. After this offline training, classification of a new variant is achieved by comparing the embedding of an incoming image to the embedding of its single reference image-no network weights need to be updated.
The other options fail the one-shot criterion: fine-tuning on a single image risks severe overfitting, synthetic augmentation still yields too little diversity for a robust soft-max classifier, and k-means on raw pixels ignores the hierarchical feature representations necessary for high-variance visual data.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is one-shot learning?
Open an interactive chat with Bash
How does a Siamese or prototypical network work for one-shot learning?
Open an interactive chat with Bash
What is contrastive/triplet loss in metric learning?