Encode images with backbone and decode into a semantic segmentation map of the same size as input.
(self, img, img_metas)
| 57 | return seg_logits |
| 58 | |
| 59 | def encode_decode(self, img, img_metas): |
| 60 | """Encode images with backbone and decode into a semantic segmentation |
| 61 | map of the same size as input.""" |
| 62 | x = self.extract_feat(img) |
| 63 | out = self._decode_head_forward_test(x, img_metas) |
| 64 | out = resize( |
| 65 | input=out, |
| 66 | size=img.shape[2:], |
| 67 | mode='bilinear', |
| 68 | align_corners=self.align_corners) |
| 69 | return out |
| 70 | |
| 71 | def whole_inference(self, img, img_meta, rescale): |
| 72 | """Inference with full image.""" |
no test coverage detected