---
tags: 生物辨識
---
# Learning Meta Model for Zero- and Few-shot Face Anti-spoofing
- 場景的不可預測性
- 新版攻擊無法收集到足夠樣本
## datasets

## Contributions
- zero-shot & few-shot + Face Anti-spoofing 開山始祖
- Adaptive Innerupdate Meta Face Anti-spoofing (AIM-FAS)
- propose three novel zero- and few-shot FAS benchmarks

## Few-shot and Zero-shot Learning


> N:Meta-testing 的過程中用的是多少類樣本
> K:Meta-testing 的過程中每一類有多少個樣本
## Task generation
### step 1 (training)
Sample one fine-grained living category $L_i$ and one spoofing category $S_m$
> predefined categories
### step 2
Sample $M − K$ faces from each of $L_i$ and $S_m$
### step 3
Resample one fine-grained living category $L_j$ and one spoofing category $S_n$
> new emerged categories
### step 4
Sample $K + Q$ faces from each of $L_j$ and $S_n$
> $K$ 為 support set, $Q$ 為 query set.
### step 5
query set with $2Q$ faces from $L_j$ and $S_n$
support set with the other $2 \times (M − K) + 2 \times K = 2M$ faces
> support set 為一個task的traning set,query set為一個task的testing set

- $K=0$ (zero-shot)
- the meta-learner learns from $L_i$ and $S_m$, and predict faces from $L_j$ and $S_n$
- $K>0$ (few-shot)
- the meta-learner learns from $L_i$, $L_j$, $S_m$ and $S_n$, and predict faces from $L_j$ and $S_n$
## AIM-FAS

### Inner-update stage (support set)
$$
L_{s(\tau_i)}(\theta_i^{(j)})\leftarrow \frac{1}{\|s(\tau_i)\|}\sum_{x,y\in s(\tau_i)}l(f_{\theta_i^{(j)}}(x),y),\\
\theta^{(j+1)}_i \leftarrow \theta^{(j)}_i-\alpha \cdot\gamma^j \cdot \nabla_{\theta^{(j)}_i}L_{s(\tau_i)}(\theta_i^{(j)})
$$
where $\tau_i$ is a randomly selected zero- or few-shot FAS training task, and $\theta^{(j)}_i$ is the meta-learner's weight after $j$ innerupdate steps.
> Scalar parameter $\alpha$ and $\gamma$ are the keys to achieve AIU. Both of them are `trainable`
### Optimizing stage (query set)
$$
L_{q(\tau_i)}(\theta_i^{(u)})\leftarrow \frac{1}{\|s(\tau_i)\|}\sum_{x,y\in s(\tau_i)}l(f_{\theta_i^{(u)}}(x),y), \\
(\theta, \alpha, \gamma)\leftarrow (\theta, \alpha, \gamma)-\beta \cdot \nabla_{(\theta,\alpha,\gamma)}L_{q(\tau_i)}(\theta_i^{(u)})
$$

> learn easy fine-tuning weight $\theta$ and propriety $\alpha$ and $\gamma$.

## 連結
[GITHUB](https://github.com/qyxqyx/AIM_FAS)
[Paper連結](https://arxiv.org/pdf/1904.12490.pdf)