LoG with PyTorch¶
-
src.pytorch_log.benchmark_log(num_runs=1)¶ Compare different LoG from Sklearn with PyTorch implementation
- Parameters
num_runs (int) – number of runs
-
src.pytorch_log.log_kernel(kernel_size, sigma_start=1.0, sigma_stop=10.0, num_sigma_steps=10, lin_sigma=True)¶ Creates Kernels used for Laplacian of Gaussian convolutions
- Parameters
kernel_size (int) – size of the kernel, should be odd
sigma_start (float) – smallest kernel parameter
sigma_stop (float) – biggest kernel parameter
num_sigma_steps (int) – number of different kernels
lin_sigma (bool) – use linear or logarithmic scaling between sigma_start and sigma_end
- Returns
kernel
-
src.pytorch_log.pt_log(img, min_sigma=5, max_sigma=5, num_sigma=1, exclude_borders=True)¶ PyTorch implementation of Laplassian of Gaussian
- Parameters
img – input image
sigma_start (float) – smallest kernel parameter
sigma_stop (float) – biggest kernel parameter
num_sigma_steps (int) – number of different kernels
exclude_borders (bool) – exclude extrema close to the image border
- Returns
x-location, y-location, radius of blobs