In order to reduce the elemental species produced in the recycling and melting of aluminum scrap and to improve the quality of pure aluminum and aluminum alloys, it is necessary to classify the different grades of aluminum scrap before melting. For the problem of classifying different grades of aluminum scrap, most existing studies are conducted using laser-induced breakdown spectroscopy for identification and classification, which requires a clean and flat metal surface and enormous equipment costs. In this study, we propose a new classification and identification method for different grades of aluminum scrap based on the ResNet18 network model, which improves the identification efficiency and reduces the equipment cost. The objects of this research are three grades of aluminum scrap: 1060, 5052, and 6061. The surface features of the three grades were compared using a machine vision algorithm; three different datasets, using RGB, HSV, and LBP, were built for comparison to find the best training dataset for subsequent datasets, and the hyperparameters of learning rate and batch size were tuned for the ResNet18 model. The results show that there was a differentiation threshold between different grades through the comparison of surface features; the ResNet18 network model trained the three datasets, and the results showed that RGB was the best dataset. With hyperparameter optimization of the ResNet18 model, the accuracy of final classification and recognition could reach 100% and effectively achieve the classification of different grades of aluminum scrap.
The production quality of medical fluid bags is closely related to patient health. In this paper, we used medical fluid bags to detect whether they contained foreign bodies. A visual acquisition system for the fluid bag was built. Vignetting correction was performed on the acquired images, and a foreign body recognition detection method based on an improved Faster R-CNN model was proposed. The feature extraction network of Faster R-CNN was discussed and studied regarding the characteristics of small foreign objects in liquid bags, and the ResNet152 network replaced the VGG16 network; furthermore, the feature fusion and attention mechanism were added to the feature extraction, and CIoU replaced the IoU loss function; the anchor box parameters were optimized and improved using the K-means clustering algorithm, and ROI Align replaced the ROI Pooling module. The improved network in this paper was compared with the Faster R-CNN model, which is a modification of feature extraction networks, such as ResNet50, ResNet101, and ResNet152, and the original VGG16 feature extraction network. The results show that the ResNet152 network had the best feature extraction effect among the feature extraction networks, and other optimizations were performed in this paper based on the use of ResNet152. In the precision−recall curve, the network in this paper showed the best effect. The improved algorithm presented in this paper was significantly improved compared with the original algorithm, with a detection accuracy of 97% and an average accuracy improvement of 7.8% in foreign object recognition.