Image detection method, device and related equipment
The image detection method improves efficiency by storing images in a server, generating address queues, and using trained models to detect and store results, addressing the slow processing of large data volumes in pedestrian recognition systems.
Patent Information
- Application Number
- CN202410511107.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-04-26
AI Technical Summary
The existing image detection methods in pedestrian recognition suffer from low efficiency due to the slow processing speed of directly processing large amounts of image and video data, particularly in high-traffic public areas like supermarkets, subway stations, and bus stations.
An image detection method involving storing images in a first server, generating address information, creating an address queue based on user requests, and performing image detection on selected images using trained models, thereby reducing the need for local processing and improving efficiency.
This approach enhances image detection efficiency by downloading and detecting only necessary images, utilizing trained models, and storing results in a second server for query, thus reducing space usage and processing time.
Smart Images

Figure CN118368445B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to an image detection method, device and related equipment. Background Art
[0002] Pedestrian recognition technology has received extensive attention and application in recent years. With the increasing busyness of urban traffic and the continuous improvement of public safety needs, real-time large-scale reasoning of pedestrian targets has become an important issue, especially in public places such as supermarkets, subway stations, bus stations and railway stations, which have high requirements for people counting. In the prior art, in the process of pedestrian recognition, images are generally downloaded and processed directly. Since a large amount of image and video data needs to be processed, the processing speed of direct image recognition is slow, resulting in the problem of low efficiency of image detection in the prior art. Summary of the invention
[0003] The embodiments of the present application provide an image detection method, apparatus and related equipment, which solve the problem of low efficiency of image detection in the prior art.
[0004] In a first aspect, an embodiment of the present application provides an image detection method, the method comprising:
[0005] storing a plurality of images to be detected in a first server, generating a plurality of address information, wherein the plurality of images to be detected correspond to the plurality of address information one by one;
[0006] Generate an address queue according to a processing request sent by a user terminal, wherein the processing request includes identification information of n target images to be detected, the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, where n is a positive integer;
[0007] Based on the address queue, the n target images to be detected are obtained in the first server, and image detection is performed on the n target images to be detected to generate n detection results, the n detection results correspond one-to-one to the n target images to be detected, and the detection results are used to indicate the quantity information of the target objects included in the corresponding target images to be detected.
[0008] Optionally, acquiring the n target images to be detected in the first server based on the address queue, and performing image detection on the n target images to be detected to generate n detection results includes:
[0009] Acquire the n target images to be detected in the first server based on the address queue;
[0010] The n target images to be detected are sequentially input into a target image detection model for image detection to generate the n detection results. The target image detection model is used to detect the number of the target objects in the input images.
[0011] Optionally, before sequentially inputting the n target images to be detected into the target image detection model for image detection and generating the n detection results, the method further includes:
[0012] Acquire a training data set, the training data set comprising a plurality of training data, each training data comprising a sample image and label information corresponding to the sample image, the plurality of label information corresponding to the plurality of sample images one by one, the sample image being an image comprising at least one of the target objects, and the label information being used to indicate the number of target objects included in the corresponding sample image;
[0013] The image detection model is trained using the training data set to obtain the target image detection model.
[0014] Optionally, the step of sequentially inputting the n target images to be detected into a target image detection model for image detection to generate the n detection results includes:
[0015] Obtain m target image detection models, where m is a positive integer;
[0016] According to preset rules, the n target images to be detected are allocated to the m target image detection models for image detection to generate the n detection results.
[0017] Optionally, after acquiring the n target images to be detected in the first server based on the address queue and performing image detection on the n target images to be detected and generating n detection results, the method further includes:
[0018] storing the n detection results in the second server;
[0019] receiving a data query request sent by the user terminal, wherein the data query request is used to query the n detection results;
[0020] Downloading target data from the second server based on the data query request, the target data including the n detection results;
[0021] The target data is sent to the user terminal.
[0022] Optionally, before storing the plurality of images to be detected in the first server and generating the plurality of address information, the method further includes:
[0023] Acquire multiple videos to be detected, where the multiple videos to be detected are videos shot for a target area, and among the multiple videos to be detected, different videos to be detected have different shooting angles;
[0024] The formats of the multiple videos to be detected are converted respectively to generate the multiple images to be detected.
[0025] In a second aspect, an embodiment of the present application further provides an image detection device, the device comprising:
[0026] A storage module, used for storing the plurality of images to be detected in the first server, generating a plurality of address information, wherein the plurality of images to be detected correspond to the plurality of address information one by one;
[0027] A generating module, configured to generate an address queue according to a processing request sent by a user terminal, wherein the processing request includes identification information of n target images to be detected, wherein the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, wherein n is a positive integer;
[0028] An acquisition module is used to acquire the n target images to be detected in the first server based on the address queue, and perform image detection on the n target images to be detected to generate n detection results, wherein the n detection results correspond one-to-one to the n target images to be detected, and the detection results are used to indicate the quantity information of the target objects included in the corresponding target images to be detected.
[0029] In a third aspect, an embodiment of the present application further provides a communication device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the method described in the first aspect above.
[0030] In a fourth aspect, an embodiment of the present application further provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the method described in the first aspect above.
[0031] In a fifth aspect, an embodiment of the present application further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps in the method described in the first aspect.
[0032] The present application provides an image detection method, an apparatus and related equipment, the method comprising: storing a plurality of images to be detected in a first server, generating a plurality of address information, the plurality of images to be detected corresponding to the plurality of address information one by one; generating an address queue according to a processing request sent by a user terminal, the processing request comprising identification information of n target images to be detected, the n target images to be detected being n images to be detected among the plurality of images to be detected, the address queue comprising address information corresponding to the n target images to be detected, wherein n is a positive integer; acquiring the n target images to be detected in the first server based on the address queue, performing image detection on the n target images to be detected, generating n detection results, the n detection results corresponding to the n target images to be detected one by one, and the detection results being used to indicate the quantity information of target objects included in the corresponding target images to be detected. The present application stores the images to be detected in a first server. When n target images to be detected need to be detected in the images to be detected, n target images to be detected are downloaded through n address information, and then the n target images to be detected are detected, thereby avoiding the situation where downloading a large number of images takes up space, thereby improving the efficiency of image detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0034] Figure 1 It is a flowchart of the image detection method provided in the embodiment of the present application;
[0035] Figure 2 is a schematic diagram of the structure of an image detection device provided in an embodiment of the present application;
[0036] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] The terms "first", "second" etc. in the embodiments of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of connected objects, such as A and / or B and / or C, representing the inclusion of separate A, separate B, separate C, and A and B all exist, B and C all exist, A and C all exist, and 7 situations that A, B and C all exist.
[0039] See also Figure 1 , Figure 1 It is a flow chart of the image detection method provided in the embodiment of the present application. Figure 1 The image detection method shown includes the following steps:
[0040] Step 101: Store a plurality of images to be detected in a first server, and generate a plurality of address information, wherein the plurality of images to be detected correspond to the plurality of address information one by one.
[0041] In this embodiment, the first server is a server for storing images, and multiple images to be detected can be captured by multiple cameras to obtain video streams, and the video streams are converted into images. It should be noted that the multiple images to be detected can be images taken in a target area, for example, images of pedestrians taken in a street, or images of pedestrians taken in a building.
[0042] The address information is the storage address of each image to be detected stored in the first server. It should be noted that the storage address corresponding to each image to be detected is different. In addition, each image to be detected corresponds to a separate uuid, that is, identification information, through which different images and the storage locations of different images can be accurately distinguished.
[0043] Step 102: Generate an address queue according to a processing request sent by the user terminal, wherein the processing request includes identification information of n target images to be detected, the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, where n is a positive integer.
[0044] In this embodiment, the user end may be a terminal of a user who needs to be detected, such as a computer, a mobile phone, etc. An address queue is generated through a processing request generated by the user end, wherein the processing request includes identification information of n target images to be detected that need to be processed, i.e., n uuids, wherein n is a positive integer, and when n is equal to the number of multiple images to be detected, all images to be detected are detected, and a part of the images to be detected may also be detected according to user needs, which is not specifically limited in this embodiment.
[0045] In addition, the address queue is the address information of n target images to be detected, through which the n target images to be detected can be downloaded and obtained in the first server. It should be noted that in the prior art, all images are generally processed after being downloaded, while in the present application, after the images that need to be detected are determined, they are downloaded from the first server, thereby reducing the cache pressure of the local server and improving the processing efficiency of the image.
[0046] Step 103: Based on the address queue, the n target images to be detected are obtained in the first server, and image detection is performed on the n target images to be detected to generate n detection results, wherein the n detection results correspond one-to-one to the n target images to be detected, and the detection results are used to indicate the quantity information of the target objects included in the corresponding target images to be detected.
[0047] In this embodiment, n target images to be detected are obtained in the first server through the address queue, thereby performing image detection on the n target images to be detected. Specifically, image detection can be performed through a trained image detection model. For example, in this embodiment, multiple image detection models can be set simultaneously to detect the n target images to be detected, thereby improving the detection efficiency.
[0048] The present application provides an image detection method, which includes: storing multiple images to be detected in a first server, generating multiple address information, and the multiple images to be detected correspond to the multiple address information one-to-one; generating an address queue according to a processing request sent by a user terminal, the processing request including identification information of n target images to be detected, the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, where n is a positive integer; based on the address queue, obtaining the n target images to be detected in the first server, and performing image detection on the n target images to be detected, generating n detection results, the n detection results correspond to the n target images to be detected one-to-one, and the detection results are used to indicate the quantity information of target objects included in the corresponding target images to be detected. The present application stores the images to be detected in a first server. When n target images to be detected need to be detected in the images to be detected, n target images to be detected are downloaded through n address information, and then the n target images to be detected are detected, thereby avoiding the situation where downloading a large number of images takes up space, thereby improving the efficiency of image detection.
[0049] In some feasible implementations, optionally, acquiring the n target images to be detected in the first server based on the address queue, and performing image detection on the n target images to be detected to generate n detection results includes:
[0050] Acquire the n target images to be detected in the first server based on the address queue;
[0051] The n target images to be detected are sequentially input into a target image detection model for image detection to generate the n detection results. The target image detection model is used to detect the number of the target objects in the input images.
[0052] In this embodiment, the target image detection model is a trained image detection model, wherein the image detection model is an artificial intelligence model that aims to identify different objects, objects or scenes in an image and mark their locations. This model usually uses computer vision technology, such as convolutional neural networks (CNNs) to learn image features and detect and identify objects in the image based on these features. Image detection models are widely used in many fields, including autonomous driving, security monitoring, medical image analysis, etc.
[0053] In this embodiment, the target object is explained by taking pedestrians as an example, wherein the target image detection model can detect pedestrians on the input image after being trained with a large amount of training data, for example, detecting the number of pedestrians in the image. For example, three target images to be detected are detected respectively, wherein the number of pedestrians is 5, 6 and 8 respectively, thereby generating three detection results respectively, and the detection results correspond to different target images to be detected, that is, the detection results can be distinguished by the uuid of the target image to be detected.
[0054] Optionally, before sequentially inputting the n target images to be detected into the target image detection model for image detection and generating the n detection results, the method further includes:
[0055] Acquire a training data set, the training data set comprising a plurality of training data, each training data comprising a sample image and label information corresponding to the sample image, the plurality of label information corresponding to the plurality of sample images one by one, the sample image being an image comprising at least one of the target objects, and the label information being used to indicate the number of target objects included in the corresponding sample image;
[0056] The image detection model is trained using the training data set to obtain the target image detection model.
[0057] In this embodiment, the training data set is used to train the image detection model to obtain the target image detection model. Specifically, the image detection model is trained by the training data set, wherein the training data set includes a plurality of training data, each of which includes a sample image and label information corresponding to the sample image, wherein the label information is the number of target objects included in the sample image, for example, how many pedestrians are included. Compared with manual detection and recognition, the efficiency and accuracy of image detection can be improved by using the image detection model.
[0058] Therefore, the image detection model is trained through the training data set until the loss value of the image detection model is lower than a preset threshold, thereby obtaining a trained target image detection model.
[0059] Optionally, the step of sequentially inputting the n target images to be detected into a target image detection model for image detection to generate the n detection results includes:
[0060] Obtain m target image detection models, where m is a positive integer;
[0061] According to preset rules, the n target images to be detected are allocated to the m target image detection models for image detection to generate the n detection results.
[0062] In this embodiment, the trained target image detection model is obtained in the above embodiment, and is expanded into m target image detection models. That is, m target detection models can be used simultaneously to perform image detection on n target images to be detected, thereby generating n detection results. Among them, the m target image detection models can be set in the same server to perform image detection in parallel, thereby improving the detection efficiency. In this embodiment, no specific limitation is made.
[0063] Exemplarily, multi-process parallel reasoning can be used to reason about images. A 3090 graphics card is used for reasoning, and each 3090 graphics card can run 4 reasoning processes at the same time. Each process can reason about 64 images at the same time. Redis is used to transmit message queues and distribute messages to different processes to avoid congestion. Among them, multi-process parallel reasoning is used to reason about images, which can achieve real-time reasoning of up to 256 images on a single graphics card, and the reasoning speed does not exceed 0.5 seconds. The delay of reasoning is greatly reduced. Using Reids to control the distribution and delivery of messages reduces the problem of congestion.
[0064] It should be noted that the present application can apply the Flask server, wherein the Flask server is a high-concurrency service framework based on multi-process + coroutine, and multiple processes can be flexibly configured according to the number of image messages. Ensure that the image message can reach the Flask server in real time. Since the reasoning service is multi-process, the Flask server does not send the collected image messages directly to the reasoning service, wherein the reasoning service refers to the detection of the image, first generating a uuid for each image message, so as to ensure the uniqueness of the image message, and then sending the image message and the corresponding uuid to the Reids queue. After the reasoning service detects that there is a message in Reids, it takes out the message of Reids, finds the path of the image from the taken out message, and loads the image reasoning. Put the inferenced result and the corresponding uuid back to Reids. The Flask server compares the received result with the uuid sent out, finds a consistent uuid, takes it out from Reids, and then returns the result. After the Flask server receives the result returned by the reasoning server, it saves the result in the time series database for subsequent analysis and processing. On the other hand, the results are pushed to the front end for real-time display.
[0065] Optionally, after acquiring the n target images to be detected in the first server based on the address queue and performing image detection on the n target images to be detected and generating n detection results, the method further includes:
[0066] storing the n detection results in the second server;
[0067] receiving a data query request sent by the user terminal, wherein the data query request is used to query the n detection results;
[0068] Downloading target data from the second server based on the data query request, the target data including the n detection results;
[0069] The target data is sent to the user terminal.
[0070] In this embodiment, the second server is a data storage server, wherein when the user terminal needs to query the data, a data query request is generated. After receiving the data query request, the target data is downloaded from the second server through the data query request, wherein the target data includes n detection results, and after receiving the target data sent by the second server, the target data is fed back to the user terminal.
[0071] Optionally, before storing the plurality of images to be detected in the first server and generating the plurality of address information, the method further includes:
[0072] Acquire multiple videos to be detected, where the multiple videos to be detected are videos shot for a target area, and among the multiple videos to be detected, different videos to be detected have different shooting angles;
[0073] The formats of the multiple videos to be detected are converted respectively to generate the multiple images to be detected.
[0074] In this embodiment, a stream acquisition program is deployed using a Raspberry Pi. Each Raspberry Pi supports 4-way camera stream acquisition, and the acquired stream is converted into a picture and saved to the picture server. Specifically, the target area can be photographed by multiple cameras at different angles to obtain multiple videos to be detected. At the same time, the path of the picture is passed to the message queue. According to the number of cameras, the de-streaming program can be flexibly deployed and easily expanded. Thus, a distributed multi-process stream acquisition method is adopted. The speed of stream acquisition is greatly reduced, and the delay is controlled to about 200ms.
[0075] The present application stores the images to be detected in a first server. When n target images to be detected need to be detected in the images to be detected, n target images to be detected are downloaded through n address information, and then the n target images to be detected are detected, thereby avoiding the situation where downloading a large number of images takes up space, thereby improving the efficiency of image detection.
[0076] See also Figure 2 , Figure 2 is a structural diagram of the image detection device provided in the embodiment of the present application. Figure 2 As shown, the image detection device 200 includes:
[0077] The storage module 210 is used to store the plurality of images to be detected in the first server and generate a plurality of address information, wherein the plurality of images to be detected correspond to the plurality of address information one by one;
[0078] A generating module 220, configured to generate an address queue according to a processing request sent by a user terminal, wherein the processing request includes identification information of n target images to be detected, wherein the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, wherein n is a positive integer;
[0079] The acquisition module 230 is used to acquire the n target images to be detected in the first server based on the address queue, and perform image detection on the n target images to be detected to generate n detection results, wherein the n detection results correspond one-to-one to the n target images to be detected, and the detection results are used to indicate the quantity information of the target objects included in the corresponding target images to be detected.
[0080] Optionally, the acquisition module 230 includes:
[0081] A first acquisition submodule, configured to acquire the n target images to be detected in the first server based on the address queue;
[0082] The generation submodule is used to sequentially input the n target images to be detected into the target image detection model for image detection to generate the n detection results. The target image detection model is used to detect the number of the target objects in the input images.
[0083] Optionally, also include:
[0084] A second acquisition submodule is used to acquire a training data set, wherein the training data set includes a plurality of training data, each of which includes a sample image and label information corresponding to the sample image, wherein the plurality of label information corresponds one-to-one to the plurality of sample images, wherein the sample image is an image including at least one of the target objects, and the label information is used to indicate the number of target objects included in the corresponding sample image;
[0085] The training submodule is used to train the image detection model using the training data set to obtain the target image detection model.
[0086] Optionally, generate submodules including:
[0087] An acquisition unit, used to acquire m target image detection models, where m is a positive integer;
[0088] The detection unit is used to distribute the n target images to be detected to the m target image detection models for image detection according to preset rules, and generate the n detection results.
[0089] Optionally, also include:
[0090] A result storage module, used for storing the n detection results in the second server;
[0091] A receiving module, used for receiving a data query request sent by the user terminal, wherein the data query request is used for querying the n detection results;
[0092] A download module, configured to download target data from the second server based on the data query request, wherein the target data includes the n detection results;
[0093] A sending module is used to send the target data to the user end.
[0094] Optionally, also include:
[0095] A video acquisition module is used to acquire a plurality of videos to be detected, wherein the plurality of videos to be detected are videos shot for a target area, and among the plurality of videos to be detected, different videos to be detected have different shooting angles;
[0096] The format conversion module is used to convert the formats of the multiple videos to be detected respectively to generate the multiple images to be detected.
[0097] The present application stores the images to be detected in a first server. When n target images to be detected need to be detected in the images to be detected, n target images to be detected are downloaded through n address information, and then the n target images to be detected are detected, thereby avoiding the situation where downloading a large number of images takes up space, thereby improving the efficiency of image detection.
[0098] The present application also provides an electronic device. Figure 3 , the electronic device may include a processor 301, a memory 302, and a program 3021 stored in the memory 302 and executable on the processor 301.
[0099] When the program 3021 is executed by the processor 301, it can achieve Figure 1 Any step in the corresponding method embodiment:
[0100] storing a plurality of images to be detected in a first server, generating a plurality of address information, wherein the plurality of images to be detected correspond to the plurality of address information one by one;
[0101] Generate an address queue according to a processing request sent by a user terminal, wherein the processing request includes identification information of n target images to be detected, the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, where n is a positive integer;
[0102] Based on the address queue, the n target images to be detected are obtained in the first server, and image detection is performed on the n target images to be detected to generate n detection results, the n detection results correspond one-to-one to the n target images to be detected, and the detection results are used to indicate the quantity information of the target objects included in the corresponding target images to be detected.
[0103] Optionally, acquiring the n target images to be detected in the first server based on the address queue, and performing image detection on the n target images to be detected to generate n detection results includes:
[0104] Acquire the n target images to be detected in the first server based on the address queue;
[0105] The n target images to be detected are sequentially input into a target image detection model for image detection to generate the n detection results. The target image detection model is used to detect the number of the target objects in the input images.
[0106] Optionally, before sequentially inputting the n target images to be detected into the target image detection model for image detection and generating the n detection results, the method further includes:
[0107] Acquire a training data set, the training data set comprising a plurality of training data, each training data comprising a sample image and label information corresponding to the sample image, the plurality of label information corresponding to the plurality of sample images one by one, the sample image being an image comprising at least one of the target objects, and the label information being used to indicate the number of target objects included in the corresponding sample image;
[0108] The image detection model is trained using the training data set to obtain the target image detection model.
[0109] Optionally, the step of sequentially inputting the n target images to be detected into a target image detection model for image detection to generate the n detection results includes:
[0110] Obtain m target image detection models, where m is a positive integer;
[0111] According to preset rules, the n target images to be detected are allocated to the m target image detection models for image detection to generate the n detection results.
[0112] Optionally, after acquiring the n target images to be detected in the first server based on the address queue and performing image detection on the n target images to be detected and generating n detection results, the method further includes:
[0113] storing the n detection results in the second server;
[0114] receiving a data query request sent by the user terminal, wherein the data query request is used to query the n detection results;
[0115] Downloading target data from the second server based on the data query request, the target data including the n detection results;
[0116] The target data is sent to the user terminal.
[0117] Optionally, before storing the plurality of images to be detected in the first server and generating the plurality of address information, the method further includes:
[0118] Acquire multiple videos to be detected, where the multiple videos to be detected are videos shot for a target area, and among the multiple videos to be detected, different videos to be detected have different shooting angles;
[0119] The formats of the multiple videos to be detected are converted respectively to generate the multiple images to be detected.
[0120] The present application stores the images to be detected in a first server. When n target images to be detected need to be detected in the images to be detected, n target images to be detected are downloaded through n address information, and then the n target images to be detected are detected, thereby avoiding the situation where downloading a large number of images takes up space, thereby improving the efficiency of image detection.
[0121] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned image detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0122] An embodiment of the present application further provides a computer program product, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the various processes of the above-mentioned image detection method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0123] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0125] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image detection method, characterized in that: The method comprises: storing a plurality of images to be detected in a first server, generating a plurality of address information, wherein the plurality of images to be detected correspond to the plurality of address information one by one; Generate an address queue according to a processing request sent by a user terminal, wherein the processing request includes identification information of n target images to be detected, the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, where n is a positive integer; Based on the address queue, the n target images to be detected are obtained in the first server, and image detection is performed on the n target images to be detected to generate n detection results, wherein the n detection results correspond to the n target images to be detected one by one, and the detection results are used to indicate the quantity information of the target objects included in the corresponding target images to be detected. The method of obtaining the n target images to be detected in the first server based on the address queue, and image detection is performed on the n target images to be detected to generate n detection results comprises: obtaining the n target images to be detected in the first server based on the address queue; inputting the n target images to be detected into a target image detection model in sequence to perform image detection to generate the n detection results, and the target image detection model is used to detect the quantity of the target objects in the input images.
2. The method according to claim 1, characterized in that Before sequentially inputting the n target images to be detected into the target image detection model for image detection and generating the n detection results, the method further includes: Acquire a training data set, the training data set comprising a plurality of training data, each training data comprising a sample image and label information corresponding to the sample image, the plurality of label information corresponding to the plurality of sample images one by one, the sample image being an image comprising at least one of the target objects, and the label information being used to indicate the number of target objects included in the corresponding sample image; The image detection model is trained using the training data set to obtain the target image detection model.
3. The method according to claim 2, characterized in that The step of sequentially inputting the n target images to be detected into the target image detection model to perform image detection and generate the n detection results comprises: Obtain m target image detection models, where m is a positive integer; According to preset rules, the n target images to be detected are allocated to the m target image detection models for image detection to generate the n detection results.
4. The method according to claim 1, characterized in that: After acquiring the n target images to be detected in the first server based on the address queue and performing image detection on the n target images to be detected to generate n detection results, the method further includes: storing the n detection results in the second server; receiving a data query request sent by the user terminal, wherein the data query request is used to query the n detection results; Downloading target data from the second server based on the data query request, the target data including the n detection results; The target data is sent to the user terminal.
5. The method according to claim 1, characterized in that Before storing the plurality of images to be detected in the first server and generating a plurality of address information, the method further includes: Acquire multiple videos to be detected, where the multiple videos to be detected are videos shot for a target area, and among the multiple videos to be detected, different videos to be detected have different shooting angles; The formats of the multiple videos to be detected are converted respectively to generate the multiple images to be detected.
6. An image detection device, characterized in that: The device comprises: A storage module, used for storing the plurality of images to be detected in the first server, generating a plurality of address information, wherein the plurality of images to be detected correspond to the plurality of address information one by one; A generating module, configured to generate an address queue according to a processing request sent by a user terminal, wherein the processing request includes identification information of n target images to be detected, wherein the n target images to be detected are n images to be detected among the multiple images to be detected, and the address queue includes address information corresponding to the n target images to be detected, wherein n is a positive integer; An acquisition module is used to acquire the n target images to be detected in the first server based on the address queue, and perform image detection on the n target images to be detected to generate n detection results, wherein the n detection results correspond to the n target images to be detected one by one, and the detection results are used to indicate the quantity information of the target objects included in the corresponding target images to be detected. The acquisition module includes: a first acquisition submodule, used to acquire the n target images to be detected in the first server based on the address queue; a generation submodule, used to input the n target images to be detected into a target image detection model in sequence for image detection to generate the n detection results, and the target image detection model is used to detect the quantity of the target objects in the input images.
7. An electronic device comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps of the image detection method as described in any one of claims 1 to 5.
8. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the image detection method according to any one of claims 1 to 5 are implemented.
9. A computer program product, characterized in that The computer program product is stored in a storage medium, and the computer program product is executed by at least one processor to implement the steps in the image detection method according to any one of claims 1 to 5.
