Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WuJie1010/Facial-Expression-Recognition.Pytorch
/ functions
Functions
92 in github.com/WuJie1010/Facial-Expression-Recognition.Pytorch
⨍
Functions
92
◇
Types & classes
27
↓ 14 callers
Function
_is_pil_image
(img)
transforms/functional.py:17
↓ 4 callers
Function
ResNet18
()
models/resnet.py:103
↓ 4 callers
Method
_make_layer
(self, block, planes, num_blocks, stride)
models/resnet.py:82
↓ 3 callers
Function
resize
Resize the input PIL Image to the given size. Args: img (PIL Image): Image to be resized. size (sequence or int): Desired output
transforms/functional.py:165
↓ 2 callers
Method
__init__
(self, padding, fill=0)
transforms/transforms.py:199
↓ 2 callers
Method
__init__
(self, block, num_blocks, num_classes=7)
models/resnet.py:70
↓ 2 callers
Function
_is_numpy_image
(img)
transforms/functional.py:28
↓ 2 callers
Function
_is_tensor_image
(img)
transforms/functional.py:24
↓ 2 callers
Function
crop
Crop the given PIL Image. Args: img (PIL Image): Image to be cropped. i: Upper pixel coordinate. j: Left pixel coordinate
transforms/functional.py:239
↓ 2 callers
Function
five_crop
Crop the given PIL Image into four corners and the central crop. .. Note:: This transform returns a tuple of images and there may be a
transforms/functional.py:321
↓ 1 callers
Function
PrivateTest
(epoch)
mainpro_FER.py:170
↓ 1 callers
Function
PublicTest
(epoch)
mainpro_FER.py:129
↓ 1 callers
Method
_make_layers
(self, cfg)
models/vgg.py:29
↓ 1 callers
Function
center_crop
(img, output_size)
transforms/functional.py:258
↓ 1 callers
Method
get_params
Get parameters for ``crop`` for a random crop. Args: img (PIL Image): Image to be cropped. output_size (tuple): Expec
transforms/transforms.py:256
↓ 1 callers
Method
get_params
Get parameters for ``crop`` for a random sized crop. Args: img (PIL Image): Image to be cropped. scale (tuple): range
transforms/transforms.py:345
↓ 1 callers
Method
get_params
Get a randomized transform to be applied on image. Arguments are same as that of __init__. Returns: Transform which rand
transforms/transforms.py:538
↓ 1 callers
Method
get_params
Get parameters for ``rotate`` for a random rotation. Returns: sequence: params to be passed to ``rotate`` for random rotation.
transforms/transforms.py:617
↓ 1 callers
Function
hflip
Horizontally flip the given PIL Image. Args: img (PIL Image): Image to be flipped. Returns: PIL Image: Horizontall flipped
transforms/functional.py:291
↓ 1 callers
Function
plot_confusion_matrix
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
plot_fer2013_confusion_matrix.py:38
↓ 1 callers
Function
plot_confusion_matrix
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
plot_CK+_confusion_matrix.py:30
↓ 1 callers
Function
rgb2gray
(rgb)
visualize.py:26
↓ 1 callers
Function
test
(epoch)
mainpro_CK+.py:127
↓ 1 callers
Function
train
(epoch)
mainpro_CK+.py:88
↓ 1 callers
Function
train
(epoch)
mainpro_FER.py:92
↓ 1 callers
Function
vflip
Vertically flip the given PIL Image. Args: img (PIL Image): Image to be flipped. Returns: PIL Image: Vertically flipped ima
transforms/functional.py:306
Method
__call__
(self, img)
transforms/transforms.py:40
Method
__call__
Args: pic (PIL Image or numpy.ndarray): Image to be converted to tensor. Returns: Tensor: Converted image.
transforms/transforms.py:53
Method
__call__
Args: pic (Tensor or numpy.ndarray): Image to be converted to PIL Image. Returns: PIL Image: Image converted
transforms/transforms.py:83
Method
__call__
Args: tensor (Tensor): Tensor image of size (C, H, W) to be normalized. Returns: Tensor: Normalized Tensor i
transforms/transforms.py:110
Method
__call__
Args: img (PIL Image): Image to be scaled. Returns: PIL Image: Rescaled image.
transforms/transforms.py:139
Method
__call__
Args: img (PIL Image): Image to be cropped. Returns: PIL Image: Cropped image.
transforms/transforms.py:175
Method
__call__
Args: img (PIL Image): Image to be padded. Returns: PIL Image: Padded image.
transforms/transforms.py:209
Method
__call__
(self, img)
transforms/transforms.py:231
Method
__call__
Args: img (PIL Image): Image to be cropped. Returns: PIL Image: Cropped image.
transforms/transforms.py:275
Method
__call__
Args: img (PIL Image): Image to be flipped. Returns: PIL Image: Randomly flipped image.
transforms/transforms.py:294
Method
__call__
Args: img (PIL Image): Image to be flipped. Returns: PIL Image: Randomly flipped image.
transforms/transforms.py:310
Method
__call__
Args: img (PIL Image): Image to be flipped. Returns: PIL Image: Randomly cropped and resize image.
transforms/transforms.py:379
Method
__call__
(self, img)
transforms/transforms.py:433
Method
__call__
(self, img)
transforms/transforms.py:473
Method
__call__
Args: tensor (Tensor): Tensor image of size (C, H, W) to be whitened. Returns: Tensor: Transformed image.
transforms/transforms.py:500
Method
__call__
Args: img (PIL Image): Input image. Returns: PIL Image: Color jittered image.
transforms/transforms.py:569
Method
__call__
img (PIL Image): Image to be rotated. Returns: PIL Image: Rotated image.
transforms/transforms.py:627
Method
__call__
Args: img (PIL Image): Image to be converted to grayscale. Returns: PIL Image: Randomly grayscaled image.
transforms/transforms.py:656
Method
__call__
Args: img (PIL Image): Image to be converted to grayscale. Returns: PIL Image: Randomly grayscaled image.
transforms/transforms.py:684
Method
__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
CK.py:64
Method
__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
fer.py:42
Method
__init__
(self, split='Training', fold = 1, transform=None)
CK.py:23
Method
__init__
(self, split='Training', transform=None)
fer.py:19
Method
__init__
(self, transforms)
transforms/transforms.py:37
Method
__init__
(self, mode=None)
transforms/transforms.py:80
Method
__init__
(self, mean, std)
transforms/transforms.py:106
Method
__init__
(self, size, interpolation=Image.BILINEAR)
transforms/transforms.py:134
Method
__init__
(self, *args, **kwargs)
transforms/transforms.py:154
Method
__init__
(self, size)
transforms/transforms.py:169
Method
__init__
(self, lambd)
transforms/transforms.py:227
Method
__init__
(self, size, padding=0)
transforms/transforms.py:248
Method
__init__
(self, size, scale=(0.08, 1.0), ratio=(3. / 4., 4. / 3.), interpolation=Image.BILINEAR)
transforms/transforms.py:338
Method
__init__
(self, *args, **kwargs)
transforms/transforms.py:395
Method
__init__
(self, size)
transforms/transforms.py:425
Method
__init__
(self, size, vertical_flip=False)
transforms/transforms.py:464
Method
__init__
(self, transformation_matrix)
transforms/transforms.py:494
Method
__init__
(self, brightness=0, contrast=0, saturation=0, hue=0)
transforms/transforms.py:531
Method
__init__
(self, degrees, resample=False, expand=False, center=None)
transforms/transforms.py:602
Method
__init__
(self, num_output_channels=1)
transforms/transforms.py:653
Method
__init__
(self, p=0.1)
transforms/transforms.py:681
Method
__init__
(self, vgg_name)
models/vgg.py:17
Method
__init__
(self, in_planes, planes, stride=1)
models/resnet.py:19
Method
__init__
(self, in_planes, planes, stride=1)
models/resnet.py:44
Method
__len__
(self)
CK.py:85
Method
__len__
(self)
fer.py:66
Function
adjust_brightness
Adjust brightness of an Image. Args: img (PIL Image): PIL Image to be adjusted. brightness_factor (float): How much to adjust th
transforms/functional.py:390
Function
adjust_contrast
Adjust contrast of an Image. Args: img (PIL Image): PIL Image to be adjusted. contrast_factor (float): How much to adjust the con
transforms/functional.py:410
Function
adjust_gamma
Perform gamma correction on an image. Also known as Power Law Transform. Intensities in RGB mode are adjusted based on the following equation
transforms/functional.py:495
Function
adjust_hue
Adjust hue of an image. The image hue is adjusted by converting the image to HSV and cyclically shifting the intensities in the hue channel (
transforms/functional.py:450
Function
adjust_saturation
Adjust color saturation of an image. Args: img (PIL Image): PIL Image to be adjusted. saturation_factor (float): How much to adj
transforms/functional.py:430
Function
clip_gradient
(optimizer, grad_clip)
utils.py:68
Method
forward
(self, x)
models/vgg.py:22
Method
forward
(self, x)
models/resnet.py:33
Method
forward
(self, x)
models/resnet.py:60
Method
forward
(self, x)
models/resnet.py:90
Function
normalize
Normalize a tensor image with mean and standard deviation. See ``Normalize`` for more details. Args: tensor (Tensor): Tensor image o
transforms/functional.py:144
Function
pad
Pad the given PIL Image on all sides with the given "pad" value. Args: img (PIL Image): Image to be padded. padding (int or tuple
transforms/functional.py:208
Function
progress_bar
(current, total, msg=None)
utils.py:23
Function
resized_crop
Crop the given PIL Image and resize it to desired size. Notably used in RandomResizedCrop. Args: img (PIL Image): Image to be croppe
transforms/functional.py:268
Function
rotate
Rotate the image by angle and then (optionally) translate it by (n_columns, n_rows) Args: img (PIL Image): PIL Image to be rotated.
transforms/functional.py:529
Function
scale
(*args, **kwargs)
transforms/functional.py:202
Function
set_lr
(optimizer, lr)
utils.py:64
Function
ten_crop
Crop the given PIL Image into four corners and the central crop plus the flipped version of these (horizontal flipping is used by default).
transforms/functional.py:354
Function
to_grayscale
Convert image to grayscale version of image. Args: img (PIL Image): Image to be converted to grayscale. Returns: PIL Image:
transforms/functional.py:555
Function
to_pil_image
Convert a tensor or an ndarray to PIL Image. See :class:`~torchvision.transforms.ToPIlImage` for more details. Args: pic (Tensor or
transforms/functional.py:81
Function
to_tensor
Convert a ``PIL Image`` or ``numpy.ndarray`` to tensor. See ``ToTensor`` for more details. Args: pic (PIL Image or numpy.ndarray): I
transforms/functional.py:32