unitorch.cli.models.mask2former¤
Mask2FormerProcessor¤
Tip
core/process/mask2former is the section for configuration of Mask2FormerProcessor.
Bases: Mask2FormerProcessor
Mask2Former processor for image segmentation tasks.
Source code in src/unitorch/cli/models/mask2former/processing.py
21 22 23 24 25 26 27 | |
from_config
classmethod
¤
from_config(config, **kwargs)
Source code in src/unitorch/cli/models/mask2former/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/mask2former/processing.py
50 51 52 53 54 55 56 57 58 | |
Mask2FormerForSegmentation¤
Tip
core/model/segmentation/mask2former is the section for configuration of Mask2FormerForSegmentation.
Bases: Mask2FormerForSegmentation
Source code in src/unitorch/cli/models/mask2former/modeling.py
25 26 27 28 29 30 31 | |
from_config
classmethod
¤
from_config(config, **kwargs)
Source code in src/unitorch/cli/models/mask2former/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/mask2former/modeling.py
61 62 63 64 65 | |
segment ¤
segment(pixel_values: Tensor)
Source code in src/unitorch/cli/models/mask2former/modeling.py
67 68 69 70 71 72 73 74 75 76 77 78 79 | |