Operator-based image detection method and device, electronic equipment and readable medium
By generating a prediction model using a rotation convolution operator and a target offset information set, the problems of long image detection time and model operator error are solved, thus achieving an efficient image detection process.
Patent Information
- Application Number
- CN202310473285.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2043-04-27
AI Technical Summary
In existing technologies, image detection involves a large amount of model training work and a long detection cycle, which may be caused by the rotation error of the model operator, resulting in a longer cycle.
By acquiring images captured by a camera, determining the rotation angle, and processing the rotation transformation matrix to generate a rotation convolution operator prediction model, this model is used for image detection. Based on the predicted bounding box images, a target offset information set and a predicted bounding box image set are generated, and finally, the target image is adjusted and generated.
It shortens image detection time, improves detection accuracy, reduces the possibility of model operator rotation errors, and reduces the workload of retraining the model.
Smart Images

Figure CN116503355B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the field of computer technology, and particularly to an image detection method and device based on an operator, an electronic device and a readable medium. BACKGROUND
[0002] Image detection is a technology for obtaining a corresponding target picture image according to camera detection requirements. At present, the commonly used way for image detection is to re-produce a data set and train a model for data after camera rotation or inversion.
[0003] However, when the above-mentioned way is used, the following technical problems often exist:
[0004] First, as more and more picture images are obtained, the workload of re-training the model is increasing, and the image detection time is relatively long.
[0005] Second, model operator rotation errors may occur during image detection, resulting in a longer image detection cycle.
[0006] The above information disclosed in the background section is only intended to enhance the understanding of the background of the present inventive concept, and therefore, it can include information that does not form the prior art known to those of ordinary skill in the art in the country. SUMMARY
[0007] The summary section of the present disclosure is used to introduce the concepts in a brief form, which will be described in detail in the specific embodiments section. The summary section of the present disclosure is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0008] Some embodiments of the present disclosure propose an image detection method and device based on an operator, an electronic device and a computer readable medium to solve one or more of the technical problems mentioned in the background section.
[0009] In a first aspect, some embodiments of the present disclosure provide an image detection method based on an operator, which includes: obtaining a picture image captured by a camera; determining a rotation angle of the picture image according to a standard picture image; performing rotation transformation matrix processing on an initial convolution operator prediction model according to the rotation angle to generate a rotated convolution operator prediction model; inputting the picture image into the rotated convolution operator prediction model to obtain picture image data, wherein the picture image data displays a plurality of prediction frame images; generating a target offset information set according to the plurality of prediction frame images; inputting the picture image into the initial convolution operator prediction model to obtain initial picture image data, wherein the initial picture image data displays a plurality of to-be-tested prediction frame images; generating a target prediction frame image set according to the plurality of to-be-tested prediction frame images; and adjusting the target prediction frame image set according to the target offset information set to generate a target picture image.
[0010] In a second aspect, some embodiments of the present disclosure provide an image detection device based on an operator, which includes: an obtaining unit configured to obtain a picture image captured by a camera; a determining unit configured to determine a rotation angle of the picture image according to a standard picture image; a transformation unit configured to perform rotation transformation matrix processing on an initial convolution operator prediction model according to the rotation angle to generate a rotated convolution operator prediction model; a first input unit configured to input the picture image into the rotated convolution operator prediction model to obtain picture image data, wherein the picture image data displays a plurality of prediction frame images; a first generation unit configured to generate a target offset information set according to the plurality of prediction frame images; a second input unit configured to input the picture image into the initial convolution operator prediction model to obtain initial picture image data, wherein the initial picture image data displays a plurality of to-be-tested prediction frame images; a second generation unit configured to generate a target prediction frame image set according to the plurality of to-be-tested prediction frame images; and an adjusting unit configured to adjust the target prediction frame image set according to the target offset information set to generate a target picture image.
[0011] In a third aspect, some embodiments of the present disclosure provide an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the implementations of the first aspect.
[0012] In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method described in any of the implementations of the first aspect.
[0013] The above various embodiments of the present disclosure have the following beneficial effects: the image detection time is shortened by the operator-based image detection method of some embodiments of the present disclosure. Specifically, the reason for the long image detection time is that as more and more picture images are obtained, the workload of the training model becomes larger, and the image detection time is longer. Based on this, the operator-based image detection method of some embodiments of the present disclosure first obtains a picture image captured by a camera. Second, the rotation angle of the picture image is determined according to a standard picture image. Third, the rotation transformation matrix processing is performed on the initial convolution operator prediction model according to the rotation angle to generate a rotated convolution operator prediction model. In this way, the picture image can be detected by the rotated convolution operator prediction model, so that the model does not need to be retrained, and the image detection time is reduced. Then, the picture image is input into the rotated convolution operator prediction model to obtain picture image data, wherein the picture image data shows a plurality of prediction box images. Then, the target offset information set is generated according to the plurality of prediction box images. Then, the picture image is input into the initial convolution operator prediction model to obtain initial picture image data, wherein the initial picture image data shows a plurality of to-be-detected prediction box images. Then, the target prediction box image set is generated according to the plurality of to-be-detected prediction box images. Here, the obtained picture image data is adjusted, so that the accuracy of image detection is improved. Then, the target prediction box image set is adjusted according to the target offset information set to generate a target picture image. In this way, the image detection time is shortened. Further, the time for obtaining the target picture image is shortened. BRIEF DESCRIPTION OF DRAWINGS
[0014] The above and other features, aspects, and advantages of the present disclosure will become more apparent with reference to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or like reference numerals refer to the same or like elements. It is to be understood that the drawings are schematic, and elements and features are not necessarily to scale.
[0015] Figure 1 is a flowchart of some embodiments of the operator-based image detection method according to the present disclosure;
[0016] Figure 2 is a structural schematic diagram of some embodiments of the operator-based image detection device according to the present disclosure;
[0017] Figure 3 is a structural schematic diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be thoroughly and completely understood. It should be understood that the drawings and embodiments of the present disclosure are only for illustrative purposes and are not intended to limit the scope of protection of the present disclosure.
[0019] It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0020] It should be noted that the terms "first", "second", and the like mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the terms "one", "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, "one" or "multiple" should be understood as "one or more".
[0022] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes and are not intended to limit the scope of the messages or information.
[0023] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0024] Figure 1 Flow 100 of some embodiments of the operator-based image detection method of the present disclosure. The operator-based image detection method comprises the following steps:
[0025] Step 101, acquiring a picture image captured by a camera.
[0026] In some embodiments, the execution subject (such as a computing device) of the operator-based image detection method can acquire the picture image captured by the camera through wired connection or wireless connection. Here, the picture image can refer to the picture image captured by the camera within a preset time period. For example, the picture image can refer to the image captured by the camera including the road, people flow, trees, etc. in the monitoring section. It should be noted that the above wireless connection mode can include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other now known or future developed wireless connection modes.
[0027] Step 102, determining the rotation angle of the picture image according to the standard picture image.
[0028] In some embodiments, the execution subject can determine the rotation angle of the picture image according to the standard picture image. Here, the standard picture image can be an upright image. The execution subject can determine the rotation angle of the picture image relative to the standard picture image. For example, the rotation angle can be the angle of clockwise offset, or the angle of counterclockwise offset.
[0029] Step 103, performing rotation transformation matrix processing on the initial convolution operator prediction model according to the rotation angle to generate a rotated convolution operator prediction model.
[0030] In some embodiments, the execution subject can perform rotation transformation matrix processing on the initial convolution operator prediction model according to the rotation angle to generate a rotated convolution operator prediction model. Here, the initial convolution operator prediction model can refer to a deep learning detection model. Here, the rotation transformation matrix processing can be a rotation transformation. That is, the execution subject can rotate the convolution operator in the initial convolution operator prediction model according to the rotation direction of the rotation angle to generate a rotated convolution operator prediction model.
[0031] Optionally, the initial convolution operator prediction model is trained by the following steps:
[0032] First, obtain a picture image sample set. Here, obtaining a picture image sample set means randomly obtaining a picture image sample set. Here, the picture image sample in the picture image sample set refers to the content of the picture image taken by the camera within a predetermined time period.
[0033] Second, select a picture image sample from the picture image sample set. Here, selecting a picture image sample from the picture image sample set means randomly selecting a picture image sample.
[0034] Third, input the picture image sample into an initial convolution neural network model to obtain picture image test data. Here, the initial convolution neural network model can be a convolution neural network model that has not been trained. Here, the picture image test data means that for the picture image sample, the corresponding picture image test data means that the picture image is divided into multiple grid picture images of the same proportion.
[0035] Fourth, based on a predetermined picture image data loss function, determine the data difference value between the picture image test data and the picture image sample label included in the picture image sample. The picture image data loss function can include but is not limited to: mean square error loss function (MSE), cross entropy loss function (CrossEntropy), etc.
[0036] In the fifth step, in response to the data difference value being greater than or equal to the preset data threshold, the network parameters of the initial convolution operator prediction model are adjusted.
[0037] In some embodiments, the execution subject can adjust the network parameters of the initial convolution operator prediction model in response to the data difference value being greater than or equal to the preset data threshold. Here, the setting of the preset data threshold is not limited. For example, the difference between the data difference value and the preset data threshold can be obtained to obtain a loss difference value. On this basis, the data difference value is propagated from the last layer of the model to the front layer by using methods such as back propagation and stochastic gradient descent, so as to adjust the parameters of each layer. Of course, according to the needs, the network freezing (dropout) method can also be used to keep the network parameters of some layers unchanged and not adjusted, and no limitation is made in this regard.
[0038] In the sixth step, in response to the data difference value being less than the preset data threshold, the initial convolution neural network model is determined as the initial convolution operator prediction model.
[0039] In some embodiments, the execution subject can determine the initial convolution neural network model as the initial convolution operator prediction model in response to the data difference value being less than the preset data threshold. Here, the setting of the preset data threshold is not limited.
[0040] The above-mentioned related content in the first step to the sixth step is an application point of the present disclosure, which solves the second technical problem mentioned in the background art, i.e., the image detection period is lengthened. The factors that cause the image detection period to be lengthened are often as follows: model operator rotation errors may occur during image detection. If the above factors are solved, the effect of shortening the image detection period can be achieved. In order to achieve this effect, first, a picture image sample set is obtained. Then, a picture image sample is selected from the picture image sample set. Then, the picture image sample is input into an initial convolutional neural network model to obtain picture image test data. Then, based on a preset picture image data loss function, a data difference value between the picture image test data and picture image sample labels included in the picture image sample is determined. In this way, the network parameters of the initial convolutional operator prediction model can be adjusted through the data difference value between the picture image test data and the picture image sample labels included in the picture image sample, thereby reducing the possibility of model operator errors occurring during image detection. Then, in response to the data difference value being greater than or equal to a preset data threshold, the network parameters of the initial convolutional operator prediction model are adjusted. Finally, in response to the data difference value being less than the preset data threshold, the initial convolutional neural network model is determined as the initial convolutional operator prediction model. In this way, the possibility of model operator rotation errors occurring during image detection is reduced, and the image detection period is shortened.
[0041] Step 104, inputting the picture image into the rotation convolutional operator prediction model to obtain picture image data.
[0042] In some embodiments, the execution subject can input the picture image into the rotation convolutional operator prediction model to obtain picture image data. The picture image data can be a plurality of grid prediction frame images obtained by dividing the picture image after the rotation convolutional operator prediction model.
[0043] Step 105, generating a target offset information set according to the plurality of prediction frame images.
[0044] In some embodiments, the execution subject can generate a target offset information set according to the plurality of prediction frame images. The target offset information set can be a plurality of target offset information obtained by transforming the plurality of prediction frame images.
[0045] In practice, the execution subject can generate a target offset information set according to the plurality of prediction frame images by the following steps:
[0046] In a first step, a convolution operation is performed on each of the plurality of prediction box images to generate prediction offset information, thereby obtaining a set of prediction offset information. The prediction offset information in the set of prediction offset information includes a horizontal prediction offset and a vertical prediction offset. The convolution operation can be a transpose convolution. The horizontal prediction offset can be a horizontal coordinate of the prediction offset. The vertical prediction offset can be a vertical coordinate of the prediction offset. For example, the prediction offset information can be a two-tuple (x, y), where x can be the horizontal prediction offset and y can be the vertical prediction offset.
[0047] In a second step, a center point coordinate transformation operation is performed on each of the set of prediction offset information to generate transformed prediction offset information as target offset information, thereby obtaining a set of target offset information. The target offset information can be the offset information of the prediction box image after transformation.
[0048] In practice, the second step can include the following sub-steps:
[0049] In a first sub-step, the vertical prediction offset is rotated in a direction opposite to the direction of the horizontal prediction offset, thereby obtaining a target horizontal offset. For example, the direction of the horizontal prediction offset can be a horizontal left direction. The direction opposite to the direction of the horizontal prediction offset can be a horizontal right direction. The target horizontal offset can be a horizontal coordinate of the rotated prediction offset. For example, the target horizontal offset can be -x.
[0050] In a second sub-step, the horizontal prediction offset is rotated in a direction indicated by the vertical prediction offset, thereby obtaining a target vertical offset. For example, the direction of the vertical prediction offset can be a vertical upward direction. The direction indicated by the vertical prediction offset can be a vertical upward direction. The target vertical offset can be a vertical coordinate of the rotated prediction offset. For example, the target vertical offset can be y1.
[0051] In a third sub-step, the target horizontal offset and the target vertical offset are combined as the target offset information. The combination of the target horizontal offset and the target vertical offset as the target offset information can be merging. For example, the target offset information can be (-x, y1).
[0052] In step 106, the picture image is input into the initial convolution operator prediction model, thereby obtaining initial picture image data.
[0053] In some embodiments, the execution subject can input the picture image into the initial convolutional operator prediction model to obtain initial picture image data, where the initial picture image data shows a plurality of to-be-tested prediction frame images. Here, the initial picture image data can refer to a plurality of grid prediction frame images obtained by segmenting the picture image through the initial convolutional operator prediction model.
[0054] In step 107, a target prediction frame image set is generated according to the plurality of to-be-tested prediction frame images.
[0055] In some embodiments, the execution subject can generate a target prediction frame image set according to the plurality of to-be-tested prediction frame images. Here, the plurality of to-be-tested prediction frame images can refer to a plurality of small images with the same width-height ratio obtained by segmenting the picture image. The target prediction frame image set can refer to a plurality of target prediction frame images obtained by transposing the plurality of to-be-tested prediction frame images.
[0056] In practice, the execution subject can generate a target prediction frame image set according to the plurality of to-be-tested prediction frame images by the following steps:
[0057] First, each to-be-tested prediction frame image in the plurality of to-be-tested prediction frame images is decoded to generate prediction frame information to obtain a prediction frame information set, where the prediction frame information in the prediction frame information set includes a prediction frame width and a prediction frame height. Each to-be-tested prediction frame image in the plurality of to-be-tested prediction frame images corresponds to each prediction frame information in the prediction frame information set. Here, the decoding in the decoding of each to-be-tested prediction frame image in the plurality of to-be-tested prediction frame images can refer to Inverse Discrete Cosine Transform (IDCT).
[0058] Second, each to-be-tested prediction frame image corresponding to the prediction frame information is transposed according to each prediction frame information included in the prediction frame information set to generate a transposed to-be-tested prediction frame image as a target prediction frame image to obtain a target prediction frame image set. Here, the target prediction frame image can refer to a prediction frame image after transposition. For example, the to-be-tested prediction frame image can be a two-tuple (w, h), where w can refer to the prediction frame width and h can refer to the prediction frame height.
[0059] In practice, the second step can include the following sub-steps:
[0060] The first sub-step is to replace the prediction frame width included in the prediction frame information with the prediction frame height included in the prediction frame information to obtain a target prediction frame height. Here, the replacement of the prediction frame width included in the prediction frame information with the prediction frame height included in the prediction frame information can be mutual exchange. For example, the target prediction frame height can refer to the prediction frame width included in the prediction frame information. For example, the target prediction frame height can be w, where w can refer to the prediction frame width included in the prediction frame information.
[0061] The second sub-step is to replace the prediction frame height included in the prediction frame information with the prediction frame width included in the prediction frame information to obtain a target prediction frame width. Here, the replacement of the prediction frame height included in the prediction frame information with the prediction frame width included in the prediction frame information can be mutual exchange. For example, the target prediction frame width can refer to the prediction frame height included in the prediction frame information. For example, the target prediction frame width can be h, where h can refer to the prediction frame height included in the prediction frame information.
[0062] The third sub-step is to perform scaling processing on the to-be-detected prediction frame image according to the target prediction frame height and the target prediction frame width to generate a scaled to-be-detected prediction frame image as a target prediction frame image. Here, according to the target prediction frame height and the target prediction frame width, the scaling in the scaling processing on the to-be-detected prediction frame image can be magnification or reduction. For example, the target prediction frame image can refer to (h, w).
[0063] Step 108 is to adjust the target prediction frame image set according to the target offset information set to generate a target picture image.
[0064] In some embodiments, the execution subject can adjust the target prediction frame image set according to the target offset information set to generate a target picture image. Here, the target picture image can refer to an upright picture image.
[0065] In practice, according to the target offset information set, the execution subject can adjust the target prediction frame image set to generate a target picture image by the following steps:
[0066] The first step is to adjust the target prediction frame image set according to the target offset information set to generate a final target prediction frame image set.
[0067] In some embodiments, the execution subject can adjust the target prediction frame image set according to the target offset information set to generate a final target prediction frame image set, wherein the target offset information in the target offset information set corresponds to the final target prediction frame image in the final target prediction frame image set. Here, the adjustment of the target prediction frame image set according to the target offset information set to generate the final target prediction frame image set can refer to the translation transformation of the pixel points. For example, each target prediction frame image in the target prediction frame image set is translated according to the corresponding target offset information.
[0068] Secondly, each target prediction frame image in the final target prediction frame image set is combined into a target picture image. Here, the combination of each target prediction frame image in the final target prediction frame image set into the target picture image can refer to merging.
[0069] Further referring to Figure 2 , as an implementation of the method shown in each of the above figures, the present disclosure provides some embodiments of an image detection method based on an operator, and the device embodiments correspond to those method embodiments shown in Figure 1 , and the device can be applied in various electronic devices.
[0070] As shown in Figure 2 , the image detection device 200 based on an operator in some embodiments includes:
[0071] The acquisition unit 201, the determination unit 202, the transformation unit 203, the first input unit 204, the first generation unit 205, the second input unit 206, the second generation unit 207, and the adjustment unit 208. Among them, the acquisition unit 201 is configured to acquire a picture image shot by a camera; the determination unit 202 is configured to determine a rotation angle of the picture image according to a standard picture image; the transformation unit 203 is configured to perform a rotation transformation matrix processing on an initial convolutional operator prediction model according to the rotation angle, to generate a rotated convolutional operator prediction model; the first input unit 204 is configured to input the picture image into the rotated convolutional operator prediction model, to obtain picture image data, wherein the picture image data shows a plurality of prediction frame images; the first generation unit 205 is configured to generate a target offset information set according to the plurality of prediction frame images; the second input unit 206 is configured to input the picture image into the initial convolutional operator prediction model, to obtain initial picture image data, wherein the initial picture image data shows a plurality of to-be-tested prediction frame images; the second generation unit 207 is configured to generate a target prediction frame image set according to the plurality of to-be-tested prediction frame images; and the adjustment unit 208 is configured to adjust the target prediction frame image set according to the target offset information set, to generate a target picture image.
[0072] It can be understood that the units described in the device 200 correspond to the respective steps in the method described with reference to Figure 1 Thus, the operations, features, and advantages described above for the method also apply to the device 200 and the units contained therein, which will not be described here again.
[0073] Reference is made below to Figure 3 which shows a structural schematic diagram of an electronic device (such as a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.
[0074] As shown in Figure 3 , the electronic device 300 can include a processing device (such as a central processor, a graphics processor, etc.) 301, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 302 or programs loaded from a storage device 308 into a random access memory (RAM) 304. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 304 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0075] In general, the following devices can be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, a magnetic tape, a hard disk, and the like; and communication devices 309. The communication devices 309 can allow the electronic device 300 to communicate wirelessly or wired with other devices to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it is understood that all of the shown devices are not required to be implemented or present. More or less devices can alternatively be implemented or present. Figure 3 Each block shown in the flowcharts can represent a device or multiple devices as needed.
[0076] In particular, processes described above with reference to the flowcharts can be implemented as a computer software program according to some embodiments of the present disclosure. For example, some embodiments of the present disclosure include a computer program product including a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In some such embodiments, the computer program can be downloaded and installed from a network through the communication devices 309, or installed from the storage devices 308, or installed from the ROM 302. When the computer program is executed by the processing devices 301, functions defined in the methods of some embodiments of the present disclosure are performed.
[0077] Note that the computer-readable medium in some embodiments of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may, for example and without limitation, be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, the computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such a propagated data signal can take a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can communicate, propagate, or transport program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained in the computer-readable medium can be transmitted using any suitable medium, including but not limited to wire, cable, RF, etc., or any suitable combination of the foregoing.
[0078] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0079] The computer readable medium can be included in the electronic device, or exist separately from the electronic device. The computer readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire a picture image captured by a camera; determine a rotation angle of the picture image according to a standard picture image; perform rotation transformation matrix processing on an initial convolutional operator prediction model according to the rotation angle to generate a rotated convolutional operator prediction model; input the picture image into the rotated convolutional operator prediction model to obtain picture image data, wherein the picture image data displays a plurality of prediction box images; generate a target offset information set according to the plurality of prediction box images; input the picture image into the initial convolutional operator prediction model to obtain initial picture image data, wherein the initial picture image data displays a plurality of to-be-tested prediction box images; generate a target prediction box image set according to the plurality of to-be-tested prediction box images; and adjust the target prediction box image set according to the target offset information set to generate a target picture image.
[0080] Computer program code for carrying out operations of some embodiments of the disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0081] The flow and block diagrams in the drawings represent possible architectural, functional, and operational scenarios of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow or block diagrams can represent a module, a segment, or a portion of code that comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0082] The units described in some embodiments of the present disclosure can be implemented by means of software, or can be implemented by hardware. The units described above can also be arranged in a processor, for example, a processor can be described as: a processor comprising an acquisition unit, a determination unit, a transformation unit, a first input unit, a first generation unit, a second input unit, a second generation unit, and an adjustment unit. In some cases, the names of these units do not constitute a limitation on the units themselves, for example, the acquisition unit can also be described as "a unit for acquiring a picture image captured by a camera".
[0083] The functions described above in the present disclosure can be performed at least in part by one or more hardware logic components. For example, non-limiting example types of hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SOCs), complex programmable logic devices (CPLDs), etc.
[0084] The above description is merely some of the preferred embodiments of the present disclosure and a description of the technical principles applied above. Those skilled in the art should understand that the scope of the application involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combinations of the technical features described above, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features thereof without departing from the above inventive concept. For example, the above technical features can be replaced with technical features disclosed in the embodiments of the present disclosure (but not limited to) having similar functions to form technical solutions.
Claims
1. An image detection method based on an operator, comprising: obtaining a picture image captured by a camera; determining a rotation angle of the picture image according to a standard picture image; performing rotation transformation matrix processing on an initial convolution operator prediction model according to the rotation angle to generate a rotated convolution operator prediction model; inputting the picture image into the rotated convolution operator prediction model to obtain picture image data, wherein the picture image data displays a plurality of prediction box images; generating a target offset information set according to the plurality of prediction box images; inputting the picture image into the initial convolution operator prediction model to obtain initial picture image data, wherein the initial picture image data displays a plurality of to-be-tested prediction box images; generating a target prediction box image set according to the plurality of to-be-tested prediction box images; adjusting the target prediction box image set according to the target offset information set to generate a target picture image, comprising: adjusting the target prediction box image set according to the target offset information set to generate a final target prediction box image set, wherein the adjustment refers to translation transformation of pixel points; combining each target prediction box image in the final target prediction box image set into a target picture image.
2. The method of claim 1, wherein, The initial convolution operator prediction model is trained by the following steps: obtaining a picture image sample set; selecting a picture image sample from the picture image sample set; inputting the picture image sample into an initial convolution neural network model to obtain picture image test data; determining a data difference value between the picture image test data and a picture image sample label included in the picture image sample based on a preset picture image data loss function; in response to the data difference value being greater than or equal to a preset data threshold, adjusting network parameters of the initial convolution operator prediction model.
3. The method of claim 2, wherein, The method further comprises: in response to the data difference value being less than the preset data threshold, determining the initial convolution neural network model as an initial convolution operator prediction model.
4. The method of claim 1, wherein, The generating a target offset information set according to the plurality of prediction box images comprises: performing convolution processing on each prediction box image in the plurality of prediction box images to generate prediction offset information to obtain a prediction offset information set, wherein the prediction offset information in the prediction offset information set includes a horizontal prediction offset and a vertical prediction offset; performing center point coordinate transformation processing on each prediction offset information included in the prediction offset information set to generate transformed prediction offset information as target offset information to obtain a target offset information set.
5. The method of claim 1, wherein, The generating a target prediction box image set according to the plurality of to-be-tested prediction box images comprises: performing decoding processing on each to-be-tested prediction box image in the plurality of to-be-tested prediction box images to generate prediction box information to obtain a prediction box information set, wherein the prediction box information in the prediction box information set includes a prediction box width and a prediction box height; According to each prediction box information included in the prediction box information set, a flip processing is performed on a to-be-tested prediction box image corresponding to the prediction box information to generate a flip to-be-tested prediction box image as a target prediction box image, to obtain a target prediction box image set.
6. The method of claim 4, wherein, The center point coordinate transformation processing is performed on each prediction offset information included in the prediction offset information set to generate a transformed prediction offset information as a target offset information, including: According to the opposite direction of the horizontal prediction offset, the vertical prediction offset is rotated to obtain a target horizontal offset; According to the direction pointed by the vertical prediction offset, the horizontal prediction offset is rotated to obtain a target vertical offset; The target horizontal offset and the target vertical offset are combined as the target offset information.
7. The method of claim 5, wherein, The flip processing is performed on the to-be-tested prediction box image corresponding to the prediction box information according to each prediction box information included in the prediction box information set to generate a flip to-be-tested prediction box image as a target prediction box image, including: The prediction box height included in the prediction box information is replaced by the prediction box width included in the prediction box information to obtain a target prediction box width; The prediction box width included in the prediction box information is replaced by the prediction box height included in the prediction box information to obtain a target prediction box height; According to the target prediction box height and the target prediction box width, a scaling processing is performed on the to-be-tested prediction box image to generate a scaled to-be-tested prediction box image as a target prediction box image.
8. The method of claim 1, wherein, The adjustment is performed on the target prediction box image set according to the target offset information set to generate a target picture image, including: The adjustment is performed on the target prediction box image set according to the target offset information set to generate a final target prediction box image set; Each target prediction box image in the final target prediction box image set is combined as a target picture image.
9. An image detection device based on an operator, comprising: an acquisition unit configured to acquire a picture image shot by a camera; a determination unit configured to determine a rotation angle of the picture image according to a standard picture image; a transformation unit configured to perform a rotation transformation matrix processing on an initial convolution operator prediction model according to the rotation angle to generate a rotated convolution operator prediction model; a first input unit configured to input the picture image into the rotated convolution operator prediction model to obtain picture image data, wherein the picture image data displays a plurality of prediction box images; a first generation unit configured to generate a target offset information set according to the plurality of prediction box images; a second input unit configured to input the picture image into the initial convolution operator prediction model to obtain initial picture image data, wherein the initial picture image data displays a plurality of to-be-tested prediction box images; a second generation unit configured to generate a target prediction box image set according to the plurality of to-be-tested prediction box images; an adjustment unit configured to adjust the target prediction box image set according to the target offset information set to generate a target picture image, including: According to the target offset information set, the target prediction frame image set is adjusted to generate a final target prediction frame image set, wherein the adjustment refers to a translation transformation on the pixel points; Each target prediction frame image in the final target prediction frame image set is combined into a target picture image. 10.An electronic device, comprising: one or more processors; a memory device having stored thereon one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer readable medium having stored thereon a computer program, wherein, The program is executed by the processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Target area recognition method, device and equipment, and readable storage medium
CN111680678A
Picture feature extraction method and device, computer equipment and readable storage medium
CN111898619A