Artificial intelligence has being widely used in the last decade, and the relevant machine learning (ML) topics are also attracted more and more attention. Therefore, in this note, certain ML related algorithms are integrated into two dimensional simultaneous localization and mapping (2D-SLAM) technology in order to give meaningful labels to certain specific objects in the environment. For the 2D-SLAM technology, the main objective is to reconstruct a binary map of the unknown environment. However, 2D-SLAM itself does not have the capability of recognizing scanning objects. To extend the application of 2D-SLAM, in this study, point cloud clustering in conjunction with image preprocessing are used in the ML methods. The proposed method can predict the label of the clustered point clouds. Consequently, the 2D-SLAM could achieve environment awareness applications, for example, forest tree counting use. Based on a given bunch of training data, this research show that the model training accuracy is 99.89%, the validation accuracy is 97.96%, and the testing accuracy could achieve 95.96%; Finally, the predicted accuracy for the given SLAM map can be up to 80%.