Crude oil leakage is a security issue that needs to be avoided in many production areas such as oil fields and substations. However, crude oil leakage image data is often difficult to obtain due to security and privacy issues in the working area. And shadow interference is also a challenge for oil leakage detection tasks. This paper proposes a crude oil leakage detection method based on the DA‐SR framework. The framework consists of two parts: the data augmentation module and shadow removal module. High‐quality synthetic oil leakage images are generated using the cycle‐consistent adversarial networks (CycleGAN), and further process the synthetic images by a T‐CutMix sample processing method. To solve the problem of shadow interference, this paper uses the FlocalLoss function to calculate the confidence loss based on the YOLOv4 detection network and a hard sample retraining (HSR) algorithm to enhance the images with shadows. The experiments demonstrate that the combination of original and synthetic images when training the model can improve the performance of oil leakage detection. Finally, it is also shown that the detector built from the framework can effectively reduce the false detection of shadows.