## 3 Materials and Methods
### PET Identification Confidence Index and PBIA
#### 3.2.1. PIC Index Computing as Part of the PBIA  
The PBIA is based on the _PIC_ index, which is computed using two key factors that collectively determine whether an object is classified as a PET bottle, as follows:  
* The first factor (_RecFactor_) corresponds to the AI-based object recognition service, assessing the system's ability to identify the object as a PET accurately;
* The second factor (_CorFactor_) involves the actual weight of the object measured by the system. Each of these factors is assigned a specific percentage in the overall calculation of the _PIC_ index. The _RecFactor_, representing the accuracy of AI-based object recognition, is assigned the highest weight at 60%, due to its effectiveness in identifying PET bottles. The _CorFactor_, representing the correlation between the recognized object's weight and actual weight, is weighted at 40%. This factor helps to detect inconsistencies between the object's expected and actual physical characteristics. The two percentages were determined after conducting many tests, which are presented in the Results Section. Equation (1) presents the method for calculating the _PIC_ index. \[PIC=\left(60\%\times\frac{Rec^{\gamma}_{Factor}}{100}+40\%\times Cor^{\delta} _{Factor}\right)\times\left(1+\frac{\beta\times Var(W)}{\mu_{W}}\right)^{k} \times 100\left[\%\right] \tag{1}\]  
where  
_RecFactor_ is the recognition percentage provided by the Microsoft Azure Custom Vision service; \(\gamma\) and \(\delta\) are the exponential weighting coefficients that adjust the impact of each factor; \(\beta\) is a coefficient that adjusts the impact of weight variations;_Var(W)_ is the variance of the measured weights;  
\(\mu_{W}\) is the average weight from the dataset;  
\(K\)_is_ a scaling coefficient for the adjustment factor;  
\(Cor_{Factor}\) is a binary function, computed using Equation (2). The parameters \(\gamma\) and \(\delta\) were introduced to calibrate the system according to the flexible operating environment conditions. The parameter \(\gamma\) controls the level of recognition of the AI service in relation to the final trust level. The parameter \(\delta\) adjusts the contribution of weight variations in the final evaluation. This parameter is responsible for penalizing major deviations from the standard weight, even if AI recognition indicates a high probability that the object is a PET bottle. The use of an exponential function has the advantage of enabling a fine level of discrimination between objects that deviate slightly from the standard weight. The \(Rec_{Factor}\) is expressed as a percentage because the Azure Custom Vision service provides a degree of identification, indicating how confidently an object is labeled. To further ensure the accuracy of PET identification, the system measures the object's weight and compares it against the standard weights of common PET bottle sizes. The \(Cor_{Factor}\) is determined as follows:  
1. The system measures the object's weight after it has been inserted into the bin;
2. The measured weight is then compared to a predefined list of standard PET bottle weights, including 20 and 30 g (corresponding to empty 250 mL, 500 mL, and 750 mL PET bottles). For this component, the initial tests are conducted using standard values of 20 g and 30 g. However, this approach can be extended to accommodate additional weight categories in future system iterations. If the measured weight falls within the range of \(\pm\)2 g of these standard values, the \(Cor_{Factor}\) is set to 1. Otherwise, it is set to 0. The tolerance of \(\pm\)2 g is introduced to account for the possibility that the PET bottle might still contain a few residual drops of liquid. The values were determined after measurements were taken for specific cases, wherein a bottle contained a small amount of liquid. This slight variation in weight is not significant enough to interfere with the sorting process and, thus, is considered acceptable for classification purposes. The \(Cor_{Factor}\) is a function computed with Equation (2).