deeptrees.model
The following flavors of models inputs are possible with DeepTrees: - 4-channel (RGBi). - 5-channel (RGBi+NDVI). See sample config –> https://codebase.helmholtz.cloud/taimur.khan/DeepTrees/-/blob/main/config/train/train_halle.yaml - 7-channel (RGBi+NDVI+GCI+Hue). See sample config –> https://codebase.helmholtz.cloud/taimur.khan/DeepTrees/-/blob/main/config/train/train_halle_7ch.yaml
deeptrees.model.deeptrees_model
deeptrees.model.distance_model
deeptrees.model.inference_model
- class deeptrees.model.inference_model.InferenceModel(model)[source]
Bases:
ModuleJust a wrapper to apply the sigmoid activation to mask and outlines during inference..
- __init__(model)[source]
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)[source]
Perform a forward pass through the model. :type x: torch.Tensor :param x: Input tensor to the model. :type x: torch.Tensor
- Returns:
If the model output contains two elements, returns a tuple (y, metric) where y is the output tensor with sigmoid activation applied to the first two columns, and metric is the second element of the output. If the model output contains only one element, returns y with sigmoid activation applied to the first two columns.
- Return type:
torch.Tensor or tuple