In this paper, a novel two-stream convolutional neural network based on gradient image is performed to effectively classify and identify aluminum profiles defects for the first time. Recent feature fusion methods based on two-stream network prove promising performance for defects classification and recognition. In this paper, we use data enhancement methods to obtain a large number of samples to prevent the over fitting phenomenon in deep learning. The image gradient is calculated with the Sobel operator, and normalized to transform the data between zero and one under the same dimension. We design a two-stream convolutional neural network model adopting Wavelet transform fusion strategy to realize feature fusion on the ReLU6 layer, which uses the original RGB image of aluminum profile and the gradient image corresponding to the original RGB image as inputs to extract features through two sub-networks and fuses features on a concatenate layer to be input into SVM classifier for classification and recognition. Using Bayesian Optimization function and computing the cross-validation classification error to optimize the hyperparameters to choose the best performance configuration is performed. A series of experimental data, which include accuracy and estimated generalized classification errors of single-stream and two-stream networks with different feature fusion strategies on different fusion layers, are conducted and show that the current model has good convergence, accuracy, stability and generalization. On this basis, this paper also proposes a series of innovative methods for the future research of other defects. INDEX TERMS Aluminum profile surface defects, two-stream network, gradient image, convolutional neural network, SVM.