PointCloudSegmentation¶
- class flash.pointcloud.segmentation.model.PointCloudSegmentation(num_classes, backbone='RandLANet', backbone_kwargs=None, head=None, loss_fn=torch.nn.functional.cross_entropy, optimizer='Adam', lr_scheduler=None, metrics=None, learning_rate=None, multi_label=False)[source]¶
The
PointCloudClassifier
is aClassificationTask
that classifies pointcloud data.- Parameters
num_classes¶ (
int
) – The number of classes (outputs) for thisTask
.backbone¶ (
Union
[str
,Tuple
[Module
,int
]]) – The backbone name (or a tuple ofnn.Module
, output size) to use.backbone_kwargs¶ (
Optional
[Dict
]) – Any additional kwargs to pass to the backbone constructor.head¶ (
Optional
[Module
]) – a nn.Module to use on top of the backbone. The output dimension should match the num_classes argument. If not set will default to a single linear layer.loss_fn¶ (
TypeVar
(LOSS_FN_TYPE
,Callable
,Mapping
,Sequence
,None
)) – The loss function to use. IfNone
, a default will be selected by theClassificationTask
depending on themulti_label
argument.optimizer¶ (
TypeVar
(OPTIMIZER_TYPE
,str
,Callable
,Tuple
[str
,Dict
[str
,Any
]],None
)) – Optimizer to use for training.lr_scheduler¶ (
Optional
[TypeVar
(LR_SCHEDULER_TYPE
,str
,Callable
,Tuple
[str
,Dict
[str
,Any
]],Tuple
[str
,Dict
[str
,Any
],Dict
[str
,Any
]],None
)]) – The LR scheduler to use during training.metrics¶ (
Optional
[TypeVar
(METRICS_TYPE
,Metric
,Mapping
,Sequence
,None
)]) – Any metrics to use with thisTask
. IfNone
, a default will be selected by theClassificationTask
depending on themulti_label
argument.learning_rate¶ (
Optional
[float
]) – The learning rate for the optimizer.multi_label¶ (
bool
) – IfTrue
, this will be treated as a multi-label classification problem.
- classmethod available_finetuning_strategies(cls)¶
Returns a list containing the keys of the available Finetuning Strategies.
- classmethod available_lr_schedulers(cls)¶
Returns a list containing the keys of the available LR schedulers.
- classmethod available_optimizers(cls)¶
Returns a list containing the keys of the available Optimizers.
- classmethod available_outputs(cls)¶
Returns the list of available outputs (that can be used during prediction or serving) for this
Task
.Examples
..testsetup:
>>> from flash import Task
>>> print(Task.available_outputs()) ['preds', 'raw']