Python API for bob.ip.pytorch_extractor¶
-
class
bob.ip.pytorch_extractor.
CNN8Extractor
(model_file=None, num_classes=10575)¶ Bases:
bob.bio.base.extractor.Extractor
The class implementing the feature extraction of CASIA-Net embeddings.
-
network
¶ torch.nn.Module
– The network architecture
-
to_tensor
¶ torchvision.transforms
– The transform from numpy.array to torch.Tensor
-
norm
¶ torchvision.transforms
– The transform to normalize the input
-
__call__
(image)[source]¶ Extract features from an image
Parameters: image (3D numpy.ndarray
(floats)) – The image to extract the features from. Its size must be 3x128x128Returns: feature – The extracted features as a 1d array of size 320 Return type: 2D numpy.ndarray
(floats)
-
-
class
bob.ip.pytorch_extractor.
CasiaNetExtractor
(model_file=None, num_classes=10575)¶ Bases:
bob.bio.base.extractor.Extractor
The class implementing the feature extraction of CASIA-Net embeddings.
-
network
¶ torch.nn.Module
– The network architecture
-
to_tensor
¶ torchvision.transforms
– The transform from numpy.array to torch.Tensor
-
norm
¶ torchvision.transforms
– The transform to normalize the input
-
__call__
(image)[source]¶ Extract features from an image
Parameters: image (3D numpy.ndarray
(floats)) – The image to extract the features from. Its size must be 3x128x128Returns: feature – The extracted features as a 1d array of size 320 Return type: 2D numpy.ndarray
(floats)
-