Nowadays, much effort has been devoted to image recognition technology, while the application of image recognition technology to the self-service checkout system of retail goods is still a subject with little research and great application value. For the problems of low efficiency and high cost of manual checkout in supermarkets, this study proposes to apply deep learning to commodity picture recognition. Due to the small difference between classes and the large difference within classes of commodity images, commodity image recognition is modeled as a fine-grained commodity image classification task, and the NTS-Net model is used to classify commodity images. The algorithm automatically extracts the partial features of commodity images and classifies them by combining partial features with the features of the whole commodity images. Training is conducted in a self-built commodity dataset, and tests the recognition effect of the model on commodity images from different angles and environments. This study show that the algorithm can effectively and accurately identify commodities, and the model has a good performance in identifying the side of commodities and the pictures of commodities with low brightness.