CN118247793A - Image detection method, device, electronic equipment and storage medium - Google Patents

Image detection method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118247793A
CN118247793A CN202410223369.2A CN202410223369A CN118247793A CN 118247793 A CN118247793 A CN 118247793A CN 202410223369 A CN202410223369 A CN 202410223369A CN 118247793 A CN118247793 A CN 118247793A
Authority
CN
China
Prior art keywords
detection
image
sample
target
model
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202410223369.2A
Other languages
Chinese (zh)
Inventor
张俊飞
叶留军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Communication Information System Tianjin Co Ltd
Original Assignee
Inspur Communication Information System Tianjin Co Ltd
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 Inspur Communication Information System Tianjin Co Ltd filed Critical Inspur Communication Information System Tianjin Co Ltd
Priority to CN202410223369.2A priority Critical patent/CN118247793A/en
Publication of CN118247793A publication Critical patent/CN118247793A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides an image detection method, an image detection device, electronic equipment and a storage medium, which belong to the technical field of image processing, wherein the method comprises the following steps: acquiring a detection image; inputting the detection image into an image detection model to obtain a detection result of the target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying objects of a plurality of divided detection images and associated information of the objects, and determining a detection result of a target to be detected based on the associated information of the objects, wherein the associated information comprises positions and categories of the objects. According to the invention, the deep learning model is trained through the text content of the sample and the actual detection result of the target to be detected, so that the image detection model is obtained, the accuracy of the image detection model is improved, the detection result of the target to be detected is determined through the association relation between the object in the detection image, the automatic detection of the detection image is realized, and the image detection efficiency is improved.

Description

Image detection method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image detection method, an image detection device, an electronic device, and a storage medium.
Background
With the development of internet technology, image detection is becoming an increasingly important requirement. The traditional image monitoring method is mainly based on matching of search words and picture titles, and is poor in accuracy and few in search results. In addition, since there is often inconsistency in the title and picture content, the ordering of search results is also difficult to keep reasonable.
In summary, the existing image detection has low efficiency.
Disclosure of Invention
The invention provides an image detection method, an image detection device, electronic equipment and a storage medium, which are used for solving the defect of low image detection efficiency in the prior art and improving the image detection efficiency.
In a first aspect, the present invention provides an image detection method, including: acquiring a detection image; inputting the detection image into an image detection model, and obtaining a detection result of a target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the object of a plurality of divided detection images and the associated information of the object, determining the detection result of the target to be detected based on the associated information of the object and the object, wherein the associated information comprises the position and the category of the object, the image detection model is obtained by training based on a sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected of the sample.
According to the image detection method provided by the invention, the image detection model is obtained based on the following steps: identifying the sample detection image based on the sample text content of the sample detection image to obtain a training sample; training the deep learning model based on the training sample to determine parameter values of the deep learning model; and labeling the output result of the trained deep learning model based on the actual detection result of the target to be detected of the sample, and adjusting the output result based on the labeling result to obtain the image detection model.
According to the image detection method provided by the invention, the image detection model is used for identifying the object of the plurality of segmented detection images and the associated information of the object: determining a convolution grade of each segmented detection image based on the size of the object of the segmented detection image, convolving the segmented detection image based on the convolution grade, extracting characteristic information of the object, wherein the convolution grade comprises convolution times and convolution kernel size, and identifying the object and the class of the object according to the characteristic information; and associating the characteristic information according to the window to which the characteristic information belongs and the matching information of the characteristic information, and identifying the position of the object.
According to the image detection method provided by the invention, the image detection model is used for dividing the detection image: determining boundary areas between different objects in the detection image based on the change information of pixels of the detection image; and dividing the detection image based on the boundary area.
According to the image detection method provided by the invention, the detection image acquisition comprises the following steps: acquiring an initial picture of the target to be detected and watermark information of the initial picture; verifying the authenticity of the initial picture based on the watermark information; and taking the original picture in the initial picture as the detection image based on a verification result.
According to the image detection method provided by the invention, the image detection model is used for determining the watermark information: the watermark information is determined based on the longitude, latitude and time at which the initial picture was taken.
According to the image detection method provided by the invention, the image detection model is used for determining the detection result of the target to be detected based on the association information of the object and the object: determining a plurality of target features associated with the target to be detected based on the object and the associated information of the object; converting a plurality of the target features into inverted indexes of the detection images based on the importance of the target features; and determining a detection result of the target to be detected based on the inverted index.
In a second aspect, the present invention also provides an image detection apparatus, including: the acquisition module is used for acquiring the detection image; the detection module is used for inputting the detection image into an image detection model and obtaining a detection result of the target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the object of a plurality of divided detection images and the associated information of the object, determining the detection result of the target to be detected based on the associated information of the object and the object, wherein the associated information comprises the position and the category of the object, the image detection model is obtained by training based on a sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected of the sample.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing any of the image detection methods described above when executing the program.
In a fourth aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the image detection method as described in any of the above.
The invention provides an image detection method, an image detection device, electronic equipment and a storage medium, wherein a detection image is obtained; inputting the detection image into an image detection model, and obtaining a detection result of a target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the object of a plurality of divided detection images and the associated information of the object, determining the detection result of the target to be detected based on the associated information of the object and the object, wherein the associated information comprises the position and the category of the object, the image detection model is obtained by training based on a sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected of the sample. According to the invention, the deep learning model is trained through the text content of the sample and the actual detection result of the target to be detected, so that the image detection model is obtained, the accuracy of the image detection model is improved, the detection result of the target to be detected is determined through the association relation between the object in the detection image, the automatic detection of the detection image is realized, and the image detection efficiency is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an image detection method according to the present invention;
FIG. 2 is a schematic flow chart of extracting feature information of a segmented detection image provided by the invention;
FIG. 3 is a second flow chart of the image detection method according to the present invention;
FIG. 4 is a schematic diagram of an image detection device according to the present invention;
Fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following describes an image detection method, an image detection device and an electronic device provided by the embodiment of the invention with reference to fig. 1 to 5.
Fig. 1 is a schematic flow chart of an image detection method provided by the present invention, as shown in fig. 1, an embodiment of the present invention provides an image detection method, which includes steps S100 to S200, and the steps are specifically as follows:
s100: a detection image is acquired.
It should be noted that, the execution body of the embodiment of the present invention may be an image detection system, a server, a computer device, such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or the like.
The image acquisition device automatically acquires images of equipment, construction process or environment to be detected, and an initial picture is obtained. The image acquisition device uploads the initial pictures to an image detection system, and the image detection system collects the initial pictures of the image acquisition devices through technologies such as data extraction-transformation-Load (ETL), feature engineering and the like. And preprocessing the initial picture to obtain a detection image.
S200: and inputting the detection image into an image detection model, and obtaining a detection result of the target to be detected, which is output by the image detection model.
The image detection model is used for dividing the detection image, identifying the objects of the plurality of divided detection images and the associated information of the objects, determining the detection result of the target to be detected based on the associated information of the objects, wherein the associated information comprises the position and the category of the objects, the image detection model is obtained by training based on the sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected.
Training a deep learning model according to sample text content of a sample detection image in advance. The trained deep learning model can perform operations such as similar picture clustering and picture-to-text conversion on the sample detection image. And fine tuning the output of the trained deep learning model according to the actual detection result of the target to be detected of the sample to obtain an image detection model. The image detection model can classify the detection image or the segmented image of the detection image, and determine the detection result of the target to be detected according to the classification result.
For example, in the detection of the dust cap, the detection image is an appearance picture of the apparatus, and the object to be detected is the dust cap. Inputting the detection picture into an image detection model, dividing the detection image into a standard image and an irregular image by the image detection model, wherein the detection result corresponding to the standard image is dustproof, and the detection result corresponding to the irregular image is lack of dustproof.
According to the image detection method provided by the embodiment of the invention, the detection image is obtained; inputting the detection image into an image detection model to obtain a detection result of the target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the objects of the plurality of divided detection images and the associated information of the objects, determining the detection result of the target to be detected based on the associated information of the objects, wherein the associated information comprises the position and the category of the objects, the image detection model is obtained by training based on the sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected. According to the embodiment of the invention, the deep learning model is trained through the text content of the sample and the actual detection result of the target to be detected of the sample, so that the image detection model is obtained, the accuracy of the image detection model is improved, the detection result of the target to be detected is determined through the association relation between the object and the object in the detection image, the automatic detection of the detection image is realized, and the image detection efficiency is improved.
In one embodiment, the image detection model is obtained based on steps S210 to S240, and the steps are specifically as follows:
S210: and identifying the sample detection image based on the sample text content of the sample detection image to obtain a training sample.
S220: based on the training samples, the deep learning model is trained to determine parameter values of the deep learning model.
S230: and labeling the output result of the trained deep learning model based on the actual detection result of the target to be detected of the sample, and adjusting the output result based on the labeling result to obtain the image detection model.
And marking the sample detection image according to the sample text content contained in the sample detection image to obtain a training sample. For example, the sample text content is free of cluttered line head, line fixation, etc. And determining a plurality of initial parameter values of the deep learning model according to the target to be detected of the sample. The initial parameter values are not the same for different samples of the target to be detected. And training the deep learning model according to the training sample to optimize the initial parameter value. And selecting a group of initial parameter values with high recognition rate as parameter values of the deep learning model according to the training result, wherein the initial parameter values are balanced by all parties.
And labeling the output result of the trained deep learning model according to the actual detection result of the target to be detected of the sample. And taking the labeling content as a final output result of the deep learning model to obtain an image detection model. For example, when the output of the deep learning model is free of clutter and line fixation, it is labeled as a canonical picture. When the output of the deep learning model is disordered wire ends and the wires are not fixed, marking as an irregular picture.
According to the embodiment of the invention, the training sample is used for training the deep learning model, and then the trained deep learning model is marked according to the actual detection result of the target to be detected of the sample, so that the automatic detection of the detection image is realized, and the image detection efficiency is improved.
Based on the above embodiment, the image detection model is used for identifying the object of the plurality of segmented detection images and the associated information of the object, and includes steps S240 to S250, where each step is specifically as follows:
s240: determining a convolution grade of each segmented detection image based on the size of the object of the segmented detection image, convoluting the segmented detection image based on the convolution grade, extracting characteristic information of the object, wherein the convolution grade comprises convolution times and convolution kernel size, and identifying the object and the class of the object according to the characteristic information.
S250: and associating the characteristic information according to the window to which the characteristic information belongs and the matching information of the characteristic information, and identifying the position of the object.
And identifying the objects of the plurality of segmented detection images and the associated information of the objects. And (3) performing operations such as convolution, pooling and the like on the segmented detection images through a neural network, and extracting characteristic information of the segmented detection images. And predicting the category of the detected image through the full connection layer.
Assigning multiple segmented detected images to a fixed-size window (e.g., a moving window) the window scheme brings about greater efficiency by limiting self-attention calculations to non-overlapping local windows while also allowing cross-window connections. And extracting the characteristics of the segmented detection images in the moving window. The base model of the YOLOv model is a network of depth residuals (e.g., darknet 53) using a single-phase YOLOv model. After darknet network, if the object of the detection image after partial segmentation and the association information of the object can be accurately identified, the association relation of the identified object and the object is directly output. If the association relation between the object of the segmented detection image and the object cannot be accurately identified, rolling and pooling operation is carried out on the segmented detection image. And determining a convolution grade according to the size of the object of the segmented detection image (the size of the segmented detection image), wherein the convolution grade comprises the number of convolutions and the size of a convolution kernel corresponding to each convolution. As shown in fig. 2, there are 3 convolution levels in total, and the higher the convolution level, the greater the number of convolutions. The first convolution consists of 32 downsampling with a convolution kernel of 13 x 13, with a large receptive field for detecting large targets. The second convolution consists of 32 times downsampling and 16 times downsampling (convolution kernel 26 x 26). The three-level convolution includes 32 times downsampling, 16 times downsampling, and 8 times downsampling (convolution kernel 52 x 52). And identifying the object contained in the segmented detection image according to the characteristic information.
And extracting the characteristic information of the segmented detection image according to the convolution grade. And according to the window to which the characteristic information belongs and the matching information of the characteristic information, correlating the characteristic information, and identifying the category of the object and the position of the object to obtain the correlation information of the object. A self-attention mechanism (e.g., transducer) network is employed to automatically and efficiently correlate feature information at different times according to context. The transducer network consists of an encoder and a decoder, wherein the encoder comprises multiple independent attention mechanisms, different attention mechanisms can train different matching information, each attention mechanism can directly calculate the weight of the relation between words in the characteristic information, and the words which are related semantically but far away in space can be effectively prevented from being forgotten.
According to the embodiment of the invention, the characteristic information is extracted by convolving the segmented detection image, the object and the associated information of the object are identified according to the characteristic information, the automatic detection of the detection image is realized, and the image detection efficiency is improved.
Based on the above embodiment, the image detection model is used for segmenting the detected image, and includes steps S260 to S270, which are specifically as follows:
s260: based on the change information of the pixels of the detection image, a boundary area between different objects in the detection image is determined.
S270: the detection image is segmented based on the boundary region.
And (3) performing second-order derivation on pixels at the points in the detection image according to a Laplacian operator, and identifying regions in the detection image, namely boundary regions between different objects, in which the pixels change rapidly. The detected image is segmented according to the boundary region.
In normal pictures, the border area is clear, while in blurred pictures, the border area is not clear. Further, when the detected image is determined, the sharpness of the initial picture is checked. A blur threshold is set (for example, the blur threshold is 40), and the blur threshold is a pixel of the picture. When the pixel of the initial picture is smaller than the blurring threshold value, the initial picture is judged to be a blurring picture, and detection cannot be performed. And when the pixel of the initial picture is larger than or equal to the fuzzy threshold value, judging that the initial picture is a clear picture, and detecting the initial picture as a detection picture.
According to the embodiment of the invention, the detection image is segmented through the boundary region, so that the accuracy of segmentation of the detection image is improved.
Based on the above embodiment, the detection image is acquired, including step S110 to step S130, and each step is specifically as follows:
S110: and acquiring the initial picture of the target to be detected and watermark information of the initial picture.
S120: and verifying the authenticity of the initial picture based on the watermark information.
S130: and taking the original picture in the initial picture as a detection image based on the verification result.
And acquiring initial pictures of the target to be detected, and uniformly processing all the initial pictures into uniform gray level pictures. And verifying the authenticity of the initial picture after unified processing based on the watermark information.
The image detection model is used for determining watermark information, and specifically, determining watermark information based on longitude, latitude and time when an initial picture is taken.
And determining the authenticity of the initial picture according to the verification result. And removing the tampered initial picture, and reserving the original picture in the initial picture to obtain a detection image.
According to the embodiment of the invention, the initial picture is checked through the watermark information to obtain the detection picture, so that the authenticity of the detection image is improved, and the accuracy of the segmentation of the detection image is improved.
Based on the above embodiment, the image detection model is configured to determine a detection result of the target to be detected based on the association information of the object and the object, and includes steps S280 to S2100, where each step is specifically as follows:
s280: a plurality of target features associated with the target to be detected are determined based on the object and the association information of the object.
S290: based on the importance of the target features, a plurality of the target features are converted into inverted indexes of the detection images.
S2100: and determining a detection result of the target to be detected based on the inverted index.
The object and the associated information of the object are encoded, the encoding of the similar detection pictures is as close as possible, and a plurality of target features associated with the target to be detected and the weight (importance) of each target feature are determined. And converting the plurality of target features into inverted indexes of the detection images according to the weights of the target features and the reserved semantic relation library. And classifying the detection images according to the inverted index, and determining the detection result of the target to be detected according to the classification result.
According to the embodiment of the invention, the reverse index of the detection image is determined to determine the detection result of the target to be detected, so that the accuracy of determining the detection result of the detection image is improved.
In order to further analyze and explain the image detection method provided by the embodiment of the present invention, the following embodiment and fig. 3 are specifically used for explanation. An image detection method, comprising:
A detection image is acquired. The detected image is segmented. And convolving the segmented detection image to extract characteristic information. And carrying out maximum pooling treatment on the characteristic information. And classifying the detection images through the fully connected neural network, and determining the possibility of matching and the possibility of not matching the detection images with the standard pictures. And outputting a detection result of the detection image according to the classification result.
The embodiment of the invention can realize the automatic auditing of the electronic worksheets. And the manpower of an enterprise electronic work order auditing post is released, the electronic work order auditing is not dependent on manpower to stack layer by layer, the original auditing mode is simplified, and the hundred-person auditing team is simplified. The application of the work order AI quality inspection technology is improved, the relevant work efficiency of local maintenance personnel is improved, the investment of labor force of the maintenance personnel is greatly reduced, and the customer perception is improved to a certain extent. By taking the optical cross box as an example, the defect condition of the dustproof cap and the standard degree of the cable are predicted by utilizing the image recognition and image classification technology based on deep learning, and the management capability and the management efficiency of standard use of the dustproof cap and the cable of the optical cross box terminal can be greatly improved. The maintenance personnel can immediately obtain the results of AI algorithm identification after uploading the photos on site, such as dust cap missing, cable non-standardization and the like, and the identification results can be used as conditions for detecting whether the images pass or not and can also be used as the basis for subsequent analysis and evaluation of the on-site conditions.
The embodiment of the invention also provides an image detection device, as shown in fig. 4, and fig. 4 is a schematic structural diagram of the image detection device. It should be noted that, when the image detection device provided in the embodiment of the present invention specifically operates, the image detection method described in any one of the above embodiments may be executed, which is not described in detail in this embodiment.
Referring to fig. 4, an embodiment of the present invention provides an image detection apparatus including:
An acquisition module 401 is configured to acquire a detection image.
The detection module 402 is configured to input a detection image into the image detection model, and obtain a detection result of the target to be detected output by the image detection model; the image detection model is used for dividing the detection image, identifying the objects of the plurality of divided detection images and the associated information of the objects, determining the detection result of the target to be detected based on the associated information of the objects, wherein the associated information comprises the position and the category of the objects, the image detection model is obtained by training based on the sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected.
The image detection device provided by the embodiment of the application acquires the detection image; inputting the detection image into an image detection model to obtain a detection result of the target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the objects of the plurality of divided detection images and the associated information of the objects, determining the detection result of the target to be detected based on the associated information of the objects, wherein the associated information comprises the position and the category of the objects, the image detection model is obtained by training based on the sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected. According to the embodiment of the application, the deep learning model is trained through the text content of the sample and the actual detection result of the target to be detected of the sample, so that the image detection model is obtained, the accuracy of the image detection model is improved, the detection result of the target to be detected is determined through the association relation between the object and the object in the detection image, the automatic detection of the detection image is realized, and the image detection efficiency is improved.
In one embodiment, the image detection model is derived based on the steps of: identifying the sample detection image based on the sample text content of the sample detection image to obtain a training sample; training the deep learning model based on the training sample to determine a parameter value of the deep learning model; and labeling the output result of the trained deep learning model based on the actual detection result of the target to be detected of the sample, and adjusting the output result based on the labeling result to obtain the image detection model.
In one embodiment, the detection module 402 is configured to identify objects of the plurality of segmented detection images and associated information of the objects: determining a convolution grade of each segmented detection image based on the size of the object of the segmented detection image, convoluting the segmented detection image based on the convolution grade, extracting characteristic information of the object, wherein the convolution grade comprises convolution times and convolution kernel size, and identifying the object and the class of the object according to the characteristic information; and associating the characteristic information according to the window to which the characteristic information belongs and the matching information of the characteristic information, and identifying the position of the object.
In one embodiment, the detection module 402 is configured to segment the detected image: determining boundary areas between different objects in the detection image based on the change information of pixels of the detection image; the detection image is segmented based on the boundary region.
In one embodiment, the obtaining module 401 is configured to: acquiring an initial picture of a target to be detected and watermark information of the initial picture; verifying the authenticity of the initial picture based on the watermark information; and taking the original picture in the initial picture as a detection image based on the verification result.
In one embodiment, the acquisition module is to: watermark information is determined based on longitude, latitude, and time at the time of initial picture taking.
In one embodiment, the obtaining module 401 is configured to determine a detection result of the object to be detected based on the association information of the object and the object: determining a plurality of target features associated with the target to be detected based on the object and the associated information of the object; converting the plurality of target features into an inverted index of the detected image based on the importance of the target features; and determining a detection result of the target to be detected based on the inverted index.
Fig. 5 is a schematic structural diagram of an electronic device according to the present invention, and as shown in fig. 5, the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform an image detection method comprising: acquiring a detection image; inputting the detection image into an image detection model to obtain a detection result of the target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the objects of the plurality of divided detection images and the associated information of the objects, determining the detection result of the target to be detected based on the associated information of the objects, wherein the associated information comprises the position and the category of the objects, the image detection model is obtained by training based on the sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the image detection method provided in the above embodiments, the method comprising: acquiring a detection image; inputting the detection image into an image detection model to obtain a detection result of the target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the objects of the plurality of divided detection images and the associated information of the objects, determining the detection result of the target to be detected based on the associated information of the objects, wherein the associated information comprises the position and the category of the objects, the image detection model is obtained by training based on the sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An image detection method, comprising:
Acquiring a detection image;
inputting the detection image into an image detection model, and obtaining a detection result of a target to be detected, which is output by the image detection model;
The image detection model is used for dividing the detection image, identifying the object of a plurality of divided detection images and the associated information of the object, determining the detection result of the target to be detected based on the associated information of the object and the object, wherein the associated information comprises the position and the category of the object, the image detection model is obtained by training based on a sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected of the sample.
2. The image detection method according to claim 1, wherein the image detection model is obtained based on the steps of:
identifying the sample detection image based on the sample text content of the sample detection image to obtain a training sample;
training the deep learning model based on the training sample to determine parameter values of the deep learning model;
And labeling the output result of the trained deep learning model based on the actual detection result of the target to be detected of the sample, and adjusting the output result based on the labeling result to obtain the image detection model.
3. The image detection method according to claim 1, wherein the image detection model is configured to identify the object of the plurality of the segmented detection images and association information of the object:
Determining a convolution grade of each segmented detection image based on the size of the object of the segmented detection image, convolving the segmented detection image based on the convolution grade, extracting characteristic information of the object, wherein the convolution grade comprises convolution times and convolution kernel size, and identifying the object and the class of the object according to the characteristic information;
and associating the characteristic information according to the window to which the characteristic information belongs and the matching information of the characteristic information, and identifying the position of the object.
4. The image detection method according to claim 1, wherein the image detection model is used for segmenting the detection image:
Determining boundary areas between different objects in the detection image based on the change information of pixels of the detection image;
and dividing the detection image based on the boundary area.
5. The image detection method according to claim 1, wherein the acquiring the detection image includes:
acquiring an initial picture of the target to be detected and watermark information of the initial picture;
verifying the authenticity of the initial picture based on the watermark information;
And taking the original picture in the initial picture as the detection image based on a verification result.
6. The image detection method according to claim 5, wherein the image detection model is used to determine the watermark information:
the watermark information is determined based on the longitude, latitude and time at which the initial picture was taken.
7. The image detection method according to claim 1, wherein the image detection model is configured to determine a detection result of the object to be detected based on association information of the object and the object:
determining a plurality of target features associated with the target to be detected based on the object and the associated information of the object;
converting a plurality of the target features into inverted indexes of the detection images based on the importance of the target features;
and determining a detection result of the target to be detected based on the inverted index.
8. An image detection apparatus, comprising:
the acquisition module is used for acquiring the detection image;
the detection module is used for inputting the detection image into an image detection model and obtaining a detection result of the target to be detected, which is output by the image detection model; the image detection model is used for dividing the detection image, identifying the object of a plurality of divided detection images and the associated information of the object, determining the detection result of the target to be detected based on the associated information of the object and the object, wherein the associated information comprises the position and the category of the object, the image detection model is obtained by training based on a sample detection image and the identification of the sample detection image on the basis of the deep learning model, and the identification of the sample detection image comprises the sample text content of the sample detection image and the actual detection result of the target to be detected of the sample.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the image detection method according to any one of claims 1 to 7 when executing the computer program.
10. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the image detection method according to any one of claims 1 to 7.
CN202410223369.2A 2024-02-28 2024-02-28 Image detection method, device, electronic equipment and storage medium Pending CN118247793A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410223369.2A CN118247793A (en) 2024-02-28 2024-02-28 Image detection method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410223369.2A CN118247793A (en) 2024-02-28 2024-02-28 Image detection method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118247793A true CN118247793A (en) 2024-06-25

Family

ID=91554634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410223369.2A Pending CN118247793A (en) 2024-02-28 2024-02-28 Image detection method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118247793A (en)

Similar Documents

Publication Publication Date Title
CN110569899A (en) Dam face defect classification model training method and device
CN111696094A (en) Immunohistochemical PD-L1 membrane staining pathological section image processing method, device and equipment
CN110598620B (en) Deep neural network model-based recommendation method and device
CN109993040A (en) Text recognition method and device
CN107341508B (en) Fast food picture identification method and system
CN110942456B (en) Tamper image detection method, device, equipment and storage medium
CN113936132B (en) Method and system for detecting water pollution of chemical plant based on computer vision
CN114170184A (en) Product image anomaly detection method and device based on embedded feature vector
CN111144425B (en) Method and device for detecting shot screen picture, electronic equipment and storage medium
CN115497015A (en) River floating pollutant identification method based on convolutional neural network
Feng et al. A novel saliency detection method for wild animal monitoring images with WMSN
CN117409419A (en) Image detection method, device and storage medium
CN112052702A (en) Method and device for identifying two-dimensional code
Katsamenis et al. A few-shot attention recurrent residual U-Net for crack segmentation
CN113076961B (en) Image feature library updating method, image detection method and device
CN114387451A (en) Training method, device and medium for abnormal image detection model
CN114005019A (en) Method for identifying copied image and related equipment thereof
CN111898544B (en) Text image matching method, device and equipment and computer storage medium
CN110765900B (en) Automatic detection illegal building method and system based on DSSD
CN112434717B (en) Model training method and device
KR102230559B1 (en) Method and Apparatus for Creating Labeling Model with Data Programming
CN111259926A (en) Meat freshness detection method and device, computing equipment and storage medium
CN116563809A (en) Road disease identification method and device, electronic equipment and storage medium
CN115311680A (en) Human body image quality detection method and device, electronic equipment and storage medium
CN118247793A (en) Image detection method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication