MCPcopy Create free account
hub / github.com/devinxzhang/MFuser / encode_decode

Method encode_decode

mmseg/models/segmentors/encoder_decoder.py:78–88  ·  view source on GitHub ↗

Encode images with backbone and decode into a semantic segmentation map of the same size as input.

(self, img, img_metas)

Source from the content-addressed store, hash-verified

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,

Callers 3

forward_dummyMethod · 0.95
slide_inferenceMethod · 0.95
whole_inferenceMethod · 0.95

Calls 3

extract_featMethod · 0.95
resizeFunction · 0.90

Tested by

no test coverage detected