UCTLFANet: a low-rank fine-tuning model for microalgae image segmentation Authors: Ziyue Liu, Yuan Cheng, Dan Liu, Meiyi Jiang, Wenhao Yue, Shuo Yan, Fengyu Tian, Liming Cao, Daoming Jia, Yanbo Jiang, Hai Bi Published: 2026 ABSTRACT AbstractThe fine-tuning module optimizes the model’s parameter structure while conserving computing resources. We introduce UCTLFANet, a low-rank fine-tuning model, for microalgae image segmentation. This model supports morphological analysis, cell counting, and physiological state assessment of microalgae. In this paper, we innovatively propose a low-rank fine-tuning method using a large language model for the image segmentation task of microalgae. This module employs the LoRA-FA method to adjust the model’s original training weights through low-rank increments. After fine-tuning, the model performs segmentation tasks with minimal parameter updates, enhancing the efficiency and accuracy of microalgae segmentation. To explore this module’s role further, we added it to the fully connected and convolutional layers of the UCTLFANet model during experiments and compared their performances. The results indicate that integrating this module into the fully connected layer yields the best outcomes. Compared to the UNet, UNet++, Attention-UNet, and UCTransNet models, our method demonstrates superior performance. Additionally, integrating the LoRA-FA module into the UNet, UNet++, and Attention-UNet models shows that UCTLFANet is more advanced and effective. Furthermore, the proposed model shows promising potential for generalization to other datasets or applications, making it a viable tool for broader marine microbial imaging detection.Keywords: Fine-tuning module, Microalgae, Parameter fine-tuning, LoRA-FA, UCTLFANetSubject terms: Computational biology and bioinformatics, Engineering, Mathematics and computing Introduction Microalgae are pivotal in research areas like biopharmaceuticals, alternative energy development, water eutrophication treatment, and heavy metal adsorption. In cultivating microalgae, image analysis technology facilitates the acquisition of multi-dimensional data on cell morphology, concentration, and interactions with metabolites1,2. Image segmentation technology plays a crucial role in analyzing microalgae images, with its primary value being the precise extraction of microalgae from the culture system, thereby offering a visual foundation for further research3,4. In recent years, the development of large language models (LLM) has achieved remarkable progress5. A notable advance in parameter fine-tuning is the low-rank adaptation method, which substantially reduces the number of trainable parameters for downstream tasks6. Among methods in this area, \:LoRA-FA offers distinctive advantages. It constrains weight updates during fine-tuning to a low-rank subspace and eliminates the need to store full-order input activations, thereby improving deployment efficiency7.Both \:LoRA and \:LoRA-FA operate by adding a low-rank auxiliary matrix to replace computations performed by the original weight matrix. By varying the rank of this auxiliary matrix, one can control the model’s computational cost and reduce redundant parameters. In image segmentation, most operations reduce to matrix computations, and the weights of convolutional and fully connected layers are typically initialized randomly. As a result, many parameter matrices are overparameterized. Motivated by this observation, parameter-efficient fine-tuning that leverages low-rank matrix updates is a viable approach for optimizing image segmentation models that rely on matrix operations. In microalgae image segmentation, models must extract complex image features deeply, suppress interference from visually similar species, and maintain high accuracy8. The \:UCTransNet model has demonstrated effectiveness in segmenting medical images and excels in complex features tasks. It retains the \:UNet architecture for its encoder and decoder while integrates the Transformer module more flexibly. The computations involved are essentially matrix operations9. This study aims to evaluate the feasibility of employing low-rank fine-tuning techniques to enhance the performance of microalgae image segmentation. Additionally, it investigates the depth of analysis regarding the practical application of this method within segmentation models. The main contributions of this study are as follows: The proposal to integrate a parameter fine-tuning module into the segmentation model aims to enhance the model’s feature extraction capabilities and improve segmentation performance. The proposal to integrate a parameter fine-tuning module into the segmentation model aims to enhance the model’s feature extraction capabilities and improve segmentation performance. Incorporating this module into the fully connected layer represents a novel approach for adjusting model parameter configurations and optimizing the model’s parameter structure. This method significantly boosts the model’s segmentation accuracy and offers a technical reference for future research focused on enhancing U-shaped networks’ performance. Incorporating this module into the fully connected layer represents a novel approach for adjusting model parameter configurations and optimizing the model’s parameter structure. This method significantly boosts the model’s segmentation accuracy and offers a technical reference for future research focused on enhancing U-shaped networks’ performance. The UCTLFANet microalgae segmentation model was introduced and evaluated within PMIC, CMIC, and HMIC. Comparative experiments involving U-Net, U-Net++, Attention-UNet, and UCTransNet demonstrated the superiority of this method. The results indicate that UCTLFANet excels in the segmentation of microalgae images. The UCTLFANet microalgae segmentation model was introduced and evaluated within PMIC, CMIC, and HMIC. Comparative experiments involving U-Net, U-Net++, Attention-UNet, and UCTransNet demonstrated the superiority of this method. The results indicate that UCTLFANet excels in the segmentation of microalgae images. Related work Literature review In recent years, the rapid advancement of deep learning technology has opened new avenues in image segmentation. Neural network-based image semantic segmentation can effectively differentiate and process various object features in complex scenes, enhancing contrast. Additionally, images can be segmented by analyzing the combination and proportion of objects, allowing for targeted processing based on scene characteristics to optimize segmentation10,11. In the realm of image segmentation, medical cell image segmentation technology has achieved remarkable success. Doan et al.‘s study on nuclear segmentation utilized a self-guided ordinal regression neural network for concurrent nuclear segmentation and classification. This approach leveraged the inherent properties of nuclei and concentrated on areas of high uncertainty during training, resulting in superior performance12. Jie Ji et al. introduced a segmentation method applicable to both the cytoplasm and nucleus of cervical cells. They developed an automatic cervical cell segmentation algorithm using the Cx22 dataset, achieving a Dice similarity coefficient exceeding 95% for both cytoplasm and nucleus segmentation, which highlights its exceptional performance in cervical cell segmentation13. UCTransNet is a model that employs a Transformer module in place of the hopping connections found in UNet networks. It utilizes a Channel-wise Cross fusion Transformer (CCT) to adaptively integrate coding and decoding features. Additionally, it extracts multiscale features from images through the Channel-wise Cross Attention (CCA) mechanism, demonstrating remarkable efficacy in the accurate recognition and segmentation of medical images9. The rapid advancement in medical cell image segmentation technology offers valuable insights for algae image segmentation. However, current medical image segmentation techniques cannot be directly applied to microalgae due to the distinct biological characteristics and environments of microalgae compared to human cells. The boundaries between microalgae cells and their surroundings are often indistinct, and even within the same species, microalgae tend to form stratified aggregations in their habitats14,15. These traits present significant challenges for accurately segmenting microalgae images. While few researchers have explored deep learning-based image segmentation algorithms for microalgae, some have achieved notable results. For instance, Yu and Guo introduced a non-interactive GrabCut method combined with salient region detection to segment non-setose microalgae, achieving a recognition accuracy of 81.76%16. Yang et al. developed the AlgaeSeg-YOLO method for segmenting microalgae against various backgrounds, achieving a mean average precision (mAP) of 95.61%17. Samarakoon et al. utilized the U-Net network architecture to segment microalgae on coral reefs, achieving an average intersection over union (IoU) of 0.8518. Despite these advancements, most existing technologies rely solely on surface image information and struggle with images containing complex semantic information. They also underperform in differential image processing tailored to the unique characteristics of microalgae and their environments, which is crucial for enhancing contrast. Addressing the low segmentation accuracy caused by the biological and environmental complexities of microalgae remains an urgent challenge19. Large language models (LLMs) have become integral to modern applications, serving as valuable assistants in both professional and personal contexts5. Parameter-efficient fine-tuning methods aim to mitigate the high costs associated with training and deploying large foundation models. A notable method is Low-Rank Adaptation , which facilitates effective fine-tuning by updating only low-rank additive matrices, known as adapter weights. \:LoRA has shown that fine-tuning solely these adapter weights can match the performance of full-parameter fine-tuning. However, the challenge of deploying these fine-tuned variants at scale remains largely unaddressed, prompting scholars to propose various LoRA adaptations to tackle this issue6,20. QA-LORA employs a grouping operator to reduce adaptation degrees of freedom while enhancing quantization degrees of freedom, integrating the LLM and auxiliary weights into a quantized model without compromising accuracy21. MT-LoRA utilizes task-agnostic and task-specific low-rank adaptation modules, optimizing the parameter space during multi-task learning (MTL) fine-tuning. This approach not only boosts accuracy on downstream tasks but also cuts the number of trainable parameters by 3.6 times22. S-LoRA manages dynamic adapter weights with varying ranks and KV cache tensors of different sequence lengths using a unified memory pool. It introduces a novel tensor parallelization strategy and custom CUDA kernels for heterogeneous parallelization of LoRA computation, enabling the service of thousands of LoRA adapters on a single GPU or across multiple GPUs, thus increasing throughput by up to four times and significantly expanding the number of served adapters23. LoRA-FA exemplifies application in image segmentation, exploiting LoRA’s computational benefits to optimize segmentation model parameters, deeply analyze microalgae image features, and resist interference from complex factors7. Low-rank parameter fine-tuning module The \:LoRA architecture is conceptually similar to residual connections. Its core principle involves appending two parallel parameter matrices, \:A and \:B, alongside a matrix in the model. During the iterative training process, the original parameter matrix remains fixed, while the newly introduced matrices \:A and \:B are the sole parameters updated. The training procedure is divided into two stages. First, the original parameter matrix \:W is pre-trained, while matrices \:A and \:B are left uncontainable. In the subsequent formal training phase, the parameters of \:W are frozen, and only the composite matrix \:AB is updated. Formally, the original parameter matrix \:W is of size , with the shape of matrix \:A being and matrix \:B being . The rank of \:AB is \:d, and a smaller value of \:d corresponds to a reduction in the number of parameters that require updating. The input-output formula in Eq. (1): The fundamental principle employed by \:LoRA-FA (Zhang et al., 2023) in its segmentation model mirrors that of \:LoRA. It incorporates a low-rank matrix of the sidelines to supplant the computation of the original matrix. However, a key distinction lies in the fact that the original parameter matrices \:W and \:A are frozen following initialization, while matrix \:B is the only matrix whose parameters are updated after being initialized to zero. Specifically, prior to the commencement of formal training, \:A is randomly initialized, and \:B is initialized to zero. Consequently, \:W=AB remains at zero, thereby ensuring that the model’s predictions are unaffected and preserving the initial generalization capacity of the pre-trained model. During the training phase, \:A and the pre-trained \:W remain frozen, allowing only the parameters of \:B to be updated. As a result, changes in weights during the model’s formal training are confined to the low-rank space of \:B. The \:FA-LoRA module consequently incurs a lower computational burden than the \:LoRA module, facilitating a simplification of model parameters and enhancing segmentation performance.The specific operating principle of \:LoRA-FA is shown in Fig. 1. LoRA-FA operating principle. Proposed UCTLFANet approach The model is constructed on the UCTransNet neural network framework, substituting jump connections with converters that adaptively fuse coding and decoding features. Nevertheless, segmenting microalgae images characterized by blurred edge features presents limitations and may result in parameter redundancy. To address this issue, a low-rank fine-tuning method is proposed in conjunction with a converter that adaptively fuses coding and decoding features. This approach aims to capture finer details of algae images while conserving computational resources, ultimately enhancing segmentation accuracy. Figure 2 illustrates the specific structure of the UCTLFANet network, which retains the overall architecture of the Unet model for its coding-decoding process. The original jump connection has been removed, allowing the feature maps Ei encoded at all levels to be input into the Channel Cross-Transformer (CCT). Within the CCT, features at all levels are re-encoded through the Multi-Channel Attention (MCA) module and processed using the self-attention mechanism. The output of the CCT is then directed to the Channel Cross-Attention (CCA) mechanism, which integrates with the decoder’s features to extract multiscale image features. This approach effectively bridges the semantic gap between the encoder and decoder, simultaneously addressing the issue of inconsistent semantic levels in the model’s handling of multiscale features. Furthermore, performance enhancements are achieved through the implementation of a fine-tuning parameter module, LoRA-FA. This module substitutes a low-rank matrix for traditional matrices during computations, thereby reducing model parameters to a low-rank space and performing parameter operations solely on the initialized model to yield the final segmentation result. UCTLFANet network architecture. Application analysis of LoRA-FA module In image segmentation, pre-trained models are commonly utilized to ensure segmentation accuracy. Large language models typically follow a “train first, then optimize” approach. For image segmentation models in the initial training phase, LoRA-FA optimizes redundant parameters within their matrices to enhance segmentation accuracy. For models that have developed specific recognition capabilities during pre-training, the application of LoRA-FA to optimize their architecture can further elevate segmentation performance.Structural optimization through \:LoRA-FA further improves the final segmentation effect of models that have already demonstrated recognition capabilities during pre-training. The fundamental principle underlying the operation of the \:LoRA-FA module is the integration of a low-rank matrix from the bypass system to substitute the computation of the original matrix. This approach can be applied to various structures, including the fully connected layer, convolutional layer, and Transformer within the model. The convolutional layer’s computation involves matrix multiplication. The convolution kernel traverses the feature map, multiplying input feature map values by those in the kernel to produce the output. In practice, both the input features and the convolution kernel are transformed into matrices for multiplication. The formula for discrete two-dimensional convolution is in Eq. (2): represents the output, and \:i and \:j represent the number of rows and columns of the output matrix. \:K is the convolution kernel of size , and \:A is the matrix undergoing convolution. Typically, the convolution kernel is a small, high-dimensional matrix. The process of convolution is illustrated in the matrix multiplication formulas Eqs. (3) and (4): The convolutional layer’s core function involves matrix unfolding and multiplication. Consequently, the LoRA-FA module can be applied adjacent to the convolutional kernel parameter layer to reduce parameter dimensionality. However, given the numerous convolutional layers and their integration with pooling layers, excessive \:LoRA-FA branches could compromise the model’s structure. The fully connected layer serves to integrate high-dimensional feature information into a one-dimensional vector for classification in convolutional neural networks. Following the convolutional and pooling layers, the data is connected to a fully connected layer, which consolidates the category information from the preceding layers24,25. In the fully connected layer, each neuron node is connected to all neurons in the previous layer, leading to a large parameter count and high memory usage. A schematic representation of the fully connected layer is provided in Fig. 3. Fully connected layer. In the figure, represent the inputs of the fully connected layer, and represent the outputs of the fully connected layer. The calculation formula is in Eq. (5): It is transformed into a matrix formula is in Eq. (6): From the above formula, it can be seen that the parameter matrix \:W contains too many variables and will consume a large amount of resources. Therefore, inserting a \:LoRA-FA module beside the parameter matrix of the fully connected layer will bring the best effect. \:Dropout is a random regularization technique used in fully connected layers to alleviate overfitting. Its fundamental principle involves randomly deactivating a subset of neuron nodes during training, thereby preventing their participation in parameter updates. This approach effectively reduces the model’s complexity. However, the neuron nodes deactivated by \:Dropout are not permanently frozen. In each training iteration, a proportion of the neurons is randomly inactivated. Upon the subsequent parameter update, these neurons are reactivated, and a new subset is randomly deactivated in a cyclical manner. A schematic representation of the Dropout random discard strategy is illustrated in Fig. 4. Both the \:Dropout and \:LoRA-FA modules are fundamentally designed to reduce the number of training parameters. If the \:LoRA-FA module is applied in the fully connected layer, it should avoid the model becoming heavy due to the same effect of the two. Fully connected layer. Materials and methods Datasets \:PMIC is a dataset created for the purpose of pre-training. During its generation, we developed an algorithm capable of automatically producing similar microalgae images. We utilized the np.ones function from the numpy library to create a array, which served as the canvas. Subsequently, we employed the random.sample function to randomly generate a list of \:20 elements, with each value ranging from \:10 to \:470. This list provided the X-axis coordinates for the distribution locations of the algae, while the Y-axis coordinates were generated in a similar manner. We then used the cv2.circle function to draw \:20 circles, each with a radius of \:3, on the canvas based on the \:xy -axis data from the list. The color of the microalgae in the original image, as determined by the color extractor, is . The circles were colored accordingly, while the label was rendered in pure red. To effectively train the microalgae segmentation model, we prepared Chlorella and Haematococcus pluvialis culture media by simulating their natural survival environments in the laboratory and labeled the images according to task requirements. Chlorella represents the most common microalgae species, with its relatives being prevalent in aquatic, terrestrial, and photosynthetic habitats. Haematococcus pluvialis serves as the optimal source for natural astaxanthin production; however, its cultivation and preservation techniques are notably challenging. Consequently, selecting images of Chlorella and Haematococcus pluvialis, along with their various living scenarios, is highly representative for the dataset26,27. To facilitate observation, we will binarize the label graph for subsequent display. The authentic algae images utilized for training were collected under controlled laboratory conditions using a \:LeicaDM4B microscope. The culture media for the two types of algae were extracted separately in the laboratory, applied onto microscope slides, covered with cover slips, and then observed and photographed. Following image capture, the algae images were cropped to a size of pixels. Upon completion of the collection, this study employed labelme to annotate the data and delineate the contours of the algae. An illustration of the real algae image acquisition process is presented in Fig. 5. Schematic diagram of dataset collection and generation. We utilized two data augmentation techniques, specifically sharpening and noise addition, to improve our original dataset. The enhanced images of the two types of algae are presented in Fig. 6. The implementation of these data augmentation methods, alongside the incorporation of algae in complex scenarios, has enriched our dataset. Consequently, the trained algae segmentation model exhibits high robustness, enhanced generalization capability, and improved accuracy.We subsequently allocated the acquired images. The \:PMIC was constructed using \:400 computer-generated images of algae, along with \:60 images of Chlorella and Haematococcus. The test set comprised \:20 computer-generated images and \:10 real algae images, while the training set contained \:380 computer-generated images and \:20 real algae images. The verification set included \:20 computer-generated images and \:10 real algae images. The \:CMIC consists of images of Chlorella, which includes \:270 from the test set, from the training set, and \:270 from the validation set. The \:HMIC also comprises images of Haematococcus pluvialis, with \:270 in the test set, in the training set, and \:270 in the validation set. Data enhanced image. Evaluation metrics Image segmentation classifies all pixels within the target region. An end-to-end segmentation model outputs an image matching the original size, marking pixel values in the target area. This study employs standard evaluation metrics in image segmentation: the \:Dice similarity coefficient and mean intersection over union (IoU). The \:Dice quantifies similarity between two sets. In practice, model outputs rarely match labels exactly; thus, the intersection-to-sum ratio of the sets gauges similarity between predicted and label images. The \:Dice ranges from to \:1, with values closer to \:1 indicating better performance. The calculation is detailed in Eq. (7): In this context, denotes the true segmentation region, while signifies the model’s predicted segmentation region. The Intersection over Union is the ratio of the intersection area of the predicted and true segmentation regions to their union area. An \:IOU value approaching \:1 signifies superior segmentation. The formula for this calculation is presented in Eq. (8): Experiment setup LoRA-FA module insertion The \:LoRA-FA module can be integrated into all convolutional and fully connected layers. To determine the optimal insertion position of the \:LoRA-FA module, this study designed four comparative groups: \:LF-CFC-UCTransNet (where \:LoRA-FA modules are incorporated into both convolutional and fully connected layers), \:LF-C-UCTransNet (where \:LoRA-FA modules are inserted solely into convolutional layers), and \:LF-FC-UCTransNet (where \:LoRA-FA modules are placed exclusively in fully connected layers). To mitigate the risk of model overfitting, we developed \:LF-ODFC-UCTransNet, which integrates the \:LoRA-FA module into the fully connected layer while removing the dropout module in that layer to assess the impact of the \:LoRA-FA module. To evaluate the model’s inherent segmentation capability, we bypass the results of pre-training and proceed directly to formal training. We utilize \:CMIC and \:HMIC for the training and validation of the proposed model.The \:UCTransNet architecture incorporates a fully connected layer at the end of the Cross-Channel Transformer module. The \:CCT module’s performance is enhanced by leveraging the self-attention mechanism from the Transformer model. Within the \:CCT, four weight matrices \:(Q,K,V,C) are derived from the encoder. Applying \:LoRA to all of these matrices would result in a further loss of the encoding’s deep information. Unlike the conventional Transformer model, the self-attention mechanism operates on the data channels and utilizes the axial attention mechanism for computation. Forcibly integrating the \:LoRA-FA module would lead to a loss of information in the data channels. Therefore, in this study, the \:LoRA-FA is not added to the fully connected layer of the \:CCT module, to preserve the original structure of the model as much as possible. Comparison of UCTLFANet models To further explore the advanced nature of this model in the segmentation effect of algae images, comparative experiments were conducted using \:UNet, \:UNET++, \:Attention-UNet, and \:UCTransNet networks to evaluate the selection of microalgae segmentation models. To ensure the accurate results of the proposed microalgae segmentation network, \:PMIC was used to pre-train each model. After obtaining the pre-training weights, formal training was conducted on the \:CMIC and \:PMIC datasets. Through experimental comparison, the effect of \:UCTLFANet on algal image segmentation was verified. LoRA-FA module verification Merely superimposing modules on a single model is not sufficient to fully convince people of the advanced nature of \:UCTLFANet in microalgae image segmentation. In this study, the \:LoRA-FA module is also introduced on the UNet, \:UNET++, \:Attention-UNet and network models. Through experimental comparison, the role of the \:LoRA-FA module in the algae image segmentation in this study was verified. The obtained models, \:LF-UNET, \:LF-UNet++ and \:LF-Attention-UNet, all added \:FA-LoRA to the convolutional module. This is because the \:UNet, \:Unet++ and \:Attention-UNet models are all fully convolutional neural networks, in which there are no fully connected layers.The \:UNet, \:UNet++, and \:Attention-UNet models are fully convolutional neural networks that do not incorporate fully connected layers. Notably, fully convolutional layers are superior in preserving the spatial information of images when compared to fully connected layers. Additionally, all three U-shaped networks employ skip connections to facilitate communication between the encoder and decoder. This design prevents the \:FL-C-UCTransNet model from introducing \:LoRA-FA within the convolutional layer, which could lead to a loss of depth information and a decrease in the model’s sensitivity. Consequently, the contrast effect of the aforementioned models is reliable. Each model undergoes pre-training using \:PMIC. Following the acquisition of pre-training weights, formal training is performed on the \:CMIC and \:PMIC datasets. Through the comparison of experimental results, the advanced nature of the \:UCTLFANet model for algae image segmentation is verified. Implementation details In this study, the rank of the \:LoRA-FA module is selected as \:16 to explore the advancement of \:UCTLFANet. This study was conducted on a \:Windows1064-bit operating system, with an \:i5-12600KF \:CPU running at \:3.72GHz and an \:NVIDIA \:GeForceRTX3060 graphics card with \:12GB of memory was used to set up the programming environment, with \:Python3.8 and the \:PyTorch framework. \:PyCharm served as the integrated development environment for program execution and model construction. The \:GPU configuration is detailed in Table 1. Table 1NVIDIA GeForce RTX 3060 configuration.GPU modelNVIDIA GeForce RTX 3060Memory capacity12GBMemory frequency12,000 MHzMemory typeGDDR6Bit192bitMaximum resolution7680 × 4320Core frequency1320 MHz (foundation)-1780 MHz (accelerate)CUDA Core3584 NVIDIA GeForce RTX 3060 configuration. Iterate using \:Adam as the optimizer. Set batch-size to 2 during training. Following each training epoch, the model was validated on the validation set, and the average \:Dice coefficient was recorded. If the current \:Dice coefficient exceeded the previous validation results, the model was saved. However, the comparison and subsequent model saving were not initiated until after the initial \:50 training epochs. This was to ensure that the gradient had sufficiently descended towards the global minimum, thereby avoiding the risk of saving a model trapped in a local minimum, which would unnecessarily occupy storage space. After \:200 training iterations, the model parameters corresponding to the highest validation \:Dice coefficient were retained as the final result. The training parameter settings are detailed in Table 2. Table 2Training parameter settings.ParameterParameter settingsOptimizerAdam (adaptive moment estimation)Weight initializationGaussian normalization with a standard deviation of 0.01Epoch200Initial learning rate0.0001Loss functionBCElossBatch-size2Model input image size3 × 480 × 480 Training parameter settings. Results Introduction to experimental results of LoRA-FA module introduction To identify the optimal reference method for the LoRA-FA module, experiments were conducted, and comparisons were made across various application locations. Evaluations utilized the Dice and IoU metrics. The specific data are as follows: According to Table 3, LF-CFC-UCTransNet achieves a Dice coefficient of 83.02% and an Intersection over Union (IOU) of 67.01% on the CMIC, as well as a Dice coefficient of 86.05% and an IOU of 68.29% on the HMIC. Both metrics are lower than those of the UCTransNet model without the LoRA-FA module. This suggests that excessive incorporation of LoRA-FA may render the model overly complex, complicating the segmentation tasks and resulting in decreased segmentation accuracy. The performance of LF-C-UCTransNet on both CMIC and HMIC remains inferior to that of UCTransNet. It appears that the addition of LoRA-FA modules to all convolutional layers compromises some depth information and diminishes the model’s sensitivity. Notably, the final segmentation results of LF-FC-UCTransNet are the most favorable. On CMIC, the Dice coefficient reaches 90.44% and the IOU reaches79.25%. On HMIC, the Dice coefficient attains 93.78% and the IOU reaches 79.87%, marking the best performance among all evaluated models. Figure 7 illustrates the visual effect comparisons among various models. The segmentation performance of LF-FC-UCTransNet demonstrates stable results. The imaging of microalgae segmentation is thorough, with excellent detail and significant contrast against the background. This suggests that the parameter matrix of the fully connected layer is over-parameterized. Redundant training parameters not only prolong training time and consume computing resources but also hinder the allocation of resources to parameters that genuinely require training. Therefore, incorporating LoRA-FA modules into the fully connected layer is a viable approach. In this study, the addition of the LoRA-FA module and the removal of Dropout resulted in the LF-ODFC-UCTransNet model, which ultimately yielded the poorest performance among all models. This indicates that the Dropout strategy is indispensable; its effectiveness is maximized only when it operates in conjunction with the LoRA-FA module. Table 3Comparison of introducing LoRA-FA into the model.Network modelCMICHMICDice (%)IoU (%)Dice (%)IoU (%)UCTransNet87.2570.4389.7672.19LF-CFC-UCTransNet83.0267.0186.0568.29LF-C-UCTransNet85.8569.4988.2769.61LF-FC-UCTransNet90.4479.2593.7879.87LF-ODFC-UCTransNet77.5661.4174.2463.84 Comparison of introducing LoRA-FA into the model. Comparison of segmentation effects at different insertion positions. Comparison experiment results of UCTLFANet model The research in the previous section has demonstrated that inserting the \:LoRA-FA module into the fully connected layer can achieve the most ideal effect. The following research will continue this strategy and conduct comparative experiments and advanced model pre-training using \:UNet, \:UNET++, \:Attention-UNet and \:UCTransNet networks. The results of pre-training each model on \:PMIC are shown in Table 4. Table 4Pre training results of each model.ProjectDice (%)Iou (%)Unet75.9356.54Unet++77.7358.09Attention-Unet77.7458.13UCTransNet77.1557.57UCTLFANet79.4159.84 Pre training results of each model. It can be seen that the performance of each model on the pre-training dataset is not good. This is because in the pre-training dataset, the proportion of images automatically generated by the computer in the training set is relatively large, while the proportion of real algae images is relatively small. Model overfitting only updates parameters close to the training set. The comparison of visual effects among the four models is shown in Fig. 8. Pre training results of the original model. The pre-training result of the UNet model shows a \:Dice coefficient of 75.93 and an IOU of , which is the worst performance among all the models. This is because the images automatically generated during pre-training pose a risk of overfitting for the model, and the structure of UNet is too lightweight, resulting in a relatively low ability to resist overfitting. The pre-trained \:Dice coefficient of \:UNet++ is , and the is , which is slightly better than the results of \:UNet. This is because the dense connections of \:Unet++ generate more parameters for the model, increasing the complexity of the model and the risk of overfitting. From this, it can be seen that jump connections are not always valid. The \:Dice coefficient of \:Attention-UNet is and the \:IOU is . The segmentation effect is good because the Attention mechanism in \:Attention-Unet can improve the segmentation accuracy of the model. The segmentation effect of \:UCTransNet is superior to that of the \:UNet model, with a \:Dice coefficient of and an \:IOU of . Although the \:UCTransNet model is a relatively complex structure, it all contains a \:Dropout module, which reduces the number of parameters available for training. The Transformer module in the model has good cross-channel capability and anti-interference ability. The segmentation effect of \:UCTLFANet is the best among all models, with a \:Dice coefficient of and an \:IOU of . \:UCTLFANet contains the \:LoRA-FA module, which can better organize high-dimensional feature information and adjust the model parameter configuration. Even in the face of model overfitting where parameters are updated only close to the training set, it can still demonstrate excellent performance among numerous models. The performance of each model during pre-training was average, primarily due to the limited number of real algae images in the training set. In contrast, both the validation and test sets comprised entirely of real algae images. This fragmentation among the training, validation, and test datasets hampers the model’s ability to achieve optimal training outcomes. Additionally, the relatively small volume of training data poses challenges in enhancing the evaluation metrics for the model’s final segmentation. The \:Dice coefficients for each model have exceeded . Notably, the \:Dice coefficient for \:UCTLFANet has reached , with an Intersection over Union (IOU) of . This suggests that the model possesses a preliminary capacity for generalization and can effectively manage certain segmentation tasks. Consequently, during formal training, most parameters can remain fixed, requiring updates for only a subset of them. This approach conserves significant computational resources, reduces the time needed for model training, and enhances the speed of gradient descent. Currently, all models demonstrate strong performance on the pre-training dataset, capable of segmenting images in the pre-training test set to a satisfactory degree, thus serving as adequate pre-training weights for subsequent formal training. After the pre-training is completed, the best model of each model during the pre-training is saved and used as the initial parameter for pre-training. The results of the formal training are shown in Table 5. Table 5Comparison of formal training results.ProjectCMIC Dice%CMIC Iou%HMIC Dice%HMIC Iou%UNet89.8271.4992.5675.69UNet++90.6474.2591.7475.42Attention-UNet91.5576.7193.0877.96UCTransNet90.8973.6892.3574.52UCTLFANet95.4381.0796.5282.24 Comparison of formal training results. In summary, \:UCTLFANet outperformed all other models, achieving the highest \:Dice and \:IoU scores in both the \:CMIC and \:HMIC datasets. Specifically, on \:CMIC, \:UCTLFANet surpassed \:Attention-UNet, which had the next best performance, by and , respectively. Similarly, on \:HMIC, it exceeded \:Attention-UNet by and . Figure 9 illustrates the visual comparison of segmentation effects among the five models. The figure demonstrates that our method excels in detail segmentation, complete segmentation of microalgae, and background contrast compared to other models. These results indicate that \:UCTLFANet achieves segmentation performance that is comparable to, or even exceeds, that of traditional methods in the context of marine microalgae segmentation. Comparison of visual performance among five models. Validation experiment results of LoRA-FA module on the model To further explore the role of the \:LoRA-FA module in different models, this section also introduces the \:LoRA-FA module in the \:UNet, \:UNET++, \:Attention-UNet, and \:UCTransNet network models. First, each model was pre-trained on the \:PMIC, and the results are shown in Table 6. Table 6The pre-training effect of each model after adding LoRA-FA.ProjectDice(%)Iou(%)LF-UNet76.3457.71LF -UNet++78.5958.56LF -Attention-UNet79.2559.25UCTLFANet79.4159.84 The pre-training effect of each model after adding LoRA-FA. Compared with the original model, the addition of LoRA-FA improved the training performance of each model. Among them, the training effect of \:UCTLFANet remains the best among all models, with a Dice coefficient reaching 79.41% and an IOU of 59.84%. The visual performance comparison of the pre-training effects of the four models is shown in Fig. 10. Pre training results graph. After the pre-training is completed, the best model of each model during the pre-training is saved and used as the initial parameter for pre-training. The results of the formal training are shown in Table 7. Table 7Segmentation performance of each model after adding the LoRA-FA module.ProjectCMIC Dice%CMIC Iou%HMIC Dice%HMIC Iou%LF -UNet90.5373.8693.5176.67LF -UNet++92.1575.6892.3576.72LF -Attention-UNet93.2478.8294.2180.19UCTLFANet95.4381.0796.5282.24 Segmentation performance of each model after adding the LoRA-FA module. The results indicate that \:UCTLFANet outperforms all other models in terms of \:Dice and \:IoU across both datasets. Figure 11. illustrates the visual effects of the four models. As depicted in the figure, \:UCTLFANet consistently demonstrates superior visual performance compared to the other models, which have also shown improvements in segmentation effects. This suggests that the incorporation of \:LoRA-FA has effectively optimized the parameter settings of \:UCTransNet, reduced the number of redundant parameters, and enhanced both the training efficiency and sensitivity of the model. Formal training results graph. Conclusions The experimental results show that our proposed model \:UCTransNet has better segmentation performance compared to other ensemble methods. Notably, the Dropout strategy employed in this model significantly contributes to the stability of segmentation outcomes. Pre-training results from \:PMIC, alongside the segmentation outcomes from \:CMIC and \:PMIC, indicate that \:UCTLFANet outperforms \:UNet, \:UNet++, \:Attention-UNet, and \:UCTransNet segmentation models. Furthermore, the performances of \:LF-UNet, \:LF-UNet++, and \:LF-Attention-UNet have improved relative to their original counterparts. This finding suggests that the integration of \:LoRA-FA into the convolutional layer of the U-shaped network enhances the model’s segmentation capability for algae images. Additionally, \:UCTLFANet maintains the highest segmentation performance, further substantiating the advanced nature of our proposed model. Collectively, results from various analyses underscore the advantages of the proposed model in the segmentation of microalgae images. Author contributions Conceptualization, Z.L. Data collection, Y.C. Analysis and interpretation of results, D.L. Manuscript preparation, M.J. Project administration, W.Y. Review and editing, S.Y. Visualization, F.T. Methodology, L.C. and D.J. Software, Y.J. and H.B. All authors reviewed the results and approved the final version of the manuscript. Funding This work was supported in part by the Basic Scientific Research Project for Higher Education Institutions of the Education Department of Liaoning Province under Grant LJKMZ20221089, in part by the Key Laboratory of Environment Controlled Aquaculture (Dalian Ocean University) Ministry of Education Project under Grant 202307, in part by the Liaoning Province Science and Technology Joint Program Project 2025-MSLH-120. Data availability Data can be obtained from the corresponding author upon request. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement Data can be obtained from the corresponding author upon request.