Utils
utils
¶
Classes¶
KorniaTransformWrapper
¶
Ensure that the dimension of a single sample is not inflated, as is the case with using Kornia directly. E.g. as sample intended to be (1, 256, 256) -> (1, 1, 256, 256).
Source code in tree_detection_framework/preprocessing/utils.py
Functions:¶
create_box_blur_transform(kernel_size_pixels)
¶
Create a box blurring transform for preprocessing samples
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kernel_size_pixels
|
int
|
The number of pixels in the filter. Should be odd. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the kernel size is not odd |
Returns:
| Name | Type | Description |
|---|---|---|
function |
A function which can transfrom a data dictionary for a batch of samples |
Source code in tree_detection_framework/preprocessing/utils.py
create_guassian_blur_transform(kernel_sigma_pixels)
¶
Create a gaussian blurring transform for preprocessing samples
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kernel_sigma_pixels
|
float
|
The standard diviation of the gaussian kernel |
required |
Returns:
| Name | Type | Description |
|---|---|---|
function |
A function which can transfrom a data dictionary for a batch of samples |