Encode images with backbone and decode into a semantic segmentation map of the same size as input.
(self, img, img_metas)
| 76 | return x |
| 77 | |
| 78 | def encode_decode(self, img, img_metas): |
| 79 | """Encode images with backbone and decode into a semantic segmentation |
| 80 | map of the same size as input.""" |
| 81 | x = self.extract_feat(img) |
| 82 | out = self._decode_head_forward_test(x, img_metas) |
| 83 | out = resize( |
| 84 | input=out, |
| 85 | size=img.shape[2:], |
| 86 | mode='bilinear', |
| 87 | align_corners=self.align_corners) |
| 88 | return out |
| 89 | |
| 90 | def _decode_head_forward_train(self, |
| 91 | x, |
no test coverage detected