CN115984285B - Method and system for detecting library bit state based on generation countermeasure network and storage medium - Google Patents

Method and system for detecting library bit state based on generation countermeasure network and storage medium Download PDF

Info

Publication number
CN115984285B
CN115984285B CN202310277991.7A CN202310277991A CN115984285B CN 115984285 B CN115984285 B CN 115984285B CN 202310277991 A CN202310277991 A CN 202310277991A CN 115984285 B CN115984285 B CN 115984285B
Authority
CN
China
Prior art keywords
library
value
countermeasure network
ganomaly
positive
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.)
Active
Application number
CN202310277991.7A
Other languages
Chinese (zh)
Other versions
CN115984285A (en
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.)
Shanghai Xiangong Intelligent Technology Co ltd
Original Assignee
Shanghai Xiangong Intelligent 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 Shanghai Xiangong Intelligent Technology Co ltd filed Critical Shanghai Xiangong Intelligent Technology Co ltd
Priority to CN202310277991.7A priority Critical patent/CN115984285B/en
Publication of CN115984285A publication Critical patent/CN115984285A/en
Application granted granted Critical
Publication of CN115984285B publication Critical patent/CN115984285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a method and a system for detecting a library bit state based on a generation countermeasure network and a storage medium, wherein the method comprises the following steps: collecting a plurality of pictures in the blank position and the occupied state of the library, and defining the pictures as positive and negative samples respectively; training a GANomaly countermeasure network by taking a positive sample as input until the similarity between the positive sample and a reconstructed graph reaches an expected target, inputting a current true graph of a library into the trained GANomaly countermeasure network, acquiring the reconstructed graph, and performing post-processing to acquire a comparison value; defining a stock state judgment value according to the difference boundary between the corresponding reconstruction images generated in the trained GANomaly countermeasure network by the positive and negative samples
Figure ZY_1
The method comprises the steps of carrying out a first treatment on the surface of the Compare the comparison value with
Figure ZY_2
And comparing to judge the corresponding library position state feedback, thereby realizing the judgment of the library position state based on the countermeasure network, reducing the requirements for making training sets and training, and improving the detection adaptability.

Description

Method and system for detecting library bit state based on generation countermeasure network and storage medium
Technical Field
The invention relates to an image detection technology, in particular to a detection method and a detection system for detecting whether a library state is empty or not based on a GANomaly generation countermeasure network.
Background
The warehouse position state judgment has wide application value in the field of industrial logistics automation, for example, after whether cargoes exist in a warehouse stacking area or not, the warehouse position state judgment can be conducted by commanding an unmanned forklift through a dispatching system. Therefore, how to accurately judge the change of the warehouse position state is important for automatic warehouse management.
In the prior art, the state of a library is calculated and judged mainly by identifying the position of goods in an image and combining a delimited library region. For example, the prior art provides a library level detection method and system (chinese patent application No. 202210381020.2) wherein the library level detection system comprises at least one camera mounted at a height above a library level area to be detected, the field of view of the at least one camera covering the whole library level area for capturing real-time images of the library level area, the library level area comprising a plurality of library levels, the method comprising: performing stitching processing on the real-time images acquired by at least one camera to obtain a global map of the library position area to be detected; training a target recognition model of a library position area to be detected based on a deep learning framework; and identifying the real-time image through the trained target detection model according to the global map to obtain state information and position information of each library bit in the library bit region.
However, in the concept of the target detection technology adopting the deep learning framework, the probability prediction of whether a library is empty/occupied is obtained, so that during training, sample graphs of different patterns and at different angles of view in two states of the empty library and the occupied library are necessarily required to be simultaneously learned, and therefore, high requirements exist in the aspects of training set production and training.
Secondly, in terms of detection adaptability, in the existing target detection technology, when a new type of goods occupy place on a warehouse location, samples of the new type of goods may need to be collected again to make a training set so as to train an updated model, so that the detection adaptability is weaker.
Disclosure of Invention
Therefore, the main objective of the present invention is to provide a method and a system for detecting a library state based on generation of an countermeasure network, so as to determine the library state based on the countermeasure network, thereby reducing the requirements for making training sets and training, and improving the detection adaptability.
In order to achieve the above object, according to a first aspect of the present invention, there is provided a method for detecting a state of a library based on generation of an countermeasure network, comprising the steps of:
step S100, collecting a plurality of pictures in the blank position and the occupied state of the library, and defining the pictures as positive and negative samples respectively;
step S200, training the GANomaly countermeasure network by taking the positive sample as input until the similarity between the positive sample and the reconstruction thereof is ensured to reach the expected target;
step S300, inputting the current real graph of the library into a trained GANomaly countermeasure network, acquiring a reconstructed graph, and then performing post-processing to acquire a comparison value; defining a stock state judgment value according to the difference boundary between the corresponding reconstruction images generated in the trained GANomaly countermeasure network by the positive and negative samples
Figure SMS_1
The method comprises the steps of carrying out a first treatment on the surface of the Compare the comparison value with +.>
Figure SMS_2
And comparing to judge the corresponding library state feedback.
In a possibly preferred embodiment, in the step S300, the post-processing step of reconstructing includes: performing difference calculation on the obtained corresponding reconstructed image and the real image, performing gray value and self-adaptive threshold binarization processing on the reconstructed image after the difference calculation, performing summation statistics to obtain a comparison value,
in a possibly preferred embodiment, in the step S300: library state judgment value
Figure SMS_3
Wherein->
Figure SMS_4
For the maximum difference value between each positive sample and its reconstructed image, +.>
Figure SMS_5
For the minimum difference value between each negative sample and its reconstruction, wherein alpha is the degree to which the threshold value is close to the upper and lower boundaries, and the value interval is [0.1,0.9 ]]。
In a possibly preferred embodiment, in the step S300:
Figure SMS_6
Figure SMS_7
wherein the method comprises the steps of
Figure SMS_9
The method comprises the following steps: positive samples->
Figure SMS_11
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure SMS_14
To be in charge of->
Figure SMS_10
Calculating absolute value of difference>
Figure SMS_12
M is the number of positive samples; />
Figure SMS_15
The method comprises the following steps: negative examples->
Figure SMS_17
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure SMS_8
To be in charge of->
Figure SMS_13
Calculating absolute value of difference>
Figure SMS_16
N is the number of negative samples; gray is Gray value processing, adaThresh self-adaptive threshold value binarization processing, sum is sum calculation.
In order to achieve the above object, according to a second aspect of the present invention, there is also provided a method for detecting a state of a library based on generation of an countermeasure network, comprising the steps of:
step S100, collecting a plurality of library positions in empty and occupied statesA picture, respectively defined as positive samplexNegative sampley
Step S200, constructing a GANomaly countermeasure network, and taking positive samplesxAs input, obtain the reconstructed image corresponding to the positive sample
Figure SMS_18
And judgexAnd->
Figure SMS_19
To generate alternate training against the network until ensuringxAnd->
Figure SMS_20
The similarity achieves the expected goal;
step S300, defining a library state judgment value
Figure SMS_21
Wherein->
Figure SMS_22
For the maximum difference value between each positive sample and its reconstructed image, +.>
Figure SMS_23
A minimum difference value between each negative sample and its reconstructed image;
step S400, checking the true map of the library positionx1 inputting the trained GANomaly countermeasure network to obtain a reconstruction graph
Figure SMS_24
And combine it withx1 calculate the difference->
Figure SMS_25
Then, gray value processing and adaptive threshold binarization processing are carried out on the obtained product, and summation statistics is carried out to obtain a comparison valueX2;
Step S500 judgmentX2 is greater than
Figure SMS_26
If yes, the library bit is in an occupied state, otherwise, the library bit is in a vacant state.
In a possibly preferred embodiment, in the step S300:
Figure SMS_27
Figure SMS_28
wherein the method comprises the steps of
Figure SMS_30
The method comprises the following steps: positive samples->
Figure SMS_33
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure SMS_37
To be in charge of->
Figure SMS_31
Calculating absolute value of difference>
Figure SMS_34
M is the number of positive samples; />
Figure SMS_36
The method comprises the following steps: negative examples->
Figure SMS_38
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure SMS_29
To be in charge of->
Figure SMS_32
Calculating absolute value of difference>
Figure SMS_35
N is the number of negative samples; gray is Gray value processing, adaThresh self-adaptive threshold value binarization processing, sum is sum calculation.
In order to achieve the above object, according to a third aspect of the present invention, there is also provided a system for detecting a status of a library based on generation of an countermeasure network, comprising:
a storage unit, configured to store a program including the steps of the method for detecting a status of a library based on generation of an countermeasure network as described in any one of the above, for the control unit, the processing unit, and for timely scheduling execution;
the control unit is used for controlling the camera to collect a plurality of pictures in the empty position and the occupied state of the library, and the pictures are respectively defined as positive and negative samples;
a processing unit for training the GANomaly challenge network with the positive sample as input until ensuring that the positive sample achieves the intended target with its reconstructed similarity;
the control unit is also used for controlling the camera to acquire a current real map of the library position;
the processing unit inputs the real graph into a trained GANomaly countermeasure network to calculate the difference value between the real graph and the reconstructed graph, performs gray value and self-adaptive threshold value binarization processing, and then performs summation statistics to obtain a comparison value; comparing the comparison value with the library state judgment value
Figure SMS_39
And comparing to judge the corresponding library state feedback.
To achieve the above object, according to a fourth aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the method for detecting a status of a library based on generation of an countermeasure network as described in any one of the above.
According to the method and the system for detecting the state of the library based on the generated countermeasure network, the countermeasure network can be trained only through the blank sample of the library, so that compared with the prior art, the difficulty in manufacturing a training set and a training network can be effectively reduced, meanwhile, the inventor skillfully designs that the comparison value is obtained through post-processing of the reconstruction corresponding to the real graph to judge the comparison value with the preset library state judgment value so as to obtain the library state result, once the countermeasure network is trained, the countermeasure network model is not required to be trained and updated no matter what goods occupy the library in the follow-up process, and therefore adaptability is greatly improved, meanwhile, the countermeasure network technology is also skillfully utilized, and the function of detecting the state of the library is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a schematic diagram of the steps of a method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a GANomaly challenge network in a method according to a first embodiment of the invention;
FIG. 3 is a schematic diagram of a data processing flow in a method according to a first embodiment of the present invention;
FIG. 4 is an exemplary diagram of positive and negative samples and their corresponding reconstructed and difference binary maps in a method according to a first embodiment of the present invention;
fig. 5 is a schematic diagram of a system structure according to a second embodiment of the present invention.
Detailed Description
In order that those skilled in the art can better understand the technical solutions of the present invention, the following description will clearly and completely describe the specific technical solutions of the present invention in conjunction with the embodiments to help those skilled in the art to further understand the present invention. It will be apparent that the embodiments described herein are merely some, but not all embodiments of the invention. It should be noted that embodiments and features of embodiments in this application may be combined with each other by those of ordinary skill in the art without departing from the inventive concept and conflict. All other embodiments, which are derived from the embodiments herein without creative effort for a person skilled in the art, shall fall within the disclosure and the protection scope of the present invention.
Furthermore, the terms "first," "second," "S100," "S200," and the like in the description and in the claims and drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those described herein. Also, the terms "comprising" and "having" and any variations thereof herein are intended to cover a non-exclusive inclusion. Unless specifically stated or limited otherwise, the terms "disposed," "configured," "mounted," "connected," "coupled" and "connected" are to be construed broadly, e.g., as being either permanently connected, removably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the terms in this case will be understood by those skilled in the art in view of the specific circumstances and in combination with the prior art.
The invention relates to a library position detection, which is used for detecting whether a library position state is abnormal or not, but the problem that the abnormal sample has few samples, more changes and large difference in the abnormal detection process is solved, so that the number of the abnormal sample is too many, but the normal sample (library position empty state sample) is more stable.
For this purpose, as shown in fig. 1 to 4, the method for detecting a status of a library based on a generated countermeasure network according to the present invention includes the steps of:
step S100, positive and negative sample data sets are manufactured: collecting multiple pictures in the blank and occupied state of the library, respectively defining as positive samplesxNegative sampley
For example, first, in an image including a bin region, positive and negative sample images are boxed and cut out as shown in fig. 4, wherein the number of positive sample training samples is preferably S, the number of positive sample test samples is 0.2×s, and the number of negative sample test samples is 0.2×s.
Secondly, positive and negative samples are takenxyThe training set contains only positive samples, uniformly scaled to a fixed size, e.g. (64 x 64).
Step S200, constructing a GANomaly countermeasure network, and taking positive samplesxAs input, obtain the reconstructed image corresponding to the positive sample
Figure SMS_40
And judgexAnd->
Figure SMS_41
To generate a countering network alternate training until the expected goal is reached, ensurexAnd->
Figure SMS_42
The similarity is as high as possible.
For example, as shown in fig. 2, the overall structure of the GANomaly is that the upper half adopts a network structure of an encoder, a decoder and an encoder, and learns the original image to generate a reconstruction, the latent expression of the original image generates the latent expression of the reconstruction, and the lower half defines a discriminator. The network and the countermeasure network are generated through alternate training.
Wherein the generator networkG: is composed of two parts, encoder
Figure SMS_46
And decoder->
Figure SMS_49
. Belonging to self-coding structure for learning input +.>
Figure SMS_53
Is to reconstruct an image +.>
Figure SMS_45
。/>
Figure SMS_47
Input of +.>
Figure SMS_51
Dimension->
Figure SMS_55
Generating a vector via a network>
Figure SMS_43
Its dimension is
Figure SMS_50
。/>
Figure SMS_54
Is to add vector->
Figure SMS_56
Conversion to->
Figure SMS_44
Its dimension and->
Figure SMS_48
And consistent. />
Figure SMS_52
The transposed convolution is mainly applied.
Encoder networkE: encoder E structure
Figure SMS_57
Is the same, pseudo-image to be generated +.>
Figure SMS_58
Turn to->
Figure SMS_59
The encoder network is used for replacing the process of searching the potential expression of the pseudo image in the testing stage in the AnoGan design (the potential expression is the final obtained characteristic of the conventional convolution network), so that the efficiency is improved.
Distinguishing device networkD: distinguishing device network
Figure SMS_60
There are two inputs, original diagram +.>
Figure SMS_61
Restructuring +_>
Figure SMS_62
. And finally, calculating the final score through convolution, and judging the true or false.
Loss function: the loss function of the GANomaly network has an upper generator loss function and a lower arbiter loss function. The upper part has three parts:
Figure SMS_63
Figure SMS_64
Figure SMS_65
wherein the method comprises the steps of
Figure SMS_66
For the original image +.>
Figure SMS_67
Is->
Figure SMS_68
Distribution of->
Figure SMS_69
Is the intermediate layer output of the arbiter network, +.>
Figure SMS_70
The output of (2) is +.>
Figure SMS_71
Figure SMS_72
Figure SMS_73
Figure SMS_74
Figure SMS_75
Figure SMS_76
Wherein the method comprises the steps of
Figure SMS_77
Refers to the result of the operation of the encoder.
The total loss function of the generator is:
Figure SMS_78
wherein the method comprises the steps of
Figure SMS_79
The Loss of the arbiter is consistent with the original GAN, BCE Loss:
Figure SMS_80
wherein the method comprises the steps of
Figure SMS_81
Indicate probability distribution obeyed by true graph x, +.>
Figure SMS_82
Refers to the result of the arbiter network.
During network training, the generator network of the upper part and the discriminator network of the lower part are trained alternately, and the training process comprises the following steps:
step S201 is to train the generator and the arbiter of GANomaly in a cyclic and alternating mode, wherein the gradient updating mode is Adam, and the initial value of the learning rate is 0.0002. An example of a data batch size is 64.
Step S202, loop training completion conditions: difference between positive and reconstructed samples in a test sample setMaximum value
Figure SMS_83
Less than the minimum value of the difference between the negative and reconstructed samples +.>
Figure SMS_84
The method comprises the steps of carrying out a first treatment on the surface of the The number of training alternations reaches a set number of cycles. Otherwise readjusting the sample set.
After the training of step S203 is completed, calculation
Figure SMS_85
As the judgment basis for the subsequent reasoning.
Step S300 calculates a library status determination value
Figure SMS_86
Wherein->
Figure SMS_87
For the maximum difference value between each positive sample and its reconstructed image, +.>
Figure SMS_88
For the minimum difference value between each negative sample and its reconstruction, wherein alpha is the degree to which the threshold value is close to the upper and lower boundaries, the value interval is preferably [0.1,0.9 ]]。
Specifically, the present invention uses GANomaly for bin detection, not by the true-false score of the arbiter. The role of the discriminator is to ensure the original positive sample image
Figure SMS_89
Is recombined with->
Figure SMS_90
The similarity of (c) is as high as possible. The real samples of the training contain only positive samples, so the reconstructed image of the similar positive samples (empty bin) differs less from the original image, while the reconstructed image of the negative samples (non-empty bin) differs more from the original negative sample.
The library bit detection logic of the scheme is to compare the difference value between the normal sample and the reconstructed sample
Figure SMS_91
Negative sample of test->
Figure SMS_92
Is recombined with->
Figure SMS_93
Difference of->
Figure SMS_94
Difference between them. And then respectively carrying out grey value treatment on the obtained products, carrying out self-adaptive threshold value binarization treatment, and carrying out summation statistics.
For example:
Figure SMS_95
Figure SMS_96
wherein the method comprises the steps of
Figure SMS_97
The method comprises the following steps: positive samples->
Figure SMS_98
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure SMS_99
To be in charge of->
Figure SMS_100
Calculating absolute value of difference>
Figure SMS_101
M is the positive sample number.
Figure SMS_102
The method comprises the following steps: negative examples->
Figure SMS_103
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure SMS_104
To be in charge of->
Figure SMS_105
Calculating absolute value of difference>
Figure SMS_106
N is the number of negative samples; gray is Gray value processing, adaThresh self-adaptive threshold value binarization processing, sum is sum calculation.
Further, in the preferred embodiment, the inventors have adjusted through a number of experiments, preferably
Figure SMS_107
When the optimal selection value is 0.2, the method can better reflect +.>
Figure SMS_108
To improve the subsequent judgment +.>
Figure SMS_109
To identify the accuracy of the bin status.
Figure SMS_110
Step S400, true images of the library positions to be checkedx1 inputting the trained GANomaly countermeasure network to obtain a reconstruction graph
Figure SMS_111
And combine it withx1 calculate the difference->
Figure SMS_112
Then, gray value processing and adaptive threshold binarization processing are carried out on the obtained product, and summation statistics is carried out to obtain a comparison valueX2。
Specifically, after training the GANomaly challenge network, and computing to obtain
Figure SMS_113
Then, the formal state detection of the library can be started, wherein the real image of the currently detected library is preprocessed as the positive sample, and then used as the input of the trained GANomaly countermeasure network, so as to obtain the corresponding reconstructed image and then perform post-processing (the post-processing preferably adopts an OpenCV function library) for calculating the comparison valueX2:
Figure SMS_114
That is, the obtained corresponding reconstruction image and the real image are subjected to difference calculation, the reconstruction image after the difference calculation is subjected to gray value and adaptive threshold binarization, and then summation statistics is carried out, so as to obtain a comparison value, wherein
Figure SMS_115
Representing the absolute value function->
Figure SMS_116
Represents a gray-scale function, ">
Figure SMS_117
Representing an adaptive threshold binarization function, sum representing a summation function.
Step S500 finally, the comparison value obtained in step S400X2 judging whether or notX2>
Figure SMS_118
If yes, the library bit is in an occupied state, otherwise, the library bit is in a vacant state.
Thus, unlike the conventional GANomaly network, the conventional GANomaly network distinguishes positive and negative samples by determining the score of the network, and in this scheme, the score of the determination network is not referred to, but the difference between the result of the generation network and the original input is calculated. The method is used for detecting the library position by using a sample with only empty library position in training, has good generating effect on the sample, but has poor generating effect on non-empty library bitmap, and has larger difference between an input picture and a generating result under two conditions, and exactly corresponds to the conception of two states of occupied and unoccupied library position, thereby realizing the detection of the library position state by skillfully using the characteristics of a GANomaly network.
In accordance with the first embodiment, referring to fig. 5, the present invention further provides a system for detecting a status of a library based on generating an countermeasure network, which includes:
a storage unit, configured to store a program including steps corresponding to the method for detecting a status of a library based on generation of an countermeasure network as shown in the first embodiment, for the control unit, the processing unit, and the timely fetch and execute the program;
the control unit is used for controlling the camera to collect a plurality of pictures in the empty position and the occupied state of the library, and the pictures are respectively defined as positive and negative samples;
the processing unit is used for taking the positive sample as input to train the GANomaly countermeasure network until the expected target is achieved, and ensuring that the similarity between the positive sample and the reconstruction graph is as high as possible;
the control unit is further used for controlling the camera to acquire a current real map of the library position;
the processing unit further inputs the real graph into a trained GANomaly countermeasure network to calculate the difference value between the real graph and the reconstructed graph, performs gray value and self-adaptive threshold value binarization processing, and then performs summation statistics to obtain a comparison value; comparing the comparison value with the library state judgment value
Figure SMS_119
And comparing to judge the corresponding library state feedback.
The present invention also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of the method for detecting a status of a library based on generating an countermeasure network described in the first embodiment.
In summary, according to the method and the system for detecting the state of the library based on the generated countermeasure network, the countermeasure network can be trained only by the blank sample of the library, so that compared with the prior art, the difficulty in manufacturing a training set and a training network can be effectively reduced, meanwhile, the inventor skillfully designs that the comparison value is obtained by performing post-processing on the reconstruction corresponding to the true graph to judge the comparison value with the preset library state judgment value so as to obtain the library state result, and therefore, once the countermeasure network training is completed, no matter what goods occupy the library, the countermeasure network model is not required to be trained and updated any more, thereby greatly improving the adaptability, and meanwhile, the countermeasure network technology is also skillfully utilized, so that the function of detecting the state of the library is realized.
The preferred embodiments of the invention disclosed above are intended only to assist in the explanation of the invention. The preferred embodiments are not exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best understand and utilize the invention. The invention is to be limited only by the following claims and their full scope and equivalents, and any modifications, equivalents, improvements, etc., which fall within the spirit and principles of the invention are intended to be included within the scope of the invention.
It will be appreciated by those skilled in the art that the system, apparatus and their respective modules provided by the present invention may be implemented entirely by logic programming method steps, in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc., except for implementing the system, apparatus and their respective modules provided by the present invention in a purely computer readable program code. Therefore, the system, the apparatus, and the respective modules thereof provided by the present invention may be regarded as one hardware component, and the modules included therein for implementing various programs may also be regarded as structures within the hardware component; modules for implementing various functions may also be regarded as being either software programs for implementing the methods or structures within hardware components.
Furthermore, all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program, where the program is stored in a storage medium and includes several instructions for causing a single-chip microcomputer, chip or processor (processor) to perform all or part of the steps in the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In addition, any combination of various embodiments of the present invention may be performed, so long as the concept of the embodiments of the present invention is not violated, and the disclosure of the embodiments of the present invention should also be considered.

Claims (7)

1. The method for detecting the state of the library based on the generation countermeasure network is characterized by comprising the following steps:
step S100, collecting a plurality of pictures in the blank position and the occupied state of the library, and defining the pictures as positive and negative samples respectively;
step S200, training the GANomaly countermeasure network by taking the positive sample as input until the similarity between the positive sample and the reconstruction thereof is ensured to reach the expected target;
step S300, inputting the current real graph of the library into a trained GANomaly countermeasure network, acquiring a reconstructed graph, and then performing post-processing to acquire a comparison value; defining a stock state judgment value according to the difference boundary between the corresponding reconstruction images generated in the trained GANomaly countermeasure network by the positive and negative samples
Figure QLYQS_1
The method comprises the steps of carrying out a first treatment on the surface of the Compare the comparison value with +.>
Figure QLYQS_2
Comparing to determine corresponding library state feedback, wherein the library state determination value +.>
Figure QLYQS_3
Wherein->
Figure QLYQS_4
For the maximum difference value between each positive sample and its reconstructed image, +.>
Figure QLYQS_5
The minimum difference value between each negative sample and its reconstructed image is taken, where alpha is the extent to which the threshold is close to the upper and lower boundaries.
2. The method for detecting a status of a library based on generation of an countermeasure network according to claim 1, wherein in the step S300, the post-processing step of the reconstruction includes: and carrying out difference calculation on the obtained corresponding reconstructed image and the real image, carrying out gray value and self-adaptive threshold binarization processing on the reconstructed image after the difference calculation, and then carrying out summation statistics to obtain a comparison value.
3. The method for detecting a status of a library based on generation of an countermeasure network according to claim 1, wherein in the step S300:
Figure QLYQS_6
Figure QLYQS_7
wherein the method comprises the steps of
Figure QLYQS_8
The method comprises the following steps: positive samples->
Figure QLYQS_12
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure QLYQS_15
To be in charge of->
Figure QLYQS_10
Calculating absolute value of difference>
Figure QLYQS_13
M is the number of positive samples; />
Figure QLYQS_16
The method comprises the following steps: negative examples->
Figure QLYQS_17
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure QLYQS_9
To be in charge of->
Figure QLYQS_11
Calculating absolute value of difference>
Figure QLYQS_14
N is the number of negative samples; gray is Gray value processing, adaThresh self-adaptive threshold value binarization processing, sum is sum calculation.
4. The method for detecting the state of the library based on the generation countermeasure network is characterized by comprising the following steps:
step S100, collecting multiple pictures in the empty and occupied state of the library, respectively defining as positive samplesxNegative sampley
Step S200, constructing a GANomaly countermeasure network, and taking positive samplesxAs input, obtain the reconstructed image corresponding to the positive sample
Figure QLYQS_18
And judgexAnd->
Figure QLYQS_19
To generate alternate training against the network until ensuringxAnd->
Figure QLYQS_20
The similarity achieves the expected goal;
step S300, defining a library state judgment value
Figure QLYQS_21
Wherein->
Figure QLYQS_22
For the maximum difference value between each positive sample and its reconstructed image, +.>
Figure QLYQS_23
A minimum difference value between each negative sample and its reconstructed image;
step S400, the true diagram of the library position to be checkedx1 inputting the trained GANomaly countermeasure network to obtain a reconstruction graph
Figure QLYQS_24
And will->
Figure QLYQS_25
And (3) withx1 difference calculation +.>
Figure QLYQS_26
Then, after gray value treatment and adaptive threshold value binarization treatment are carried out on the x1', summation statistics is carried out to obtain a comparison valueX2;
Step S500, judgingX2 is greater than
Figure QLYQS_27
If yes, the library bit is in an occupied state, otherwise, the library bit is in a vacant state.
5. The method for detecting a status of a library based on generation of an countermeasure network according to claim 4, wherein in the step S300:
Figure QLYQS_28
Figure QLYQS_29
wherein the method comprises the steps of
Figure QLYQS_31
The method comprises the following steps: positive samples->
Figure QLYQS_33
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure QLYQS_36
To be in charge of->
Figure QLYQS_30
Calculating absolute value of difference>
Figure QLYQS_35
M is the number of positive samples; />
Figure QLYQS_38
The method comprises the following steps: negative examples->
Figure QLYQS_39
Inputting trained GANomaly challenge network to obtain its reconstruction +.>
Figure QLYQS_32
To be in charge of->
Figure QLYQS_34
Calculating absolute value of difference>
Figure QLYQS_37
N is the number of negative samples; gray is Gray value processing, adaThresh self-adaptive threshold value binarization processing, sum is sum calculation.
6. A system for detecting a status of a library based on generating an countermeasure network, comprising:
a storage unit for storing a program including the steps of the method for detecting a status of a library based on generation of an countermeasure network according to any one of claims 1 to 5, for the control unit, the processing unit, and for timely scheduling execution;
the control unit is used for controlling the camera to collect a plurality of pictures in the empty position and the occupied state of the library, and the pictures are respectively defined as positive and negative samples;
a processing unit for training the GANomaly challenge network with the positive sample as input until ensuring that the positive sample achieves the intended target with its reconstructed similarity;
the control unit is also used for controlling the camera to acquire a current real map of the library position;
the processing unit inputs the real graph into a trained GANomaly countermeasure network to calculate the difference value between the real graph and the reconstructed graph, performs gray value and self-adaptive threshold value binarization processing, and then performs summation statistics to obtain a comparison value; comparing the comparison value with the library state judgment value
Figure QLYQS_40
And comparing to judge the corresponding library state feedback.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN202310277991.7A 2023-03-21 2023-03-21 Method and system for detecting library bit state based on generation countermeasure network and storage medium Active CN115984285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310277991.7A CN115984285B (en) 2023-03-21 2023-03-21 Method and system for detecting library bit state based on generation countermeasure network and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310277991.7A CN115984285B (en) 2023-03-21 2023-03-21 Method and system for detecting library bit state based on generation countermeasure network and storage medium

Publications (2)

Publication Number Publication Date
CN115984285A CN115984285A (en) 2023-04-18
CN115984285B true CN115984285B (en) 2023-07-04

Family

ID=85960003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310277991.7A Active CN115984285B (en) 2023-03-21 2023-03-21 Method and system for detecting library bit state based on generation countermeasure network and storage medium

Country Status (1)

Country Link
CN (1) CN115984285B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598877A (en) * 2020-05-18 2020-08-28 河北工业大学 Lithium battery surface defect detection method based on generation of countermeasure network
CN113688889A (en) * 2021-08-13 2021-11-23 上海商汤智能科技有限公司 Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109584221B (en) * 2018-11-16 2020-07-28 聚时科技(上海)有限公司 Abnormal image detection method based on supervised generation countermeasure network
CN110245619B (en) * 2019-06-17 2020-11-27 杭州海康睿和物联网技术有限公司 Method and system for judging overrun object on escalator
CN110781780B (en) * 2019-10-11 2023-04-07 浙江大华技术股份有限公司 Vacancy detection method and related device
CN114746908A (en) * 2020-01-23 2022-07-12 瑞典爱立信有限公司 Method and apparatus for image classification
CN112270298B (en) * 2020-11-16 2023-04-25 北京深睿博联科技有限责任公司 Method, device and equipment for identifying road abnormality and computer readable storage medium
CN113688857A (en) * 2021-04-26 2021-11-23 贵州电网有限责任公司 Method for detecting foreign matters in power inspection image based on generation countermeasure network
CN114627468A (en) * 2022-03-16 2022-06-14 青岛理工大学 Wheat field obstacle detection method based on generation of confrontation network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598877A (en) * 2020-05-18 2020-08-28 河北工业大学 Lithium battery surface defect detection method based on generation of countermeasure network
CN113688889A (en) * 2021-08-13 2021-11-23 上海商汤智能科技有限公司 Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium

Also Published As

Publication number Publication date
CN115984285A (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN110135503B (en) Deep learning identification method for parts of assembly robot
CN111814852B (en) Image detection method, image detection device, electronic equipment and computer readable storage medium
Fioravanti et al. A deep artificial immune system to detect weld defects in DWDI radiographic images of petroleum pipes
CN116740728B (en) Dynamic acquisition method and system for wafer code reader
US20230201973A1 (en) System and method for automatic detection of welding tasks
CN111178446A (en) Target classification model optimization method and device based on neural network
CN115982235A (en) Abnormal time sequence data detection method, equipment and medium
JP2021174456A (en) Abnormality determination method and abnormality determination device
CN111950633A (en) Neural network training method, neural network target detection method, neural network training device, neural network target detection device and storage medium
CN113986561A (en) Artificial intelligence task processing method and device, electronic equipment and readable storage medium
KR20200063361A (en) A feature level fusion system and method for stock price forecasting
CN115909157A (en) Machine vision-based identification detection method, device, equipment and medium
CN115793590A (en) Data processing method and platform suitable for system safety operation and maintenance
CN117474918B (en) Abnormality detection method and device, electronic device, and storage medium
CN116992953B (en) Model training method, fault diagnosis method and device
CN102713974A (en) Learning device, identification device, learning identification system and learning identification device
CN115984285B (en) Method and system for detecting library bit state based on generation countermeasure network and storage medium
CN111368865A (en) Method and device for detecting remote sensing image oil storage tank, readable storage medium and equipment
Liu et al. A dual-branch balance saliency model based on discriminative feature for fabric defect detection
CN113392455A (en) House type graph scale detection method and device based on deep learning and electronic equipment
CN111353577B (en) Multi-task-based cascade combination model optimization method and device and terminal equipment
CN116467652A (en) Bearing fault prediction method and system based on convolution noise reduction self-encoder
CN115984671A (en) Model online updating method and device, electronic equipment and readable storage medium
CN113807541B (en) Fairness repair method, system, equipment and storage medium for decision system
CN115359484A (en) Image processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and system for detecting storage location status based on generative adversarial networks

Effective date of registration: 20230828

Granted publication date: 20230704

Pledgee: Bank of Communications Ltd. Shanghai New District Branch

Pledgor: Shanghai Xiangong Intelligent Technology Co.,Ltd.

Registration number: Y2023310000491