## 2 Materials and Methods
### Principle of AP-CNN
According to the convolution receptive field of each pyramid layer, AP-CNN selects the corresponding recommended area with a preset size and aspect ratio for each pyramid layer, applies adaptive NMS to the selected area after calculating the score, reduces redundancy by eliminating overlapping, and maintains visual integrity by combining related areas. Figure 2 shows the workflow of the weak supervision area suggestion generator in the OAM mode detection task. Compared with the soft mechanism of setting the threshold on a feature map, the adaptive region suggestion generator based on the ROI can explicitly show distinguishable regions with high response values in the light intensity distribution of OAM modes. In the third step, for each layer of the pyramid, after selecting the ROI based on the region proposal generator and constructing the region pyramid \(R_{\text{all}}=\{R_{n},R_{n+1},\  
Figure 2: Workflow of the weakly supervised region proposal generator. AP-CNN performs ROI-guided refinement of the feature map at the bottom of the pyramid \(B_{n}\) to improve the classification accuracy in the refinement stage. The first part is the ROI-guided drop block regularization [34], AP-CNN randomly selects an ROI joint \(R_{s}\) from the constructed \(N\)-layer region of the interesting pyramid \(R_{\text{all}}=\{R_{n},R_{n+1},\ldots,R_{n+N-1}\}\) based on the drop block selection probability of each layer \(P_{\text{all}}=\{P_{n},P_{n+1},\ldots,P_{n+N-1}\}\). Then the information region \(r_{s}\) is randomly selected with equal probability \(R_{s}\) and processed to the same sampling rate as the feature map at the bottom of the pyramid \(B_{n}\) to obtain the mask \(M\) by setting the activation of the information region to zero,  
\[M(i,j)=\left\{ \begin{array}{ll}0,&(i,j)\in r_{s}\\ 1,&otherwise\end{array} \right. \tag{4}\]  
Apply the mask \(M\) on the low-level feature map \(B_{n}\) and normalize it to obtain the desired feature map \(D_{n}\),  
\[D_{n}=B_{n}*M*Count(M)/Count\_ones(M) \tag{5}\]  
where \(Count(\ )\) and \(Count\_ones(\ )\) represent the total number of elements and the total number of elements with the value of 1, respectively. The second part is the ROI-guided amplification operation, where the AP-CNN combines all ROI regions at the pyramid level to obtain the minimum enclosing rectangle of the input image in a weakly supervised manner,  
\[ \begin{array}{l}t_{x1}=\min(\forall x\in R_{all}),t_{y1}=\min(\forall y\in R _{all})\\ t_{x2}=\max(\forall x\in R_{all}),t_{y2}=\max(\forall y\in R_{all})\end{array}  \tag{6}\]  
where \(t_{x1}\), \(t_{y1}\) represent the minimum coordinates of the \(x\)- and \(y\)-axes of the merged bounding box and \(t_{x2}\), \(t_{y2}\) represent the maximum coordinates of the \(x\)- and \(y\)-axes of the merged bounding box. The calibration area is then extracted from \(D_{n}\) and enlarged to the same size \(D_{n}\) to obtain the enlarged feature map. Separate classifiers are set up for the original and refinement stages for their respective pyramids, and the final classification results are taken as the average of the predicted values in the original stage and the predicted values in the refinement stage.