WO2021189827A1 - 识别模糊图像的方法、装置、设备及计算机可读存储介质 - Google Patents

识别模糊图像的方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2021189827A1
WO2021189827A1 PCT/CN2020/121568 CN2020121568W WO2021189827A1 WO 2021189827 A1 WO2021189827 A1 WO 2021189827A1 CN 2020121568 W CN2020121568 W CN 2020121568W WO 2021189827 A1 WO2021189827 A1 WO 2021189827A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
images
training
judged
fuzzy
Prior art date
Application number
PCT/CN2020/121568
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 WO2021189827A1 publication Critical patent/WO2021189827A1/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/23Clustering techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • This application relates to the field of image processing technology, and in particular to a method, device, electronic equipment, and computer-readable storage medium for recognizing blurred images.
  • a method for recognizing blurred images includes:
  • the multiple images to be determined after zooming are input to the second image blur determination model for blur determination, and a result of the blur determination of the multiple images to be determined is obtained.
  • the present application also provides a device for recognizing blurred images, and the device includes:
  • a disturbance data generation module which is used to obtain a training image, perform fuzzy disturbance on the training image by using various types of fuzzy algorithms, and generate various types of disturbance data;
  • a fuzzy image generation module configured to synthesize the various types of disturbance data with the training image respectively to obtain various types of training blurred images
  • the first model training module is configured to use the multiple types of training blurred images to train an image blur discrimination model, obtain the first image blur discrimination model obtained by training, and the effect of the first image blur discrimination model on the multiple types The training prediction result of the training blurred image;
  • An error value calculation module configured to calculate the error values of the training prediction result and the preset fuzzy labels of the multiple types of training blurred images
  • An error sample screening module configured to collect the training fuzzy images whose error value is greater than a preset error threshold value into an error sample training set
  • the second model training module is configured to use the error sample training set to train the first image blur discrimination model for a preset number of iterations to obtain a second image blur discrimination model;
  • the to-be-judged image acquisition module is used to acquire the to-be-judged image set, and scale the multiple to-be-judged images in the to-be-judged image set to the same size;
  • the image recognition module is configured to input the multiple images to be determined after zooming into the second image blur determination model for blur determination, and obtain blur determination results for the multiple images to be determined.
  • This application also provides an electronic device, which includes:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the following steps:
  • the multiple images to be determined after zooming are input to the second image blur determination model for blur determination, and a result of the blur determination of the multiple images to be determined is obtained.
  • the present application also provides a computer-readable storage medium, including a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein, the computer program is When the processor executes, the following steps are implemented:
  • the multiple images to be determined after zooming are input to the second image blur determination model for blur determination, and the results of blur determination of the multiple images to be determined are obtained.
  • FIG. 1 is a schematic flowchart of a method for recognizing a blurred image according to an embodiment of the application
  • FIG. 2 is a schematic diagram of modules of an apparatus for recognizing blurred images provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of the internal structure of an electronic device that implements a method for recognizing a blurred image provided by an embodiment of the application;
  • the execution subject of the method for recognizing blurred images provided in the embodiments of the present application includes, but is not limited to, at least one of the electronic devices that can be configured to execute the method provided in the embodiments of the present application, such as a server and a terminal.
  • the method for recognizing a blurred image may be executed by software or hardware installed on a terminal device or a server device, and the software may be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
  • This application provides a method for identifying blurred images.
  • FIG. 1 it is a schematic flowchart of a method for recognizing a blurred image provided by an embodiment of this application.
  • the method can be executed by a device, and the device can be implemented by software and/or hardware.
  • the method for recognizing a blurred image includes:
  • the training image is obtained from a database for storing the training image by using a python sentence with a data capture function.
  • the training image is a clear image, that is, an image with a "clear" label on the training image.
  • the use of multiple types of fuzzy algorithms to perform fuzzy perturbation on the training image to generate multiple types of perturbation data includes:
  • the blur algorithm includes, but is not limited to, a motion blur algorithm, a Gaussian blur algorithm, and a local blur algorithm.
  • the obtained perturbation data is a random number
  • the obtained perturbation data is the convolution kernel matrix
  • the perturbation data obtained is a random number and a convolution kernel matrix
  • the multiple types of disturbance data are respectively synthesized with the training image to obtain multiple types of training blurred images.
  • synthesizing the multiple types of disturbance data with the training image to obtain multiple types of training blurred images includes:
  • the various types of disturbance data are respectively convolved with the training image to obtain various types of training blurred images.
  • the embodiment of the present application convolves the random number with the training image to obtain the training blurred image.
  • the embodiment of the present application convolves the convolution kernel matrix with the training image to obtain a training blurred image.
  • the training image is converted into a coordinate adjustment image through the acquired random number, and then the acquired volume
  • the core matrix is convolved with the coordinate adjustment image to obtain a training blurred image.
  • the conversion of the training image into the coordinate adjustment image by the obtained random number includes:
  • the coordinate value of the target pixel in the training image is adjusted by using the preset plane curve function, and the coordinate adjustment image obtained after adjustment is obtained.
  • the grid sampling point function is a function for sampling according to a preset interval distance.
  • the preset interval distance is a standard pixel distance
  • the preset maximum sampling distance is the training The size of the image.
  • sampling the training image by using a grid sampling point function according to the size includes:
  • the pixel points with a predetermined interval distance at each interval are sampling points
  • the plane curve function is:
  • X is the abscissa of the pixel in the training image
  • a and b are preset adjustment coefficients
  • Is the adjusted abscissa of the pixel in the training image
  • is the adjusted ordinate of the pixel in the training image.
  • the multiple types of disturbance data are respectively synthesized with the training image to obtain multiple types of training fuzzy images, which improves the diversity of training data.
  • the image blur discrimination model is a shuffleNet network after removing the pooling layer.
  • the shuffleNet network is a lightweight network and has more efficient computing capabilities than ordinary networks.
  • the image blur discrimination model removes the pooling layer in the shuffleNet network, reduces the network structure in the shuffleNet network, and improves calculation efficiency.
  • the training prediction result of the first image blur identification model on the multiple types of training blur images is after the multiple types of training blur images are input to the first image blur identification model , The obtained training prediction result output by the first image blur discrimination model.
  • the obtained training prediction result is the training prediction result corresponding to each type of training blurred image.
  • the training prediction result is a prediction label generated after the first image blur discrimination model judges the input multiple types of training blur images.
  • the embodiment of the present application uses multiple types of training fuzzy images to train the image blur discrimination model, which enhances the accuracy of the image blur discrimination model in discriminating different types of images, and improves the robustness of the image blur discrimination model.
  • the separately calculating the error values of the training prediction result and the preset fuzzy labels of the multiple types of training blurred images includes:
  • d(x,y) 2 is the error value
  • x is the training prediction result
  • y is the preset fuzzy label
  • the error value between the training prediction result corresponding to each type of training blurred image and the fuzzy label of the type of training blurred image is calculated respectively, and the error value represents the training prediction result generated by the first image fuzzy discrimination model and the blur The error between labels.
  • training fuzzy images with an error value greater than a preset error threshold are selected from the multiple types of training fuzzy images, and the selected training fuzzy images are collected into the error sample training set.
  • the obtained training fuzzy image in the training set of error samples is that the error value of the predicted label and the preset fuzzy label is greater than the preset error threshold value of the training blurred image.
  • the training of the first image blur discrimination model by using the error sample training set for a preset number of iterations to obtain the second target image blur discrimination model includes:
  • Acquiring iterative parameters for training of the first image blur discrimination model where the iterative parameters include a preset number of iterations
  • a gradient descent algorithm is used to update the parameters of the first image blur discrimination model according to the loss value, until the number of iterations reaches a preset number of iterations, and a second image blur discrimination model is obtained.
  • the loss function includes:
  • L(x, y) is the loss value
  • x is the predicted label of the error sample training set
  • y is the preset fuzzy label of the error sample training set.
  • This embodiment of the application again uses the wrong sample training set to train the first image fuzzy discrimination model for a preset number of iterations to obtain the target image fuzzy discrimination model, which further improves the accuracy of model recognition and increases the robustness of the second image fuzzy discrimination model sex.
  • a python sentence with a data capture function is used to obtain the image set to be judged from a blockchain node used to store the training image.
  • the number of images to be judged is often large, and the high throughput of the blockchain can improve the efficiency of obtaining the images to be judged.
  • the scaling of the plurality of images to be judged in the image set to be judged to the same size includes:
  • the median of the average size of all the images to be determined in the plurality of image clusters is determined as the target size, and the sizes of the plurality of images to be determined are scaled to the target size.
  • multiple images to be judged in the set of images to be judged are scaled to the same size, and the sizes of the images to be judged are unified, so as to avoid inconsistencies in the sizes of the images to be judged and occupy a large amount of computing resources, and improve the second image
  • the efficiency of fuzzy discrimination model for fuzzy discrimination is improved.
  • said using a clustering algorithm to divide the plurality of images to be determined into a plurality of image clusters according to different image sizes includes:
  • Determining that another image to be judged with the smallest size difference value of the image to be assembled in the image set to be assembled is the target aggregation image corresponding to the image to be assembled;
  • the separately calculating the image size of the images to be judged other than the image set to be collected and the size difference value of the images to be collected in the image set to be collected includes:
  • the following difference value algorithm is used to respectively calculate the image size of the images to be judged other than the image set to be collected and the size difference value Dif topic of the images to be collected in the image set to be collected:
  • Dif topic Pearson(TP S ,TP T )
  • TP T to be the collection of image size
  • TP S is the size of the other image of the image to be determined, Pearson representing the difference value calculation.
  • the method further includes:
  • the visualization tools include but are not limited to python visualization tools and Excel visualization tools.
  • the embodiment of the application generates various disturbance data through various fuzzy algorithms to increase the diversity of samples, and trains the model through various disturbance data to improve the robustness of the model and the accuracy of the model recognition results; furthermore, the error training samples are used to train the model. Train the model to further improve the accuracy of the model's recognition of the blurred image; when judging the image to be judged, the judgment is made through the model with high accuracy to improve the efficiency and accuracy of the blurred image recognition. Therefore, the method for recognizing blurred images proposed in this application can improve the efficiency and accuracy of recognizing blurred images.
  • FIG. 2 it is a schematic diagram of modules of the device for recognizing blurred images of the present application.
  • the apparatus 100 for recognizing blurred images described in this application can be installed in an electronic device.
  • the device for identifying fuzzy images may include a disturbance data generation module 101, a fuzzy image generation module 102, a first model training module 103, an error value calculation module 104, an error sample screening module 105, and a second model training module 106.
  • the module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the disturbance data generating module 101 is configured to obtain a training image, and perform fuzzy disturbance on the training image by using various types of fuzzy algorithms to generate various types of disturbance data;
  • the fuzzy image generating module 102 is configured to synthesize the various types of disturbance data with the training image to obtain various types of training blurred images;
  • the first model training module 103 is configured to use the multiple types of training blur images to train an image blur discrimination model, obtain the first image blur discrimination model obtained by training, and the first image blur discrimination model for the multiple Training prediction results of various types of training fuzzy images;
  • the error value calculation module 104 is configured to calculate the error values of the training prediction result and the preset fuzzy labels of the multiple types of training fuzzy images;
  • the error sample screening module 105 is configured to collect the training fuzzy images whose error value is greater than a preset error threshold value into an error sample training set;
  • the second model training module 106 is configured to use the error sample training set to train the first image blur discrimination model for a preset number of iterations to obtain a second image blur discrimination model;
  • the to-be-judged image acquisition module 107 is configured to acquire the to-be-judged image set, and scale the multiple to-be-judged images in the to-be-judged image set to the same size;
  • the image recognition module 108 is configured to input the multiple zoomed images to be determined into the second image blur determination model for blur determination, and obtain blur determination results for the multiple images to be determined.
  • each module of the device for recognizing blurred images is as follows:
  • the disturbance data generating module 101 is configured to obtain training images, and use various types of fuzzy algorithms to perform fuzzy disturbance on the training images to generate various types of disturbance data.
  • the training image is obtained from a database for storing the training image by using a python sentence with a data capture function.
  • the training image is a clear image, that is, an image with a "clear" label on the training image.
  • the disturbance data generation module 101 is specifically configured to:
  • the blur algorithm includes, but is not limited to, a motion blur algorithm, a Gaussian blur algorithm, and a local blur algorithm.
  • the obtained perturbation data is a random number
  • the obtained perturbation data is the convolution kernel matrix
  • the perturbation data obtained is a random number and a convolution kernel matrix
  • the fuzzy image generating module 102 is configured to synthesize the multiple types of disturbance data with the training image to obtain multiple types of training blurred images.
  • the blurred image generating module 102 is specifically configured to:
  • the various types of disturbance data are respectively convolved with the training image to obtain various types of training blurred images.
  • the embodiment of the present application convolves the random number with the training image to obtain the training blurred image.
  • the embodiment of the present application convolves the convolution kernel matrix with the training image to obtain a training blurred image.
  • the training image is converted into a coordinate adjustment image through the acquired random number, and then the acquired volume
  • the core matrix is convolved with the coordinate adjustment image to obtain a training blurred image.
  • the conversion of the training image into the coordinate adjustment image by the obtained random number includes:
  • the coordinate value of the target pixel in the training image is adjusted by using the preset plane curve function, and the coordinate adjustment image obtained after adjustment is obtained.
  • the grid sampling point function is a function for sampling according to a preset interval distance.
  • the preset interval distance is a standard pixel distance
  • the preset maximum sampling distance is the training The size of the image.
  • sampling the training image by using a grid sampling point function according to the size includes:
  • the pixel points with a predetermined interval distance at each interval are sampling points
  • the plane curve function is:
  • X is the abscissa of the pixel in the training image
  • a and b are preset adjustment coefficients
  • Is the adjusted abscissa of the pixel in the training image
  • is the adjusted ordinate of the pixel in the training image.
  • the multiple types of disturbance data are respectively synthesized with the training image to obtain multiple types of training fuzzy images, which improves the diversity of training data.
  • the first model training module 103 is configured to use the multiple types of training blur images to train an image blur discrimination model, obtain the first image blur discrimination model obtained by training, and the first image blur discrimination model for the multiple The training prediction results of various types of training fuzzy images.
  • the image blur discrimination model is a shuffleNet network after removing the pooling layer.
  • the shuffleNet network is a lightweight network and has more efficient computing capabilities than ordinary networks.
  • the image blur discrimination model removes the pooling layer in the shuffleNet network, reduces the network structure in the shuffleNet network, and improves calculation efficiency.
  • the training prediction result of the first image blur identification model on the multiple types of training blur images is after the multiple types of training blur images are input to the first image blur identification model , The obtained training prediction result output by the first image blur discrimination model.
  • the obtained training prediction result is the training prediction result corresponding to each type of training blurred image.
  • the training prediction result is a prediction label generated after the first image blur discrimination model judges the input multiple types of training blur images.
  • the embodiment of the present application uses multiple types of training fuzzy images to train the image blur discrimination model, which enhances the accuracy of the image blur discrimination model in discriminating different types of images, and improves the robustness of the image blur discrimination model.
  • the error value calculation module 104 is configured to calculate the error values of the training prediction result and the preset fuzzy labels of the multiple types of training blurred images.
  • the error value calculation module 104 is specifically configured to:
  • the error value algorithm is used to calculate the error values of the training prediction result and the preset fuzzy labels of the multiple types of training blurred images, and the error value algorithm is:
  • d(x,y) 2 is the error value
  • x is the training prediction result
  • y is the preset fuzzy label
  • the error value between the training prediction result corresponding to each type of training blurred image and the fuzzy label of the type of training blurred image is calculated respectively, and the error value represents the training prediction result generated by the first image fuzzy discrimination model and the blur The error between labels.
  • the error sample screening module 105 is configured to collect the training fuzzy images whose error value is greater than a preset error threshold value into an error sample training set.
  • training fuzzy images with an error value greater than a preset error threshold are selected from the multiple types of training fuzzy images, and the selected training fuzzy images are collected into the error sample training set.
  • the obtained training fuzzy image in the training set of error samples is that the error value of the predicted label and the preset fuzzy label is greater than the preset error threshold value of the training blurred image.
  • the second model training module 106 is configured to use the error sample training set to train the first image blur discrimination model for a preset number of iterations to obtain a second target image blur discrimination model.
  • the second model training module 106 is specifically configured to:
  • Acquiring iterative parameters for training of the first image blur discrimination model where the iterative parameters include a preset number of iterations
  • a gradient descent algorithm is used to update the parameters of the first image blur discrimination model according to the loss value, until the number of iterations reaches a preset number of iterations, and a second image blur discrimination model is obtained.
  • the loss function includes:
  • L(x, y) is the loss value
  • x is the predicted label of the error sample training set
  • y is the preset fuzzy label of the error sample training set.
  • This embodiment of the application again uses the wrong sample training set to train the first image fuzzy discrimination model for a preset number of iterations to obtain the target image fuzzy discrimination model, which further improves the accuracy of model recognition and increases the robustness of the second image fuzzy discrimination model sex.
  • the to-be-judged image acquisition module 107 is configured to acquire the to-be-judged image set, and scale the multiple to-be-judged images in the to-be-judged image set to the same size.
  • a python sentence with a data capture function is used to obtain the image set to be judged from a blockchain node used to store the training image.
  • the number of images to be judged is often large, and the high throughput of the blockchain can improve the efficiency of obtaining the images to be judged.
  • the to-be-judged image acquisition module 107 is specifically configured to:
  • the median of the average size of all the images to be determined in the plurality of image clusters is determined as the target size, and the sizes of the plurality of images to be determined are scaled to the target size.
  • multiple images to be judged in the set of images to be judged are scaled to the same size, and the sizes of the images to be judged are unified, so as to avoid inconsistencies in the sizes of the images to be judged and occupy a large amount of computing resources, and improve the second image
  • the efficiency of fuzzy discrimination model for fuzzy discrimination is improved.
  • said using a clustering algorithm to divide the plurality of images to be determined into a plurality of image clusters according to different image sizes includes:
  • Determining that another image to be judged with the smallest size difference value of the image to be assembled in the image set to be assembled is the target aggregation image corresponding to the image to be assembled;
  • the separately calculating the image size of the images to be judged other than the image set to be collected and the size difference value of the images to be collected in the image set to be collected includes:
  • the following difference value algorithm is used to respectively calculate the image size of the images to be judged other than the image set to be collected and the size difference value Dif topic of the images to be collected in the image set to be collected:
  • Dif topic Pearson(TP S ,TP T )
  • TP T to be the collection of image size
  • TP S is the size of the other image of the image to be determined, Pearson representing the difference value calculation.
  • the image recognition module 108 is configured to input the multiple zoomed images to be determined into the second image blur determination model for blur determination, and obtain blur determination results for the multiple images to be determined.
  • the device 100 for identifying blurred images further includes a data pushing module, and the data pushing module is specifically configured to:
  • the visualization tools include but are not limited to python visualization tools and Excel visualization tools.
  • the embodiment of the application generates various disturbance data through various fuzzy algorithms to increase the diversity of samples, and trains the model through various disturbance data to improve the robustness of the model and the accuracy of the model recognition results; furthermore, the error training samples are used to train the model. Train the model to further improve the accuracy of the model's recognition of the blurred image; when judging the image to be judged, the judgment is made through the model with high accuracy to improve the efficiency and accuracy of the blurred image recognition. Therefore, the device for recognizing blurred images proposed in this application can improve the efficiency and accuracy of recognizing blurred images.
  • FIG. 3 it is a schematic diagram of the structure of an electronic device that implements the method for recognizing a blurred image according to the present application.
  • the electronic device 1 may include a processor 10, a memory 11, and a bus, and may also include a computer program stored in the memory 11 and running on the processor 10, such as a program 12 for identifying blurred images.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, for example, a mobile hard disk of the electronic device 1.
  • the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart media card (SMC), and a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of the program 12 for identifying blurred images, etc., but also to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor, and various control chips, etc.
  • the processor 10 is the control unit of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and runs or executes programs or modules stored in the memory 11 (such as executing Programs for recognizing blurred images, etc.), and calling data stored in the memory 11 to execute various functions of the electronic device 1 and processing data.
  • the bus may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection and communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
  • the electronic device 1 may also include a power source (such as a battery) for supplying power to various components.
  • the power source may be logically connected to the at least one processor 10 through a power management device, thereby controlling power
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators.
  • the electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface.
  • the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may also include a user interface.
  • the user interface may be a display (Display) and an input unit (such as a keyboard (Keyboard)).
  • the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like.
  • the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
  • the program 12 for recognizing blurred images stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
  • the multiple images to be determined after zooming are input to the second image blur determination model for blur determination, and a result of the blur determination of the multiple images to be determined is obtained.
  • the integrated module/unit of the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory)
  • the computer-readable storage medium may be volatile or non-volatile, and when the computer program is executed by a processor, the steps of the above method for identifying a blurred image are implemented.
  • the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function, etc.; the storage data area may store Data created by the use of blockchain nodes, etc.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the 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.

Landscapes

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

Abstract

本申请涉及图像处理技术,揭露了一种识别模糊图像的方法,包括:对训练图像生成扰动数据;将扰动数据与训练图像进行合成,得到训练模糊图像;利用训练模糊图像训练图像模糊判别模型,得到第一图像模糊判别模型和训练预测结果;计算训练预测结果与预置模糊标签的误差值;将误差值大于误差阈值的训练模糊图像汇集为错误样本训练集;利用错误样本训练集对第一图像模糊判别模型进行训练,得到第二图像模糊判别模型;将待判断图像输入至第二图像模糊判别模型,得到判别结果。本申请提出一种识别模糊图像的方法、装置、设备及介质。此外,本申请还涉及区块链技术,待判断图像可存储于区块链节点中。本申请可以提高识别模糊图像的效率与准确性。

Description

识别模糊图像的方法、装置、设备及计算机可读存储介质
本申请要求于2020年8月6日提交中国专利局、申请号为CN202010785500.6、名称为“识别模糊图像的方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,尤其涉及一种识别模糊图像的方法、装置、电子设备及计算机可读存储介质。
背景技术
随着计算机技术的发展,基于图像进行分析已经越来越普遍。例如,利用卫星图像分析天气变化,利用道路图像分析道路状况等。图像的清晰度对分析结果的准确性起着重要作用。
发明人意识到,现有技术中,判别图像是否为模糊图像的方法多为人工对图像进行筛选并标记。但实际应用中,往往需要对大批量的图像进行识别分析,若通过人工对图像进行筛选,不仅效率不高,而且错误率较高,不能满足模糊图像识别的的时效性与准确性。因此,如何提高识别模糊图像的效率与准确性,成为了亟待解决的问题。
发明内容
本申请提供的一种识别模糊图像的方法,包括:
获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
本申请还提供一种识别模糊图像的装置,所述装置包括:
扰动数据生成模块,用于获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
模糊图像生成模块,用于将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
第一模型训练模块,用于利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
误差值计算模块,用于分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
错误样本筛选模块,用于将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
第二模型训练模块,用于利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
待判断图像获取模块,用于获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
图像识别模块,用于将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
本申请还提供一种电子设备,所述电子设备包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
本申请还提供一种计算机可读存储介质,包括存储数据区和存储程序区,其中,所述存储数据区存储创建的数据,所述存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:
获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得 到对所述多张待判断图像的模糊判别结果。
附图说明
图1为本申请一实施例提供的识别模糊图像的方法的流程示意图;
图2为本申请一实施例提供的识别模糊图像的装置的模块示意图;
图3为本申请一实施例提供的实现识别模糊图像的方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供的识别模糊图像的方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述识别模糊图像的方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
本申请提供一种识别模糊图像的方法。参照图1所示,为本申请一实施例提供的识别模糊图像的方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,识别模糊图像的方法包括:
S1、获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据。
本申请实施例中,利用具有数据抓取功能的python语句从用于存储所述训练图像的数据库中获取所述训练图像。
本申请一优选实施例中,所述训练图像是清晰的图像,即训练图像带有“清晰”标签的图像。
本申请实施例中,所述利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据,包括:
利用所述多种类型的模糊算法对所述训练图像进行扰动计算,得到多种类型的扰动数据。
详细地,所述模糊算法包括但不限于运动模糊算法、高斯模糊算法和局部模糊算法。
其中,利用运动模糊算法对所述训练图像进行扰动计算后,得到的扰动数据为随机数;利用高斯模糊算法对所述训练图像进行扰动计算后,得到的扰动数据为卷积核矩阵;利用局部模糊算法对所述训练图像进行扰动计算后,得到的扰动数据为随机数和卷积核矩阵。
S2、将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像。
本申请实施例中,所述将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像,包括:
将多种类型的扰动数据分别与所述训练图像进行卷积,得到多种类型的训练模糊图像。
详细地,当利用运动模糊算法进行扰动计算,且获取的扰动数据为随机数时,本申请实施例将所述随机数与所述训练图像进行卷积,即可得到训练模糊图像。
当利用所述高斯模糊算法进行扰动计算,且获取的扰动数据为卷积核矩阵时,本申请实施例将所述卷积核矩阵与所述训练图像进行卷积,即可得到训练模糊图像。
当利用局部模糊算法对所述训练图像进行扰动计算,且获取的扰动数据为随机数和卷积核矩阵时,通过获取到的随机数将训练图像转化为坐标调整图像,再将获取到的卷积核矩阵与所述坐标调整图像进行卷积,得到训练模糊图像。
详细地,所述通过获取到的随机数将训练图像转化为坐标调整图像,包括:
获取所述训练图像的尺寸;
根据所述尺寸利用网格采样点函数对所述训练图像进行采样,得到所述训练图像中目标像素点的坐标值;
利用预设平面曲线函数对所述训练图像中目标像素点的坐标值进行调整,获取调整后得到的坐标调整图像。
具体地,所述网格采样点函数为一种根据预设间隔距离进行采样的函数,本申请实施例中,所述预设间隔距离为一个标准像素距离,预设采样最大距离为所述训练图像的尺寸。
详细地,所述根据所述尺寸利用网格采样点函数对所述训练图像进行采样,包括:
确定所述训练图像中任一像素为原点;
确定从所述原点开始,每间隔预设间隔距离的像素点为采样点;
获取所述采样点的坐标值。
较佳地,所述平面曲线函数为:
Figure PCTCN2020121568-appb-000001
其中,X为所述训练图像中像素点的横坐标,为所述训练图像中像素点的纵坐标,a,b为预设调整系数,
Figure PCTCN2020121568-appb-000002
为所述训练图像中像素点的调整后横坐标,β为所述训练图像中像素点的调整后纵坐标。
本申请实施例中,将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像,提高了训练数据的多样性。
S3、利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果。
详细地,所述图像模糊判别模型为去除池化层后的shuffleNet网络。所述shuffleNet网络为一种轻量级网络,比普通网络具有更加高效地计算能力。本申请实施例中,图像模糊判别模型去除shuffleNet网络中的池化层,减少了shuffleNet网络中的网络结构,提高了计算效率。
本申请实施例中,所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果是将所述多种类型的训练模糊图像输入至所述第一图像模糊判别模型之后,得到的所述第一图像模糊判别模型输出的训练预测结果。
本申请实施例中,得到的训练预测结果为每种类型的训练模糊图像相应的训练预测结果。
本申请实施例中,所述训练预测结果是所述第一图像模糊判别模型对输入的所述多种类型的训练模糊图像判断后产生的预测标签。
本申请实施例利用多种类型的训练模糊图像训练图像模糊判别模型,增强了图像模糊判别模型对不同类型图像进行判别的精确性,提高了图像模糊判别模型的鲁棒性。
S4、分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值。
本申请实施例中,所述分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值,包括:
利用如下误差值算法分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值:
d(x,y) 2=‖x-y‖ 2
其中,d(x,y) 2为所述误差值,x为所述训练预测结果,y为所述预置模糊标签。
本申请实施例中,分别计算每种训练模糊图像对应的训练预测结果与该种类型的训练模糊图像的模糊标签的误差值,该误差值表示第一图像模糊判别模型生成的训练预测结果与模糊标签之间的误差。
S5、将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集。
本申请实施例中,从所述多种类型的训练模糊图像中筛选出误差值大于预设误差阈值的训练模糊图像,将筛选出的训练模糊图像汇集为所述错误样本训练集。
通过本实施例,获取到的错误样本训练集中的训练模糊图像为预测标签与预置模糊标签的误差值大于预设误差阈值训练模糊图像。
S6、利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二目标图像模糊判别模型。
详细地,所述利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二目标图像模糊判别模型,包括:
获取所述第一图像模糊判别模型训练的迭代参数,其中,所述迭代参数包括预设迭代次数;
将所述错误样本训练集输入至所述第一图像模糊判别模型进行迭代训练,得到所述错误样本训练集的预测标签;
利用损失函数计算所述预测标签与所述错误样本训练集的预置模糊标签的损失值;
利用梯度下降算法根据所述损失值更新所述第一图像模糊判别模型的参数,直至所述迭代次数达到预设迭代次数,得到第二图像模糊判别模型。
具体地,所述损失函数,包括:
Figure PCTCN2020121568-appb-000003
其中,L(x,y)为所述损失值,x为所述错误样本训练集的预测标签,y为所述错误样本训练集的预置模糊标签。
本申请实施例再次利用错误样本训练集对第一图像模糊判别模型进行预设迭代次数的训练,得到目标图像模糊判别模型,进一步提高模型识别的准确率,增加第二图像模糊判别模型的鲁棒性。
S7、获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸。
本申请实施例中,利用具有数据抓取功能的python语句从用于存储所述训练图像的区块链节点中获取所述待判断图像集。
实际应用中,待判断图像的数量往往较多,利用区块链的高吞吐性,可提高获取所述待判断图像的效率。
详细地,所述将所述待判断图像集中多张待判断图像缩放至相同尺寸,包括:
获取所述待判断图像集中多张待判断图像的图像尺寸;
利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇;
分别计算所述多个图像簇中所有待判断图像的平均尺寸;
确定所述多个图像簇中所有待判断图像的平均尺寸的中位数为目标尺寸,将所述多张待判断图像的尺寸缩放至所述目标尺寸。
本申请实施例中,将所述待判断图像集中多张待判断图像缩放至相同尺寸,将待判断图像的尺寸进行统一化,避免待判断图像的尺寸不一致而占用大量计算资源,提高第二图像模糊判别模型进行模糊判别的效率。
进一步地,所述利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇,包括:
随机从所述多张待判断图像中选取至少两张待判断图像作为待汇集图像集;
分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值;
确定与所述待汇集图像集中待汇集图像的尺寸差异值最小的其他待判断图像为所述待汇集图像对应的目标汇集图像;
将所述待汇集图像中各张待汇集图像与对应的目标汇集图像进行汇集,得到多个图像簇。
具体地,所述分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值,包括:
利用如下差异值算法分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值Dif topic
Dif topic=Pearson(TP S,TP T)
其中,TP T为所述待汇集图像的图像尺寸,TP S为所述其他待判断图像的图像尺寸,Pearson表示差异值计算。
S8、将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
本申请一可选实施例中,所述得到对所述多张待判断图像的模糊判别结果之后,所述方法还包括:
利用可视化工具将所述模糊判别结果进行可视化处理;
向用户推送可视化处理得到的可视化数据。
详细地,所述可视化工具包括但不限于python可视化工具,Excel可视化工具。
本申请实施例通过多种模糊算法生成多种扰动数据,提高样本的多样性,通过多种扰动数据对模型进行训练,提高模型的鲁棒性和模型识别结果的准确性;通过错误训练样本进一步对模型进行训练,进一步提高模型对模糊图像识别的准确率;在对待判断图像进行判断时,通过准确率高的模型进行判断,提高模糊图像识别的效率和准确率。因此本申请提出的识别模糊图像的方法,可以提高模糊图像识别的效率与准确性。
如图2所示,是本申请识别模糊图像的装置的模块示意图。
本申请所述识别模糊图像的装置100可以安装于电子设备中。根据实现的功能,所述识别模糊图像的装置可以包括扰动数据生成模块101、模糊图像生成模块102、第一模型训练模块103、误差值计算模块104、错误样本筛选模块105、第二模型训练模块106、待判断图像获取模块107和图像识别模块108。本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述扰动数据生成模块101,用于获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
所述模糊图像生成模块102,用于将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
所述第一模型训练模块103,用于利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
所述误差值计算模块104,用于分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
所述错误样本筛选模块105,用于将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
所述第二模型训练模块106,用于利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
所述待判断图像获取模块107,用于获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
所述图像识别模块108,用于将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
详细地,所述识别模糊图像的装置各模块的具体实施方式如下:
所述扰动数据生成模块101,用于获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据。
本申请实施例中,利用具有数据抓取功能的python语句从用于存储所述训练图像的数据库中获取所述训练图像。
本申请一优选实施例中,所述训练图像是清晰的图像,即训练图像带有“清晰”标签的图像。
本申请实施例中,所述扰动数据生成模块101具体用于:
获取训练图像;
利用所述多种类型的模糊算法对所述训练图像进行扰动计算,得到多种类型的扰动数据。
详细地,所述模糊算法包括但不限于运动模糊算法、高斯模糊算法和局部模糊算法。
其中,利用运动模糊算法对所述训练图像进行扰动计算后,得到的扰动数据为随机数;利用高斯模糊算法对所述训练图像进行扰动计算后,得到的扰动数据为卷积核矩阵;利用局部模糊算法对所述训练图像进行扰动计算后,得到的扰动数据为随机数和卷积核矩阵。
所述模糊图像生成模块102,用于将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像。
本申请实施例中,所述模糊图像生成模块102具体用于:
将多种类型的扰动数据分别与所述训练图像进行卷积,得到多种类型的训练模糊图像。
详细地,当利用运动模糊算法进行扰动计算,且获取的扰动数据为随机数时,本申请实施例将所述随机数与所述训练图像进行卷积,即可得到训练模糊图像。
当利用所述高斯模糊算法进行扰动计算,且获取的扰动数据为卷积核矩阵时,本申请实施例将所述卷积核矩阵与所述训练图像进行卷积,即可得到训练模糊图像。
当利用局部模糊算法对所述训练图像进行扰动计算,且获取的扰动数据为随机数和卷积核矩阵时,通过获取到的随机数将训练图像转化为坐标调整图像,再将获取到的卷积核矩阵与所述坐标调整图像进行卷积,得到训练模糊图像。
详细地,所述通过获取到的随机数将训练图像转化为坐标调整图像,包括:
获取所述训练图像的尺寸;
根据所述尺寸利用网格采样点函数对所述训练图像进行采样,得到所述训练图像中目标像素点的坐标值;
利用预设平面曲线函数对所述训练图像中目标像素点的坐标值进行调整,获取调整后得到的坐标调整图像。
具体地,所述网格采样点函数为一种根据预设间隔距离进行采样的函数,本申请实施例中,所述预设间隔距离为一个标准像素距离,预设采样最大距离为所述训练图像的尺寸。
详细地,所述根据所述尺寸利用网格采样点函数对所述训练图像进行采样,包括:
确定所述训练图像中任一像素为原点;
确定从所述原点开始,每间隔预设间隔距离的像素点为采样点;
获取所述采样点的坐标值。
较佳地,所述平面曲线函数为:
Figure PCTCN2020121568-appb-000004
其中,X为所述训练图像中像素点的横坐标,为所述训练图像中像素点的纵坐标,a,b为预设调整系数,
Figure PCTCN2020121568-appb-000005
为所述训练图像中像素点的调整后横坐标,β为所述训练图像中像素点的调整后纵坐标。
本申请实施例中,将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像,提高了训练数据的多样性。
所述第一模型训练模块103,用于利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果。
详细地,所述图像模糊判别模型为去除池化层后的shuffleNet网络。所述shuffleNet网络为一种轻量级网络,比普通网络具有更加高效地计算能力。本申请实施例中,图像模糊判别模型去除shuffleNet网络中的池化层,减少了shuffleNet网络中的网络结构,提高了计算效率。
本申请实施例中,所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果是将所述多种类型的训练模糊图像输入至所述第一图像模糊判别模型之后,得到的所述第一图像模糊判别模型输出的训练预测结果。
本申请实施例中,得到的训练预测结果为每种类型的训练模糊图像相应的训练预测结果。
本申请实施例中,所述训练预测结果是所述第一图像模糊判别模型对输入的所述多种类型的训练模糊图像判断后产生的预测标签。
本申请实施例利用多种类型的训练模糊图像训练图像模糊判别模型,增强了图像模糊判别模型对不同类型图像进行判别的精确性,提高了图像模糊判别模型的鲁棒性。
所述误差值计算模块104,用于分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值。
本申请实施例中,所述误差值计算模块104具体用于:
利用误差值算法分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值,所述误差值算法为:
d(x,y) 2=‖x-y‖ 2
其中,d(x,y) 2为所述误差值,x为所述训练预测结果,y为所述预置模糊标签。
本申请实施例中,分别计算每种训练模糊图像对应的训练预测结果与该种类型的训练模糊图像的模糊标签的误差值,该误差值表示第一图像模糊判别模型生成的训练预测结果与模糊标签之间的误差。
所述错误样本筛选模块105,用于将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集。
本申请实施例中,从所述多种类型的训练模糊图像中筛选出误差值大于预设误差阈值的训练模糊图像,将筛选出的训练模糊图像汇集为所述错误样本训练集。
通过本实施例,获取到的错误样本训练集中的训练模糊图像为预测标签与预置模糊标签的误差值大于预设误差阈值训练模糊图像。
所述第二模型训练模块106,用于利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二目标图像模糊判别模型。
详细地,所述第二模型训练模块106具体用于:
获取所述第一图像模糊判别模型训练的迭代参数,其中,所述迭代参数包括预设迭代次数;
将所述错误样本训练集输入至所述第一图像模糊判别模型进行迭代训练,得到所述错误样本训练集的预测标签;
利用损失函数计算所述预测标签与所述错误样本训练集的预置模糊标签的损失值;
利用梯度下降算法根据所述损失值更新所述第一图像模糊判别模型的参数,直至所述迭代次数达到预设迭代次数,得到第二图像模糊判别模型。
具体地,所述损失函数,包括:
Figure PCTCN2020121568-appb-000006
其中,L(x,y)为所述损失值,x为所述错误样本训练集的预测标签,y为所述错误样本训练集的预置模糊标签。
本申请实施例再次利用错误样本训练集对第一图像模糊判别模型进行预设迭代次数的训练,得到目标图像模糊判别模型,进一步提高模型识别的准确率,增加第二图像模糊判别模型的鲁棒性。
所述待判断图像获取模块107,用于获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸。
本申请实施例中,利用具有数据抓取功能的python语句从用于存储所述训练图像的区块链节点中获取所述待判断图像集。
实际应用中,待判断图像的数量往往较多,利用区块链的高吞吐性,可提高获取所述待判断图像的效率。
详细地,所述待判断图像获取模块107具体用于:
获取待判断图像集;
获取所述待判断图像集中多张待判断图像的图像尺寸;
利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇;
分别计算所述多个图像簇中所有待判断图像的平均尺寸;
确定所述多个图像簇中所有待判断图像的平均尺寸的中位数为目标尺寸,将所述多张待判断图像的尺寸缩放至所述目标尺寸。
本申请实施例中,将所述待判断图像集中多张待判断图像缩放至相同尺寸,将待判断图像的尺寸进行统一化,避免待判断图像的尺寸不一致而占用大量计算资源,提高第二图像模糊判别模型进行模糊判别的效率。
进一步地,所述利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇,包括:
随机从所述多张待判断图像中选取至少两张待判断图像作为待汇集图像集;
分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值;
确定与所述待汇集图像集中待汇集图像的尺寸差异值最小的其他待判断图像为所述待汇集图像对应的目标汇集图像;
将所述待汇集图像中各张待汇集图像与对应的目标汇集图像进行汇集,得到多个图像簇。
具体地,所述分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值,包括:
利用如下差异值算法分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值Dif topic
Dif topic=Pearson(TP S,TP T)
其中,TP T为所述待汇集图像的图像尺寸,TP S为所述其他待判断图像的图像尺寸,Pearson表示差异值计算。
所述图像识别模块108、用于将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
本申请一可选实施例中,所述识别模糊图像的装置100还包括数据推送模块,所述数据推送模块具体用于:
得到对所述多张待判断图像的模糊判别结果之后,利用可视化工具将所述模糊判别结果进行可视化处理;
向用户推送可视化处理得到的可视化数据。
详细地,所述可视化工具包括但不限于python可视化工具,Excel可视化工具。
本申请实施例通过多种模糊算法生成多种扰动数据,提高样本的多样性,通过多种扰动数据对模型进行训练,提高模型的鲁棒性和模型识别结果的准确性;通过错误训练样本进一步对模型进行训练,进一步提高模型对模糊图像识别的准确率;在对待判断图像进行判断时,通过准确率高的模型进行判断,提高模糊图像识别的效率和准确率。因此本申请提出的识别模糊图像的装置,可以提高模糊图像识别的效率与准确性。
如图3所示,是本申请实现识别模糊图像的方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如识别模糊图像的程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如识别模糊图像的程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行识别模糊图像的程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以 及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的识别模糊图像的程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory),所述计算机可读存储介质可以是易失性,也可以是非易失性,所述计算机程序被处理器执行时实现上述识别模糊图像的方法的步骤。
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,所述存储程序区可存储操作***、至少一个功能所需的应用程序等;所述存储数据区可存储根据区块链节点的使用所创建的数据等。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图表记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。***权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种识别模糊图像的方法,其中,所述方法包括:
    获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
    将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
    利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
    分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
    将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
    利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
    获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
    将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
  2. 如权利要求1所述的识别模糊图像的方法,其中,所述将所述待判断图像集中多张待判断图像缩放至相同尺寸,包括:
    获取所述待判断图像集中多张待判断图像的图像尺寸;
    利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇;
    分别计算所述多个图像簇中所有待判断图像的平均尺寸;
    确定所述多个图像簇中所有待判断图像的平均尺寸的中位数为目标尺寸,将所述多张待判断图像的尺寸缩放至所述目标尺寸。
  3. 如权利要求2所述的识别模糊图像的方法,其中,所述利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇,包括:
    随机从所述多张待判断图像中选取至少两张待判断图像作为待汇集图像集;
    分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值;
    确定与所述待汇集图像集中待汇集图像的尺寸差异值最小的其他待判断图像为所述待汇集图像对应的目标汇集图像;
    将所述待汇集图像中各张待汇集图像与对应的目标汇集图像进行汇集,得到多个图像簇。
  4. 如权利要求3所述的识别模糊图像的方法,其中,所述分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值,包括:
    利用如下差异值算法分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值Dif topic
    Dif topic=Pearson(TP S,TP T)
    其中,TP T为所述待汇集图像的图像尺寸,TP S为所述其他待判断图像的图像尺寸,Pearson表示差异值计算。
  5. 如权利要求1至4中任一项所述的识别模糊图像的方法,其中,所述利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二目标图像模糊判别模型,包括:
    获取所述第一图像模糊判别模型训练的迭代参数,其中,所述迭代参数包括预设迭代次数;
    将所述错误样本训练集输入至所述第一图像模糊判别模型进行迭代训练,得到所述错误样本训练集的预测标签;
    利用损失函数计算所述预测标签与所述错误样本训练集的预置模糊标签的损失值;
    利用梯度下降算法根据所述损失值更新所述第一图像模糊判别模型的参数,直至所述迭代次数达到预设迭代次数,得到第二目标图像模糊判别模型。
  6. 如权利要求5所述的识别模糊图像的方法,其中,所述损失函数,包括:
    Figure PCTCN2020121568-appb-100001
    其中,L(x,y)为所述损失值,x为所述错误样本训练集的预测标签,y为所述错误样本训练集的预置模糊标签。
  7. 如权利要求1至4中任一项所述的识别模糊图像的方法,其中,所述得到对所述多张待判断图像的模糊判别结果之后,所述方法还包括:
    利用可视化工具将所述模糊判别结果进行可视化处理;
    向用户推送可视化处理得到的可视化数据。
  8. 一种识别模糊图像的装置,其中,所述装置包括:
    扰动数据生成模块,用于获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
    模糊图像生成模块,用于将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
    第一模型训练模块,用于利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
    误差值计算模块,用于分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
    错误样本筛选模块,用于将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
    第二模型训练模块,用于利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
    待判断图像获取模块,用于获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
    图像识别模块,用于将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
  9. 一种电子设备,其中,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
    获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
    将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
    利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测 结果;
    分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
    将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
    利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
    获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
    将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
  10. 如权利要求9所述的电子设备,其中,所述将所述待判断图像集中多张待判断图像缩放至相同尺寸,包括:
    获取所述待判断图像集中多张待判断图像的图像尺寸;
    利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇;
    分别计算所述多个图像簇中所有待判断图像的平均尺寸;
    确定所述多个图像簇中所有待判断图像的平均尺寸的中位数为目标尺寸,将所述多张待判断图像的尺寸缩放至所述目标尺寸。
  11. 如权利要求10所述的电子设备,其中,所述利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇,包括:
    随机从所述多张待判断图像中选取至少两张待判断图像作为待汇集图像集;
    分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值;
    确定与所述待汇集图像集中待汇集图像的尺寸差异值最小的其他待判断图像为所述待汇集图像对应的目标汇集图像;
    将所述待汇集图像中各张待汇集图像与对应的目标汇集图像进行汇集,得到多个图像簇。
  12. 如权利要求11所述的电子设备,其中,所述分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值,包括:
    利用如下差异值算法分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值Dif topic
    Dif topic=Pearson(TP S,TP T)
    其中,TP T为所述待汇集图像的图像尺寸,TP S为所述其他待判断图像的图像尺寸,Pearson表示差异值计算。
  13. 如权利要求9至12中任一项所述的电子设备,其中,所述利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二目标图像模糊判别模型,包括:
    获取所述第一图像模糊判别模型训练的迭代参数,其中,所述迭代参数包括预设迭代次数;
    将所述错误样本训练集输入至所述第一图像模糊判别模型进行迭代训练,得到所述错误样本训练集的预测标签;
    利用损失函数计算所述预测标签与所述错误样本训练集的预置模糊标签的损失值;
    利用梯度下降算法根据所述损失值更新所述第一图像模糊判别模型的参数,直至所述迭代次数达到预设迭代次数,得到第二目标图像模糊判别模型。
  14. 如权利要求13所述的电子设备,其中,所述损失函数,包括:
    Figure PCTCN2020121568-appb-100002
    其中,L(x,y)为所述损失值,x为所述错误样本训练集的预测标签,y为所述错误样本训练集的预置模糊标签。
  15. 如权利要求9至12中任一项所述的电子设备,其中,所述得到对所述多张待判断图像的模糊判别结果之后,所述指令被所述至少一个处理器执行时还实现如下步骤:
    利用可视化工具将所述模糊判别结果进行可视化处理;
    向用户推送可视化处理得到的可视化数据。
  16. 一种计算机可读存储介质,包括存储数据区和存储程序区,其中,所述存储数据区存储创建的数据,所述存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:
    获取训练图像,利用多种类型的模糊算法对所述训练图像进行模糊扰动,生成多种类型的扰动数据;
    将所述多种类型的扰动数据分别与所述训练图像进行合成,得到多种类型的训练模糊图像;
    利用所述多种类型的训练模糊图像训练图像模糊判别模型,获取训练得到的第一图像模糊判别模型和所述第一图像模糊判别模型对所述多种类型的训练模糊图像的训练预测结果;
    分别计算所述训练预测结果与所述多种类型的训练模糊图像的预置模糊标签的误差值;
    将所述误差值大于预设误差阈值的训练模糊图像汇集为错误样本训练集;
    利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二图像模糊判别模型;
    获取待判断图像集,将所述待判断图像集中多张待判断图像缩放至相同尺寸;
    将缩放后的所述多张待判断图像输入至所述第二图像模糊判别模型进行模糊判别,得到对所述多张待判断图像的模糊判别结果。
  17. 如权利要求16所述的计算机可读存储介质,其中,所述将所述待判断图像集中多张待判断图像缩放至相同尺寸,包括:
    获取所述待判断图像集中多张待判断图像的图像尺寸;
    利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇;
    分别计算所述多个图像簇中所有待判断图像的平均尺寸;
    确定所述多个图像簇中所有待判断图像的平均尺寸的中位数为目标尺寸,将所述多张待判断图像的尺寸缩放至所述目标尺寸。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述利用聚类算法将所述多张待判断图像按照图像尺寸的不同划分为多个图像簇,包括:
    随机从所述多张待判断图像中选取至少两张待判断图像作为待汇集图像集;
    分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值;
    确定与所述待汇集图像集中待汇集图像的尺寸差异值最小的其他待判断图像为所述待汇集图像对应的目标汇集图像;
    将所述待汇集图像中各张待汇集图像与对应的目标汇集图像进行汇集,得到多个图像簇。
  19. 如权利要求18所述的计算机可读存储介质,其中,所述分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值,包括:
    利用如下差异值算法分别计算所述待汇集图像集以外的其他待判断图像的图像尺寸与所述待汇集图像集中待汇集图像的尺寸差异值Dif topic
    Dif topic=Pearson(TP S,TP T)
    其中,TP T为所述待汇集图像的图像尺寸,TP S为所述其他待判断图像的图像尺寸,Pearson表示差异值计算。
  20. 如权利要求16至19中任一项所述的计算机可读存储介质,其中,所述利用所述错误样本训练集对所述第一图像模糊判别模型进行预设迭代次数的训练,得到第二目标图像模糊判别模型,包括:
    获取所述第一图像模糊判别模型训练的迭代参数,其中,所述迭代参数包括预设迭代次数;
    将所述错误样本训练集输入至所述第一图像模糊判别模型进行迭代训练,得到所述错误样本训练集的预测标签;
    利用损失函数计算所述预测标签与所述错误样本训练集的预置模糊标签的损失值;
    利用梯度下降算法根据所述损失值更新所述第一图像模糊判别模型的参数,直至所述迭代次数达到预设迭代次数,得到第二目标图像模糊判别模型。
PCT/CN2020/121568 2020-08-06 2020-10-16 识别模糊图像的方法、装置、设备及计算机可读存储介质 WO2021189827A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010785500.6 2020-08-06
CN202010785500.6A CN111914939B (zh) 2020-08-06 2020-08-06 识别模糊图像的方法、装置、设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2021189827A1 true WO2021189827A1 (zh) 2021-09-30

Family

ID=73287318

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/121568 WO2021189827A1 (zh) 2020-08-06 2020-10-16 识别模糊图像的方法、装置、设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN111914939B (zh)
WO (1) WO2021189827A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784494B (zh) * 2021-01-27 2024-02-06 中国科学院苏州生物医学工程技术研究所 假阳性识别模型的训练方法、目标识别方法及装置
CN113139942B (zh) * 2021-04-21 2023-10-31 Oppo广东移动通信有限公司 图像处理模型的训练方法、装置、电子设备及存储介质
CN113283446B (zh) * 2021-05-27 2023-09-26 平安科技(深圳)有限公司 图像中目标物识别方法、装置、电子设备及存储介质
CN113553985A (zh) * 2021-08-02 2021-10-26 中再云图技术有限公司 一种基于人工智能高空烟雾检测识别方法,存储装置及服务器
CN113763348A (zh) * 2021-09-02 2021-12-07 北京格灵深瞳信息技术股份有限公司 图像质量确定方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886963A (zh) * 2019-03-28 2019-06-14 北京奇艺世纪科技有限公司 一种图像处理方法及***
CN110047071A (zh) * 2019-04-26 2019-07-23 杭州智趣智能信息技术有限公司 一种图像质量评估方法、装置和介质
CN110363158A (zh) * 2019-07-17 2019-10-22 浙江大学 一种基于神经网络的毫米波雷达与视觉协同目标检测与识别方法
CN110378235A (zh) * 2019-06-20 2019-10-25 平安科技(深圳)有限公司 一种模糊人脸图像识别方法、装置及终端设备
CN110705717A (zh) * 2019-09-30 2020-01-17 支付宝(杭州)信息技术有限公司 计算机执行的机器学习模型的训练方法、装置及设备
CN111368758A (zh) * 2020-03-09 2020-07-03 苏宁云计算有限公司 一种人脸模糊度检测方法、装置、计算机设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6950813B2 (en) * 2001-04-23 2005-09-27 Hrl Laboratories, Llc Fuzzy inference network for classification of high-dimensional data
CN108875486A (zh) * 2017-09-28 2018-11-23 北京旷视科技有限公司 目标对象识别方法、装置、***和计算机可读介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886963A (zh) * 2019-03-28 2019-06-14 北京奇艺世纪科技有限公司 一种图像处理方法及***
CN110047071A (zh) * 2019-04-26 2019-07-23 杭州智趣智能信息技术有限公司 一种图像质量评估方法、装置和介质
CN110378235A (zh) * 2019-06-20 2019-10-25 平安科技(深圳)有限公司 一种模糊人脸图像识别方法、装置及终端设备
CN110363158A (zh) * 2019-07-17 2019-10-22 浙江大学 一种基于神经网络的毫米波雷达与视觉协同目标检测与识别方法
CN110705717A (zh) * 2019-09-30 2020-01-17 支付宝(杭州)信息技术有限公司 计算机执行的机器学习模型的训练方法、装置及设备
CN111368758A (zh) * 2020-03-09 2020-07-03 苏宁云计算有限公司 一种人脸模糊度检测方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN111914939B (zh) 2023-07-28
CN111914939A (zh) 2020-11-10

Similar Documents

Publication Publication Date Title
WO2021189827A1 (zh) 识别模糊图像的方法、装置、设备及计算机可读存储介质
WO2022121156A1 (zh) 图像中目标物检测方法、装置、电子设备及可读存储介质
WO2022105179A1 (zh) 生物特征图像识别方法、装置、电子设备及可读存储介质
CN112699775A (zh) 基于深度学习的证件识别方法、装置、设备及存储介质
CN111783982B (zh) 攻击样本的获取方法、装置、设备及介质
CN111782900B (zh) 异常业务检测方法、装置、电子设备及存储介质
WO2021189855A1 (zh) 基于ct序列的图像识别方法、装置、电子设备及介质
WO2022088632A1 (zh) 用户数据监控分析方法、装置、设备及介质
WO2022141858A1 (zh) 行人检测方法、装置、电子设备及存储介质
CN112528908B (zh) 活体检测方法、装置、电子设备及存储介质
WO2021217852A1 (zh) 损伤检测方法、装置、电子设备及介质
CN114398557B (zh) 基于双画像的信息推荐方法、装置、电子设备及存储介质
CN112528616A (zh) 业务表单生成方法、装置、电子设备及计算机存储介质
CN114491047A (zh) 多标签文本分类方法、装置、电子设备及存储介质
CN114708461A (zh) 基于多模态学习模型的分类方法、装置、设备及存储介质
CN113435308B (zh) 文本多标签分类方法、装置、设备及存储介质
WO2022227192A1 (zh) 图像分类方法、装置、电子设备及介质
CN112528903B (zh) 人脸图像获取方法、装置、电子设备及介质
CN117155771B (zh) 一种基于工业物联网的设备集群故障溯源方法及装置
CN112101481B (zh) 目标物的影响因子筛选方法、装置、设备及存储介质
JP2013105373A (ja) データ取得装置、方法及びプログラム
CN113419951B (zh) 人工智能模型优化方法、装置、电子设备及存储介质
CN112580505B (zh) 网点开关门状态识别方法、装置、电子设备及存储介质
CN113705686B (zh) 图像分类方法、装置、电子设备及可读存储介质
CN112233194B (zh) 医学图片优化方法、装置、设备及计算机可读存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1