Graph neural networks are widely used in image recognition. This paper introduces a two-node graph neural network DouN-GNN model based on a traditional graph neural network. By constructing two nodes, the features in the sample image that are difficult to extract by the shallow embedding network are extracted so that the network model can incorporate more multi-dimensional information about the sample image, thus enhancing image recognition accuracy. Aiming at the problem of the overall performance of the DouN-GNN model not reaching the ideal state, this paper adds three optimization modules to improve the DouN-GNN model and form the IGNN model. The optimized IGNN model is trained, tested, and applied to real-world scenarios such as agricultural weed recognition, natural resource enforcement, and video surveillance to explore the performance of the IGNN image recognition model constructed in this paper in real-world applications. The model achieves the highest accuracy of 98.39% in agricultural weed image recognition, and the classification accuracy for weeds is also high. In natural resources law enforcement and video surveillance, the model in this paper performs better than other image recognition models and can effectively meet the requirements of image recognition in practical application scenarios.