The invention provides an ancient poetry generation method based on image content. The method comprises the steps that 1, target detection is conducted on image content objects based on a single-time multiple-frame target detection frame, and the names of the objects are obtained; 2, word separation is conducted on a set number of Tang poetries by using the Chinese lexical analysis tool, and a glossary is obtained, feature learning is conducted on each word in the glossary by using the word2vec tool, and each word is mapped to a vector space; 3, the obtained object names are inputted into the word2vec tool, a mapped vector of the object names is obtained, and the cosine similarity between the mapped vector and an ancient poetry vector is calculated, after a threshold is set, part of the object names selected are used as the corresponding subject term of the objects; 4, the subject term is utilized to expand the keywords, after the keywords are inputted and the Tang poetries are learned, a RNN model is obtained, and the ancient poetries are generated. According to the ancient poetry generation method, the method of target detection and the method of cyclic neural network algorithm are combined to generate ancient poetries, and the correlation between ancient poetries and image content is strong, and better coherence is achieved.