unitorch.cli.models.segformer¤
SegformerProcessor¤
Tip
core/process/segformer is the section for configuration of SegformerProcessor.
Bases: SegformerProcessor
Segformer processor for image segmentation tasks.
Source code in src/unitorch/cli/models/segformer/processing.py
21 22 23 24 25 26 27 | |
from_config
classmethod
¤
from_config(config, **kwargs)
Source code in src/unitorch/cli/models/segformer/processing.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
_segmentation_inputs ¤
_segmentation_inputs(image: Union[Image, str])
Source code in src/unitorch/cli/models/segformer/processing.py
50 51 52 53 54 55 56 57 58 | |
SegformerForSegmentation¤
Tip
core/model/segmentation/segformer is the section for configuration of SegformerForSegmentation.
Bases: SegformerForSegmentation
Source code in src/unitorch/cli/models/segformer/modeling.py
25 26 27 28 29 30 31 | |
from_config
classmethod
¤
from_config(config, **kwargs)
Source code in src/unitorch/cli/models/segformer/modeling.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
forward ¤
forward()
Source code in src/unitorch/cli/models/segformer/modeling.py
61 62 63 64 65 | |
segment ¤
segment(pixel_values: Tensor)
Source code in src/unitorch/cli/models/segformer/modeling.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |