KeypointDetector¶
- class flash.image.keypoint_detection.model.KeypointDetector(num_keypoints, num_classes=2, backbone='resnet18_fpn', head='keypoint_rcnn', pretrained=True, optimizer='Adam', lr_scheduler=None, learning_rate=None, predict_kwargs=None, **kwargs)[source]¶
The
KeypointDetector
is aTask
for detecting keypoints in images. For more details, see Keypoint Detection.- Parameters
backbone¶ (
Optional
[str
]) – String indicating the backbone CNN architecture to use.head¶ (
Optional
[str
]) – String indicating the head module to use on top of the backbone.pretrained¶ (
bool
) – Whether the model should be loaded with it’s pretrained weights.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.learning_rate¶ (
Optional
[float
]) – The learning rate to use for training.predict_kwargs¶ (
Optional
[Dict
]) – dictionary containing parameters that will be used during the prediction phase.**kwargs¶ – additional kwargs used for initializing the task
- 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']