Abstract:
Fresh shrimps are prone to quality deterioration during circulation and processing, and sorting requires simultaneous identification of shrimp species and freshness. Conventional physicochemical assays are time-consuming and sample-destructive, while conventional visual classification fails to reflect the ordinal relationship among freshness grades. To improve the practicality of image-based non-destructive recognition, we selected red shrimp (
Pleoticus muelleri), whiteleg shrimp (
Litopenaeus vannamei), giant freshwater prawn (
Macrobrachium rosenbergii), and kuruma prawn (
Marsupenaeus japonicus) as research materials. Region-of-interest (ROI) images were acquired during cold storage at 4 ℃, and total volatile basic nitrogen (TVB-N) was measured to assign four freshness grades. A 16-class task was established by combining four species and four freshness grades. ResNet18 was used to extract deep features. Species-grade class prototypes were constructed in the latent space, ordered trajectories were formed between adjacent grade prototypes within each species, and species and freshness were inferred jointly from trajectory distance and trajectory coordinate. On the test set, the model achieved a 16-class accuracy of 96.59%, with F1 scores of 99.49% for shrimp species and 96.75% for freshness, and a mean absolute error (MAE) of 0.034 1 for freshness. Compared with ordinary ResNet18 joint classification, the accuracy increased by 1.29 percentage points and the MAE decreased by 0.0049. Class-prototype trajectory projection improved freshness-grade distance metrics while preserving species discrimination. Monotonic prototype projection ensured that class prototypes followed the predefined ordinal progression, providing interpretable technical support for non-destructive shrimp sorting under standardized imaging conditions.