CN114511775A - Image detection method and device - Google Patents

Image detection method and device Download PDF

Info

Publication number
CN114511775A
CN114511775A CN202111665192.4A CN202111665192A CN114511775A CN 114511775 A CN114511775 A CN 114511775A CN 202111665192 A CN202111665192 A CN 202111665192A CN 114511775 A CN114511775 A CN 114511775A
Authority
CN
China
Prior art keywords
image
detected
detection
compliance
detection result
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
CN202111665192.4A
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202111665192.4A priority Critical patent/CN114511775A/en
Publication of CN114511775A publication Critical patent/CN114511775A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Economics (AREA)
  • Medical Informatics (AREA)
  • Human Resources & Organizations (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Development Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Evolutionary Biology (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Traffic Control Systems (AREA)

Abstract

The specification discloses an image detection method and device, which are used for receiving a detection request carrying a task identifier, wherein the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle. And then inputting the image to be detected into a pre-trained compliance detection model, respectively determining confidence degrees corresponding to the collection of the set compliance and the collection of the non-compliance, and finally judging whether the image to be detected is in compliance or not according to the confidence degrees. And if the set rule is adopted, storing the task identification and the image to be detected for subsequent verification, and returning a first detection result for prompting the user to continue executing the task. And if not, returning a second detection result for prompting the user to re-acquire the image to be detected. The image to be detected collected by the user is effectively processed in real time by adopting the compliance detection model, so that the labor cost is reduced, the detection efficiency is improved, and the user can immediately obtain the detection result of the image to be detected.

Description

Image detection method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an image detection method and apparatus.
Background
Currently, in the process of transporting goods from a central warehouse to a transfer station (e.g., a grid warehouse), the loading condition of a distributor needs to be supervised. Since one central warehouse often corresponds to a plurality of transfer stations, a large number of vehicles are required for transportation, and how to perform real-time and effective supervision on the large number of vehicles is a problem which needs to be considered seriously.
In the prior art, a delivery person generally takes a picture of a loading condition of a vehicle through a terminal device, then uploads the taken picture to a server, and finally a detection user detects whether the picture adopts an assembly rule or not at the server end in a mode of manually observing the picture. Whether the image adopts the set rule or not can be judged by observing whether the rear door of the vehicle is in an open state or not, whether the image contains all the outer edges of the compartment of the vehicle or not and the like in the image.
However, manually detecting whether the images are in compliance or not has high labor cost, low detection efficiency, long time consumption, and difficulty in immediately feeding back the images to the distributor.
Disclosure of Invention
The embodiment of the specification provides an image detection method and an image detection device, which are used for at least partially solving the problems in the prior art.
The technical scheme adopted by the specification is as follows:
the present specification provides an image detection method including:
receiving a detection request carrying a task identifier, wherein the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle corresponding to the task identifier;
inputting the image to be detected into a pre-trained compliance detection model, and respectively determining confidence degrees corresponding to collection of the set compliance and collection of the non-compliance;
judging whether the image to be detected adopts a set gauge or not according to the confidence coefficient;
if so, storing the task identification and the image to be detected, and returning a first detection result, wherein the first detection result is used for prompting a user to continue executing the task;
and if not, returning a second detection result, wherein the second detection result is used for prompting the user to reacquire the image to be detected.
Optionally, the compliance testing model is trained using the following method, wherein:
acquiring a plurality of images for determining the loading condition of the vehicle as training samples;
determining labels of each training sample, wherein the labels comprise a collection rule and a collection non-rule;
inputting the training sample into a compliance detection model to be trained aiming at each training sample, respectively determining the confidence degrees corresponding to the acquisition set compliance and the acquisition non-compliance of the training sample, and determining whether the acquisition of the training sample is in compliance detection results according to the confidence degrees;
and training the compliance detection model to be trained by taking the minimum first difference between the detection result and the label of each training sample as an optimization target.
Optionally, training the compliance detection model to be trained with the minimum first difference between the detection result and the label of each training sample as an optimization target, specifically including:
respectively determining a second difference between confidence degrees corresponding to the acquisition set rule and the acquisition non-rule of each training sample;
determining a loss function according to the first difference and the second difference between the detection result and the label of each training sample, and training the compliance detection model to be trained by taking the minimum loss function as an optimization target;
wherein the larger the second difference, the smaller the loss function.
Optionally, according to the confidence, determining whether the image to be detected is in compliance, specifically including:
judging whether the confidence corresponding to the collection rule is larger than the confidence corresponding to the collection non-rule or not according to the confidence;
if yes, determining the image acquisition set gauge;
and if not, determining that the image acquisition is not in compliance.
Optionally, before storing the task identifier and the image to be detected, the method further includes:
determining a vehicle identifier of a vehicle corresponding to the task identifier according to the image to be detected;
and returning prompt information carrying the vehicle identification, wherein the prompt information is used for prompting the user to confirm whether the vehicle identification is correct.
Optionally, storing the task identifier and the image to be detected specifically includes:
and when a result of confirming correctness is received, storing the task identifier, the image to be detected and the vehicle identifier.
Optionally, the method further comprises:
and when a result of error confirmation is received, the task identifier, the image to be detected and the vehicle identifier are not stored, and a second detection result is returned and used for prompting the user to re-acquire the image to be detected.
The present specification provides an image detection method including:
collecting an image to be detected for determining the loading condition of the vehicle in response to the operation of a user;
sending a detection request carrying a task identifier to a server, wherein the detection request at least comprises the image to be detected, so that the server inputs the image to be detected to a pre-trained compliance detection model, respectively determining confidence degrees corresponding to collection compliance and collection non-compliance, and judging whether the collection of the image to be detected is compliant or not according to the confidence degrees;
when a first detection result returned by the server is received, displaying an interface containing the first detection result, wherein the first detection result is used for prompting a user to continue executing a task;
and when a second detection result returned by the server is received, displaying an interface containing the second detection result, wherein the second detection result is used for prompting the user to reacquire the image to be detected.
Optionally, before receiving the first detection result returned by the server, the method further includes:
receiving prompt information returned by the server, and determining a vehicle identifier carried in the prompt information;
displaying an interface containing the prompt information and the vehicle identification, wherein the prompt information is used for prompting a user to confirm whether the vehicle identification is correct;
and sending a result of correct confirmation to a server according to the operation of the user, so that the server stores the task identifier, the image to be detected and the vehicle identifier.
Optionally, the method further comprises:
according to the operation of the user, sending a result of error confirmation to a server, enabling the server not to store the task identifier, the image to be detected and the vehicle identifier, and returning a second detection result, wherein the second detection result is used for prompting the user to re-acquire the image to be detected;
and receiving a second detection result returned by the server, displaying an interface containing the second detection result, wherein the second detection result is used for prompting the user to re-collect the image to be detected, re-collecting the image to be detected in response to the operation of the user, and sending a detection request carrying the task identifier to the server.
The present specification provides an image detection apparatus including:
the system comprises a receiving request module, a receiving module and a processing module, wherein the receiving request module is used for receiving a detection request carrying a task identifier, the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle corresponding to the task identifier;
the confidence coefficient determining module is used for inputting the image to be detected into a pre-trained compliance detection model and respectively determining confidence coefficients corresponding to collection of the set compliance and collection of the non-compliance;
and the judging, storing and prompting module is used for judging whether the image to be detected adopts the set rule or not according to the confidence, if so, storing the task identifier and the image to be detected and returning a first detection result, wherein the first detection result is used for prompting the user to continue executing the task, and if not, returning a second detection result which is used for prompting the user to re-collect the image to be detected.
The present specification provides an image detection apparatus including:
the system comprises an acquisition module, a display module and a control module, wherein the acquisition module is used for responding to the operation of a user and acquiring an image to be detected for determining the loading condition of a vehicle;
the device comprises a sending request module and a judging module, wherein the sending request module is used for sending a detection request carrying a task identifier to a server, the detection request at least comprises an image to be detected, so that the server inputs the image to be detected to a pre-trained compliance detection model, respectively determines confidence degrees corresponding to collection compliance and collection non-compliance, and judges whether the collection of the image to be detected is compliant or not according to the confidence degrees;
the first display module is used for displaying an interface containing a first detection result when the first detection result returned by the server is received, wherein the first detection result is used for prompting a user to continue executing a task;
and the second display module is used for displaying an interface containing a second detection result when the second detection result returned by the server is received, and the second detection result is used for prompting the user to reacquire the image to be detected.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the image detection method described above.
The present specification 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 the image detection method when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
the image detection method provided by the specification receives a detection request carrying a task identifier, wherein the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle. And then inputting the image to be detected into a pre-trained compliance detection model, respectively determining confidence degrees corresponding to the collection of the set compliance and the collection of the non-compliance, and finally judging whether the image to be detected is in compliance or not according to the confidence degrees. And if the set rule is adopted, storing the task identification and the image to be detected for subsequent verification, and returning a first detection result for prompting the user to continue executing the task. And if not, returning a second detection result for prompting the user to re-acquire the image to be detected. The image to be detected collected by the user is effectively processed in real time by adopting the compliance detection model, so that the labor cost is reduced, the detection efficiency is improved, and the user can immediately obtain the detection result of the image to be detected.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart of image detection provided in the present specification;
FIG. 2 is a schematic flow chart of image detection provided herein;
FIG. 3 is a schematic diagram of an acquisition of an image to be detected provided herein;
FIG. 4 is a schematic diagram illustrating a first detection result provided in the present specification;
FIG. 5 is a schematic diagram illustrating a second detection result provided in the present specification;
FIG. 6 is a schematic illustration of a prompt and vehicle identification presentation provided herein;
fig. 7 is a schematic diagram of an interaction between a server and a terminal provided in the present specification;
FIG. 8 is a schematic flow chart of image detection provided herein;
fig. 9 is a schematic diagram of an image detection apparatus provided in the present specification;
FIG. 10 is a schematic view of another image detection apparatus provided in the present specification;
fig. 11 is a schematic diagram of an electronic device implementing an image detection method provided in this specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art without making any inventive step based on the embodiments in the description belong to the protection scope of the present application.
Currently, in the process of transporting goods from a central warehouse to a transfer station (e.g., a grid warehouse), the goods are usually settled according to the number of transports and paid to a distributor, so that the distributor may increase the number of transports by a transport mode of low or no goods in order to obtain an improper benefit.
Based on the above situation, the service platform needs to supervise the loading situation of the deliverer. Of course, the above is only one case, and there may be other cases that also need to be monitored, and the above is not illustrated one by one.
Generally, when monitoring the loading condition of a delivery person, the delivery person usually takes a picture of the loading condition of a truck through a terminal device, uploads the taken picture to a server of a service platform, and finally, a detected user detects whether the picture is in compliance at the server end in a mode of manually observing the picture. When the images are in compliance, the server saves the images for subsequent verification and returns the results of successful detection to the distributor. When the images are not in compliance, the server returns the result of the detection failure to the distributor.
However, the manual image detection method takes a long time, and the detection result cannot be immediately fed back to the distributor, which results in low supervision of image capturing by the distributor. Therefore, on the one hand, the degree of matching is low when the distributor shoots, resulting in a low quality of the image obtained by shooting. On the other hand, when the images taken by the distributors are not qualified, the distributors often finish transporting and are difficult to take again. These situations result in fewer images of compliance that can be used for subsequent verification, making it difficult to supervise the shipment from the images taken.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of an image detection method in this specification, which specifically includes the following steps:
s100: receiving a detection request carrying a task identifier, wherein the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle corresponding to the task identifier.
In practical application, a user can shoot an image through a terminal and upload the shot image to a server side for detection. The server of the service platform may receive a detection request carrying an image, and further perform detection on whether the image acquisition is compliant.
Specifically, in one or more embodiments of the present specification, the server may receive a detection request carrying a task identifier, where the detection request at least includes an image to be detected acquired by a terminal, and the image to be detected is used to represent a loading condition of a vehicle corresponding to the task identifier.
The task identifier may be determined as needed, for example, may be a batch number corresponding to the representation of the task. The detection request may also include a user identifier in addition to the image to be detected, as shown in table 1.
Task identification User identification Image to be detected
001 A X
TABLE 1
Table 1 shows that the server has received a user a who performs a 001 task and has collected a detection request for an image X to be detected.
The specific content included in the detection request can also be determined according to needs, and the description is not limited. The image to be detected is an image which is shot by a user through a terminal and can represent the loading condition of the vehicle.
Of course, the terminal can select to encrypt the image to be detected according to the requirement for the transmission of the image to be detected. Correspondingly, in one or more embodiments of the present specification, after receiving the detection request including the encrypted image to be detected, the server may perform decryption according to a corresponding decryption algorithm to obtain the image to be detected. The present specification does not limit the encryption and decryption methods used.
In addition, in consideration of the transmission efficiency of the image, when the terminal transmits the image to be detected to the server, the image to be detected can be compressed according to the requirement. Correspondingly, in one or more embodiments of the present specification, after receiving a detection request including the compressed image to be detected, the server may further decompress according to a corresponding decompression algorithm to obtain the image to be detected. The present specification does not limit the compression and decompression methods employed.
The server mentioned in the present specification may be a server provided in a service platform, or a device such as a desktop computer, a notebook computer, etc. capable of executing the solution of the present specification. The user may be a dispatcher performing transportation tasks. The vehicle may be a vehicle (e.g., a truck) capable of transporting cargo. The terminal may be a terminal of a user, such as a mobile phone of the user, a tablet computer, and the like. For convenience of explanation, the following description will be made only with reference to a server as an execution subject.
S102: and inputting the image to be detected into a pre-trained compliance detection model, and respectively determining confidence degrees corresponding to the collection of the set compliance and the collection of the non-compliance.
After receiving the detection request including the image to be detected, in one or more embodiments of the present specification, the server may input the image to be detected to a pre-trained compliance detection model, and determine confidence levels corresponding to compliance and non-compliance, respectively, so as to further determine whether the image to be detected, which is acquired by the user through the terminal, is compliant.
Among others, the mentioned compliance detection model may be a classifier method in machine learning or deep learning, e.g. a residual error network (ResNet) algorithm. The specification does not limit the specific method of the rule detection model. The detection of whether the image to be detected is in compliance means that whether a rear door of the vehicle is in an open state, whether the image completely contains an outer edge of a vehicle compartment, whether the vehicle compartment is in a center position of the image, and the like in the detected image, and specific contents may be determined as needed, and the description is not limited.
After the server determines the confidence levels corresponding to the collection rule and the collection non-rule of the image to be detected, the confidence level is output by specifically adopting which data format, and the confidence level can be determined according to the adopted algorithm. For example, with the ResNet18 algorithm, the output result may be a 1 × 2 vector, e.g., <0.93, 0.07 >. Wherein, the first number represents the confidence corresponding to the acquisition rule of the image to be detected, and the second number represents the confidence corresponding to the acquisition non-compliance of the image to be detected.
In one or more embodiments of the present specification, before the image to be detected is input into the compliance detection model, the server may also pre-process the image to be detected. For example, the size of the image to be detected is scaled to the desired size (e.g., 640 × 640 pixels). Certainly, there may be a case that the original size of the image to be detected is not a square, at this time, the server may add images with preset colors on both sides of the shorter side, so that the image to be detected obtained by combination after addition is a square, and then scale the size of the image to be detected to a required size in an equal ratio.
In addition, in one or more embodiments of the present disclosure, in order to enable faster data convergence speed when processing the image to be detected, the server may further perform normalization processing on pixel colors of the image to be detected (e.g., normalizing pixel colors of 0 to 255 to-1 to 1).
It should be noted that, when the server determines, through the compliance detection model, that the image to be detected adopts the set compliance and the confidence corresponding to the non-compliance, the input image to be detected may be processed as required, and this specification is not limited.
S104: and judging whether the image to be detected adopts a set rule or not according to the confidence, if so, executing step S106, and if not, executing step S108.
After the confidence degrees corresponding to the collection set rule and the collection non-rule of the image to be detected are obtained, the server can determine whether the collection of the image to be detected is in the non-rule according to the two confidence degrees.
Specifically, in one or more embodiments of the present specification, the server may determine, according to the two confidence levels, whether the confidence level corresponding to the collection rule is greater than the confidence level corresponding to the collection non-compliance. If yes, determining that the image to be detected adopts the set rule. If not, the to-be-detected image acquisition can be determined not to be in compliance.
For example, if the confidence of the acquired image in compliance obtained in step S102 is 0.93, and the confidence of the acquired image in non-compliance is 0.07, the acquired image in compliance can be determined as 0.93> 0.07.
It should be noted that, the confidence level corresponding to the collection rule may be equal to the confidence level corresponding to the collection non-compliance, that is, both are 0.5. For such a case, whether the image to be detected adopts a set gauge or not can be judged according to requirements. The above description determines this case as acquisition non-compliance, but this is only an example given in this specification, and this specification does not limit this.
S106: and storing the task identification and the image to be detected, and returning a first detection result, wherein the first detection result is used for prompting a user to continue executing the task.
S108: and returning a second detection result, wherein the second detection result is used for prompting the user to reacquire the image to be detected.
When the detection result determined in step S104 is that the image to be detected adopts the set rule, in one or more embodiments of the present specification, the server may store the task identifier and the image to be detected. And returning a first detection result, wherein the first detection result is used for prompting the user to continue executing the task.
The task identifier and the image to be detected are stored in the server in any way, and the description is not limited. For example, the server may be stored in a storage device in the manner shown in Table 2.
Task identification Image to be detected
001 X
TABLE 2
Table 2 shows that the server correspondingly stores the 001 task identifier and the image X to be detected.
The specific content of the first detection result can be determined according to the need, and the description is not limited. For example, it may be "acquisition eligible! Detection complete! ".
In one or more embodiments of the present disclosure, when the detection result obtained through the step S104 is that the image to be detected is not in compliance with the collection, the server may return a second detection result to the terminal, where the second detection result is used to prompt the user to re-collect the image to be detected, and re-send the detection request carrying the task identifier to the server.
The specific content included in the returned second detection result may be determined as needed, and the present specification is not limited. For example, it may be "collect off! Please re-capture the image and upload! ".
Based on the image detection method shown in fig. 1, a detection request carrying a task identifier is received, the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle. And then inputting the image to be detected into a pre-trained compliance detection model, respectively determining confidence degrees corresponding to the collection of the set compliance and the collection of the non-compliance, and finally judging whether the image to be detected is in compliance or not according to the confidence degrees. And if the set rule is adopted, storing the task identification and the image to be detected for subsequent verification, and returning a first detection result for prompting the user to continue executing the task. And if not, returning a second detection result for prompting the user to re-acquire the image to be detected. The image to be detected collected by the user is effectively processed in real time by adopting the compliance detection model, so that the labor cost is reduced, the detection efficiency is improved, and the user can immediately obtain the detection result of the image to be detected.
Further, in one or more embodiments of the present disclosure, in step S102, the compliance detection model mentioned above may be trained by the following method.
First, a number of images for determining the loading of the vehicle are acquired as training samples.
Then, an annotation is determined for each training sample, the annotation including a collection rule and a collection non-rule.
Secondly, aiming at each training sample, inputting the training sample into a compliance detection model to be trained, respectively determining confidence degrees corresponding to the sampling set rule and the sampling non-compliance of the training sample, and determining whether the training sample adopts the detection result of the set rule or not according to the confidence degrees.
And finally, training the compliance detection model to be trained by taking the minimum first difference between the detection result and the label of each training sample as an optimization target.
For example, the server may first obtain a number of images for determining the loading of the vehicle as training samples. And then labeling each training sample by methods such as manual labeling or labeling algorithm, wherein the label of the training sample which is collected to be in compliance can be 1, and the label of the training sample which is collected to be not in compliance can be 0. Taking a certain training sample as an example, assuming that the label of the training sample is 1, inputting the training sample into a compliance detection model to be trained, determining that the confidence degree corresponding to the training sample acquiring rule is 0.47, and the confidence degree corresponding to the acquiring non-compliance is 0.53, determining that the detection result is unqualified, and the detection result can be represented as 0. And finally, training the compliance detection model to be trained by taking the minimum first difference between the detection result and the label of each training sample as an optimization target.
Further, in one or more embodiments of the present specification, in the above-described training process of the compliance detection model, in order to improve a classification effect of the compliance detection model to be trained, when the compliance detection model to be trained is trained with a first difference between a detection result and a label of each training sample as an optimization target, the server may further determine a second difference between confidence degrees corresponding to the acquisition of the compliance and the acquisition of the compliance of each training sample, and finally determine a loss function according to the first difference and the second difference between the detection result and the label of each training sample, and train the compliance detection model to be trained with the minimum loss function as the optimization target. Wherein the larger the second difference, the smaller the loss function.
As can be seen from the loss function, the smaller the loss function is, the smaller the first difference is, and the larger the second difference is. Then, as the training process proceeds, the more accurate the detection result of each training sample determined by the to-be-trained compliance detection model is, and the closer the confidence degrees corresponding to the collection compliance and the collection non-compliance are to the actual collection compliance and the probability of the collection non-compliance.
Of course, the compliance detection model training process mentioned in this specification is only given as an example, and the specific training process may be determined as needed. For example, a cross entropy loss function can be used as a loss function, and the minimum of the loss function is used as an optimization target to train the compliance detection model to be trained. This is not limited by the present description.
In addition, in one or more embodiments of the present specification, in step S106, before storing the task identifier and the image to be detected, the server may further determine, according to the image to be detected, a vehicle identifier of a vehicle corresponding to the task identifier. And returning prompt information carrying the vehicle identification, wherein the prompt information is used for prompting a user to confirm whether the vehicle identification is correct.
When the server determines the vehicle identifier of the vehicle corresponding to the task identifier according to the image to be detected, the vehicle identifier may be identified by using a mature image identification algorithm in the prior art, and the specification does not limit which algorithm is specifically used. The vehicle identifier mentioned herein may refer to identification information such as license plate information that can uniquely determine a corresponding vehicle.
The specific content included in the returned prompt message carrying the vehicle identifier can be determined according to needs, and the vehicle identifier may be in the text of the prompt message, or may be only carried but not included in the text of the prompt message. The specific content included in the prompt information in the present specification is not limited. For example, when the vehicle identification is the license plate information, it can be "please confirm whether the license plate identification is correct! ".
Further, in one or more embodiments of the present specification, in step S106, when the server stores the task identifier and the image to be detected, the server may further receive a confirmation result of the vehicle identifier sent by the terminal by the user.
Specifically, when the server receives a result that the user confirms to be correct, the server may store the task identifier, the image to be detected, and the vehicle identifier. For example, the server may be stored in a storage device in the manner shown in Table 3.
Task identification Vehicle identification Image to be detected
001 Jing AA0008 X
TABLE 3
Table 3 shows that the server correspondingly stores the 001 task identifier, the image X to be detected, and the vehicle identifier jing AA 0008.
When the server receives the result that the user confirms the error, the server does not need to store the task identifier, the image to be detected and the vehicle identifier, and can directly return a second detection result which is used for prompting the user to re-acquire the image to be detected. For example, it may be "license plate recognition error! Please re-capture the image and upload! ".
The present specification also provides a flow of a terminal side executing an image detection method, as shown in fig. 2, corresponding to the flow of image detection shown in fig. 1.
Fig. 2 is a schematic flow chart of an image detection method in this specification, which specifically includes the following steps:
s200: in response to a user's operation, an image to be detected for determining the loading condition of the vehicle is acquired.
In practical application, a user can shoot an image for determining the loading condition of a vehicle through a terminal and upload the image to a server, so that the server can detect whether the collection is qualified or not according to the image and give feedback immediately.
Specifically, in one or more embodiments of the present disclosure, the terminal may collect an image to be detected for determining a loading condition of the vehicle according to a preset collection rule in response to a user's operation.
The preset acquisition rules can be determined according to requirements, for example, when shooting, the rear door of the vehicle needs to be in an open state, the outer edge of the carriage of the vehicle needs to be completely contained in the image to be detected, the carriage of the vehicle needs to be located in the center of the image to be detected, and the like. As shown in fig. 3.
Fig. 3 is a schematic diagram of acquiring an image to be detected in this specification. In fig. 3, the determination button indicates that the picture displayed by the terminal device is determined to be an image to be detected, and the rectangular frame above the determination button indicates the maximum size of the image that can be captured. In the shooting frame, a rectangle frame with a bold border represents four walls of the carriage. It can be seen that in fig. 3, the doors of the vehicle are shown in an open state, the outer edges of the vehicle compartment are all contained within the image to be detected, and the vehicle compartment is in the center of the image to be detected. The user can click on the decision button and acquire the image as the image to be detected. The goods, the vehicle compartment, and the vehicle door shown in fig. 3 are added for convenience of understanding, and are not characters or symbols shown in the terminal. Meanwhile, it can be seen that the interface also has keys for user operation: "determine".
The terminal mentioned in this specification may be a terminal of a user, for example, a mobile phone, a tablet computer, etc. of the user. The user may be a distributor. In other words, the user can interact with the server of the service platform through the terminal, and then the terminal can upload the image to be detected collected by the user to the server, and judge whether the image to be detected is in compliance or not through the server. For convenience of explanation, only the terminal will be described below as an execution subject.
S202: sending a detection request carrying a task identifier to a server, wherein the detection request at least comprises the image to be detected, enabling the server to input the image to be detected into a pre-trained compliance detection model, respectively determining confidence degrees corresponding to collection compliance and collection non-compliance, and judging whether the collection of the image to be detected is compliant or not according to the confidence degrees.
After the image to be detected is acquired, in one or more embodiments of the present specification, the terminal may send a detection request carrying a task identifier to the server, where the detection request at least includes the image to be detected, so that the server inputs the image to be detected to a pre-trained compliance detection model, determines confidence levels corresponding to acquisition non-compliance and acquisition set compliance respectively, and determines whether the acquisition of the image to be detected is compliant according to the two confidence levels.
For the detection request and the subsequent server inputting the image to be detected to the pre-trained compliance detection model, determining the confidence degrees corresponding to the acquisition set compliance and the acquisition non-compliance respectively, and according to the two confidence degrees, referring to the corresponding descriptions in step S102 and step S104, the specific process of determining whether the image to be detected is compliant or not may refer to the corresponding descriptions in step S102 and step S104, which is not described herein again.
Of course, it is mentioned in the foregoing that, when the terminal transmits the image to be detected to the server, the image to be detected may be encrypted and compressed according to the need, and the specification does not limit what kind of method is specifically used to encrypt and compress the image to be detected.
S204: and when a first detection result returned by the server is received, displaying an interface containing the first detection result, wherein the first detection result is used for prompting a user to continue executing the task.
S206: and when a second detection result returned by the server is received, displaying an interface containing the second detection result, wherein the second detection result is used for prompting the user to reacquire the image to be detected.
After the server judges whether the acquisition of the image to be detected is in compliance or not, the terminal can receive and display the detection result returned by the server so as to prompt a user to execute corresponding operation.
Specifically, when the terminal receives a first detection result returned by the server, the terminal may display an interface including the first detection result, and the first detection result is used to prompt the user to continue to execute the task.
For the first detection result and the specific content of the first detection result returned by the server, reference may be made to the corresponding description in step S106, and details are not described here again.
After receiving the first detection result, the terminal may display an interface including the first detection result, as shown in fig. 4.
FIG. 4 is a schematic diagram illustrating a first detection result in the present specification. Since the foregoing steps have already determined the image collection set rule to be detected, in the terminal interface shown in fig. 4, the user can be directly prompted to collect the set rule for the current image, and the detection is completed, that is, the text "collection compliance, detection completion" shown by the terminal in fig. 4 indicates that the user can continue to perform other tasks. Meanwhile, it can be seen that the interface also has keys for user operation: "determine".
When the terminal receives a second detection result returned by the server, the terminal can display an interface containing the second detection result, and the second detection result is used for prompting the user to acquire the image to be detected again.
For the second detection result and the specific content of the second detection result returned by the server, reference may be made to the corresponding description in step S106, and details are not described here again.
And when the terminal receives the second detection result, displaying an interface containing the second detection result. Of course, after receiving the second detection result, the terminal may also directly jump to an interface for collecting an image to be detected and display the second detection result, as shown in fig. 5.
FIG. 5 is a schematic diagram showing a second detection result in the present specification. Since it has been determined in the foregoing step that the image to be detected is not compliant for acquisition, in the terminal interface shown in fig. 5, the user can directly jump to the interface for acquiring the image to be detected and prompt the user that the acquisition is not compliant this time, i.e. the text "unqualified acquisition |" displayed by the terminal in fig. 5! Please re-capture the image and upload! And the user needs to acquire the image to be detected again and upload the image to be detected to the server again for detection, so that the user can click and confirm the image to be detected after determining the image to be detected to be acquired. Correspondingly, the terminal can send a detection request carrying the task identifier to the server, and the detection request at least comprises the acquired image to be detected. Meanwhile, it can be seen that the interface also has keys for user operation: "determine". For convenience of understanding, a "shooting box" corresponding to the image shot by the user is marked in fig. 5, and the text and the logo are not shown.
In addition, in one or more embodiments of the present specification, in step S204, before receiving the first detection result returned by the server, the terminal may further receive prompt information returned by the server, and determine a vehicle identifier carried in the prompt information. And displaying an interface containing the prompt information and the vehicle identification, wherein the prompt information is used for prompting a user to confirm whether the vehicle identification is correct.
For the specific content of the prompt information and the prompt information with the vehicle identifier returned by the server, reference may be made to the corresponding description that uses the server as the execution main body, which is not described herein again.
When the terminal receives the prompt message, an interface including the prompt message and the vehicle identifier may be displayed, as shown in fig. 6.
Fig. 6 is a schematic diagram illustrating a prompt message and a vehicle identifier in this specification. In fig. 6, an example of a prompt message, that is, "please confirm whether the license plate recognition is correct" is given. The underlined part below the prompt message is the vehicle identifier of the vehicle, namely, "jing AA 0008", and the license plate information is taken as an example for explanation here. The user can compare the actual license plate information with the license plate information identified by the server to determine whether the license plate information identified by the server is correct or not. Meanwhile, it can be seen that the interface also has keys for user operation: "correct" and "error".
Further, in one or more embodiments of the present specification, after the user confirms the vehicle identifier according to the above content, the user may perform an operation according to the confirmation result to return the confirmation result to the server.
Specifically, when the user confirms that the vehicle identification is correct, referring to fig. 6, the user may click the correct button. The terminal can respond to the operation of the user and send a result of correct confirmation to the server, so that the server can correspondingly store the task identifier, the image to be detected and the vehicle identifier.
The specific content of the server corresponding to the stored task identifier, the image to be detected, and the vehicle identifier may refer to the corresponding description that uses the server as the execution main body, and is not described herein again.
When the user confirms that the vehicle identification is wrong, referring to fig. 6, the user may click an error button. The terminal can respond to the operation of the user and send a result of error confirmation to the server, so that the server does not store the task identifier, the image to be detected and the vehicle identifier, and returns a second detection result, wherein the second detection result is used for prompting the user to re-acquire the image to be detected. And receiving a second detection result returned by the server, displaying an interface containing the second detection result, wherein the second detection result is used for prompting the user to re-collect the image to be detected, responding to the operation of the user, re-collecting the image to be detected and sending a detection request carrying the task identifier to the server.
The server does not store the task identifier, the image to be detected, and the vehicle identifier, and the specific content of the second detection result is returned by referring to the corresponding description that takes the server as the execution subject, which is not described herein again.
For the specific content of the terminal receiving the second detection result returned by the server, displaying an interface including the second detection result, and the terminal re-acquiring the image to be detected and sending the detection request carrying the task identifier to the server in response to the operation of the user, reference may be made to the corresponding description in step S206, which is not repeated herein.
Of course, when the user confirms that the vehicle identifier is wrong, the terminal can prompt the user to input a correct vehicle identifier, at this time, the user can click an error button, input the correct vehicle identifier and submit, and the terminal can respond to the operation of the user and send a result of confirming that the vehicle identifier is wrong and carrying the correct vehicle identifier to the server. The server can correspondingly store the task identifier, the image to be detected and the correct vehicle identifier according to the correct vehicle identifier, and returns a first detection result to the terminal.
Based on the image detection flows shown in fig. 1 and fig. 2, the present specification further provides an interaction flow between the server and the terminal, as shown in fig. 7.
Fig. 7 is a schematic diagram of an interaction between a server and a terminal in this specification. In fig. 7, step S302 and step S312 are not executed sequentially. After step S302 is executed, step S304 may be executed, step S310 and step S314 are executed alternatively according to the determination result of step S308, and are not executed successively. Step S312 and step S316 are not executed sequentially. If step S310 is executed, step S312 is continued. If step S314 is executed, step S316 is continued. In fig. 7, the method specifically includes the following steps:
s300: the terminal acquires an image to be detected for determining the loading condition of the vehicle in response to an operation by a user.
S302: and the terminal sends a detection request carrying a task identifier to the server, wherein the detection request at least comprises the image to be detected.
S304: and the server receives a detection request carrying the task identifier.
S306: and the server inputs the image to be detected into a pre-trained compliance detection model, and respectively determines confidence degrees corresponding to the collection of the set compliance and the collection of the non-compliance.
S308: and the server judges whether the image to be detected adopts a set rule or not according to the confidence coefficient.
S310: and if the server judges that the image to be detected adopts the set rule, the server stores the task identifier and the image to be detected and returns a first detection result for prompting the user to continue executing the task.
S312: and the terminal displays an interface containing the first detection result, wherein the first detection result is used for prompting the user to continue executing the task.
S314: and if the server judges that the acquisition of the image to be detected is not in compliance, returning a second detection result for prompting the user to acquire the image to be detected again.
S316: and displaying an interface containing the second detection result by the terminal, wherein the second detection result is used for prompting the user to reacquire the image to be detected.
The specific processes of each step may refer to corresponding descriptions that take the server and the terminal as execution subjects, which are not described herein again.
In addition, in one or more embodiments of the present specification, for convenience of description, each step in the flowchart shown in fig. 1 is described with a server as an execution subject, but the execution subject of each step in the flowchart shown in fig. 1 is not limited in the present specification. For example, the execution subject may also be a terminal (e.g., a detection module of the terminal), that is, the detection of whether the acquisition of the image to be detected is compliant may be performed entirely at the terminal, and when the detection result is compliant, the image to be detected that is compliant is uploaded to the server. As shown in fig. 8.
Fig. 8 is a schematic flow chart of an image detection method in this specification, which specifically includes the following steps:
s400: in response to a user's operation, an image to be detected for determining the loading condition of the vehicle is acquired.
S402: and inputting the image to be detected into a pre-trained compliance detection model, and respectively determining confidence degrees corresponding to the collection of the set compliance and the collection of the non-compliance.
S404: and judging whether the image to be detected adopts a set gauge or not according to the confidence coefficient.
S406: and if the set rule is adopted, displaying an interface containing a first detection result, wherein the first detection result is used for prompting a user to continue executing the task, and sending a storage request to a server, and the storage request at least contains the image to be detected.
S408: and if the acquisition is not in compliance, displaying an interface containing a second detection result, wherein the second detection result is used for prompting the user to acquire the image to be detected again.
The specific processes of each step may refer to corresponding descriptions that take the server and the terminal as execution subjects, which are not described herein again.
The image detection method provided by the specification can be applied to a transportation business, and can be used in a process of supervising the loading condition through an image, for example, a scene that a business platform determines the loading condition of a distributor through an acquired image. Before the service platform determines the loading condition by means of the image, whether the image acquisition is in compliance needs to be detected, and the image of the set rule can be used for checking the loading condition subsequently. According to the method provided by the specification, the to-be-detected image sent by the user is detected by using the compliance detection model, so that the detection result can be determined immediately, the labor cost is reduced, the detection efficiency is improved, and the user can immediately obtain the detection result of the to-be-detected image.
In one or more embodiments of the present disclosure, for convenience of description, the vehicle is a truck, and the user is a distributor, but the present disclosure is not limited to the application scenario. For example, the application scenario may also be a manned situation of a supervising manned vehicle, and correspondingly, the image to be detected is used for determining the manned situation of the vehicle. At this time, the image detection method provided in this specification may also be applied when detecting whether the image acquisition to be detected is in compliance.
Based on the same idea, the image detection method provided in one or more embodiments of the present specification further provides a corresponding image detection apparatus, as shown in fig. 9.
Fig. 9 is a schematic diagram of an image detection apparatus provided in this specification, including:
the receiving request module 800 is configured to receive a detection request carrying a task identifier, where the detection request at least includes an image to be detected acquired by a terminal, and the image to be detected is used to determine a loading condition of a vehicle corresponding to the task identifier;
a confidence determining module 802, configured to input the image to be detected to a pre-trained compliance detection model, and determine confidence corresponding to the collection compliance and the collection non-compliance respectively;
and the judging, storing and prompting module 804 is configured to judge whether the image to be detected adopts a set rule or not according to the confidence, if so, store the task identifier and the image to be detected, and return a first detection result, where the first detection result is used to prompt the user to continue to execute the task, and if not, return a second detection result, where the second detection result is used to prompt the user to re-acquire the image to be detected.
Optionally, the confidence determining module 802 obtains a plurality of images for determining a loading condition of the vehicle, and uses the images as training samples, determines labels of the training samples, where the labels include an acquisition set rule and an acquisition non-rule, inputs the training samples to a compliance detection model to be trained, and determines confidence levels corresponding to the acquisition set rule and the acquisition non-rule of the training samples, respectively, so as to determine a detection result of whether the acquisition of the training samples is compliant according to the confidence levels, and trains the compliance detection model to be trained with a minimum first difference between the detection result of each training sample and the label as an optimization target.
Optionally, the confidence determining module 802 determines second differences between the confidence levels corresponding to the sampling set rule and the sampling non-rule of each training sample, determines a loss function according to the first difference and the second difference between the detection result and the label of each training sample, and trains the to-be-trained compliance detection model with the minimum loss function as an optimization target, where the larger the second difference is, the smaller the loss function is.
Optionally, the judging, storing and prompting module 804 judges whether the confidence corresponding to the collection rule is greater than the confidence corresponding to the collection non-rule according to the confidence, if so, determines the image collection rule, and if not, determines the image collection non-rule.
Optionally, the apparatus further comprises: and a vehicle identifier confirming module 806, configured to determine, according to the image to be detected, a vehicle identifier of a vehicle corresponding to the task identifier, and return a prompt message carrying the vehicle identifier, where the prompt message is used to prompt the user to confirm whether the vehicle identifier is correct.
Optionally, the vehicle identifier confirming module 806 stores the task identifier, the image to be detected, and the vehicle identifier when a result of confirming correctness is received.
Optionally, the vehicle identifier confirming module 806 does not store the task identifier, the image to be detected, and the vehicle identifier when receiving a result of a confirmation error, and returns a second detection result, where the second detection result is used to prompt the user to reacquire the image to be detected.
Based on the same idea, the present specification also provides another image detection apparatus, as shown in fig. 10.
Fig. 10 is a schematic diagram of another image detection apparatus provided in this specification, including:
an acquisition module 900 for acquiring an image to be detected for determining a loading condition of a vehicle in response to an operation of a user;
a sending request module 902, configured to send a detection request carrying a task identifier to a server, where the detection request at least includes the to-be-detected image, so that the server inputs the to-be-detected image to a pre-trained compliance detection model, determines confidence levels corresponding to a set compliance acquisition and a set compliance acquisition, respectively, and determines whether the to-be-detected image acquisition is compliant according to the confidence levels;
a first display module 904, configured to display an interface including a first detection result when receiving the first detection result returned by the server, where the first detection result is used to prompt a user to continue to execute a task;
and a second display module 906, configured to display an interface including a second detection result when receiving the second detection result returned by the server, where the second detection result is used to prompt the user to reacquire the image to be detected.
Optionally, the apparatus further comprises: a confirming module 908, configured to receive the prompt information returned by the server, determine a vehicle identifier carried in the prompt information, and display an interface including the prompt information and the vehicle identifier, where the prompt information is used to prompt a user to confirm whether the vehicle identifier is correct, and according to the operation of the user, send a result of confirming the correctness to the server, so that the server stores the task identifier, the image to be detected, and the vehicle identifier.
Optionally, the confirming module 908 is configured to send a result of an error confirmation to a server according to the operation of the user, so that the server does not store the task identifier, the image to be detected, and the vehicle identifier, and returns a second detection result, where the second detection result is used to prompt the user to re-acquire the image to be detected;
and receiving a second detection result returned by the server, displaying an interface containing the second detection result, wherein the second detection result is used for prompting the user to re-collect the image to be detected, re-collecting the image to be detected in response to the operation of the user, and sending a detection request carrying the task identifier to the server.
The present specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the image detection method provided in fig. 1 or fig. 2 described above.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 11. As shown in fig. 11, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads a corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the image detection method described in fig. 1 or fig. 2.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as a combination of logic devices or software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (14)

1. An image detection method, comprising:
receiving a detection request carrying a task identifier, wherein the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle corresponding to the task identifier;
inputting the image to be detected into a pre-trained compliance detection model, and respectively determining confidence degrees corresponding to collection of the set compliance and collection of the non-compliance;
judging whether the image to be detected adopts a set rule or not according to the confidence coefficient;
if so, storing the task identification and the image to be detected, and returning a first detection result, wherein the first detection result is used for prompting a user to continue executing the task;
and if not, returning a second detection result, wherein the second detection result is used for prompting the user to reacquire the image to be detected.
2. The method of claim 1, wherein the compliance detection model is trained using a method wherein:
acquiring a plurality of images for determining the loading condition of the vehicle as training samples;
determining labels of each training sample, wherein the labels comprise a collection rule and a collection non-rule;
inputting the training sample into a compliance detection model to be trained aiming at each training sample, respectively determining the confidence degrees corresponding to the acquisition set compliance and the acquisition non-compliance of the training sample, and determining whether the acquisition of the training sample is in compliance detection results according to the confidence degrees;
and training the compliance detection model to be trained by taking the minimum first difference between the detection result and the label of each training sample as an optimization target.
3. The method of claim 2, wherein training the compliance testing model to be trained with the first minimum difference between the testing result and the label of each training sample as an optimization objective comprises:
respectively determining a second difference between confidence degrees corresponding to the acquisition set rule and the acquisition non-rule of each training sample;
determining a loss function according to the first difference and the second difference between the detection result and the label of each training sample, and training the compliance detection model to be trained by taking the minimum loss function as an optimization target;
wherein the larger the second difference, the smaller the loss function.
4. The method according to claim 1, wherein determining whether the image acquisition to be detected is compliant according to the confidence level comprises:
judging whether the confidence corresponding to the collection rule is larger than the confidence corresponding to the collection non-rule or not according to the confidence;
if yes, determining the image acquisition set gauge;
and if not, determining that the image acquisition is not in compliance.
5. The method of claim 1, wherein prior to storing the task identification and the image to be detected, the method further comprises:
determining a vehicle identifier of a vehicle corresponding to the task identifier according to the image to be detected;
and returning prompt information carrying the vehicle identification, wherein the prompt information is used for prompting the user to confirm whether the vehicle identification is correct.
6. The method of claim 5, wherein storing the task identifier and the image to be detected comprises:
and when a result of confirming correctness is received, storing the task identifier, the image to be detected and the vehicle identifier.
7. The method of claim 5, wherein the method further comprises:
and when a result of error confirmation is received, the task identifier, the image to be detected and the vehicle identifier are not stored, and a second detection result is returned and used for prompting the user to re-acquire the image to be detected.
8. An image detection method, comprising:
collecting an image to be detected for determining the loading condition of the vehicle in response to the operation of a user;
sending a detection request carrying a task identifier to a server, wherein the detection request at least comprises the image to be detected, so that the server inputs the image to be detected to a pre-trained compliance detection model, respectively determining confidence degrees corresponding to collection compliance and collection non-compliance, and judging whether the collection of the image to be detected is compliant or not according to the confidence degrees;
when a first detection result returned by the server is received, displaying an interface containing the first detection result, wherein the first detection result is used for prompting a user to continue executing a task;
and when a second detection result returned by the server is received, displaying an interface containing the second detection result, wherein the second detection result is used for prompting the user to reacquire the image to be detected.
9. The method of claim 8, wherein prior to receiving the first detection result returned by the server, the method further comprises:
receiving prompt information returned by the server, and determining a vehicle identifier carried in the prompt information;
displaying an interface containing the prompt information and the vehicle identification, wherein the prompt information is used for prompting a user to confirm whether the vehicle identification is correct;
and sending a result of correct confirmation to a server according to the operation of the user, so that the server stores the task identifier, the image to be detected and the vehicle identifier.
10. The method of claim 9, wherein the method further comprises:
according to the operation of the user, sending a result of error confirmation to a server, enabling the server not to store the task identifier, the image to be detected and the vehicle identifier, and returning a second detection result, wherein the second detection result is used for prompting the user to re-acquire the image to be detected;
and receiving a second detection result returned by the server, displaying an interface containing the second detection result, wherein the second detection result is used for prompting the user to re-collect the image to be detected, responding to the operation of the user, re-collecting the image to be detected and sending a detection request carrying the task identifier to the server.
11. An image detection apparatus, characterized by comprising:
the system comprises a receiving request module, a receiving module and a processing module, wherein the receiving request module is used for receiving a detection request carrying a task identifier, the detection request at least comprises an image to be detected acquired by a terminal, and the image to be detected is used for determining the loading condition of a vehicle corresponding to the task identifier;
the confidence coefficient determining module is used for inputting the image to be detected into a pre-trained compliance detection model and respectively determining confidence coefficients corresponding to collection of the set compliance and collection of the non-compliance;
and the judging, storing and prompting module is used for judging whether the image to be detected adopts the set rule or not according to the confidence, if so, storing the task identifier and the image to be detected and returning a first detection result, wherein the first detection result is used for prompting the user to continue executing the task, and if not, returning a second detection result which is used for prompting the user to re-collect the image to be detected.
12. An image detection apparatus, characterized by comprising:
the system comprises an acquisition module, a display module and a control module, wherein the acquisition module is used for responding to the operation of a user and acquiring an image to be detected for determining the loading condition of a vehicle;
the device comprises a sending request module and a judging module, wherein the sending request module is used for sending a detection request carrying a task identifier to a server, the detection request at least comprises an image to be detected, so that the server inputs the image to be detected to a pre-trained compliance detection model, respectively determines confidence degrees corresponding to collection compliance and collection non-compliance, and judges whether the collection of the image to be detected is compliant or not according to the confidence degrees;
the first display module is used for displaying an interface containing a first detection result when the first detection result returned by the server is received, wherein the first detection result is used for prompting a user to continue executing a task;
and the second display module is used for displaying an interface containing a second detection result when the second detection result returned by the server is received, and the second detection result is used for prompting the user to reacquire the image to be detected.
13. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1 to 10.
14. 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 method of any of claims 1 to 10 when executing the program.
CN202111665192.4A 2021-12-31 2021-12-31 Image detection method and device Pending CN114511775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111665192.4A CN114511775A (en) 2021-12-31 2021-12-31 Image detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111665192.4A CN114511775A (en) 2021-12-31 2021-12-31 Image detection method and device

Publications (1)

Publication Number Publication Date
CN114511775A true CN114511775A (en) 2022-05-17

Family

ID=81548062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111665192.4A Pending CN114511775A (en) 2021-12-31 2021-12-31 Image detection method and device

Country Status (1)

Country Link
CN (1) CN114511775A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958135A (en) * 2023-09-18 2023-10-27 支付宝(杭州)信息技术有限公司 Texture detection processing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958135A (en) * 2023-09-18 2023-10-27 支付宝(杭州)信息技术有限公司 Texture detection processing method and device
CN116958135B (en) * 2023-09-18 2024-03-08 支付宝(杭州)信息技术有限公司 Texture detection processing method and device

Similar Documents

Publication Publication Date Title
CN110874440B (en) Information pushing method and device, model training method and device, and electronic equipment
CN110321958B (en) Training method of neural network model and video similarity determination method
CN112100431B (en) Evaluation method, device and equipment of OCR system and readable storage medium
CN109919244B (en) Method and apparatus for generating a scene recognition model
CN108399482B (en) Contract evaluation method and device and electronic equipment
CN109961032B (en) Method and apparatus for generating classification model
CN111340640A (en) Insurance claim settlement material auditing method, device and equipment
CN111242119B (en) Vehicle image processing method and device, electronic equipment and computer readable medium
CN114022257A (en) Order processing system, method and device, storage medium and electronic equipment
CN114511775A (en) Image detection method and device
CN110825611A (en) Abnormal program analysis method and device and computer readable storage medium
CN110298302B (en) Human body target detection method and related equipment
CN110287817B (en) Target recognition and target recognition model training method and device and electronic equipment
CN116309554A (en) Defect detection network construction and defect detection method, device and equipment
CN113963290A (en) Video target detection method, device, equipment and readable storage medium
CN113140012A (en) Image processing method, image processing apparatus, image processing medium, and electronic device
CN110414625B (en) Method and device for determining similar data, electronic equipment and storage medium
CN110413869B (en) Method and device for pushing information
CN110852261A (en) Target detection method and device, electronic equipment and readable storage medium
CN114627432A (en) Loading and unloading goods identification monitoring system
CN111612714B (en) Image restoration method and device and electronic equipment
CN115937617B (en) Risk identification model training and risk control method, device and equipment
CN113033680A (en) Video classification method and device, readable medium and electronic equipment
CN117351004B (en) Regenerated material identification method, apparatus, electronic device and computer readable medium
CN118196547A (en) Target detection method, device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication