Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dbpprt/pytorch-licenseplate-segmentation
/ functions
Functions
87 in github.com/dbpprt/pytorch-licenseplate-segmentation
⨍
Functions
87
◇
Types & classes
17
↓ 5 callers
Function
mean
nanmean compatible with generators.
lovasz_losses.py:232
↓ 3 callers
Function
flatten_binary_scores
Flattens predictions in the batch (binary case) Remove labels equal to 'ignore'
lovasz_losses.py:114
↓ 2 callers
Function
cat_list
(images, fill_value=0)
utils.py:148
↓ 2 callers
Function
criterion
(inputs, target)
train.py:84
↓ 2 callers
Function
evaluate
(model, data_loader, device, epoch = None, writer = None, print_freq = 1)
train.py:53
↓ 2 callers
Function
flatten_probas
Flattens predictions in the batch
lovasz_losses.py:202
↓ 2 callers
Function
get_dataset
(image_set, transform, dataset_dir)
train.py:25
↓ 2 callers
Method
get_params
(width, height, distortion_scale)
transforms.py:49
↓ 2 callers
Function
get_transform
(train)
train.py:29
↓ 2 callers
Method
log_every
(self, iterable, print_freq, header=None)
utils.py:94
↓ 2 callers
Function
lovasz_grad
Computes gradient of the Lovasz extension w.r.t sorted errors See Alg. 1 in paper
lovasz_losses.py:18
↓ 2 callers
Function
lovasz_hinge_flat
Binary Lovasz hinge loss logits: [P] Variable, logits at each prediction (between -\infty and +\infty) labels: [P] Tensor, binary gro
lovasz_losses.py:94
↓ 2 callers
Function
lovasz_softmax_flat
Multi-class Lovasz-Softmax loss probas: [P, C] Variable, class probabilities at each prediction (between 0 and 1) labels: [P] Tensor,
lovasz_losses.py:171
↓ 2 callers
Function
pad_if_smaller
(img, size, fill=0)
transforms.py:11
↓ 2 callers
Method
state_dict
r"""Returns the state of SWA as a :class:`dict`. It contains three entries: * opt_state - a dict holding current optimization sta
swa.py:225
↓ 2 callers
Method
step
r"""Performs a single optimization step. In automatic mode also updates SWA running averages.
swa.py:210
↓ 2 callers
Method
update
(self, value, n=1)
utils.py:27
↓ 2 callers
Method
update
(self, **kwargs)
utils.py:68
↓ 2 callers
Method
update_swa_group
r"""Updates the SWA running averages for the given parameter group. Arguments: param_group (dict): Specifies for what parameter g
swa.py:151
↓ 1 callers
Function
_check_bn
(model)
swa.py:326
↓ 1 callers
Function
_check_bn_apply
(module, flag)
swa.py:321
↓ 1 callers
Method
_check_params
(self, swa_start, swa_freq)
swa.py:132
↓ 1 callers
Function
_get_momenta
(module, momenta)
swa.py:338
↓ 1 callers
Method
_reset_lr_to_swa
(self)
swa.py:144
↓ 1 callers
Function
_set_momenta
(module, momenta)
swa.py:343
↓ 1 callers
Method
add_meter
(self, name, meter)
utils.py:91
↓ 1 callers
Function
create_model
(outputchannels=1, aux_loss=False, freeze_backbone=False)
model.py:5
↓ 1 callers
Function
image_resize
(image, width=None, height=None, inter=cv2.INTER_CUBIC)
utils.py:184
↓ 1 callers
Method
load_state_dict
r"""Loads the optimizer state. Args: state_dict (dict): SWA optimizer state. Should be an object returned from a
swa.py:244
↓ 1 callers
Function
main
(args)
train.py:133
↓ 1 callers
Function
parse_args
()
train.py:215
↓ 1 callers
Method
swap_swa_sgd
r"""Swaps the values of the optimized variables and swa buffers. It's meant to be called in the end of training to use the collected
swa.py:188
↓ 1 callers
Function
train_one_epoch
(model, criterion, optimizer, data_loader, lr_scheduler, device, epoch, writer, print_freq, use_swa)
train.py:97
↓ 1 callers
Function
unsharp_mask
(image, kernel_size=(5, 5), sigma=1.0, amount=1.0, threshold=0)
utils.py:172
Method
__call__
(self, image, target)
transforms.py:25
Method
__call__
(self, image, target)
transforms.py:37
Method
__call__
(self, image, target)
transforms.py:68
Method
__call__
(self, image, target)
transforms.py:80
Method
__call__
(self, image, target)
transforms.py:105
Method
__call__
(self, image, target)
transforms.py:119
Method
__call__
(self, image, target)
transforms.py:132
Method
__call__
(self, image, target)
transforms.py:143
Method
__call__
(self, image, target)
transforms.py:155
Method
__call__
(self, image, target)
transforms.py:168
Method
__call__
(self, image, target)
transforms.py:175
Method
__call__
(self, image, target)
transforms.py:186
Method
__getattr__
(self, attr)
utils.py:75
Method
__getitem__
(self, index)
dataloader.py:26
Method
__init__
(self)
lovasz_losses.py:130
Method
__init__
(self, transforms)
transforms.py:22
Method
__init__
(self, distortion_scale=0.5, p=0.5, interpolation=Image.BICUBIC, fill=0)
transforms.py:31
Method
__init__
(self, p=0.1)
transforms.py:65
Method
__init__
(self, p=0.25, brightness=0, contrast=0, saturation=0, hue=0)
transforms.py:73
Method
__init__
(self, radius, p=0.2)
transforms.py:87
Method
__init__
(self, degrees, resample=False, expand=False, center=None, fill=None)
transforms.py:112
Method
__init__
(self, min_size, max_size=None)
transforms.py:126
Method
__init__
(self, flip_prob)
transforms.py:140
Method
__init__
(self, size, fill)
transforms.py:151
Method
__init__
(self, size)
transforms.py:165
Method
__init__
(self, mean, std)
transforms.py:182
Method
__init__
(self, window_size=20, fmt=None)
utils.py:19
Method
__init__
(self, delimiter="\t")
utils.py:64
Method
__init__
(self, folder_path, transforms)
dataloader.py:14
Method
__init__
r"""Implements Stochastic Weight Averaging (SWA). Stochastic Weight Averaging was proposed in `Averaging Weights Leads to Wider Optim
swa.py:10
Method
__len__
(self)
dataloader.py:43
Method
__str__
(self)
utils.py:54
Method
__str__
(self)
utils.py:83
Function
_reset_bn
(module)
swa.py:332
Method
add_param_group
r"""Add a param group to the :class:`Optimizer` s `param_groups`. This can be useful when fine tuning a pre-trained network as frozen
swa.py:259
Method
avg
(self)
utils.py:38
Function
binary_xloss
Binary Cross entropy loss logits: [B, H, W] Variable, logits at each pixel (between -\infty and +\infty) labels: [B, H, W] Tensor, bi
lovasz_losses.py:138
Method
bn_update
r"""Updates BatchNorm running_mean, running_var buffers in the model. It performs one pass over data in `loader` to estimate the activation
swa.py:275
Function
collate_fn
(batch)
utils.py:157
Function
extract_segmentation_results
(image, mask, resize_width=None, resize_height=256, sharpen_amount=10, crop_min_area_rect=False)
utils.py:204
Method
forward
(self, input, target)
lovasz_losses.py:132
Method
global_avg
(self)
utils.py:43
Function
iou
Array of IoU for each (non ignored) class
lovasz_losses.py:53
Function
iou_binary
IoU for foreground class binary: 1 foreground, 0 background
lovasz_losses.py:33
Function
isnan
(x)
lovasz_losses.py:228
Function
lovasz_hinge
Binary Lovasz hinge loss logits: [B, H, W] Variable, logits at each pixel (between -\infty and +\infty) labels: [B, H, W] Tensor, bin
lovasz_losses.py:78
Function
lovasz_softmax
Multi-class Lovasz-Softmax loss probas: [B, C, H, W] Variable, class probabilities at each prediction (between 0 and 1). Inte
lovasz_losses.py:153
Method
max
(self)
utils.py:47
Method
median
(self)
utils.py:33
Function
mkdir
(path)
utils.py:164
Method
update_swa
r"""Updates the SWA running averages of all optimized parameters.
swa.py:182
Method
value
(self)
utils.py:51
Function
xloss
Cross entropy loss
lovasz_losses.py:220