MCPcopy Create free account
hub / github.com/CSAILVision/gandissect / segment_batch

Method segment_batch

netdissect/segmenter.py:23–34  ·  view source on GitHub ↗

Returns a multilabel segmentation for the given batch of (RGB [-1...1]) images. Each pixel of the result is a torch.long indicating a predicted class number. Multiple classes can be predicted for the same pixel: output shape is (n, multipred, y, x), where m

(self, tensor_images, downsample=1)

Source from the content-addressed store, hash-verified

21 raise NotImplemented()
22
23 def segment_batch(self, tensor_images, downsample=1):
24 '''
25 Returns a multilabel segmentation for the given batch of (RGB [-1...1])
26 images. Each pixel of the result is a torch.long indicating a
27 predicted class number. Multiple classes can be predicted for
28 the same pixel: output shape is (n, multipred, y, x), where
29 multipred is 3, 5, or 6, for how many different predicted labels can
30 be given for each pixel (depending on whether subdivision is being
31 used). If downsample is specified, then the output y and x dimensions
32 are downsampled from the original image.
33 '''
34 raise NotImplemented()
35
36 def predict_single_class(self, tensor_images, classnum, downsample=1):
37 '''

Callers 9

evaluate_ablationFunction · 0.45
evaluate_interventionsFunction · 0.45
measure_ablationFunction · 0.45
count_segmentsFunction · 0.45
measure_full_ablationFunction · 0.45
count_segmentsFunction · 0.45
run_and_segment_batchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected