Background Nowadays, robots have been widely used in handling rigid objects, but research on deformable objects like fabrics is still in its early stages. This is because fabrics possess infinite degrees of freedom and their state modeling is highly complex, making robot manipulation of fabrics challenging due to the occurrence of wrinkles and deformations during the operation. The detection and recognition of fabric deformations such as wrinkles and fabric manipulation features like corners are of great significance in enhancing a robot's capability to handle deformable objects. Methods In response to the issue of fabric wrinkles in various scenarios, we propose a real-time fabric wrinkle and corner detection system based on the YOLOv5 detection algorithm. Additionally, we implement a fabric flattening operation on a hardware platform using the detected wrinkle and corner information. Results We collected and created a dataset of fabric deformation features and trained a detection model, achieving a detection accuracy of over 90%. The model was deployed in the fabric wrinkle detection system, using a heuristic operation strategy of flattening the fabric from the four corners. As a result, the robot successfully performed the flattening operation on wrinkled fabric. Conclusions The application of the YOLOv5 algorithm enables effective detection of fabric wrinkles and corner points. Based on the detection information and using the quadrilateral flattening operation method, the robotic system achieves fabric flattening operations.