Image processing method, storage medium and computer terminal
By extracting three-dimensional image features and attention processing, semantic segmentation is directly performed, which solves the problem of error superposition in multi-category object recognition and improves the accuracy and efficiency of medical image processing.
Patent Information
- Application Number
- CN202310020027.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-01-06
AI Technical Summary
When existing medical image semantic segmentation solutions handle multiple different categories of objects, it is easy to cause superposition of segmentation errors, uncertain performance and complex structure, resulting in low recognition accuracy and efficiency.
An image processing method is adopted to obtain three-dimensional images, extract features, perform attention processing, and perform semantic segmentation based on feature sets and query vector sets to avoid combining multiple semantic segmentation models and directly identify multiple types of body tissues.
It improves the accuracy and efficiency of three-dimensional image processing, reduces error superposition, improves the ability to identify multiple types of body tissues, and solves the problem of low performance.
Smart Images

Figure CN116012586B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to an image processing method, a storage medium and a computer terminal. Background Art
[0002] At present, the semantic segmentation schemes used in the medical field usually focus on the recognition of a single object in an image. Therefore, when it is necessary to recognize multiple objects of different categories in an image, multiple semantic segmentation models can be simply combined to match the user's semantic segmentation process of the image. However, combining multiple semantic segmentation models will cause the problem of segmentation error superposition, resulting in uncertain performance and complex structure of multiple semantic segmentation models, which further leads to low accuracy in image recognition. Moreover, combining multiple semantic segmentation models will result in a long execution time, which further leads to low efficiency in image recognition.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide an image processing method, a storage medium, and a computer terminal to at least solve the technical problem of low performance in image processing in the related art.
[0005] According to one aspect of an embodiment of the present application, an image processing method is provided, comprising: acquiring a three-dimensional image, wherein the three-dimensional image contains at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein a first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein a first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0006] According to another aspect of an embodiment of the present application, an image processing method is also provided, including: in response to an input instruction acting on an operation interface, displaying a three-dimensional image on the operation interface, wherein the three-dimensional image includes at least one body tissue image of a biological object; in response to an image processing instruction acting on the operation interface, displaying a target semantic segmentation result on the operation interface, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image, and the target semantic segmentation result is obtained by semantically segmenting the three-dimensional image based on a first feature set and a first query vector set of the body tissue image, the first feature set is obtained by feature extraction of the three-dimensional image, the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image, the first query vector set is obtained by performing attention processing on the first feature set and multiple query vectors, and the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image.
[0007] According to another aspect of an embodiment of the present application, an image processing method is also provided, including: displaying a three-dimensional image on a presentation screen of a virtual reality VR device or an augmented reality AR device, wherein the three-dimensional image includes at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; and driving the VR device or AR device to render and display the target semantic segmentation result.
[0008] According to another aspect of an embodiment of the present application, an image processing method is also provided, including: acquiring a three-dimensional image by calling a first interface, wherein the first interface includes a first parameter, a parameter value of the first parameter is a three-dimensional image, and the three-dimensional image contains at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; outputting the target semantic segmentation result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the target semantic segmentation result.
[0009] According to one aspect of an embodiment of the present application, an image processing device is also provided, including: an acquisition module, used to acquire a three-dimensional image, wherein the three-dimensional image contains at least one body tissue image of a biological object; an extraction module, used to perform feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; a processing module, used to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; a segmentation module, based on the first feature set and the first query vector set, performs semantic segmentation on the three-dimensional image to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0010] According to another aspect of an embodiment of the present application, an image processing device is also provided, including: a first display module, used to respond to an input instruction acting on an operation interface, and display a three-dimensional image on the operation interface, wherein the three-dimensional image includes at least one body tissue image of a biological object; a second display module, used to respond to an image processing instruction acting on the operation interface, and display a target semantic segmentation result on the operation interface, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image, and the target semantic segmentation result is obtained by semantically segmenting the three-dimensional image based on a first feature set and a first query vector set of the body tissue image, the first feature set is obtained by feature extraction of the three-dimensional image, the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image, the first query vector set is obtained by performing attention processing on the first feature set and multiple query vectors, and the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image.
[0011] According to another aspect of an embodiment of the present application, another image processing device is provided, including: a presentation module, used to display a three-dimensional image on a presentation screen of a virtual reality VR device or an augmented reality AR device, wherein the three-dimensional image includes at least one body tissue image of a biological object; an extraction module, used to perform feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; a processing module, used to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; a segmentation module, used to perform semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; and a driving module, used to drive the VR device or AR device to render and display the target semantic segmentation result.
[0012] According to another aspect of an embodiment of the present application, an image processing device is also provided, including: a first calling module, used to obtain a three-dimensional image by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is a three-dimensional image, and the three-dimensional image includes at least one body tissue image of a biological object; an extraction module, used to extract features from the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; a processing module, used to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; a segmentation module, used to perform semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; a second calling module, used to output the target semantic segmentation result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the target semantic segmentation result.
[0013] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned image processing methods.
[0014] According to another aspect of an embodiment of the present application, a processing terminal is also provided, including: a processor; and a memory connected to the processor, for providing the processor with instructions of any one of the above-mentioned image processing methods.
[0015] In an embodiment of the present application, after acquiring a three-dimensional image, feature extraction can be performed on the three-dimensional image to obtain a first feature set of the body tissue image, and then attention processing can be performed on the first feature set and multiple query vectors to obtain a first query vector set, and finally, based on the first feature set and the first query vector set, semantic segmentation can be performed on the three-dimensional image to obtain a target semantic segmentation result. It is easy to notice that multiple query vectors can be introduced in the semantic segmentation process to achieve the purpose of identifying different types of body tissues, without combining multiple semantic segmentation models, avoiding superposition of introduced errors, so that multiple types of body tissue images can be recognized at the same time, improving the accuracy of image processing of three-dimensional images, shortening the time of image processing of three-dimensional images, and thus improving the performance of image processing of three-dimensional images, thereby solving the technical problem of low performance of image processing in related technologies.
[0016] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a schematic diagram of a hardware environment of a virtual reality device according to an image processing method of an embodiment of the present application;
[0019] Figure 2 is a structural block diagram of a computing environment of an image processing method according to an embodiment of the present application;
[0020] Figure 3 is a flowchart of an image processing method according to Embodiment 1 of the present application;
[0021] Figure 4 is a flowchart of an optional image processing method according to an embodiment of the present application;
[0022] Figure 5 is a flowchart of an image processing method according to Embodiment 2 of the present application;
[0023] Figure 6 is a schematic diagram of an optional operation interface according to an embodiment of the present application;
[0024] Figure 7 is a flowchart of an image processing method according to Embodiment 3 of the present application;
[0025] Figure 8 is a flowchart of an image processing method according to Embodiment 4 of the present application;
[0026] Fig. 9 is a schematic diagram of an image processing device according to Embodiment 5 of the present application;
[0027] Fig.10 is a schematic diagram of an image processing device according to Embodiment 6 of the present application;
[0028] Fig.11 is a schematic diagram of an image processing device according to Embodiment 7 of the present application;
[0029] Fig.12 is a schematic diagram of an image processing device according to Embodiment 8 of the present application;
[0030] Fig.13 It is a structural block diagram of a computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0034] Transformer: is a classic model. The overall architecture can be divided into an encoder and a decoder. The Transformer model uses an attention mechanism, which allows the model to be trained in parallel and have global information.
[0035] Self-attention mechanism: With the self-attention mechanism, the same set of feature vectors, as a single mapping source, can be multiplied with three different parameterized matrices to map to queries (Q), keys (K), and values (V). Each query will pay attention to all key-value pairs and generate an attention output.
[0036] Cross-attention mechanism: The mapping source of keys and values is the same, but different from the mapping source of queries, thus introducing their mutual dependencies.
[0037] Mask Transformer: A new variant of Transformer, the segmentation prediction can be a transformation from query embedding to segmentation embedding vector, which is then multiplied with image features to generate a set of query embedding representations with their own semantic class labels. The basic component is the decoder, which can take object queries as input and gradually transform them into segmentation embedding vectors.
[0038] Most medical AI systems are built to focus on a single type of body tissue. This may severely limit the clinical adoption of AI. A certain number of AI models need to be simply assembled to match the diagnostic process of actual CT scans. In this application, a unified transformer (UniT) model is constructed to semantically segment different types of body tissues in CT (Computed Tomography, also known as electronic computed tomography) scans. UniT is a query-based MaskTransformer model with the output of multiple semantic segmentation results. By decoupling object queries into different types of object queries and further establishing a hierarchical relationship between them, it effectively assists the representation learning of different types of body tissues and promotes the solution of these complex, anatomically related different types of body tissue image reading tasks. UniT uses a large number of CT images for end-to-end training, which can significantly reduce the number of false positives generated by combining multi-system models, bringing a general high-performance medical AI system one step closer.
[0039] This application proposes a new representation learning method that can represent the organizational information of different types of body tissues as object queries for Transformers in semantic hierarchical results.
[0040] Example 1
[0041] According to an embodiment of the present application, an image processing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 1 Schematic diagram of the hardware environment of a virtual reality device according to an image processing method of an embodiment of the present application. Figure 1 As shown, the virtual reality device 104 is connected to the terminal 106, and the terminal 106 is connected to the server 102 through a network. The above-mentioned virtual reality device 104 is not limited to: virtual reality helmets, virtual reality glasses, virtual reality all-in-one machines, etc., and the above-mentioned terminal 104 is not limited to PCs, mobile phones, tablet computers, etc. The server 102 can be a server corresponding to a media file operator, and the above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network.
[0043] Optionally, the virtual reality device 104 of this embodiment includes: a memory, a processor, and a transmission device. The memory is used to store an application, which can be used to execute: acquiring a three-dimensional image, wherein the three-dimensional image contains at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image. It is easy to notice that in the process of semantic segmentation, multiple query vectors can be introduced to achieve the purpose of identifying different types of body tissues. There is no need to combine multiple semantic segmentation models to avoid superposition of introduced errors, so that it is possible to simultaneously identify multiple types of body tissue images, improve the accuracy of image processing of three-dimensional images, shorten the time of image processing of three-dimensional images, and thus improve the performance of image processing of three-dimensional images, thereby solving the technical problem of low performance of image processing in related technologies.
[0044] The terminal of this embodiment can be used to execute: displaying a three-dimensional image on a presentation screen of a virtual reality VR device or an augmented reality AR device, wherein the three-dimensional image includes at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; and driving the VR device or AR device to render and display the target semantic segmentation result.
[0045] Optionally, the virtual reality device 104 of this embodiment has an eye-tracking HMD (Head Mount Display) head display and an eye-tracking module that have the same functions as those in the above embodiment, that is, the screen in the HMD head display is used to display real-time images, and the eye-tracking module in the HMD is used to obtain the real-time movement trajectory of the user's eyeballs. The terminal of this embodiment obtains the user's position information and movement information in the real three-dimensional space through the tracking system, and calculates the three-dimensional coordinates of the user's head in the virtual three-dimensional space, as well as the user's field of view direction in the virtual three-dimensional space.
[0046] Figure 1 The hardware structure block diagram shown can be used not only as an exemplary block diagram of the above-mentioned AR / VR device (or mobile device), but also as an exemplary block diagram of the above-mentioned server. In an optional embodiment, Figure 2 The block diagram shows the use of the above Figure 1 The AR / VR device (or mobile device) shown is an embodiment of a computing node in the computing environment 201. Figure 2 is a structural block diagram of a computing environment of an image processing method according to an embodiment of the present application, such as Figure 2 As shown, computing environment 201 includes multiple computing nodes (such as servers) running on a distributed network (shown as 210-1, 210-2, ..., in the figure). Each computing node contains local processing and memory resources, and end users 202 can remotely run applications or store data in computing environment 201. Applications can be provided as multiple services 220-1, 220-2, 220-3 and 220-4 in computing environment 201, representing services "A", "D", "E" and "H" respectively.
[0047] The end user 202 can provide and access services through a web browser or other software application on the client, and in some embodiments, the end user 202's provision and / or request can be provided to the entry gateway 230. The entry gateway 230 can include a corresponding agent to handle the provision and / or request for the service (one or more services provided in the computing environment 201).
[0048] Services are provided or deployed based on various virtualization technologies supported by the computing environment 201. In some embodiments, services can be provided based on virtual machine (VM)-based virtualization, container-based virtualization, and / or similar methods. Virtual machine-based virtualization can be to simulate a real computer by initializing a virtual machine, and execute programs and applications without directly contacting any actual hardware resources. While the virtual machine virtualizes the machine, according to container-based virtualization, a container can be started to virtualize the entire operating system (OS) so that multiple workloads can run on a single operating system instance.
[0049] In an embodiment based on container virtualization, several containers of a service can be assembled into a Pod (e.g., a Kubernetes Pod). Figure 2 As shown, service 220-2 can be equipped with one or more Pods 240-1, 240-2, ..., 240-N (collectively referred to as Pods). Each Pod can include a proxy 245 and one or more containers 242-1, 242-2, ..., 242-M (collectively referred to as containers). One or more containers in the Pod process requests related to one or more corresponding functions of the service, and the proxy 245 generally controls network functions related to the service, such as routing, load balancing, etc. Other services can also be Pods similar to Pods.
[0050] During operation, executing a user request from end user 202 may require invoking one or more services in computing environment 201, and executing one or more functions of one service may require invoking one or more functions of another service. Figure 2 As shown, service "A" 220-1 receives a user request from end user 202 from ingress gateway 230, service "A" 220-1 may call service "D" 220-2, and service "D" 220-2 may request service "E" 220-3 to perform one or more functions.
[0051] The computing environment described above can be a cloud computing environment, where the allocation of resources is managed by the cloud service provider, allowing the development of functions without considering the implementation, adjustment or expansion of servers. The computing environment allows developers to execute code in response to events without building or maintaining complex infrastructure. Services can be divided into a set of functions that can be automatically and independently scaled, rather than expanding a single hardware device to handle potential loads.
[0052] Under the above operating environment, this application provides Figure 3 It should be noted that the image processing method of this embodiment can be Figure 1The illustrated embodiment is executed by a mobile terminal. Figure 3 is a flow chart of an image processing method according to Embodiment 1 of the present application. Figure 3 As shown, the method may include the following steps:
[0053] Step S302: acquiring a three-dimensional image, wherein the three-dimensional image includes at least one body tissue image of a biological object.
[0054] The above-mentioned three-dimensional image may be an image obtained by scanning a biological object through a three-dimensional imaging device. For example, in the medical field, the three-dimensional image may be a CT scan image or a X-ray (also known as an X-ray) scan image.
[0055] The biological object mentioned above may be an object including organs such as a human being and an animal. The body tissue image mentioned above may be a normal organ tissue image inside the biological object, or an organ tissue image outside the biological object, or an abnormal or diseased tissue image on the organ, such as a tumor, a cyst, an abscess, etc., but not limited thereto. Optionally, the three-dimensional image generally includes multiple body tissue images of the biological object, and each body tissue image may include only one type of body tissue.
[0056] In an optional embodiment, the biological object may be scanned by CT to obtain a three-dimensional image, or scanned by X-rays (also known as X-rays) to obtain a three-dimensional image. At least one body tissue image of the biological object may also be acquired from the Internet to obtain a three-dimensional image. The specific method of acquiring the image to be processed may be determined according to actual conditions.
[0057] Step S304: extract features from the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image.
[0058] The first feature mentioned above is used to represent tissue information of at least one body tissue of a biological object, and the first feature here is a pixel-by-pixel feature.
[0059] Since a three-dimensional image usually contains images of multiple channels, and feature extraction is usually processed at the image level, feature extraction can be performed on images of different channels in the three-dimensional image to obtain feature vectors of different channels, and then the feature vectors of all channels are summarized to obtain the final first feature set. In an optional embodiment, a backbone network can be used to extract features of the three-dimensional image to obtain a first feature set. In the embodiment of the present application, nnUNet can be used as the backbone network to extract multi-scale features (i.e., the first feature set) of the three-dimensional image. 1 , F2 , F 3 , F 4 ],in, Represented by projecting to the number of channels d and flattening the spatial dimension D j , H j and W j The obtained j-th layer feature map.
[0060] Step S306, performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image.
[0061] In an embodiment of the present application, a query-based Mask Transformer can be used to perform semantic segmentation on a three-dimensional image, wherein the Mask Transformer is intended to use multiple query vectors to decode pixel-level features. The multiple query vectors can be a set of K optional query vectors q=[q1, ..., q k ]∈R K×d , where K is the number of query vectors and d is the dimension of the query vector. Each query vector can be randomly initialized and assigned to a semantic class. For example, in the medical field, it is necessary to perform semantic segmentation on normal body tissue images of biological objects (such as lungs, esophagus, liver, etc.) and body tissue images with abnormalities or lesions (such as tumors, cysts, etc.). Therefore, query vectors can be determined for all different types of body tissue images that need to be semantically segmented, thereby obtaining the above-mentioned multiple query vectors.
[0062] In an optional embodiment, the decoder module in the Transformer model can perform attention processing on the first feature set and multiple query vectors, so as to realize the first feature set as a condition, and update the multiple query vectors through the attention mechanism, so as to effectively and efficiently obtain feature vectors that can characterize the context information of different types of body tissue images, that is, the above-mentioned first query vector set. It should be noted that the attention processing here can be cross-attention processing, or cross-attention processing and self-attention processing, but is not limited to this. In the embodiments of the present application, cross-attention processing and self-attention processing are used as examples for explanation. Optionally, for each pixel point, the context information of all pixels on the path of the pixel can be collected through the attention mechanism, and through further loop operations, each pixel can eventually obtain the global dependency relationship.
[0063] By performing attention processing on the first feature set and multiple query vectors, multiple feature vectors that need to be paid attention to can be obtained on the basis of considering the overall situation, thereby reducing the amount of calculation for subsequent image recognition, and the first feature set can be classified by the query vector, which can make the subsequent semantic segmentation task more accurate.
[0064] Step S308, based on the first feature set and the first query vector set, semantically segment the three-dimensional image to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0065] The above-mentioned target semantic segmentation result may refer to classifying all voxel points in the three-dimensional image, determining the voxel points belonging to the same type of body tissue image, and achieving the purpose of pixel-level semantic segmentation.
[0066] In an optional embodiment, since the first feature set can include feature vectors of multiple different types of body tissue images, and different types of body tissue images can be obtained by dividing the same body tissue image at different granularities, for example, in the medical field, tumor tissue images are usually obtained by dividing organ tissue images. Therefore, the semantic segmentation task in the embodiment of the present application is essentially a plurality of semantic segmentation tasks of different granularities, which can be decoded by a multi-task query decoding model. During the semantic segmentation process, the multi-task query decoding model can jointly process the first feature set and the first query vector set, and calculate the L2 normalized image features (i.e., the first feature set) F∈R d×D×H×W and object query (i.e., the first query vector set) q∈R K×d The similarity between them is used to generate K segmentation predictions M∈R K×D×H×W , and then the softmax function can be used to obtain the pixel-level category recognition map in the semantic segmentation task (i.e., the target semantic segmentation result). Optionally, the specific calculation formula for K segmentation predictions is as follows:
[0067] M=q×F.
[0068] Through the above steps, after acquiring the three-dimensional image, feature extraction can be performed on the three-dimensional image to obtain a first feature set of the body tissue image, and then attention processing can be performed on the first feature set and multiple query vectors to obtain a first query vector set, and finally based on the first feature set and the first query vector set, semantic segmentation can be performed on the three-dimensional image to obtain the target semantic segmentation result. It is easy to notice that multiple query vectors can be introduced in the semantic segmentation process to achieve the purpose of identifying different types of body tissue images, without combining multiple semantic segmentation models, avoiding the superposition of introduced errors, so that multiple types of body tissue images can be recognized at the same time, improving the accuracy of image processing of three-dimensional images, shortening the time of image processing of three-dimensional images, and thus improving the performance of image processing of three-dimensional images, thereby solving the technical problem of low performance of image processing in related technologies.
[0069] It should be noted that the operations of collecting, storing, processing, and outputting body tissue images in the embodiments of the present application are in compliance with national laws and regulations, and the user's authorization permission is obtained.
[0070] In the above embodiment of the present application, attention processing is performed on the first feature set and multiple query vectors to obtain a first query vector set, including: using a decoder model in a semantic segmentation model to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set.
[0071] The above-mentioned semantic segmentation model can be a pre-trained model for semantic segmentation of three-dimensional images. The model can simultaneously perform semantic segmentation on multiple different types of body tissue images. The model can be composed of three parts, namely a backbone model for feature extraction, a Transformer model for object query interaction, and a multi-task query decoding model for generating target semantic segmentation results. The above-mentioned decoder model can refer to a Transformer model, specifically a decoder in a Transformer.
[0072] In an optional embodiment, after extracting the first feature set, the first feature set and a plurality of pre-constructed query vectors may be input into a decoder model for attention processing, and the output of the decoder model is the first query vector set.
[0073] In the above embodiment of the present application, the decoder model includes multiple decoding layers, and the decoding layer includes a cross-attention module, a self-attention module and a feedforward network module, wherein the decoder model is used to perform attention processing on the input feature set and multiple query vectors to obtain a first query vector set, including: using the cross-attention module to perform cross-attention processing on the first feature set and multiple query vectors to obtain a cross-attention feature set, wherein the input feature set input to the first decoding layer is the first feature set; using the self-attention module to perform self-attention processing on the cross-attention feature set to obtain a self-attention feature set; using the feedforward network module to process the self-attention feature set to obtain an output feature set, wherein the output feature set output by the last decoding layer is the first query vector set, the output feature sets output by other decoding layers are the input feature sets input by the next decoding layer, and the other decoding layers are decoding layers other than the last decoding layer among the multiple decoding layers.
[0074] The above-mentioned decoder model can be composed of a plurality of decoding layers stacked together. Optionally, taking into account the decoding accuracy and decoding efficiency of the decoder model, in the embodiment of the present application, three decoding layers are used as an example for illustration. The decoding layers are composed of a multi-head cross attention (i.e., the above-mentioned cross attention module), a multi-head self-attention (i.e., the above-mentioned self-attention module) and a feedforward network (i.e., the above-mentioned feedforward network module). It should be noted that the specific structure of the decoding layer can adopt the structure of the existing Transformer model, and can also be improved on the basis of the existing Transformer model as needed.
[0075] In an optional embodiment, the output feature set output by the decoding layer can be updated by the cross attention between multiple query vectors and the first feature set and the self-attention of the feature vector. The specific update formula is as follows: j =SA(CA(q j-1 , F j )),
[0076] Among them, CA() represents the cross-attention function, and SA() represents the self-attention function.
[0077] In the above embodiment of the present application, semantic segmentation is performed on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, including: based on the first feature set, the first query vectors in the first query vector set are respectively input into the multi-task query decoding model in the semantic segmentation model for decoding to obtain the target semantic segmentation result.
[0078] Due to the inclusiveness between different types of body tissue images, for example, in the medical field, different types of body tissue images can be liver images and liver tumor images, and liver images contain liver tumor images. When multiple types of body tissue images need to be semantically segmented at the same time, it is impossible to jointly decode the feature vectors representing different types of body tissue images. Therefore, a multi-task query decoding model that can perform multiple semantic segmentation tasks at the same time can be pre-built and trained using three-dimensional training samples, so that the multi-task query decoding model can decode different types of body tissue images separately.
[0079] In an optional embodiment, the first query vector set may be input into a multi-task query decoding model and decoded based on the first feature set respectively, so as to obtain multiple semantic segmentation results (ie, the target semantic segmentation results mentioned above).
[0080] In the above embodiments of the present application, tissue information of different types of body tissues includes at least: tissue information of a first type of body tissue and tissue information of a second type of body tissue, and the first type and the second type have different granularities for dividing body tissue images.
[0081] In the medical field, abnormal or diseased body tissues can often be divided into different levels of types, for example, tumor categories and tumor subtypes. Therefore, in an embodiment of the present application, different types of body tissue images can be divided into two categories, represented by C and D respectively. The first type has a larger granularity than the second type. On this basis, the multi-task query model can perform dual-task semantic segmentation and decode the first query vector representing the tissue information of two different types of body tissues. The specific formula is as follows:
[0082] M C =softmax(C×F),
[0083] M D =softmax(D×F),
[0084] Among them, M C Represents the first type of semantic segmentation result, M D Represents the second type of semantic segmentation results.
[0085] For example, taking the medical field as an example, multiple query vectors can be divided into three non-overlapping groups, represented by S, A and B respectively, where S represents shared query, that is, the query vector shared in dual-task semantic segmentation; A represents the large-category query vector, that is, the query vector in the semantic segmentation with a larger granularity; B represents the small-category query vector, that is, the query vector in the semantic segmentation with a smaller granularity. Moreover, the small category corresponding to B is included in the large category corresponding to A. Therefore, C = [A, S], D = [B, S], and the above calculation formula is changed to:
[0086] M A+S =softmax([A,S]×F),
[0087] M B+S =softmax([B, S]×F).
[0088] In the above embodiments of the present application, the tissue information of the first type of body tissue is mapped to the tissue information of the second type of body tissue using a linear projection layer.
[0089] In an optional embodiment, since the tissue information of the second type of body tissue is the tissue information of the subtype of the body tissue in the tissue information of the first type of body tissue, the tissue information of the first type of body tissue can be used as a parent node, and the tissue information of the second type of body tissue can be used as a child node, so as to construct a corresponding relationship graph, thereby realizing the construction of a semantic hierarchical relationship. Specifically, the parent node can be projected to the child node through a linear projection layer with a matrix.
[0090] For example, still taking the medical field as an example, in order to construct the semantic hierarchical relationship between query vector A and query vector B, we can use the matrix The linear projection layer transforms the query vector A∈R 1×d Projected to the query vector The specific formula is as follows:
[0091] B=A×W T ,
[0092] Among them, n i represents the number of small class query vectors, and T represents the transpose of the matrix.
[0093] In the above embodiment of the present application, the method also includes: obtaining a training sample, wherein the training sample includes: a three-dimensional sample image and a preset semantic segmentation result, and the three-dimensional sample image includes at least one biological tissue image of a preset biological object; using the backbone network in the semantic segmentation model, performing feature extraction on the three-dimensional image to obtain a second feature set of the biological tissue image, wherein different second features in the second feature set are used to characterize image information of different channels in the three-dimensional sample image; using the encoder model in the semantic segmentation model, performing attention processing on the second feature set and multiple query vectors to obtain a second query vector set; based on the second feature set, respectively inputting the second query vectors in the second query vector set into the multi-task query decoding model in the semantic segmentation model for decoding to obtain a sample semantic segmentation result; determining a total loss value based on the preset semantic segmentation result and the sample semantic segmentation result; and adjusting the model parameters of the semantic segmentation model based on the total loss value.
[0094] The training samples mentioned above may include: a three-dimensional sample image belonging to the same field as the three-dimensional image, and a preset semantic segmentation result manually annotated, that is, annotation information.
[0095] In an optional embodiment, a three-dimensional sample image is processed by a semantic segmentation model to obtain a sample semantic segmentation result, and then a loss function can be constructed based on the sample semantic segmentation result and a preset semantic segmentation structure, so that after determining the total loss value, the model parameters of the semantic segmentation model can be adjusted based on the comparison result between the total loss value and the preset threshold value to achieve the purpose of model training. The loss function here can be a combination of a cross entropy loss function and a dice loss to enhance the similarity of the same target.
[0096] In the above embodiment of the present application, after semantic segmentation is performed on the three-dimensional image based on the first feature set and the first query vector set to obtain the target semantic segmentation result, the method also includes at least one of the following: matching the target connected component with the preset connected component, and when the target connected component successfully matches the preset connected component, determining the type of the three-dimensional image as the type corresponding to the target connected component, wherein the target connected component is generated based on the target semantic segmentation result; determining the type of the three-dimensional image as the type corresponding to the maximum connected component in the target connected component.
[0097] The preset connected components mentioned above may be connected components generated based on a preset type of body tissue image.
[0098] In an optional embodiment, after obtaining the target semantic segmentation result, the semantic segmentation result of a preset type of body tissue can be extracted from the target semantic segmentation result, and the corresponding target connected component can be generated. If the target connected component and the preset connected component overlap, it is determined that the three-dimensional image does contain the preset type of body tissue. Therefore, it can be determined that the type of the three-dimensional image is the preset type.
[0099] In another optional embodiment, after obtaining the target semantic segmentation result, the semantic segmentation result of each type of body tissue can be extracted from the target semantic segmentation result, and different connected components can be generated. Further, the type of the three-dimensional image can be determined by the type of the largest connected component.
[0100] In another optional embodiment, since the tissue information of different types of body tissues can be further divided into two types, the semantic segmentation results of the first type of body tissues and the semantic segmentation results of the second type of body tissues can be extracted from the target semantic segmentation results. For the semantic segmentation results of the first type of body tissues, a corresponding target connected component can be generated. If the target connected component overlaps with the preset connected component, it is determined that the three-dimensional image does contain the preset type of body tissue. For the semantic segmentation results of the second type of body tissues, a corresponding target connected component can be generated, and it is determined that the three-dimensional image does contain the type of body tissue of the maximum connected component. Therefore, it can be finally determined that the type of the three-dimensional image is the preset type and the type of the maximum connected component.
[0101] Combine the following Figure 4 , taking the medical field as an example, a preferred embodiment of the present application is described in detail. Figure 4 As shown, the tissue information of different types of body tissues can first be divided into query S, query A and query B, such as Figure 4 As shown, it can be divided into S1, S2, S3, A1, A2, A3, B 11 , B 12 , B 13 , B 21 , B 22 , B 31 and B 32 , and then according to the relationship of subtype body organization, a query hierarchy from A to B is constructed through linear projection FC, such as Figure 4 As shown, A1 to B 11 , B 12 , B 13 The query hierarchy, A2 to B 21 , B 22 The query hierarchy, A3 to B 31and the query hierarchy of B3. After inputting the CT scan image, multi-scale features can be extracted through the backbone, and the above query vector can be interacted and updated in the Transformer decoder with multi-scale features input. The Transformer decoder can be composed of three decoding layers stacked, and the decoding layer is composed of multi-head cross attention, multi-head self-attention and feedforward network. Finally, the semantic segmentation results of the two tasks are generated by performing dual-task query decoding. The semantic segmentation results of the two tasks can be post-processed in the reasoning stage to generate different types of body tissue instances.
[0102] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0104] Example 2
[0105] According to an embodiment of the present application, an image processing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0106] Figure 5 : is a flow chart of an image processing method according to Embodiment 2 of the present application. Figure 5 As shown, the method may include the following steps:
[0107] Step S502, in response to an input instruction on the operation interface, displaying a three-dimensional image on the operation interface, wherein the three-dimensional image includes at least one body tissue image of a biological object.
[0108] The above-mentioned operation interface can be an interface provided to the user for human-computer interaction, a client interface, or a cloud service interface. The input instruction can be an instruction generated by the user operating on the operation interface, through which the imaging device can be controlled to scan the biological object, or directly select the three-dimensional image of the pre-scan number. For example, Figure 6 As shown, the user can control the imaging device to scan the biological object by clicking the "Scan" button, or directly drag the three-dimensional image that needs to be semantically segmented to the dotted box to obtain a three-dimensional image. The three-dimensional image can be displayed in the "Image Display Area" on the right.
[0109] Step S504, in response to the image processing instruction acting on the operation interface, the target semantic segmentation result is displayed on the operation interface, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image, and the target semantic segmentation result is obtained by semantically segmenting the three-dimensional image based on a first feature set and a first query vector set of the body tissue image, the first feature set is obtained by feature extraction of the three-dimensional image, the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image, the first query vector set is obtained by performing attention processing on the first feature set and multiple query vectors, and the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image.
[0110] The above-mentioned image processing instructions may be instructions generated by the user operating on the operation interface, through which the three-dimensional image may be subjected to feature extraction, attention processing and semantic segmentation to obtain the target semantic segmentation result, for example, Figure 6 As shown, the image processing instruction may be an instruction generated by a user clicking an "image processing" button, and the target semantic segmentation result may be displayed in the "semantic segmentation result area" on the right.
[0111] Through the above steps, after acquiring the three-dimensional image, feature extraction can be performed on the three-dimensional image to obtain a first feature set of the body tissue image, and then attention processing can be performed on the first feature set and multiple query vectors to obtain a first query vector set, and finally based on the first feature set and the first query vector set, semantic segmentation can be performed on the three-dimensional image to obtain the target semantic segmentation result. It is easy to notice that multiple query vectors can be introduced in the semantic segmentation process to achieve the purpose of identifying different types of body tissue images, without combining multiple semantic segmentation models, avoiding the superposition of introduced errors, so that multiple types of body tissue images can be recognized at the same time, improving the accuracy of image processing of three-dimensional images, shortening the time of image processing of three-dimensional images, and thus improving the performance of image processing of three-dimensional images, thereby solving the technical problem of low performance of image processing in related technologies.
[0112] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.
[0113] Example 3
[0114] According to an embodiment of the present application, there is also provided an image processing method that can be applied to virtual reality scenarios such as virtual reality VR devices and augmented reality AR devices. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0115] Figure 7 is a flow chart of an image processing method according to Embodiment 3 of the present application. Figure 7 As shown, the method may include the following steps:
[0116] Step S702: displaying a three-dimensional image on a presentation screen of a virtual reality (VR) device or an augmented reality (AR) device, wherein the three-dimensional image includes at least one body tissue image of a biological object.
[0117] In an optional embodiment, the imaging device may be connected to a VR or AR device, and the user may control the imaging device to scan the biological object by operating the VR or AR device.
[0118] Step S704: extract features from the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image.
[0119] Step S706, performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image.
[0120] Step S708, based on the first feature set and the first query vector set, semantically segment the three-dimensional image to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0121] Step S710: driving the VR device or AR device to render and display the target semantic segmentation result.
[0122] Through the above steps, after acquiring the three-dimensional image, feature extraction can be performed on the three-dimensional image to obtain a first feature set of the body tissue image, and then attention processing can be performed on the first feature set and multiple query vectors to obtain a first query vector set, and finally based on the first feature set and the first query vector set, semantic segmentation can be performed on the three-dimensional image to obtain the target semantic segmentation result. It is easy to notice that multiple query vectors can be introduced in the semantic segmentation process to achieve the purpose of identifying different types of body tissue images, without combining multiple semantic segmentation models, avoiding the superposition of introduced errors, so that multiple types of body tissue images can be recognized at the same time, improving the accuracy of image processing of three-dimensional images, shortening the time of image processing of three-dimensional images, and thus improving the performance of image processing of three-dimensional images, thereby solving the technical problem of low performance of image processing in related technologies.
[0123] Optionally, in this embodiment, the image processing method can be applied to a hardware environment composed of a server and a virtual reality device. The image processing is displayed on a presentation screen of a virtual reality VR device or an augmented reality AR device. The server can be a server corresponding to a media file operator. The network includes but is not limited to: a wide area network, a metropolitan area network or a local area network. The virtual reality device is not limited to: a virtual reality helmet, virtual reality glasses, a virtual reality all-in-one machine, etc.
[0124] Optionally, the virtual reality device includes: a memory, a processor, and a transmission device. The memory is used to store an application, which can be used to execute: displaying a three-dimensional image on a presentation screen of a virtual reality VR device or an augmented reality AR device, wherein the three-dimensional image includes at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; and driving the VR device or AR device to render and display the target semantic segmentation result.
[0125] It should be noted that the image processing method applied in the VR device or AR device of this embodiment may include: Figure 3 The method of the illustrated embodiment is used to achieve the purpose of driving a VR device or an AR device to render and display image processing.
[0126] Optionally, the processor of this embodiment can call the application stored in the memory to execute the above steps through a transmission device. The transmission device can receive media files sent by the server through the network, and can also be used for data transmission between the processor and the memory.
[0127] Optionally, in a virtual reality device, a head-mounted display with eye tracking is provided, wherein the screen in the HMD is used to display the displayed video images, the eye tracking module in the HMD is used to obtain the real-time movement trajectory of the user's eyes, the tracking system is used to track the user's position information and motion information in the real three-dimensional space, and the computing processing unit is used to obtain the user's real-time position and motion information from the tracking system, and calculate the three-dimensional coordinates of the user's head in the virtual three-dimensional space, as well as the user's field of view direction in the virtual three-dimensional space, etc.
[0128] In an embodiment of the present application, a virtual reality device may be connected to a terminal, and the terminal and the server are connected through a network. The virtual reality device is not limited to: a virtual reality helmet, virtual reality glasses, a virtual reality all-in-one machine, etc. The terminal is not limited to a PC, a mobile phone, a tablet computer, etc. The server may be a server corresponding to a media file operator, and the network includes but is not limited to: a wide area network, a metropolitan area network or a local area network.
[0129] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.
[0130] Example 4
[0131] According to an embodiment of the present application, an image processing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0132] Figure 8 4 is a flowchart of an image processing method according to Embodiment 4 of the present application. Figure 8 As shown, the method may include the following steps:
[0133] Step S802: acquiring a three-dimensional image by calling a first interface, wherein the first interface includes a first parameter, a parameter value of the first parameter is a three-dimensional image, and the three-dimensional image includes at least one body tissue image of a biological object.
[0134] The first interface mentioned above may be an interface connecting the client and the server, and the client may upload the three-dimensional image to the server through the first interface.
[0135] Step S804: extract features from the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image.
[0136] Step S806, performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image.
[0137] Step S808, based on the first feature set and the first query vector set, semantically segment the three-dimensional image to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0138] Step S810: output the target semantic segmentation result by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the target semantic segmentation result.
[0139] The above-mentioned second interface may be an interface connecting the client and the server, and the server may download the target semantic segmentation result to the client through the second interface.
[0140] Through the above steps, after acquiring the three-dimensional image, feature extraction can be performed on the three-dimensional image to obtain a first feature set of the body tissue image, and then attention processing can be performed on the first feature set and multiple query vectors to obtain a first query vector set, and finally based on the first feature set and the first query vector set, semantic segmentation can be performed on the three-dimensional image to obtain the target semantic segmentation result. It is easy to notice that multiple query vectors can be introduced in the semantic segmentation process to achieve the purpose of identifying different types of body tissue images, without combining multiple semantic segmentation models, avoiding the superposition of introduced errors, so that multiple types of body tissue images can be recognized at the same time, improving the accuracy of image processing of three-dimensional images, shortening the time of image processing of three-dimensional images, and thus improving the performance of image processing of three-dimensional images, thereby solving the technical problem of low performance of image processing in related technologies.
[0141] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.
[0142] Example 5
[0143] According to an embodiment of the present application, an image processing device for implementing the above-mentioned image processing method is also provided. Fig. 9 As shown, the device 900 includes: an acquisition module 902 , an extraction module 904 , a processing module 906 and a segmentation module 908 .
[0144] Among them, the acquisition module 902 is used to acquire a three-dimensional image, wherein the three-dimensional image contains at least one body tissue image of a biological object; the extraction module 904 is used to perform feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; the processing module 906 is used to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image, and the tissue information of different types of body tissues in the body tissue image; the segmentation module 908 performs semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0145] It should be noted that the acquisition module, extraction module, processing module and segmentation module correspond to steps S302 to S308 in Example 1, and the four modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory and processed by one or more processors, and the above-mentioned modules may also be part of the device and run in the AR / VR device provided in Example 1.
[0146] In the above embodiments of the present application, the processing module includes: a processing unit.
[0147] The processing unit is used to perform attention processing on the first feature set and multiple query vectors using a decoder model in the semantic segmentation model to obtain a first query vector set.
[0148] In the above embodiment of the present application, the decoder model includes multiple decoding layers, the decoding layer includes a cross-attention module, a self-attention module and a feedforward network module, wherein the processing unit includes: a first processing sub-unit, a second processing sub-unit and a third processing sub-unit.
[0149] Among them, the first processing subunit is used to use the cross-attention module to perform cross-attention processing on the input feature set and multiple query vectors to obtain a cross-attention feature set, wherein the input feature set input to the first decoding layer is the first feature set; the second processing subunit is used to use the self-attention module to perform self-attention processing on the cross-attention feature set to obtain a self-attention feature set; the third processing subunit is used to process the self-attention feature set using the feedforward network module to obtain an output feature set, wherein the output feature set output by the last decoding layer is the first query vector set, the output feature sets output by other decoding layers are the input feature sets input by the next decoding layer, and the other decoding layers are decoding layers other than the last decoding layer among the multiple decoding layers.
[0150] In the above embodiment of the present application, the segmentation module includes: a decoding unit, which is used to input the first query vectors in the first query vector set into the multi-task query decoding model in the semantic segmentation model for decoding based on the first feature set to obtain the target semantic segmentation result.
[0151] In the above embodiments of the present application, tissue information of different types of body tissues includes at least: tissue information of a first type of body tissue and tissue information of a second type of body tissue, and the first type and the second type have different granularities for dividing body tissue images.
[0152] In the above embodiment of the present application, the first processing module is further used to map tissue information of the first type of body tissue to tissue information of the second type of body tissue by using a linear projection layer.
[0153] In the above embodiment of the present application, the device further includes: a first determination module and an adjustment module.
[0154] Among them, the acquisition module is also used to obtain training samples, wherein the training samples include: a three-dimensional sample image and a preset semantic segmentation result, and the three-dimensional sample image includes at least one biological tissue image of a preset biological object; the extraction module is also used to use the backbone network in the semantic segmentation model to extract features from the three-dimensional image to obtain a second feature set of the biological tissue image, wherein different second features in the second feature set are used to characterize the image information of different channels in the three-dimensional sample image; the processing module is also used to use the encoder model in the semantic segmentation model to perform attention processing on the second feature set and multiple query vectors to obtain a second query vector set; the segmentation module is also used to, based on the second feature set, input the second query vectors in the second query vector set into the multi-task query decoding model in the semantic segmentation model for decoding to obtain a sample semantic segmentation result; the first determination module is used to determine the total loss value based on the preset semantic segmentation result and the sample semantic segmentation result; the adjustment module is used to adjust the model parameters of the semantic segmentation model based on the total loss value.
[0155] In the above embodiments of the present application, the device further includes at least one of the following: a matching module and a second determination module.
[0156] Among them, the matching module is used to match the target connected component with the preset connected component, and when the target connected component matches the preset connected component successfully, determine the type of the three-dimensional image as the type corresponding to the target connected component, wherein the target connected component is generated based on the target semantic segmentation result; the second determination module is used to determine the type of the three-dimensional image as the type corresponding to the maximum connected component in the target connected component.
[0157] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.
[0158] Example 6
[0159] According to an embodiment of the present application, an image processing device for implementing the above-mentioned image processing method is also provided. Fig.10 As shown, the device 1000 includes: a first display module 1002 and a second display module 1004 .
[0160] Among them, the first display module 1002 is used to respond to input instructions acting on the operation interface and display a three-dimensional image on the operation interface, wherein the three-dimensional image includes at least one body tissue image of a biological object; the second display module 1004 is used to respond to image processing instructions acting on the operation interface and display the target semantic segmentation result on the operation interface, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image, and the target semantic segmentation result is obtained by semantically segmenting the three-dimensional image based on a first feature set and a first query vector set of the body tissue image, the first feature set is obtained by feature extraction of the three-dimensional image, the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image, the first query vector set is obtained by performing attention processing on the first feature set and multiple query vectors, and the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image.
[0161] It should be noted that the first display module and the second display module correspond to steps S502 to S504 in Example 2, and the two modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in Example 2. It should be noted that the modules or units may be hardware components or software components stored in a memory and processed by one or more processors, and the modules may also be part of a device and run in the AR / VR device provided in Example 1.
[0162] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 2 as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 2.
[0163] Example 7
[0164] According to an embodiment of the present application, an image processing device for implementing the above-mentioned image processing method is also provided. Fig.11 As shown, the device 1100 includes: a presentation module 1102 , an extraction module 1104 , a processing module 1106 , a segmentation module 1108 and a driving module 1110 .
[0165] Among them, the presentation module 1102 is used to display a three-dimensional image on a presentation screen of a virtual reality VR device or an augmented reality AR device, wherein the three-dimensional image includes at least one body tissue image of a biological object; the extraction module 1104 is used to perform feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; the processing module 1106 is used to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image, and the tissue information of different types of body tissues in the body tissue image; the segmentation module 1108 is used to perform semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; the driving module 1110 is used to drive the VR device or AR device to render and display the target semantic segmentation result.
[0166] It should be noted that the above-mentioned presentation module, extraction module, processing module, segmentation module and driving module correspond to steps S702 to S710 in Example 2, and the five modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 3. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory and processed by one or more processors, and the above-mentioned modules may also be part of the device and run in the AR / VR device provided in Example 1.
[0167] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 3, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 3.
[0168] Example 8
[0169] According to an embodiment of the present application, an image processing device for implementing the above-mentioned image processing method is also provided. Fig.12 As shown, the device 1200 includes: a first calling module 1202 , an extracting module 1204 , a processing module 1206 , a segmenting module 1208 and a second calling module 1210 .
[0170] Among them, the first calling module 1202 is used to obtain a three-dimensional image by calling a first interface, wherein the first interface includes a first parameter, the parameter value of the first parameter is a three-dimensional image, and the three-dimensional image includes at least one body tissue image of a biological object; the extraction module 1204 is used to extract features from the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; the processing module 1206 is used to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and the tissue information of different types of body tissues in the body tissue image; the segmentation module 1208 is used to perform semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; the second calling module 1210 is used to output the target semantic segmentation result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the target semantic segmentation result.
[0171] It should be noted here that the above-mentioned first calling module, extraction module, processing module, segmentation module and second calling module correspond to steps S802 to S810 in Example 4, and the five modules are the same as the instances and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned Example 4. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory and processed by one or more processors, and the above-mentioned modules may also be part of the device and can be run in the AR / VR device provided in Example 1.
[0172] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 4, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 4.
[0173] Example 9
[0174] The embodiment of the present application may provide an AR / VR device, which may be any AR / VR device in an AR / VR device group. Optionally, in this embodiment, the AR / VR device may also be replaced by a terminal device such as a mobile terminal.
[0175] Optionally, in this embodiment, the AR / VR device may be located in at least one network device among a plurality of network devices of a computer network.
[0176] In this embodiment, the above-mentioned AR / VR device can execute the program code of the following steps in the image processing method: obtaining a three-dimensional image, wherein the three-dimensional image contains at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0177] Optionally, Fig.13 is a structural block diagram of a computer terminal according to an embodiment of the present application. Fig.13 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 1302, a memory 1304, a storage controller, and a peripheral interface.
[0178] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the image processing method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned image processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0179] The processor can call the information and application stored in the memory through the transmission device to execute the following steps: obtain a three-dimensional image, wherein the three-dimensional image contains at least one body tissue image of a biological object; perform feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and the tissue information of different types of body tissue in the body tissue image; perform semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0180] Optionally, the processor may also execute program code of the following steps: using a decoder model in a semantic segmentation model to perform attention processing on a first feature set and multiple query vectors to obtain a first query vector set.
[0181] Optionally, the processor may also execute the program code of the following steps: using a cross-attention module to perform cross-attention processing on an input feature set and multiple query vectors to obtain a cross-attention feature set, wherein the input feature set input to the first decoding layer is a first feature set; using a self-attention module to perform self-attention processing on the cross-attention feature set to obtain a self-attention feature set; using a feedforward network module to process the self-attention feature set to obtain an output feature set, wherein the output feature set output by the last decoding layer is the first query vector set, the output feature sets output by other decoding layers are the input feature sets input by the next decoding layer, and the other decoding layers are decoding layers other than the last decoding layer among the multiple decoding layers.
[0182] Optionally, the processor may also execute the program code of the following steps: based on the first feature set, inputting the first query vectors in the first query vector set into the multi-task query decoding model in the semantic segmentation model for decoding to obtain a target semantic segmentation result.
[0183] Optionally, the processor may further execute program code of the following steps: mapping tissue information of the first type of body tissue to tissue information of the second type of body tissue using a linear projection layer.
[0184] Optionally, the processor may further execute program codes of the following steps:
[0185] By using the embodiment of the present application, after acquiring a three-dimensional image, feature extraction can be performed on the three-dimensional image to obtain a first feature set of the body tissue image, and then attention processing can be performed on the first feature set and multiple query vectors to obtain a first query vector set, and finally, based on the first feature set and the first query vector set, semantic segmentation can be performed on the three-dimensional image to obtain a target semantic segmentation result. It is easy to notice that multiple query vectors can be introduced in the semantic segmentation process to achieve the purpose of identifying different types of body tissue images, without combining multiple semantic segmentation models, avoiding the superposition of introduced errors, so that multiple types of body tissue images can be recognized at the same time, improving the accuracy of image processing of three-dimensional images, shortening the time of image processing of three-dimensional images, and thus improving the performance of image processing of three-dimensional images, thereby solving the technical problem of low performance of image processing in related technologies.
[0186] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: in response to an input instruction acting on the operation interface, display a three-dimensional image on the operation interface, wherein the three-dimensional image includes at least one body tissue image of a biological object; in response to an image processing instruction acting on the operation interface, display a target semantic segmentation result on the operation interface, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image, and the target semantic segmentation result is obtained by semantically segmenting the three-dimensional image based on a first feature set and a first query vector set of the body tissue image, the first feature set is obtained by feature extraction of the three-dimensional image, the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image, the first query vector set is obtained by performing attention processing on the first feature set and multiple query vectors, and the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image.
[0187] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: display a three-dimensional image on a presentation screen of a virtual reality VR device or an augmented reality AR device, wherein the three-dimensional image includes at least one body tissue image of a biological object; perform feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and the tissue information of different types of body tissues in the body tissue image; perform semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; and drive the VR device or AR device to render and display the target semantic segmentation result.
[0188] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a three-dimensional image by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is a three-dimensional image, and the three-dimensional image contains at least one body tissue image of a biological object; perform feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and the tissue information of different types of body tissues in the body tissue image; perform semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; output the target semantic segmentation result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the target semantic segmentation result.
[0189] It can be understood by those skilled in the art that Fig.13 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.13 The structure of the electronic device is not limited. For example, the computer terminal A may also include Fig.13 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 3Different configurations are shown.
[0190] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0191] Example 10
[0192] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the image processing method provided in the above embodiment 1.
[0193] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be located in any computer terminal in the AR / VR device terminal group in the AR / VR device network, or in any mobile terminal in the mobile terminal group.
[0194] Optionally, in this embodiment, a computer-readable storage medium is configured to store program codes for executing the following steps: acquiring a three-dimensional image, wherein the three-dimensional image contains at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein a first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein a first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image.
[0195] Optionally, the computer-readable storage medium may execute program code of the following steps: using a decoder model in a semantic segmentation model to perform attention processing on a first feature set and multiple query vectors to obtain a first query vector set.
[0196] Optionally, the computer-readable storage medium can also execute the program code of the following steps: using a cross-attention module to perform cross-attention processing on an input feature set and multiple query vectors to obtain a cross-attention feature set, wherein the input feature set input to the first decoding layer is the first feature set; using a self-attention module to perform self-attention processing on the cross-attention feature set to obtain a self-attention feature set; using a feedforward network module to process the self-attention feature set to obtain an output feature set, wherein the output feature set output by the last decoding layer is the first query vector set, the output feature sets output by other decoding layers are the input feature sets input by the next decoding layer, and the other decoding layers are decoding layers other than the last decoding layer among the multiple decoding layers.
[0197] Optionally, the computer-readable storage medium may also execute program code of the following steps: based on the first feature set, inputting the first query vectors in the first query vector set into the multi-task query decoding model in the semantic segmentation model for decoding to obtain a target semantic segmentation result.
[0198] Optionally, the computer-readable storage medium may also execute program code for the following steps: mapping tissue information of a first type of body tissue to tissue information of a second type of body tissue using a linear projection layer.
[0199] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: in response to an input instruction acting on an operation interface, displaying a three-dimensional image on the operation interface, wherein the three-dimensional image includes at least one body tissue image of a biological object; in response to an image processing instruction acting on the operation interface, displaying a target semantic segmentation result on the operation interface, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image, and the target semantic segmentation result is obtained by semantically segmenting the three-dimensional image based on a first feature set and a first query vector set of the body tissue image, the first feature set is obtained by feature extraction of the three-dimensional image, the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image, the first query vector set is obtained by performing attention processing on the first feature set and multiple query vectors, and the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissues in the body tissue image.
[0200] Optionally, in this embodiment, a computer-readable storage medium is configured to store program codes for executing the following steps: displaying a three-dimensional image on a presentation screen of a virtual reality VR device or an augmented reality AR device, wherein the three-dimensional image includes at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image, and tissue information of different types of body tissue in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; and driving the VR device or AR device to render and display the target semantic segmentation result.
[0201] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: acquiring a three-dimensional image by calling a first interface, wherein the first interface includes a first parameter, a parameter value of the first parameter is a three-dimensional image, and the three-dimensional image contains at least one body tissue image of a biological object; performing feature extraction on the three-dimensional image to obtain a first feature set of the body tissue image, wherein the first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image; performing attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissue in the body tissue image; performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; outputting the target semantic segmentation result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the target semantic segmentation result.
[0202] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0203] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0204] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0205] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0206] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0207] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0208] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An image processing method, characterized in that: include: acquiring a three-dimensional image, wherein the three-dimensional image includes at least one body tissue image of a biological subject; Performing feature extraction on image information of different channels of the three-dimensional image to obtain a first feature set of the body tissue image, wherein a first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; Using a decoder model in a semantic segmentation model to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image, and the multiple query vectors are used to identify tissue information of different types of body tissues, and the decoder model includes multiple decoding layers, and the decoding layers include a cross-attention module, a self-attention module, and a feedforward network module; Based on the first feature set and the first query vector set, semantically segment the three-dimensional image to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; The decoder model is used to perform attention processing on the first feature set and multiple query vectors to obtain the first query vector set, including: Using the cross-attention module to perform cross-attention processing on the input feature set and the multiple query vectors to obtain a cross-attention feature set, wherein the input feature set input by the first decoding layer is the first feature set; Using the self-attention module to perform self-attention processing on the cross-attention feature set to obtain a self-attention feature set; The self-attention feature set is processed using the feedforward network module to obtain an output feature set, wherein the output feature set output by the last decoding layer is the first query vector set.
2. The method according to claim 1, characterized in that The output feature set output by other decoding layers is the input feature set input by the next decoding layer, and the other decoding layers are decoding layers other than the last decoding layer in the multiple decoding layers.
3. The method according to claim 1, characterized in that Based on the first feature set and the first query vector set, semantic segmentation is performed on the three-dimensional image to obtain a target semantic segmentation result, including: Based on the first feature set, the first query vectors in the first query vector set are respectively input into the multi-task query decoding model in the semantic segmentation model for decoding to obtain the target semantic segmentation result, wherein the multi-task query decoding model is used to decode multiple semantic segmentation tasks of different granularities.
4. The method according to claim 3, characterized in that The tissue information of different types of body tissues includes at least: tissue information of a first type of body tissue and tissue information of a second type of body tissue, and the first type and the second type have different granularities for dividing the body tissue image.
5. The method according to claim 4, characterized in that The tissue information of the first type of body tissue is mapped to the tissue information of the second type of body tissue using a linear projection layer.
6. The method according to claim 1, characterized in that The method further comprises: Acquire a training sample, wherein the training sample comprises: a three-dimensional sample image and a preset semantic segmentation result, and the three-dimensional sample image comprises at least one biological tissue image of a preset biological object; Using a backbone network in a semantic segmentation model, feature extraction is performed on image information of different channels of the three-dimensional image to obtain a second feature set of the biological tissue image, wherein different second features in the second feature set are used to characterize image information of different channels in the three-dimensional sample image; Using the encoder model in the semantic segmentation model, performing attention processing on the second feature set and multiple query vectors to obtain a second query vector set, wherein the multiple query vectors are used to identify tissue information of different types of body tissues; Based on the second feature set, the second query vectors in the second query vector set are respectively input into the multi-task query decoding model in the semantic segmentation model for decoding to obtain a sample semantic segmentation result; Determining a total loss value based on the preset semantic segmentation result and the sample semantic segmentation result; Based on the total loss value, model parameters of the semantic segmentation model are adjusted.
7. The method according to claim 1, characterized in that After performing semantic segmentation on the three-dimensional image based on the first feature set and the first query vector set to obtain a target semantic segmentation result, the method further includes at least one of the following: Matching the target connected component with the preset connected component, and if the target connected component matches the preset connected component successfully, determining the type of the three-dimensional image to be the type corresponding to the target connected component, wherein the target connected component is generated based on the target semantic segmentation result; The type of the three-dimensional image is determined to be the type corresponding to the maximum connected component in the target connected components.
8. An image processing method, characterized in that: include: In response to an input instruction acting on the operation interface, displaying a three-dimensional image on the operation interface, wherein the three-dimensional image includes at least one body tissue image of a biological subject; In response to an image processing instruction acting on the operation interface, a target semantic segmentation result is displayed on the operation interface, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image, and the target semantic segmentation result is obtained by semantically segmenting the three-dimensional image based on a first feature set and a first query vector set of the body tissue image, wherein the first feature set is obtained by extracting features from image information of different channels of the three-dimensional image, and a first feature in the first feature set is used to characterize image information of different channels of the three-dimensional image, and the first query vector set is obtained by performing attention processing on the first feature set and multiple query vectors using a decoder model in a semantic segmentation model, and a first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image, and the multiple query vectors are used to identify tissue information of different types of body tissues, and the decoder model includes multiple decoding layers, and the decoding layer includes a cross-attention module, a self-attention module, and a feedforward network module; Among them, the output feature set output by the last decoding layer in the feedforward network module is the first query vector set, the output feature set is used to process the self-attention feature set using the feedforward network module, the self-attention feature set is obtained by performing self-attention processing on the cross-attention feature set using the self-attention module, the cross-attention feature set is obtained by performing cross-attention processing on the input feature set and the multiple query vectors using the cross-attention module, and the input feature set input by the first decoding layer is the first feature set.
9. An image processing method, characterized in that: include: Displaying a three-dimensional image on a presentation screen of a virtual reality (VR) device or an augmented reality (AR) device, wherein the three-dimensional image includes at least one body tissue image of a biological object; Performing feature extraction on image information of different channels of the three-dimensional image to obtain a first feature set of the body tissue image, wherein a first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; Using a decoder model in a semantic segmentation model to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image, and the multiple query vectors are used to identify tissue information of different types of body tissues, and the decoder model includes multiple decoding layers, and the decoding layers include a cross-attention module, a self-attention module, and a feedforward network module; Based on the first feature set and the first query vector set, semantically segment the three-dimensional image to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; Driving the VR device or the AR device to render and display the target semantic segmentation result; The decoder model in the semantic segmentation model is used to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, including: Using the cross-attention module to perform cross-attention processing on the input feature set and the multiple query vectors to obtain a cross-attention feature set, wherein the input feature set input by the first decoding layer is the first feature set; Using the self-attention module to perform self-attention processing on the cross-attention feature set to obtain a self-attention feature set; The self-attention feature set is processed using the feedforward network module to obtain an output feature set, wherein the output feature set output by the last decoding layer is the first query vector set.
10. An image processing method, characterized in that: include: Acquire a three-dimensional image by calling a first interface, wherein the first interface includes a first parameter, a parameter value of the first parameter is the three-dimensional image, and the three-dimensional image includes at least one body tissue image of a biological object; Performing feature extraction on image information of different channels of the three-dimensional image to obtain a first feature set of the body tissue image, wherein a first feature in the first feature set is used to characterize the image information of different channels of the three-dimensional image; Using a decoder model in a semantic segmentation model to perform attention processing on the first feature set and multiple query vectors to obtain a first query vector set, wherein the first query vector in the first query vector set is used to characterize the body tissue image and tissue information of different types of body tissues in the body tissue image, and the multiple query vectors are used to identify tissue information of different types of body tissues, and the decoder model includes multiple decoding layers, and the decoding layers include a cross-attention module, a self-attention module, and a feedforward network module; Based on the first feature set and the first query vector set, semantically segment the three-dimensional image to obtain a target semantic segmentation result, wherein the target semantic segmentation result is used to characterize voxel points belonging to different types of body tissue images in the three-dimensional image; Outputting the target semantic segmentation result by calling a second interface, wherein the second interface includes a second parameter, and a parameter value of the second parameter is the target semantic segmentation result; The decoder model is used to perform attention processing on the first feature set and multiple query vectors to obtain the first query vector set, including: Using the cross-attention module to perform cross-attention processing on the input feature set and the multiple query vectors to obtain a cross-attention feature set, wherein the input feature set input by the first decoding layer is the first feature set; Using the self-attention module to perform self-attention processing on the cross-attention feature set to obtain a self-attention feature set; The self-attention feature set is processed using the feedforward network module to obtain an output feature set, wherein the output feature set output by the last decoding layer is the first query vector set.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 10.
12. A computer terminal, characterized in that: include: processor; A memory, connected to the processor, for providing the processor with instructions for executing the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Small sample learning tumor segmentation method driven by graph attention model
CN114240965A
