## 3 Methods
### Machine Vision for Shape-Driven Conveyor Belt Material Recognition  
This research employed a lightweight deep learning model called YOLOv11n-seg [71] to recognize and classify materials moving on a conveyor belt based on their shape. Two primary classes were defined for object identification: sharp and smooth. These classes were not defined based on the material type but rather on the geometric characteristics of the object's surface. Specifically, the sharp class refers to objects with angular sides, pointed edges, and broken or jagged contours. Such objects are often the result of poor shredding processes or mechanical damage. In contrast, the smooth class includes objects with rounded edges, continuous curves, and elliptical or circular shapes, which typically indicate the proper functioning of grinders or cutters in recycling lines. During the training phase, these class definitions were implemented manually with high precision using the Roboflow platform. Each object within the dataset was labeled with accurate segmentation masks based on human visual judgment and relevant engineering criteria. This careful annotation process enabled the model to learn the distinction between sharp and smooth objects based on their visual and geometric features. Although the YOLOv11n-seg model could perform accurate segmentation independently, an additional geometric post-processing step was introduced after inference to enhance the explainability of the results and reduce misclassifications--especially for ambiguous cases. The predicted segmentation masks were processed using contour extraction functions from the OpenCV library in this step. For each detected region, the number of sharp corners was calculated using angular approximation techniques, such as cv2.approxPolyDP. According to predefined rules, if a segmented region contained more than three acute angles or jagged edges, it was reclassified as sharp during the post-processing stage, even if the model had initially predicted it as smooth. This strategy proved particularly effective for low-confidence predictions (e.g., those with confidence scores below 0.5), thus helping reduce false positives. A key factor in the success of this hybrid approach was the relatively low variability of materials in the current dataset, which primarily consisted of three types of visually and texturally similar substances. This consistency made it easier for the segmentation model to generalize and the geometric algorithm to make reliable decisions. However, for future projects involving more diverse materials--such as transparent plastics, aluminum, glass, or colored fragments--enhancements to the post-processing module may be necessary. Potential improvements could include pixel density analysis for each class, confidence-weighted classification logic, or network attention maps to interpret internal feature patterns better. The shape of these particles directly impacts the BECS' performance. Sharp fragments disrupt the even distribution of magnetic fields and reduce separation accuracy, whereas smooth particles support stable eddy currents and lead to more precise separation. A monochrome line scan camera was installed above the conveyor to ensure reliable detection under high-speed industrial conditions. This type of camera can capture high-resolution images at high conveyor speeds. Although the images are grayscale, the edge details remain sufficiently precise for accurate shape classification.  
The YOLOv11n-seg model provides both object detection and segmentation capabilities. It was trained using a mixed dataset of RGB and grayscale images collected from the line scan camera. Five hundred and nineteen labeled images containing 1105 object instances (461 sharp and 644 smooth) were used for training. The model was trained over 100 epochs and showed successful convergence.