Atomic force microscope (AFM) based nanomanipulation has been proved to be a possible way to assemble various nanoparticles into complex patterns and devices. To achieve an efficient and full-automatic nanomanipulation, the nanoparticles as well as other features on the substrate must be quickly identified by the computer. This work focuses on an autodetection method for flexible nanowires based on deep learning. The You Only Look Once (YOLO) network is applied to find all movable nanowires in the AFM images. A series of morphology transformation algorithms, including an adaptive threshold edge detection, are applied to refine the skeletons of the nanowires. The bidirectional long short-term memory model with conditional random field layer (BI-LSTM-CRF) is proposed to precisely determine the posture and position of the detected nanowires. Benefiting from these algorithms, our detecting program is able to automatically detect the nanowires of different morphology with nanometer resolution and with over 80% reliability in the testing set. The detecting results are less affected by the image quality, which demonstrates good robustness of this algorithm.