1. Theorectical Background
Comment: 이 수식의 의미는, '해당 그리드 셀에 오브젝트가 존재한다면' 그 오브젝트의 클래스가 $Class$ 일 확률입니다.
Comment: ground truth bounding box와의 IoU가 낮더라도 오브젝트가 존재할 확률이 높거나 오브젝트가 존재할 확률이 높더라도 ground truth bounding box와의 IoU가 높으면 confidence는 높은 값을 가집니다.
$$P(Object) \cdot IOU^{gt}{pred}$$
$$\lambda {coord} \sum^{S^{2}}{i = 0} \sum^{B} {j = 0} \mathbb{1}^{obj}{ij} \bigg[(x {i} - \hat{x}{i})^{2} + (y {i} - \hat{y}{i})^{2} + (\sqrt{w {i}} - \sqrt{\hat{w}{i}})^{2} + (\sqrt{h {i}} - \sqrt{\hat{h}{i}})^{2} + (C {i} - \hat{C}{i})^{2}\bigg]
\+ \sum^{S^{2}} {i = 0} \mathbb{1}^{obj}{i} \sum {c \in classes} \big(p_{i}(c) - \hat{p}{i}(c)\big)^{2}
\+ \lambda {noobj} \sum^{S^{2}}{i = 0} \sum^{B} {j = 0} 1^{noobj}{ij} \big(C {i} - \hat{C}_{i}\big)^{2}$$
$\mathbb{1}^{obj}_{i}$ : Denotes if object appears in cell $i$
$\mathbb{1}^{obj}_{ij}$ : Denotes that the $j$ th bounding box predictor in cell $i$ is "responsible" for that prediction.
$$\lambda_{coord} \sum^{S^{2}}_{i = 0} \sum^{B}_{j = 0} \mathbb{1}^{obj}_{ij} \bigg[ (x_{i} - \hat{x}_{i})^{2} + (y_{i} - \hat{y}_{i})^{2} \bigg]$$
$$\lambda_{coord} \sum^{S^{2}}_{i = 0} \sum^{B}_{j = 0} \mathbb{1}^{obj}_{ij} \bigg[ (\sqrt{w_{i}} - \sqrt{\hat{w}_{i}})^{2} + (\sqrt{h_{i}} - \sqrt{\hat{h}_{i}})^{2} \bigg]$$
$$\sum^{S^{2}}_{i = 0} \sum^{B}_{j = 0} \mathbb{1}^{obj}_{ij} (C_{i} - \hat{C}_{i})^{2}$$
$$\lambda_{noobj} \sum^{S^{2}}_{i = 0} \sum^{B}_{j = 0} 1^{noobj}_{ij} \big( C_{i} - \hat{C}_{i} \big)^{2}$$
$$\sum^{S^{2}}_{i = 0} \mathbb{1}^{obj}_{i} \sum_{c \in classes} \big(p_{i}(c) - \hat{p}_{i}(c)\big)^{2}$$