The image-based person re-identification problem can be transformed into a similar image retrieval problem. At present, most of the current identity-based methods do not consider pedestrian attributes. Moreover, many methods that consider pedestrian attributes and identities fail to fully simulate the relationship between pedestrian attributes and identities. In this article, we propose a new image-based person re-identification method by attribute-aware. Based on the introduction of instance batch normalization, the non-local module based on attention is used to transform the ResNet network structure to improve the feature extraction performance. After using generalized mean pooling for feature aggregation, the identity-based and attribute-based double stream network modules pay attention to the relationship between identities and pedetrian features, and the relationship between attributes and pedestrian features, so as to fully activate the relationship between pedestrian attributes and identities. Experiments are carried out on two classic person re-identification by attribute dataset Market-1501 and DukeMTMC-reID, and the results prove the effectiveness of the method. The method proposed in this paper has achieved the best performance on some evaluation metrics.