A medical digital film generation method and system based on large model visual recognition
By using a large medical vision model to screen key images, and then performing layout, packaging, and adaptive compression encoding, a special format of medical digital film is generated. This solves the problems of large number of images and network dependence in cloud films, and enables efficient local image retrieval and stable mobile storage.
Patent Information
- Application Number
- CN202611221709.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-11-06
AI Technical Summary
Existing cloud-based film preserves complete original image sequences but lacks intelligent screening of key images, resulting in a large number of images and low viewing efficiency. At the same time, image retrieval relies on the network and cloud servers, making it difficult to retrieve images locally via mobile devices in an offline environment.
Key images are selected using a large medical vision model, then typed, packaged, and adaptively compressed and encoded to generate medical digital films in a special format, which are then saved to the local storage space of the mobile device.
Reduce the number of images and data volume in digital film, improve image retrieval and viewing efficiency, reduce dependence on network environment and cloud server, and achieve convenient and stable local retrieval.
Smart Images

Figure CN123053262A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to a method and system for generating medical digital films based on large-scale model visual recognition. Background Technology
[0002] With the development of medical imaging equipment and digital medical technology, examinations such as CT, MRI, DR, and ultrasound can generate a large number of continuous medical images. Medical images have become an important basis for doctors to observe lesions, assess conditions, and make diagnostic judgments. To facilitate the storage, transmission, and retrieval of medical images, medical films are gradually evolving from traditional physical films to digital and cloud-based formats.
[0003] Current technologies typically use physical film printing or cloud film storage to store patients' medical images. Physical film prints selected images onto a film carrier, while cloud film uploads the raw image sequence generated from the patient's examination to a cloud server. Doctors or patients can access the cloud server via mobile devices to view and retrieve the medical images.
[0004] However, existing cloud films typically preserve complete original image sequences, lacking intelligent screening of key images, resulting in a large number of images and low viewing efficiency; at the same time, image retrieval relies on the network and cloud servers, making it difficult to retrieve images locally via mobile devices in an offline environment. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method and system for generating medical digital films based on large model visual recognition. This method can solve the problems of existing cloud films, which usually preserve complete original image sequences but lack intelligent screening of key images, resulting in a large number of images and low viewing efficiency. At the same time, image access depends on the network and cloud server, making it difficult to access images locally via mobile devices in an offline environment.
[0006] A first aspect of this invention proposes a method for generating medical digital films based on large-model visual recognition, comprising: S1: Obtain the patient's original image sequence set; S2: Based on the original image sequence set, a key image set is selected using a large medical vision model; S3: Arrange and encapsulate the key image set to obtain a set of layout frames; S4: Adaptive compression encoding is performed on the set of layout frames to obtain a medical digital film in a special format; S5: Save medical digital films to the local storage space of the mobile device to create local digital films.
[0007] A second aspect of this invention provides a medical digital film generation system based on large-model visual recognition, comprising: a processor and a memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the medical digital film generation method based on large model visual recognition as described in the first aspect.
[0008] A third aspect of the present invention provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the medical digital film generation method based on large model visual recognition as described in the first aspect.
[0009] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: In this embodiment of the invention, the patient's original image sequence set is analyzed and screened using a large medical vision model to obtain a set of key images with diagnostic and treatment reference value. The key image set is then typeset, packaged, and adaptively compressed and encoded to generate a medical digital film in a special format. This reduces the number of images and the amount of data in the digital film, enabling centralized display of key images and improving image retrieval and reading efficiency. Simultaneously, the generated medical digital film is saved to the local storage space of the mobile device, forming a local digital film. This allows users to directly retrieve the medical digital film from their mobile device, reducing the dependence of image retrieval on the network environment and cloud servers, and improving the convenience, stability, and usability of image retrieval. Attached Figure Description
[0010] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0011] Figure 1 This is a flowchart illustrating a method for generating medical digital films based on large-model visual recognition, provided in an embodiment of the present invention.
[0012] Figure 2 This is a schematic diagram of the structure of a medical digital film generation system based on large model visual recognition provided in an embodiment of the present invention. Detailed Implementation
[0013] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0014] The method for generating medical digital films based on large model visual recognition provided by the present invention will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0015] Reference manual attached Figure 1 The diagram illustrates a flowchart of a method for generating medical digital films based on large-model visual recognition, provided by an embodiment of the present invention.
[0016] This invention provides a method for generating medical digital films based on large-model visual recognition, which may include the following steps: S1: Obtain the patient's original image sequence set.
[0017] It should be noted that after a patient completes a CT imaging examination, the cloud server stores the complete original image sequence. The data processing terminal downloads all image frames of the patient in batches via the HTTPS encryption protocol, preserving the original DICOM medical image format and ensuring that image pixels, grayscale, and scanning parameters are not lost.
[0018] S2: Based on the original image sequence set, a key image set is selected using a large medical vision model.
[0019] It should be noted that the downloaded raw images are imported into the medical vision model, where the model performs preprocessing, feature extraction, lesion identification, and redundancy removal. For lung CT scan images, the model automatically identifies lesion areas such as nodules, ground-glass opacities, and inflammatory plaques, selecting key images with clear lesions, intact anatomical structures, and diagnostic and treatment value, while removing scanning artifacts, blank backgrounds, and duplicate or indifferent images.
[0020] Among them, the medical vision big model is compatible with various medical imaging types such as CT, MRI, DR, and ultrasound, and has a built-in multi-type lesion recognition algorithm library, which can identify tumors, inflammation, effusion, fractures, and vascular lesions.
[0021] Among them, the medical vision big data model refers to an artificial intelligence model that is pre-trained and fine-tuned based on a large-scale medical image dataset, and is capable of extracting and analyzing visual features from medical images such as CT, MRI, DR, and ultrasound. The medical vision big data model is used to process the patient's original image sequence frame by frame, identify lesions such as tumors, inflammation, effusion, fractures, and vascular lesions in the images, locate key anatomical structures, and output structured recognition results including lesion category, lesion confidence, lesion detection box, lesion area, and key anatomical structure segmentation mask, providing a data foundation for key image screening, diagnostic importance scoring, and redundant image removal.
[0022] In one possible implementation, S2 specifically includes: S201: Preprocess the original image sequence set.
[0023] Specifically, the inspection description information corresponding to each frame of image is first read, and the corresponding window width and window level parameters are matched from the preset window width and window level parameter table according to the inspection location.
[0024] Specifically, lung images can use a window parameter of 1500 and a window level of -600; mediastinal images can use a window parameter of 400 and a window level of 40; skeletal images can use a window parameter of 2000 and a window level of 300; and brain images can use a window parameter of 80 and a window level of 40.
[0025] Furthermore, based on the matched window width and window level parameters, the CT values of each frame are linearly mapped to achieve grayscale normalization of images from different examination sites. For each normalized frame, the number of effective pixels with CT values in the range of -1024 to 3071 is counted, and the proportion of effective pixels to the total number of pixels in that frame is calculated. When the proportion is less than 0.05, the corresponding image frame is identified as a blank frame or a localization image and is discarded. When the proportion is greater than or equal to 0.05, the corresponding image frame is identified as a valid image frame. All retained valid image frames constitute a valid image sequence, which is then input into subsequent lesion identification and key image screening processing.
[0026] The formula for calculating the effective pixel percentage is as follows: in, Indicates the percentage of effective pixels in the current frame. This indicates the number of pixels in the current frame whose HU value falls within the range of [-1024, 3071]. This indicates the total number of pixels in the current frame.
[0027] S202: Input the preprocessed set of original image sequences into the medical vision big model and output a list of lesion detection boxes and segmentation masks of key anatomical structures.
[0028] Specifically, after obtaining the preprocessed effective image sequence, each frame of the effective image sequence is sequentially input into the medical multimodal vision model for inference and analysis. The medical multimodal vision model can be a model with a large visual transformation network as the backbone network, pre-trained with general image data, and fine-tuned using medical image data. For each frame of the image, the medical multimodal vision model outputs lesion detection results and key anatomical structure segmentation results.
[0029] The lesion detection results include one or more lesion detection boxes, each containing at least the lesion category, recognition confidence score, boundary coordinates of the lesion detection box, and lesion area. The key anatomical structure segmentation results include a segmentation mask used to characterize the boundaries of at least one anatomical region among the lung lobe, liver lobe, bone, or brain region.
[0030] Furthermore, a confidence-based filtering process is applied to the lesion detection bounding boxes corresponding to each image frame. Lesion detection bounding boxes with a confidence score greater than 0.5 are identified as valid lesion detection results and retained. When the confidence scores of all lesion detection bounding boxes in an image frame are less than or equal to 0.5, the image frame is marked as a suspicious image frame. Suspicious image frames are not removed at this stage and are included in the subsequent diagnostic importance scoring process along with image frames that retain valid lesion detection results.
[0031] S203: Based on the lesion detection box list and the key anatomical structure segmentation mask, the diagnostic importance score is calculated using a five-factor weighted model.
[0032] Among them, the five-factor weighted model refers to a multi-dimensional scoring model used to evaluate the diagnostic and therapeutic importance of each frame of medical images. It comprehensively scores each frame of image based on factors such as lesion salience, anatomical integrity, image quality, lesion diversity, and redundancy penalty.
[0033] Among them, the lesion salience factor is used to reflect the confidence of lesion detection and the proportion of lesion area, the anatomical integrity factor is used to reflect the coverage of key anatomical areas, the image quality factor is used to reflect the signal and noise of the image, the lesion diversity factor is used to reflect the richness of different lesion types in the image, and the redundancy penalty factor is used to reflect the degree of repetition between the current frame and adjacent frames.
[0034] Furthermore, by weighting and summing the first four factors and deducting the redundancy penalty factor, the diagnostic importance score of the corresponding image frame is obtained, so that images with obvious lesion information, complete anatomical structure, high image quality and large differences from adjacent frames can obtain higher scores.
[0035] The specific formula for calculating the importance score of diagnosis and treatment is as follows: in, Indicates the first i The importance score of frame diagnosis and treatment, The weight values of the lesion significance factor are represented. Indicating lesion significance factors, The weight values of the anatomical integrity factor are represented. Factor representing anatomical integrity. This represents the weight value of the image quality factor. Indicates the image quality factor. The weight values of the lesion diversity factor are represented. Factors representing lesion diversity This represents the weight value of the redundancy penalty factor. This represents the redundancy penalty factor.
[0036] It should be noted that, , , , as well as The value range is [0,1].
[0037] Optionally, , , , , .
[0038] It should be noted that the above-mentioned diagnostic importance score is determined using a combination of multi-factor weighting and inter-frame redundancy penalty. Specifically, the more significant the lesion features, the more complete the coverage of key anatomical structures, the higher the image quality, and the more diverse the types of lesions included, the higher the diagnostic importance score of the corresponding image frame. Higher structural similarity between adjacent image frames indicates more repetitive image information, thus imposing a greater redundancy penalty on the corresponding image frame to reduce the probability of consecutive similar image frames being repeatedly selected. This ensures that the selected key images retain information with high diagnostic and therapeutic reference value while also improving the information diversity between key images. The weights of each scoring factor can be trained and calibrated using clinical image datasets and adaptively adjusted according to the image examination site or type. For example, the weight of lesion significance is increased in the screening process for chest CT images, and the weight of anatomical integrity is increased in the screening process for brain MRI images.
[0039] S204: Based on the importance score of diagnosis and treatment, a multi-level screening and judgment is performed to obtain a set of key images.
[0040] In one possible implementation, S204 specifically includes: S2041: Determine the target frame number.
[0041] Specifically, after obtaining the diagnostic importance score corresponding to each valid image frame, the target number of frames is first determined based on the total number of frames in the original image sequence and the target retention rate, so that the final number of retained key image frames is adapted to the data size of the original image sequence. The target retention rate can be set to 6% to 15% of the total number of frames in the original image sequence. For example, 28 key images can be selected from an original image sequence containing 320 images, or 12 key images can be selected from an original image sequence containing 400 images.
[0042] The target number of frames is specifically: in, K Indicates the target frame number. clip ( ) represents a constraint function. round ( ) represents the rounding function. N This represents the original total number of frames. Indicates the target retention rate. , Indicates the minimum frame rate. , Indicates the highest frame rate. .
[0043] It should be noted that setting a minimum frame rate ensures that the filtering results contain the minimum amount of image information necessary for diagnosis and treatment. Setting a maximum frame rate limits the total number of key image frames, thereby reducing the storage footprint of the generated medical digital films on mobile devices.
[0044] S2042: Set a hard threshold and remove frames with a diagnosis importance score less than the hard threshold to obtain a candidate frame set.
[0045] It should be noted that the diagnostic importance score corresponding to each valid image frame is compared with a hard threshold. When the diagnostic importance score is less than the hard threshold, the corresponding image frame is marked as a low-value image frame and removed from the subsequent screening process.
[0046] Optionally, the hard threshold is 0.15.
[0047] Those skilled in the art can set the size of the hard threshold according to actual needs, and this invention does not limit it.
[0048] S2043: Sort each frame in the candidate frame set in descending order according to the importance score of diagnosis and treatment, and obtain the descending order sorting result.
[0049] Specifically, the candidate image frames after removing low-value image frames are sorted in descending order according to their corresponding diagnostic importance scores.
[0050] S2044: Select the same number of frames as the target frame number from the descending sort results to obtain the preliminary screening set.
[0051] Specifically, the top-ranked image frames are selected in order of the target frame number to obtain a preliminary screening set.
[0052] S2045: Verify the anatomical coverage integrity of the preliminary screening set.
[0053] It should be noted that the initial screening set undergoes an anatomical coverage integrity check to determine whether the initial screening results cover all key anatomical regions corresponding to the current examination site. Different examination sites correspond to different key anatomical regions. For example, for chest CT images, key anatomical regions include at least the lung apex, hilum, carina, lower lung field, and diaphragmatic surface. When any image frame corresponding to a key anatomical region is missing in the initial screening results, the image frame with the highest diagnostic importance score corresponding to the missing key anatomical region is selected from the image frames removed during the aforementioned screening process as a supplementary image frame. This supplementary image frame replaces the image frames with lower diagnostic importance scores in the initial screening results to obtain a key image set that meets the requirement of complete coverage of key anatomical regions.
[0054] S2046: Adjust the spacing between each frame in the initial screening set after verification to obtain the key image set.
[0055] Specifically, the preliminary screening results after anatomical coverage integrity verification are sorted according to the scanning sequence of each image frame, and the scanning slice distance between adjacent image frames is calculated. When the scanning slice distance between adjacent image frames is less than 2 slices, the adjacent image frames are identified as consecutive nearest neighbor frames, and only the image frames with higher diagnostic and therapeutic importance scores are retained. When the number of image frames retained after removing consecutive nearest neighbor frames is less than the target number of frames, image frames are added from the candidate image frames in descending order of diagnostic and therapeutic importance scores until the number of retained image frames reaches the target number of frames.
[0056] Furthermore, a corresponding summary of the selection reason is generated for each frame. The summary includes information such as lesion location and type, confidence level, anatomical region coverage, and comprehensive score, for example, "left upper lobe nodule (confidence level 0.92), anatomical coverage of 3 / 5 key areas, score 0.78," for doctors to review the rationality of the selection results. The output is the final set of keyframes with detailed scores and selection reasons.
[0057] In this embodiment of the invention, the lesion identification results of a large-scale medical vision model can be combined to conduct a comprehensive evaluation from multiple dimensions, including image quality, anatomical coverage, lesion type richness, and inter-frame redundancy. Through a multi-layered screening logic involving target frame number control, low-value image removal, scoring and ranking, anatomical integrity verification, and adjustment of the spacing between adjacent images, key images with clear lesion features, complete coverage of key anatomical regions, excellent image quality, and low repetition are selected from the original image sequence. This method reduces the data volume of digital films and decreases storage usage on mobile devices, while also reducing the workload for doctors to review images frame by frame, lowering the risk of missing important lesion images or key anatomical regions. Furthermore, by generating detailed scoring and selection reasons for each key image, the interpretability and verifiability of the key image selection results are improved, facilitating doctors to quickly determine the value of images and thus improving image retrieval efficiency and diagnostic efficiency.
[0058] S3: Arrange and encapsulate the key image set to obtain the set of layout frames.
[0059] In one possible implementation, S3 specifically includes: S301: Sequence grouping of each key frame in the key image set to obtain a global layout frame sequence.
[0060] Specifically, the medical digital imaging and communication standard metadata corresponding to each key image is read, and the key images are grouped according to the unique identifier of the sequence instance. Key images with the same unique identifier of sequence instance are grouped into the same image sequence group. Then, the image sequence groups are sorted in ascending order according to the acquisition time, and within each image sequence group, they are sorted in ascending order according to the slice position information to form a global layout frame sequence.
[0061] Furthermore, separator frames are inserted between adjacent image sequence groups to render sequence separator lines and corresponding sequence name labels during the typesetting process, resulting in a global typesetting frame sequence containing separator frames.
[0062] S302: Determine the layout grid configuration based on the global layout frame sequence through adaptive grid layout calculation.
[0063] Among them, adaptive grid layout calculation refers to selecting the number of grid columns that make the distribution of the number of images in each row most even and the layout blank area less, based on the number of image frames in the global layout frame sequence and within the preset range of candidate grid column numbers, and determining the number of grid rows and the width and height of each single image area accordingly.
[0064] It should be noted that after obtaining the layout frame sequence, the layout grid configuration is adaptively determined based on the number of frames in the layout frame sequence.
[0065] Specifically, a fixed logical canvas is set with a width of 1920 pixels and a height of 1080 pixels. The aspect ratio of each grid cell is set to 1.0, or can be set according to the original aspect ratio of the image to be laid out. The number of grid columns and grid rows are determined according to the following formulas: in, This indicates the number of frames in the layout frame sequence. c Indicates the number of candidate grid columns, cols Indicates the number of target grid columns. rows Indicates the target grid row number. round ( ) represents the rounding function. ceil ( ) represents the floor function. argmin ( ) represents the parameter that minimizes the objective function.
[0066] It should be noted that by determining the number of target grid columns within a candidate range of 3 to 8 columns, the number of image frames accommodated in each row tends to be balanced, thereby forming a compact rectangular layout and reducing blank grids.
[0067] Furthermore, the width and height of a single grid cell are determined according to the following formulas: in, Indicates the width of a single grid cell. Indicates the height of a single grid cell. This indicates the width of the fixed logical canvas. Indicates the height of the fixed logical canvas.
[0068] It should be noted that when the number of image frames in the last row is less than the target number of grid columns, a uniform gray placeholder is set in the grid cells of the last row that are not filled with image frames, and the actual number of image frames contained in the row is marked in the gray placeholder, so as to form a visual layout that is compatible with the traditional medical film layout.
[0069] S303: Overlay and annotate the metadata of the layout grid configuration and each keyframe to obtain a set of layout frames.
[0070] Specifically, after configuring the layout grid, information overlay and annotation rendering are performed on the layout canvas based on the metadata corresponding to each image frame. Image-level information, including the sequence name and frame number, is overlaid in the lower left corner of each image frame. Film-level information, including patient name, gender, age, examination date, examination site, and hospital name, is overlaid at the top of the layout canvas. Based on the generated summary of screening criteria, semi-transparent colored rectangles and arrows are overlaid on the lesion areas in the corresponding image frames to identify the lesion location and type. Finally, the window width / level parameter "WW / WL" is overlaid in the upper right corner of each image frame to obtain a layout canvas with complete annotation information.
[0071] Furthermore, after generating the layout canvas, pagination decisions are made based on the total number of image frames and the number of image sequence groups in the canvas. When the total number of image frames is greater than 40 or the number of image sequence groups is greater than 2, the pagination mechanism is activated, and each image sequence group is laid out as an independent page, with the corresponding page number and sequence name marked at the bottom of each page. After pagination, each page is packaged in a multi-page PDF format or a custom container format to support mobile terminals to browse page by page in sequence. When the total number of image frames is less than or equal to 40 and the number of image sequence groups is less than or equal to 2, all image frames are laid out as a single page without pagination, resulting in the final complete layout scheme after pagination decisions.
[0072] In this embodiment of the invention, the technical solution enables the orderly organization of key images based on image sequence, acquisition time, and slice location, avoiding cross-combination of images from different scanning sequences or slices. Simultaneously, the number of grid rows and columns and unit size are automatically determined based on the number of key images, resulting in a more compact and balanced layout, reducing blank areas and improving canvas space utilization. By overlaying patient information, examination information, sequence name, frame number, window width and level parameters, and lesion markers, the image content and diagnostic information can be intuitively correlated, facilitating doctors to quickly identify lesion locations, image sources, and display conditions. Furthermore, the automatic single-page or paginated layout based on the number of image frames and sequence groups adapts to the viewing habits of traditional medical films while also meeting the page-turning browsing needs of mobile terminals, thereby improving the readability, standardization, and retrieval efficiency of digital films.
[0073] S4: Adaptive compression encoding is performed on the set of layout frames to obtain medical digital films in a special format.
[0074] It should be noted that the system will arrange the selected 20-50 key images according to the human body scanning sequence, simulating the layout of traditional medical film for visualization. Basic information such as patient name, gender, examination time, examination site, and hospital name will be entered simultaneously, and an encrypted cloud film traceability link will be embedded to generate a dedicated encrypted digital film file with the MedFilm extension.
[0075] In one possible implementation, S4 specifically includes: S401: Calculate the overall complexity of each frame in the set of layout frames.
[0076] The formula for calculating the overall complexity is as follows: in, Indicates the first i The overall complexity of a frame, normalized to [0,1], Represents the normalization function. This represents the average value of the gradient magnitude within the frame. This indicates the proportion of pixels in the lesion area to the total number of pixels in the frame. This represents the function for calculating the average value. This represents the gradient operator. Indicates the coordinates in the current frame are The pixel value.
[0077] Specifically, the average gradient magnitude within each layout frame is calculated to characterize the spatial frequency complexity of the corresponding layout frame. A larger average gradient magnitude indicates richer image details within the corresponding layout frame. Based on the lesion detection results, the proportion of the total lesion region pixel area to the total pixel area of the corresponding layout frame is calculated to characterize the lesion region proportion. A larger lesion region proportion indicates richer clinical diagnostic information within the corresponding layout frame.
[0078] Furthermore, the overall complexity of each layout frame is calculated based on the spatial frequency complexity and the proportion of the lesion area.
[0079] S402: Determine the compression ratio of each frame based on the overall complexity.
[0080] The compression ratio is specifically: in, Indicates the first i The compression ratio of the frames.
[0081] It should be noted that a high overall complexity of an image frame indicates that it contains more detailed information, such as structural information like small lesion areas, bone edges, or vascular terminals. Therefore, a lower compression ratio is determined to improve image fidelity. Conversely, a low overall complexity of an image frame indicates that it contains less effective detailed information, such as soft tissue with a relatively uniform background.
[0082] S403: Maps the compression ratio to the encoder's quantization parameters.
[0083] The quantization parameters are as follows: in, Indicates the first i Quantization parameters of the frame.
[0084] It should be noted that the encoder includes an H.265 / HEVC intra-frame encoder or a JPEG 2000 encoder, and the quantization parameter ranges from [10, 28]. The smaller the quantization parameter, the higher the fidelity of the compressed image. When the quantization parameter is 10, the corresponding compression ratio is 4:1, and when the quantization parameter is 28, the corresponding compression ratio is 8:1.
[0085] S404: Based on the quantization parameters, each frame in the layout frame set is encoded and compressed to obtain the initial compressed frame set.
[0086] S405: Perform quality preservation verification on the initial compressed frame set to obtain quality-verified frames and lossless preserved frames.
[0087] It should be noted that for each image frame, the corresponding compression ratio and quantization parameters are determined based on its overall complexity, and encoding and compression are performed according to the quantization parameters. The peak signal-to-noise ratio (PSNR) of the compressed image is calculated. When the PSNR is greater than or equal to 38 dB, the corresponding image frame is marked as a compressed pass frame and written to the digital film. When the PSNR is less than 38 dB, the quantization parameter of the corresponding image frame is reduced by 2, and encoding, compression, and PSNR calculation are re-performed according to the adjusted quantization parameters until the PSNR is greater than or equal to 38 dB, or the quantization parameter is reduced to the preset lower limit of 10. When the quantization parameter is reduced to 10 and the PSNR is still less than 38 dB, the corresponding image frame is marked as a lossless retainable frame and written to the digital film in its original uncompressed format, and is not included in the compression ratio statistics.
[0088] In one possible implementation, S405 specifically includes: S4051: Obtain the original compressed frame and compressed image frame corresponding to each frame in the initial compressed frame set.
[0089] S4052: Calculate the peak signal-to-noise ratio of each frame based on the original compressed frame and the compressed image frame.
[0090] The specific formula for calculating the peak signal-to-noise ratio is as follows: in, Indicates the first i Peak signal-to-noise ratio of the frame. Indicates the maximum pixel value. Indicates the first i Mean square error before and after frame compression.
[0091] It should be noted that the peak signal-to-noise ratio (PSNR) is used as the criterion for judging the sharpness of the compressed image.
[0092] S4053: Determine if the peak signal-to-noise ratio (PSNR) is greater than or equal to the quality threshold. If yes, identify the frame corresponding to the PSNR as a quality-verified frame. Otherwise, reduce the quantization parameters of the frame corresponding to the PSNR by a preset step size to obtain updated quantization parameters, and proceed to the next step.
[0093] Optionally, the quality threshold is 38dB.
[0094] Those skilled in the art can set the quality threshold and the size of the preset step size according to actual needs, and the present invention does not limit this.
[0095] S4054: Based on the updated quantization parameters, re-encode compression and peak signal-to-noise ratio calculation are performed until the calculated peak signal-to-noise ratio is greater than or equal to the quality threshold or the updated quantization parameters reach the preset lower limit of the quantization parameters.
[0096] Those skilled in the art can set the lower limit of the preset quantization parameter according to actual needs, and this invention does not limit it.
[0097] S4055: When the updated quantization parameter reaches the preset lower limit of the quantization parameter and the calculated peak signal-to-noise ratio is less than the quality threshold, the frame corresponding to the calculated peak signal-to-noise ratio is determined as the lossless retained frame.
[0098] S4056: When the calculated peak signal-to-noise ratio is greater than or equal to the quality threshold, the frame corresponding to the calculated peak signal-to-noise ratio is determined as the quality verification passed frame.
[0099] S406: The quality verification frame and the lossless preserved frame are format-encapsulated to obtain medical digital film.
[0100] Specifically, the actual overall compression ratio of all image frames is calculated. When the actual overall compression ratio exceeds the preset target range, a corresponding alarm log is recorded without adjusting the compression parameters of each image frame. Subsequently, the compressed image frame data is encrypted using the AES-256-GCM algorithm. The encryption key is generated using the PBKDF2 algorithm based on patient identification information, examination time, and a random salt value, with at least 10,000 iterations. The encrypted ciphertext, along with the corresponding salt value and initialization vector, is encapsulated in the MedFilm digital film file header. This allows the compressed image data to directly enter the encryption process after compression, without intermediate plaintext storage, ultimately generating an encrypted and compressed MedFilm digital film file.
[0101] In this embodiment of the invention, by determining the overall complexity of each frame of image based on the richness of image details and the proportion of lesion areas, and adaptively configuring the compression ratio and quantization parameters accordingly, highly complex images containing important details such as small lesions, bone edges, and vascular terminals can be compressed at a lower ratio to reduce the loss of diagnostic information. Simultaneously, relatively simple, low-complexity images can be compressed at a higher ratio to reduce the data volume of digital film and the storage footprint on mobile devices. Through peak signal-to-noise ratio verification and retrospective adjustment of quantization parameters, the quality of the compressed image can be controlled frame by frame. If the compression quality still does not meet the requirements, the original uncompressed image can be retained, thus balancing image clarity and storage efficiency. By directly encrypting the compressed data and encapsulating it into a MedFilm file, the risk of storing compressed data in plaintext intermediately can be reduced, improving the security of patient image data during local storage and transmission. Ultimately, this results in medical digital films suitable for mobile storage, offline access, and retention of diagnostic reference information.
[0102] S5: Save medical digital films to the local storage space of the mobile device to create local digital films.
[0103] It should be noted that the generated digital films are pushed to doctors' and patients' mobile phones via SMS, medical mini-programs, and hospital systems, and are automatically saved to the local storage space of the mobile devices, which can be stored without an internet connection.
[0104] Among them, medical digital film adopts a custom encrypted compression format with a compression ratio of 4:1 to 8:1, which preserves medical-grade image clarity and reduces storage space on mobile devices.
[0105] Optionally, local digital films specifically include: key images, basic patient medical information, examination information, image parameter information, and cloud film traceability links.
[0106] The patient's basic medical information includes name, gender, examination time, examination site, and image number.
[0107] Among them, the cloud film traceability link adopts a time-sensitive encryption mechanism, which allows for customizable access validity periods to prevent the leakage of medical imaging data.
[0108] In one possible implementation, S5 specifically includes: S501: Send medical digital films to the mobile device.
[0109] It should be noted that the mobile app is compatible with Android and iOS systems, requires no dedicated client installation, and supports gesture touch operation.
[0110] S502: The mobile device receives medical digital films and saves them to the mobile device's local storage space.
[0111] S503: In the absence of a network connection, retrieve medical digital films from the mobile device's local storage to create local digital films. For example, in an outpatient lung CT scan: the patient undergoes a low-dose lung CT scan, generating 320 raw images. A large model automatically selects 28 key images containing nodules, lung texture, and lesion features, and encapsulates them to generate digital films. Outpatient doctors no longer need to sift through hundreds of redundant images; they can quickly review the selected images to complete the initial diagnosis. If necessary, they can click a link to retrieve all sequences for review, reducing the time spent reviewing images per case by more than 60%.
[0112] For example, in emergency bone imaging: CT images of a fracture patient generate a sequence of 400 frames. A large model is used to select 12 frames of images showing the fracture site and key anatomical locations of the bone, which are then stored locally on the emergency physician's mobile phone. In offline emergency scenarios, doctors can view the images offline, quickly assess the severity of the fracture, and develop an emergency treatment plan, without being limited by the network environment.
[0113] In this embodiment of the invention, by saving medical digital films to the local storage space of a mobile device, doctors and patients can directly access key images and related diagnostic and treatment information even without a network connection, with an unstable network, or when cloud services are unavailable. This reduces dependence on the network environment and cloud servers, and improves the stability and convenience of image retrieval. By adopting an encrypted compression format, the clarity of medical images is preserved while reducing the storage footprint on the mobile device. Combined with the patient's basic diagnostic and treatment information, examination information, image parameter information, and cloud film traceability links, key images and examination information are stored in an integrated manner. When further review is required, the complete original image sequence can be retrieved through the cloud film traceability links with access time restrictions. This balances rapid local image review, offline use, complete image traceability, and patient medical image data security, making it suitable for various usage scenarios such as outpatient clinics, emergency rooms, follow-up visits, and referrals.
[0114] Reference manual attached Figure 2The diagram shows a schematic representation of a medical digital film generation system based on large model visual recognition, provided by an embodiment of the present invention.
[0115] This invention provides a medical digital film generation system 20 based on large model visual recognition, including: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-described method for generating medical digital films based on large model visual recognition and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.
[0116] It should be understood that the processor 201 in this embodiment of the invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0117] It should also be understood that the memory 202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).
[0118] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. Wireless means can include infrared, radio, or microwave. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0119] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0120] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0121] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0122] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0123] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0124] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0125] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0126] This invention provides a readable storage medium comprising: storing a program or instructions on the readable storage medium, wherein when the program or instructions are executed by a processor, the program or instructions implement the steps of the above-described method for generating medical digital films based on large model visual recognition, and can achieve the same technical effect. To avoid repetition, this invention will not elaborate further.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A method for generating medical digital films based on large-model visual recognition, characterized in that, include: S1: Obtain the patient's original image sequence set; S2: Based on the original image sequence set, a key image set is selected using a large medical vision model; S3: Arrange and encapsulate the key image set to obtain a set of layout frames; S4: Perform adaptive compression encoding on the set of layout frames to obtain a medical digital film in a special format; S5: Save the medical digital film to the local storage space of the mobile device to form a local digital film.
2. The method for generating medical digital films based on large-model visual recognition according to claim 1, characterized in that, S2 specifically includes: S201: Preprocess the original image sequence set; S202: Input the preprocessed set of original image sequences into the medical vision big model, and output a list of lesion detection boxes and a segmentation mask for key anatomical structures; S203: Based on the lesion detection box list and the key anatomical structure segmentation mask, calculate the diagnostic importance score using a five-factor weighted model; S204: Based on the diagnostic importance score, perform multi-level screening and judgment to obtain the key image set.
3. The method for generating medical digital films based on large-model visual recognition according to claim 2, characterized in that, S204 specifically includes: S2041: Determine the target frame number; S2042: Set a hard threshold and remove frames whose diagnosis and treatment importance scores are less than the hard threshold to obtain a candidate frame set; S2043: Sort each frame in the candidate frame set in descending order according to the diagnosis and treatment importance score to obtain the descending order sorting result; S2044: Select frames from the descending sorting results with the same number of frames as the target frame number to obtain a preliminary screening set; S2045: Verify the anatomical coverage integrity of the preliminary screening set; S2046: Adjust the spacing between each frame in the preliminary filtered set after verification to obtain the key image set.
4. The method for generating medical digital films based on large-model visual recognition according to claim 1, characterized in that, S3 specifically includes: S301: Sequence grouping of each key frame in the key image set to obtain a global layout frame sequence; S302: Based on the global layout frame sequence, determine the layout grid configuration through adaptive grid layout calculation; S303: Overlay key information and annotate and render the metadata of the layout grid configuration and each key frame to obtain the layout frame set.
5. The method for generating medical digital films based on large-model visual recognition according to claim 1, characterized in that, S4 specifically includes: S401: Calculate the overall complexity of each frame in the set of layout frames; S402: Determine the compression ratio of each frame based on the overall complexity; S403: Map the compression ratio to the encoder's quantization parameters; S404: Encode and compress each frame in the layout frame set according to the quantization parameters to obtain an initial compressed frame set; S405: Perform quality preservation verification on the initial compressed frame set to obtain quality-verified frames and lossless retained frames; S406: The quality verification frame and the lossless preserved frame are format-encapsulated to obtain the medical digital film.
6. The method for generating medical digital films based on large-model visual recognition according to claim 5, characterized in that, Specifically, S405 includes: S4051: Obtain the original compressed frame and compressed image frame corresponding to each frame in the initial compressed frame set; S4052: Calculate the peak signal-to-noise ratio of each frame based on the original compressed frame and the compressed image frame; S4053: Determine whether the peak signal-to-noise ratio is greater than or equal to the quality threshold; if so, determine the frame corresponding to the peak signal-to-noise ratio as the quality verification passed frame; otherwise, reduce the quantization parameters of the frame corresponding to the peak signal-to-noise ratio by a preset step size to obtain updated quantization parameters, and proceed to the next step; S4054: Based on the updated quantization parameters, re-encode compression and peak signal-to-noise ratio calculation are performed until the calculated peak signal-to-noise ratio is greater than or equal to the quality threshold or the updated quantization parameters reach the preset quantization parameter lower limit. S4055: When the updated quantization parameter reaches the lower limit of the preset quantization parameter and the calculated peak signal-to-noise ratio is less than the quality threshold, the frame corresponding to the calculated peak signal-to-noise ratio is determined as the lossless retained frame. S4056: When the calculated peak signal-to-noise ratio is greater than or equal to the quality threshold, the frame corresponding to the calculated peak signal-to-noise ratio is determined as the quality verification passed frame.
7. The method for generating medical digital films based on large-model visual recognition according to claim 1, characterized in that, The local digital film specifically includes: key images, basic patient diagnosis and treatment information, examination item information, image parameter information, and cloud film traceability links.
8. The method for generating medical digital films based on large-model visual recognition according to claim 1, characterized in that, S5 specifically includes: S501: Send the medical digital film to the mobile device; S502: The mobile terminal receives the medical digital film and saves the medical digital film to the local storage space of the mobile terminal; S503: In the absence of a network connection, retrieve the medical digital film from the local storage space of the mobile device to form the local digital film.
9. A medical digital film generation system based on large-model visual recognition, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the medical digital film generation method based on large model visual recognition as described in any one of claims 1 to 8.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the medical digital film generation method based on large model visual recognition as described in any one of claims 1 to 8.
