The invention provides a condition-guided adversarial generation test method and
system for a deep neural network, and the method comprises the steps: collecting a needed
data set and a correspondinglabel, carrying out the grouping of the needed
data set and the corresponding
label, obtaining a needed
batch processing pool data set, selecting a seed set through employing a
heuristic algorithm, and carrying out the condition-guided adversarial generation
training set. The target of the test
generation process is to maximize the network coverage rate of the
test suite, obtain a generated picture set and input the picture set into a corresponding network as a
training set for testing, and if the generated picture set enables the coverage rate of the original network to be improved, the pictures are added into a
batch processing pool as a batch. According to the method, the condition-guided adversarial generation network is used, the labels of the pictures are used as conditions to generate the pictures, and the generation scale can be reduced. The
test case is confronted and generated under the guidance of the coverage rate, the
neuron coverage rate of a given network or
system can be maximized, and the precision of the deep neural network to be tested is improved.