Automatic localization of the picking point for table grape is the key to achieving intelligent harvesting. Aiming at the problem, the You Only Look Once version 8 nano-Deformable Convolutional Networks-Wise Intersection over Union-Fourth Detection Layer (YOLO v8n-DWF) network was designed for the table grape picking robot to realize the detection of table grapes and the localization of picking points. The Deformable Convolutional Networks (DCN) model was used to enhance the robustness of table grape detection and improve the detection precision of grape stems. To improve the detection precision of table grape and stem and reduce the impact of low-quality data on model generalization ability, Wise-Intersection over Union version 3 (WIou v3) was applied. In addition, aiming at the problem of difficultly identifying due to small target and low pixel of table grape stem, a fourth detection layer for small target detection was added to improve the recognition and detection ability of the network model for table grape stem. Further, a more accurate geometric localization method of picking points was proposed to achieve fast picking of table grapes. Finally, the results showed that the detection precision, recall, mean Average Precision50 (mAP50) and mean Average Precision50-95 (mAP50-95) of the YOLO v8n-DWF model was 97.9%, 95.3%, 97.6% and 85.4%, respectively. In addition, the success rate of the geometric method based on the results of identification for YOLO v8n-DWF was 88.24%, and the average picking success rate of table grapes in field experiments was 87.40%. It can fully meet the requirements of intelligent picking of table grapes.