A dual-branch medical image lossless compression method based on a pre-trained large language model

By employing a two-branch lossless compression method for medical images based on a pre-trained large language model, and utilizing adaptive bit plane partitioning and pre-trained model adaptation to optimize bit rate allocation, this method solves the problem of failing to effectively utilize semantic rules in existing technologies, and achieves efficient lossless compression of medical images.

CN120726145BActive Publication Date: 2025-11-25UESTC (SHENZHEN) ADVANCED RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511173226.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-11-25
Estimated Expiration
2045-08-21

AI Technical Summary

Technical Problem

Existing deep learning-based lossless compression methods for medical images fail to effectively utilize semantic patterns in the data, resulting in significant geometric redundancy and making it difficult to achieve a balance between compression ratio, image quality, and computational cost.

Method used

A lossless medical image compression method based on a pre-trained large language model is adopted. By adaptive bit plane partitioning and adaptation of the pre-trained large language model, the bit rate allocation is optimized, the semantic key parts are preserved, and the lossless compression of the image is achieved by combining arithmetic coding and decoding techniques.

Benefits of technology

It improves the compression performance of medical images, reduces computational complexity, and achieves a balance between compression rate, image quality, and computational cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726145B_ABST
    Figure CN120726145B_ABST
Patent Text Reader

Abstract

The application discloses a double-branch medical image lossless compression method based on a pre-training large language model, relates to the technical field of medical images, and solves the technical problem that medical image lossless compression is difficult to balance image compression rate, image quality and calculation cost. The method comprises the following steps: obtaining a global mode and a local mode based on a training set; encoding a global mode bit stream based on the global mode and encoding an implicit variable bit stream based on the implicit variable; encrypting an information bit stream to the local mode to obtain an encrypted local mode, and inputting the global mode and the encrypted local mode into a feature embedding layer; taking a global mode feature embedding representation as a visual prompt word of a pre-training large language model to obtain an encrypted local mode bit stream, sequentially splicing the bit streams of the global mode, the implicit variable and the encrypted local mode to obtain an image lossless compression bit stream; and testing and evaluating through a test set. The application balances the medical image compression rate, image quality and calculation cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image technology, and in particular to a two-branch lossless compression method for medical images based on a pre-trained large language model. Background Technology

[0002] Lossless compression technology for medical images is a crucial aspect of medical informatics, requiring both the preservation of image integrity to support accurate diagnosis and the handling of massive data storage and transmission challenges. With advancements in artificial intelligence, deep learning technology, with its powerful data processing and feature extraction capabilities, offers an effective solution for lossless compression of medical images. The hierarchical structure of deep neural networks provides a non-linear transformation mechanism, which helps reduce the redundancy and correlation of image features in high-dimensional space, thereby achieving more efficient image compression.

[0003] Existing deep learning-based lossless compression methods for medical images primarily achieve lossless compression through low-dimensional feature extraction and reconstruction optimization. This approach typically focuses only on statistical redundancy (for a series of numerical values, if some values ​​appear frequently while others are infrequent, this statistical non-uniformity constitutes statistical redundancy), failing to utilize semantic patterns in the data. This leads to significant geometric redundancy (data redundancy arising from the spatial correlation of adjacent pixels), making it difficult to achieve a balance between compression rate, image quality, and computational cost in medical images.

[0004] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art:

[0005] Existing deep learning-based lossless compression methods for medical images only focus on statistical redundancy and do not utilize semantic patterns in the data, resulting in a lot of geometric redundancy and making it difficult to achieve a balance between medical image compression rate, image quality and computational cost. Summary of the Invention

[0006] The purpose of this invention is to provide a two-branch lossless compression method for medical images based on a pre-trained large language model. This addresses the technical problem in existing deep learning-based lossless compression methods for medical images that focus only on statistical redundancy and fail to utilize semantic patterns in the data, resulting in significant geometric redundancy and making it difficult to achieve a balance between compression rate, image quality, and computational cost. The various technical effects of the preferred solutions provided by this invention are detailed below.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] This invention provides a two-branch lossless medical image compression method based on a pre-trained large language model, comprising the following steps: S100: Constructing an image dataset, dividing the image dataset into a training set and a test set, and performing adaptive bit-plane partitioning on the images in the training set to obtain the global modality and local modality of the image; S200: Randomly sampling latent variable samples from the prior distribution of the global modality, encoding them through an arithmetic encoder to obtain an initial bitstream, encoding the global modality through the encoder to obtain the posterior probability distribution of the latent variables, inputting the initial bitstream and the posterior probability distribution of the latent variables into an arithmetic decoder to decode the latent variables, decoding the latent variables through the decoder to obtain the likelihood probability distribution of the global modality, inputting the global modality and the likelihood probability distribution of the global modality into an arithmetic encoder to encode the global modality bitstream, and inputting the latent variables and their prior probability distribution into an arithmetic encoder to encode the latent variable bitstream; S300: Through A The SCII encoding method encodes privacy information into an information bitstream, encrypts the information bitstream into local modalities in segments to obtain encrypted local modalities, and inputs the global modality and encrypted local modalities into the feature embedding layer to obtain global modality feature embedding representations and encrypted local modality feature embedding representations, respectively. S400: The encrypted local modality feature embedding representation is used as input to a pre-trained large language model, and the global modality feature embedding representation is used as visual cue words for the pre-trained large language model. The pre-trained large language model is adapted to obtain the probability distribution of the encrypted local modality. The encrypted local modality and its probability distribution are input into an arithmetic encoder to obtain an encrypted local modality bitstream. The global modality bitstream, the latent variable bitstream, and the encrypted local modality bitstream are sequentially concatenated to obtain a lossless compressed image bitstream. S500: The trained model weights are loaded into the medical image compression network model, and the compression results of the medical image compression network model are tested and evaluated using a test set.

[0009] Preferably, in step S100, the training set data comes from the Flickr2k dataset, and the images in the Flickr2k dataset are cropped to 128 pixels. 128 blocks; the test set data includes seven datasets: chest X-ray image database, lung CT scan image database, lung CT dataset, brain CT dataset, lumbar spine CT dataset, breast ultrasound dataset, and brain tumor MRI dataset.

[0010] Preferably, in step S100, the partitioning of the adaptive bit plane is determined by the following formula: in, For the first i Units plane With images Mutual information values ​​between them Let X be the mutual information value between the image and itself, and s be the partition index of the image. Here, `inf` is the hyperparameter, and `inf` is the infimum, ensuring that the first occurrence of a cumulative mutual information value greater than the hyperparameter occurs. These are the dividing points between the high-level and low-level planes.

[0011] Preferably, in step S200, the encoder obtains the posterior probability distribution of the latent variables using the following formula. :

[0012] ,

[0013] ,

[0014] in, This represents the encoder's encoding calculation, and its parameters are: Latent variables The mean of the posterior probability, Latent variables The posterior probability variance, It is the identity matrix. It follows a normal distribution.

[0015] Preferably, in step S200, the arithmetic decoder obtains the latent variables using the following formula. : in, This represents the decoding calculations of the arithmetic decoder, where `initialbits` is a numerical array used to initialize the bitstream conversion. Let be the posterior probability distribution of the latent variable.

[0016] Preferably, in step S200, the decoder calculates the likelihood probability distribution of the global mode using the following formula. :

[0017]

[0018]

[0019] in, The mean of the likelihood probability. Let V be the likelihood probability variance. This represents the total number of pixels in the image. Indicates the index of an element in the image. This represents the decoding calculation of the decoder, and its parameters are: , Let C represent a hidden variable, where C is a constant.

[0020] Preferably, in step S200, the arithmetic encoder encodes the global modality and latent variables respectively using the following formulas to obtain the global modality bitstream and latent variable bitstream:

[0021]

[0022]

[0023] in, Represents a global modal bitstream. This represents the encoding calculation of the arithmetic encoder. Represents latent variables. Represents a hidden variable bitstream. This represents the prior probability distribution of the latent variable. Represents global mode, This represents the likelihood probability distribution of the global mode.

[0024] Preferably, in step S300, the original information bitstream is segmented to obtain... s The first sub-information bitstream segment, then using the first... i Each sub-information bitstream segment replaces the first bit in the local mode bit by bit. i Units plane ( i =1,… ,s The local encryption mode is obtained; and the bit plane in the local mode is compared bit by bit with the mask value in the information bit stream. If they are different, the corresponding position in the initial bit diagram is recorded as 1, otherwise it is recorded as 0, and finally the bit diagram is obtained.

[0025] Preferably, in step S400, a LoRA fine-tuning strategy is used in the parameter layer of the pre-trained large language model to adapt the pre-trained large language model to the image compression task. The internal representation of the model is adjusted by inserting low-rank matrices A and B using the following formula to obtain the probability distribution of the encrypted local modalities. ,

[0026]

[0027]

[0028] ,

[0029] in, Represents encrypted local modes, matrix Using the mean of anatomical features and variance Perform initialization. Representing a normal distribution, the matrix The zero matrix is ​​represented by LLM, which stands for Pre-trained Large Language Model.

[0030] Preferably, in step S400, the arithmetic encoder performs encoding calculations on the encrypted local modes using the following formula to obtain the encrypted local mode bit stream. : in, This represents the encoding calculation of the arithmetic encoder. Indicates encrypted local modes, The probability distribution of encrypted local modes.

[0031] Implementing one of the above-described technical solutions of the present invention has the following advantages or beneficial effects:

[0032] This invention leverages the knowledge base internalized by a pre-trained large language model to improve the compression performance of specialized domain data. Simultaneously, it uses adaptive bit-plane partitioning to split the original medical image data, which, compared to compressing the entire image using a pre-trained large language model, significantly reduces computational complexity and improves efficiency. Furthermore, by providing prompts to the pre-trained large language model to prioritize the preservation of semantically key components and optimizing bitrate allocation without loss of quality, it achieves a balance between medical image compression rate, image quality, and computational cost. Attached Figure Description

[0033] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0034] Figure 1 This is a flowchart of a two-branch lossless medical image compression method based on a pre-trained large language model according to an embodiment of the present invention;

[0035] Figure 2 This is a schematic diagram of the structure of a two-branch lossless medical image compression method based on a pre-trained large language model according to an embodiment of the present invention;

[0036] Figure 3 This is a schematic diagram of the encryption process of a two-branch lossless compression method for medical images based on a pre-trained large language model according to an embodiment of the present invention;

[0037] Figure 4 This is a schematic diagram illustrating the decryption process of a lossless medical image compression method based on a pre-trained large language model according to an embodiment of the present invention. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of the present invention clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments, illustrating various exemplary embodiments that may be used to implement the present invention. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of the present invention disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of the present invention.

[0039] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," etc., indicate the orientation or positional relationship based on the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the referred element must have a specific orientation, or be constructed and operated in a specific orientation. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "multiple" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can be fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0040] To illustrate the technical solution of the present invention, specific embodiments are described below, showing only the parts related to the embodiments of the present invention.

[0041] Example:

[0042] like Figure 1 , Figure 2 As shown, this invention provides a two-branch lossless compression method for medical images based on a pre-trained large language model, including the following steps: S100: Construct an image dataset, divide the image dataset into a training set and a test set, perform adaptive bit-plane slicing on the images in the training set (bit-plane slicing is the process of decomposing the grayscale values ​​of a digital image into independent binary images according to binary bits; for example, an 8-bit grayscale image can be divided into 8 bit planes, each plane retaining only the value of the corresponding binary bit in the original image), and obtain the global modality and local modality of the image (in this embodiment, the global modality is represented as...). Local modes are represented as ,in Represents an image. This represents the bit-plane partitioning index; where S+1:8 are the higher bit-planes, containing more information, representing the global modality; 1:S are the lower bit-planes, containing less information, representing the local modality), and image compression is performed in both the global and local modal branches. S200: Randomly sample latent variables (latent variables are low-dimensional abstract representations that cannot be directly observed but determine image generation and feature expression; they establish the association between pixels and semantics through a probability model and are widely used in generation, reconstruction, and understanding tasks) from the prior distribution of the global modality (the probability distribution assumption before observing data). Obtain the initial bitstream through an arithmetic encoder. Encode the global modality using an encoder (the encoder converts the original pixel data into a compressed format using a specific algorithm, reducing storage and transmission overhead) to obtain the posterior probability distribution of the latent variables. Input the initial bitstream of the global modality and the posterior probability distribution of the latent variables into... The arithmetic decoder (which restores the compressed numerical stream to the original symbol sequence, with the core principle being lossless data recovery through interval iterative mapping) decodes the latent variables. The decoder then decodes the latent variables to obtain the likelihood probability distribution of the global mode (the likelihood probability distribution maximizes the likelihood of the parameters through observed data, thereby inferring the optimal values ​​of the parameters). The global mode and its likelihood probability distribution are input into the arithmetic encoder to encode the global mode bitstream. The latent variables and their prior probability distributions (the prior probability distribution is a probability distribution in the parameter space that describes the initial confidence level of the variables) are input into the arithmetic encoder to encode the latent variable bitstream. S300: Privacy information (information in images that needs to be kept confidential, generally private information, which can be customized according to usage needs) is encoded into an information bit stream using the ASCII encoding method (an internationally recognized standard code for information exchange, using a specified combination of 7 or 8 binary numbers to represent 128 or 256 possible characters). The information bit stream is then segmented and encrypted into local modalities to obtain encrypted local modalities. The global modality and the encrypted local modality are input into the feature embedding layer to obtain the global modality feature embedding representation and the encrypted local modality feature embedding representation, respectively. The global modality input feature embedding layer yields the high-bit bit plane embedding; the encrypted local modality input feature embedding layer yields the low-bit encrypted bit plane embedding.S400: The encrypted local modality feature embedding representation is used as the input to the pre-trained large language model, and the global modality feature embedding representation is used as the visual cue words (text instructions used to guide the model to generate or recognize specific visual content, controlling the style, perspective, details, and other elements of the image through natural language description) of the pre-trained large language model (in this embodiment, the Qwen2.5-7B model open-sourced by the ModelScope community is selected as the pre-trained large language model. The Qwen2.5-7B model is the core version of the open-source large language model series launched by Alibaba, which has significant advantages in programming, multimodality, and inference, and is easy to integrate multimodal medical image data such as CT / MRI) to obtain the probability distribution of the encrypted local modality. The encrypted local modality and its probability distribution are input into the arithmetic encoder to obtain the encrypted local modality bitstream. The global modality bitstream, the latent variable bitstream, and the encrypted local modality bitstream are sequentially concatenated, i.e. ,in, Represents a global modal bitstream. Represents a hidden variable bitstream. Represents encrypted local modal bit stream, This represents a lossless compressed bitstream of images, obtained by sequentially concatenating the bits. A lossless compressed image can then be obtained based on this bitstream. S500: When the lossless compressed bitstream meets the requirements (usually preset rules), the model weights trained on the corresponding large language model are loaded into the medical image compression network model (this model is a pre-built medical image compression network model that meets various medical image compression requirements). The compression results of the medical image compression network model are then tested and evaluated using a test set. If the images in the test set meet the medical image compression requirements, then this model is the corresponding model for implementing the two-branch lossless medical image compression method of this embodiment. Compressing medical images using this model is equivalent to using the two-branch lossless medical image compression method based on the pre-trained large language model in this embodiment. This invention utilizes the knowledge base internalized by the pre-trained large language model to improve the compression performance of professional domain data. Simultaneously, it uses adaptive bit-plane partitioning to split the original medical image data, which, compared to compressing the entire image using a pre-trained large language model, better reduces computational complexity and improves computational efficiency. Meanwhile, by prompting the pre-trained large language model to prioritize the retention of semantic key parts and optimizing the bitrate allocation without loss, a balance is achieved between medical image compression rate, image quality and computational cost.

[0043] As an optional implementation, in step S100, the training set data comes from the Flickr2k dataset, and the images in the Flickr2k dataset are cropped to 128 pixels. 128 blocks; the Flickr2K dataset contains 2650 2K resolution images, facilitating model training. The test set includes seven datasets: COVID-19 radiography (chest X-ray image database), COVID-19 CT scan (lung CT scan image database), Lung CT (lung CT dataset), Head CT (brain CT dataset), Lumbar Spine CT (lumbar spine CT dataset), Breast ultrasound (breast ultrasound dataset), and Braintumor MR (brain tumor MRI dataset). These datasets are existing medical image data, all available for open download through data science competition platforms and the Kaggle community. They include various types of medical images, with a large and comprehensive dataset, facilitating testing of the applicability and compression effect of this method for medical image compression.

[0044] As an optional implementation, in step S100, the division of the adaptive bit plane is determined by the following formula: in, For the first i Units plane With images Mutual information values ​​between them Let X be the mutual information value between the image and itself. Mutual information is an information-theoretic index that measures the strength of the nonlinear association between two random variables. The larger the value, the stronger the dependency between the variables. It is a key method based on information theory for measuring statistical dependencies between variables and has wide applications in feature selection, cluster evaluation, and other fields. s is the image partitioning index. The hyperparameter is used to control the model structure, training process, and performance optimization. In this embodiment, it is preferably set to 0.8, where inf is the infimum (the largest lower bound of a non-empty set of numbers), ensuring that the first occurrence of a cumulative mutual information value greater than the hyperparameter occurs when... These are the dividing points between the high-order and low-order bit planes. The high-order bit plane represents the global modality of the image, while the low-order bit plane represents the local modality of the image.

[0045] As an optional implementation, in step S200, the encoder obtains the posterior probability distribution of the latent variables using the following formula. :

[0046] ,

[0047] ,

[0048] in, This represents the encoder's encoding calculation, and its parameters are: Latent variables The mean of the posterior probability, Latent variables The posterior probability variance, It is the identity matrix. It follows a normal distribution.

[0049] As an optional implementation, in step S200, the arithmetic decoder obtains the latent variables using the following formula. : in, This represents the decoding calculations of the arithmetic decoder, where `initialbits` is a numerical array used to initialize the bitstream conversion. Let be the posterior probability distribution of the latent variable.

[0050] As an optional implementation, the decoder calculates the likelihood probability distribution of the global modes using the following formula. :

[0051]

[0052]

[0053] in, The mean of the likelihood probability. Let V be the likelihood probability variance. This represents the total number of pixels in the image. Indicates the index of an element in the image. This represents the decoding calculation of the decoder, and its parameters are: , Let C represent a hidden variable, where C is a constant.

[0054] As an optional implementation, in step S200, the arithmetic encoder encodes the global modality and latent variables respectively to obtain the global modality bitstream and latent variable bitstream using the following formulas:

[0055]

[0056]

[0057] in, Represents a global modal bitstream. This represents the encoding calculation of the arithmetic encoder. Represents latent variables. Represents a hidden variable bitstream. This represents the prior probability distribution of the latent variable. Represents global mode, Represents the likelihood probability distribution of the global mode.

[0058] As an optional implementation, in step S300, the information bit stream is segmented to obtain... sEach segment is a sub-information bitstream segment; specific segmentation rules can be set according to requirements. s Each sub-information bitstream segment is Then use the first i Each sub-information bitstream segment replaces the first bit in the local mode bit by bit. i Units plane ( i =1,… ,s ), to obtain encrypted local modes Alternatively, LSB (Least Significant Bit) steganography can be used for encryption, which involves embedding secret information by modifying the least significant bit of the image pixels. For example... Figure 3 As shown, Represents the s-bit plane of the lower bits. This represents an s-s segment of information stream, from which the encrypted bit plane is obtained through a bit-by-bit substitution operation. and using bitmap Record the modification status of each position, with a value of 0 representing no modification and a value of 1 representing modification. For example... Figure 4 As shown, the bit diagram recorded during the encryption process is used. The original bit plane can be recovered without loss. From the encrypted bit plane Extracting from each digit The length value can be used to recover the original s-s segment information stream without loss. This embodiment also compares the bit planes in the local modality with the mask values ​​in the information bitstream (e.g., a value of 0 represents black, indicating occlusion; a value of 1 represents white, indicating preservation) bit by bit. If they are different, the corresponding position in the initial bitmap is recorded as 1; otherwise, it is recorded as 0, resulting in the final bitmap. The bitmap records the pixel value modification status in the local modality, ensuring lossless recovery of the original image and privacy information during medical image decompression. Encrypting the local modality using the information bitstream effectively protects image privacy and meets the user's security requirements.

[0059] As an optional implementation, in step S400, a LoRA (Low-Rank Adaptation) fine-tuning strategy is employed in the parameter layer of the pre-trained large language model to adapt it for the image compression task. LoRA, based on anatomical priors, is an efficient model fine-tuning technique that reduces the number of parameters by introducing low-rank matrices, thus achieving efficient fine-tuning of model parameters. The probability distribution of the encrypted local modalities is obtained by adjusting the internal representation of the model by inserting low-rank matrices A and B using the following formula. :

[0060]

[0061]

[0062] ,

[0063] in, Represents encrypted local modes, matrix Initialize using the mean and variance of anatomical features. Representing a normal distribution, the matrix The zero matrix is ​​represented by LLM, which stands for Pre-trained Large Language Model.

[0064] As an optional implementation, in step S400, the arithmetic encoder performs encoding calculations on the encrypted local modes using the following formula to obtain the encrypted local mode bit stream. : in, This represents the encoding calculation of the arithmetic encoder. Indicates encrypted local modes, The probability distribution of encrypted local modes.

[0065] The embodiment is merely a specific example and does not indicate that this is the only way to implement the present invention.

[0066] The above are merely preferred embodiments of the present invention. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A lossless compression method for two-branch medical images based on a pre-trained large language model, characterized in that, Includes the following steps: S100: Construct an image dataset, divide the image dataset into a training set and a test set, perform adaptive bit-plane partitioning on the images in the training set, and obtain the global and local modalities of the images; S200: Randomly sample latent variables from the prior distribution of the global modality, encode them into an initial bitstream using an arithmetic encoder, encode the global modality using an encoder to obtain the posterior probability distribution of the latent variables, input the initial bitstream and the posterior probability distribution of the latent variables into an arithmetic decoder to decode the latent variables, decode the latent variables using a decoder to obtain the likelihood probability distribution of the global modality, input the global modality and the likelihood probability distribution of the global modality into an arithmetic encoder to encode the global modality bitstream, input the latent variables and their prior probability distribution into an arithmetic encoder to encode the latent variable bitstream; S300: Encodes privacy information into an information bitstream using ASCII encoding, encrypts the information bitstream into local modalities in segments to obtain encrypted local modalities, and inputs the global modality and encrypted local modality into the feature embedding layer to obtain global modality feature embedding representation and encrypted local modality feature embedding representation, respectively. S400: The encrypted local modality feature embedding representation is used as the input of the pre-trained large language model, and the global modality feature embedding representation is used as the visual cue words of the pre-trained large language model. The pre-trained large language model is adapted to obtain the probability distribution of the encrypted local modality. The encrypted local modality and its probability distribution are input into the arithmetic encoder to obtain the encrypted local modality bitstream. The global modality bitstream, the latent variable bitstream and the encrypted local modality bitstream are sequentially concatenated to obtain the lossless compressed bitstream of the image. S500: Load the trained model weights into the medical image compression network model, and evaluate the compression results of the medical image compression network model through a test set; In step S100, the partitioning of the adaptive bit plane is determined by the following formula: in, For the first i Units plane With images Mutual information values ​​between them Let X be the mutual information value between the image and itself, and s be the partition index of the image. Here, `inf` is the hyperparameter, and `inf` is the infimum, ensuring that the first occurrence of a cumulative mutual information value greater than the hyperparameter occurs. These are the dividing points between the high-level and low-level planes.

2. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S100, the training set data comes from the Flickr2k dataset, and the images in the Flickr2k dataset are cropped to 128 pixels. 128 blocks; the test set data includes seven datasets: chest X-ray image database, lung CT scan image database, lung CT dataset, brain CT dataset, lumbar spine CT dataset, breast ultrasound dataset, and brain tumor MRI dataset.

3. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S200, the encoder obtains the posterior probability distribution of the latent variables using the following formula. : , , in, This represents the encoder's encoding calculation, and its parameters are: Latent variables The mean of the posterior probability, Latent variables The posterior probability variance, Represents global mode, It is the identity matrix. It follows a normal distribution.

4. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S200, the arithmetic decoder obtains the latent variables using the following formula. : in, This represents the decoding calculations of the arithmetic decoder; initial bits are the numerical array used to initialize the bitstream conversion. Let be the posterior probability distribution of the latent variable.

5. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S200, the decoder calculates the likelihood probability distribution of the global modes using the following formula. : in, The mean of the likelihood probability. Let V be the likelihood probability variance. This represents the total number of pixels in the image. Indicates the index of an element in the image. This represents the decoding calculation of the decoder, and its parameters are: , Let C represent a hidden variable, where C is a constant.

6. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S200, the arithmetic encoder encodes the global modality and latent variables respectively to obtain the global modality bitstream and latent variable bitstream using the following formulas: in, Represents a global modal bitstream. This represents the encoding calculation of the arithmetic encoder. Represents latent variables. Represents a hidden variable bitstream. This represents the prior probability distribution of the latent variable. Represents global mode, This represents the likelihood probability distribution of the global mode.

7. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S300, the information bitstream is segmented to obtain... m The first sub-information bitstream segment, then using the first... k Each sub-information bitstream segment replaces the first bit in the local mode bit by bit. k Units plane k =1,… ,m, The encrypted local mode is obtained; and the bit plane in the local mode is compared bit by bit with the mask value in the information bit stream. If they are different, the corresponding position in the initial bit diagram is recorded as 1, otherwise it is recorded as 0, and finally the bit diagram is obtained.

8. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S400, a LoRA fine-tuning strategy is used in the parameter layer of the pre-trained large language model to adapt it for image compression tasks. The internal representation of the model is adjusted by inserting low-rank matrices A and B using the following formula to obtain the probability distribution of the encrypted local modalities. : , in, Represents encrypted local modes, matrix Using the mean of anatomical features and variance Perform initialization. Representing a normal distribution, the matrix The zero matrix is ​​represented by LLM, which stands for Pre-trained Large Language Model.

9. The lossless compression method for two-branch medical images based on a pre-trained large language model according to claim 1, characterized in that, In step S400, the arithmetic encoder performs encoding calculations on the encrypted local modes using the following formula to obtain the encrypted local mode bitstream. : in, This represents the encoding calculation of the arithmetic encoder. Indicates encrypted local modes, The probability distribution of encrypted local modes.

Citation Information

Patent Citations

  • Color image lossless compression and decompression method based on quaternion neural network

    CN117893624A

  • Method and data processing system for lossy image or video encoding, transmission and decoding

    US11544881B1