HIDANet: a lightweight deep learning framework for Vannamei post-larval stage classification and morphometric estimation with background bias validation
Introduction Quality control of hatchery production relies on accurate developmental staging of the Pacific white shrimp Litopenaeus vannamei post-larvae (PL), but current methods rely on subjective manual visual evaluation that leads to observer bias and inconsistency. Methods In this study, the Hierarchical Isotropic Dense Attention Network (HIDANet) has been introduced, a lightweight convolutional neural network with 0.033M parameters that learns to classify seven post-larval stages (PL5–PL12) in a digitally obtained image of a defined larva. Its architecture uses multibranch isotropic depthwise separable convolution, channel-wise concatenation, and a Convolutional Block Attention Module (CBAM) to recalibrate sequential channel and spatial features. The background color bias was removed using an aggressive augmentation scheme that included strong color jittering, stochastic grayscale conversion, random auto-contrast, and geometric perturbations with inverse-frequency weighted sampling to address class imbalance. Results HIDANet trained on 5,835 collected hatchery images reached a test accuracy of 98.44% with color inputs and 96.89% with grayscale inputs, with a macro-averaged F1-score of 0.99, which confirms strong morphological learning that is independent of chromatic background signals. An end-to-end workflow combining CLAHE image enhancement, Gaussian adaptive thresholding, and skeleton-based morphometric filtering offers automated larva counting, area and length measurements of the population, and density categorized into three levels (Low, Medium, and High). Discussion The suggested framework allows for classifying the stages of PL and assessing larval numbers in the same image simultaneously, which is a scalable and low-cost method of quality monitoring in commercial aquaculture systems in real time.