pyVHR.resources.faceparsing package¶
Subpackages¶
- pyVHR.resources.faceparsing.modules package
- Submodules
- pyVHR.resources.faceparsing.modules.bn module
- pyVHR.resources.faceparsing.modules.deeplab module
- pyVHR.resources.faceparsing.modules.dense module
- pyVHR.resources.faceparsing.modules.functions module
- pyVHR.resources.faceparsing.modules.misc module
- pyVHR.resources.faceparsing.modules.residual module
- Module contents
Submodules¶
pyVHR.resources.faceparsing.evaluate module¶
pyVHR.resources.faceparsing.face_dataset module¶
pyVHR.resources.faceparsing.logger module¶
pyVHR.resources.faceparsing.loss module¶
- class pyVHR.resources.faceparsing.loss.OhemCELoss(thresh, n_min, ignore_lb=255, *args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(logits, labels)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.loss.SoftmaxFocalLoss(gamma, ignore_lb=255, *args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(logits, labels)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
pyVHR.resources.faceparsing.makeup module¶
pyVHR.resources.faceparsing.model module¶
- class pyVHR.resources.faceparsing.model.AttentionRefinementModule(in_chan, out_chan, *args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.model.BiSeNet(n_classes, *args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.model.BiSeNetOutput(in_chan, mid_chan, n_classes, *args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.model.ContextPath(*args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.model.ConvBNReLU(in_chan, out_chan, ks=3, stride=1, padding=1, *args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.model.FeatureFusionModule(in_chan, out_chan, *args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(fsp, fcp)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.model.SpatialPath(*args, **kwargs)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
pyVHR.resources.faceparsing.optimizer module¶
pyVHR.resources.faceparsing.prepropess_data module¶
pyVHR.resources.faceparsing.resnet module¶
- class pyVHR.resources.faceparsing.resnet.BasicBlock(in_chan, out_chan, stride=1)[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- class pyVHR.resources.faceparsing.resnet.Resnet18[source]¶
Bases:
torch.nn.modules.module.Module
- forward(x)[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
pyVHR.resources.faceparsing.test module¶
pyVHR.resources.faceparsing.train module¶
pyVHR.resources.faceparsing.transform module¶
- class pyVHR.resources.faceparsing.transform.ColorJitter(brightness=None, contrast=None, saturation=None, *args, **kwargs)[source]¶
Bases:
object
- class pyVHR.resources.faceparsing.transform.HorizontalFlip(p=0.5, *args, **kwargs)[source]¶
Bases:
object