imaginaire.evaluation.caption package

Submodules

imaginaire.evaluation.caption.clip module

imaginaire.evaluation.caption.clip.available_models() → List[str][source]

Returns the names of available CLIP models

imaginaire.evaluation.caption.clip.load(model_path)[source]
imaginaire.evaluation.caption.clip.build_model(state_dict: dict)[source]

imaginaire.evaluation.caption.common module

class imaginaire.evaluation.caption.common.ImageEncoder(encoder)[source]

Bases: torch.nn.modules.module.Module

forward(data, fake_images, align_corners=True)[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.

training = None
imaginaire.evaluation.caption.common.get_image_encoder(aws_credentials=None)[source]

imaginaire.evaluation.caption.r_precision module

imaginaire.evaluation.caption.r_precision.get_r_precision(image_text_code, eps=1e-05)[source]

Module contents

imaginaire.evaluation.caption.get_image_encoder(aws_credentials=None)[source]
imaginaire.evaluation.caption.get_r_precision(image_text_code, eps=1e-05)[source]