meerqat.models.image module#
Building blocks for computer vision models.
- class meerqat.models.image.FaceEmbedding(face_dim, bbox_dim, embedding_dim, dropout=0.1, layer_norm_eps=1e-12)[source]#
Bases:
Module
Projects a face feature in the embedding space using a linear layer together with the corresponding bounding box.
- forward(face, bbox, image_type_embeddings=None)[source]#
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class meerqat.models.image.ImageEmbedding(input_dim, embedding_dim, dropout=0.1, layer_norm_eps=None)[source]#
Bases:
Module
Projects an image feature in the embedding space using a linear layer.
- forward(input, image_type_embeddings=None)[source]#
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.