WO2021155650A1 - 图片识别模型的训练方法、装置、计算机系统及存储介质 - Google Patents

图片识别模型的训练方法、装置、计算机系统及存储介质 Download PDF

Info

Publication number
WO2021155650A1
WO2021155650A1 PCT/CN2020/093483 CN2020093483W WO2021155650A1 WO 2021155650 A1 WO2021155650 A1 WO 2021155650A1 CN 2020093483 W CN2020093483 W CN 2020093483W WO 2021155650 A1 WO2021155650 A1 WO 2021155650A1
Authority
WO
WIPO (PCT)
Prior art keywords
training
image
area
interval
target
Prior art date
Application number
PCT/CN2020/093483
Other languages
English (en)
French (fr)
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 WO2021155650A1 publication Critical patent/WO2021155650A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/24765Rule-based classification
    • 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/42Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation

Definitions

  • This application relates to the field of computer technology, which relates to artificial neural network technology, and in particular to a training method, device, computer system, and storage medium for a picture recognition model.
  • Picture recognition refers to the use of computers to process, analyze, and understand images to identify targets and objects in various patterns. This technology is a practical application of deep learning algorithms. When the current picture recognition technology judges the attributes of the target area in the picture, it usually assigns a larger judgment weight to the area of the target area.
  • the inventor realizes that in many application fields, the area of the target area does not have a relationship with the attributes of the target area. Therefore, when the current image recognition technology recognizes a picture, the area of the target area usually has a larger judgment weight, resulting in the target area. The accuracy of attribute judgment is low.
  • the purpose of this application is to provide a training method, device, computer system, and storage medium for a picture recognition model, which are used to solve the problem that the area of the target area has a large judgment weight in the prior art, which leads to a relatively high accuracy of judgment of the attributes of the target area. Low question.
  • this application provides a method for training a picture recognition model, including:
  • the image to be recognized is input to the target interval classification model to output an attribute tag corresponding to the image to be recognized.
  • this application also provides a training device for a picture recognition model, including:
  • the label calibration module is used to label the training image according to the attributes of the target area in the training image, and obtain multiple training images with attribute labels;
  • An area division module configured to obtain the area of the outline of the target area, and divide the plurality of training images with attribute tags into a plurality of training image sets according to the size of the target area according to the preset;
  • the model training module is used to train an initial neural network through the training image set to obtain multiple interval image classification models to form an interval image classification model set;
  • the model selection module is used to identify the area of the target area in the image to be recognized, and select the corresponding target interval image classification model according to the area of the target area in the image to be recognized;
  • the image recognition module is used to input the image to be recognized into the target interval classification model to output the attribute tag corresponding to the image to be recognized.
  • the present application also provides a computer system, which includes a plurality of computer devices, each computer device includes a memory, a processor, and a computer program stored in the memory and running on the processor, the multiple computers
  • the processor of the device executes the computer program, the steps of the training method of the picture recognition model are jointly realized.
  • the present application also provides a computer-readable storage medium, which includes multiple storage media, each of which stores a computer program, and when the computer program stored in the multiple storage media is executed by a processor Jointly implement the steps of the training method of the above-mentioned picture recognition model.
  • the training method, device, computer system, and storage medium of a picture recognition model provided by the present application are implemented by dividing the plurality of training images with attribute tags into a plurality of training image sets according to the size of the target area, and then passing them separately
  • the training image set trains the initial neural network to obtain multiple interval image classification models to form an interval image classification model set, so that each interval image classification model has an area interval, which is a target for the interval image classification model to be good at judgment
  • the size range of the area area by identifying the area of the target area in the image to be recognized, the target area image classification model corresponding to the area of the target area is obtained; because the target area image classification model is best at processing the target area of the area, avoid
  • the area factor has a larger judgment weight when judging the attributes of the target area, and the accuracy of the judgment of the attributes of the target area is improved.
  • Fig. 1 schematically shows an environmental application diagram of a method for training a picture recognition model according to the first embodiment of the present application
  • Embodiment 1 is a flowchart of Embodiment 1 of a training method for a picture recognition model of this application;
  • step S3 is a flowchart of forming an interval image classification model set in step S3 of the first embodiment of the training method for a picture recognition model of this application;
  • step S302 is a flowchart of obtaining an interval image classification model in step S302 of the first embodiment of the training method for a picture recognition model of this application;
  • FIG. 5 is a flowchart of obtaining the optimal adjustment amount formula in step S3022 of the first embodiment of the training method of the picture recognition model of this application;
  • step S4 is a flowchart of identifying the area of the target region in the image to be recognized in step S4 of the first embodiment of the training method for the picture recognition model of this application;
  • FIG. 7 is a flowchart of selecting the corresponding target interval image classification model in step S4 of the first embodiment of the training method for the image recognition model of this application;
  • step S5 is a flowchart of outputting attribute tags corresponding to the image to be recognized in step S5 of the first embodiment of the training method for the image recognition model of this application;
  • Embodiment 9 is a schematic diagram of program modules of Embodiment 2 of the training device for a picture recognition model of this application;
  • FIG. 10 is a schematic diagram of the hardware structure of the computer equipment in the third embodiment of the computer system of this application.
  • Training device for image recognition model 2. Server 3. Network 4. Client
  • Model training module 14. Model selection module 15. Image recognition module
  • the training method, device, computer system, and storage medium of a picture recognition model provided in this application are suitable for the computer field, and provide a label-based calibration module, area division module, model training module, model selection module, and image recognition module The training method of the image recognition model.
  • a plurality of training images with attribute labels are obtained by labeling training images according to the attributes of the target area in the training images; obtaining the area of the contour of the target area, and pre-calculating the plurality of attributes with attributes.
  • the labeled training image is divided into multiple training image sets according to the size of the target area; the initial neural network is trained through the training image sets to obtain multiple interval image classification models to form an interval image classification model set; to identify the target in the image to be recognized The area of the area, according to the area of the target area in the image to be recognized, select the corresponding target interval image classification model; input the image to be recognized into the target interval classification model to output the attributes corresponding to the image to be recognized Label.
  • Fig. 1 schematically shows an environmental application diagram of a method for training a picture recognition model according to Embodiment 1 of the present application.
  • the algorithm automatic testing method runs on the server 2.
  • the server 2 is connected to multiple client terminals 4 through the network 3.
  • the user inputs the target image through the client terminal 4, and the server 2 sets the training image according to the training
  • the attributes of the target area in the image are labeled to obtain multiple training images with attribute tags; the area of the outline of the target area is obtained, and the multiple training images with attribute tags are pre-divided according to the size of the target area Are multiple training image sets;
  • the initial neural network is trained through the training image sets to obtain multiple interval image classification models to form an interval image classification model set;
  • the server 2 receives the image to be recognized input by the user terminal 4, and recognizes the image to be recognized The area of the target area in the image, according to the area of the target area in the image to be recognized, select the corresponding target area image classification model; input the image to be recognized into the target area classification model to generate the image to be recognized Corresponding attribute label, and output it to the user terminal 4.
  • Network 3 can include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices and/ Or wait.
  • the network 3 may include physical links, such as coaxial cable links, twisted pair cable links, optical fiber links, combinations thereof, and/or the like.
  • the network 3 may include wireless links, such as cellular links, satellite links, Wi-Fi links, and/or the like.
  • the server 2 may be composed of a single or multiple computer devices (eg, servers).
  • the single or multiple computing devices may include virtualized computing instances.
  • Virtualized computing instances may include virtual machines, such as computer system simulations, operating systems, servers, and so on.
  • the computing device may load the virtual machine based on a virtual image and/or other data defining specific software (eg, operating system, dedicated application, server) for simulation. As the demand for different types of processing services changes, different virtual machines can be loaded and/or terminated on one or more computing devices.
  • a hypervisor can be implemented to manage the use of different virtual machines on the same computing device.
  • a training method of a picture recognition model of this embodiment includes:
  • S1 Label the training image according to the attributes of the target region in the training image, and obtain multiple training images with attribute labels;
  • S2 Obtain the area of the outline of the target area, and divide the plurality of training images with attribute tags into a plurality of training image sets according to the size of the target area according to the preset;
  • S4 Identify the area of the target area in the image to be recognized, and select a corresponding target interval image classification model according to the area of the target area in the image to be recognized;
  • S5 Input the to-be-recognized image into the target interval classification model to output an attribute tag corresponding to the to-be-recognized image.
  • training images are extracted, and the training images may be in jpg format, png format, or bmp format, and the training images may be X-ray images or ultrasound images;
  • the training image is labeled according to the attributes of the target area in the training image, and a plurality of training images with attribute tags are obtained, wherein the label for calibrating the training image is the information data used to describe the attribute characteristics of the target area Recognize the target area in the training image, recognize the contour of the target area through a contour recognition algorithm, and calculate the area of the contour through a graphic calculation algorithm to obtain the area of the contour of the target area;
  • the training image sets corresponding to the training initial neural networks are respectively trained to obtain multiple interval image classification models , Forming an interval image classification model set;
  • the interval image classification model has an area interval, which is used to express the size of the training target area that the interval image classification model is suitable for recognition, that is, the interval image classification model recognizes the training of the area interval The recognition accuracy of the target area is the highest;
  • the interval image classification model set includes interval image classification model A and interval image Classification model B and interval image classification model C, where the area interval of interval image classification model A is [0,1), the area interval of interval image classification model B is [1,2), and the area interval of interval image classification model C As [2, 3), it can be seen that the training area matches the area interval of the interval image classification model B.
  • the interval image classification model B is set as the target interval image classification model; the target area in the target image is identified, and the target The gray value of each pixel in the area is arranged and the input vector is obtained, and the input vector is calculated by the target interval image classification model to obtain the prediction vector; because the target interval image classification model is based on multiple training image iterations with attribute tags Calculated, where the attribute label includes the first label and the second label, and because the attribute label accurately annotates the target area in the training image, the target interval image classification model can quickly and accurately identify the target For the target area in the image, a prediction vector used to express the first probability and the second probability is obtained, and the attribute label of the target image is determined according to the prediction vector.
  • the target image can be a grayscale image or a color image. If the target image is a grayscale image, the contour of the target area in the target image is directly recognized and the area of the contour is calculated to obtain the area of the target area. ; If the target image is a color image, the target image can be grayed by component method, maximum value method, average method, weighted average method, etc., to obtain a grayscale target image, and then identify the target image The contour of the target area is measured and the area of the contour is measured to obtain the area of the target area; wherein, the component method, the maximum method, the average method, and the weighted average method are the current conventional methods for gray-scale processing of the image, which belong to the present The domain is well-known and common sense, so I won’t repeat it here.
  • the training method of the picture recognition model provided in this embodiment is executed by the server computer device 5.
  • before extracting the interval image classification model matching the training area from the interval image classification model set and setting it as the target interval image classification model includes:
  • labeling the training image according to the attributes of the target region in the training image includes:
  • the attribute tag is inserted in the training image in a manner of labeling and defining the target area.
  • the label can be a closed curve drawn in a certain region in the training image.
  • the benign label and the malignant label are respectively stored in the form of a vector, for example, the benign label is (1,0) and the malignant label is (0,1); the target image with the benign label or the malignant label inserted is used as the training image , Which improves the convenience of training primary neural networks and obtaining interval image classification models.
  • the obtaining the area of the outline of the target region includes:
  • a training image is extracted from the case database, the contour of the training target region in the training image is recognized, and the area of the contour is measured to obtain the area of the target region.
  • a training image is extracted from a case database, a training target area in the training image is identified, a closed curve is drawn along the outer contour of the training target area and set as the contour of the training target area, and the Close the area within the curve to obtain the training area; create a training list, enter the training area and the training image into the training list and have a one-to-one correspondence, so that the training area and the training image are associated with each other; Associate it with the training image to achieve a quantitative evaluation of the area of the target area in the training image, so as to train the initial neural network and obtain the interval image classification model according to the size of the target area, in order to improve the recognition accuracy of the interval image classification model Degree provides the prerequisite preparation.
  • the initial neural network is trained through the training image set in S3 to obtain multiple interval image classification models, and forming an interval image classification model set includes:
  • S301 Divide the training area of each training image in the database according to a preset area interval, divide the training images in the database into several training atlases with at least one training image, and provide each of the training atlases separately Initial neural network.
  • the area interval is set and the training area in the training list is extracted, the training area is divided according to the area interval, and a number of area sets with at least one training area are obtained; and the area centralized training area is summarized
  • the corresponding training images form a training atlas, and an initial neural network is provided to the training atlas, and several training atlases with the initial neural network are obtained in this way;
  • the area of the target area in the target image is a very intuitive feature, when the usual neural network judges the benign and malignant of the target area, the evaluation of its area tends to have a higher weight.
  • the size of the target area is clinically different.
  • the correlation between benign and malignant is not large, so by dividing the training images according to the training area, an initial neural network is provided to each training atlas, so that each initial neural network has a targeted area of a certain target area.
  • the training images within the range of ?? are identified and judged, which avoids the shortcomings of low accuracy of the interval image classification model due to the excessively high area evaluation weight of the target area.
  • the initial neural network is a mathematical model that uses a structure similar to the synaptic connection of the brain's nerves for information processing.
  • the primary neural network consists of an input layer, a hidden layer, and an output layer.
  • the input layer is used to receive an input vector
  • the hidden layer is a layer composed of many neurons and links between the input layer and the output layer, which is used to calculate the input vector to form a calculation vector
  • the output is used to transmit, analyze, and weigh the calculated vector to form an output vector and output.
  • S302 Train a primary neural network corresponding to the training atlas through the training images of the training atlas to obtain an interval image classification model, and associate the area interval of the training atlas with the interval image classification model through a model list .
  • extract the training images of the training atlas extract the attribute labels and target regions in the training images, convert the target regions into input vectors and input them into the initial neural network, and use the attribute labels as the training targets Iterate the initial neural network to obtain an interval image classification model; by setting a model list, and inputting the area interval of the training atlas and the number of the interval image classification model into the model list and making them correspond one-to-one, In order to realize the association between the area interval of the training atlas and the interval image classification model, the interval image classification model associated with the area interval is set as the interval image classification model.
  • training a primary neural network corresponding to the training atlas through the training images of the training atlas in S302 to obtain an interval image classification model includes:
  • S3021 Recognizing the gray value of each pixel in the target area of the training image and arranging them to obtain an input vector, and calculating the input vector through the primary neural network to obtain a prediction vector;
  • the gray value of the pixel in the training image is obtained through an image recognition algorithm and used as the element value, and the element value is arranged according to the position of each pixel in the training image to obtain the input vector.
  • the neural network used in this application is a feedforward neural network. Its input layer is used to receive input vectors.
  • the hidden layer is a layer composed of many neurons and links between the input layer and the output layer. It is used for calculations.
  • the input vector is used to form a calculation vector
  • the output layer is used to transmit, analyze, and weigh the calculation vector to form a prediction vector and output; therefore, the input layer of the primary neural network receives the input vector and outputs it to the primary neural network A hidden layer, where the hidden layer operates on the input vector to obtain a calculation vector and outputs it to the output layer of the primary neural network, and the output layer operates on the calculation vector to obtain a prediction vector.
  • S3022 Calculate the prediction vector, the attribute label of the training image, and the weight in the initial neural network to obtain a weight adjustment by an optimal adjustment formula, and iterate the initial neural network according to the weight adjustment to obtain iterations Neural Networks.
  • the optimal adjustment value formula in S3022 is obtained through the following steps:
  • S3022-1 Provide a target formula used to express the sum of the difference between the prediction vector of all the attribute labels and the attribute labels in the training atlas;
  • S3022-2 Calculate the Taylor formula through the gradient descent method with the target formula as the minimum value as the guide, so as to obtain the optimal adjustment formula for calculating the weight adjustment required in each iteration.
  • y is the attribute label
  • x is the input vector
  • w is the weight of the interval image classification model
  • T is the sum of the difference between the prediction vector of all attribute labels in the training atlas and the attribute labels
  • w is the weight of the initial neural network
  • m is the number of training images in the training atlas
  • i is the number of the current training training image.
  • xi is the input vector of the current training image
  • xiw is the prediction vector of the current training image
  • yi is the attribute label of the current training image
  • the Taylor formula is a formula used to approximate a polynomial function to a given function
  • the weight adjustment amount is obtained by calculating the prediction vector, the attribute label, and the weight in the initial neural network through an optimal adjustment amount formula, and the initial neural network is iterated according to the weight adjustment amount to obtain Interval image classification models include:
  • the technical problem solved in this step is how to train the initial neural network more quickly and accurately to obtain interval image classification when the training samples are limited. Model, so the specific working principle of the feedforward neural network will not be repeated here.
  • S3023 Continuously calculate the input vector through the iterative neural network to obtain the prediction vector, and calculate the weight of the prediction vector, the attribute label, and the iterative neural network through the optimal adjustment formula to obtain the weight adjustment amount, according to the weight adjustment amount
  • the iterative neural network is iterated until the weight adjustment is less than the adjustment threshold, and the iteration is stopped, and the iterative neural network is set as an interval image classification model.
  • the adjustment threshold in this step can be set by the developer as needed.
  • the above scheme adjusts the learning rate of the initial neural network through the gradient descent method to control the weight of the iterative neural network to reach the optimal value to obtain the interval image classification
  • the speed of the model where the learning rate is the weight adjustment amount during iteration.
  • the current optimal weight adjustment amount is used to adjust the weight of the iterative neural network, thus realizing a fast and accurate initial adjustment.
  • the neural network iterates and obtains the technical effect of the interval image classification model.
  • identifying the area of the target region in the image to be identified in S4 includes the following steps:
  • the gray value of the pixel in the target image is obtained by an image recognition algorithm and used as the element value, and the element value is arranged according to the position of each pixel in the target image to obtain the gray space vector ; For example, extract the gray value of each pixel in the target image, and arrange the gray values according to the position of the gray value in the target image to obtain the gray space vector of M ⁇ N; set the gray interval, change From the gray-scale space vector, extract the element value belonging to the gray-scale interval in the gray-scale space vector as the target element value, and set the pixel corresponding to the target element value as the target pixel; set the target pixel in the target image
  • the area of is set as the target area.
  • the image recognition algorithm in this application is a computer software that uses a computer to process, analyze and understand images to identify targets and objects in various modes. Its working principle is based on the grayscale of the image. Difference is performed on the target image to obtain the target area; in this embodiment, the grayscale value of each pixel in the target image is obtained to obtain the grayscale space vector, and the pixels belonging to the grayscale interval are set as the target pixels, for example: If the grayscale interval is [0,30], the pixel with the grayscale value in this interval is set as the target pixel.
  • S402 Draw a closed curve along the outer contour of the target area and set it as the contour of the target area.
  • target pixels are extracted from the target image and stored in a target stack, and the pixels in the target stack are calculated by an image gradient algorithm to obtain contour pixels, and the contour pixels are located in the On the outer contour of the target area in the target area, a closed curve is drawn along the contour pixels in the target image and set as the contour of the target area.
  • G(x,y) is used to express the total difference between two adjacent pixels in the horizontal direction and the vertical direction in the target area
  • dx(i,j) is used to express the horizontal direction adjacent in the target area
  • I is the gray value of the image pixel
  • (i,j) is the pixel coordinate of.
  • the pixel that causes the jump of the total difference is regarded as the contour pixel; further , Set the contour threshold. If the total difference value exceeds the contour threshold, it is determined that the total difference value at this time has a jump. Therefore, the pixel that causes the total difference value jump is set as the contour pixel.
  • the threshold can be set by itself to adjust the recognition accuracy of the contour of the target area, which expands the scope of application of the technical solution.
  • S403 Calculate the area in the closed curve to obtain the area of the target area.
  • a target image with a closed curve is loaded into a graph editor, the closed curve is recognized and selected by the graph editor, and the measurement module of the graph editor calculates the area surrounded by the closed curve. The area of the area, and set the area as the area of the target area.
  • the graphics editor of this application uses a CAD graphics editor, which is a graphics editing software used to select, delete, restore, offset, and measure graphics.
  • CAD graphics editor is a graphics editing software used to select, delete, restore, offset, and measure graphics.
  • the measurement module in the device is the computer software for measuring the length and area of the graph; the technical problem solved by this application is how to classify the size of the target area in the target image, and the area measurement of the graph belongs to those skilled in the art. Common technical methods used in graphics processing, so I won’t go into details here.
  • selecting a corresponding target interval image classification model includes:
  • the model list can be a doc file, an excel file or an html file.
  • S412 Compare the area of the target area with the area interval in the model list, obtain an area interval matching the area of the target area, and set it as a target area interval.
  • the area interval in the model list includes [0,1), [1,2), [2,3), and if the area of the target area is 1.5, set [1,2) as the target area interval.
  • S413 Extract an interval image classification model associated with the target area interval from the interval image classification model set, and set it as a target interval image classification model.
  • the model list of the interval image classification model set includes the following area intervals [0,1), [1,2), [2,3), which respectively correspond to the first interval image classification in the neural network Model, the second interval image classification model, and the third interval image classification model. Since the target area interval is [1,2), the second interval image classification model is set as the target interval image classification model.
  • the input of the image to be recognized into the target interval classification model in S5 to output the attribute label corresponding to the image to be recognized includes:
  • S501 Convert the target area of the image to be recognized into an input vector and input it into the target section image classification model.
  • the gray value of each pixel in the target area of the target image is identified, each gray value is used as an element value, and each element value is arranged according to the position of each pixel in the target area to obtain the input vector ; Enter the input vector into the input layer of the target interval image classification model.
  • S502 Calculate the input vector through the target interval image classification model to obtain a prediction vector.
  • the target interval image classification model is run to calculate the input vector, and the target interval image classification model calculates the input vector by the weight of each layer thereof to obtain the prediction vector; wherein, the prediction vector is used Yu expression belongs to the first probability and the second probability respectively.
  • the prediction vector is (0.2, 0.8)
  • the malignant probability is 0.8.
  • S503 Determine the attribute tag of the image to be recognized according to the prediction vector, and send the attribute tag to the user terminal.
  • the prediction vector has the first probability and the second probability, compare the first probability and the second probability, if the first probability is greater than the second probability, then the generated content is the first judgment result, If the second probability is greater than the first probability, then the generated content is the second judgment result; for example, if the prediction vector is (0.2, 0.8), that is, the first probability is 0.2, and the second probability is 0.8. Since the second probability of 0.8 is greater than the first probability of 0.2, the result of the judgment that the content is second is generated.
  • the benign probability and the malignant probability in the prediction vector determine the benign and malignant probability of the target area, if the benign probability is greater than the malignant probability, the generated content is a benign judgment result, and if the malignant probability is greater than the benign probability, the generated content is a malignant judgment result; For example, if the prediction vector is (0.2, 0.8), that is, the probability of benignity is 0.2 and the probability of malignancy is 0.8. Since the probability of malignancy 0.8 is greater than the probability of benignity 0.2, a judgment result that the content is malignant will be generated.
  • marking the target area and outputting the target image and the judgment result to the user terminal includes:
  • Other optional options, after labeling the target area may also include: extracting pixels other than the lesion pixels in the target image and setting them as background pixels, and adjusting the RGB components of the background pixels to Enlarge the color difference between the target area and other parts in the target image so that the user can recognize and observe the target area.
  • the RGB color mode is a color standard in the industry.
  • the RGB component is through the changes of the three color channels of red (R), green (G), and blue (B) and their mutual superposition
  • the target image will be converted from black and white images such as X-ray images or ultrasound images to color images such as heat maps, which is helpful It is useful for doctors to identify and observe the target area; and because each pixel in the original target image has a different gray scale, by adjusting the RGB components of the lesion pixel and the background pixel, each pixel of the lesion pixel and the background pixel can be based on a different gray scale.
  • the same RGB components show different colors in the target image, thereby ensuring the recognition of the target area and other parts in the target image.
  • a training device 1 for a picture recognition model of this embodiment includes:
  • the label calibration module 11 is used to label the training images according to the attributes of the target region in the training images, and obtain multiple training images with attribute labels;
  • the region dividing module 12 is configured to obtain the area of the outline of the target region, and divide the plurality of training images with attribute tags into a plurality of training image sets according to the size of the target region according to the preset;
  • the model training module 13 is configured to train an initial neural network through the training image set to obtain multiple interval image classification models to form an interval image classification model set;
  • the model selection module 14 is used to identify the area of the target area in the image to be recognized, and select the corresponding target interval image classification model according to the area of the target area in the image to be recognized;
  • the image recognition module 15 is configured to input the to-be-recognized image into the target interval classification model to output the attribute tag corresponding to the to-be-recognized image.
  • This technical solution is based on the intelligent decision-making technology of artificial intelligence, recognizes the contour of the target area in the target image and measures the area of the contour to obtain the area of the target area, and extracts the interval matching the area of the target area from the interval image classification model.
  • the image classification model is set as a target interval image classification model, and the benign or malignant target area is judged by the target interval image classification model and the judgment result is obtained, so as to realize the establishment of a neural network for judgment of the target area, And output the classification model of the corresponding attribute label.
  • the present application also provides a computer system, which includes a plurality of computer devices 5.
  • the components of the image recognition model training device 1 of the second embodiment can be dispersed in different computer devices, and the computer devices can It is a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers) that executes the program.
  • the computer equipment of this embodiment at least includes but is not limited to: a memory 51 and a processor 52 that can be communicatively connected to each other through a system bus, as shown in FIG. 10. It should be pointed out that FIG. 10 only shows a computer device with components, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the memory 51 (ie, readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), Read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 51 may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device.
  • the memory 51 may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD).
  • SD Secure Digital
  • the memory 51 may also include both the internal storage unit of the computer device and its external storage device.
  • the memory 51 is generally used to store the operating system and various application software installed in the computer equipment, such as the program code of the training device for the image recognition model in the first embodiment, and so on.
  • the memory 51 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 52 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 52 is generally used to control the overall operation of the computer equipment.
  • the processor 52 is configured to run the program code or process data stored in the memory 51, for example, to run a training device for a picture recognition model, so as to implement the training method of the picture recognition model in the first embodiment.
  • this application also provides a computer-readable storage system, which includes multiple storage media.
  • the storage media may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, and card.
  • Type memory for example, SD or DX memory, etc.
  • RAM random access memory
  • SRAM static random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • PROM programmable only A read memory
  • the computer-readable storage medium in this embodiment is used to store a training device for a picture recognition model, and when executed by the processor 52, the method for training a picture recognition model in the first embodiment is implemented.

Abstract

本申请公开了图片识别模型的训练方法、装置、计算机系统及存储介质,基于人工智能技术,包括:将训练图像按照训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;获取目标区域轮廓的面积,按照预将多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;分别通过训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;识别待识别图像中目标区域的面积,根据待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;将待识别图像输入至目标区间分类模型,以输出待识别图像对应的属性标签。本申请避免了面积具有较大判断权重的问题,提高了目标区域属性判断的准确度。

Description

图片识别模型的训练方法、装置、计算机系统及存储介质
本申请要求于2020年2月3日提交中国专利局、申请号为CN 202010078603.9,发明名称为“图片识别模型的训练方法、装置、计算机系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,其涉及到人工智能的神经网络技术,尤其涉及一种图片识别模型的训练方法、装置、计算机系统及存储介质。
背景技术
图片识别是指利用计算机对图像进行处理、分析和理解,以识别各种不同模式的目标和对象的技术,该技术是一种应用深度学习算法的实践应用。当前的图片识别技术在判断图片中目标区域的属性时,通常对目标区域的面积赋以较大的判断权重。
然而发明人意识到在很多应用领域中,目标区域的面积与目标区域的属性并不具有关系,因此当前图片识别技术在识别图片时,通常由于目标区域的面积具有较大判断权重,导致目标区域属性的判断准确度较低。
发明内容
本申请的目的是提供一种图片识别模型的训练方法、装置、计算机系统及存储介质,用于解决现有技术中由于目标区域的面积具有较大判断权重,导致目标区域属性的判断准确度较低的问题。
为实现上述目的,本申请提供一种图片识别模型的训练方法,包括:
将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
为实现上述目的,本申请还提供一种图片识别模型的训练装置,包括:
标签标定模块,用于将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
区域划分模块,用于获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
模型训练模块,用于分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
模型选择模块,用于识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
图像识别模块,用于将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
为实现上述目的,本申请还提供一种计算机系统,其包括多个计算机设备,各计算机设备包括存储器.处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述多个计算机设备的处理器执行所述计算机程序时共同实现上述图片识别模型的训练方法的步骤。
为实现上述目的,本申请还提供一种计算机可读存储介质,其包括多个存储介质,各存储介质上存储有计算机程序,所述多个存储介质存储的所述计算机程序被处理器执行时共同实现上述图片识别模型的训练方法的步骤。
本申请提供的一种图片识别模型的训练方法、装置、计算机系统及存储介质,通过将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集,再分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集,使每个区间图像分类模型分别具有的面积区间,该面积区间是区间图像分类模型善于判断的目标区域面积的大小范围;通过识别待识别图像中目标区域的面积,获取与目标区域的面积对应的目标区间图像分类模型;由于目标区间图像分类模型最善于处理所述面积的目标区域,因此,避免了面积因素在判断目标区域属性时具有较大判断权重的问题,提高了目标区域属性判断的准确度。
附图说明
图1示意性示出了根据本申请实施例一的图片识别模型的训练方法的环境应用示意图;
图2为本申请图片识别模型的训练方法实施例一的流程图;
图3为本申请图片识别模型的训练方法实施例一的步骤S3中形成区间图像分类模型集的流程图;
图4为本申请图片识别模型的训练方法实施例一的步骤S302中获得区间图像分类模型的流程图;
图5为本申请图片识别模型的训练方法实施例一的步骤S3022中获得最佳调整量公式的流程图;
图6为本申请图片识别模型的训练方法实施例一的步骤S4中识别待识别图像中目标区域的面积的流程图;
图7为本申请图片识别模型的训练方法实施例一的步骤S4中选择对应的目标区间图像分类模型的流程图;
图8为本申请图片识别模型的训练方法实施例一的步骤S5中输出所述待识别图像对应的属性标签的流程图;
图9为本申请图片识别模型的训练装置实施例二的程序模块示意图;
图10为本申请计算机系统实施例三中计算机设备的硬件结构示意图。
附图标记:
1、图片识别模型的训练装置 2、服务器 3、网络 4、用户端
5、计算机设备 11、标签标定模块 12、区域划分模块
13、模型训练模块 14、模型选择模块 15、图像识别模块
51、存储器 52、处理器
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的一种图片识别模型的训练方法、装置、计算机系统及存储介质,适用于计算机领域,为提供一种基于标签标定模块、区域划分模块、模型训练模块、模型选择模块和图像识别模块的图片识别模型的训练方法。本申请通过将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;识别待识别图像中目标区域的面积,根据所述待识别图像中目 标区域的面积,选择对应的目标区间图像分类模型;将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
图1示意性示出了根据本申请实施例一的图片识别模型的训练方法的环境应用示意图。
在示例性的实施例中,算法自动测试方法运行在服务器2中,服务器2通过网络3与多个用户端4连接,用户通过用户端4输入目标图像,服务器2根据将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;服务器2接收用户端4输入的待识别图像,并识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;将所述待识别图像输入至所述目标区间分类模型,以生成所述待识别图像对应的属性标签,并将其输出至用户端4。
服务器2可以通过一个或多个网络3提供服务,网络3可以包括各种网络设备,例如路由器,交换机,多路复用器,集线器,调制解调器,网桥,中继器,防火墙,代理设备和/或等等。网络3可以包括物理链路,例如同轴电缆链路,双绞线电缆链路,光纤链路,它们的组合和/或类似物。网络3可以包括无线链路,例如蜂窝链路,卫星链路,Wi-Fi链路和/或类似物。
服务器2可以由单个或多个计算机设备(如,服务器)组成。该单个或多个计算设备可以包括虚拟化计算实例。虚拟化计算实例可以包括虚拟机,诸如计算机系统的仿真,操作系统,服务器等。计算设备可以基于定义用于仿真的特定软件(例如,操作系统,专用应用程序,服务器)的虚拟映像和/或其他数据来加载虚拟机。随着对不同类型的处理服务的需求改变,可以在一个或多个计算设备上加载和/或终止不同的虚拟机。可以实现管理程序以管理同一计算设备上的不同虚拟机的使用。
实施例一
请参阅图2,本实施例的一种图片识别模型的训练方法,包括:
S1:将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
S2:获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
S3:分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
S4:识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
S5:将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
本实施例提供的图片识别模型的训练方法,提取训练图像,所述训练图像可为jpg格式、png格式、或bmp格式,该训练图像可为X线图像,也可为超声图像;
将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像,其中,对训练图像进行标定的标签,为用于描述该目标区域属性特征的信息数据;识别训练图像中的目标区域,通过轮廓识别算法识别出所述目标区域的轮廓,通过图形计算算法计算所述轮廓的面积以获得该目标区域轮廓的面积;
按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集,通过所述训练图像集分别训练与其对应的训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;所述区间图像分类模型具有面积区间,其用于表达该区间图像分类模型适用于识别的训练目标区域的大小,也就是该区间图像分类模型识别该面 积区间的训练目标区域的识别准确度最高;
获取与训练面积匹配的面积区间,并将该面积区间所对应的区间图像分类模型设为目标区间图像分类模型;例如:训练面积为1.5,区间图像分类模型集包括区间图像分类模型A、区间图像分类模型B和区间图像分类模型C,其中,区间图像分类模型A的面积区间为【0,1),区间图像分类模型B的面积区间为【1,2),区间图像分类模型C的面积区间为【2,3),可知,训练面积与区间图像分类模型B的面积区间匹配,因此,将区间图像分类模型B设为目标区间图像分类模型;识别所述目标图像中的目标区域,将目标区域中各像素的灰度值并对其排列获得输入向量,通过所述目标区间图像分类模型计算所述输入向量获得预测向量;由于目标区间图像分类模型是基于多个具有属性标签的训练图像迭代运算而成,其中,属性标签因包括第一性标签和第二性标签,又由于属性标签准确的对训练图像中的目标区域进行了标注,因此目标区间图像分类模型可通过快速准确的识别目标图像中的目标区域,获得用于表达分别属于第一性概率和第二性概率的预测向量,根据所述预测向量判断该目标图像的属性标签。
需要说明的是,目标图像可为灰度图像,也可为彩色图像,若目标图像为灰度图像,则直接识别所述目标图像中目标区域的轮廓并测算该轮廓的面积获得目标区域的面积;若目标图像为彩色图像,则可通过分量法、最大值法、平均值法、加权平均法等方法对目标图像进行灰度化处理,以获得灰度化的目标图像,再识别该目标图像中目标区域的轮廓并测算该轮廓的面积获得目标区域的面积;其中,所述分量法、最大值法、平均值法、加权平均法为当前对图像进行灰度化处理的常规方法,属本领域公知常识,故在此不做赘述。
本实施例提供的图片识别模型的训练方法由服务端计算机设备5执行。
在一个优选的实施例中,从区间图像分类模型集中提取与所述训练面积匹配的区间图像分类模型并将其设为目标区间图像分类模型之前包括:
于本实施例中,将训练图像按照所述训练图像中目标区域的属性进行标签标定包括:
创建储存具有标签的训练图像的病例库。
按照所述训练图像中目标区域的属性,对所述训练图像进行标签标定,其中,所述目标区域的的属性包括第一性或第二性,故按照训练图像中目标区域的属性标定第一性标签或第二性标签。
本步骤中,所述属性标签在训练图像中以标注目标区域并对该目标区域进行定义的方式插入。
示例性地,训练图像a中m区域被确诊为良性结节,则在训练图像a中插入良性标签,并使良性标签对m区域进行标注;训练图像b中n区域被确诊为恶性结节,则在训练图像b中插入恶性标签,并使恶性标签对n区域进行标注;其中,所述标注可为在训练图像中某一区域绘制闭合曲线。进一步地,所述良性标签和恶性标签分别以向量形式储存,例如,良性标签为(1,0),恶性标签为(0,1);将插入有良性标签或恶性标签的目标图像作为训练图像,提高了训练初级神经网络并获得区间图像分类模型的便利度。
在示例性的实施例中,所述获取所述目标区域轮廓的面积包括:
从所述病例库中提取训练图像,识别所述训练图像中训练目标区域的轮廓并测算该轮廓的面积以获得所述目标区域的面积。
具体地,从病例库中提取训练图像,识别所述训练图像中的训练目标区域,沿所述训练目标区域的外轮廓绘制闭合曲线并将其设为所述训练目标区域的轮廓,计算所述闭合曲线内的面积以获得训练面积;创建训练列表,将所述训练面积与训练图像录入所述训练列表并一一对应,使训练面积与训练图像相互关联;通过获取训练图像中的训练面积并将其与训练图像关联,以实现对训练图像中目标区域面积的量化评价,以便于按照目标区域的大小有针对性的训练初始神经网络并获得区间图像分类模型,为提高区间图像分类模型识别准确度提供了前提准备。
在一个优选的实施例中,请参阅图3,所述S3中分别通过所述训练图像集训练初始神 经网络以获得多个区间图像分类模型,形成区间图像分类模型集包括:
S301:按照预设的面积区间划分所述数据库中各训练图像的训练面积,使所述数据库中的训练图像分成若干个至少具有一个训练图像的训练图集,分别向各所述训练图集提供初始神经网络。
在示例性的实施例中,设置面积区间并提取训练列表中的训练面积,按照所述面积区间对训练面积进行划分,获得若干个至少具有一个训练面积的面积集;汇总所述面积集中训练面积所对应的训练图像形成训练图集,并向所述训练图集提供一个初始神经网络,按照这种方式获得若干个具有初始神经网络的训练图集;
由于目标图像中的目标区域的面积是非常直观的特征,因此通常的神经网络在判断目标区域良恶性时,对其面积的评价往往会具有较高的权重,然而在临床上目标区域的大小与良恶性的关联性并不大,因此通过按照训练面积对训练图像进行划分,向每一训练图集提供一个初始神经网络,使每个初始神经网络均有针对性的对某一目标区域面积区间的范围内的训练图像进行识别判断,避免了因目标区域的面积评价权重过高,而导致区间图像分类模型判断准确度低下的缺点。
需要说明的是,用户可根据需求调整划分训练面积的区间,其包括以固定值设置面积区间的跨度,例如,固定值为1,则面积区间分别为【0,1),【1,2),【2,3)……,或以非固定值设置面积区间的跨度,例如,面积区间分别为【0,2),【2,5),【5,6)……,以满足用户的不同需求;所述初始神经网络是一种应用类似于大脑神经突触联接的结构进行信息处理的数学模型,其由大量的节点和之间相互联接构成,每个节点代表一种特定的输出函数,称为激励函数,每两个节点间的连接都代表一个对于通过该连接信号的加权值,称之为权重,于本实施例中,所述初级神经网络由输入层、隐藏层和输出层组成,其中,所述输入层用于接收输入向量,所述隐藏层是输入层和输出层之间众多神经元和链接组成的各个层面,其用于计算输入向量以形成计算向量,所述输出层用于传输、分析、权衡计算向量形成输出向量并输出。
S302:通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型,将所述训练图集的面积区间与所述区间图像分类模型通过模型清单关联。
本步骤中,提取所述训练图集的训练图像,并提取所述训练图像中属性标签和目标区域,将所述目标区域转为输入向量并将其输入初始神经网络,将属性标签作为训练目标对初始神经网络进行迭代,以获得区间图像分类模型;通过设置模型清单,并将所述训练图集的面积区间与所述区间图像分类模型的编号录入所述模型清单并使其一一对应,以实现所述训练图集的面积区间与区间图像分类模型之间的关联,将与面积区间关联后的区间图像分类模型设为区间图像分类模型。
在一个优选的实施例中,请参阅图4,所述S302中通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型包括:
S3021:识别所述训练图像的目标区域中各像素的灰度值并对其排列获得输入向量,通过所述初级神经网络计算所述输入向量获得预测向量;
在示例性的实施例中,通过图像识别算法获取所述训练图像中像素的灰度值并将其作为元素值,按照各像素在训练图像中的位置排列所述元素值以获得输入向量。
需要说明的是,本申请采用的神经网络为前馈神经网络,其输入层用于接收输入向量,隐藏层是输入层和输出层之间众多神经元和链接组成的各个层面,其用于计算输入向量以形成计算向量,输出层用于传输、分析、权衡计算向量形成预测向量并输出;因此,所述初级神经网络的输入层接收所述输入向量并将其输出至所述初级神经网络的隐藏层,所述隐藏层对所述输入向量进行运算获得计算向量并将其输出至所述初级神经网络的输出层,所述输出层运算所述计算向量获得预测向量。
S3022:通过最佳调整量公式计算所述预测向量、所述训练图像的属性标签和初始神经 网络中的权重获得权重调整量,根据所述权重调整量对所述初始神经网络进行迭代以获得迭代神经网络。
在一个优选的实施例中,请参阅图5,所述S3022中最佳调整量公式通过以下步骤获得:
S3022-1:提供用于表达所述训练图集中所有属性标签的预测向量与属性标签的差值之和的目标公式;
S3022-2:以所述目标公式为最小值为导向通过梯度下降法计算泰勒公式,以获得用于计算每次迭代时所需的权重调整量的最佳调整量公式。
于本实施例中,区间图像分类模型函数关系为y=w×x;
其中,y为属性标签,x为输入向量,w为区间图像分类模型的权重;然而,事实上初始神经网络无法满足上述区间图像分类模型的函数关系,因此需要对初始神经网络进行迭代,使其能够最大程度的上述函数关系,以实现输入向量与属性标签之间最大程度上的对应。
因此,本申请提供了如下目标公式:
Figure PCTCN2020093483-appb-000001
其中,T为训练图集中所有属性标签的预测向量与属性标签的差值之和,w为初始神经网络的权重,m为训练图集中训练图像的数量,i为当前训练的训练图像的编号,xi为当前训练的训练图像的输入向量,xiw为当前训练的训练图像的预测向量,yi为当前训练的训练图像的属性标签;因此,本申请采用梯度下降法不断调整初始神经网络的权重w0直至函数值T无法下降,进而使最终获得的权重w能够满足区间图像分类模型的函数关系;而调整初始神经网络的权重的函数关系为w n+1-w n=ηv,其中,w为调整后的初始神经网络的权重,w n为当前初始神经网络的权重,w n+1为当前初始神经网络的权重v为变化方向,η为调整步长;因此,本申请中的梯度下降法为采用仅保留首项的泰勒公式对目标公式进行运算,以获得用于计算每次迭代时所需的权重调整量的最佳调整量公式,所述泰勒公式的表达式为:f(x)=f(x 0)+f`(x 0)(x-x 0)。
由于泰勒公式是用于将一个多项式函数去逼近一个给定的函数的公式,因此,通过当前初始神经网络的权重wn获得区间图像分类模型的权重w n+1的泰勒公式将转为调整函数,即:f(w n+1)=f(w n)+f`(w n)(w n+1-w n),其中,
Figure PCTCN2020093483-appb-000002
又由于,调整初始神经网络的权重的函数关系为w n+1-w n=ηv,因此有,f(w n+1)=f(w n)+ηv f`(w n)。
由于对初始神经网络进行迭代,使T达到最小值,只需要保证f(w n+1)≤f(w n)即可,因此,为保证对初始神经网络进行迭代并且使调整函数下降最快,本申请使(w n+1-w n)=-f`(w n),即得到最佳调整函数:f(w n+1)=f(w n)-f`(w n) 2,因此将△w=-f`(w n)设为最佳调整量公式,其中,△w为第n+1次迭代的权重调整量,wn为初始神经网络经第n次迭代后的权重;又由于f`(w n) 2≥0,因此根据最佳调整函数对初始神经网络进行迭代的方向必然是下降的;由此可知,每次对初始神经网络的权重调整量为-f`(w n),即可保证最大速度对初始神经网络进行迭代的需求;当f(w n+1)=f(w n)时,则说明最佳调整函数达到了最低值,即初始神经网络的权重w n已降低至函数值T无法下降的程度,此时保存所述初始神经网络的权重使其转为区间图像分类模型。
在示例性的实施例中,通过最佳调整量公式计算所述预测向量、属性标签和初始神经网络中的权重获得权重调整量,根据所述权重调整量对所述初始神经网络进行迭代以获得区间图像分类模型包括:
将所述预测向量、属性标签和当前初始神经网络中的权重录入所述最佳调整量公式△w=-f`(wn),并通过所述最佳调整量公式计算获得权重调整量△w,并将其设为当前调整量;
将所述当前调整量与当前初始神经网络中的权重相加以对所述初始神经网络进行迭代,以获得迭代神经网络。
需要说明的是,由于前馈神经网络属于本领域技术人员的公知常识,而本步骤所解决的技术问题是如何在训练样本有限的情况下,更加快速准确的训练初始神经网络以获得区间图像分类模型,因此前馈神经网络的具体工作原理在此不做赘述。
S3023:持续的通过迭代神经网络计算输入向量以获得预测向量,并通过最佳调整量公式计算所述预测向量、属性标签和所述迭代神经网络的权重获得权重调整量,根据所述权重调整量对所述迭代神经网络进行迭代,直至所述权重调整量小于调整阈值时停止迭代,并将所述迭代神经网络设为区间图像分类模型。
本步骤中的调整阈值可根据需要由开发人员自行设置,同时,由于上述方案通过梯度下降法调节初始神经网络的学习率,以控制迭代神经网络的权重在将要达到最优值以获得区间图像分类模型的速度,其中,学习率即为迭代时的权重调整量,在每次迭代时,均采用当前最优的权重调整量以对迭代神经网络的权重进行调节,因此实现了快速准确的对初始神经网络进行迭代并获得区间图像分类模型的技术效果。
在一个优选的实施例中,请参阅图6,所述S4中识别待识别图像中目标区域的面积包括以下步骤:
S401:识别所述目标图像中的目标区域。
在示例性的实施例中,通过图像识别算法获取所述目标图像中像素的灰度值并将其作为元素值,按照各像素在目标图像中的位置排列所述元素值以获得灰度空间向量;例如,提取目标图像中每个像素的灰度值,并根据该灰度值在目标图像中的位置排列各灰度值,以获得M×N的灰度空间向量;设置灰度区间,将灰度空间向量中提取所述灰度空间向量中属于灰度区间的元素值设为目标元素值,将所述目标元素值所对应的像素设为目标像素;将所述目标图像中目标像素所在的区域设为目标区域。通过识别出目标图像中的目标区域,不仅降低了图片中其他像素的干扰,以便于对目标区域的轮廓进行圈定,还降低了服务器获取目标区域轮廓的运算负荷。
需要说明的是,本申请中的图像识别算法,是一种利用计算机对图像进行处理、分析和理解,以识别各种不同模式的目标和对像的计算机软件,其工作原理是根据图片灰阶差对目标图像进行识别处理以获取目标区域;于本实施例中,通过获取目标图像中各像素的灰度值以获得灰度空间向量,将属于灰度区间的像素设为目标像素,例如:灰度区间为【0,30】,则将灰度值处于该区间的像素设为目标像素。
S402:沿所述目标区域的外轮廓绘制闭合曲线并将其设为所述目标区域的轮廓。
在示例性的实施例中,从所述目标图像中提取目标像素并将其储存至目标堆栈,通过图像梯度算法对计算所述目标堆栈中的像素以获得轮廓像素,所述轮廓像素位于所述目标区域中目标区域的外轮廓上,在所述目标图像中沿所述轮廓像素绘制闭合曲线并将其设为目标区域的轮廓。
需要说明的是,本申请中图像梯度算法为通过求导公式获得目标区域中目标区域的轮廓的计算机软件;所述求导公式为G(x,y)=dx(i,j)+dy(i,j);dx(i,j)=I(i+1,j)-I(i,j);dy(i,j)=I(i,j+1)-I(i,j);其中,G(x,y)用于表达目标区域中水平方向和垂直方向的相邻两个像素之间的差值总值,dx(i,j)用于表达目标区域中水平方向相邻两个像素之间的差值,dy(i,j)用于表达目标区域中水平方向相邻两个像素之间的差值,I是图像像素的灰度值,(i,j)为像素的坐标。
通过求导公式识别到目标区域的轮廓时,所述差值总值将会产生很大的跳变,因此通常的,将引起所述差值总值的跳变的像素作为轮廓像素;进一步地,设置轮廓阈值,若差值总值的超过轮廓阈值,则认定此时的差值总值产生了跳变,因此,将引起所述差值总值跳变的像素设为轮廓像素,由于轮廓阈值可由用于自行设置,以调节对目标区域轮廓的识别精度,扩大了本技术方案的适用范围。
S403:计算所述闭合曲线内的面积以获得目标区域的面积。
在示例性的实施例中,将具有闭合曲线的目标图像载入图形编辑器,通过所述图形编辑器识别所述闭合曲线并选中,通过图形编辑器的测量模块计算所述闭合曲线所围绕的区域的面积,并将该面积设为目标区域的面积。
需要说明的是,本申请的图形编辑器采用的是CAD图形编辑器,其是一种用于对图形进行选取、删除、恢复、偏移、测量等操作的图形编辑软件,其中,CAD图形编辑器中的测量模块即是对图形进行长度测量和面积测量计算机软件;本申请所解决的技术问题是如何对目标图像中目标区域的大小进行分类,而对图形的面积测量属于本领域技术人员进行图形处理时的常用技术手段,因此在此不做赘述。
在一个优选的实施例中,请参阅图7,所述S4中根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型包括:
S411:提取所述区间图像分类模型集中的模型清单。
本步骤中,所述模型清单可为doc文件、excel文件或html文件。
S412:将所述目标区域的面积与所述模型清单中的面积区间进行比对,获得与所述目标区域的面积匹配的面积区间,并将其设为目标面积区间。
例如,模型清单中的面积区间包括【0,1),【1,2),【2,3),若所述目标区域的面积为1.5,则将【1,2)设为目标面积区间。
S413:从区间图像分类模型集中提取与所述目标面积区间关联的区间图像分类模型,并将其设为目标区间图像分类模型。
例如,区间图像分类模型集的模型清单包括以下面积区间【0,1),【1,2),【2,3),所述面积区间在所述神经网络中分别对应着第一区间图像分类模型、第二区间图像分类模型和第三区间图像分类模型,由于目标面积区间为【1,2),因此,将第二区间图像分类模型设为目标区间图像分类模型。
在一个优选的实施例中,请参阅图8,所述S5中将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签包括:
S501:将所述待识别图像的目标区域转为输入向量录入所述目标区间图像分类模型。
在示例性的实施例中,识别所述目标图像的目标区域中各像素的灰度值,将各灰度值作为元素值,按照各像素在目标区域中的位置排列各元素值以获得输入向量;将输入向量录入所述目标区间图像分类模型的输入层。
S502:通过目标区间图像分类模型计算所述输入向量以获得预测向量。
在示例性的实施例中,运行目标区间图像分类模型使其对输入向量进行计算,目标区间图像分类模型通过其各层的权重计算所述输入向量以获得预测向量;其中,所述预测向量用于表达分别属于第一性概率和第二性概率。基于上述举例,所述预测向量若为(0.2,0.8)则说明目标区域的良性概率为0.2,恶性概率为0.8。
S503:根据所述预测向量判断所述待识别图像的属性标签,并将所述属性标签发送至用户端。
本步骤中,预测向量中具有第一性概率和第二性概率,比较第一性概率和第二性概率,若第一性概率大于第二性概率则生成内容为第一性的判断结果,若第二性概率大于第一性概率则生成内容为第二性的判断结果;例如,预测向量预测向量若为(0.2,0.8),即第一性概率为0.2,第二性概率为0.8,由于第二性概率0.8大于第一性概率0.2,因此将生成内容为第二性的判断结果。
例如,比较预测向量中的良性概率和恶性概率以判断目标区域的良恶性,若良性概率大于恶性概率则生成内容为良性的判断结果,若恶性概率大于良性概率则生成内容为恶性的判断结果;例如,预测向量预测向量若为(0.2,0.8),即良性概率为0.2,恶性概率为0.8,由于恶性概率0.8大于良性概率0.2,因此将生成内容为恶性的判断结果。
于本实施例中,标注所述目标区域并将所述目标图像和判断结果输出至用户端包括:
提取所述目标区域的轮廓内的像素并将其设为病灶像素,调节所述病灶像素的RGB分量,以对所述目标区域进行标注;将标注后的目标图像和结果输出至用户端。
其余可选项,在对所述目标区域进行标注之后还可包括:提取所述目标图像中除所述病灶像素之外的像素并将其设为背景像素,调节所述背景像素的RGB分量,以扩大目标图像中目标区域和其他部位之间的色彩差别,以便于使用者识别观察目标区域。
需要说明的是,RGB色彩模式是是工业界的一种颜色标准,RGB分量是通过对红(R)、绿(G)、蓝(B)三个颜色通道的变化以及它们相互之间的叠加来得到各式各样的颜色的颜色系统;通过对病灶像素和背景像素的RGB分量的调节,将使目标图像由X线图像或超声图像等黑白图像,转为热力图等彩色图像,有助于医生识别和观察目标区域;又由于原目标图像中各像素具有不同的灰度,因此通过对病灶像素和背景像素的RGB分量的进行调节,可使病灶像素和背景像素各像素基于不同灰度及相同RGB分量在目标图像中展现不同的色彩,进而保证了目标图像中目标区域和其他部位的识别度。
实施例二
请参阅图9,本实施例的一种图片识别模型的训练装置1,包括:
标签标定模块11,用于将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
区域划分模块12,用于获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
模型训练模块13,用于分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
模型选择模块14,用于识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
图像识别模块15,用于将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
本技术方案基于人工智能的智能决策技术,识别所述目标图像中目标区域的轮廓并测算该轮廓的面积获得目标区域的面积,从区间图像分类模型集中提取与所述目标区域的面积匹配的区间图像分类模型并将其设为目标区间图像分类模型,通过所述目标区间图像分类模型判断所述目标区域的良恶性并获得判断结果,以实现基于神经网络建立用于对目标区域的进行判断,并输出对应的属性标签的分类模型。
实施例三
为实现上述目的,本申请还提供一种计算机系统,该计算机系统包括多个计算机设备5,实施例二的图片识别模型的训练装置1的组成部分可分散于不同的计算机设备中,计算机设备可以是执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。本实施例的计算机设备至少包括但不限于:可通过系统总线相互通信连接的存储器51、处理器52,如图10所示。需要指出的是,图10仅示出了具有组件-的计算机设备,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
本实施例中,存储器51(即可读存储介质)包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器51可以是计算机设备的内部存储单元,例如该计算机设备的硬盘或内存。在另一些实施例中,存储器51也可以是计算机设备的外部存储设备,例如该计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器51还可以既包括计算机设备的内部存储单元也包括其外部存储设备。本实施例中,存储器51 通常用于存储安装于计算机设备的操作系统和各类应用软件,例如实施例一的图片识别模型的训练装置的程序代码等。此外,存储器51还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器52在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器52通常用于控制计算机设备的总体操作。本实施例中,处理器52用于运行存储器51中存储的程序代码或者处理数据,例如运行图片识别模型的训练装置,以实现实施例一的图片识别模型的训练方法。
实施例四
为实现上述目的,本申请还提供一种计算机可读存储系统,其包括多个存储介质,所述存储介质可以是非易失性,也可以是易失性,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机程序,程序被处理器52执行时实现相应功能。本实施例的计算机可读存储介质用于存储图片识别模型的训练装置,被处理器52执行时实现实施例一的图片识别模型的训练方法。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种图片识别模型的训练方法,其中,包括:
    将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
    获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
    分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
    识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
    将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
  2. 根据权利要求1所述的图片识别模型的训练方法,其中,所述分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集包括:
    按照预设的面积区间划分所述数据库中各训练图像的训练面积,使所述数据库中的训练图像分成若干个至少具有一个训练图像的训练图集,分别向各所述训练图集提供初始神经网络;
    通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型,将所述训练图集的面积区间与所述区间图像分类模型通过模型清单关联。
  3. 根据权利要求2所述的图片识别模型的训练方法,其中,通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型包括:
    识别所述训练图像的目标区域中各像素的灰度值并对其排列获得输入向量,通过所述初级神经网络计算所述输入向量获得预测向量;
    通过最佳调整量公式计算所述预测向量、所述训练图像的训练标签和初始神经网络中的权重获得权重调整量,并根据所述权重调整量对所述初始神经网络进行迭代以获得迭代神经网络;
    持续的通过迭代神经网络计算输入向量以获得预测向量,并通过最佳调整量公式计算所述预测向量、训练标签和所述迭代神经网络的权重获得权重调整量,根据所述权重调整量对所述迭代神经网络进行迭代,直至所述权重调整量小于调整阈值时停止迭代,并将所述迭代神经网络设为区间图像分类模型。
  4. 根据权利要求3所述的图片识别模型的训练方法,其中,所述最佳调整量公式通过以下步骤获得:
    提供用于表达所述训练图集中所有训练标签的预测向量与训练标签的差值之和的目标公式;
    以所述目标公式为最小值为导向通过梯度下降法计算泰勒公式,以获得用于计算每次迭代时所需的权重调整量的最佳调整量公式。
  5. 根据权利要求1所述的图片识别模型的训练方法,其中,所述识别待识别图像中目标区域的面积包括以下步骤:
    识别所述待识别图像中的目标区域;
    沿所述目标区域的外轮廓绘制闭合曲线并将其设为所述目标区域的轮廓;
    计算所述闭合曲线内的面积以获得目标区域的面积。
  6. 根据权利要求1所述的图片识别模型的训练方法,其中,所述根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型包括:
    提取所述区间图像分类模型集中的模型清单;
    将所述目标区域的面积与所述模型清单中的面积区间进行比对,获得与所述目标区域的面积匹配的面积区间,并将其设为目标面积区间;
    从区间图像分类模型集中提取与所述目标面积区间关联的区间图像分类模型,并将其设为目标区间图像分类模型。
  7. 根据权利要求1所述的图片识别模型的训练方法,其中,所述将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签包括:
    将所述待识别图像的目标区域转为输入向量录入所述目标区间图像分类模型;
    通过目标区间图像分类模型计算所述输入向量以获得预测向量;
    根据所述预测向量判断所述待识别图像的属性标签,并将所述属性标签发送至用户端。
  8. 一种图片识别模型的训练装置,其中,包括:
    标签标定模块,用于将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
    区域划分模块,用于获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
    模型训练模块,用于分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
    模型选择模块,用于识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
    图像识别模块,用于将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
  9. 一种计算机系统,其包括多个计算机设备,各计算机设备包括存储器.处理器以及存储在存储器上并可在处理器上运行的计算机程序,其中,所述多个计算机设备的处理器执行所述计算机程序时共同实现以下步骤:
    将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
    获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
    分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
    识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
    将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
  10. 根据权利要求9所述的计算机系统,其中,所述分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集包括:
    按照预设的面积区间划分所述数据库中各训练图像的训练面积,使所述数据库中的训练图像分成若干个至少具有一个训练图像的训练图集,分别向各所述训练图集提供初始神经网络;
    通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型,将所述训练图集的面积区间与所述区间图像分类模型通过模型清单关联。
  11. 根据权利要求10所述的计算机系统,其中,通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型包括:
    识别所述训练图像的目标区域中各像素的灰度值并对其排列获得输入向量,通过所述初级神经网络计算所述输入向量获得预测向量;
    通过最佳调整量公式计算所述预测向量、所述训练图像的训练标签和初始神经网络中的权重获得权重调整量,并根据所述权重调整量对所述初始神经网络进行迭代以获得迭代神经网络;
    持续的通过迭代神经网络计算输入向量以获得预测向量,并通过最佳调整量公式计算所述预测向量、训练标签和所述迭代神经网络的权重获得权重调整量,根据所述权重调整量对所述迭代神经网络进行迭代,直至所述权重调整量小于调整阈值时停止迭代,并将所述迭代神经网络设为区间图像分类模型。
  12. 根据权利要求11所述的计算机系统,其中,所述最佳调整量公式通过以下步骤获得:
    提供用于表达所述训练图集中所有训练标签的预测向量与训练标签的差值之和的目标公式;
    以所述目标公式为最小值为导向通过梯度下降法计算泰勒公式,以获得用于计算每次迭代时所需的权重调整量的最佳调整量公式。
  13. 根据权利要求9所述的计算机系统,其中,所述识别待识别图像中目标区域的面积包括以下步骤:
    识别所述待识别图像中的目标区域;
    沿所述目标区域的外轮廓绘制闭合曲线并将其设为所述目标区域的轮廓;
    计算所述闭合曲线内的面积以获得目标区域的面积。
  14. 根据权利要求9所述的计算机系统,其中,所述根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型包括:
    提取所述区间图像分类模型集中的模型清单;
    将所述目标区域的面积与所述模型清单中的面积区间进行比对,获得与所述目标区域的面积匹配的面积区间,并将其设为目标面积区间;
    从区间图像分类模型集中提取与所述目标面积区间关联的区间图像分类模型,并将其设为目标区间图像分类模型。
  15. 根据权利要求9所述的计算机系统,其中,所述将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签包括:
    将所述待识别图像的目标区域转为输入向量录入所述目标区间图像分类模型;
    通过目标区间图像分类模型计算所述输入向量以获得预测向量;
    根据所述预测向量判断所述待识别图像的属性标签,并将所述属性标签发送至用户端。
  16. 一种计算机可读存储介质,其包括多个存储介质,各存储介质上存储有计算机程序,其中,所述多个存储介质存储的所述计算机程序被处理器执行时共同实现以下步骤:
    将训练图像按照所述训练图像中目标区域的属性进行标签标定,获取多个带有属性标签的训练图像;
    获取所述目标区域轮廓的面积,按照预将所述多个带有属性标签的训练图像根据目标区域的大小划分为多个训练图像集;
    分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集;
    识别待识别图像中目标区域的面积,根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型;
    将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述分别通过所述训练图像集训练初始神经网络以获得多个区间图像分类模型,形成区间图像分类模型集包 括:
    按照预设的面积区间划分所述数据库中各训练图像的训练面积,使所述数据库中的训练图像分成若干个至少具有一个训练图像的训练图集,分别向各所述训练图集提供初始神经网络;
    通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型,将所述训练图集的面积区间与所述区间图像分类模型通过模型清单关联;
    通过所述训练图集的训练图像训练与所述训练图集对应的初级神经网络以获得区间图像分类模型包括:
    识别所述训练图像的目标区域中各像素的灰度值并对其排列获得输入向量,通过所述初级神经网络计算所述输入向量获得预测向量;
    通过最佳调整量公式计算所述预测向量、所述训练图像的训练标签和初始神经网络中的权重获得权重调整量,并根据所述权重调整量对所述初始神经网络进行迭代以获得迭代神经网络;
    持续的通过迭代神经网络计算输入向量以获得预测向量,并通过最佳调整量公式计算所述预测向量、训练标签和所述迭代神经网络的权重获得权重调整量,根据所述权重调整量对所述迭代神经网络进行迭代,直至所述权重调整量小于调整阈值时停止迭代,并将所述迭代神经网络设为区间图像分类模型;
    所述最佳调整量公式通过以下步骤获得:
    提供用于表达所述训练图集中所有训练标签的预测向量与训练标签的差值之和的目标公式;
    以所述目标公式为最小值为导向通过梯度下降法计算泰勒公式,以获得用于计算每次迭代时所需的权重调整量的最佳调整量公式。
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述识别待识别图像中目标区域的面积包括以下步骤:
    识别所述待识别图像中的目标区域;
    沿所述目标区域的外轮廓绘制闭合曲线并将其设为所述目标区域的轮廓;
    计算所述闭合曲线内的面积以获得目标区域的面积。
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述根据所述待识别图像中目标区域的面积,选择对应的目标区间图像分类模型包括:
    提取所述区间图像分类模型集中的模型清单;
    将所述目标区域的面积与所述模型清单中的面积区间进行比对,获得与所述目标区域的面积匹配的面积区间,并将其设为目标面积区间;
    从区间图像分类模型集中提取与所述目标面积区间关联的区间图像分类模型,并将其设为目标区间图像分类模型。
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述将所述待识别图像输入至所述目标区间分类模型,以输出所述待识别图像对应的属性标签包括:
    将所述待识别图像的目标区域转为输入向量录入所述目标区间图像分类模型;
    通过目标区间图像分类模型计算所述输入向量以获得预测向量;
    根据所述预测向量判断所述待识别图像的属性标签,并将所述属性标签发送至用户端。
PCT/CN2020/093483 2020-02-03 2020-05-29 图片识别模型的训练方法、装置、计算机系统及存储介质 WO2021155650A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010078603.9A CN111310808B (zh) 2020-02-03 2020-02-03 图片识别模型的训练方法、装置、计算机系统及存储介质
CN202010078603.9 2020-02-03

Publications (1)

Publication Number Publication Date
WO2021155650A1 true WO2021155650A1 (zh) 2021-08-12

Family

ID=71159866

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093483 WO2021155650A1 (zh) 2020-02-03 2020-05-29 图片识别模型的训练方法、装置、计算机系统及存储介质

Country Status (2)

Country Link
CN (1) CN111310808B (zh)
WO (1) WO2021155650A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780487A (zh) * 2021-11-15 2021-12-10 深圳市爱深盈通信息技术有限公司 图片分类方法、存储介质及电子设备
CN113838558A (zh) * 2021-08-16 2021-12-24 电子科技大学 基于卷积神经网络的乳腺癌病理图像分析方法及装置
CN114724009A (zh) * 2022-04-26 2022-07-08 北京拙河科技有限公司 一种基于改进的深度学习网络的图像识别方法及装置
CN116051682A (zh) * 2022-11-30 2023-05-02 四川省中车铁投轨道交通有限公司 一种智轨电车底盘故障检测方法及系统
CN116863279A (zh) * 2023-09-01 2023-10-10 南京理工大学 用于移动端模型轻量化的基于可解释指导的模型蒸馏方法
CN117649204A (zh) * 2023-12-14 2024-03-05 广东图灵智新技术有限公司 一种智能机器人的视觉检测系统及方法

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898550B (zh) * 2020-07-31 2023-12-29 平安科技(深圳)有限公司 建立表情识别模型方法、装置、计算机设备及存储介质
CN112087590A (zh) * 2020-08-14 2020-12-15 北京大米科技有限公司 图像处理方法、装置、系统及计算机存储介质
CN111915698A (zh) * 2020-08-21 2020-11-10 南方科技大学 一种脉管浸润检测方法、装置、计算机设备及存储介质
CN112329916A (zh) * 2020-10-27 2021-02-05 上海眼控科技股份有限公司 模型训练方法、装置、计算机设备及存储介质
CN113269257A (zh) * 2021-05-27 2021-08-17 中山大学孙逸仙纪念医院 一种图像分类方法、装置、终端设备及存储介质
CN113486905A (zh) * 2021-07-01 2021-10-08 深圳星坊科技有限公司 珠宝特征信息获取方法、装置、计算机设备和存储介质
CN113657466B (zh) * 2021-07-29 2024-02-06 北京百度网讯科技有限公司 预训练模型的生成方法、装置、电子设备和存储介质
CN115797375B (zh) * 2023-02-06 2023-05-09 厦门农芯数字科技有限公司 基于鱼眼图像实现多组标签图像的生成方法、装置及设备
CN117372920A (zh) * 2023-09-21 2024-01-09 中山大学 一种池沸腾过程识别方法及模型训练方法、装置、设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783076A (zh) * 2010-02-04 2010-07-21 西安理工大学 一种视频监控模式下的快速车型识别方法
CN103824054A (zh) * 2014-02-17 2014-05-28 北京旷视科技有限公司 一种基于级联深度神经网络的人脸属性识别方法
US20150235109A1 (en) * 2010-03-19 2015-08-20 Canon Kabushiki Kaisha Learning method and apparatus for pattern recognition
CN110399813A (zh) * 2019-07-10 2019-11-01 深兰科技(上海)有限公司 一种年龄识别方法、装置、电子设备及存储介质
CN110674873A (zh) * 2019-09-24 2020-01-10 Oppo广东移动通信有限公司 图像分类方法、装置、移动终端及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9495619B2 (en) * 2014-12-30 2016-11-15 Facebook, Inc. Systems and methods for image object recognition based on location information and object categories
US10650286B2 (en) * 2017-09-07 2020-05-12 International Business Machines Corporation Classifying medical images using deep convolution neural network (CNN) architecture
CN109102037B (zh) * 2018-06-04 2024-03-05 平安科技(深圳)有限公司 中文模型训练、中文图像识别方法、装置、设备及介质
CN110569826B (zh) * 2019-09-18 2022-05-24 深圳市捷顺科技实业股份有限公司 一种人脸识别方法、装置、设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783076A (zh) * 2010-02-04 2010-07-21 西安理工大学 一种视频监控模式下的快速车型识别方法
US20150235109A1 (en) * 2010-03-19 2015-08-20 Canon Kabushiki Kaisha Learning method and apparatus for pattern recognition
CN103824054A (zh) * 2014-02-17 2014-05-28 北京旷视科技有限公司 一种基于级联深度神经网络的人脸属性识别方法
CN110399813A (zh) * 2019-07-10 2019-11-01 深兰科技(上海)有限公司 一种年龄识别方法、装置、电子设备及存储介质
CN110674873A (zh) * 2019-09-24 2020-01-10 Oppo广东移动通信有限公司 图像分类方法、装置、移动终端及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHOU CHENHUI,WANG SHENGJIN,DING XIAOQING: "Pedestrian Detection Based on Partial Feature and Model Matching", JOURNAL OF IMAGE AND GRAPHICS, vol. 15, no. 5, 16 May 2010 (2010-05-16), pages 824 - 829, XP055832756, ISSN: 1006-8961 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113838558A (zh) * 2021-08-16 2021-12-24 电子科技大学 基于卷积神经网络的乳腺癌病理图像分析方法及装置
CN113838558B (zh) * 2021-08-16 2023-04-18 电子科技大学 基于卷积神经网络的乳腺癌病理图像分析方法及装置
CN113780487A (zh) * 2021-11-15 2021-12-10 深圳市爱深盈通信息技术有限公司 图片分类方法、存储介质及电子设备
CN114724009A (zh) * 2022-04-26 2022-07-08 北京拙河科技有限公司 一种基于改进的深度学习网络的图像识别方法及装置
CN114724009B (zh) * 2022-04-26 2022-09-27 北京拙河科技有限公司 一种基于改进的深度学习网络的图像识别方法及装置
CN116051682A (zh) * 2022-11-30 2023-05-02 四川省中车铁投轨道交通有限公司 一种智轨电车底盘故障检测方法及系统
CN116863279A (zh) * 2023-09-01 2023-10-10 南京理工大学 用于移动端模型轻量化的基于可解释指导的模型蒸馏方法
CN116863279B (zh) * 2023-09-01 2023-11-21 南京理工大学 用于移动端模型轻量化的基于可解释指导的模型蒸馏方法
CN117649204A (zh) * 2023-12-14 2024-03-05 广东图灵智新技术有限公司 一种智能机器人的视觉检测系统及方法
CN117649204B (zh) * 2023-12-14 2024-04-26 广东图灵智新技术有限公司 一种智能机器人的视觉检测系统及方法

Also Published As

Publication number Publication date
CN111310808A (zh) 2020-06-19
CN111310808B (zh) 2024-03-22

Similar Documents

Publication Publication Date Title
WO2021155650A1 (zh) 图片识别模型的训练方法、装置、计算机系统及存储介质
CN107679466B (zh) 信息输出方法和装置
US8238660B2 (en) Hybrid graph model for unsupervised object segmentation
WO2021115356A1 (zh) 自适应窗宽窗位调节方法、装置、计算机系统及存储介质
CN108416370A (zh) 基于半监督深度学习的图像分类方法、装置和存储介质
CN112270686B (zh) 图像分割模型训练、图像分割方法、装置及电子设备
WO2020253127A1 (zh) 脸部特征提取模型训练方法、脸部特征提取方法、装置、设备及存储介质
CN110969200B (zh) 基于一致性负样本的图像目标检测模型训练方法及装置
CN111723815B (zh) 模型训练方法、图像处理方法、装置、计算机系统和介质
US20220092407A1 (en) Transfer learning with machine learning systems
US11756288B2 (en) Image processing method and apparatus, electronic device and storage medium
CN110705489A (zh) 目标识别网络的训练方法、装置、计算机设备和存储介质
CN112668482A (zh) 人脸识别训练方法、装置、计算机设备及存储介质
CN113469091A (zh) 人脸识别方法、训练方法、电子设备及存储介质
CN111144466B (zh) 一种图像样本自适应的深度度量学习方法
CN114741697B (zh) 恶意代码分类方法、装置、电子设备和介质
EP4220555A1 (en) Training method and apparatus for image segmentation model, image segmentation method and apparatus, and device
WO2022126917A1 (zh) 基于深度学习的人脸图像评估方法、装置、设备及介质
CN111651626B (zh) 图像分类方法、装置及可读存储介质
CN113536845A (zh) 人脸属性识别方法、装置、存储介质和智能设备
CN114240935B (zh) 一种空频域特征融合的医学影像特征识别方法及装置
WO2022180705A1 (ja) 情報取得装置、情報取得方法及び情報取得プログラム
KR20230154602A (ko) 표 인식 방법 및 장치
CN114998908A (zh) 样本图像标注、模型训练方法、装置、设备以及存储介质
KR20220009662A (ko) 신경망 모델 학습 방법 및 이를 제공하는 장치

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: 20917787

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: 20917787

Country of ref document: EP

Kind code of ref document: A1