The invention provides a method for training a model for generating natural languages for describing image contents, and a method for generating natural languages for describing image contents by adoption of the model. The training method comprises the following steps of: A1) taking global features and local features of images in an image training set as inputs of an attention mechanism, so as toobtain a fusion result comprising the global features and the local features at the same time; and A2) taking the fusion result and a word training set as inputs of a long short-term memory network, and training the attention mechanism and the long short-term memory network by utilizing a loss function so as to obtain a weight of the attention mechanism and a weight of the long short-term memory network, wherein the loss function is a function of a condition probability of the previous word or the ith word of a plurality of words in the content of a known image and a natural sentence for describing the image content, and i is equal to 1,to imax.
Method and system for generating natural languages for describing image contents