WO2021151276A1 - Oct image-based image recognition method and apparatus, and device and storage medium - Google Patents

Oct image-based image recognition method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2021151276A1
WO2021151276A1 PCT/CN2020/098976 CN2020098976W WO2021151276A1 WO 2021151276 A1 WO2021151276 A1 WO 2021151276A1 CN 2020098976 W CN2020098976 W CN 2020098976W WO 2021151276 A1 WO2021151276 A1 WO 2021151276A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
generator
feature vector
value
discriminator
Prior art date
Application number
PCT/CN2020/098976
Other languages
French (fr)
Chinese (zh)
Inventor
张成奋
吕彬
吕传峰
谢国彤
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021151276A1 publication Critical patent/WO2021151276A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to an image recognition method, device, equipment and storage medium based on OCT images.
  • OCT Optical Coherence Tomography
  • OCT optical Coherence Tomography
  • the basic principle of weak coherence light interferometer to detect the back of the incident weak coherence light at different depth levels of biological tissues.
  • the two-dimensional or three-dimensional structure image of the biological tissue can be obtained, that is, the OCT image.
  • Due to the particularity of OCT images it is usually necessary to use specific instruments to identify whether the information reflected in the corresponding OCT images is abnormal. Not only the accuracy of image recognition is low, but the recognition efficiency of image results is not high, and with the rapid development of neural networks, More and more neural networks are also applied to intelligently identify whether OCT images are abnormal.
  • the main purpose of this application is to provide an image recognition method, device, equipment and storage medium based on OCT images, aiming to improve the accuracy of identifying and judging whether the information reflected in the OCT image is abnormal.
  • an image recognition method based on OCT images provided in this application is applied to computer equipment, and the method includes:
  • the first processing step input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image
  • a feature vector calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector
  • the corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
  • the second processing step based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator.
  • the parameter of the first loss function value update generator obtains the target generator;
  • the third processing step respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
  • Recognition step receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  • the present application also provides an image recognition device based on OCT images, the device including:
  • Acquisition module used to acquire OCT images of non-abnormal areas as sample images to construct a generative confrontation network including generators and discriminators;
  • the first processing module used to input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain a first image, and perform high-level feature encoding on the first image Obtain the first feature vector, calculate the similarity value between each first feature vector and each second feature vector in the preset storage table, use the second feature vector corresponding to the maximum similarity value as the target feature vector, and set the target The first feature vector corresponding to the feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator The output result of the device;
  • the second processing module is used to adjust the parameters of the generator by minimizing the first loss function value of the generator based on the output result, and when the first loss function value is less than the first preset threshold, Update the parameters of the generator by using the first loss function value to obtain the target generator;
  • the third processing module is used to input the sample image and its corresponding analog image into the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value,
  • the second loss function value of the discriminator is minimized to adjust the parameters of the discriminator, and when the second loss function value is less than the first preset threshold value, the second loss function value is used to update the
  • the parameters of the discriminator obtain the target discriminator, and the target generator and the target discriminator are alternately iterated to train the generative confrontation network until the training is completed;
  • Recognition module used to receive the image to be recognized uploaded by the client and input the trained generative countermeasure network to obtain a simulated image, and use the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  • the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes the computer program when the computer program is executed. The following steps:
  • the first processing step input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image
  • a feature vector calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector
  • the corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
  • the second processing step based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator.
  • the parameter of the first loss function value update generator obtains the target generator;
  • the third processing step respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
  • Recognition step receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is executed by a processor to implement the following steps:
  • the first processing step input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image
  • a feature vector calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector
  • the corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
  • the second processing step based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator.
  • the parameter of the first loss function value update generator obtains the target generator;
  • the third processing step respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
  • Recognition step receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  • This application constructs a generative countermeasure network by acquiring OCT images without abnormal regions as sample images, and trains the generator and discriminator of the generative countermeasure network to obtain the target discriminator and target generator, and discriminate the target generator and target
  • the generator performs alternate iterations to train the generative confrontation network until the training is completed, obtains the image to be recognized uploaded by the client and enters the generative confrontation network to obtain a simulated image, and uses the first algorithm to calculate the abnormal score between the simulated image and the image to be recognized.
  • the abnormal score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image containing an abnormal area.
  • This application can improve the accuracy of identifying and judging whether the information reflected in the OCT image is abnormal.
  • Figure 1 is an application environment diagram of a preferred embodiment of the computer equipment of this application
  • FIG. 2 is a schematic diagram of modules of an image recognition device based on OCT images
  • FIG. 3 is a schematic flowchart of a preferred embodiment of an image recognition method based on OCT images according to the present application.
  • This application provides a computer device 1.
  • the computer device 1 includes, but is not limited to, a memory 11, a processor 12, and a network interface 13.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the computer device 1 in some embodiments, for example, a hard disk of the computer device 1. In other embodiments, the memory 11 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SD) equipped on the computer device 1. ) Card, Flash Card, etc.
  • the memory 11 may also include both an internal storage unit of the computer device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the computer device 1, such as the code of the image recognition program 10 based on the OCT image, etc., but also to temporarily store data that has been output or will be output.
  • the processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip, for running program codes or processing stored in the memory 11 Data, for example, the image recognition program 10 based on the OCT image is executed.
  • CPU central processing unit
  • controller microcontroller
  • microprocessor or other data processing chip
  • the network interface 13 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is usually used to establish a communication connection between the computer device 1 and other electronic devices.
  • a standard wired interface and a wireless interface such as a WI-FI interface
  • the client can be a desktop computer, notebook, tablet computer, mobile phone, etc.
  • the network may be the Internet, a cloud network, a wireless fidelity (Wi-Fi) network, a personal network (PAN), a local area network (LAN), and/or a metropolitan area network (MAN).
  • Wi-Fi wireless fidelity
  • PAN personal network
  • LAN local area network
  • MAN metropolitan area network
  • Various devices in the network environment can be configured to connect to the communication network according to various wired and wireless communication protocols.
  • wired and wireless communication protocols may include, but are not limited to, at least one of the following: Transmission Control Protocol and Internet Protocol (TCP/IP), User Datagram Protocol (UDP), Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, Optical Fidelity (Li-Fi), 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communication, wireless access point (AP), device-to-device communication, cellular communication Protocol and/or Bluetooth (BlueTooth) communication protocol or a combination thereof.
  • TCP/IP Transmission Control Protocol and Internet Protocol
  • UDP User Datagram Protocol
  • HTTP Hypertext Transfer Protocol
  • FTP File Transfer Protocol
  • ZigBee ZigBee
  • EDGE EDGE
  • the computer device 1 may also include a user interface.
  • the user interface may include a display (Display) and an input unit such as a keyboard (Keyboard).
  • the optional user interface may also include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
  • the display may also be called a display screen or a display unit, which is used to display the information processed in the computer device 1 and to display a visualized user interface.
  • FIG. 1 only shows a computer device 1 with components 11-13 and an image recognition program 10 based on OCT images.
  • FIG. 1 does not constitute a limitation on the computer device 1. It may include fewer or more components than shown, or a combination of some components, or a different component arrangement.
  • the first processing step input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image
  • a feature vector calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector
  • the corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
  • the second processing step based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator.
  • the parameter of the first loss function value update generator obtains the target generator;
  • the third processing step respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the second loss function value of the discriminator to a target adjustment parameter of the discriminator, and when the second loss function value is less than the first preset threshold, update the discriminator with the second loss function value To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
  • Recognition step receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  • the program further executes the following steps:
  • the target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
  • w i represents the extraction weight of the target feature vector
  • exp represents the exponential operation symbol with e as the base
  • d represents the similarity value between the first feature vector and the second feature vector
  • z represents the first feature vector of the first image
  • m represents the first feature vector
  • m j represents the second feature vector
  • j represents the total number of second feature vectors in the preset storage table.
  • the program further executes the following steps:
  • the first predetermined number is greater than the second predetermined number
  • the second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result
  • the pixel area corresponding to the data greater than or equal to the third preset threshold is used as the target area.
  • FIG. 2 it is a functional block diagram of an image recognition device 100 based on OCT images of this application.
  • the OCT image-based image recognition apparatus 100 described in this application can be installed in a computer device. According to the realized function.
  • the module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of a computer device and can complete fixed functions, and are stored in the memory of the computer device.
  • the OCT image-based image recognition device 100 includes an acquisition module 110, a first processing module 120, a second processing module 130, a third processing module 140, and an identification module 150.
  • the acquisition module 110 is used to acquire an OCT image of a non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator.
  • Generative Adversarial Networks is a deep learning model.
  • the model generates fairly good output through the mutual game learning of (at least) two modules in the framework: Generative Model and Discriminative Model, also known as generator G and discriminator D.
  • the discriminator For example, take an analog image generated by a generator and input it into the discriminator.
  • the discriminator initiates a vote based on the input analog image to determine the authenticity of the input analog image.
  • the generator generates a simulated image input from a real image and trains itself to fool the discriminator into thinking that the simulated images it generates are real. Therefore, the goal of training the discriminator is to maximize the images from the real data distribution and minimize the images that are not from the real data distribution.
  • the simulated OCT image that is closest to the sample image similarity can be generated through the generative countermeasure network, and the simulated OCT image generated by the generative countermeasure network can be used to intelligently identify whether the image to be recognized is abnormal (that is, whether it contains Area of suspected lesion).
  • the first processing module 120 is configured to input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain a first image, and perform high-level features on the first image
  • the first feature vector is obtained by encoding, the similarity value between each first feature vector and each second feature vector in the preset storage table is calculated, the second feature vector corresponding to the maximum similarity value is used as the target feature vector, and the The first feature vector corresponding to the target feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the The output of the generator.
  • first input multiple sample images into the generator and use a convolutional layer with a step size of 2 for each
  • the sample image is down-sampled multiple times to obtain a low-resolution first image
  • the first image is subjected to high-level feature encoding to obtain the corresponding first feature vector
  • each first feature vector is respectively compared with each of the preset storage tables
  • the preset second feature vector performs similarity value calculation to obtain the corresponding similarity value.
  • a large number of randomly generated image feature vectors are pre-stored in the preset storage table, and the second feature corresponding to the highest similarity value is selected by continuously calculating the similarity value with the sample image in the process of training the generator
  • the vector is stored in the preset storage table. Since the sample image is an OCT image that does not contain an abnormal area, that is, a normal image, the second feature vector selected has the characteristics of a normal image, that is, the second feature vector in the preset storage table They are all feature vectors of normal images.
  • the second feature vector obtained from each training of the generator will optimize the preset storage table, so that the second feature vector in the preset storage table is richer and closer to the normal image.
  • the similarity value calculation method may adopt the cosine similarity algorithm. After the cosine similarity algorithm is used to calculate the similarity value corresponding to each first eigenvector and the second eigenvector, the second eigenvector corresponding to the largest similarity value is queried As the target feature vector, a transposed convolutional layer with a step size of 2 is used to upsample the target feature vector multiple times until the input resolution is restored for image reconstruction, and a high-resolution analog image is generated as the output result of the generator.
  • each preset second feature vector in the preset storage table is close to the feature vector of the normal image, no matter whether the image to be recognized in the input generator is abnormal or not, the simulated image output by the generator does not contain abnormal areas Normal image, but no matter how close the feature vector of the image to be recognized is to the normal image feature in the preset storage table, there is always a big difference from the feature vector of the normal image. Under normal circumstances, only when the If the image is a normal image, the simulated image output by the generator will be less different from the image to be recognized. Therefore, using this point, it is possible to determine whether the image to be recognized is abnormal by calculating the abnormal score between the simulated image and the image to be recognized.
  • the abnormal image containing the abnormal area (that is, the suspected lesion area) of the partial input generator is compared with the simulated image obtained by the complex feature vector combination and the image to be recognized. Obviously, it affects the recognition accuracy of this solution. Therefore, the second feature vector corresponding to the one with the largest query similarity value as the target feature vector includes:
  • the target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
  • w i represents the extraction weight of the target feature vector
  • exp represents the exponential operation symbol with e as the base
  • d represents the similarity value between the first feature vector and the second feature vector
  • z represents the first feature vector of the first image
  • m represents the first feature vector
  • m j represents the second feature vector
  • j represents the total number of second feature vectors in the preset storage table.
  • the second processing module 130 is configured to adjust the parameters of the generator with a goal of minimizing the first loss function value of the generator based on the output result, when the first loss function value is less than a first preset threshold , Using the first loss function value to update the parameters of the generator to obtain the target generator.
  • the first loss function value of the generator is minimized to adjust the parameters of the generator, when the generator When the first loss function value of is less than the first preset threshold value, the parameter of the generator is updated with the first loss function value to obtain the target generator.
  • the calculation formula of the first loss function value is:
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z.
  • the calculation formula of the first loss function value may also be:
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z
  • represents the value of the variable.
  • the value of the first loss function is The calculation formula can also be:
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z
  • represents the variable value
  • w represents the extraction weight of the target feature vector.
  • the third processing module 140 is configured to input the sample image and its corresponding analog image into the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value , To minimize the second loss function value of the discriminator to adjust the parameters of the discriminator, when the second loss function value is less than the first preset threshold, use the second loss function value to update the The parameters of the discriminator obtain a target discriminator, and the target generator and the target discriminator are alternately iterated to train the generative confrontation network until the training is completed.
  • the sample image and its corresponding analog image are respectively input to the discriminator to obtain the first probability value and the second probability value, based on the first probability value and the second probability value, to minimize the second loss of the discriminator
  • the function value is the target to adjust the parameters of the discriminator.
  • the second loss function value of the discriminator is less than the first preset threshold, the second loss function value is used to update the parameters of the discriminator to obtain the target discriminator.
  • the discriminator performs alternate iterations to train the generative adversarial network until the training is completed.
  • the method of alternating iteratively on the target generator and target discriminator is to minimize the objective function.
  • the generator G and the discriminator D are interactively iterated respectively. When the generator G is fixed, the discriminator D is optimized, and when the discriminator D is fixed, it is optimized Generator G until the process converges.
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z.
  • the recognition module 150 is configured to receive the image to be recognized uploaded by the client and input the trained generative countermeasure network to obtain a simulated image, and use the first algorithm to calculate the abnormal score between the simulated image and the image to be recognized, when When the abnormal score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  • the computer device 1 After completing the training of the generative countermeasure network, the computer device 1 inputs the image to be recognized and uploaded to the client into the generative countermeasure network to obtain a simulated image, and uses a predetermined first algorithm to calculate the distance between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be identified is an abnormal image containing an abnormal area.
  • the first algorithm is:
  • represents the variable value
  • R(x) represents the pixel residual of the simulated image and the image to be recognized
  • D(x) represents the high-dimensional spatial residual of the discriminator encoding.
  • the program in order to be able to identify the location of the abnormal area (that is, the suspected lesion area) in the OCT image containing the abnormal area, the program also executes a target detection module for:
  • a preset number for example, 30
  • the feature maps with the first preset number of activity peaks suppress the feature maps with the first preset number of activity peaks, enhance the feature maps with the second preset number of activity peaks, and adjust all the feature maps to a uniform size (for example, A quarter of the image to be recognized) and then add up to obtain a salient feature map, the first preset number is greater than the second preset number;
  • the second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result
  • the pixel area corresponding to data greater than or equal to the third preset threshold is used as the target area, and the second algorithm is:
  • x represents the image to be recognized
  • G(x) represents the generator
  • this application also provides an image recognition method based on OCT images.
  • FIG. 3 is a schematic diagram of the method flow of an embodiment of an OCT image-based image recognition method of this application.
  • the processor 12 of the computer device 1 executes the image recognition program 10 based on the OCT image stored in the memory 11 to implement the following steps of the image recognition method based on the OCT image:
  • S110 Obtain an OCT image of a non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator.
  • Generative Adversarial Networks is a deep learning model.
  • the model generates very good output through the mutual game learning of (at least) two modules in the framework: Generative Model and Discriminative Model, also known as generator G and discriminator D.
  • the discriminator For example, take an analog image generated by a generator and input it into the discriminator.
  • the discriminator initiates a vote based on the input analog image to determine the authenticity of the input analog image.
  • the generator generates a simulated image input from a real image and trains itself to fool the discriminator into thinking that the simulated images it generates are real. Therefore, the goal of training the discriminator is to maximize the images from the real data distribution and minimize the images that are not from the real data distribution.
  • the simulated OCT image that is closest to the sample image similarity can be generated through the generative countermeasure network, and the simulated OCT image generated by the generative countermeasure network can be used to intelligently identify whether the image to be recognized is abnormal (that is, whether it contains Area of suspected lesion).
  • first input multiple sample images into the generator and use a convolutional layer with a step size of 2 for each
  • the sample image is down-sampled multiple times to obtain a low-resolution first image
  • the first image is subjected to high-level feature encoding to obtain the corresponding first feature vector
  • each first feature vector is respectively compared with each of the preset storage tables
  • the preset second feature vector performs similarity value calculation to obtain the corresponding similarity value.
  • a large number of randomly generated image feature vectors are pre-stored in the preset storage table, and the second feature corresponding to the highest similarity value is selected by continuously calculating the similarity value with the sample image in the process of training the generator
  • the vector is stored in the preset storage table. Since the sample image is an OCT image that does not contain an abnormal area, that is, a normal image, the second feature vector selected has the characteristics of a normal image, that is, the second feature vector in the preset storage table They are all feature vectors of normal images.
  • the second feature vector obtained from each training of the generator will optimize the preset storage table, so that the second feature vector in the preset storage table is richer and closer to the normal image.
  • the similarity value calculation method may adopt the cosine similarity algorithm. After the cosine similarity algorithm is used to calculate the similarity value corresponding to each first eigenvector and the second eigenvector, the second eigenvector corresponding to the largest similarity value is queried As the target feature vector, a transposed convolutional layer with a step size of 2 is used to upsample the target feature vector multiple times until the input resolution is restored for image reconstruction, and a high-resolution analog image is generated as the output result of the generator.
  • each preset second feature vector in the preset storage table is close to the feature vector of the normal image, no matter whether the image to be recognized in the input generator is abnormal or not, the simulated image output by the generator does not contain abnormal areas Normal image, but no matter how close the feature vector of the image to be recognized is to the normal image feature in the preset storage table, there is always a big difference from the feature vector of the normal image. Under normal circumstances, only when the If the image is a normal image, the simulated image output by the generator will be less different from the image to be recognized. Therefore, using this point, it is possible to determine whether the image to be recognized is abnormal by calculating the abnormal score between the simulated image and the image to be recognized.
  • the abnormal image containing the abnormal area (that is, the suspected lesion area) of the partial input generator is compared with the simulated image obtained by the complex feature vector combination and the image to be recognized. Obviously, it affects the recognition accuracy of this solution. Therefore, the second feature vector corresponding to the one with the largest query similarity value as the target feature vector includes:
  • the target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
  • w i represents the extraction weight of the target feature vector
  • exp represents the exponential operation symbol with e as the base
  • d represents the similarity value between the first feature vector and the second feature vector
  • z represents the first feature vector of the first image
  • m represents the first feature vector
  • m j represents the second feature vector
  • j represents the total number of second feature vectors in the preset storage table.
  • the first loss function value of the generator is minimized to adjust the parameters of the generator, when the generator When the first loss function value of is less than the first preset threshold value, the parameter of the generator is updated with the first loss function value to obtain the target generator.
  • the calculation formula of the first loss function value is:
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z.
  • the calculation formula of the first loss function value may also be:
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z
  • represents the value of the variable.
  • the value of the first loss function is The calculation formula can also be:
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z
  • represents the variable value
  • w represents the extraction weight of the target feature vector.
  • S140 respectively input the sample image and its corresponding analog image to the discriminator to obtain corresponding first probability value and second probability value, based on the first probability value and the second probability value, to minimize the
  • the second loss function value of the discriminator is the parameter of the target adjustment discriminator.
  • the second loss function value is used to update the parameters of the discriminator to obtain A target discriminator, which alternately iterates the target generator and the target discriminator to train the generative confrontation network until the training is completed.
  • the sample image and its corresponding analog image are respectively input to the discriminator to obtain the first probability value and the second probability value, based on the first probability value and the second probability value, to minimize the second loss of the discriminator
  • the function value is the target to adjust the parameters of the discriminator.
  • the second loss function value of the discriminator is less than the first preset threshold, the second loss function value is used to update the parameters of the discriminator to obtain the target discriminator.
  • the discriminator performs alternate iterations to train the generative adversarial network until the training is completed.
  • the method of alternating iteratively on the target generator and target discriminator is to minimize the objective function.
  • the generator G and the discriminator D are interactively iterated respectively. When the generator G is fixed, the discriminator D is optimized, and when the discriminator D is fixed, it is optimized Generator G until the process converges.
  • x represents the sample image
  • E(x) represents the convolutional layer in the discriminator
  • G(x) represents the generator
  • E(G(x)) represents the convolutional layer in the generator
  • represents the weight coefficient
  • represents The correlation between E(G(x)) and z.
  • S150 Receive an image to be recognized uploaded by the client and input the trained generative countermeasure network to obtain a simulated image, and calculate an abnormal score between the simulated image and the image to be recognized by using the first algorithm.
  • the abnormal score is When the value is greater than the second preset threshold, it is determined that the image to be identified is an abnormal image including an abnormal area.
  • the computer device 1 After completing the training of the generative countermeasure network, the computer device 1 inputs the image to be recognized and uploaded to the client into the generative countermeasure network to obtain a simulated image, and uses a predetermined first algorithm to calculate the distance between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be identified is an abnormal image containing an abnormal area.
  • the first algorithm is:
  • represents the variable value
  • R(x) represents the pixel residual of the simulated image and the image to be recognized
  • D(x) represents the high-dimensional spatial residual of the discriminator encoding.
  • the method further includes a target detection step:
  • a preset number for example, 30
  • the feature maps with the first preset number of activity peaks suppress the feature maps with the first preset number of activity peaks, enhance the feature maps with the second preset number of activity peaks, and adjust all the feature maps to a uniform size (for example, A quarter of the image to be recognized) and then add up to obtain a salient feature map, the first preset number is greater than the second preset number;
  • the second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result
  • the pixel area corresponding to data greater than or equal to the third preset threshold is used as the target area, and the second algorithm is:
  • x represents the image to be recognized
  • G(x) represents the generator
  • the embodiment of the present application also proposes a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium may be a hard disk, a multimedia card, or an SD card. , Flash memory card, SMC, read only memory (ROM), erasable programmable read only memory (EPROM), portable compact disk read only memory (CD-ROM), USB memory, etc. any one or more of them random combination.
  • the computer-readable storage medium includes an image recognition program 10 based on OCT images.
  • the specific implementation of the computer-readable storage medium of this application is substantially the same as the above-mentioned OCT image-based image recognition method and the specific implementation of the computer device 1, here No longer.
  • this embodiment of the technology of the present application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM) as described above.
  • a storage medium such as ROM
  • /RAM, magnetic disk, optical disk includes several instructions to make a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

An OCT image-based image recognition method, relating to the field of artificial intelligence, the method comprising: acquiring OCT images not containing an abnormal region to serve as sample images to construct a generative adversarial network, training a generator and a discriminator of the generative adversarial network respectively to obtain a target discriminator and a target generator, alternately iterating the target generator and the target discriminator to train the generative adversarial network until training is complete, acquiring an image to be recognized uploaded by a client and input same into the completely trained generative adversarial network to obtain a simulated image, using a first algorithm to calculate an abnormality score between the simulated image and the image to be recognized, and when the abnormality score is greater than a second pre-set threshold, determining the image to be recognized to be an abnormal image containing an abnormal region. The present method is able to improve the accuracy of recognizing whether the information reflected in an OCT image is abnormal.

Description

基于OCT图像的图像识别方法、装置、设备及存储介质Image recognition method, device, equipment and storage medium based on OCT image
本申请要求于2020年5月20日提交中国专利局、申请号为CN202010431416.4,发明名称为“基于OCT图像的图像识别方法、服务器及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 20, 2020, the application number is CN202010431416.4, and the invention title is "Image recognition method, server and storage medium based on OCT images", and its entire contents Incorporated in this application by reference.
技术领域Technical field
本申请涉及人工智能技术领域,尤其涉及一种基于OCT图像的图像识别方法、装置、设备及存储介质。This application relates to the field of artificial intelligence technology, and in particular to an image recognition method, device, equipment and storage medium based on OCT images.
背景技术Background technique
OCT(光学相干层析技术,Optical Coherence tomography)是近十年迅速发展起来的一种成像技术,它利用弱相干光干涉仪的基本原理,检测生物组织不同深度层面对入射弱相干光的背向反射或几次散射信号,通过扫描,可得到生物组织二维或三维结构图像,即OCT图像。由于OCT图像的特殊性,通常需要人为借助特定仪器识别对应的OCT图像中反映的信息是否为异常,不仅图像识别准确率低,且图像结果识别效率不高,而随着神经网络的迅速发展,越来越多的神经网络也被应用到智能识别OCT图像是否异常的场景中。OCT (Optical Coherence Tomography) is an imaging technology that has developed rapidly in the past ten years. It uses the basic principle of weak coherence light interferometer to detect the back of the incident weak coherence light at different depth levels of biological tissues. By scanning the reflected or scattered signals, the two-dimensional or three-dimensional structure image of the biological tissue can be obtained, that is, the OCT image. Due to the particularity of OCT images, it is usually necessary to use specific instruments to identify whether the information reflected in the corresponding OCT images is abnormal. Not only the accuracy of image recognition is low, but the recognition efficiency of image results is not high, and with the rapid development of neural networks, More and more neural networks are also applied to intelligently identify whether OCT images are abnormal.
由于现有的大多数神经网络在训练过程中需要用到大量的异常OCT图像(即包含疑似病灶区域的图像)样本,而在实际中,由于异常OCT图像涉及病人的隐私问题无法像正常OCT图像那样容易得到,导致了现有的神经网络运用在医学领域中存在很多困难,发明人意识到即使通过少量的异常OCT图像训练得到的识别模型也存在识别准确率低的问题。Since most of the existing neural networks need to use a large number of abnormal OCT images (that is, images containing suspected lesion areas) samples in the training process, in practice, because abnormal OCT images involve patient privacy issues, they cannot be like normal OCT images. Such easy availability has caused many difficulties in the application of existing neural networks in the medical field. The inventor realized that even a recognition model obtained by training a small amount of abnormal OCT images has the problem of low recognition accuracy.
发明内容Summary of the invention
本申请的主要目的在于提供一种基于OCT图像的图像识别方法、装置、设备及存储介质,旨在如何提高识别判断OCT图像中反映的信息是否异常的准确性。The main purpose of this application is to provide an image recognition method, device, equipment and storage medium based on OCT images, aiming to improve the accuracy of identifying and judging whether the information reflected in the OCT image is abnormal.
为实现上述目的,本申请提供的一种基于OCT图像的图像识别方法,应用于计算机设备,该方法包括:In order to achieve the foregoing objectives, an image recognition method based on OCT images provided in this application is applied to computer equipment, and the method includes:
获取步骤:获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络;Obtaining steps: Obtain the OCT image of the non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator;
第一处理步骤:将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing step: input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image A feature vector, calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector The corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
第二处理步骤:基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing step: based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator. The parameter of the first loss function value update generator obtains the target generator;
第三处理步骤:分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing step: respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
识别步骤:接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到 模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition step: receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
为了解决上述问题,本申请还提供一种基于OCT图像的图像识别装置,所述装置包括:In order to solve the above-mentioned problems, the present application also provides an image recognition device based on OCT images, the device including:
获取模块:用于获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络;Acquisition module: used to acquire OCT images of non-abnormal areas as sample images to construct a generative confrontation network including generators and discriminators;
第一处理模块:用于将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing module: used to input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain a first image, and perform high-level feature encoding on the first image Obtain the first feature vector, calculate the similarity value between each first feature vector and each second feature vector in the preset storage table, use the second feature vector corresponding to the maximum similarity value as the target feature vector, and set the target The first feature vector corresponding to the feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator The output result of the device;
第二处理模块:用于基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing module is used to adjust the parameters of the generator by minimizing the first loss function value of the generator based on the output result, and when the first loss function value is less than the first preset threshold, Update the parameters of the generator by using the first loss function value to obtain the target generator;
第三处理模块:用于分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing module is used to input the sample image and its corresponding analog image into the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, The second loss function value of the discriminator is minimized to adjust the parameters of the discriminator, and when the second loss function value is less than the first preset threshold value, the second loss function value is used to update the The parameters of the discriminator obtain the target discriminator, and the target generator and the target discriminator are alternately iterated to train the generative confrontation network until the training is completed; and
识别模块:用于接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition module: used to receive the image to be recognized uploaded by the client and input the trained generative countermeasure network to obtain a simulated image, and use the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
为实现上述目的,本申请还提供一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下步骤:In order to achieve the above object, the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes the computer program when the computer program is executed. The following steps:
第一处理步骤:将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing step: input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image A feature vector, calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector The corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
第二处理步骤:基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing step: based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator. The parameter of the first loss function value update generator obtains the target generator;
第三处理步骤:分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing step: respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
识别步骤:接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition step: receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:To achieve the foregoing objective, the present application also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is executed by a processor to implement the following steps:
第一处理步骤:将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图 像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing step: input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image A feature vector, calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector The corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
第二处理步骤:基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing step: based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator. The parameter of the first loss function value update generator obtains the target generator;
第三处理步骤:分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing step: respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
识别步骤:接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition step: receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
本申请通过获取不含异常区域的OCT图像作为样本图像构建生成式对抗网络,分别对生成式对抗网络的生成器与鉴别器进行训练得到目标鉴别器及目标生成器,对目标生成器和目标鉴别器进行交替迭代以对生成式对抗网络进行训练,直至训练完成,获取客户端上传的待识别图像输入生成式对抗网络得到模拟图像,利用第一算法计算模拟图像与待识别图像之间的异常分值,当异常分值大于第二预设阈值时,则判断待识别图像为包含异常区域的异常图像。本申请能够提高识别判断OCT图像中反映的信息是否异常的准确性。This application constructs a generative countermeasure network by acquiring OCT images without abnormal regions as sample images, and trains the generator and discriminator of the generative countermeasure network to obtain the target discriminator and target generator, and discriminate the target generator and target The generator performs alternate iterations to train the generative confrontation network until the training is completed, obtains the image to be recognized uploaded by the client and enters the generative confrontation network to obtain a simulated image, and uses the first algorithm to calculate the abnormal score between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image containing an abnormal area. This application can improve the accuracy of identifying and judging whether the information reflected in the OCT image is abnormal.
附图说明Description of the drawings
图1为本申请计算机设备较佳实施例的应用环境图;Figure 1 is an application environment diagram of a preferred embodiment of the computer equipment of this application;
图2为基于OCT图像的图像识别装置的模块示意图;2 is a schematic diagram of modules of an image recognition device based on OCT images;
图3为本申请基于OCT图像的图像识别方法较佳实施例的流程示意图。FIG. 3 is a schematic flowchart of a preferred embodiment of an image recognition method based on OCT images according to the present application.
本申请目的的实现、功能特点及优点将结合实施例,参附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术本实施例及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technology, and advantages of the present application clearer and more comprehensible, the following further describes the present application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术本实施例可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术本实施例的结合出现相互矛盾或无法实现时应当认为这种技术本实施例的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions related to "first", "second", etc. in this application are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features . Therefore, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technology between the various embodiments in this embodiment can be combined with each other, but it must be based on what can be realized by a person of ordinary skill in the art. When the combination of the technology in this embodiment is contradictory or cannot be realized, it should be considered that this technology is essential. The combination of the embodiments does not exist, nor does it fall within the scope of protection claimed by this application.
本申请提供一种计算机设备1。This application provides a computer device 1.
所述计算机设备1包括,但不仅限于,存储器11、处理器12及网络接口13。The computer device 1 includes, but is not limited to, a memory 11, a processor 12, and a network interface 13.
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是计算机设备1的内部存储单元,例如该计算机设备1的硬 盘。存储器11在另一些实施例中也可以是计算机设备1的外部存储设备,例如该计算机设备1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like. The memory 11 may be an internal storage unit of the computer device 1 in some embodiments, for example, a hard disk of the computer device 1. In other embodiments, the memory 11 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SD) equipped on the computer device 1. ) Card, Flash Card, etc.
进一步地,存储器11还可以既包括计算机设备1的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于计算机设备1的应用软件及各类数据,例如基于OCT图像的图像识别程序10的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Further, the memory 11 may also include both an internal storage unit of the computer device 1 and an external storage device. The memory 11 can be used not only to store application software and various data installed in the computer device 1, such as the code of the image recognition program 10 based on the OCT image, etc., but also to temporarily store data that has been output or will be output.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行基于OCT图像的图像识别程序10等。In some embodiments, the processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip, for running program codes or processing stored in the memory 11 Data, for example, the image recognition program 10 based on the OCT image is executed.
网络接口13可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该计算机设备1与其他电子设备之间建立通信连接。The network interface 13 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is usually used to establish a communication connection between the computer device 1 and other electronic devices.
客户端可以是桌上型计算机、笔记本、平板电脑、手机等。The client can be a desktop computer, notebook, tablet computer, mobile phone, etc.
网络可以为互联网、云网络、无线保真(Wi-Fi)网络、个人网(PAN)、局域网(LAN)和/或城域网(MAN)。网络环境中的各种设备可以被配置为根据各种有线和无线通信协议连接到通信网络。这样的有线和无线通信协议的例子可以包括但不限于以下中的至少一个:传输控制协议和互联网协议(TCP/IP)、用户数据报协议(UDP)、超文本传输协议(HTTP)、文件传输协议(FTP)、ZigBee、EDGE、IEEE 802.11、光保真(Li-Fi)、802.16、IEEE 802.11s、IEEE 802.11g、多跳通信、无线接入点(AP)、设备对设备通信、蜂窝通信协议和/或蓝牙(BlueTooth)通信协议或其组合。The network may be the Internet, a cloud network, a wireless fidelity (Wi-Fi) network, a personal network (PAN), a local area network (LAN), and/or a metropolitan area network (MAN). Various devices in the network environment can be configured to connect to the communication network according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of the following: Transmission Control Protocol and Internet Protocol (TCP/IP), User Datagram Protocol (UDP), Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, Optical Fidelity (Li-Fi), 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communication, wireless access point (AP), device-to-device communication, cellular communication Protocol and/or Bluetooth (BlueTooth) communication protocol or a combination thereof.
可选地,该计算机设备1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以称为显示屏或显示单元,用于显示在计算机设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the computer device 1 may also include a user interface. The user interface may include a display (Display) and an input unit such as a keyboard (Keyboard). The optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be called a display screen or a display unit, which is used to display the information processed in the computer device 1 and to display a visualized user interface.
图1仅示出了具有组件11-13以及基于OCT图像的图像识别程序10的计算机设备1,本领域技术人员可以理解的是,图1示出的结构并不构成对计算机设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 1 only shows a computer device 1 with components 11-13 and an image recognition program 10 based on OCT images. Those skilled in the art can understand that the structure shown in FIG. 1 does not constitute a limitation on the computer device 1. It may include fewer or more components than shown, or a combination of some components, or a different component arrangement.
在本实施例中,图1的基于OCT图像的图像识别程序10被处理器12执行时,实现以下步骤:In this embodiment, when the OCT image-based image recognition program 10 of FIG. 1 is executed by the processor 12, the following steps are implemented:
获取步骤:获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络;Obtaining steps: Obtain the OCT image of the non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator;
第一处理步骤:将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing step: input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image A feature vector, calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector The corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
第二处理步骤:基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing step: based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator. The parameter of the first loss function value update generator obtains the target generator;
第三处理步骤:分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时, 利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing step: respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the second loss function value of the discriminator to a target adjustment parameter of the discriminator, and when the second loss function value is less than the first preset threshold, update the discriminator with the second loss function value To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
识别步骤:接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition step: receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
在另一实施例中,该程序还执行以下步骤:In another embodiment, the program further executes the following steps:
将所述目标特征向量与第一特征向量输入权重计算公式得出数值在预设数值区间(例如0-0.1)的第一结果数据,所述提取权重计算公式为:The target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
Figure PCTCN2020098976-appb-000001
Figure PCTCN2020098976-appb-000001
其中,w i表示目标特征向量的提取权重,exp表示以e为底数的指数运算符号,d表示第一特征向量与第二特征向量的相似度值,z表示第一图像的第一特征向量,m表示第一特征向量,m j表示第二特征向量,j表示预设存储表中第二特征向量的总数。 Among them, w i represents the extraction weight of the target feature vector, exp represents the exponential operation symbol with e as the base, d represents the similarity value between the first feature vector and the second feature vector, z represents the first feature vector of the first image, m represents the first feature vector, m j represents the second feature vector, and j represents the total number of second feature vectors in the preset storage table.
在另一实施例中,该程序还执行以下步骤:In another embodiment, the program further executes the following steps:
对所述待识别图像做高斯降采样得到第二图像;Performing Gaussian down-sampling on the image to be recognized to obtain a second image;
对所述第二图像中大于Maximum/10的像素点做归一化,其中Maximum表示不同预设尺度的第二图像的亮度最大值;Normalize the pixels larger than Maximum/10 in the second image, where Maximum represents the maximum brightness of the second image with different preset scales;
构建九个尺度下的亮度高斯金字塔,利用Gabor滤波器构建四个方向,分别为θ{0°,45°,90°,135°}的方向高斯金字塔,得到亮度和方向高斯金字塔后,分别计算亮度和方向高斯金字塔对应的特征图,其中,亮度特征图为:I(c,s)=|I(c)-I(s)|,方向特征图为:O(c,s,θ)=|O(c,θ)-O(s,θ)|,c、s表示尺度参数,θ表示角度参数,c∈{2,3,4},s=c+δ,δ∈{3,4};Construct brightness Gaussian pyramids at nine scales, use Gabor filters to construct four directions, θ{0°, 45°, 90°, 135°} direction Gaussian pyramids, and calculate the brightness and direction Gaussian pyramids separately The feature map corresponding to the brightness and direction Gaussian pyramid, where the brightness feature map is: I(c,s)=|I(c)-I(s)|, and the direction feature map is: O(c,s,θ)= |O(c,θ)-O(s,θ)|, c, s represent scale parameters, θ represents angle parameters, c∈{2,3,4}, s=c+δ,δ∈{3,4 };
获取预设数量的特征图,抑制存在第一预设数量活动峰的特征图,增强存在第二预设数量活动峰的特征图,将所有特征图调整至统一尺寸后相加得到显著特征图,所述第一预设数量大于第二预设数量;及Obtain a preset number of feature maps, suppress the feature maps with the first preset number of activity peaks, enhance the feature maps with the second preset number of activity peaks, adjust all the feature maps to a uniform size and add them to obtain a salient feature map, The first predetermined number is greater than the second predetermined number; and
利用第二算法分别计算所述待识别图像中每一个像素的异常概率值,分别将所述异常概率值与显著性特征图进行矩阵内积得到对应的第二结果数据,将所述第二结果数据大于或等于第三预设阈值对应的像素区域作为所述目标区域。The second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result The pixel area corresponding to the data greater than or equal to the third preset threshold is used as the target area.
关于上述步骤的详细介绍,请参照下述图2关于基于OCT图像的图像识别装置的模块示意图及图3关于基于OCT图像的图像识别方法实施例的方法流程示意图的说明。For a detailed description of the above steps, please refer to the following description of the schematic diagram of the module of the image recognition device based on OCT image in FIG. 2 and the schematic diagram of the method flow of the embodiment of the image recognition method based on OCT image in FIG. 3.
参照图2所示,为本申请基于OCT图像的图像识别装置100的功能模块图。Referring to FIG. 2, it is a functional block diagram of an image recognition device 100 based on OCT images of this application.
本申请所述基于OCT图像的图像识别装置100可以安装于计算机设备中。根据实现的功能。本发所述模块也可以称之为单元,是指一种能够被计算机设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在计算机设备的存储器中。The OCT image-based image recognition apparatus 100 described in this application can be installed in a computer device. According to the realized function. The module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of a computer device and can complete fixed functions, and are stored in the memory of the computer device.
在本实施例中,所述基于OCT图像的图像识别装置100包括获取模块110、第一处理模块120、第二处理模块130、第三处理模块140及识别模块150。In this embodiment, the OCT image-based image recognition device 100 includes an acquisition module 110, a first processing module 120, a second processing module 130, a third processing module 140, and an identification module 150.
获取模块110,用于获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络。The acquisition module 110 is used to acquire an OCT image of a non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator.
在本实施例中,通过获取大量不包含异常区域的OCT图像作为样本图像,构建生成式对抗网络。In this embodiment, by acquiring a large number of OCT images that do not contain abnormal regions as sample images, a generative confrontation network is constructed.
其中,生成式对抗网络(GAN,Generative Adversarial Networks)是一种深度学习模型。模型通过框架中(至少)两个模块:生成模型(Generative Model)和判别模型(Discriminative Model)的互相博弈学习产生相当好的输出,也称生成器G和鉴别器D。Among them, Generative Adversarial Networks (GAN, Generative Adversarial Networks) is a deep learning model. The model generates fairly good output through the mutual game learning of (at least) two modules in the framework: Generative Model and Discriminative Model, also known as generator G and discriminator D.
例如,取一个生成器生成的模拟图像输入鉴别器,鉴别器根据输入的模拟图像发起投 票来判断该输入模拟图像的真实程度,一般来说,鉴别器输出的数值越接近于0表示输入的模拟图像越真实,而输出的数值越接近1表示输入的模拟图像越虚假。生成器从一个真实图像中生成一个模拟图像输入并训练自己骗过鉴别器,使之认为其生成的模拟图像都是真实的。因此训练鉴别器的目标是使鉴别器最大化来自真实数据分布的图像,并最小化不是来自真实数据分布的图像。For example, take an analog image generated by a generator and input it into the discriminator. The discriminator initiates a vote based on the input analog image to determine the authenticity of the input analog image. Generally speaking, the closer the value of the discriminator output is to 0, the simulation of the input The more real the image, and the closer the output value is to 1, the more false the input simulated image. The generator generates a simulated image input from a real image and trains itself to fool the discriminator into thinking that the simulated images it generates are real. Therefore, the goal of training the discriminator is to maximize the images from the real data distribution and minimize the images that are not from the real data distribution.
因此,在本实施例中,通过生成式对抗网络能够生成与样本图像相似度最接近的模拟OCT图像,为后续利用生成式对抗网络生成的模拟OCT图像智能识别待识别图像是否异常(即是否包含疑似病灶的区域)。Therefore, in this embodiment, the simulated OCT image that is closest to the sample image similarity can be generated through the generative countermeasure network, and the simulated OCT image generated by the generative countermeasure network can be used to intelligently identify whether the image to be recognized is abnormal (that is, whether it contains Area of suspected lesion).
第一处理模块120,用于将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果。The first processing module 120 is configured to input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain a first image, and perform high-level features on the first image The first feature vector is obtained by encoding, the similarity value between each first feature vector and each second feature vector in the preset storage table is calculated, the second feature vector corresponding to the maximum similarity value is used as the target feature vector, and the The first feature vector corresponding to the target feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the The output of the generator.
为了训练生成器能够生成与待识别图像相似度最高的模拟图像,因此,在本实施例中,首先将多个样本图像分别输入生成器中,采用步长为2的卷积层分别对每个样本图像进行多次下采样得到低分辨率的第一图像,并将第一图像进行高阶特征编码得到对应的第一特征向量,将每个第一特征向量分别与预设存储表中每个预设的第二特征向量进行相似度值计算得到对应的相似度值。In order to train the generator to generate the analog image with the highest similarity to the image to be recognized, in this embodiment, first input multiple sample images into the generator, and use a convolutional layer with a step size of 2 for each The sample image is down-sampled multiple times to obtain a low-resolution first image, and the first image is subjected to high-level feature encoding to obtain the corresponding first feature vector, and each first feature vector is respectively compared with each of the preset storage tables The preset second feature vector performs similarity value calculation to obtain the corresponding similarity value.
其中,所述预设存储表中预先存储有大量随机生成的图像特征向量,通过在训练生成器的过程中不断与样本图像进行相似度值计算,筛选出相似度值最大者对应的第二特征向量存入预设存储表中,由于样本图像是不包含异常区域的OCT图像,即正常图像,因此筛选出的第二特征向量具有正常图像的特征,即预设存储表中的第二特征向量均为正常图像的特征向量。Wherein, a large number of randomly generated image feature vectors are pre-stored in the preset storage table, and the second feature corresponding to the highest similarity value is selected by continuously calculating the similarity value with the sample image in the process of training the generator The vector is stored in the preset storage table. Since the sample image is an OCT image that does not contain an abnormal area, that is, a normal image, the second feature vector selected has the characteristics of a normal image, that is, the second feature vector in the preset storage table They are all feature vectors of normal images.
对生成器的每一次训练得到的第二特征向量都将对预设存储表进行优化,使得预设存储表中的第二特征向量更丰富且更接近正常图像。The second feature vector obtained from each training of the generator will optimize the preset storage table, so that the second feature vector in the preset storage table is richer and closer to the normal image.
所述相似度值计算方法可采用余弦相似度算法,利用余弦相似度算法计算出各个第一特征向量与第二特征向量对应的相似度值后,查询相似度值最大者对应的第二特征向量作为目标特征向量,再采用步长为2的转置卷积层对目标特征向量进行多次上采样直至恢复输入分辨率进行图像重建,生成高分辨率的模拟图像作为生成器的输出结果。The similarity value calculation method may adopt the cosine similarity algorithm. After the cosine similarity algorithm is used to calculate the similarity value corresponding to each first eigenvector and the second eigenvector, the second eigenvector corresponding to the largest similarity value is queried As the target feature vector, a transposed convolutional layer with a step size of 2 is used to upsample the target feature vector multiple times until the input resolution is restored for image reconstruction, and a high-resolution analog image is generated as the output result of the generator.
由于预设存储表中的每个预设的第二特征向量均接近正常图像的特征向量,因此不管输入生成器中的待识别图像是否异常,生成器输出的模拟图像都是不包含异常区域的正常图像,但是不管待识别图像的特征向量与预设存储表中的正常图像特征多接近,始终是跟正常图像的特征向量存在较大的差异,正常情况下,只有当输入生成器的待识别图像为正常图像,生成器输出的模拟图像才会跟待识别图像差异较小。因此,利用这一点,能够为后续通过计算模拟图像与待识别图像之间的异常分值,判断待识别图像是否异常。Since each preset second feature vector in the preset storage table is close to the feature vector of the normal image, no matter whether the image to be recognized in the input generator is abnormal or not, the simulated image output by the generator does not contain abnormal areas Normal image, but no matter how close the feature vector of the image to be recognized is to the normal image feature in the preset storage table, there is always a big difference from the feature vector of the normal image. Under normal circumstances, only when the If the image is a normal image, the simulated image output by the generator will be less different from the image to be recognized. Therefore, using this point, it is possible to determine whether the image to be recognized is abnormal by calculating the abnormal score between the simulated image and the image to be recognized.
在另一实施例中,为了避免极端情况下,部分输入生成器的包含异常区域(即包含疑似病灶区域)的异常图像通过复杂的特征向量组合得到的模拟图像与待识别图像进行差异对比效果不明显,影响本方案的识别精度,因此,所述查询相似度值最大者对应的所述第二特征向量作为目标特征向量包括:In another embodiment, in order to avoid extreme situations, the abnormal image containing the abnormal area (that is, the suspected lesion area) of the partial input generator is compared with the simulated image obtained by the complex feature vector combination and the image to be recognized. Obviously, it affects the recognition accuracy of this solution. Therefore, the second feature vector corresponding to the one with the largest query similarity value as the target feature vector includes:
将所述目标特征向量与第一特征向量输入权重计算公式得出数值在预设数值区间(例如0-0.1)的第一结果数据,所述提取权重计算公式为:The target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
Figure PCTCN2020098976-appb-000002
Figure PCTCN2020098976-appb-000002
其中,w i表示目标特征向量的提取权重,exp表示以e为底数的指数运算符号,d表示第一特征向量与第二特征向量的相似度值,z表示第一图像的第一特征向量,m表示第一特征向量,m j表示第二特征向量,j表示预设存储表中第二特征向量的总数。 Among them, w i represents the extraction weight of the target feature vector, exp represents the exponential operation symbol with e as the base, d represents the similarity value between the first feature vector and the second feature vector, z represents the first feature vector of the first image, m represents the first feature vector, m j represents the second feature vector, and j represents the total number of second feature vectors in the preset storage table.
第二处理模块130,用于基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器。The second processing module 130 is configured to adjust the parameters of the generator with a goal of minimizing the first loss function value of the generator based on the output result, when the first loss function value is less than a first preset threshold , Using the first loss function value to update the parameters of the generator to obtain the target generator.
为提高生成器输出的模拟图像更加客观准确,因此,在本实施例中,根据获得的第一输出结果,以最小化生成器的第一损失函数值为目标调整生成器的参数,当生成器的第一损失函数值小于第一预设阈值时,利用第一损失函数值更新生成器的参数,得到目标生成器。In order to improve the simulation image output by the generator to be more objective and accurate, therefore, in this embodiment, according to the first output result obtained, the first loss function value of the generator is minimized to adjust the parameters of the generator, when the generator When the first loss function value of is less than the first preset threshold value, the parameter of the generator is updated with the first loss function value to obtain the target generator.
所述第一损失函数值的计算公式为:The calculation formula of the first loss function value is:
L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
为了使生成器只在输入不含异常区域的OCT图像时可以较好地重建,因此设计了残差损失使得不含异常区域的图像样本和其生成的模拟图像的相似度最大化,因此,在另一实施例中,所述第一损失函数值的计算公式还可以是:In order to enable the generator to reconstruct well only when the OCT image without abnormal areas is input, the residual loss is designed to maximize the similarity between the image sample without abnormal areas and the simulated image generated by it. Therefore, in In another embodiment, the calculation formula of the first loss function value may also be:
L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x-ρ[x-G(x)] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x- ρ [xG(x)]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度,μ表示变量值。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z, μ represents the value of the variable.
为了避免包含异常区域的异常图像也被很好地重建,通过约束预设存储表中特征向量的提取权重使其进一步稀疏化,因此,在另一实施例中,所述第一损失函数值的计算公式还可以是:In order to avoid that the abnormal image containing the abnormal area is also well reconstructed, the extraction weight of the feature vector in the preset storage table is constrained to make it further sparse. Therefore, in another embodiment, the value of the first loss function is The calculation formula can also be:
L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x-ρ[x-G(x)]+E w-ρ[-log(w)] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x- ρ [xG(x)]+E w-ρ [-log(w)]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度,μ表示变量值,w表示目标特征向量的提取权重。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z, μ represents the variable value, and w represents the extraction weight of the target feature vector.
第三处理模块140,用于分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练。The third processing module 140 is configured to input the sample image and its corresponding analog image into the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value , To minimize the second loss function value of the discriminator to adjust the parameters of the discriminator, when the second loss function value is less than the first preset threshold, use the second loss function value to update the The parameters of the discriminator obtain a target discriminator, and the target generator and the target discriminator are alternately iterated to train the generative confrontation network until the training is completed.
在本实施例中,分别将样本图像及其对应的模拟图像输入鉴别器得到第一概率值与第二概率值,基于第一概率值与第二概率值,以最小化鉴别器的第二损失函数值为目标调整鉴别器的参数,当鉴别器的第二损失函数值小于第一预设阈值时,利用第二损失函数值更新鉴别器的参数,得到目标鉴别器,对目标生成器和目标鉴别器进行交替迭代以对生成式对抗网络进行训练直至完成训练。In this embodiment, the sample image and its corresponding analog image are respectively input to the discriminator to obtain the first probability value and the second probability value, based on the first probability value and the second probability value, to minimize the second loss of the discriminator The function value is the target to adjust the parameters of the discriminator. When the second loss function value of the discriminator is less than the first preset threshold, the second loss function value is used to update the parameters of the discriminator to obtain the target discriminator. The discriminator performs alternate iterations to train the generative adversarial network until the training is completed.
对目标生成器和目标鉴别器进行交替迭代采用的方法为最大最小化目标函数,分别对生成器G和鉴别器D进行交互迭代,固定生成器G时优化鉴别器D,固定鉴别器D时优化生成器G,直到过程收敛。The method of alternating iteratively on the target generator and target discriminator is to minimize the objective function. The generator G and the discriminator D are interactively iterated respectively. When the generator G is fixed, the discriminator D is optimized, and when the discriminator D is fixed, it is optimized Generator G until the process converges.
所述第二损失函数值的计算公式为:The calculation formula of the second loss function value is:
L d=E x-ρ[log avg(E(G(x)))-αρ(z,E(G(x)))] L d =E x-ρ [log avg(E(G(x)))-αρ(z,E(G(x)))]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。加入的约束项使得判别网络在正确输出图像真假标签的同时具备了图像编码的能力,这使得本方案识别待识别图像正异常的准确率得到提升。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z. The added constraint items enable the discrimination network to have the ability of image coding while correctly outputting the true and false tags of the image, which improves the accuracy of the scheme for identifying the positive abnormality of the image to be recognized.
识别模块150,用于接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。The recognition module 150 is configured to receive the image to be recognized uploaded by the client and input the trained generative countermeasure network to obtain a simulated image, and use the first algorithm to calculate the abnormal score between the simulated image and the image to be recognized, when When the abnormal score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
在完成对生成式对抗网络的训练后,计算机设备1通过将获取到客户端上传的待识别图像输入生成式对抗网络得到模拟图像,利用预先确定的第一算法计算模拟图像与待识别图像之间的异常分值,当异常分值大于第二预设阈值时,则判断待识别图像为包含异常区域的异常图像。After completing the training of the generative countermeasure network, the computer device 1 inputs the image to be recognized and uploaded to the client into the generative countermeasure network to obtain a simulated image, and uses a predetermined first algorithm to calculate the distance between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be identified is an abnormal image containing an abnormal area.
所述第一算法为:The first algorithm is:
A(x)=(1-λ)R(x)+λD(x)A(x)=(1-λ)R(x)+λD(x)
其中,λ表示变量值,R(x)表示模拟图像与待识别图像的像素残差,D(x)表示鉴别器编码的高维空间残差。Among them, λ represents the variable value, R(x) represents the pixel residual of the simulated image and the image to be recognized, and D(x) represents the high-dimensional spatial residual of the discriminator encoding.
在另一实施例中,为了能够识别出包含异常区域的OCT图像中异常区域(即疑似病灶区域)的位置,因此,该程序还执行目标检测模块,用于:In another embodiment, in order to be able to identify the location of the abnormal area (that is, the suspected lesion area) in the OCT image containing the abnormal area, the program also executes a target detection module for:
对所述待识别图像做高斯降采样得到第二图像;Performing Gaussian down-sampling on the image to be recognized to obtain a second image;
对所述第二图像中大于Maximum/10的像素点做归一化,其中Maximum表示不同预设尺度的第二图像的亮度最大值;Normalize the pixels larger than Maximum/10 in the second image, where Maximum represents the maximum brightness of the second image with different preset scales;
构建九个尺度下的亮度高斯金字塔,利用Gabor滤波器构建四个方向,分别为θ{0°,45°,90°,135°}的方向高斯金字塔,得到亮度和方向高斯金字塔后,分别计算亮度和方向高斯金字塔对应的特征图,其中,亮度特征图为:I(c,s)=|I(c)-I(s)|,方向特征图为:O(c,s,θ)=|O(c,θ)-O(s,θ)|,c、s表示尺度参数,θ表示角度参数,c∈{2,3,4},s=c+δ,δ∈{3,4};Construct brightness Gaussian pyramids at nine scales, use Gabor filters to construct four directions, θ{0°, 45°, 90°, 135°} direction Gaussian pyramids, and calculate the brightness and direction Gaussian pyramids separately The feature map corresponding to the brightness and direction Gaussian pyramid, where the brightness feature map is: I(c,s)=|I(c)-I(s)|, and the direction feature map is: O(c,s,θ)= |O(c,θ)-O(s,θ)|, c, s represent scale parameters, θ represents angle parameters, c∈{2,3,4}, s=c+δ,δ∈{3,4 };
获取预设数量(例如30)的特征图,抑制存在第一预设数量活动峰的特征图,增强存在第二预设数量活动峰的特征图,将所有所述特征图调整至统一尺寸(例如待识别图像的四分之一)后相加得到显著特征图,所述第一预设数量大于第二预设数量;及Acquire a preset number (for example, 30) of feature maps, suppress the feature maps with the first preset number of activity peaks, enhance the feature maps with the second preset number of activity peaks, and adjust all the feature maps to a uniform size (for example, A quarter of the image to be recognized) and then add up to obtain a salient feature map, the first preset number is greater than the second preset number; and
利用第二算法分别计算所述待识别图像中每一个像素的异常概率值,分别将所述异常概率值与显著性特征图进行矩阵内积得到对应的第二结果数据,将所述第二结果数据大于或等于第三预设阈值对应的像素区域作为所述目标区域,所述第二算法为:The second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result The pixel area corresponding to data greater than or equal to the third preset threshold is used as the target area, and the second algorithm is:
B(x)=x-G(x)B(x)=x-G(x)B(x)=x-G(x) B(x)=x-G(x)
其中,x表示待识别图像,G(x)表示生成器。Among them, x represents the image to be recognized, and G(x) represents the generator.
此外,本申请还提供一种基于OCT图像的图像识别方法。参照图3所示,为本申请基于OCT图像的图像识别方法的实施例的方法流程示意图。计算机设备1的处理器12执行存储器11中存储的基于OCT图像的图像识别程序10时实现基于OCT图像的图像识别方法的如下步骤:In addition, this application also provides an image recognition method based on OCT images. Refer to FIG. 3, which is a schematic diagram of the method flow of an embodiment of an OCT image-based image recognition method of this application. The processor 12 of the computer device 1 executes the image recognition program 10 based on the OCT image stored in the memory 11 to implement the following steps of the image recognition method based on the OCT image:
S110,获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络。S110: Obtain an OCT image of a non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator.
在本实施例中,通过获取大量不包含异常区域的OCT图像作为样本图像,构建生成式对抗网络。In this embodiment, by acquiring a large number of OCT images that do not contain abnormal regions as sample images, a generative confrontation network is constructed.
其中,生成式对抗网络(GAN,Generative Adversarial Networks)是一种深度学习模型。模型通过框架中(至少)两个模块:生成模型(Generative Model)和判别模型 (Discriminative Model)的互相博弈学习产生相当好的输出,也称生成器G和鉴别器D。Among them, Generative Adversarial Networks (GAN, Generative Adversarial Networks) is a deep learning model. The model generates very good output through the mutual game learning of (at least) two modules in the framework: Generative Model and Discriminative Model, also known as generator G and discriminator D.
例如,取一个生成器生成的模拟图像输入鉴别器,鉴别器根据输入的模拟图像发起投票来判断该输入模拟图像的真实程度,一般来说,鉴别器输出的数值越接近于0表示输入的模拟图像越真实,而输出的数值越接近1表示输入的模拟图像越虚假。生成器从一个真实图像中生成一个模拟图像输入并训练自己骗过鉴别器,使之认为其生成的模拟图像都是真实的。因此训练鉴别器的目标是使鉴别器最大化来自真实数据分布的图像,并最小化不是来自真实数据分布的图像。For example, take an analog image generated by a generator and input it into the discriminator. The discriminator initiates a vote based on the input analog image to determine the authenticity of the input analog image. Generally speaking, the closer the value of the discriminator output is to 0, the simulation of the input The more real the image, and the closer the output value is to 1, the more false the input simulated image. The generator generates a simulated image input from a real image and trains itself to fool the discriminator into thinking that the simulated images it generates are real. Therefore, the goal of training the discriminator is to maximize the images from the real data distribution and minimize the images that are not from the real data distribution.
因此,在本实施例中,通过生成式对抗网络能够生成与样本图像相似度最接近的模拟OCT图像,为后续利用生成式对抗网络生成的模拟OCT图像智能识别待识别图像是否异常(即是否包含疑似病灶的区域)。Therefore, in this embodiment, the simulated OCT image that is closest to the sample image similarity can be generated through the generative countermeasure network, and the simulated OCT image generated by the generative countermeasure network can be used to intelligently identify whether the image to be recognized is abnormal (that is, whether it contains Area of suspected lesion).
S120,将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果。S120. Input the sample image to the generator, use the convolutional layer of the generator to down-sample each sample image to obtain a first image, and perform high-level feature encoding on the first image to obtain a first feature vector Calculate the similarity value between each first feature vector and each second feature vector in the preset storage table, use the second feature vector corresponding to the maximum similarity value as the target feature vector, and set the first feature vector corresponding to the target feature vector A feature vector is stored in the preset storage table as a second feature vector, and the target feature vector is up-sampled by using the transposed convolution layer of the generator to obtain a simulated image and used as the output result of the generator.
为了训练生成器能够生成与待识别图像相似度最高的模拟图像,因此,在本实施例中,首先将多个样本图像分别输入生成器中,采用步长为2的卷积层分别对每个样本图像进行多次下采样得到低分辨率的第一图像,并将第一图像进行高阶特征编码得到对应的第一特征向量,将每个第一特征向量分别与预设存储表中每个预设的第二特征向量进行相似度值计算得到对应的相似度值。In order to train the generator to generate the analog image with the highest similarity to the image to be recognized, in this embodiment, first input multiple sample images into the generator, and use a convolutional layer with a step size of 2 for each The sample image is down-sampled multiple times to obtain a low-resolution first image, and the first image is subjected to high-level feature encoding to obtain the corresponding first feature vector, and each first feature vector is respectively compared with each of the preset storage tables The preset second feature vector performs similarity value calculation to obtain the corresponding similarity value.
其中,所述预设存储表中预先存储有大量随机生成的图像特征向量,通过在训练生成器的过程中不断与样本图像进行相似度值计算,筛选出相似度值最大者对应的第二特征向量存入预设存储表中,由于样本图像是不包含异常区域的OCT图像,即正常图像,因此筛选出的第二特征向量具有正常图像的特征,即预设存储表中的第二特征向量均为正常图像的特征向量。Wherein, a large number of randomly generated image feature vectors are pre-stored in the preset storage table, and the second feature corresponding to the highest similarity value is selected by continuously calculating the similarity value with the sample image in the process of training the generator The vector is stored in the preset storage table. Since the sample image is an OCT image that does not contain an abnormal area, that is, a normal image, the second feature vector selected has the characteristics of a normal image, that is, the second feature vector in the preset storage table They are all feature vectors of normal images.
对生成器的每一次训练得到的第二特征向量都将对预设存储表进行优化,使得预设存储表中的第二特征向量更丰富且更接近正常图像。The second feature vector obtained from each training of the generator will optimize the preset storage table, so that the second feature vector in the preset storage table is richer and closer to the normal image.
所述相似度值计算方法可采用余弦相似度算法,利用余弦相似度算法计算出各个第一特征向量与第二特征向量对应的相似度值后,查询相似度值最大者对应的第二特征向量作为目标特征向量,再采用步长为2的转置卷积层对目标特征向量进行多次上采样直至恢复输入分辨率进行图像重建,生成高分辨率的模拟图像作为生成器的输出结果。The similarity value calculation method may adopt the cosine similarity algorithm. After the cosine similarity algorithm is used to calculate the similarity value corresponding to each first eigenvector and the second eigenvector, the second eigenvector corresponding to the largest similarity value is queried As the target feature vector, a transposed convolutional layer with a step size of 2 is used to upsample the target feature vector multiple times until the input resolution is restored for image reconstruction, and a high-resolution analog image is generated as the output result of the generator.
由于预设存储表中的每个预设的第二特征向量均接近正常图像的特征向量,因此不管输入生成器中的待识别图像是否异常,生成器输出的模拟图像都是不包含异常区域的正常图像,但是不管待识别图像的特征向量与预设存储表中的正常图像特征多接近,始终是跟正常图像的特征向量存在较大的差异,正常情况下,只有当输入生成器的待识别图像为正常图像,生成器输出的模拟图像才会跟待识别图像差异较小。因此,利用这一点,能够为后续通过计算模拟图像与待识别图像之间的异常分值,判断待识别图像是否异常。Since each preset second feature vector in the preset storage table is close to the feature vector of the normal image, no matter whether the image to be recognized in the input generator is abnormal or not, the simulated image output by the generator does not contain abnormal areas Normal image, but no matter how close the feature vector of the image to be recognized is to the normal image feature in the preset storage table, there is always a big difference from the feature vector of the normal image. Under normal circumstances, only when the If the image is a normal image, the simulated image output by the generator will be less different from the image to be recognized. Therefore, using this point, it is possible to determine whether the image to be recognized is abnormal by calculating the abnormal score between the simulated image and the image to be recognized.
在另一实施例中,为了避免极端情况下,部分输入生成器的包含异常区域(即包含疑似病灶区域)的异常图像通过复杂的特征向量组合得到的模拟图像与待识别图像进行差异对比效果不明显,影响本方案的识别精度,因此,所述查询相似度值最大者对应的所述第二特征向量作为目标特征向量包括:In another embodiment, in order to avoid extreme situations, the abnormal image containing the abnormal area (that is, the suspected lesion area) of the partial input generator is compared with the simulated image obtained by the complex feature vector combination and the image to be recognized. Obviously, it affects the recognition accuracy of this solution. Therefore, the second feature vector corresponding to the one with the largest query similarity value as the target feature vector includes:
将所述目标特征向量与第一特征向量输入权重计算公式得出数值在预设数值区间(例如0-0.1)的第一结果数据,所述提取权重计算公式为:The target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
Figure PCTCN2020098976-appb-000003
Figure PCTCN2020098976-appb-000003
其中,w i表示目标特征向量的提取权重,exp表示以e为底数的指数运算符号,d表示第一特征向量与第二特征向量的相似度值,z表示第一图像的第一特征向量,m表示第一特征向量,m j表示第二特征向量,j表示预设存储表中第二特征向量的总数。 Among them, w i represents the extraction weight of the target feature vector, exp represents the exponential operation symbol with e as the base, d represents the similarity value between the first feature vector and the second feature vector, z represents the first feature vector of the first image, m represents the first feature vector, m j represents the second feature vector, and j represents the total number of second feature vectors in the preset storage table.
S130,基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器。S130. Based on the output result, adjust the parameters of the generator with a goal of minimizing the first loss function value of the generator, and when the first loss function value is less than a first preset threshold, use the first loss function value The loss function value updates the parameters of the generator to obtain the target generator.
为提高生成器输出的模拟图像更加客观准确,因此,在本实施例中,根据获得的第一输出结果,以最小化生成器的第一损失函数值为目标调整生成器的参数,当生成器的第一损失函数值小于第一预设阈值时,利用第一损失函数值更新生成器的参数,得到目标生成器。In order to improve the simulation image output by the generator to be more objective and accurate, therefore, in this embodiment, according to the first output result obtained, the first loss function value of the generator is minimized to adjust the parameters of the generator, when the generator When the first loss function value of is less than the first preset threshold value, the parameter of the generator is updated with the first loss function value to obtain the target generator.
所述第一损失函数值的计算公式为:The calculation formula of the first loss function value is:
L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
为了使生成器只在输入不含异常区域的OCT图像时可以较好地重建,因此设计了残差损失使得不含异常区域的图像样本和其生成的模拟图像的相似度最大化,因此,在另一实施例中,所述第一损失函数值的计算公式还可以是:In order to enable the generator to reconstruct well only when the OCT image without abnormal areas is input, the residual loss is designed to maximize the similarity between the image sample without abnormal areas and the simulated image generated by it. Therefore, in In another embodiment, the calculation formula of the first loss function value may also be:
L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x-ρ[x-G(x)] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x- ρ [xG(x)]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度,μ表示变量值。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z, μ represents the value of the variable.
为了避免包含异常区域的异常图像也被很好地重建,通过约束预设存储表中特征向量的提取权重使其进一步稀疏化,因此,在另一实施例中,所述第一损失函数值的计算公式还可以是:In order to avoid that the abnormal image containing the abnormal area is also well reconstructed, the extraction weight of the feature vector in the preset storage table is constrained to make it further sparse. Therefore, in another embodiment, the value of the first loss function is The calculation formula can also be:
L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x-ρ[x-G(x)]+E w-ρ[-log(w)] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]+μE x- ρ [xG(x)]+E w-ρ [-log(w)]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度,μ表示变量值,w表示目标特征向量的提取权重。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z, μ represents the variable value, and w represents the extraction weight of the target feature vector.
S140,分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练。S140, respectively input the sample image and its corresponding analog image to the discriminator to obtain corresponding first probability value and second probability value, based on the first probability value and the second probability value, to minimize the The second loss function value of the discriminator is the parameter of the target adjustment discriminator. When the second loss function value is less than the first preset threshold, the second loss function value is used to update the parameters of the discriminator to obtain A target discriminator, which alternately iterates the target generator and the target discriminator to train the generative confrontation network until the training is completed.
在本实施例中,分别将样本图像及其对应的模拟图像输入鉴别器得到第一概率值与第二概率值,基于第一概率值与第二概率值,以最小化鉴别器的第二损失函数值为目标调整鉴别器的参数,当鉴别器的第二损失函数值小于第一预设阈值时,利用第二损失函数值更新鉴别器的参数,得到目标鉴别器,对目标生成器和目标鉴别器进行交替迭代以对生成式对抗网络进行训练直至完成训练。In this embodiment, the sample image and its corresponding analog image are respectively input to the discriminator to obtain the first probability value and the second probability value, based on the first probability value and the second probability value, to minimize the second loss of the discriminator The function value is the target to adjust the parameters of the discriminator. When the second loss function value of the discriminator is less than the first preset threshold, the second loss function value is used to update the parameters of the discriminator to obtain the target discriminator. The discriminator performs alternate iterations to train the generative adversarial network until the training is completed.
对目标生成器和目标鉴别器进行交替迭代采用的方法为最大最小化目标函数,分别对生成器G和鉴别器D进行交互迭代,固定生成器G时优化鉴别器D,固定鉴别器D时优化生成器G,直到过程收敛。The method of alternating iteratively on the target generator and target discriminator is to minimize the objective function. The generator G and the discriminator D are interactively iterated respectively. When the generator G is fixed, the discriminator D is optimized, and when the discriminator D is fixed, it is optimized Generator G until the process converges.
所述第二损失函数值的计算公式为:The calculation formula of the second loss function value is:
L d=E x-ρ[log avg(E(G(x)))-αρ(z,E(G(x)))] L d =E x-ρ [log avg(E(G(x)))-αρ(z,E(G(x)))]
其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。加入的约束项使得判别网络在正确输出图像真假标签的同时具备了图像编码的能力,这使得本方案识别待识别图像正异常的准确率得到提升。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z. The added constraint items enable the discrimination network to have the ability of image coding while correctly outputting the true and false tags of the image, which improves the accuracy of the scheme for identifying the positive abnormality of the image to be recognized.
S150,接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。S150. Receive an image to be recognized uploaded by the client and input the trained generative countermeasure network to obtain a simulated image, and calculate an abnormal score between the simulated image and the image to be recognized by using the first algorithm. When the abnormal score is When the value is greater than the second preset threshold, it is determined that the image to be identified is an abnormal image including an abnormal area.
在完成对生成式对抗网络的训练后,计算机设备1通过将获取到客户端上传的待识别图像输入生成式对抗网络得到模拟图像,利用预先确定的第一算法计算模拟图像与待识别图像之间的异常分值,当异常分值大于第二预设阈值时,则判断待识别图像为包含异常区域的异常图像。After completing the training of the generative countermeasure network, the computer device 1 inputs the image to be recognized and uploaded to the client into the generative countermeasure network to obtain a simulated image, and uses a predetermined first algorithm to calculate the distance between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be identified is an abnormal image containing an abnormal area.
所述第一算法为:The first algorithm is:
A(x)=(1-λ)R(x)+λD(x)A(x)=(1-λ)R(x)+λD(x)
其中,λ表示变量值,R(x)表示模拟图像与待识别图像的像素残差,D(x)表示鉴别器编码的高维空间残差。Among them, λ represents the variable value, R(x) represents the pixel residual of the simulated image and the image to be recognized, and D(x) represents the high-dimensional spatial residual of the discriminator encoding.
在另一实施例中,为了能够识别出包含异常区域的OCT图像中异常区域(即疑似病灶区域)的位置,因此,该方法还包括目标检测步骤:In another embodiment, in order to be able to identify the location of the abnormal area (that is, the suspected lesion area) in the OCT image containing the abnormal area, the method further includes a target detection step:
对所述待识别图像做高斯降采样得到第二图像;Performing Gaussian down-sampling on the image to be recognized to obtain a second image;
对所述第二图像中大于Maximum/10的像素点做归一化,其中Maximum表示不同预设尺度的第二图像的亮度最大值;Normalize the pixels larger than Maximum/10 in the second image, where Maximum represents the maximum brightness of the second image with different preset scales;
构建九个尺度下的亮度高斯金字塔,利用Gabor滤波器构建四个方向,分别为θ{0°,45°,90°,135°}的方向高斯金字塔,得到亮度和方向高斯金字塔后,分别计算亮度和方向高斯金字塔对应的特征图,其中,亮度特征图为:I(c,s)=|I(c)-I(s)|,方向特征图为:O(c,s,θ)=|O(c,θ)-O(s,θ)|,c、s表示尺度参数,θ表示角度参数,c∈{2,3,4},s=c+δ,δ∈{3,4};Construct brightness Gaussian pyramids at nine scales, use Gabor filters to construct four directions, θ{0°, 45°, 90°, 135°} direction Gaussian pyramids, and calculate the brightness and direction Gaussian pyramids separately The feature map corresponding to the brightness and direction Gaussian pyramid, where the brightness feature map is: I(c,s)=|I(c)-I(s)|, and the direction feature map is: O(c,s,θ)= |O(c,θ)-O(s,θ)|, c, s represent scale parameters, θ represents angle parameters, c∈{2,3,4}, s=c+δ,δ∈{3,4 };
获取预设数量(例如30)的特征图,抑制存在第一预设数量活动峰的特征图,增强存在第二预设数量活动峰的特征图,将所有所述特征图调整至统一尺寸(例如待识别图像的四分之一)后相加得到显著特征图,所述第一预设数量大于第二预设数量;及Acquire a preset number (for example, 30) of feature maps, suppress the feature maps with the first preset number of activity peaks, enhance the feature maps with the second preset number of activity peaks, and adjust all the feature maps to a uniform size (for example, A quarter of the image to be recognized) and then add up to obtain a salient feature map, the first preset number is greater than the second preset number; and
利用第二算法分别计算所述待识别图像中每一个像素的异常概率值,分别将所述异常概率值与显著性特征图进行矩阵内积得到对应的第二结果数据,将所述第二结果数据大于或等于第三预设阈值对应的像素区域作为所述目标区域,所述第二算法为:The second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result The pixel area corresponding to data greater than or equal to the third preset threshold is used as the target area, and the second algorithm is:
B(x)=x-G(x)B(x)=x-G(x)B(x)=x-G(x) B(x)=x-G(x)
其中,x表示待识别图像,G(x)表示生成器。Among them, x represents the image to be recognized, and G(x) represents the generator.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,计算机可读存储介质可以是硬盘、多媒体卡、SD卡、闪存卡、SMC、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器等中的任意一种或者几种的任意组合。计算机可读存储介质中包括基于OCT图像的图像识别程序10,本申请之计算机可读存储介质的具体实施方式与上述基于OCT图像的图像识别方法以及计算机设备1的具体实施方式大致相同,在此不再赘述。In addition, the embodiment of the present application also proposes a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile. The computer-readable storage medium may be a hard disk, a multimedia card, or an SD card. , Flash memory card, SMC, read only memory (ROM), erasable programmable read only memory (EPROM), portable compact disk read only memory (CD-ROM), USB memory, etc. any one or more of them random combination. The computer-readable storage medium includes an image recognition program 10 based on OCT images. The specific implementation of the computer-readable storage medium of this application is substantially the same as the above-mentioned OCT image-based image recognition method and the specific implementation of the computer device 1, here No longer.
需要说明的是,上述本申请实施例序日仅仅为了描述,不代表实施例的优劣。并且本 文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that the sequence date of the above examples of the present application is only for description, and does not represent the merits of the examples. And the terms "include", "include" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes those elements that are not explicitly included. The other elements listed may also include elements inherent to the process, device, article, or method. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, device, article, or method that includes the element.
上述本申请实施例序日仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术本实施例本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。The above sequence days of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, this embodiment of the technology of the present application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM) as described above. /RAM, magnetic disk, optical disk) includes several instructions to make a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the application, and do not limit the scope of the patent for this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of the application, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种基于OCT图像的图像识别方法,应用于计算机设备,其中,该方法包括:An image recognition method based on OCT images, applied to computer equipment, wherein the method includes:
    获取步骤:获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络;Obtaining steps: Obtain the OCT image of the non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator;
    第一处理步骤:将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing step: input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image A feature vector, calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector The corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
    第二处理步骤:基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing step: based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator. The parameter of the first loss function value update generator obtains the target generator;
    第三处理步骤:分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing step: respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
    识别步骤:接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition step: receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  2. 如权利要求1所述的基于OCT图像的图像识别方法,其中,所述将最大相似度值对应的所述第二特征向量作为目标特征向量包括:8. The image recognition method based on OCT images according to claim 1, wherein said using the second feature vector corresponding to the maximum similarity value as the target feature vector comprises:
    将所述目标特征向量与第一特征向量输入权重计算公式得出数值在预设数值区间(例如0-0.1)的第一结果数据,所述提取权重计算公式为:The target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
    Figure PCTCN2020098976-appb-100001
    Figure PCTCN2020098976-appb-100001
    其中,w i表示目标特征向量的提取权重,exp表示以e为底数的指数运算符号,d表示第一特征向量与第二特征向量的相似度值,z表示第一图像的第一特征向量,m表示第一特征向量,m j表示第二特征向量,j表示预设存储表中第二特征向量的总数。 Among them, w i represents the extraction weight of the target feature vector, exp represents the exponential operation symbol with e as the base, d represents the similarity value between the first feature vector and the second feature vector, z represents the first feature vector of the first image, m represents the first feature vector, m j represents the second feature vector, and j represents the total number of second feature vectors in the preset storage table.
  3. 如权利要求1所述的基于OCT图像的图像识别方法,其中,所述第一算法为:The image recognition method based on OCT images according to claim 1, wherein the first algorithm is:
    A(x)=(1-λ)R(x)+λD(x)A(x)=(1-λ)R(x)+λD(x)
    其中,λ表示变量值,R(x)表示模拟图像与待识别图像的像素残差,D(x)表示鉴别器编码的高维空间残差。Among them, λ represents the variable value, R(x) represents the pixel residual of the simulated image and the image to be recognized, and D(x) represents the high-dimensional spatial residual of the discriminator encoding.
  4. 如权利要求1所述的基于OCT图像的图像识别方法,其中,该方法还包括目标检测步骤:The image recognition method based on OCT images as claimed in claim 1, wherein the method further comprises a target detection step:
    对所述待识别图像做高斯降采样得到第二图像;Performing Gaussian down-sampling on the image to be recognized to obtain a second image;
    对所述第二图像中大于Maximum/10的像素点做归一化,其中Maximum表示不同预设尺度的第二图像的亮度最大值;Normalize the pixels larger than Maximum/10 in the second image, where Maximum represents the maximum brightness of the second image with different preset scales;
    构建九个尺度下的亮度高斯金字塔,利用Gabor滤波器构建四个方向,分别为θ{0°,45°,90°,135°}的方向高斯金字塔,得到亮度和方向高斯金字塔后,分别计算亮度和方向高斯金字塔对应的特征图,其中,亮度特征图为:I(c,s)=|I(c)-I(s)|,方向特征图为:O(c,s,θ)=|O(c,θ)-O(s,θ)|,c、s表示尺度参数,θ表示角度参数,c∈{2,3,4}, s=c+δ,δ∈{3,4};Construct brightness Gaussian pyramids at nine scales, use Gabor filters to construct four directions, θ{0°, 45°, 90°, 135°} direction Gaussian pyramids, and calculate the brightness and direction Gaussian pyramids separately The feature map corresponding to the brightness and direction Gaussian pyramid, where the brightness feature map is: I(c,s)=|I(c)-I(s)|, and the direction feature map is: O(c,s,θ)= |O(c,θ)-O(s,θ)|, c, s represent scale parameters, θ represents angle parameters, c∈{2,3,4}, s=c+δ,δ∈{3,4 };
    获取预设数量的特征图,抑制存在第一预设数量活动峰的特征图,增强存在第二预设数量活动峰的特征图,将所有特征图调整至统一尺寸后相加得到显著特征图,所述第一预设数量大于第二预设数量;及Obtain a preset number of feature maps, suppress the feature maps with the first preset number of activity peaks, enhance the feature maps with the second preset number of activity peaks, adjust all the feature maps to a uniform size and add them to obtain a salient feature map, The first predetermined number is greater than the second predetermined number; and
    利用第二算法分别计算所述待识别图像中每一个像素的异常概率值,分别将所述异常概率值与显著性特征图进行矩阵内积得到对应的第二结果数据,将所述第二结果数据大于或等于第三预设阈值对应的像素区域作为所述目标区域。The second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result The pixel area corresponding to the data greater than or equal to the third preset threshold is used as the target area.
  5. 如权利要求4所述的基于OCT图像的图像识别方法,其中,所述第二算法为:The image recognition method based on OCT images according to claim 4, wherein the second algorithm is:
    B(x)=x-G(x) B(x)=x-G(x)B(x)=x-G(x) B(x)=x-G(x)
    其中,x表示待识别图像,G(x)表示生成器。Among them, x represents the image to be recognized, and G(x) represents the generator.
  6. 如权利要求1所述的基于OCT图像的图像识别方法,其中,所述第一损失函数值的计算公式为:3. The image recognition method based on OCT images according to claim 1, wherein the calculation formula of the first loss function value is:
    L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]
    其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
  7. 如权利要求1所述的基于OCT图像的图像识别方法,其中,所述第二损失函数值的计算公式为:3. The image recognition method based on OCT images according to claim 1, wherein the calculation formula of the second loss function value is:
    L d=E x-ρ[log avg(E(G(x)))-αρ(z,E(G(x)))] L d =E x-ρ [log avg(E(G(x)))-αρ(z,E(G(x)))]
    其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
  8. 一种基于OCT图像的图像识别装置,其中,所述装置包括:An image recognition device based on OCT images, wherein the device includes:
    获取模块:用于获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络;Acquisition module: used to acquire OCT images of non-abnormal areas as sample images to construct a generative confrontation network including generators and discriminators;
    第一处理模块:用于将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing module: used to input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain a first image, and perform high-level feature encoding on the first image Obtain the first feature vector, calculate the similarity value between each first feature vector and each second feature vector in the preset storage table, use the second feature vector corresponding to the maximum similarity value as the target feature vector, and set the target The first feature vector corresponding to the feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator The output result of the device;
    第二处理模块:用于基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing module is used to adjust the parameters of the generator by minimizing the first loss function value of the generator based on the output result, and when the first loss function value is less than the first preset threshold, Update the parameters of the generator by using the first loss function value to obtain the target generator;
    第三处理模块:用于分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing module is used to input the sample image and its corresponding analog image into the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, The second loss function value of the discriminator is minimized to adjust the parameters of the discriminator, and when the second loss function value is less than the first preset threshold value, the second loss function value is used to update the The parameters of the discriminator obtain the target discriminator, and the target generator and the target discriminator are alternately iterated to train the generative confrontation network until the training is completed; and
    识别模块:用于接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition module: used to receive the image to be recognized uploaded by the client and input the trained generative countermeasure network to obtain a simulated image, and use the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized. When the abnormal score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:A computer device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when the processor executes the computer program:
    获取步骤:获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络;Obtaining steps: Obtain the OCT image of the non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator;
    第一处理步骤:将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing step: input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image A feature vector, calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector The corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
    第二处理步骤:基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing step: based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator. The parameter of the first loss function value update generator obtains the target generator;
    第三处理步骤:分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing step: respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
    识别步骤:接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition step: receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  10. 如权利要求9所述的计算机设备,其中,所述将最大相似度值对应的所述第二特征向量作为目标特征向量包括:9. The computer device according to claim 9, wherein said using the second feature vector corresponding to the maximum similarity value as a target feature vector comprises:
    将所述目标特征向量与第一特征向量输入权重计算公式得出数值在预设数值区间(例如0-0.1)的第一结果数据,所述提取权重计算公式为:The target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
    Figure PCTCN2020098976-appb-100002
    Figure PCTCN2020098976-appb-100002
    其中,w i表示目标特征向量的提取权重,exp表示以e为底数的指数运算符号,d表示第一特征向量与第二特征向量的相似度值,z表示第一图像的第一特征向量,m表示第一特征向量,m j表示第二特征向量,j表示预设存储表中第二特征向量的总数。 Among them, w i represents the extraction weight of the target feature vector, exp represents the exponential operation symbol with e as the base, d represents the similarity value between the first feature vector and the second feature vector, z represents the first feature vector of the first image, m represents the first feature vector, m j represents the second feature vector, and j represents the total number of second feature vectors in the preset storage table.
  11. 如权利要求9所述的计算机设备,其中,所述第一算法为:9. The computer device of claim 9, wherein the first algorithm is:
    A(x)=(1-λ)R(x)+λD(x)A(x)=(1-λ)R(x)+λD(x)
    其中,λ表示变量值,R(x)表示模拟图像与待识别图像的像素残差,D(x)表示鉴别器编码的高维空间残差。Among them, λ represents the variable value, R(x) represents the pixel residual of the simulated image and the image to be recognized, and D(x) represents the high-dimensional spatial residual of the discriminator encoding.
  12. 如权利要求11所述的计算机设备,其中,所述处理器执行所述计算机程序时还实现目标检测步骤:11. The computer device of claim 11, wherein the processor further implements the target detection step when executing the computer program:
    对所述待识别图像做高斯降采样得到第二图像;Performing Gaussian down-sampling on the image to be recognized to obtain a second image;
    对所述第二图像中大于Maximum/10的像素点做归一化,其中Maximum表示不同预设尺度的第二图像的亮度最大值;Normalize the pixels larger than Maximum/10 in the second image, where Maximum represents the maximum brightness of the second image with different preset scales;
    构建九个尺度下的亮度高斯金字塔,利用Gabor滤波器构建四个方向,分别为θ{0°,45°,90°,135°}的方向高斯金字塔,得到亮度和方向高斯金字塔后,分别计算亮度和方向高斯金字塔对应的特征图,其中,亮度特征图为:I(c,s)=|I(c)-I(s)|,方向特征图为:O(c,s,θ)=|O(c,θ)-O(s,θ)|,c、s表示尺度参数,θ表示角度参数,c∈{2,3,4},s=c+δ,δ∈{3,4};Construct brightness Gaussian pyramids at nine scales, use Gabor filters to construct four directions, θ{0°, 45°, 90°, 135°} direction Gaussian pyramids, and calculate the brightness and direction Gaussian pyramids separately The feature map corresponding to the brightness and direction Gaussian pyramid, where the brightness feature map is: I(c,s)=|I(c)-I(s)|, and the direction feature map is: O(c,s,θ)= |O(c,θ)-O(s,θ)|, c, s represent scale parameters, θ represents angle parameters, c∈{2,3,4}, s=c+δ,δ∈{3,4 };
    获取预设数量的特征图,抑制存在第一预设数量活动峰的特征图,增强存在第二预设数量活动峰的特征图,将所有特征图调整至统一尺寸后相加得到显著特征图,所述第一预设数量大于第二预设数量;及Obtain a preset number of feature maps, suppress the feature maps with the first preset number of activity peaks, enhance the feature maps with the second preset number of activity peaks, adjust all the feature maps to a uniform size and add them to obtain a salient feature map, The first predetermined number is greater than the second predetermined number; and
    利用第二算法分别计算所述待识别图像中每一个像素的异常概率值,分别将所述异常概率值与显著性特征图进行矩阵内积得到对应的第二结果数据,将所述第二结果数据大于或等于第三预设阈值对应的像素区域作为所述目标区域。The second algorithm is used to calculate the abnormal probability value of each pixel in the image to be recognized, the abnormal probability value and the saliency feature map are respectively subjected to matrix inner product to obtain the corresponding second result data, and the second result The pixel area corresponding to the data greater than or equal to the third preset threshold is used as the target area.
  13. 如权利要求12所述的计算机设备,其中,所述第二算法为:The computer device of claim 12, wherein the second algorithm is:
    B(x)=x-G(x) B(x)=x-G(x)B(x)=x-G(x) B(x)=x-G(x)
    其中,x表示待识别图像,G(x)表示生成器。Among them, x represents the image to be recognized, and G(x) represents the generator.
  14. 如权利要求9所述的计算机设备,其中,所述第一损失函数值的计算公式为:9. The computer device of claim 9, wherein the calculation formula of the first loss function value is:
    L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]
    其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
  15. 如权利要求9所述的计算机设备,其中,所述第二损失函数值的计算公式为:9. The computer device according to claim 9, wherein the calculation formula of the second loss function value is:
    L d=E x-ρ[log avg(E(G(x)))-αρ(z,E(G(x)))] L d =E x-ρ [log avg(E(G(x)))-αρ(z,E(G(x)))]
    其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
  16. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium having a computer program stored on the computer-readable storage medium, wherein, when the computer program is executed by a processor, the following steps are implemented:
    获取步骤:获取无异常区域的OCT图像作为样本图像,构建包括生成器和鉴别器的生成式对抗网络;Obtaining steps: Obtain the OCT image of the non-abnormal area as a sample image, and construct a generative confrontation network including a generator and a discriminator;
    第一处理步骤:将所述样本图像输入所述生成器,采用生成器的卷积层对每个样本图像分别进行下采样得到第一图像,对所述第一图像进行高阶特征编码得到第一特征向量,计算每个第一特征向量与预设存储表中每个第二特征向量的相似度值,将最大相似度值对应的第二特征向量作为目标特征向量,将所述目标特征向量对应的第一特征向量作为第二特征向量存入所述预设存储表,采用所述生成器的转置卷积层对所述目标特征向量进行上采样得到模拟图像并作为所述生成器的输出结果;The first processing step: input the sample image into the generator, use the convolutional layer of the generator to down-sample each sample image to obtain the first image, and perform high-level feature encoding on the first image to obtain the first image A feature vector, calculating the similarity value between each first feature vector and each second feature vector in the preset storage table, using the second feature vector corresponding to the maximum similarity value as the target feature vector, and using the target feature vector The corresponding first feature vector is stored in the preset storage table as the second feature vector, and the target feature vector is up-sampled using the transposed convolution layer of the generator to obtain an analog image and used as the generator's Output result;
    第二处理步骤:基于所述输出结果,以最小化所述生成器的第一损失函数值为目标调整生成器的参数,当所述第一损失函数值小于第一预设阈值时,利用所述第一损失函数值更新生成器的参数得到目标生成器;The second processing step: based on the output result, adjust the parameters of the generator with the goal of minimizing the first loss function value of the generator, and when the first loss function value is less than the first preset threshold, use all the parameters of the generator. The parameter of the first loss function value update generator obtains the target generator;
    第三处理步骤:分别将所述样本图像及其对应的模拟图像输入所述鉴别器得到对应的第一概率值与第二概率值,基于所述第一概率值与第二概率值,以最小化所述鉴别器的第二损失函数值为目标调整鉴别器的参数,当所述第二损失函数值小于所述第一预设阈值时,利用所述第二损失函数值更新所述鉴别器的参数得到目标鉴别器,对所述目标生成器和目标鉴别器进行交替迭代以对所述生成式对抗网络进行训练直至完成训练;及The third processing step: respectively input the sample image and its corresponding analog image to the discriminator to obtain the corresponding first probability value and second probability value, based on the first probability value and the second probability value, with the smallest value Change the value of the second loss function of the discriminator to the parameter of the target adjustment discriminator, and when the value of the second loss function is less than the first preset threshold, update the discriminator with the value of the second loss function To obtain a target discriminator from the parameters of, and perform alternate iterations on the target generator and target discriminator to train the generative confrontation network until the training is completed; and
    识别步骤:接收客户端上传的待识别图像并输入完成训练的所述生成式对抗网络得到模拟图像,利用第一算法计算所述模拟图像与待识别图像之间的异常分值,当所述异常分值大于所述第二预设阈值时,判断所述待识别图像为包含异常区域的异常图像。Recognition step: receiving the image to be recognized uploaded by the client and inputting the trained generative countermeasure network to obtain a simulated image, using the first algorithm to calculate the anomaly score between the simulated image and the image to be recognized, when the abnormality When the score is greater than the second preset threshold, it is determined that the image to be recognized is an abnormal image including an abnormal area.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述将最大相似度值对应的所述第二特征向量作为目标特征向量包括:15. The computer-readable storage medium of claim 16, wherein said using the second feature vector corresponding to the maximum similarity value as a target feature vector comprises:
    将所述目标特征向量与第一特征向量输入权重计算公式得出数值在预设数值区间(例如0-0.1)的第一结果数据,所述提取权重计算公式为:The target feature vector and the first feature vector are input into a weight calculation formula to obtain first result data with a value in a preset value interval (for example, 0-0.1), and the extraction weight calculation formula is:
    Figure PCTCN2020098976-appb-100003
    Figure PCTCN2020098976-appb-100003
    其中,w i表示目标特征向量的提取权重,exp表示以e为底数的指数运算符号,d表示第一特征向量与第二特征向量的相似度值,z表示第一图像的第一特征向量,m表示第 一特征向量,m j表示第二特征向量,j表示预设存储表中第二特征向量的总数。 Among them, w i represents the extraction weight of the target feature vector, exp represents the exponential operation symbol with e as the base, d represents the similarity value between the first feature vector and the second feature vector, z represents the first feature vector of the first image, m represents the first feature vector, m j represents the second feature vector, and j represents the total number of second feature vectors in the preset storage table.
  18. 如权利要求16所述的计算机可读存储介质,其中,所述第一算法为:The computer-readable storage medium of claim 16, wherein the first algorithm is:
    A(x)=(1-λ)R(x)+λD(x)A(x)=(1-λ)R(x)+λD(x)
    其中,λ表示变量值,R(x)表示模拟图像与待识别图像的像素残差,D(x)表示鉴别器编码的高维空间残差。Among them, λ represents the variable value, R(x) represents the pixel residual of the simulated image and the image to be recognized, and D(x) represents the high-dimensional spatial residual of the discriminator encoding.
  19. 如权利要求16所述的计算机可读存储介质,其中,所述第一损失函数值的计算公式为:15. The computer-readable storage medium of claim 16, wherein the calculation formula of the first loss function value is:
    L g=E x-ρ[log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))] L g =E x-ρ [log avg(E(x))+log(1-avg(E(G(x))))-αρ(z,E(G(x)))]
    其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
  20. 如权利要求16所述的计算机可读存储介质,其中,所述第二损失函数值的计算公式为:15. The computer-readable storage medium of claim 16, wherein the calculation formula of the second loss function value is:
    L d=E x-ρ[log avg(E(G(x)))-αρ(z,E(G(x)))] L d =E x-ρ [log avg(E(G(x)))-αρ(z,E(G(x)))]
    其中,x表示样本图像,E(x)表示鉴别器中的卷积层,G(x)表示生成器,E(G(x))表示生成器中的卷积层α表示权重系数,β表示E(G(x))与z之间的相关度。Among them, x represents the sample image, E(x) represents the convolutional layer in the discriminator, G(x) represents the generator, E(G(x)) represents the convolutional layer in the generator, α represents the weight coefficient, β represents The correlation between E(G(x)) and z.
PCT/CN2020/098976 2020-05-20 2020-06-29 Oct image-based image recognition method and apparatus, and device and storage medium WO2021151276A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010431416.4A CN111695605B (en) 2020-05-20 2020-05-20 OCT image-based image recognition method, server and storage medium
CN202010431416.4 2020-05-20

Publications (1)

Publication Number Publication Date
WO2021151276A1 true WO2021151276A1 (en) 2021-08-05

Family

ID=72478035

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098976 WO2021151276A1 (en) 2020-05-20 2020-06-29 Oct image-based image recognition method and apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN111695605B (en)
WO (1) WO2021151276A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113724214A (en) * 2021-08-23 2021-11-30 唯智医疗科技(佛山)有限公司 Image processing method and device based on neural network
CN113778719A (en) * 2021-09-16 2021-12-10 北京中科智眼科技有限公司 Anomaly detection algorithm based on copy and paste
CN114418130A (en) * 2022-03-30 2022-04-29 中国科学技术大学 Model training method, data processing method and related equipment
CN114612484A (en) * 2022-03-07 2022-06-10 中国科学院苏州生物医学工程技术研究所 Retina OCT image segmentation method based on unsupervised learning
CN114943639A (en) * 2022-05-24 2022-08-26 北京瑞莱智慧科技有限公司 Image acquisition method, related device and storage medium
CN115238805A (en) * 2022-07-29 2022-10-25 中国电信股份有限公司 Training method of abnormal data recognition model and related equipment
CN115620082A (en) * 2022-09-29 2023-01-17 北京的卢深视科技有限公司 Model training method, head posture estimation method, electronic device, and storage medium
CN116343137A (en) * 2023-02-21 2023-06-27 北京海上升科技有限公司 Tail gas abnormal automobile big data detection method and system based on artificial intelligence
CN116542956A (en) * 2023-05-25 2023-08-04 广州机智云物联网科技有限公司 Automatic detection method and system for fabric components and readable storage medium
CN117633867A (en) * 2023-10-26 2024-03-01 唐山启奥科技股份有限公司 Medical image desensitizing method, device, electronic equipment and readable storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112465819A (en) * 2020-12-18 2021-03-09 平安科技(深圳)有限公司 Image abnormal area detection method and device, electronic equipment and storage medium
CN112668462B (en) * 2020-12-25 2024-05-07 平安科技(深圳)有限公司 Vehicle damage detection model training, vehicle damage detection method, device, equipment and medium
CN114663428B (en) * 2022-05-16 2022-09-02 网思科技股份有限公司 Method and device for detecting surface abnormality of object based on artificial intelligence and related equipment
CN114947734A (en) * 2022-05-18 2022-08-30 苏州比格威医疗科技有限公司 CNV focus counterfeiting method, device and system based on retina OCT image
CN116310734B (en) * 2023-04-25 2023-12-15 慧铁科技股份有限公司 Fault detection method and system for railway wagon running part based on deep learning
CN116797889B (en) * 2023-08-24 2023-12-08 青岛美迪康数字工程有限公司 Updating method and device of medical image recognition model and computer equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108564611A (en) * 2018-03-09 2018-09-21 天津大学 A kind of monocular image depth estimation method generating confrontation network based on condition
CN108734673B (en) * 2018-04-20 2019-11-15 平安科技(深圳)有限公司 Descreening systematic training method, descreening method, apparatus, equipment and medium
CN109166126B (en) * 2018-08-13 2022-02-18 苏州比格威医疗科技有限公司 Method for segmenting paint cracks on ICGA image based on condition generation type countermeasure network
US11615505B2 (en) * 2018-09-30 2023-03-28 Boe Technology Group Co., Ltd. Apparatus and method for image processing, and system for training neural network
CN110070124A (en) * 2019-04-15 2019-07-30 广州小鹏汽车科技有限公司 A kind of image amplification method and system based on production confrontation network

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ITTI L, KOCH C, NIEBUR E: "A MODEL OF SALIENCY-BASED VISUAL ATTENTION FOR RAPID SCENE ANALYSIS", IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, IEEE COMPUTER SOCIETY., USA, vol. 20, no. 11, 1 November 1998 (1998-11-01), USA, pages 1254 - 1259, XP001203933, ISSN: 0162-8828, DOI: 10.1109/34.730558 *
PATHAK DEEPAK; KRAHENBUHL PHILIPP; DONAHUE JEFF; DARRELL TREVOR; EFROS ALEXEI A.: "Context Encoders: Feature Learning by Inpainting", 2016 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), IEEE, 27 June 2016 (2016-06-27), pages 2536 - 2544, XP033021434, DOI: 10.1109/CVPR.2016.278 *
SCHLEGL THOMAS, SEEBÖCK PHILIPP, WALDSTEIN SEBASTIAN M., LANGS GEORG, SCHMIDT-ERFURTH URSULA: "f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks", MEDICAL IMAGE ANALYSIS, OXFORD UNIVERSITY PRESS, OXOFRD, GB, vol. 54, 1 May 2019 (2019-05-01), GB, pages 30 - 44, XP055785711, ISSN: 1361-8415, DOI: 10.1016/j.media.2019.01.010 *
THOMAS SCHLEGL; PHILIPP SEEB\"OCK; SEBASTIAN M. WALDSTEIN; URSULA SCHMIDT-ERFURTH; GEORG LANGS: "Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 17 March 2017 (2017-03-17), 201 Olin Library Cornell University Ithaca, NY 14853, XP080757690, DOI: 10.1007/978-3-319-59050-9_12 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113724214A (en) * 2021-08-23 2021-11-30 唯智医疗科技(佛山)有限公司 Image processing method and device based on neural network
CN113724214B (en) * 2021-08-23 2024-02-23 唯智医疗科技(佛山)有限公司 Image processing method and device based on neural network
CN113778719B (en) * 2021-09-16 2024-02-02 北京中科智眼科技有限公司 Anomaly detection algorithm based on copy and paste
CN113778719A (en) * 2021-09-16 2021-12-10 北京中科智眼科技有限公司 Anomaly detection algorithm based on copy and paste
CN114612484A (en) * 2022-03-07 2022-06-10 中国科学院苏州生物医学工程技术研究所 Retina OCT image segmentation method based on unsupervised learning
CN114418130A (en) * 2022-03-30 2022-04-29 中国科学技术大学 Model training method, data processing method and related equipment
CN114943639A (en) * 2022-05-24 2022-08-26 北京瑞莱智慧科技有限公司 Image acquisition method, related device and storage medium
CN115238805B (en) * 2022-07-29 2023-12-15 中国电信股份有限公司 Training method of abnormal data recognition model and related equipment
CN115238805A (en) * 2022-07-29 2022-10-25 中国电信股份有限公司 Training method of abnormal data recognition model and related equipment
CN115620082B (en) * 2022-09-29 2023-09-01 合肥的卢深视科技有限公司 Model training method, head posture estimation method, electronic device, and storage medium
CN115620082A (en) * 2022-09-29 2023-01-17 北京的卢深视科技有限公司 Model training method, head posture estimation method, electronic device, and storage medium
CN116343137A (en) * 2023-02-21 2023-06-27 北京海上升科技有限公司 Tail gas abnormal automobile big data detection method and system based on artificial intelligence
CN116343137B (en) * 2023-02-21 2024-04-19 北京海上升科技有限公司 Tail gas abnormal automobile big data detection method and system based on artificial intelligence
CN116542956A (en) * 2023-05-25 2023-08-04 广州机智云物联网科技有限公司 Automatic detection method and system for fabric components and readable storage medium
CN116542956B (en) * 2023-05-25 2023-11-17 广州机智云物联网科技有限公司 Automatic detection method and system for fabric components and readable storage medium
CN117633867A (en) * 2023-10-26 2024-03-01 唐山启奥科技股份有限公司 Medical image desensitizing method, device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN111695605A (en) 2020-09-22
CN111695605B (en) 2024-05-10

Similar Documents

Publication Publication Date Title
WO2021151276A1 (en) Oct image-based image recognition method and apparatus, and device and storage medium
WO2019109526A1 (en) Method and device for age recognition of face image, storage medium
AU2014341919B2 (en) Systems and methods for facial representation
Khan et al. Iris Recognition Using Image Moments and k‐Means Algorithm
JP6167733B2 (en) Biometric feature vector extraction device, biometric feature vector extraction method, and biometric feature vector extraction program
Shah et al. Unsupervised classification of hyperspectral data: an ICA mixture model based approach
US9171226B2 (en) Image matching using subspace-based discrete transform encoded local binary patterns
US10993653B1 (en) Machine learning based non-invasive diagnosis of thyroid disease
EP2869239A2 (en) Systems and methods for facial representation
CN109858333B (en) Image processing method, image processing device, electronic equipment and computer readable medium
US10402629B1 (en) Facial recognition using fractal features
CN111091075B (en) Face recognition method and device, electronic equipment and storage medium
Kim et al. Visual saliency in noisy images
Zhang Noise-robust target recognition of SAR images based on attribute scattering center matching
US11604963B2 (en) Feedback adversarial learning
Algarni et al. Efficient implementation of homomorphic and fuzzy transforms in random-projection encryption frameworks for cancellable face recognition
CN108875549B (en) Image recognition method, device, system and computer storage medium
CN111178187A (en) Face recognition method and device based on convolutional neural network
CN108399401B (en) Method and device for detecting face image
CN114298997B (en) Fake picture detection method, fake picture detection device and storage medium
Xu et al. Illumination-invariant and deformation-tolerant inner knuckle print recognition using portable devices
KR20220131808A (en) Method and apparatus for generating imaga classification model
Li et al. Spatio-temporal saliency perception via hypercomplex frequency spectral contrast
Ibsen et al. Face beneath the ink: Synthetic data and tattoo removal with application to face recognition
US20150254527A1 (en) Methods for 3d object recognition and registration

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20916719

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20916719

Country of ref document: EP

Kind code of ref document: A1