| Algorithm 2: Adversarial Process of Parameter Agent Network (PAN) and Recognizer |
| Input: input image P, selected region A |
| Output: optimized |
| 1: sample transformation state from predicted distribution: |
| 2: generate random transformation states from to state , based on state |
| 3: all states including contain anchor points |
| 4: obtain augmented images from and based on states to state : |
| 5: The following i all represent 1 to 11 |
| 6: |
| 7: identify images: |
| 8: if then |
| 9: test distance between and |
| 10: if then |
| 11: = update with |
| 12: end if |
| 13: else |
| 14: = |
| 15: end if |