Part classification identification method and inspection quality monitoring system
By performing feature extraction and dimension compression on multiple target images in gastroscopy, and utilizing the dependency relationships between adjacent images in the video sequence, more accurate identification of digestive tract parts is achieved, solving the problem of missed diagnosis of parts in gastroscopy, and improving To check the quality.
Patent Information
- Application Number
- CN202111090617.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-17
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-09-17
AI Technical Summary
In gastroscopy, due to the large number of parts in the upper gastrointestinal tract, doctors can easily miss some parts during the operation, leading to missed diagnosis of diseases. It is difficult for existing technology to effectively identify the types of parts in a gastrointestinal endoscope, especially when they are adjacent in the video sequence. Dependencies between images are underexploited.
A part category recognition method is used to perform vectorization representation, feature extraction, dimension compression and final feature acquisition on multiple target images collected by the endoscopic device, combined with VIT network, RNN network and local connection layer, using adjacent images The dependency relationship generates the predicted value of the part category to achieve accurate identification of the part category.
It improves the accuracy of part identification, avoids misclassification errors in single image classification methods, can more effectively capture the relationship between adjacent frame images in the video, improves the recognition performance of digestive tract parts, and helps doctors avoid missing examinations.
Smart Images

Figure CN113920355B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical fields of image recognition and inspection quality monitoring, and in particular to a method for identifying a part category and an inspection quality monitoring system based on the part category identification. Background Art
[0002] According to global cancer statistics, 4 of the top 10 tumors in terms of incidence are from the digestive tract. Digestive tract diseases, including benign, precancerous and malignant diseases of the digestive tract, are seriously threatening the quality of life and life safety of patients, causing a huge health burden. The incidence of digestive tract tumors also ranks first among all types of malignant tumors in my country. Due to the significant effect of digestive endoscopy in the diagnosis of digestive tract cancer, it has been recommended as the main diagnostic method for digestive tract cancer. Specifically, digestive endoscopy can directly detect the diseased tissue area in the digestive tract for medical personnel to make corresponding diagnoses. Tissue biopsy can be performed under digestive endoscopy, which is important for the diagnosis of early digestive tract precancerous diseases or precancerous lesions and the differentiation of benign and malignant ulcers.
[0003] At present, gastroscopy and endoscopy are important means to identify upper gastrointestinal diseases. However, since the upper gastrointestinal tract involves many parts, for example, the upper gastrointestinal tract includes dozens of parts such as the oropharynx, esophagus, cardia, cardia, anterior wall of inverted gastric fundus A, and posterior wall of inverted gastric fundus P, gastroscopists are likely to miss some parts when operating the gastroscope, resulting in missed diagnosis of diseases in these parts. Summary of the invention
[0004] In order to solve at least one of the above technical problems, the present disclosure provides a part category recognition method, an apparatus, an inspection quality monitoring system based on part category recognition, an electronic device and a storage medium.
[0005] The part category recognition method, device, inspection quality monitoring system based on part category recognition, electronic device and storage medium disclosed in the present invention are implemented through the following technical solutions.
[0006] According to one aspect of the present disclosure, a method for identifying a part category is provided, comprising: vectorizing a plurality of target images extracted from an endoscope device to obtain an image representation vector (P) for each target image, wherein the plurality of target images are continuous frame images; performing feature extraction on the image representation vector (P) for each target image to obtain a feature representation vector (X) for each target image having a first preset dimension (L); performing dimension compression on the feature representation vector (X) for each target image having a first preset dimension (L) to obtain an image compression intermediate representation vector (X') for each target image having a second preset dimension; obtaining a final image feature (X') for each target image based on the image compression intermediate representation vector (X') for each target image having a second preset dimension (k); and generating a prediction value for each part category of each target image based on the final image features (X') of all target images and the dependency relationship between the various part categories obtained in advance.
[0007] According to at least one embodiment of the part category recognition method disclosed herein, feature extraction is performed on the image representation vector (P) of each target image to obtain a feature representation vector (X) of each target image with a first preset dimension (L), including: using a VIT network to perform feature extraction on the image representation vector (P) of each target image to obtain a feature representation vector (X) of each target image with a first preset dimension (L).
[0008] According to at least one embodiment of the present disclosure, a method for identifying a part category is provided, wherein a feature representation vector (X) of each target image having a first preset dimension (L) is dimensionally compressed to obtain an image compressed intermediate representation vector (X') of each target image having a second preset dimension, comprising: dividing the feature representation vector (X) of each target image having a first preset dimension (L) to obtain a first preset number (k) of feature representation subvectors (X k ), for each target image’s feature representation subvector (X k ) to obtain a first preset number (k) of feature compression vectors of each target image; and concatenating the feature compression vectors of each target image to obtain an image compression intermediate representation vector (X') having a second preset dimension, wherein the second preset dimension is smaller than the first preset dimension.
[0009] For example, the first preset dimension L is 1000, and the dimension after segmentation is L1=200, then k=5 feature representation sub-vectors are generated.
[0010] According to at least one embodiment of the part category recognition method disclosed herein, a final image feature (X") of each target image is obtained based on an image compression intermediate representation vector (X') of each target image having a second preset dimension (k), including: obtaining the final image feature (X") of each target image using an RNN network based on the image compression intermediate representation vector (X') of each target image.
[0011] According to at least one embodiment of the part category recognition method of the present disclosure, the dependency relationship between the part categories is obtained based on at least a plurality of target images of labeled part categories extracted from an endoscopic device, and the plurality of target images of labeled part categories are continuous frame images.
[0012] According to at least one embodiment of the present disclosure, a method for identifying a part category, at least based on a plurality of target images of annotated part categories extracted from an endoscope device, obtains the dependency relationship between the part categories (model training process), including: vectorizing the target images of the plurality of annotated part categories to obtain an image representation vector (P) of each target image of the annotated part category, wherein the target images of the plurality of annotated part categories are continuous frame images; performing feature extraction on the image representation vector (P) of each target image of the annotated part category to obtain a feature representation vector (X) of each target image of the annotated part category having a first preset dimension (L); dividing the feature representation vector (X) of each target image of the annotated part category to obtain a first preset number (k) of feature representation sub-vectors (X) of the first preset number (k) of ... k ), for each labeled part category of the target image feature representation subvector (X k ) to obtain a first preset number (k) of feature compression vectors of the target image of each labeled part category; concatenate the feature compression vectors of the target image of each labeled part category to obtain an image compression intermediate representation vector (X') with a second preset dimension, wherein the second preset dimension is smaller than the first preset dimension; obtain the final image feature (X') of the target image of each labeled part category based on the image compression intermediate representation vector (X') of the target image of each labeled part category; integrate and add the final image features (X') of the target images of each labeled part category to obtain an integrated addition feature; S214, copy the integrated addition feature to a second preset number, wherein the second preset number is equal to the total number of part categories; and obtain the dependency relationship between the part categories based on the integrated addition features of the second preset number and the part categories of the target images of each labeled part category.
[0013] According to the method for part category recognition of at least one embodiment of the present disclosure, a feature representation vector (X) having a first preset dimension (L) of each target image is segmented to obtain feature representation subvectors (X) of a first preset number (k) of copies. k ),include:
[0014] The feature representation vector (X) of each target image with a first preset dimension (L) is segmented using a local connection layer to obtain a first preset number (k) of feature representation sub-vectors (X k ).
[0015] According to the part category recognition method of at least one embodiment of the present disclosure, the feature compression vectors of each target image are spliced to obtain an image compression intermediate representation vector (X') with a second preset dimension, including: using a fully connected layer in a local connection layer to splice the feature compression vectors of each target image to obtain an image compression intermediate representation vector (X') with a second preset dimension.
[0016] According to at least one embodiment of the part category recognition method disclosed herein, based on the final image features (X") of all target images and the pre-acquired dependencies between the various part categories, a predicted value of each part category of each target image is generated, including: integrating and adding the final image features (X") of each target image to obtain an integrated added feature; copying the integrated added feature into a second preset number of copies, where the second preset number of copies is equal to the total number of part categories; and generating a predicted value of each part category of each target image based on the integrated added features of the second preset number of copies and the pre-acquired dependencies between the various part categories.
[0017] According to another aspect of the present disclosure, a part category recognition device is provided, comprising: a feature extraction layer, which performs feature extraction on an image representation vector (P) of each target image to obtain a feature representation vector (X) of a first preset dimension (L) for each target image; a multi-layer local connection network (LC), which performs dimension compression on the feature representation vector (X) of each target image with a first preset dimension (L) to obtain an image compression intermediate representation vector (X') of a second preset dimension for each target image; a multi-layer recurrent neural network (RNN), which obtains a final image feature (X') of each target image based on the image compression intermediate representation vector (X') of the second preset dimension (k) for each target image; and a classifier, which generates a prediction value of each part category of each target image based on the final image features (X') of all target images and the dependency relationship between the pre-acquired part categories.
[0018] According to the part category recognition device of at least one embodiment of the present disclosure, the feature extraction layer includes multiple VIT networks, each VIT network includes a multi-head attention layer for acquiring sequence features and information, a feedforward propagation layer for nonlinear transformation, and two addition and standardization layers for normalization; the two addition and standardization layers for normalization are respectively arranged before the multi-head attention layer and the feedforward propagation layer, the feedforward propagation layer is located after the multi-head attention layer, and the output of each layer of the VIT network is directly used as the input of the next layer.
[0019] According to the part category recognition device of at least one embodiment of the present disclosure, the multi-layer local connection network includes multiple shared local connection layers, each shared local connection layer includes a fully connected layer, and the fully connected layer is used to splice the feature compression vectors of each target image to obtain an image compression intermediate representation vector (X') with a second preset dimension.
[0020] According to at least one embodiment of the part category recognition device disclosed herein, the classifier includes an integrated addition module and an attention network; the integrated addition module integrates and adds the final image features (X") of each target image to obtain an integrated addition feature; the integrated addition feature is copied into a second preset number of copies, and the second preset number of copies is equal to the total number of part categories; the attention network generates a predicted value for each part category of each target image based on the integrated addition features of the second preset number of copies and the pre-acquired dependency relationship between the various part categories.
[0021] According to the part category recognition device of at least one embodiment of the present disclosure, the classifier includes a softmax layer, and outputs the probability value of each part category of each target image using the following formula:
[0022]
[0023] in, P i is the probability value of the ith part category, N is the total number of part categories, v i is the predicted value of the i-th part category; based on the probability value of each part category of each target image, the predicted value of each part category is output.
[0024] According to another aspect of the present disclosure, there is provided an inspection quality monitoring system based on part category recognition, comprising a client, wherein the client comprises a video processing module, wherein the video processing module receives video data from an endoscope device, and divides the video data into a plurality of video segments according to a preset time length, and extracts a plurality of target images from each video segment, wherein the plurality of target images are continuous frame images; the client further comprises a part category recognition device, wherein the part category recognition device performs part category recognition on a plurality of target images of each video segment to obtain a part category recognition result of each target image of each video segment; the client further comprises an inspection quality analysis module, wherein the inspection quality analysis module receives the part category recognition result of each target image of each video segment from the part category recognition device, and displays the result in real time through a display device, wherein the inspection quality analysis module counts the cumulative display time length of each category of parts in the part category recognition result of each target image of each video segment; and the client further comprises a result summary report generation module, wherein the result summary report generation module generates a result summary report based on the cumulative display time length of the category parts counted by the inspection quality analysis module.
[0025] According to at least one embodiment of the present disclosure, the inspection quality monitoring system based on part category recognition also includes a server side, the server side includes a data processing module, the data processing module includes a preprocessing module, the preprocessing module receives the multiple target images of each video segment from the video processing module of the client, preprocesses the multiple target images, and the part category recognition device performs part category recognition on the preprocessed multiple target images of each video segment.
[0026] According to the inspection quality monitoring system based on part category recognition of at least one embodiment of the present disclosure, the data processing module includes a labeling module, which labels each target image of each video clip with a part category, and obtains a plurality of target images of each video clip with labeled part categories for training the part category recognition device.
[0027] According to the inspection quality monitoring system based on part category recognition of at least one embodiment of the present disclosure, the preprocessing module vectorizes a plurality of target images extracted from the endoscope device to obtain an image representation vector (P) for each target image.
[0028] According to the inspection quality monitoring system based on part category recognition of at least one embodiment of the present disclosure, the server side also includes a training module, which trains the part category recognition device based on multiple target images with labeled part categories in each video clip to obtain a trained part category recognition device.
[0029] According to the inspection quality monitoring system based on part category recognition of at least one embodiment of the present disclosure, the client is arranged on a computer device.
[0030] According to the inspection quality monitoring system based on part category recognition of at least one embodiment of the present disclosure, the part category recognition device is any one of the above-mentioned part category recognition devices.
[0031] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes any one of the above-mentioned part category recognition methods.
[0032] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the execution instructions are used to implement any of the above-mentioned methods for identifying part categories. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0034] Figure 1 is a flowchart of a method for identifying a part category according to an embodiment of the present disclosure.
[0035] Figure 2 It is a flowchart of a model training process according to an embodiment of the present disclosure.
[0036] Figure 3 It is a schematic diagram of part information labeling provided according to an embodiment of the present disclosure.
[0037] Figure 4 It is a structural schematic diagram of a part category recognition device using a hardware implementation of a processing system.
[0038] Figure 5 A schematic diagram of a model of a part category recognition device according to an embodiment of the present disclosure is shown.
[0039] Figure 6 A schematic structural diagram of a local connection layer according to an embodiment of the present disclosure is shown.
[0040] Figure 7 A schematic structural block diagram of the inspection quality monitoring system based on part category recognition disclosed in the present invention is shown.
[0041] Figure 8 It is a real-time result display diagram provided by the inspection quality monitoring system of one embodiment of the present disclosure.
[0042] Fig. 9 This is a display diagram of an inspection report provided by an inspection quality monitoring system based on part category recognition according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0043] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0044] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0045] Figure 1 It is a flowchart of a method for identifying a part category according to an embodiment of the present disclosure.
[0046] refer to Figure 1 , a part category recognition method S100, comprising: S102, vectorizing a plurality of target images extracted from an endoscope device to obtain an image representation vector (P) of each target image, wherein the plurality of target images are continuous frame images; S104, performing feature extraction on the image representation vector (P) of each target image to obtain a feature representation vector (X) of each target image having a first preset dimension (L); S106, dimensionally compressing the feature representation vector (X) of each target image having a first preset dimension (L) to obtain an image compression intermediate representation vector (X') of each target image having a second preset dimension; S108, obtaining a final image feature (X') of each target image based on the image compression intermediate representation vector (X') of each target image having a second preset dimension (k); and S110, generating a prediction value of each part category of each target image based on the final image features (X') of all target images and the dependency relationship between the various part categories obtained in advance.
[0047] The part category recognition method disclosed in the present invention is a part (eg, various parts of the digestive tract) recognition technology based on artificial intelligence image recognition.
[0048] Although related technologies have appeared in the prior art and can assist doctors in their examinations, the digestive tract site recognition technology in the prior art is often based on a single image classification method, which does not take into account that there is a certain relationship (connection) between the site categories (labels) of adjacent images in the video, and the single image classification method cannot capture these relationships. For example: During the recognition process, the existing recognition technology found that the image of "esophagus" would be misclassified as "duodenum", while the site category recognition method disclosed in the present invention can use the adjacent image label information to avoid this error, because many adjacent images are labeled "esophagus", and "esophagus" and "duodenum" cannot appear at the same time (there is no dependency between the two). The site category recognition method disclosed in the present invention has a higher prediction accuracy.
[0049] For the part category recognition method S100 of the above embodiment, preferably, S104, performing feature extraction on the image representation vector (P) of each target image to obtain a feature representation vector (X) of each target image having a first preset dimension (L), includes:
[0050] A VIT network is used to perform feature extraction on the image representation vector (P) of each target image to obtain a feature representation vector (X) of each target image having a first preset dimension (L).
[0051] Among them, the VIT network belongs to the existing technology, which can represent the input target image as a sequence of image blocks.
[0052] The feature representation vector with the first preset dimension (L) described above is represented as: ,in, f VIT is the VIT network function, and P is the image representation vector of the target image.
[0053] Exemplarily, the dimension of the feature representation vector (X) of each target image may be 1000, that is, L is 1000.
[0054] For the part category recognition method S100 of each of the above embodiments, preferably, S106, dimensionally compressing the feature representation vector (X) of each target image with a first preset dimension (L) to obtain an image compressed intermediate representation vector (X') of each target image with a second preset dimension, comprises: dividing the feature representation vector (X) of each target image with a first preset dimension (L) to obtain a first preset number (k) of feature representation sub-vectors (X k ), for each target image’s feature representation subvector (X k) to obtain a first preset number (k) of feature compression vectors of each target image; and concatenating the feature compression vectors of each target image to obtain an image compression intermediate representation vector (X') having a second preset dimension, wherein the second preset dimension is smaller than the first preset dimension.
[0055] For the part category recognition method S100 of each of the above-mentioned embodiments, preferably, S108, obtaining the final image features (X") of each target image based on the image compression intermediate representation vector (X') with a second preset dimension (k) of each target image, includes: obtaining the final image features (X") of each target image using an RNN network based on the image compression intermediate representation vector (X') of each target image.
[0056] Right now, ,in, f RNN It is the RNN network function.
[0057] For the part category recognition method S100 of each of the above embodiments, preferably, the dependency relationship between the part categories is obtained at least based on a plurality of target images of labeled part categories extracted from the endoscope device, and the plurality of target images of labeled part categories are continuous frame images.
[0058] For the part category recognition method S100 of each of the above-mentioned embodiments, preferably, the dependency relationship between the part categories is obtained based on at least a plurality of target images of the labeled part categories extracted from the endoscope device (the dependency relationship between the part categories is obtained during the model training process), including: S202, vectorizing the target images of the plurality of labeled part categories to obtain an image representation vector (P) of each target image of the labeled part category, wherein the target images of the plurality of labeled part categories are continuous frame images; S204, performing feature extraction on the image representation vector (P) of each target image of the labeled part category to obtain a feature representation vector (X) of each target image of the labeled part category having a first preset dimension (L); S206, segmenting the feature representation vector (X) of each target image of the labeled part category to obtain a first preset number (k) of feature representation sub-vectors (X) k ), for each labeled part category of the target image feature representation subvector (X k) to obtain a first preset number (k) of feature compression vectors of the target image of each labeled part category; S208, concatenating the feature compression vectors of the target image of each labeled part category to obtain an image compression intermediate representation vector (X') with a second preset dimension, wherein the second preset dimension is smaller than the first preset dimension; S210, based on the image compression intermediate representation vector (X') of the target image of each labeled part category, obtaining the final image feature (X') of the target image of each labeled part category; S212, integrating and adding the final image features (X') of the target images of each labeled part category to obtain an integrated addition feature; S214, copying the integrated addition feature into a second preset number, wherein the second preset number is equal to the total number of part categories; and, S216, obtaining the dependency relationship between the part categories based on the integrated addition features of the second preset number and the part categories of the target images of each labeled part category.
[0059] refer to Figure 2 , Figure 2 A schematic flow chart of the above-mentioned model training process S200 is shown.
[0060] Among them, each target image with annotated part categories can be annotated with one or more part categories, such as Figure 3 , the target image of the labeled part category is labeled with four part categories (the greater curvature of the antrum G, the lesser curvature of the antrum L, the anterior wall of the antrum A, and the posterior wall of the antrum P), that is, the dependency relationship (dependency) of each part category is obtained by integrating and adding features of all the target images of the labeled part categories.
[0061] The final image feature (X″) described above may be in the form of a Histogram of Oriented Gradient (HOG) feature.
[0062] Preferably, the target images of the multiple labeled part categories are extracted from the same video clip.
[0063] The first preset number k described above is the same as the value of the second preset dimension described above.
[0064] The target image described above may be an image of various parts of the digestive tract collected by an endoscope device, etc.
[0065] Among them, the site categories described above can be site categories of various parts of the digestive tract in the endoscopic image, for example: positive mirror oropharynx, positive mirror esophagus, positive mirror cardia, inverted mirror cardia, inverted mirror gastric fundus A anterior wall, inverted mirror gastric fundus P posterior wall, inverted mirror gastric fundus G greater curvature, inverted mirror gastric fundus L lesser curvature, positive mirror gastric body middle and upper part A anterior wall, positive mirror gastric body middle and upper part P posterior wall, positive mirror gastric body middle and upper part G greater curvature, positive mirror gastric body middle and upper part L lesser curvature, inverted mirror gastric body middle and upper part A anterior wall, inverted mirror gastric body middle and upper part P posterior wall, inverted mirror The G greater curvature in the middle and upper part of the gastric body, the L lesser curvature in the middle and upper part of the inverted gastric body, the A anterior wall of the lower part of the positive gastric body, the P posterior wall of the lower part of the positive gastric body, the G greater curvature in the lower part of the positive gastric body, the L lesser curvature in the lower part of the positive gastric body, the positive gastric angle, the A anterior wall of the inverted gastric angle, the P posterior wall of the inverted gastric angle, the L lesser curvature of the inverted gastric angle, the A anterior wall of the positive gastric antrum, the P posterior wall of the positive gastric antrum, the G greater curvature in the positive gastric antrum, the L lesser curvature of the positive gastric antrum, the positive pylorus, the duodenal bulb of the positive gastric mirror, the descending part of the duodenum of the positive gastrointestinal papilla, and the outside of the gastroenteroscope.
[0066] For the part category recognition method S100 in each of the above embodiments, preferably, the feature representation vector (X) of each target image with a first preset dimension (L) is segmented to obtain a first preset number (k) of feature representation sub-vectors (X k ), including: using a local connection layer to split the feature representation vector (X) of each target image with a first preset dimension (L), and obtaining a first preset number (k) of feature representation sub-vectors (X k ).
[0067] Among them, the feature representation subvector (X k )for:
[0068] in, k=L / L 1 For example, if the first preset dimension L is 1000 and the dimension after segmentation is L1=200, k=5 feature representation sub-vectors are generated. This formula describes the k feature representation sub-vectors (X k ).
[0069] For the part category recognition method S100 of each of the above-mentioned embodiments, preferably, the feature compression vectors of each target image are concatenated to obtain an image compression intermediate representation vector (X') having a second preset dimension, including: using a fully connected layer in a local connection layer to concatenate the feature compression vectors of each target image to obtain an image compression intermediate representation vector (X') having a second preset dimension.
[0070] Among them, the image compression intermediate representation vector (X') is expressed as:
[0071]
[0072] in, f MLP is a fully connected network function, .
[0073] Compared with the feature representation vector (X), the dimension of the image compression intermediate representation vector (X') after the (shared) local connection layer is smaller.
[0074] For the part category identification method S100 of each of the above-mentioned embodiments, preferably, S110, based on the final image features (X") of all target images and the pre-acquired dependencies between the various part categories, generates the predicted values of the various part categories of each target image, including: integrating and adding the final image features (X") of each target image to obtain an integrated added feature; copying the integrated added feature into a second preset number of copies, wherein the second preset number of copies is equal to the total number of part categories; and generating the predicted values of the various part categories of each target image based on the integrated added features of the second preset number of copies and the pre-acquired dependencies between the various part categories.
[0075] For example, after outputting N category features (N is the number of part categories) of each target image based on the integrated addition features of the second preset number and the pre-acquired dependency relationship between the various part categories, the N category features of each target image are decoded (the N category features are decoded respectively using N fully connected operations of the fully connected layer of the classifier, and N category prediction values of each target image are output.
[0076] During the training process of the model, the final image features (X') of the target images of each labeled part category are integrated and added to obtain the integrated addition features and copied N copies (the second preset number of copies), and then passed through the attention layer (reference Figure 5 ) learns the dependencies between the various part categories, and then passes through the fully connected layer and the softmax layer (that is, using a classification network (classifier) including the fully connected layer + the softmax layer).
[0077] According to another aspect of the present disclosure, a part category recognition device (ie, a part category recognition model) is provided.
[0078] According to an embodiment of the present disclosure, a part category recognition device 1000 includes: a feature extraction layer 1002, wherein the feature extraction layer 1002 performs feature extraction on an image representation vector (P) of each target image to obtain a feature representation vector (X) of a first preset dimension (L) of each target image; a multi-layer local connection network 1004 (LC), wherein the multi-layer local connection network 1004 performs dimension compression on the feature representation vector (X) of each target image with a first preset dimension (L) to obtain an image compression intermediate representation vector (X') of a second preset dimension of each target image; a multi-layer recurrent neural network 1006 (RNN), wherein the multi-layer recurrent neural network 1006 obtains a final image feature (X') of each target image based on the image compression intermediate representation vector (X') of each target image with a second preset dimension (k); and a classifier 1008, wherein the classifier 1008 generates a prediction value of each part category of each target image based on the final image features (X') of all target images and the dependency relationship between the pre-acquired part categories.
[0079] The part type identification device 1000 disclosed in the present invention may be implemented in the form of a computer program architecture.
[0080] The commonly used models for capturing sequence information in the prior art may be a recurrent neural network (RNN) model or a Transformer model. However, since the computing units of the RNN model cannot be calculated in parallel, the RNN model takes a long time to calculate, and although the Transformer model has the advantage of parallelism (less computing time), the model has more model parameters and consumes a large amount of video memory. Therefore, the present disclosure proposes a new part category recognition device (sequence labeling model, Multi-LC-RNN).
[0081] For the part category recognition device 1000 of the above-mentioned embodiment, preferably, the feature extraction layer 1002 includes multiple VIT networks, each VIT network includes a multi-head attention layer for acquiring sequence features and information, a feedforward propagation layer for nonlinear transformation, and two addition and standardization layers for normalization; the two addition and standardization layers for normalization are respectively arranged before the multi-head attention layer and the feedforward propagation layer, the feedforward propagation layer is located after the multi-head attention layer, and the output of each layer of the VIT network is directly used as the input of the next layer.
[0082] The feature extraction layer 1002 includes multiple VIT networks to improve the feature extraction speed of the feature extraction layer 1002 .
[0083] For the part category recognition device 1000 of each of the above-mentioned embodiments, preferably, the multi-layer local connection network 1004 includes a plurality of shared local connection layers, each shared local connection layer includes a fully connected layer, and the fully connected layer is used to concatenate the feature compression vectors of each target image to obtain an image compression intermediate representation vector (X') having a second preset dimension.
[0084] For the part category recognition device 1000 of each of the above-mentioned embodiments, preferably, the classifier 1008 includes an integrated addition module and an attention network; the integrated addition module integrates and adds the final image features (X") of each target image to obtain an integrated addition feature; the integrated addition feature is copied into a second preset number of copies, and the second preset number of copies is equal to the total number of part categories; the attention network generates a predicted value for each part category of each target image based on the integrated addition features of the second preset number of copies and the pre-acquired dependency relationship between the various part categories.
[0085] For the part category recognition device 1000 of the above embodiment, preferably, the classifier 1008 includes a softmax layer, and outputs the probability value of each part category of each target image using the following formula:
[0086]
[0087] in, P i is the probability value of the ith part category, N is the total number of part categories, v i is the predicted value of the i-th part category (belongs to the i-th part category, or does not belong to the i-th part category); based on the probability value of each part category of each target image, the predicted value of each part category is output.
[0088] Exemplarily, the classifier 1008 uses an RNN to obtain the final image features of the extracted target image, and copies the final image features according to the number of part categories before inputting them into the attention network. For example, when there are 33 part categories, the final image features are copied 33 times. Then, the attention network is used to capture the dependencies between each part category (such as the digestive tract part category) and output 33 category features. 33 fully connected operations are used to decode the category features respectively, and 33 category prediction values of the target image are output. The specific method is as follows: each fully connected operation in the last fully connected layer of each classifier contains 2 neurons, and the final 2 results are the distribution probabilities P = [p1, p2], where p1 is the probability of classifying the target image into this part category, p2 is the probability of not classifying the target image into this part category, and p1 + p2 = 1. If p1 ≥ p2, it is determined that the target image is classified into this part category; when p1 < p2, it is determined that the target image is not classified into this part category. The present disclosure does not specifically define the specific number of part categories.
[0089] Figure 4 FIG. 4 is a schematic structural diagram of a part category recognition device 1000 implemented by the hardware of a processing system.
[0090] The part category recognition device 1000 may include corresponding modules for executing each or several steps in the above flowchart. Therefore, each step or several steps in the above flowchart may be executed by the corresponding modules, and the device may include one or more of these modules. The modules may be one or more hardware modules specifically configured to execute the corresponding steps, or implemented by a processor configured to execute the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented through a certain combination.
[0091] This hardware structure can be implemented using a bus architecture. The bus architecture may include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, a memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0092] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0093] Any process or method description in the flowchart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes other implementations, in which the functions may not be performed in the order shown or discussed, including performing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the present disclosure. The processor performs the various methods and processes described above. For example, the method implementation in the present disclosure can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods in any other appropriate manner (e.g., by means of firmware).
[0094] The logic and / or steps represented in the flowchart or otherwise described herein may be embodied in any readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions on an instruction execution system, apparatus, or device), or in combination with such instruction execution systems, apparatuses, or devices.
[0095] For the purposes of this specification, a "readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use with or in conjunction with an instruction execution system, device or apparatus. More specific examples of readable storage media (a non-exhaustive list) include the following: an electrical connection with one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), a fiber optic device, and a portable read-only memory (CDROM). In addition, the readable storage medium may even be paper or other suitable medium on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a memory.
[0096] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0097] A person skilled in the art may understand that all or part of the steps of implementing the above-mentioned implementation method may be completed by instructing related hardware through a program, and the program may be stored in a readable storage medium, which, when executed, includes one or a combination of the steps of the implementation method.
[0098] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a readable storage medium. The storage medium may be a read-only memory, a disk or an optical disk, etc.
[0099] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes any one of the above-mentioned part category recognition methods.
[0100] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the execution instructions are used to implement any of the above-mentioned methods for identifying part categories.
[0101] Figure 5 A model schematic diagram of a part category recognition device 1000 according to an embodiment of the present disclosure is shown. The first feature extraction layer of the model is used to learn the image information of N consecutive frames, and the obtained intermediate representation vector is flattened into one dimension and then enters the second R shared local connection layers. The obtained image compression intermediate representation enters the third RNN layer to obtain feature integration and addition to obtain the final part label sequence (the category label of each image may include one or more part category information).
[0102] Figure 6 A schematic structural diagram of a local connection layer according to an embodiment of the present disclosure is shown.
[0103] According to yet another aspect of the present disclosure, an inspection quality monitoring system based on part category recognition is provided.
[0104] Figure 7 A schematic structural block diagram of the inspection quality monitoring system based on part category recognition disclosed in the present invention is shown.
[0105] refer to Figure 7 The inspection quality monitoring system 10 based on part category recognition includes a client 100, wherein the client 100 includes a video processing module, wherein the video processing module receives video data from an endoscope device, and divides the video data into multiple video segments according to a preset time length, and extracts multiple target images from each video segment, wherein the multiple target images are continuous frame images; the client 100 also includes a part category recognition device, wherein the part category recognition device performs part category recognition on multiple target images of each video segment to obtain a part category recognition result of each target image of each video segment; the client 100 also includes an inspection quality analysis module, wherein the inspection quality analysis module receives the part category recognition result of each target image of each video segment from the part category recognition device, and displays it in real time through a display device (such as a computer display screen), wherein the inspection quality analysis module counts the cumulative display time length of each category of parts in the part category recognition result of each target image of each video segment; and the client 100 also includes a result summary report generation module, wherein the result summary report generation module generates a result summary report based on the cumulative display time length of the category parts counted by the inspection quality analysis module.
[0106] The video processing module receives video data from an endoscope device (e.g., a digestive tract endoscope device), divides the video segments into fixed time segments, extracts the segmented videos to obtain frame image data, and specifically extracts video frames from the video data, wherein the video frames are extracted at a certain time interval, and the present disclosure does not specifically limit the specific time interval. For example, a 5-minute native detection video is divided into 1-minute time segments, and a total of 5 video segments are obtained. Each video segment is extracted at a time interval of 200ms, and a total of 5 groups of 300 video frame images (i.e., continuous frame images) are obtained.
[0107] The inspection quality monitoring system 10 based on part category recognition of the above-mentioned embodiment also includes a server side 200, wherein the server side 200 includes a data processing module, and the data processing module includes a preprocessing module. The preprocessing module receives the multiple target images of each video segment from the video processing module of the client, and preprocesses the multiple target images (scaling and cropping processing, random horizontal flipping processing, standardization processing, etc.), and the part category recognition device performs part category recognition on the preprocessed multiple target images of each video segment.
[0108] Among them, the image preprocessing operations performed by the preprocessing module include one or more of the following: scaling and cropping, random horizontal flipping, and standardization. Scaling and cropping are used to process the input image into a fixed size. Standardization refers to subtracting the statistical mean of the corresponding dimension of the data from the RGB dimension of the image to eliminate the common part and highlight the characteristics and differences between individuals. Random horizontal flipping is used to perform data enhancement to improve the generalization ability of the model.
[0109] The present disclosure does not limit the values of image scaling and cropping. For example, the size of different input images is scaled to 640*640*3, then cropped to 384*384*3, the black redundant parts of the four corners of the image are cut off, and finally the data is normalized to obtain the final input image features (such as the image representation vector (P) described above).
[0110] For the inspection quality monitoring system 10 based on part category recognition of each of the above-mentioned embodiments, the data processing module includes a labeling module, which labels each target image of each video clip with a part category, and obtains a plurality of target images of labeled part categories for each video clip, for use in training the part category recognition device.
[0111] Specifically, the labeling module labels the part category information of each image and obtains the label sequence of all target images in each video.
[0112] For the inspection quality monitoring system 10 based on part category recognition of each of the above embodiments, the preprocessing module vectorizes a plurality of target images extracted from the endoscope device to obtain an image representation vector (P) of each target image.
[0113] For the inspection quality monitoring system 10 based on part category recognition of each of the above-mentioned embodiments, the server side also includes a training module, which trains the part category recognition device (model) based on multiple target images of labeled part categories in each video clip to obtain a trained part category recognition device (model).
[0114] The training module trains the part category recognition device (model) and saves the part category recognition device (model). The client can obtain the trained part category recognition device (model).
[0115] The part category recognition device (model) can be trained using a gradient descent algorithm, and the following loss function can be used during training:
[0116] ;
[0117] Where M represents the number of images in a video clip, N represents the total number of categories of endoscopic images (such as gastroscopy images), Indicates the label value of the jth category of the i-th picture, Represents the predicted output of the jth category of the i-th image.
[0118] Optionally, during the training process, the batch size is set to 64, the initial learning rate is 0.00001, the threshold is 2 seconds, and the Adam optimizer is used. In other embodiments, the corresponding hyperparameters during model training may also be different, and the batch size and the initial learning rate may also be other values. The present disclosure does not specifically limit the values of each parameter in the training process.
[0119] The client may be arranged on a computer device, and the server may be arranged on a server.
[0120] For the inspection quality monitoring system 10 based on part category recognition in each of the above-mentioned embodiments, preferably, the inspection quality monitoring system 10 is the part category recognition device 1000 described above.
[0121] The test data set can be used to test the part category recognition device of the inspection quality monitoring system 10 disclosed in the present invention, including using the prediction results (i.e., recognition results) to calculate the MAP index and the F1 index. F1 is the equally weighted harmonic mean (F1-Score) of precision and recall, which is used to evaluate the recognition accuracy of the part category recognition device.
[0122] Table 1 shows the comparison results of the part category recognition device (model) disclosed in the present invention with the single-image multi-layer Transformer model and the single-image RNN model in the prior art in terms of three indicators: MAP, F1, and image recognition time.
[0123] Table 1
[0124]
[0125] As can be seen from Table 1, the part category recognition device disclosed in the present invention has a certain degree of improvement in accuracy (MAP improvement is about 3%, F1-Score improvement is 3%) compared to the single image classification model in the prior art (classification model that does not consider the sequence of image frames), which effectively solves the problem that the single image input model in the prior art cannot predict the classification of images in the video. By combining sequence information to capture the relationship between the part labels of adjacent frames of the video, the part category recognition device (model) disclosed in the present invention obtains better part recognition performance. At the same time, the part category recognition device disclosed in the present invention has a certain degree of improvement in MAP and F1-Score performance compared to the model that uses RNN for sequence labeling, and the time spent is also reduced. It can be seen from the experimental results shown in Table 1 that the part category recognition device (model) disclosed in the present invention is significantly superior to the traditional RNN model in terms of classification performance and classification efficiency.
[0126] The inspection quality analysis module of the inspection quality monitoring system 10 of the present disclosure displays the real-time results of the part category recognition device to the user through the display device, and calculates the time accumulation of the currently observed part (displayed part) according to the recognition results of the part category recognition at all moments before the current time, and the formula is as follows:
[0127] T=n*m
[0128] Assume that part p is detected n times, with an interval of m milliseconds between each two frames, and T is the cumulative observation time of part p.
[0129] The part categories whose cumulative observation time (cumulative display time) is greater than the threshold Threshold and the part categories whose cumulative observation time is less than the threshold Threshold are judged respectively. The parts whose cumulative observation time is greater than the threshold are recorded as observed parts, and the parts whose cumulative observation time is less than the threshold are recorded as unobserved parts. Figure 8 As shown, the middle shows the current endoscopic image and its predicted label results, the left side shows the unrecognized parts, the right side shows the recognized parts, and the progress bar below shows the completion rate of the current recognition process. By displaying the recognition completion status of each part, it can assist the doctor's inspection work.
[0130] The result summary report generation module of the inspection quality monitoring system 10 of the present disclosure generates a result summary report based on the cumulative display time length of the category parts counted by the inspection quality analysis module and displays it through a display device, such as Fig. 9 As shown, the inspection report displays the name of each digestive tract part, the corresponding image, and the corresponding observation time, and the missed inspection parts are displayed below.
[0131] The inspection quality monitoring system 10 disclosed in the present invention can assist doctors in performing standardized operations, and remind doctors in real time of the parts that have been inspected and the parts that have not been inspected, so as to avoid missing the parts to be observed.
[0132] The part category recognition method and inspection quality monitoring system disclosed in the present invention solve the problem that the traditional single-image input model cannot well predict the image classification in the video. By combining sequence information to capture the relationship between the part labels of adjacent frame images in the video, better part recognition performance is obtained than the existing single-image classification method. It can monitor the parts during the endoscopic (gastroscopy) inspection in real time and help doctors avoid missing the inspection parts.
[0133] The part category recognition device (Multi-LC-RNN model) disclosed in the present invention first uses a local connection network (LC) to perform multiple different compressions on the image representation, then passes through multiple small RNNs (with very small parameters), and finally integrates the results of multiple RNNs. Since multiple LC networks and small RNN networks can be run in parallel, the calculation time of the part category recognition method (device) disclosed in the present invention is greatly improved compared to the traditional RNN model. Furthermore, at the same time, the part category recognition method based on the integrated addition described above can further improve the accuracy of classification.
[0134] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A method for identifying part categories, characterized in that: include: Vectorizing a plurality of target images extracted from an endoscope device to obtain an image representation vector for each target image, wherein the plurality of target images are continuous frame images; Performing feature extraction on the image representation vector of each target image to obtain a feature representation vector of each target image having a first preset dimension; Performing dimension compression on the feature representation vector of each target image having a first preset dimension to obtain an image compressed intermediate representation vector of each target image having a second preset dimension; Acquire a final image feature of each target image based on an image compressed intermediate representation vector having a second preset dimension of each target image; as well as Based on the final image features of all target images and the pre-acquired dependencies between the various part categories, the predicted values of the various part categories of each target image are generated.
2. The part category recognition method according to claim 1, characterized in that: Performing feature extraction on the image representation vector of each target image to obtain a feature representation vector of each target image having a first preset dimension includes: The VIT network is used to perform feature extraction on the image representation vector of each target image to obtain a feature representation vector with a first preset dimension for each target image.
3. The part category recognition method according to claim 1, characterized in that: Dimensionally compressing the feature representation vector of each target image having a first preset dimension to obtain an image compressed intermediate representation vector of each target image having a second preset dimension, comprising: Slicing the feature representation vector of each target image with a first preset dimension to obtain a first preset number of feature representation sub-vectors, compressing the feature representation sub-vector of each target image to obtain a first preset number of feature compression vectors of each target image; and The feature compression vectors of each target image are concatenated to obtain an image compression intermediate representation vector having a second preset dimension, where the second preset dimension is smaller than the first preset dimension.
4. The part category recognition method according to claim 1, characterized in that: Obtaining a final image feature of each target image based on an image compression intermediate representation vector having a second preset dimension of each target image, including: The final image features of each target image are obtained using an RNN network based on the image compression intermediate representation vector of each target image.
5. The part category recognition method according to claim 1, characterized in that: The dependency relationship between the part categories is obtained based on at least a plurality of target images with marked part categories extracted from the endoscope device, wherein the plurality of target images with marked part categories are continuous frame images.
6. The part category recognition method according to claim 5, characterized in that: Obtaining the dependency relationship between the part categories based on at least a plurality of target images of the part categories that have been labeled extracted from the endoscope device, comprising: Vectorizing a plurality of target images of labeled part categories to obtain an image representation vector of each target image of labeled part category, wherein the plurality of target images of labeled part categories are continuous frame images; Performing feature extraction on the image representation vector of each target image of the labeled part category to obtain a feature representation vector having a first preset dimension for each target image of the labeled part category; Slicing the feature representation vector of each target image of the labeled part category to obtain a first preset number of feature representation sub-vectors, compressing the feature representation sub-vectors of each target image of the labeled part category to obtain a first preset number of feature compression vectors of each target image of the labeled part category; splicing the feature compression vectors of the target image of each labeled part category to obtain an image compression intermediate representation vector having a second preset dimension, where the second preset dimension is smaller than the first preset dimension; Obtaining final image features of the target image of each labeled part category based on an image compression intermediate representation vector of the target image of each labeled part category; The final image features of the target images of each labeled part category are integrated and added to obtain integrated addition features; Copying the integrated additive feature into a second preset number of copies, where the second preset number of copies is equal to the total number of part categories; and The dependency relationship between the part categories is obtained based on the integrated addition features of the second preset number and the part categories of the target images with the part categories marked.
7. An inspection quality monitoring system based on the part category recognition method according to any one of claims 1 to 6, characterized in that: The method comprises a client, wherein the client comprises a video processing module, wherein the video processing module receives video data from an endoscope device, divides the video data into a plurality of video segments according to a preset time length, and extracts a plurality of target images from each video segment, wherein the plurality of target images are continuous frame images; The client further comprises a part category recognition device, which performs part category recognition on a plurality of target images of each video clip to obtain a part category recognition result of each target image of each video clip; The client also includes an inspection quality analysis module, which receives the part category recognition results of each target image of each video clip from the part category recognition device and displays them in real time through a display device, and the inspection quality analysis module counts the cumulative display time length of each category of parts in the part category recognition results of each target image of each video clip; as well as The client further comprises a result summary report generating module, which generates a result summary report based on the cumulative display time length of the category parts counted by the inspection quality analysis module.
8. The inspection quality monitoring system according to claim 7, characterized in that: It also includes a server side, which includes a data processing module, and the data processing module includes a preprocessing module. The preprocessing module receives the multiple target images of each video segment from the video processing module of the client, and preprocesses the multiple target images. The part category recognition device performs part category recognition on the preprocessed multiple target images of each video segment.
9. The inspection quality monitoring system according to claim 8, characterized in that: The data processing module includes a labeling module, which labels each target image of each video clip with a part category to obtain a plurality of target images of each video clip with a labeled part category for use in training the part category recognition device.
10. The inspection quality monitoring system according to claim 8, characterized in that: The preprocessing module vectorizes a plurality of target images extracted from the endoscope device to obtain an image representation vector for each target image.
Citation Information
Patent Citations
Gastroscope-operation real-time auxiliary system and method based on deep learning
CN107967946A
Method for outputting gastrointestinal endoscopy operation information, equipment for outputting gastrointestinal endoscopy operation information, and storage medium
CN110613417A
Prediction model construction method, prediction method and device based on medical image
CN110838108A
Real-time colonoscope polyp detection device based on deep learning
CN112686856A
Gastroscope picture multi-label classification system based on VIT network
CN113096131A
