View full-text article in PMC Sensors (Basel). 2021 Jul 10;21(14):4720. doi: 10.3390/s21144720 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm1. Training procedure of the SPA model Input: Original input frame clips xg Output: θ of SPA model 1: Initialize xp, θ0, t=0 2: fglobal=Feature_extractor(xg) 3: while k≤Kdo 4: while t≤Tdo 5: fsaliency=Feature_extractor(xtp) 6: Get logits through fglobal, fsaliency 7: str=cat(fglobal, fsaliency,logits) 8: Get {amt} from Policy π(at|str;θ) 9: Crop xg by {amt} getting xt+1p 10: rt=reward(xg,xtp,xt+1p) 11: Estimate advantage A^t 12: t=t+1 13: end while 14: while j≤Nbatchdo 15: Calculate ℒθkCLIP(θkj) 16: Update θkj with gradient ∇ℒθkCLIP(θkj) 17: end while 18: k=k+1 19: end while