WO2023050651A1 - 图像语义分割方法、装置、设备及存储介质 - Google Patents

图像语义分割方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023050651A1
WO2023050651A1 PCT/CN2022/071315 CN2022071315W WO2023050651A1 WO 2023050651 A1 WO2023050651 A1 WO 2023050651A1 CN 2022071315 W CN2022071315 W CN 2022071315W WO 2023050651 A1 WO2023050651 A1 WO 2023050651A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
category
images
preset
cropping
Prior art date
Application number
PCT/CN2022/071315
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 WO2023050651A1 publication Critical patent/WO2023050651A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present application relates to the technical field of artificial intelligence, and in particular to an image semantic segmentation method, device, equipment and storage medium.
  • semantic segmentation has also developed.
  • the category of the image can be identified by analyzing the pixel information in the image.
  • the inventors realized that when performing semantic segmentation processing, the problem of unbalanced samples leads to semantic segmentation tasks that can only predict categories with more samples.
  • the first category with more samples is usually undersampled, and the second category with fewer samples is oversampled at the same time, which cannot accurately identify the category to which the image belongs.
  • the first aspect of the present application provides an image semantic segmentation method, the image semantic segmentation method comprising:
  • tail category images and head category images from a preset image library
  • An image to be classified is received, and the image to be classified is analyzed according to the target semantic segmentation model to obtain a target category of the image to be classified.
  • a second aspect of the present application provides an electronic device, the electronic device includes a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
  • tail category images and head category images from a preset image library
  • An image to be classified is received, and the image to be classified is analyzed according to the target semantic segmentation model to obtain a target category of the image to be classified.
  • a third aspect of the present application provides a computer-readable storage medium, on which at least one computer-readable instruction is stored, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
  • tail category images and head category images from a preset image library
  • An image to be classified is received, and the image to be classified is analyzed according to the target semantic segmentation model to obtain a target category of the image to be classified.
  • a fourth aspect of the present application provides an image semantic segmentation device, the image semantic segmentation device includes:
  • An acquisition unit configured to acquire tail category images and head category images from a preset image library
  • a cropping unit configured to perform multi-scale cropping on the tail category image according to objects in the tail category image to obtain multiple cropped images
  • An enhancement unit configured to perform enhancement processing on each cropped image to obtain multiple enhanced images
  • a generating unit configured to generate a fusion image of the tail category image according to each cropped image and the plurality of enhanced images, and generate a training image according to the fusion image and the head category image;
  • a division unit configured to divide the training image according to a preset cropping size to obtain a first-stage training image and a second-stage training image
  • a training unit configured to train a preset learner based on the first-stage training images to obtain an initial semantic segmentation model
  • An adjustment unit configured to adjust the preset parameters in the initial semantic segmentation model according to the second-stage training images until the loss value of the initial semantic segmentation model no longer decreases to obtain a target semantic segmentation model
  • the analysis unit is configured to receive the image to be classified, and analyze the image to be classified according to the target semantic segmentation model to obtain the target category of the image to be classified.
  • the present application performs multi-scale cropping on the tail category image through the object object, not only to ensure that each cropped image contains the object object, but also based on the multiple cropped images.
  • Increase the number of images of the tail category by performing enhancement processing on each cropped image and generating the fusion image, the number of images of the tail category can be further increased, and then the training images generated according to the fusion image and the head category image Training the target semantic segmentation model can avoid oversampling processing on the tail category or the head category, and improve the segmentation accuracy and robustness of the target semantic segmentation model, thereby improving the accuracy of the target category.
  • the present application uses the first-stage training images to train the initial semantic segmentation model, and then uses the second-stage training images to adjust the preset parameters, because the first-stage training images contain The amount of interference information is less, so it is ensured that the initial semantic segmentation model can fully learn the information on the head category image, and the segmentation accuracy of the target semantic segmentation model is improved.
  • Fig. 1 is a flow chart of a preferred embodiment of the image semantic segmentation method of the present application.
  • Fig. 2 is a functional block diagram of a preferred embodiment of the image semantic segmentation device of the present application.
  • Fig. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the image semantic segmentation method of the present application.
  • FIG. 1 it is a flow chart of a preferred embodiment of the image semantic segmentation method of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
  • the image semantic segmentation method can acquire and process related data based on artificial intelligence technology.
  • artificial intelligence is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
  • Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • the image semantic segmentation method is applied to one or more electronic devices, and the electronic device is a device that can automatically perform numerical calculation and/or information processing according to preset or stored computer-readable instructions, and its hardware Including but not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital signal processors (Digital Signal Processor, DSP), embedded devices, etc. .
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Signal Processor
  • the electronic device may be any electronic product capable of man-machine interaction with the user, for example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (Personal Digital Assistant, PDA), a game console, an interactive Internet TV ( Internet Protocol Television, IPTV), smart wearable devices, etc.
  • a personal computer a tablet computer
  • a smart phone a personal digital assistant (Personal Digital Assistant, PDA)
  • PDA Personal Digital Assistant
  • game console an interactive Internet TV ( Internet Protocol Television, IPTV), smart wearable devices, etc.
  • IPTV Internet Protocol Television
  • smart wearable devices etc.
  • the electronic devices may include network devices and/or user devices.
  • the network device includes, but is not limited to, a single network electronic device, an electronic device group composed of multiple network electronic devices, or a cloud composed of a large number of hosts or network electronic devices based on Cloud Computing.
  • the network where the electronic device is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN) and the like.
  • VPN Virtual Private Network
  • the preset image library stores images of multiple preset categories.
  • the plurality of preset categories can be set according to requirements.
  • Each preset category can be used to characterize objects in the stored image. For example, for an image with a tram, the default category for this image is: Tram.
  • the images stored in the preset image library are used to train the target semantic segmentation model.
  • the tail category image refers to any image corresponding to a preset category whose number of samples is less than the required number, wherein the required number is calculated based on the product of the maximum number of samples in the preset image library and a preset ratio .
  • the head category image refers to any image corresponding to the preset category with the largest number of samples in the preset image library.
  • the acquisition of the tail category image and the head category image by the electronic device from the preset image library includes:
  • the tail category image is acquired from the preset image library according to the second category.
  • the preset ratio can be set according to actual needs, for example, the preset ratio can be 0.5.
  • the maximum number of samples is adjusted to generate a required number that meets the requirements, thereby avoiding the omission of categories with a low number of samples, and improving the comprehensiveness of the tail category images.
  • the object object refers to an object included in the tail category image.
  • the object object may be an annotated category of the tail category image.
  • the multiple cropped images refer to images obtained by cropping the tail category images with different cropping sizes and scaling factors. It can be understood that, depending on the cropping size and the scaling factor, any tail category image may contain corresponding multiple cropping images.
  • the electronic device performs multi-scale cropping on the tail category image according to objects in the tail category image, and obtains multiple cropped images including:
  • the pixel information refers to the pixel values of all pixels in the tail category image on a single channel.
  • the position information can be accurately determined by combining the pixel information and the object object, so that the minimum circumscribed rectangle can be accurately generated through the position information, and the generation accuracy of the multiple cropped images is improved, and then Using the coordinate information of the upper left corner of the smallest circumscribed rectangle, the width of the rectangle and the height of the rectangle can quickly generate the cropping position point, the cropping width and the cropping height, and improve the generation efficiency of the multiple cropped images.
  • the electronic device determining the position information of the object object in the tail category image according to the pixel information includes:
  • the pixel information is compared with the target grayscale pixel value, and a pixel point corresponding to pixel information identical to the target grayscale pixel value is determined as the position information.
  • the grayscale pixel value of the object can be accurately obtained through the object object, and then the position information can be accurately determined by comparing the grayscale pixel value of the object with the pixel information.
  • the electronic device calculates the coordinate information, the rectangle width, and the rectangle height according to the following formulas to obtain a plurality of clipping position points, and calculates the rectangle width and the rectangle height respectively according to the following formulas, respectively Get multiple clipping widths and multiple clipping heights:
  • x 2 x 1 +(r+s*t)*w 1 ;
  • y 2 y 1 +(r+s*t)*h 1 ;
  • w 2 w 1 +2*(r+s*t)*w 1 ;
  • h 2 h 1 +2*(r+s*t)*h 1 ;
  • (x 2 , y 2 ) refers to any clipping position point
  • (x 1 , y 1 ) refers to the coordinate information
  • r and s refer to the scaling factor
  • t refers to the preset clipping size
  • w 1 refers to the rectangle width
  • h 1 refers to the rectangle height
  • w 2 refers to any crop width
  • h 2 refers to any clip height.
  • the configuration parameters of each cropped image are different from those in the multiple enhanced images generated based on the cropped image, wherein the configuration parameters may include, but are not limited to: contrast, saturation Spend.
  • the object shape of each cropped image is the same as the object shape of multiple enhanced images generated based on the cropped image.
  • the electronic device performs enhancement processing on each cropped image based on the Augmix algorithm to obtain multiple enhanced images.
  • each cropped image is enhanced through the Augmix algorithm to avoid loss of pixels in the cropped image.
  • the fused image includes image information of any cropped image and image information of multiple enhanced images generated based on the any cropped image.
  • the training image includes image information of the fused image and image information of the head category image.
  • the generation of the fusion image of the tail category image by the electronic device according to each cropped image and the multiple enhanced images includes:
  • the sum of the first fusion weights of the multiple enhanced images is 1.
  • the second pixel value can be quickly generated through the first fusion weight, and the target pixel value can be quickly generated through the second fusion weight, thereby improving the fusion efficiency of the fusion image.
  • the electronic device generating a training image according to the fusion image and the head category image includes:
  • the maximum replacement width is smaller than any of the cropping widths, or the maximum replacement height is smaller than any of the clipping heights, adjusting the replacement position point to obtain a target position point;
  • the training image is obtained by replacing the image region based on the fused image.
  • the replacement position point refers to the position where the coordinate information in the head category image is any of the cropping position points.
  • the maximum replacement width and the maximum replacement height can be accurately determined, thereby preventing the fused image from replacing the image
  • the area will cause the overflow of the head category image, and improve the generation accuracy of the training image.
  • the first-stage training image refers to a training image generated from a cropped image with a cropping size of 1
  • the second-stage training image refers to a training image with a cropping size greater than 1. Training images generated from cropped images.
  • the electronic device divides the training image according to a preset cropping size, and obtaining the first-stage training image and the second-stage training image includes:
  • the first-stage training image and the second-stage training image can be quickly generated.
  • the preset classifier may be constructed by a classification algorithm such as SVM support vector machine.
  • the initial semantic segmentation model refers to a model generated after training the first-stage training images.
  • the electronic device trains a preset classifier based on the first-stage training images, and obtaining an initial semantic segmentation model includes:
  • mapping processing on the first-stage training image according to the image pixels of the first-stage training image to obtain an image vector, and performing mapping processing on the labeling result to obtain a result vector;
  • the preset classifier is trained according to the image vector and the result vector until all training images in the first stage participate in the training to obtain the initial semantic segmentation model.
  • the preset learner is trained by using the first-stage training images, so that the preset learner can fully learn the information in the head category images.
  • the preset parameter refers to a preset network value in the preset classifier.
  • the target semantic segmentation model refers to an initial semantic segmentation model when the loss value no longer decreases.
  • the training images of the second stage include images of the first type and images of the second type
  • the electronic device performs a classification of the images in the initial semantic segmentation model according to the training images of the second stage.
  • the preset parameters are adjusted until the loss value of the initial semantic segmentation model is no longer reduced, and the target semantic segmentation model obtained includes:
  • JS(p c , p m1 , p m2 ) refers to the loss value
  • M] refers to the degree of p c deviation from M
  • M] refers to the degree of p m1 deviation from M degree
  • M] refers to the degree of p m2 deviation from M
  • p m1 refers to the first output vector
  • p m2 refers to the second output vector
  • p c refers to the third output vector ;
  • Analyzing the loss value of the initial semantic segmentation model through the images in the first type of image and the second type of image, and then adjusting the preset parameters according to the loss value, can improve the target semantic segmentation The predictive power of the model.
  • S17 Receive an image to be classified, and analyze the image to be classified according to the target semantic segmentation model to obtain a target category of the image to be classified.
  • the image to be classified refers to an image requiring category labeling.
  • the target category refers to the category to which the image to be classified belongs, and the target category may be an object included in the image to be classified.
  • the above-mentioned target category can also be stored in a node of a block chain.
  • the electronic device performs vectorization processing on the image to be classified to obtain a vector to be classified, and inputs the vector to be classified into the target semantic segmentation model to obtain a category vector , determining the category corresponding to the dimension with the largest value in the category vector as the target category.
  • the target category can be accurately generated through the target semantic segmentation model.
  • the present application performs multi-scale cropping on the tail category image through the object object, not only to ensure that each cropped image contains the object object, but also based on the multiple cropped images.
  • Increase the number of images of the tail category by performing enhancement processing on each cropped image and generating the fusion image, the number of images of the tail category can be further increased, and then the training images generated according to the fusion image and the head category image Training the target semantic segmentation model can avoid oversampling processing on the tail category or the head category, and improve the segmentation accuracy and robustness of the target semantic segmentation model, thereby improving the accuracy of the target category.
  • the present application uses the first-stage training images to train the initial semantic segmentation model, and then uses the second-stage training images to adjust the preset parameters, because the first-stage training images contain The amount of interference information is less, so it is ensured that the initial semantic segmentation model can fully learn the information on the head category image, and the segmentation accuracy of the target semantic segmentation model is improved.
  • the image semantic segmentation device 11 includes an acquisition unit 110 , a cropping unit 111 , an enhancement unit 112 , a generation unit 113 , a division unit 114 , a training unit 115 , an adjustment unit 116 and an analysis unit 117 .
  • the module/unit referred to in this application refers to a series of computer-readable instruction segments that can be acquired by the processor 13 and can perform fixed functions, and are stored in the memory 12 . In this embodiment, the functions of each module/unit will be described in detail in subsequent embodiments.
  • the acquiring unit 110 acquires tail category images and head category images from a preset image library.
  • the preset image library stores images of multiple preset categories.
  • the plurality of preset categories can be set according to requirements.
  • Each preset category can be used to characterize objects in the stored image. For example, for an image with a tram, the default category for this image is: Tram.
  • the images stored in the preset image library are used to train the target semantic segmentation model.
  • the tail category image refers to any image corresponding to a preset category whose number of samples is less than the required number, wherein the required number is calculated based on the product of the maximum number of samples in the preset image library and a preset ratio .
  • the head category image refers to any image corresponding to the preset category with the largest number of samples in the preset image library.
  • the acquiring unit 110 acquiring tail category images and head category images from a preset image library includes:
  • the tail category image is acquired from the preset image library according to the second category.
  • the preset ratio can be set according to actual needs, for example, the preset ratio can be 0.5.
  • the maximum number of samples is adjusted to generate a required number that meets the requirements, thereby avoiding the omission of categories with a low number of samples, and improving the comprehensiveness of the tail category images.
  • the cropping unit 111 performs multi-scale cropping on the tail category image according to the objects in the tail category image to obtain multiple cropped images.
  • the object object refers to an object included in the tail category image.
  • the object object may be an annotated category of the tail category image.
  • the multiple cropped images refer to images obtained by cropping the tail category images with different cropping sizes and scaling factors. It can be understood that, depending on the cropping size and the scaling factor, any tail category image may contain corresponding multiple cropping images.
  • the cropping unit 111 performs multi-scale cropping on the tail category image according to the objects in the tail category image, and obtains multiple cropped images including:
  • the pixel information refers to the pixel values of all pixels in the tail category image on a single channel.
  • the position information can be accurately determined by combining the pixel information and the object object, so that the minimum circumscribed rectangle can be accurately generated through the position information, and the generation accuracy of the multiple cropped images is improved, and then Using the coordinate information of the upper left corner of the smallest circumscribed rectangle, the width of the rectangle and the height of the rectangle can quickly generate the cropping position point, the cropping width and the cropping height, and improve the generation efficiency of the multiple cropped images.
  • the cropping unit 111 determining the position information of the object object in the tail category image according to the pixel information includes:
  • the pixel information is compared with the target grayscale pixel value, and a pixel point corresponding to pixel information identical to the target grayscale pixel value is determined as the position information.
  • the grayscale pixel value of the object can be accurately obtained through the object object, and then the position information can be accurately determined by comparing the grayscale pixel value of the object with the pixel information.
  • the clipping unit 111 calculates the coordinate information, the rectangle width, and the rectangle height according to the following formula to obtain a plurality of clipping position points, and calculates the rectangle width and the rectangle height respectively according to the following formula, Get multiple cropping widths and multiple cropping heights respectively:
  • x 2 x 1 +(r+s*t)*w 1 ;
  • y 2 y 1 +(r+s*t)*h 1 ;
  • w 2 w 1 +2*(r+s*t)*w 1 ;
  • h 2 h 1 +2*(r+s*t)*h 1 ;
  • (x 2 , y 2 ) refers to any clipping position point
  • (x 1 , y 1 ) refers to the coordinate information
  • r and s refer to the scaling factor
  • t refers to the preset clipping size
  • w 1 refers to the rectangle width
  • h 1 refers to the rectangle height
  • w 2 refers to any crop width
  • h 2 refers to any clip height.
  • the enhancement unit 112 performs enhancement processing on each cropped image to obtain multiple enhanced images.
  • the configuration parameters of each cropped image are different from those in the multiple enhanced images generated based on the cropped image, wherein the configuration parameters may include, but are not limited to: contrast, saturation Spend.
  • the object shape of each cropped image is the same as the object shape of multiple enhanced images generated based on the cropped image.
  • the enhancement unit 112 performs enhancement processing on each cropped image based on the Augmix algorithm to obtain multiple enhanced images.
  • each cropped image is enhanced through the Augmix algorithm to avoid loss of pixels in the cropped image.
  • the generating unit 113 generates a fused image of the tail category image according to each cropped image and the multiple enhanced images, and generates a training image according to the fused image and the head category image.
  • the fused image includes image information of any cropped image and image information of multiple enhanced images generated based on the any cropped image.
  • the training image includes image information of the fused image and image information of the head category image.
  • the generating unit 113 generating the fused image of the tail category image according to each cropped image and the multiple enhanced images includes:
  • the sum of the first fusion weights of the multiple enhanced images is 1.
  • the second pixel value can be quickly generated through the first fusion weight, and the target pixel value can be quickly generated through the second fusion weight, thereby improving the fusion efficiency of the fusion image.
  • the generating unit 113 generating a training image according to the fusion image and the head category image includes:
  • the maximum replacement width is smaller than any of the cropping widths, or the maximum replacement height is smaller than any of the clipping heights, adjusting the replacement position point to obtain a target position point;
  • the training image is obtained by replacing the image region based on the fused image.
  • the replacement position point refers to a position in the head category image whose coordinate information is any one of the clipping position points.
  • the maximum replacement width and the maximum replacement height can be accurately determined, thereby preventing the fused image from replacing the image
  • the area will cause the overflow of the head category image, and improve the generation accuracy of the training image.
  • the division unit 114 divides the training image according to a preset cropping size to obtain a first-stage training image and a second-stage training image.
  • the first-stage training image refers to a training image generated from a cropped image with a cropping size of 1
  • the second-stage training image refers to a training image with a cropping size greater than 1. Training images generated from cropped images.
  • the division unit 114 divides the training image according to a preset cropping size, and obtaining the first-stage training image and the second-stage training image includes:
  • the first-stage training image and the second-stage training image can be quickly generated.
  • the training unit 115 trains a preset classifier based on the first-stage training images to obtain an initial semantic segmentation model.
  • the preset classifier may be constructed by a classification algorithm such as SVM support vector machine.
  • the initial semantic segmentation model refers to a model generated after training the first-stage training images.
  • the training unit 115 trains a preset classifier based on the first-stage training images to obtain an initial semantic segmentation model including:
  • mapping processing on the first-stage training image according to the image pixels of the first-stage training image to obtain an image vector, and performing mapping processing on the labeling result to obtain a result vector;
  • the preset classifier is trained according to the image vector and the result vector until all training images in the first stage participate in the training to obtain the initial semantic segmentation model.
  • the preset learner is trained by using the first-stage training images, so that the preset learner can fully learn the information in the head category images.
  • the adjustment unit 116 adjusts the preset parameters in the initial semantic segmentation model according to the second-stage training images until the loss value of the initial semantic segmentation model no longer decreases to obtain a target semantic segmentation model.
  • the preset parameter refers to a preset network value in the preset classifier.
  • the target semantic segmentation model refers to an initial semantic segmentation model when the loss value no longer decreases.
  • the second-stage training images include images of the first type and images of the second type
  • the adjustment unit 116 adjusts the initial semantic segmentation model according to the training images of the second stage.
  • the preset parameters are adjusted until the loss value of the initial semantic segmentation model is no longer reduced, and the target semantic segmentation model obtained includes:
  • JS(p c , p m1 , p m2 ) refers to the loss value
  • M] refers to the degree of p c deviation from M
  • M] refers to the degree of p m1 deviation from M degree
  • M] refers to the degree of p m2 deviation from M
  • p m1 refers to the first output vector
  • p m2 refers to the second output vector
  • p c refers to the third output vector ;
  • Analyzing the loss value of the initial semantic segmentation model through the images in the first type of image and the second type of image, and then adjusting the preset parameters according to the loss value, can improve the target semantic segmentation The predictive power of the model.
  • the analysis unit 117 receives the image to be classified, and analyzes the image to be classified according to the target semantic segmentation model to obtain the target category of the image to be classified.
  • the image to be classified refers to an image requiring category labeling.
  • the target category refers to the category to which the image to be classified belongs, and the target category may be an object included in the image to be classified.
  • the above-mentioned target category can also be stored in a node of a block chain.
  • the analysis unit 117 performs vectorization processing on the image to be classified to obtain a vector to be classified, and input the vector to be classified into the target semantic segmentation model to obtain a category vector, and determine the category corresponding to the dimension with the largest value in the category vector as the target category.
  • the target category can be accurately generated through the target semantic segmentation model.
  • the present application performs multi-scale cropping on the tail category image through the object object, not only to ensure that each cropped image contains the object object, but also based on the multiple cropped images.
  • Increase the number of images of the tail category by performing enhancement processing on each cropped image and generating the fusion image, the number of images of the tail category can be further increased, and then the training images generated according to the fusion image and the head category image Training the target semantic segmentation model can avoid oversampling processing on the tail category or the head category, and improve the segmentation accuracy and robustness of the target semantic segmentation model, thereby improving the accuracy of the target category.
  • the present application uses the first-stage training images to train the initial semantic segmentation model, and then uses the second-stage training images to adjust the preset parameters, because the first-stage training images contain The amount of interference information is less, so it is ensured that the initial semantic segmentation model can fully learn the information on the head category image, and the segmentation accuracy of the target semantic segmentation model is improved.
  • FIG. 3 it is a schematic structural diagram of an electronic device implementing a preferred embodiment of the image semantic segmentation method of the present application.
  • the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer-readable instructions stored in the memory 12 and operable on the processor 13 , such as an image semantic segmentation program.
  • the schematic diagram is only an example of the electronic device 1, and does not constitute a limitation to the electronic device 1, and may include more or less components than those shown in the illustration, or combine certain components, or have different Components, for example, the electronic device 1 may also include input and output devices, network access devices, buses, and the like.
  • the processor 13 can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the processor 13 is the computing core and control center of the electronic device 1, and uses various interfaces and lines to connect the entire electronic device 1, and execute the operating system of the electronic device 1 and various installed applications, program codes, etc.
  • the computer-readable instructions may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 12 and executed by the processor 13 to Complete this application.
  • the one or more modules/units may be a series of computer-readable instruction segments capable of accomplishing specific functions, and the computer-readable instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 1 .
  • the computer readable instructions may be divided into an acquisition unit 110 , a cropping unit 111 , an enhancement unit 112 , a generation unit 113 , a division unit 114 , a training unit 115 , an adjustment unit 116 and an analysis unit 117 .
  • the memory 12 can be used to store the computer-readable instructions and/or modules, and the processor 13 runs or executes the computer-readable instructions and/or modules stored in the memory 12, and calls the computer-readable instructions and/or modules stored in the memory 12.
  • the data in it realizes various functions of the electronic device 1 .
  • Described memory 12 can mainly comprise storage program area and storage data area, wherein, storage program area can store operating system, the application program (such as sound playback function, image playback function etc.) required by at least one function etc.; Storage data area can be Stores data, etc. created in accordance with the use of electronic devices.
  • Memory 12 can comprise nonvolatile and volatile memory, for example: hard disk, internal memory, plug-in hard disk, smart memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash memory card (Flash Card), at least one magnetic disk storage device, flash memory device, or other storage device.
  • the memory 12 may be an external memory and/or an internal memory of the electronic device 1 . Further, the memory 12 may be a memory in physical form, such as a memory stick, a TF card (Trans-flash Card) or the like.
  • TF card Trans-flash Card
  • the integrated modules/units of the electronic device 1 are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium, and the computer-readable storage medium can be non-volatile A volatile storage medium may also be a volatile storage medium.
  • all or part of the processes in the methods of the above-mentioned embodiments in the present application can also be completed by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium
  • the steps of the above-mentioned various method embodiments can be realized.
  • the computer-readable instructions include computer-readable instruction codes
  • the computer-readable instruction codes may be in the form of source code, object code, executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory).
  • Blockchain essentially a decentralized database, is a series of data blocks associated with each other using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the memory 12 in the electronic device 1 stores computer-readable instructions to implement a method for image semantic segmentation, and the processor 13 can execute the computer-readable instructions to implement:
  • tail category images and head category images from a preset image library
  • An image to be classified is received, and the image to be classified is analyzed according to the target semantic segmentation model to obtain a target category of the image to be classified.
  • Computer-readable instructions are stored on the computer-readable storage medium, wherein the computer-readable instructions are used to implement the following steps when executed by the processor 13:
  • tail category images and head category images from a preset image library
  • An image to be classified is received, and the image to be classified is analyzed according to the target semantic segmentation model to obtain a target category of the image to be classified.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software function modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本申请涉及人工智能,提供一种图像语义分割方法、装置、设备及存储介质。该方法能够获取尾部类别图像及头部类别图像,对尾部类别图像进行多尺度裁剪,得到多张裁剪图像,对每张裁剪图像进行增强处理,得到多张增强图像,根据每张裁剪图像、多张增强图像及头部类别图像生成训练图像,划分训练图像,得到第一阶段训练图像及第二阶段训练图像,基于第一阶段训练图像训练预设分类器,得到初始语义分割模型,根据第二阶段训练图像对初始语义分割模型中的预设参数进行调整,得到目标语义分割模型,分析待分类图像,得到目标类别。本申请能够准确的识别出图像所属的类别。此外,本申请还涉及区块链技术,所述目标类别可存储于区块链中。

Description

图像语义分割方法、装置、设备及存储介质
本申请要求于2021年09月29日提交中国专利局,申请号为202111152660.8,发明名称为“图像语义分割方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种图像语义分割方法、装置、设备及存储介质。
背景技术
随着人工智能的发展,语义分割也随之发展,在语义分割任务中,通过分析图像中的像素信息能够识别出图像所属的类别。然而,发明人意识到,在进行语义分割处理时,样本不均衡的问题导致语义分割任务只能预测样本较多的类别。
为了解决样本不均衡带来的问题,目前通常对样本较多的第一类别进行欠采样处理,同时对样本较少的第二类别进行过采样处理,无法准确的识别出图像所属的类别。
发明内容
鉴于以上内容,有必要提供一种图像语义分割方法、装置、设备及存储介质,能够准确的识别出图像所属的类别。
本申请的第一方面提供一种图像语义分割方法,所述图像语义分割方法包括:
从预设图像库中获取尾部类别图像及头部类别图像;
根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
对每张裁剪图像进行增强处理,得到多张增强图像;
根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
本申请的第二方面提供一种电子设备,所述电子设备包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机可读指令以实现以下步骤:
从预设图像库中获取尾部类别图像及头部类别图像;
根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
对每张裁剪图像进行增强处理,得到多张增强图像;
根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
本申请的第三方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
从预设图像库中获取尾部类别图像及头部类别图像;
根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
对每张裁剪图像进行增强处理,得到多张增强图像;
根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
本申请的第四方面提供一种图像语义分割装置,所述图像语义分割装置包括:
获取单元,用于从预设图像库中获取尾部类别图像及头部类别图像;
裁剪单元,用于根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
增强单元,用于对每张裁剪图像进行增强处理,得到多张增强图像;
生成单元,用于根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
划分单元,用于根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
训练单元,用于基于所述第一阶段训练图像训练预设学习器,得到初始语义分割模型;
调整单元,用于根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
分析单元,用于接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
由以上技术方案可以看出,本申请通过所述物体对象对所述尾部类别图像进行多尺度裁剪,不仅能够确保每张裁剪图像中包含有所述物体对象,基于所述多张裁剪图像还能够提高尾部类别的图像数量,通过对每张裁剪图像进行增强处理以及所述融合图像的生成,能够进一步提高尾部类别的图像数量,进而根据所述融合图像及所述头部类别图像生成的训练图像对所述目标语义分割模型训练,能够避免对尾部类别或者头部类别进行过采样处理,提高了所述目标语义分割模型的分割准确性及鲁棒性,从而提高所述目标类别的准确性。此外,本申请先利用所述第一阶段训练图像训练所述初始语义分割模型,再利用所述第二阶段训练图像对所述预设参数进行调整,由于所述第一阶段训练图像中所包含的干扰信息量较少,因此确保所述初始语义分割模型能够充分学习所述头部类别图像上的信息,提高了所述目标语义分割模型的分割准确性。
附图说明
图1是本申请图像语义分割方法的较佳实施例的流程图。
图2是本申请图像语义分割装置的较佳实施例的功能模块图。
图3是本申请实现图像语义分割方法的较佳实施例的电子设备的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本申请进行详细描述。
如图1所示,是本申请图像语义分割方法的较佳实施例的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。
所述图像语义分割方法可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
所述图像语义分割方法应用于一个或者多个电子设备中,所述电子设备是一种能够按照事先设定或存储的计算机可读指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字信号处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述电子设备可以是任何一种可与用户进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能穿戴式设备等。
所述电子设备可以包括网络设备和/或用户设备。其中,所述网络设备包括,但不限于单个网络电子设备、多个网络电子设备组成的电子设备组或基于云计算(Cloud Computing)的由大量主机或网络电子设备构成的云。
所述电子设备所处的网络包括,但不限于:互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。
S10,从预设图像库中获取尾部类别图像及头部类别图像。
在本申请的至少一个实施例中,所述预设图像库中存储有多个预设类别的图像。其中,所述多个预设类别可以根据需求设定。每个预设类别可以用于表征该存储图像中的物体。例如,带有电车的图像,该图像的预设类别为:电车。所述预设图像库中存储的图像用于训练目标语义分割模型。
所述尾部类别图像是指样本数量小于需求数量的预设类别所对应的任一图像,其中,所述需求数量是根据所述预设图像库中最大样本数量与预设比例的乘积计算得到的。
所述头部类别图像是指所述预设图像库中最大样本数量的预设类别所对应的任一图像。
在本申请的至少一个实施例中,所述电子设备从预设图像库中获取尾部类别图像及头部类别图像包括:
计算所述预设图像库中每个预设类别的样本数量;
将取值最大的样本数量确定为第一数量,并将所述第一数量所对应的预设类别确定为第一类别;
根据所述第一类别从所述预设图像库中获取所述头部类别图像;
计算所述第一数量与预设比例的乘积,得到需求数量;
将取值小于所述需求数量的样本数量确定为第二数量,并将所述第二数量所对应的预设类别确定为第二类别;
根据所述第二类别从所述预设图像库中获取所述尾部类别图像。
其中,所述预设比例可以根据实际需求设定,例如,所述预设比例可以是0.5。
通过将最大样本数量的预设类别所对应的图像确定为所述头部类别图像,能够避免其余类别的样本数量与该类别的样本数量相差较大导致样本不均衡,通过所述预设比例对最大样本数量进行调整,能够生成符合需求的需求数量,从而能够避免样本数量较低的类别的遗漏,提高了所述尾部类别图像的全面性。
S11,根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像。
在本申请的至少一个实施例中,所述物体对象是指所述尾部类别图像中所包含的物体。所述物体对象可以是所述尾部类别图像的标注类别。
在本申请的至少一个实施例中,所述多张裁剪图像是指采用不同裁剪尺寸及缩放系数对所述尾部类别图像进行裁剪后所得到的图像。可以理解的是,所述裁剪尺寸及所述缩放系数的不同,任意一张尾部类别图像可以包含有相应的多张裁剪图像。
在本申请的至少一个实施例中,所述电子设备根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像包括:
获取所述尾部类别图像中的像素信息;
根据所述像素信息确定所述物体对象在所述尾部类别图像中的位置信息;
根据所述位置信息生成所述物体对象在所述尾部类别图像中的最小外接矩形;
根据所述尾部类别图像获取所述最小外接矩形中左上角的坐标信息,并获取所述最小外接矩形的矩形宽度及矩形高度;
计算所述坐标信息、所述矩形宽度及所述矩形高度,得到多个裁剪位置点,并分别计算所述矩形宽度及所述矩形高度,分别得到多个裁剪宽度及多个裁剪高度;
根据任一裁剪位置点、任一裁剪宽度及任一裁剪高度对所述尾部类别图像进行裁剪处理,得到所述多张裁剪图像。
其中,所述像素信息是指所述尾部类别图像中所有像素点在单通道上的像素值。
通过结合所述像素信息及所述物体对象能够准确的确定出所述位置信息,从而通过所述位置信息能够准确的生成所述最小外接矩形,提高所述多张裁剪图像的生成准确性,进而利用所述最小外接矩形中左上角的坐标信息、所述矩形宽度及所述矩形高度能够快速生成裁剪位置点、裁剪宽度及裁剪高度,提高所述多张裁剪图像的生成效率。
具体地,所述电子设备根据所述像素信息确定所述物体对象在所述尾部类别图像中的位置信息包括:
将所述尾部类别图像的标注信息确定为所述物体对象;
获取所述物体对象的对象灰度像素值;
将所述像素信息与所述对象灰度像素值进行比较,并将与所述对象灰度像素值相同的像素信息所对应的像素点确定为所述位置信息。
通过所述物体对象能够准确的获取到所述对象灰度像素值,进而利用所述对象灰度像素值与所述像素信息的比较,能够准确的确定出所述位置信息。
具体地,所述电子设备根据下列公式计算所述坐标信息、所述矩形宽度及所述矩形高度,得到多个裁剪位置点,并根据下列公式分别计算所述矩形宽度及所述矩形高度,分别得到多个裁剪宽度及多个裁剪高度:
x 2=x 1+(r+s*t)*w 1
y 2=y 1+(r+s*t)*h 1
w 2=w 1+2*(r+s*t)*w 1
h 2=h 1+2*(r+s*t)*h 1
0<r<1,s>1and t≥1;
其中,(x 2,y 2)是指任一裁剪位置点,(x 1,y 1)是指所述坐标信息,r、s是指缩放系数,t是指所述预设裁剪尺寸,w 1是指所述矩形宽度,h 1是指所述矩形高度,w 2是指任一裁剪宽度,h 2是指任一裁剪高度。
S12,对每张裁剪图像进行增强处理,得到多张增强图像。
在本申请的至少一个实施例中,每张裁剪图像的配置参数与基于该裁剪图像生成的多张增强图像中的配置参数不同,其中,所述配置参数可以包括,但不限于:对比度、饱和度。每张裁剪图像的物体形态与基于该裁剪图像生成的多张增强图像的物体形态相同。
在本申请的至少一个实施例中,所述电子设备基于Augmix算法对每张裁剪图像进行增强处理,得到多张增强图像。
本实施例中,通过Augmix算法对每张裁剪图像进行增强处理能够避免所述裁剪图像中像素的损失。
S13,根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像。
在本申请的至少一个实施例中,所述融合图像中包含任一裁剪图像的图像信息及基于该任一裁剪图像生成的多张增强图像的图像信息。
所述训练图像中包含所述融合图像的图像信息及所述头部类别图像的图像信息。
在本申请的至少一个实施例中,所述电子设备根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像包括:
获取每张增强图像中每个像素点的像素值,得到第一像素值,并获取每张增强图像的第一融合权重;
根据所述第一融合权重计算所述第一像素值,得到第二像素值;
获取每张裁剪图像中每个像素点的像素值,得到第三像素值,并获取该裁剪图像的第二融合权重;
根据所述第二融合权重计算所述第二像素值及所述第三像素值,得到目标像素值;
拼接所述目标像素值,得到所述融合图像。
其中,所述多张增强图像的第一融合权重的总和为1。
通过所述第一融合权重能够快速生成所述第二像素值,进而通过所述第二融合权重能够快速生成所述目标像素值,提高所述融合图像的融合效率。
在本申请的至少一个实施例中,所述电子设备根据所述融合图像及所述头部类别图像生成训练图像包括:
根据所述任一裁剪位置点确定所述头部类别图像中的替换位置点;
从所述头部类别图像中获取与所述替换位置点处于同一水平线的第一边缘位置点,并从所述头部类别图像中获取与所述替换位置点处于同一竖直线的第二边缘位置点;
根据所述第一边缘位置点及所述替换位置点计算所述头部类别图像的最大替换宽度,并根据所述第二边缘位置点及所述替换位置点计算所述头部类别图像的最大替换高度;
若所述最大替换宽度小于所述任一裁剪宽度,或者所述最大替换高度小于所述任一裁剪高度,调整所述替换位置点,得到目标位置点;
根据所述目标位置点、所述任一裁剪宽度及所述任一裁剪高度生成所述头部类别图像的图像区域;
基于所述融合图像替换所述图像区域,得到所述训练图像。
其中,所述替换位置点是指所述头部类别图像中坐标信息为所述任一裁剪位置点的 位置。
通过所述第一边缘位置点及所述第二边缘位置点分析所述替换位置点能够准确的确定出所述最大替换宽度及所述最大替换高度,从而能够避免所述融合图像替换所述图像区域时造成所述头部类别图像的溢出,提高所述训练图像的生成准确性。
S14,根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像。
在本申请的至少一个实施例中,所述第一阶段训练图像是指所述裁剪尺寸为1的裁剪图像所生成的训练图像,所述第二阶段训练图像是指所述裁剪尺寸大于1的裁剪图像所生成的训练图像。
在本申请的至少一个实施例中,所述电子设备根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像包括:
将所述预设裁剪尺寸为预设值的裁剪图像所生成的融合图像确定为目标融合图像;
将所述目标融合图像所生成的训练图像确定为所述第一阶段训练图像;
将所述训练图像中除所述第一阶段训练图像外的其余图像确定为所述第二阶段训练图像。
通过所述裁剪尺寸对所述训练图像的划分,能够快速生成第一阶段训练图像及第二阶段训练图像。
S15,基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型。
在本申请的至少一个实施例中,所述预设分类器可以是SVM支持向量机等分类算法构建成的。
所述初始语义分割模型是指对所述第一阶段训练图像进行训练后所生成的模型。
在本申请的至少一个实施例中,所述电子设备基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型包括:
获取所述第一阶段训练图像的标注结果;
根据所述第一阶段训练图像的图像像素对所述第一阶段训练图像进行映射处理,得到图像向量,并对所述标注结果进行映射处理,得到结果向量;
根据所述图像向量及所述结果向量训练所述预设分类器,直至所述第一阶段训练图像均参与训练,得到所述初始语义分割模型。
通过所述第一阶段训练图像训练所述预设学习器,能够使所述预设学习器充分学习所述头部类别图像中的信息。
S16,根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型。
在本申请的至少一个实施例中,所述预设参数是指所述预设分类器中预先设定好的网络值。
所述目标语义分割模型是指所述损失值不再降低时的初始语义分割模型。
在本申请的至少一个实施例中,所述第二阶段训练图像中包括第一类型图像及第二类型图像,所述电子设备根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型包括:
将所述第一类型图像中的任意两张图像分别输入至所述初始语义分割模型中,得到所述任意两张图像所对应的第一输出向量及第二输出向量,并将所述第二类型图像中的任意图像输入至所述初始语义分割模型中,得到第三输出向量;
根据下列公式计算所述第一输出向量、所述第二输出向量及所述第三输出向量,得到所述损失值:
Figure PCTCN2022071315-appb-000001
Figure PCTCN2022071315-appb-000002
其中,JS(p c,p m1,p m2)是指所述损失值,KL[p c|M]是指p c偏离M的程度,KL[p m1|M]是指p m1偏离M的程度,KL[p m2|M]是指p m2偏离M的程度,p m1是指所述第一输出向量,p m2是指所述第二输出向量,p c是指所述第三输出向量;
根据所述损失值调整所述预设参数,直至所述损失值不再降低,得到所述目标语义分割模型。
通过所述第一类型图像及所述第二类型图像中的图像对所述初始语义分割模型的损失值进行分析,进而根据所述损失值调整所述预设参数,能够提高所述目标语义分割模型的预测能力。
S17,接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
在本申请的至少一个实施例中,所述待分类图像是指需要进行类别标注的图像。
所述目标类别是指所述待分类图像所属的类型,所述目标类别可以是所述待分类图像中所带有的物体。
需要强调的是,为进一步保证上述目标类别的私密和安全性,上述目标类别还可以存储于一区块链的节点中。
在本申请的至少一个实施例中,所述电子设备对所述待分类图像进行向量化处理,得到待分类向量,并将所述待分类向量输入至所述目标语义分割模型中,得到类别向量,将所述类别向量中取值最大的维度所对应的类别确定为所述目标类别。
通过所述目标语义分割模型能够准确的生成所述目标类别。
由以上技术方案可以看出,本申请通过所述物体对象对所述尾部类别图像进行多尺度裁剪,不仅能够确保每张裁剪图像中包含有所述物体对象,基于所述多张裁剪图像还能够提高尾部类别的图像数量,通过对每张裁剪图像进行增强处理以及所述融合图像的生成,能够进一步提高尾部类别的图像数量,进而根据所述融合图像及所述头部类别图像生成的训练图像对所述目标语义分割模型训练,能够避免对尾部类别或者头部类别进行过采样处理,提高了所述目标语义分割模型的分割准确性及鲁棒性,从而提高所述目标类别的准确性。此外,本申请先利用所述第一阶段训练图像训练所述初始语义分割模型,再利用所述第二阶段训练图像对所述预设参数进行调整,由于所述第一阶段训练图像中所包含的干扰信息量较少,因此确保所述初始语义分割模型能够充分学习所述头部类别图像上的信息,提高了所述目标语义分割模型的分割准确性。
如图2所示,是本申请图像语义分割装置的较佳实施例的功能模块图。所述图像语义分割装置11包括获取单元110、裁剪单元111、增强单元112、生成单元113、划分单元114、训练单元115、调整单元116及分析单元117。本申请所称的模块/单元是指一种能够被处理器13所获取,并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器12中。在本实施例中,关于各模块/单元的功能将在后续的实施例中详述。
获取单元110从预设图像库中获取尾部类别图像及头部类别图像。
在本申请的至少一个实施例中,所述预设图像库中存储有多个预设类别的图像。其中,所述多个预设类别可以根据需求设定。每个预设类别可以用于表征该存储图像中的物体。例如,带有电车的图像,该图像的预设类别为:电车。所述预设图像库中存储的图像用于训练目标语义分割模型。
所述尾部类别图像是指样本数量小于需求数量的预设类别所对应的任一图像,其中,所述需求数量是根据所述预设图像库中最大样本数量与预设比例的乘积计算得到的。
所述头部类别图像是指所述预设图像库中最大样本数量的预设类别所对应的任一图像。
在本申请的至少一个实施例中,所述获取单元110从预设图像库中获取尾部类别图 像及头部类别图像包括:
计算所述预设图像库中每个预设类别的样本数量;
将取值最大的样本数量确定为第一数量,并将所述第一数量所对应的预设类别确定为第一类别;
根据所述第一类别从所述预设图像库中获取所述头部类别图像;
计算所述第一数量与预设比例的乘积,得到需求数量;
将取值小于所述需求数量的样本数量确定为第二数量,并将所述第二数量所对应的预设类别确定为第二类别;
根据所述第二类别从所述预设图像库中获取所述尾部类别图像。
其中,所述预设比例可以根据实际需求设定,例如,所述预设比例可以是0.5。
通过将最大样本数量的预设类别所对应的图像确定为所述头部类别图像,能够避免其余类别的样本数量与该类别的样本数量相差较大导致样本不均衡,通过所述预设比例对最大样本数量进行调整,能够生成符合需求的需求数量,从而能够避免样本数量较低的类别的遗漏,提高了所述尾部类别图像的全面性。
裁剪单元111根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像。
在本申请的至少一个实施例中,所述物体对象是指所述尾部类别图像中所包含的物体。所述物体对象可以是所述尾部类别图像的标注类别。
在本申请的至少一个实施例中,所述多张裁剪图像是指采用不同裁剪尺寸及缩放系数对所述尾部类别图像进行裁剪后所得到的图像。可以理解的是,所述裁剪尺寸及所述缩放系数的不同,任意一张尾部类别图像可以包含有相应的多张裁剪图像。
在本申请的至少一个实施例中,所述裁剪单元111根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像包括:
获取所述尾部类别图像中的像素信息;
根据所述像素信息确定所述物体对象在所述尾部类别图像中的位置信息;
根据所述位置信息生成所述物体对象在所述尾部类别图像中的最小外接矩形;
根据所述尾部类别图像获取所述最小外接矩形中左上角的坐标信息,并获取所述最小外接矩形的矩形宽度及矩形高度;
计算所述坐标信息、所述矩形宽度及所述矩形高度,得到多个裁剪位置点,并分别计算所述矩形宽度及所述矩形高度,分别得到多个裁剪宽度及多个裁剪高度;
根据任一裁剪位置点、任一裁剪宽度及任一裁剪高度对所述尾部类别图像进行裁剪处理,得到所述多张裁剪图像。
其中,所述像素信息是指所述尾部类别图像中所有像素点在单通道上的像素值。
通过结合所述像素信息及所述物体对象能够准确的确定出所述位置信息,从而通过所述位置信息能够准确的生成所述最小外接矩形,提高所述多张裁剪图像的生成准确性,进而利用所述最小外接矩形中左上角的坐标信息、所述矩形宽度及所述矩形高度能够快速生成裁剪位置点、裁剪宽度及裁剪高度,提高所述多张裁剪图像的生成效率。
具体地,所述裁剪单元111根据所述像素信息确定所述物体对象在所述尾部类别图像中的位置信息包括:
将所述尾部类别图像的标注信息确定为所述物体对象;
获取所述物体对象的对象灰度像素值;
将所述像素信息与所述对象灰度像素值进行比较,并将与所述对象灰度像素值相同的像素信息所对应的像素点确定为所述位置信息。
通过所述物体对象能够准确的获取到所述对象灰度像素值,进而利用所述对象灰度像素值与所述像素信息的比较,能够准确的确定出所述位置信息。
具体地,所述裁剪单元111根据下列公式计算所述坐标信息、所述矩形宽度及所述 矩形高度,得到多个裁剪位置点,并根据下列公式分别计算所述矩形宽度及所述矩形高度,分别得到多个裁剪宽度及多个裁剪高度:
x 2=x 1+(r+s*t)*w 1
y 2=y 1+(r+s*t)*h 1
w 2=w 1+2*(r+s*t)*w 1
h 2=h 1+2*(r+s*t)*h 1
0<r<1,s>1and t≥1;
其中,(x 2,y 2)是指任一裁剪位置点,(x 1,y 1)是指所述坐标信息,r、s是指缩放系数,t是指所述预设裁剪尺寸,w 1是指所述矩形宽度,h 1是指所述矩形高度,w 2是指任一裁剪宽度,h 2是指任一裁剪高度。
增强单元112对每张裁剪图像进行增强处理,得到多张增强图像。
在本申请的至少一个实施例中,每张裁剪图像的配置参数与基于该裁剪图像生成的多张增强图像中的配置参数不同,其中,所述配置参数可以包括,但不限于:对比度、饱和度。每张裁剪图像的物体形态与基于该裁剪图像生成的多张增强图像的物体形态相同。
在本申请的至少一个实施例中,所述增强单元112基于Augmix算法对每张裁剪图像进行增强处理,得到多张增强图像。
本实施例中,通过Augmix算法对每张裁剪图像进行增强处理能够避免所述裁剪图像中像素的损失。
生成单元113根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像。
在本申请的至少一个实施例中,所述融合图像中包含任一裁剪图像的图像信息及基于该任一裁剪图像生成的多张增强图像的图像信息。
所述训练图像中包含所述融合图像的图像信息及所述头部类别图像的图像信息。
在本申请的至少一个实施例中,所述生成单元113根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像包括:
获取每张增强图像中每个像素点的像素值,得到第一像素值,并获取每张增强图像的第一融合权重;
根据所述第一融合权重计算所述第一像素值,得到第二像素值;
获取每张裁剪图像中每个像素点的像素值,得到第三像素值,并获取该裁剪图像的第二融合权重;
根据所述第二融合权重计算所述第二像素值及所述第三像素值,得到目标像素值;
拼接所述目标像素值,得到所述融合图像。
其中,所述多张增强图像的第一融合权重的总和为1。
通过所述第一融合权重能够快速生成所述第二像素值,进而通过所述第二融合权重能够快速生成所述目标像素值,提高所述融合图像的融合效率。
在本申请的至少一个实施例中,所述生成单元113根据所述融合图像及所述头部类别图像生成训练图像包括:
根据所述任一裁剪位置点确定所述头部类别图像中的替换位置点;
从所述头部类别图像中获取与所述替换位置点处于同一水平线的第一边缘位置点,并从所述头部类别图像中获取与所述替换位置点处于同一竖直线的第二边缘位置点;
根据所述第一边缘位置点及所述替换位置点计算所述头部类别图像的最大替换宽度,并根据所述第二边缘位置点及所述替换位置点计算所述头部类别图像的最大替换高度;
若所述最大替换宽度小于所述任一裁剪宽度,或者所述最大替换高度小于所述任一裁剪高度,调整所述替换位置点,得到目标位置点;
根据所述目标位置点、所述任一裁剪宽度及所述任一裁剪高度生成所述头部类别图像的图像区域;
基于所述融合图像替换所述图像区域,得到所述训练图像。
其中,所述替换位置点是指所述头部类别图像中坐标信息为所述任一裁剪位置点的位置。
通过所述第一边缘位置点及所述第二边缘位置点分析所述替换位置点能够准确的确定出所述最大替换宽度及所述最大替换高度,从而能够避免所述融合图像替换所述图像区域时造成所述头部类别图像的溢出,提高所述训练图像的生成准确性。
划分单元114根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像。
在本申请的至少一个实施例中,所述第一阶段训练图像是指所述裁剪尺寸为1的裁剪图像所生成的训练图像,所述第二阶段训练图像是指所述裁剪尺寸大于1的裁剪图像所生成的训练图像。
在本申请的至少一个实施例中,所述划分单元114根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像包括:
将所述预设裁剪尺寸为预设值的裁剪图像所生成的融合图像确定为目标融合图像;
将所述目标融合图像所生成的训练图像确定为所述第一阶段训练图像;
将所述训练图像中除所述第一阶段训练图像外的其余图像确定为所述第二阶段训练图像。
通过所述裁剪尺寸对所述训练图像的划分,能够快速生成第一阶段训练图像及第二阶段训练图像。
训练单元115基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型。
在本申请的至少一个实施例中,所述预设分类器可以是SVM支持向量机等分类算法构建成的。
所述初始语义分割模型是指对所述第一阶段训练图像进行训练后所生成的模型。
在本申请的至少一个实施例中,所述训练单元115基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型包括:
获取所述第一阶段训练图像的标注结果;
根据所述第一阶段训练图像的图像像素对所述第一阶段训练图像进行映射处理,得到图像向量,并对所述标注结果进行映射处理,得到结果向量;
根据所述图像向量及所述结果向量训练所述预设分类器,直至所述第一阶段训练图像均参与训练,得到所述初始语义分割模型。
通过所述第一阶段训练图像训练所述预设学习器,能够使所述预设学习器充分学习所述头部类别图像中的信息。
调整单元116根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型。
在本申请的至少一个实施例中,所述预设参数是指所述预设分类器中预先设定好的网络值。
所述目标语义分割模型是指所述损失值不再降低时的初始语义分割模型。
在本申请的至少一个实施例中,所述第二阶段训练图像中包括第一类型图像及第二类型图像,所述调整单元116根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型包括:
将所述第一类型图像中的任意两张图像分别输入至所述初始语义分割模型中,得到所述任意两张图像所对应的第一输出向量及第二输出向量,并将所述第二类型图像中的 任意图像输入至所述初始语义分割模型中,得到第三输出向量;
根据下列公式计算所述第一输出向量、所述第二输出向量及所述第三输出向量,得到所述损失值:
Figure PCTCN2022071315-appb-000003
Figure PCTCN2022071315-appb-000004
其中,JS(p c,p m1,p m2)是指所述损失值,KL[p c|M]是指p c偏离M的程度,KL[p m1|M]是指p m1偏离M的程度,KL[p m2|M]是指p m2偏离M的程度,p m1是指所述第一输出向量,p m2是指所述第二输出向量,p c是指所述第三输出向量;
根据所述损失值调整所述预设参数,直至所述损失值不再降低,得到所述目标语义分割模型。
通过所述第一类型图像及所述第二类型图像中的图像对所述初始语义分割模型的损失值进行分析,进而根据所述损失值调整所述预设参数,能够提高所述目标语义分割模型的预测能力。
分析单元117接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
在本申请的至少一个实施例中,所述待分类图像是指需要进行类别标注的图像。
所述目标类别是指所述待分类图像所属的类型,所述目标类别可以是所述待分类图像中所带有的物体。
需要强调的是,为进一步保证上述目标类别的私密和安全性,上述目标类别还可以存储于一区块链的节点中。
在本申请的至少一个实施例中,所述分析单元117对所述待分类图像进行向量化处理,得到待分类向量,并将所述待分类向量输入至所述目标语义分割模型中,得到类别向量,将所述类别向量中取值最大的维度所对应的类别确定为所述目标类别。
通过所述目标语义分割模型能够准确的生成所述目标类别。
由以上技术方案可以看出,本申请通过所述物体对象对所述尾部类别图像进行多尺度裁剪,不仅能够确保每张裁剪图像中包含有所述物体对象,基于所述多张裁剪图像还能够提高尾部类别的图像数量,通过对每张裁剪图像进行增强处理以及所述融合图像的生成,能够进一步提高尾部类别的图像数量,进而根据所述融合图像及所述头部类别图像生成的训练图像对所述目标语义分割模型训练,能够避免对尾部类别或者头部类别进行过采样处理,提高了所述目标语义分割模型的分割准确性及鲁棒性,从而提高所述目标类别的准确性。此外,本申请先利用所述第一阶段训练图像训练所述初始语义分割模型,再利用所述第二阶段训练图像对所述预设参数进行调整,由于所述第一阶段训练图像中所包含的干扰信息量较少,因此确保所述初始语义分割模型能够充分学习所述头部类别图像上的信息,提高了所述目标语义分割模型的分割准确性。
如图3所示,是本申请实现图像语义分割方法的较佳实施例的电子设备的结构示意图。
在本申请的一个实施例中,所述电子设备1包括,但不限于,存储器12、处理器13,以及存储在所述存储器12中并可在所述处理器13上运行的计算机可读指令,例如图像语义分割程序。
本领域技术人员可以理解,所述示意图仅仅是电子设备1的示例,并不构成对电子设备1的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备1还可以包括输入输出设备、网络接入设备、总线等。
所述处理器13可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array, FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器13是所述电子设备1的运算核心和控制中心,利用各种接口和线路连接整个电子设备1的各个部分,及执行所述电子设备1的操作系统以及安装的各类应用程序、程序代码等。
示例性的,所述计算机可读指令可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器12中,并由所述处理器13执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该计算机可读指令段用于描述所述计算机可读指令在所述电子设备1中的执行过程。例如,所述计算机可读指令可以被分割成获取单元110、裁剪单元111、增强单元112、生成单元113、划分单元114、训练单元115、调整单元116及分析单元117。
所述存储器12可用于存储所述计算机可读指令和/或模块,所述处理器13通过运行或执行存储在所述存储器12内的计算机可读指令和/或模块,以及调用存储在存储器12内的数据,实现所述电子设备1的各种功能。所述存储器12可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。存储器12可以包括非易失性和易失性存储器,例如:硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他存储器件。
所述存储器12可以是电子设备1的外部存储器和/或内部存储器。进一步地,所述存储器12可以是具有实物形式的存储器,如内存条、TF卡(Trans-flash Card)等等。
所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性的存储介质,也可以是易失性的存储介质。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。
其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
结合图1,所述电子设备1中的所述存储器12存储计算机可读指令实现一种图像语义分割方法,所述处理器13可执行所述计算机可读指令从而实现:
从预设图像库中获取尾部类别图像及头部类别图像;
根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
对每张裁剪图像进行增强处理,得到多张增强图像;
根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
具体地,所述处理器13对上述计算机可读指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述计算机可读存储介质上存储有计算机可读指令,其中,所述计算机可读指令被处理器13执行时用以实现以下步骤:
从预设图像库中获取尾部类别图像及头部类别图像;
根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
对每张裁剪图像进行增强处理,得到多张增强图像;
根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。所述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一、第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种图像语义分割方法,其中,所述图像语义分割方法包括:
    从预设图像库中获取尾部类别图像及头部类别图像;
    根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
    对每张裁剪图像进行增强处理,得到多张增强图像;
    根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
    根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
    基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
    根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
    接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
  2. 如权利要求1所述的图像语义分割方法,其中,所述从预设图像库中获取尾部类别图像及头部类别图像包括:
    计算所述预设图像库中每个预设类别的样本数量;
    将取值最大的样本数量确定为第一数量,并将所述第一数量所对应的预设类别确定为第一类别;
    根据所述第一类别从所述预设图像库中获取所述头部类别图像;
    计算所述第一数量与预设比例的乘积,得到需求数量;
    将取值小于所述需求数量的样本数量确定为第二数量,并将所述第二数量所对应的预设类别确定为第二类别;
    根据所述第二类别从所述预设图像库中获取所述尾部类别图像。
  3. 如权利要求1所述的图像语义分割方法,其中,所述根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像包括:
    获取所述尾部类别图像中的像素信息;
    根据所述像素信息确定所述物体对象在所述尾部类别图像中的位置信息;
    根据所述位置信息生成所述物体对象在所述尾部类别图像中的最小外接矩形;
    根据所述尾部类别图像获取所述最小外接矩形中左上角的坐标信息,并获取所述最小外接矩形的矩形宽度及矩形高度;
    计算所述坐标信息、所述矩形宽度及所述矩形高度,得到多个裁剪位置点,并分别计算所述矩形宽度及所述矩形高度,分别得到多个裁剪宽度及多个裁剪高度;
    根据任一裁剪位置点、任一裁剪宽度及任一裁剪高度对所述尾部类别图像进行裁剪处理,得到所述多张裁剪图像。
  4. 如权利要求3所述的图像语义分割方法,其中,所述根据所述融合图像及所述头部类别图像生成训练图像包括:
    根据所述任一裁剪位置点确定所述头部类别图像中的替换位置点;
    从所述头部类别图像中获取与所述替换位置点处于同一水平线的第一边缘位置点,并从所述头部类别图像中获取与所述替换位置点处于同一竖直线的第二边缘位置点;
    根据所述第一边缘位置点及所述替换位置点计算所述头部类别图像的最大替换宽度,并根据所述第二边缘位置点及所述替换位置点计算所述头部类别图像的最大替换高度;
    若所述最大替换宽度小于所述任一裁剪宽度,或者所述最大替换高度小于所述任一 裁剪高度,调整所述替换位置点,得到目标位置点;
    根据所述目标位置点、所述任一裁剪宽度及所述任一裁剪高度生成所述头部类别图像的图像区域;
    基于所述融合图像替换所述图像区域,得到所述训练图像。
  5. 如权利要求1所述的图像语义分割方法,其中,所述根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像包括:
    获取每张增强图像中每个像素点的像素值,得到第一像素值,并获取每张增强图像的第一融合权重;
    根据所述第一融合权重计算所述第一像素值,得到第二像素值;
    获取每张裁剪图像中每个像素点的像素值,得到第三像素值,并获取该裁剪图像的第二融合权重;
    根据所述第二融合权重计算所述第二像素值及所述第三像素值,得到目标像素值;
    拼接所述目标像素值,得到所述融合图像。
  6. 如权利要求1所述的图像语义分割方法,其中,所述根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像包括:
    将所述预设裁剪尺寸为预设值的裁剪图像所生成的融合图像确定为目标融合图像;
    将所述目标融合图像所生成的训练图像确定为所述第一阶段训练图像;
    将所述训练图像中除所述第一阶段训练图像外的其余图像确定为所述第二阶段训练图像。
  7. 如权利要求1所述的图像语义分割方法,其中,所述第二阶段训练图像中包括第一类型图像及第二类型图像,所述根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型包括:
    将所述第一类型图像中的任意两张图像分别输入至所述初始语义分割模型中,得到所述任意两张图像所对应的第一输出向量及第二输出向量,并将所述第二类型图像中的任意图像输入至所述初始语义分割模型中,得到第三输出向量;
    根据下列公式计算所述第一输出向量、所述第二输出向量及所述第三输出向量,得到所述损失值:
    Figure PCTCN2022071315-appb-100001
    Figure PCTCN2022071315-appb-100002
    其中,JS(p c,p m1,p m2)是指所述损失值,KL[p c|M]是指p c偏离M的程度,KL[p m1|M]是指p m1偏离M的程度,KL[p m2|M]是指p m2偏离M的程度,p m1是指所述第一输出向量,p m2是指所述第二输出向量,p c是指所述第三输出向量;
    根据所述损失值调整所述预设参数,直至所述损失值不再降低,得到所述目标语义分割模型。
  8. 一种图像语义分割装置,其中,所述图像语义分割装置包括:
    获取单元,用于从预设图像库中获取尾部类别图像及头部类别图像;
    裁剪单元,用于根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
    增强单元,用于对每张裁剪图像进行增强处理,得到多张增强图像;
    生成单元,用于根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
    划分单元,用于根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
    训练单元,用于基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
    调整单元,用于根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
    分析单元,用于接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
  9. 一种电子设备,其中,所述电子设备包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令以实现以下步骤:
    从预设图像库中获取尾部类别图像及头部类别图像;
    根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
    对每张裁剪图像进行增强处理,得到多张增强图像;
    根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
    根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
    基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
    根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
    接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
  10. 根据权利要求9所述的电子设备,其中,在所述从预设图像库中获取尾部类别图像及头部类别图像时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    计算所述预设图像库中每个预设类别的样本数量;
    将取值最大的样本数量确定为第一数量,并将所述第一数量所对应的预设类别确定为第一类别;
    根据所述第一类别从所述预设图像库中获取所述头部类别图像;
    计算所述第一数量与预设比例的乘积,得到需求数量;
    将取值小于所述需求数量的样本数量确定为第二数量,并将所述第二数量所对应的预设类别确定为第二类别;
    根据所述第二类别从所述预设图像库中获取所述尾部类别图像。
  11. 根据权利要求9所述的电子设备,其中,在所述根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    获取所述尾部类别图像中的像素信息;
    根据所述像素信息确定所述物体对象在所述尾部类别图像中的位置信息;
    根据所述位置信息生成所述物体对象在所述尾部类别图像中的最小外接矩形;
    根据所述尾部类别图像获取所述最小外接矩形中左上角的坐标信息,并获取所述最小外接矩形的矩形宽度及矩形高度;
    计算所述坐标信息、所述矩形宽度及所述矩形高度,得到多个裁剪位置点,并分别计算所述矩形宽度及所述矩形高度,分别得到多个裁剪宽度及多个裁剪高度;
    根据任一裁剪位置点、任一裁剪宽度及任一裁剪高度对所述尾部类别图像进行裁剪处理,得到所述多张裁剪图像。
  12. 根据权利要求11所述的电子设备,其中,在根据所述融合图像及所述头部类别图像生成训练图像时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    根据所述任一裁剪位置点确定所述头部类别图像中的替换位置点;
    从所述头部类别图像中获取与所述替换位置点处于同一水平线的第一边缘位置点,并从所述头部类别图像中获取与所述替换位置点处于同一竖直线的第二边缘位置点;
    根据所述第一边缘位置点及所述替换位置点计算所述头部类别图像的最大替换宽度,并根据所述第二边缘位置点及所述替换位置点计算所述头部类别图像的最大替换高度;
    若所述最大替换宽度小于所述任一裁剪宽度,或者所述最大替换高度小于所述任一裁剪高度,调整所述替换位置点,得到目标位置点;
    根据所述目标位置点、所述任一裁剪宽度及所述任一裁剪高度生成所述头部类别图像的图像区域;
    基于所述融合图像替换所述图像区域,得到所述训练图像。
  13. 根据权利要求9所述的电子设备,其中,在所述根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    获取每张增强图像中每个像素点的像素值,得到第一像素值,并获取每张增强图像的第一融合权重;
    根据所述第一融合权重计算所述第一像素值,得到第二像素值;
    获取每张裁剪图像中每个像素点的像素值,得到第三像素值,并获取该裁剪图像的第二融合权重;
    根据所述第二融合权重计算所述第二像素值及所述第三像素值,得到目标像素值;
    拼接所述目标像素值,得到所述融合图像。
  14. 根据权利要求9所述的电子设备,其中,在所述根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    将所述预设裁剪尺寸为预设值的裁剪图像所生成的融合图像确定为目标融合图像;
    将所述目标融合图像所生成的训练图像确定为所述第一阶段训练图像;
    将所述训练图像中除所述第一阶段训练图像外的其余图像确定为所述第二阶段训练图像。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:
    从预设图像库中获取尾部类别图像及头部类别图像;
    根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像;
    对每张裁剪图像进行增强处理,得到多张增强图像;
    根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像,并根据所述融合图像及所述头部类别图像生成训练图像;
    根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像;
    基于所述第一阶段训练图像训练预设分类器,得到初始语义分割模型;
    根据所述第二阶段训练图像对所述初始语义分割模型中的预设参数进行调整,直至所述初始语义分割模型的损失值不再降低,得到目标语义分割模型;
    接收待分类图像,并根据所述目标语义分割模型分析所述待分类图像,得到所述待分类图像的目标类别。
  16. 根据权利要求15所述的存储介质,其中,在所述从预设图像库中获取尾部类别图像及头部类别图像时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    计算所述预设图像库中每个预设类别的样本数量;
    将取值最大的样本数量确定为第一数量,并将所述第一数量所对应的预设类别确定为第一类别;
    根据所述第一类别从所述预设图像库中获取所述头部类别图像;
    计算所述第一数量与预设比例的乘积,得到需求数量;
    将取值小于所述需求数量的样本数量确定为第二数量,并将所述第二数量所对应的预设类别确定为第二类别;
    根据所述第二类别从所述预设图像库中获取所述尾部类别图像。
  17. 根据权利要求15所述的存储介质,其中,在所述根据所述尾部类别图像中的物体对象对所述尾部类别图像进行多尺度裁剪,得到多张裁剪图像时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    获取所述尾部类别图像中的像素信息;
    根据所述像素信息确定所述物体对象在所述尾部类别图像中的位置信息;
    根据所述位置信息生成所述物体对象在所述尾部类别图像中的最小外接矩形;
    根据所述尾部类别图像获取所述最小外接矩形中左上角的坐标信息,并获取所述最小外接矩形的矩形宽度及矩形高度;
    计算所述坐标信息、所述矩形宽度及所述矩形高度,得到多个裁剪位置点,并分别计算所述矩形宽度及所述矩形高度,分别得到多个裁剪宽度及多个裁剪高度;
    根据任一裁剪位置点、任一裁剪宽度及任一裁剪高度对所述尾部类别图像进行裁剪处理,得到所述多张裁剪图像。
  18. 根据权利要求17所述的存储介质,其中,在所述根据所述融合图像及所述头部类别图像生成训练图像时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    根据所述任一裁剪位置点确定所述头部类别图像中的替换位置点;
    从所述头部类别图像中获取与所述替换位置点处于同一水平线的第一边缘位置点,并从所述头部类别图像中获取与所述替换位置点处于同一竖直线的第二边缘位置点;
    根据所述第一边缘位置点及所述替换位置点计算所述头部类别图像的最大替换宽度,并根据所述第二边缘位置点及所述替换位置点计算所述头部类别图像的最大替换高度;
    若所述最大替换宽度小于所述任一裁剪宽度,或者所述最大替换高度小于所述任一裁剪高度,调整所述替换位置点,得到目标位置点;
    根据所述目标位置点、所述任一裁剪宽度及所述任一裁剪高度生成所述头部类别图像的图像区域;
    基于所述融合图像替换所述图像区域,得到所述训练图像。
  19. 根据权利要求15所述的存储介质,其中,在所述根据每张裁剪图像及所述多张增强图像生成所述尾部类别图像的融合图像时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    获取每张增强图像中每个像素点的像素值,得到第一像素值,并获取每张增强图像的第一融合权重;
    根据所述第一融合权重计算所述第一像素值,得到第二像素值;
    获取每张裁剪图像中每个像素点的像素值,得到第三像素值,并获取该裁剪图像的第二融合权重;
    根据所述第二融合权重计算所述第二像素值及所述第三像素值,得到目标像素值;
    拼接所述目标像素值,得到所述融合图像。
  20. 根据权利要求15所述的存储介质,其中,在所述根据预设裁剪尺寸划分所述训练图像,得到第一阶段训练图像及第二阶段训练图像时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    将所述预设裁剪尺寸为预设值的裁剪图像所生成的融合图像确定为目标融合图像;
    将所述目标融合图像所生成的训练图像确定为所述第一阶段训练图像;
    将所述训练图像中除所述第一阶段训练图像外的其余图像确定为所述第二阶段训练图像。
PCT/CN2022/071315 2021-09-29 2022-01-11 图像语义分割方法、装置、设备及存储介质 WO2023050651A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111152660.8 2021-09-29
CN202111152660.8A CN113689436B (zh) 2021-09-29 2021-09-29 图像语义分割方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023050651A1 true WO2023050651A1 (zh) 2023-04-06

Family

ID=78587391

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071315 WO2023050651A1 (zh) 2021-09-29 2022-01-11 图像语义分割方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN113689436B (zh)
WO (1) WO2023050651A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117422732A (zh) * 2023-12-18 2024-01-19 湖南自兴智慧医疗科技有限公司 病理学图像分割方法及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113689436B (zh) * 2021-09-29 2024-02-02 平安科技(深圳)有限公司 图像语义分割方法、装置、设备及存储介质
CN114399512A (zh) * 2022-01-21 2022-04-26 平安科技(深圳)有限公司 基于人工智能的实例分割模型训练方法、装置、存储介质
CN116052094B (zh) * 2023-03-07 2023-06-09 浙江华是科技股份有限公司 一种船舶检测方法、系统及计算机存储介质

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491889A (zh) * 2018-04-02 2018-09-04 深圳市易成自动驾驶技术有限公司 图像语义分割方法、装置及计算机可读存储介质
CN109410220A (zh) * 2018-10-16 2019-03-01 腾讯科技(深圳)有限公司 图像分割方法、装置、计算机设备及存储介质
CN109544468A (zh) * 2018-10-26 2019-03-29 浙江师范大学 一种图像数据扩增方法
US20190295260A1 (en) * 2016-10-31 2019-09-26 Konica Minolta Laboratory U.S.A., Inc. Method and system for image segmentation using controlled feedback
CN110689544A (zh) * 2019-09-06 2020-01-14 哈尔滨工程大学 一种遥感图像细弱目标分割方法
CN111402278A (zh) * 2020-02-21 2020-07-10 华为技术有限公司 分割模型训练方法、图像标注方法及相关装置
CN111598095A (zh) * 2020-03-09 2020-08-28 浙江工业大学 一种基于深度学习的城市道路场景语义分割方法
CN112270653A (zh) * 2020-10-27 2021-01-26 中国计量大学 一种针对图像样本不平衡的数据增强方法
CN113689436A (zh) * 2021-09-29 2021-11-23 平安科技(深圳)有限公司 图像语义分割方法、装置、设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287954A (zh) * 2019-07-24 2021-01-29 华为技术有限公司 图像分类方法、图像分类模型的训练方法及其装置
CN111696112B (zh) * 2020-06-15 2023-04-07 携程计算机技术(上海)有限公司 图像自动裁剪方法、系统、电子设备及存储介质

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190295260A1 (en) * 2016-10-31 2019-09-26 Konica Minolta Laboratory U.S.A., Inc. Method and system for image segmentation using controlled feedback
CN108491889A (zh) * 2018-04-02 2018-09-04 深圳市易成自动驾驶技术有限公司 图像语义分割方法、装置及计算机可读存储介质
CN109410220A (zh) * 2018-10-16 2019-03-01 腾讯科技(深圳)有限公司 图像分割方法、装置、计算机设备及存储介质
CN109544468A (zh) * 2018-10-26 2019-03-29 浙江师范大学 一种图像数据扩增方法
CN110689544A (zh) * 2019-09-06 2020-01-14 哈尔滨工程大学 一种遥感图像细弱目标分割方法
CN111402278A (zh) * 2020-02-21 2020-07-10 华为技术有限公司 分割模型训练方法、图像标注方法及相关装置
CN111598095A (zh) * 2020-03-09 2020-08-28 浙江工业大学 一种基于深度学习的城市道路场景语义分割方法
CN112270653A (zh) * 2020-10-27 2021-01-26 中国计量大学 一种针对图像样本不平衡的数据增强方法
CN113689436A (zh) * 2021-09-29 2021-11-23 平安科技(深圳)有限公司 图像语义分割方法、装置、设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Master Thesis", 20 May 2020, CN, article ZHANG, ZHEHAN: "Research on Remote Sensing Image Segmentation Method Based on Encoder-Decoder Convolutional Neural Network", pages: 1 - 71, XP009544952, DOI: 10.27517/d.cnki.gzkju.2020.001381 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117422732A (zh) * 2023-12-18 2024-01-19 湖南自兴智慧医疗科技有限公司 病理学图像分割方法及装置
CN117422732B (zh) * 2023-12-18 2024-02-23 湖南自兴智慧医疗科技有限公司 病理学图像分割方法及装置

Also Published As

Publication number Publication date
CN113689436A (zh) 2021-11-23
CN113689436B (zh) 2024-02-02

Similar Documents

Publication Publication Date Title
WO2023050651A1 (zh) 图像语义分割方法、装置、设备及存储介质
US11348249B2 (en) Training method for image semantic segmentation model and server
CN109583483B (zh) 一种基于卷积神经网络的目标检测方法和系统
CN108197618B (zh) 用于生成人脸检测模型的方法和装置
CN110705583A (zh) 细胞检测模型训练方法、装置、计算机设备及存储介质
CN111582021A (zh) 场景图像中的文本检测方法、装置及计算机设备
WO2023050650A1 (zh) 动画视频生成方法、装置、设备及存储介质
WO2019119396A1 (zh) 人脸表情识别方法及装置
US11017266B2 (en) Aggregated image annotation
WO2020244151A1 (zh) 图像处理方法、装置、终端及存储介质
EP4095758A1 (en) Training large-scale vision transformer neural networks
CN111144215A (zh) 图像处理方法、装置、电子设备及存储介质
CN116843901A (zh) 医学图像分割模型训练方法和医学图像分割方法
CN111292334A (zh) 一种全景图像分割方法、装置及电子设备
CN115270184A (zh) 视频脱敏、车辆的视频脱敏方法、车载处理系统
KR20190044761A (ko) 이미지 처리 장치 및 방법
WO2023109086A1 (zh) 文字识别方法、装置、设备及存储介质
CN112541436B (zh) 专注度分析方法、装置、电子设备及计算机存储介质
US11481577B2 (en) Machine learning (ML) quality assurance for data curation
CN113850632A (zh) 用户类别确定方法、装置、设备及存储介质
CN114842205B (zh) 车损检测方法、装置、设备及存储介质
TWI830982B (zh) 基於紋理分類的圖像識別方法、電子裝置及存儲介質
CN111597373B (zh) 基于卷积神经网络和连通图的图片归类方法及相关设备
US11995835B2 (en) Pixel-level object detection system and program thereof
JP7335204B2 (ja) 画像処理装置、画像処理方法及び画像処理プログラム

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE