To address the problem that metal reflection, ambient illumination and different defect size affect the defect detection accuracy in metal defect detection, an AINDANE-Faster R-CNN based metal flat detection method under complex illumination conditions is proposed, which firstly adopts a adaptive and integrated neighborhood dependent approach for nonlinear enhancement(AINDANE) to preprocess the defect images and improve the image brightness to highlight the detail features such as color,profile and texture of defects, and then ResNet50 network is utilized as the defect semantic feature extraction network for the Two-stage Faster R-CNN model. In addition, this paper also constructs a dataset of three defects of metal aluminum plate under low light and uneven light conditions, such as scratches, oil stains and pits, and the method achieves a mean average accuracy of 92.01% on the defect dataset. Compared to existing one-stage surface defect detection methods, the algorithm in this paper is optimal.