Due to the visual angle of fixed camera, some areas of illegal parking can't be captured. In order to solve the question, this paper utilized a camera on UAV(unmanned aerial vehicle) to capture datasets in a set area. In the detection of illegal parking area, we mainly focus on detecting the illegal parking areas and legal parking areas. This paper utilized semantic segmentation(deeplabv3+) and object detection (yolov51) to solve this problem. The former algorithm combines spatial pyramid pooling module and encode-decoder structure, resulting in a stronger and faster network. While the latter algorithm replaces SPP(Spatial Pyramid Pooling) structure with SPPF(Spatial Pyramid Pooling-Fast) structure, leading to a higher computing efficiency. We trained the two models on our datasets, achieving a significant performance without any post-processing.