SYMBOL INDEX (482 symbols across 34 files) FILE: demo.py function parse_args (line 23) | def parse_args(): function setup_seeds (line 38) | def setup_seeds(config): function gradio_reset (line 73) | def gradio_reset(chat_state, img_list): function upload_img (line 80) | def upload_img(gr_img, text_input, chat_state): function gradio_ask (line 88) | def gradio_ask(user_message, chatbot, chat_state): function gradio_answer (line 96) | def gradio_answer(chatbot, chat_state, img_list, num_beams, temperature): function set_example_xray (line 119) | def set_example_xray(example: list) -> dict: function set_example_text_input (line 123) | def set_example_text_input(example_text: str) -> dict: FILE: xraypulse/common/config.py class Config (line 16) | class Config: method __init__ (line 17) | def __init__(self, args): method _validate_runner_config (line 43) | def _validate_runner_config(self, runner_config): method _build_opt_list (line 52) | def _build_opt_list(self, opts): method build_model_config (line 57) | def build_model_config(config, **kwargs): method build_runner_config (line 84) | def build_runner_config(config): method build_dataset_config (line 88) | def build_dataset_config(config): method _convert_to_dot_list (line 114) | def _convert_to_dot_list(self, opts): method get_config (line 128) | def get_config(self): method run_cfg (line 132) | def run_cfg(self): method datasets_cfg (line 136) | def datasets_cfg(self): method model_cfg (line 140) | def model_cfg(self): method pretty_print (line 143) | def pretty_print(self): method _convert_node_to_json (line 161) | def _convert_node_to_json(self, node): method to_dict (line 165) | def to_dict(self): function node_to_dict (line 169) | def node_to_dict(node): class ConfigValidator (line 173) | class ConfigValidator: class _Argument (line 187) | class _Argument: method __init__ (line 188) | def __init__(self, name, choices=None, type=None, help=None): method __str__ (line 195) | def __str__(self): method __init__ (line 205) | def __init__(self, description): method __getitem__ (line 212) | def __getitem__(self, key): method __str__ (line 217) | def __str__(self) -> str: method add_argument (line 220) | def add_argument(self, *args, **kwargs): method validate (line 226) | def validate(self, config=None): method format_arguments (line 248) | def format_arguments(self): method format_help (line 251) | def format_help(self): method print_help (line 256) | def print_help(self): function create_runner_config_validator (line 261) | def create_runner_config_validator(): FILE: xraypulse/common/dist_utils.py function setup_for_distributed (line 17) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 33) | def is_dist_avail_and_initialized(): function get_world_size (line 41) | def get_world_size(): function get_rank (line 47) | def get_rank(): function is_main_process (line 53) | def is_main_process(): function init_distributed_mode (line 57) | def init_distributed_mode(args): function get_dist_info (line 93) | def get_dist_info(): function main_process (line 107) | def main_process(func): function download_cached_file (line 117) | def download_cached_file(url, check_hash=True, progress=False): FILE: xraypulse/common/gradcam.py function getAttMap (line 7) | def getAttMap(img, attMap, blur=True, overlap=True): FILE: xraypulse/common/logger.py class SmoothedValue (line 19) | class SmoothedValue(object): method __init__ (line 24) | def __init__(self, window_size=20, fmt=None): method update (line 32) | def update(self, value, n=1): method synchronize_between_processes (line 37) | def synchronize_between_processes(self): method median (line 51) | def median(self): method avg (line 56) | def avg(self): method global_avg (line 61) | def global_avg(self): method max (line 65) | def max(self): method value (line 69) | def value(self): method __str__ (line 72) | def __str__(self): class MetricLogger (line 82) | class MetricLogger(object): method __init__ (line 83) | def __init__(self, delimiter="\t"): method update (line 87) | def update(self, **kwargs): method __getattr__ (line 94) | def __getattr__(self, attr): method __str__ (line 103) | def __str__(self): method global_avg (line 109) | def global_avg(self): method synchronize_between_processes (line 115) | def synchronize_between_processes(self): method add_meter (line 119) | def add_meter(self, name, meter): method log_every (line 122) | def log_every(self, iterable, print_freq, header=None): class AttrDict (line 184) | class AttrDict(dict): method __init__ (line 185) | def __init__(self, *args, **kwargs): function setup_logger (line 190) | def setup_logger(): FILE: xraypulse/common/optims.py class LinearWarmupStepLRScheduler (line 14) | class LinearWarmupStepLRScheduler: method __init__ (line 15) | def __init__( method step (line 37) | def step(self, cur_epoch, cur_step): class LinearWarmupCosineLRScheduler (line 57) | class LinearWarmupCosineLRScheduler: method __init__ (line 58) | def __init__( method step (line 79) | def step(self, cur_epoch, cur_step): function cosine_lr_schedule (line 99) | def cosine_lr_schedule(optimizer, epoch, max_epoch, init_lr, min_lr): function warmup_lr_schedule (line 108) | def warmup_lr_schedule(optimizer, step, max_step, init_lr, max_lr): function step_lr_schedule (line 115) | def step_lr_schedule(optimizer, epoch, init_lr, min_lr, decay_rate): FILE: xraypulse/common/registry.py class Registry (line 9) | class Registry: method register_builder (line 22) | def register_builder(cls, name): method register_task (line 54) | def register_task(cls, name): method register_model (line 83) | def register_model(cls, name): method register_processor (line 112) | def register_processor(cls, name): method register_lr_scheduler (line 141) | def register_lr_scheduler(cls, name): method register_runner (line 165) | def register_runner(cls, name): method register_path (line 189) | def register_path(cls, name, path): method register (line 205) | def register(cls, name, obj): method get_builder_class (line 232) | def get_builder_class(cls, name): method get_model_class (line 236) | def get_model_class(cls, name): method get_task_class (line 240) | def get_task_class(cls, name): method get_processor_class (line 244) | def get_processor_class(cls, name): method get_lr_scheduler_class (line 248) | def get_lr_scheduler_class(cls, name): method get_runner_class (line 252) | def get_runner_class(cls, name): method list_runners (line 256) | def list_runners(cls): method list_models (line 260) | def list_models(cls): method list_tasks (line 264) | def list_tasks(cls): method list_processors (line 268) | def list_processors(cls): method list_lr_schedulers (line 272) | def list_lr_schedulers(cls): method list_datasets (line 276) | def list_datasets(cls): method get_path (line 280) | def get_path(cls, name): method get (line 284) | def get(cls, name, default=None, no_warning=False): method unregister (line 315) | def unregister(cls, name): FILE: xraypulse/common/utils.py function now (line 35) | def now(): function is_url (line 41) | def is_url(url_or_filename): function get_cache_path (line 46) | def get_cache_path(rel_path): function get_abs_path (line 50) | def get_abs_path(rel_path): function load_json (line 54) | def load_json(filename): function makedir (line 64) | def makedir(dir_path): function get_redirected_url (line 78) | def get_redirected_url(url: str): function to_google_drive_download_url (line 93) | def to_google_drive_download_url(view_url: str) -> str: function download_google_drive_url (line 108) | def download_google_drive_url(url: str, output_path: str, output_file_na... function _get_google_drive_file_id (line 141) | def _get_google_drive_file_id(url: str) -> Optional[str]: function _urlretrieve (line 154) | def _urlretrieve(url: str, filename: str, chunk_size: int = 1024) -> None: function download_url (line 167) | def download_url( function download_and_extract_archive (line 221) | def download_and_extract_archive( function cache_url (line 242) | def cache_url(url: str, cache_dir: str) -> str: function create_file_symlink (line 261) | def create_file_symlink(file1, file2): function save_file (line 275) | def save_file(data, filename, append_to_json=True, verbose=True): function load_file (line 313) | def load_file(filename, mmap_mode=None, verbose=True, allow_pickle=False): function abspath (line 374) | def abspath(resource_path: str): function makedir (line 386) | def makedir(dir_path): function is_url (line 400) | def is_url(input_url): function cleanup_dir (line 408) | def cleanup_dir(dir): function get_file_size (line 419) | def get_file_size(filename): FILE: xraypulse/conversation/conversation.py class SeparatorStyle (line 16) | class SeparatorStyle(Enum): class Conversation (line 23) | class Conversation: method get_prompt (line 37) | def get_prompt(self): method append_message (line 58) | def append_message(self, role, message): method to_gradio_chatbot (line 61) | def to_gradio_chatbot(self): method copy (line 72) | def copy(self): method dict (line 84) | def dict(self): class StoppingCriteriaSub (line 97) | class StoppingCriteriaSub(StoppingCriteria): method __init__ (line 99) | def __init__(self, stops=[], encounters=1): method __call__ (line 103) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class Chat (line 123) | class Chat: method __init__ (line 124) | def __init__(self, model, vis_processor, device='cuda:0'): method ask (line 132) | def ask(self, text, conv): method answer (line 139) | def answer(self, conv, img_list, max_new_tokens=300, num_beams=1, min_... method upload_img (line 175) | def upload_img(self, image, conv, img_list): method get_context_emb (line 194) | def get_context_emb(self, conv, img_list): FILE: xraypulse/datasets/builders/__init__.py function load_dataset (line 21) | def load_dataset(name, cfg_path=None, vis_path=None, data_type=None): class DatasetZoo (line 59) | class DatasetZoo: method __init__ (line 60) | def __init__(self) -> None: method get_names (line 66) | def get_names(self): FILE: xraypulse/datasets/builders/base_dataset_builder.py class BaseDatasetBuilder (line 25) | class BaseDatasetBuilder: method __init__ (line 28) | def __init__(self, cfg=None): method build_datasets (line 45) | def build_datasets(self): method build_processors (line 61) | def build_processors(self): method _build_proc_from_cfg (line 80) | def _build_proc_from_cfg(cfg): method default_config_path (line 88) | def default_config_path(cls, type="default"): method _download_data (line 91) | def _download_data(self): method _download_ann (line 95) | def _download_ann(self): method _download_vis (line 152) | def _download_vis(self): method build (line 166) | def build(self): function load_dataset_config (line 232) | def load_dataset_config(cfg_path): FILE: xraypulse/datasets/builders/image_text_pair_builder.py class MIMICBuilder (line 12) | class MIMICBuilder(BaseDatasetBuilder): method _download_ann (line 17) | def _download_ann(self): method _download_vis (line 20) | def _download_vis(self): method build_datasets (line 23) | def build_datasets(self): class OpenIBuilder (line 49) | class OpenIBuilder(BaseDatasetBuilder): method _download_ann (line 54) | def _download_ann(self): method _download_vis (line 57) | def _download_vis(self): method build (line 60) | def build(self): FILE: xraypulse/datasets/data_utils.py class ChainDataset (line 33) | class ChainDataset(wds.DataPipeline): method __init__ (line 43) | def __init__(self, datasets: List[wds.DataPipeline]) -> None: method __iter__ (line 59) | def __iter__(self): function apply_to_sample (line 66) | def apply_to_sample(f, sample): function move_to_cuda (line 83) | def move_to_cuda(sample): function prepare_sample (line 90) | def prepare_sample(samples, cuda_enabled=True): function reorg_datasets_by_split (line 99) | def reorg_datasets_by_split(datasets): function concat_datasets (line 125) | def concat_datasets(datasets): FILE: xraypulse/datasets/datasets/base_dataset.py class BaseDataset (line 15) | class BaseDataset(Dataset): method __init__ (line 16) | def __init__( method __len__ (line 34) | def __len__(self): method collater (line 37) | def collater(self, samples): method set_processors (line 40) | def set_processors(self, vis_processor, text_processor): method _add_instance_ids (line 44) | def _add_instance_ids(self, key="instance_id"): class ConcatDataset (line 49) | class ConcatDataset(ConcatDataset): method __init__ (line 50) | def __init__(self, datasets: Iterable[Dataset]) -> None: method collater (line 53) | def collater(self, samples): FILE: xraypulse/datasets/datasets/caption_datasets.py class __DisplMixin (line 15) | class __DisplMixin: method displ_item (line 16) | def displ_item(self, index): class CaptionDataset (line 28) | class CaptionDataset(BaseDataset, __DisplMixin): method __init__ (line 29) | def __init__(self, vis_processor, text_processor, vis_root, ann_paths): method __getitem__ (line 44) | def __getitem__(self, index): class CaptionEvalDataset (line 63) | class CaptionEvalDataset(BaseDataset, __DisplMixin): method __init__ (line 64) | def __init__(self, vis_processor, text_processor, vis_root, ann_paths): method __getitem__ (line 81) | def __getitem__(self, index): FILE: xraypulse/datasets/datasets/dataloader_utils.py class MultiIterLoader (line 15) | class MultiIterLoader: method __init__ (line 24) | def __init__(self, loaders, ratios=None): method __next__ (line 40) | def __next__(self): class PrefetchLoader (line 46) | class PrefetchLoader(object): method __init__ (line 54) | def __init__(self, loader): method __iter__ (line 58) | def __iter__(self): method __len__ (line 73) | def __len__(self): method preload (line 76) | def preload(self, it): method next (line 101) | def next(self, it): method __getattr__ (line 109) | def __getattr__(self, name): function record_cuda_stream (line 114) | def record_cuda_stream(batch): class IterLoader (line 127) | class IterLoader: method __init__ (line 135) | def __init__(self, dataloader: DataLoader, use_distributed: bool = Fal... method epoch (line 142) | def epoch(self) -> int: method __next__ (line 145) | def __next__(self): method __iter__ (line 158) | def __iter__(self): method __len__ (line 161) | def __len__(self): FILE: xraypulse/datasets/datasets/mimic_dataset.py class MIMICDataset (line 7) | class MIMICDataset(CaptionDataset): method __getitem__ (line 9) | def __getitem__(self, index): FILE: xraypulse/datasets/datasets/openi_dataset.py class OpenIDataset (line 14) | class OpenIDataset(CaptionDataset): method __getitem__ (line 16) | def __getitem__(self, index): FILE: xraypulse/models/Qformer.py class BertEmbeddings (line 51) | class BertEmbeddings(nn.Module): method __init__ (line 54) | def __init__(self, config): method forward (line 78) | def forward( class BertSelfAttention (line 111) | class BertSelfAttention(nn.Module): method __init__ (line 112) | def __init__(self, config, is_cross_attention): method save_attn_gradients (line 149) | def save_attn_gradients(self, attn_gradients): method get_attn_gradients (line 152) | def get_attn_gradients(self): method save_attention_map (line 155) | def save_attention_map(self, attention_map): method get_attention_map (line 158) | def get_attention_map(self): method transpose_for_scores (line 161) | def transpose_for_scores(self, x): method forward (line 169) | def forward( class BertSelfOutput (line 278) | class BertSelfOutput(nn.Module): method __init__ (line 279) | def __init__(self, config): method forward (line 285) | def forward(self, hidden_states, input_tensor): class BertAttention (line 292) | class BertAttention(nn.Module): method __init__ (line 293) | def __init__(self, config, is_cross_attention=False): method prune_heads (line 299) | def prune_heads(self, heads): method forward (line 322) | def forward( class BertIntermediate (line 349) | class BertIntermediate(nn.Module): method __init__ (line 350) | def __init__(self, config): method forward (line 358) | def forward(self, hidden_states): class BertOutput (line 364) | class BertOutput(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 371) | def forward(self, hidden_states, input_tensor): class BertLayer (line 378) | class BertLayer(nn.Module): method __init__ (line 379) | def __init__(self, config, layer_num): method forward (line 402) | def forward( method feed_forward_chunk (line 476) | def feed_forward_chunk(self, attention_output): method feed_forward_chunk_query (line 481) | def feed_forward_chunk_query(self, attention_output): class BertEncoder (line 487) | class BertEncoder(nn.Module): method __init__ (line 488) | def __init__(self, config): method forward (line 495) | def forward( class BertPooler (line 592) | class BertPooler(nn.Module): method __init__ (line 593) | def __init__(self, config): method forward (line 598) | def forward(self, hidden_states): class BertPredictionHeadTransform (line 607) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 608) | def __init__(self, config): method forward (line 617) | def forward(self, hidden_states): class BertLMPredictionHead (line 624) | class BertLMPredictionHead(nn.Module): method __init__ (line 625) | def __init__(self, config): method forward (line 638) | def forward(self, hidden_states): class BertOnlyMLMHead (line 644) | class BertOnlyMLMHead(nn.Module): method __init__ (line 645) | def __init__(self, config): method forward (line 649) | def forward(self, sequence_output): class BertPreTrainedModel (line 654) | class BertPreTrainedModel(PreTrainedModel): method _init_weights (line 664) | def _init_weights(self, module): class BertModel (line 677) | class BertModel(BertPreTrainedModel): method __init__ (line 687) | def __init__(self, config, add_pooling_layer=False): method get_input_embeddings (line 699) | def get_input_embeddings(self): method set_input_embeddings (line 702) | def set_input_embeddings(self, value): method _prune_heads (line 705) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 713) | def get_extended_attention_mask( method forward (line 804) | def forward( class BertLMHeadModel (line 968) | class BertLMHeadModel(BertPreTrainedModel): method __init__ (line 973) | def __init__(self, config): method get_output_embeddings (line 981) | def get_output_embeddings(self): method set_output_embeddings (line 984) | def set_output_embeddings(self, new_embeddings): method forward (line 987) | def forward( method prepare_inputs_for_generation (line 1097) | def prepare_inputs_for_generation( method _reorder_cache (line 1120) | def _reorder_cache(self, past, beam_idx): class BertForMaskedLM (line 1131) | class BertForMaskedLM(BertPreTrainedModel): method __init__ (line 1136) | def __init__(self, config): method get_output_embeddings (line 1144) | def get_output_embeddings(self): method set_output_embeddings (line 1147) | def set_output_embeddings(self, new_embeddings): method forward (line 1150) | def forward( FILE: xraypulse/models/__init__.py function load_model (line 27) | def load_model(name, model_type, is_eval=False, device="cpu", checkpoint... function load_preprocess (line 61) | def load_preprocess(config): function load_model_and_preprocess (line 113) | def load_model_and_preprocess(name, model_type, is_eval=False, device="c... class ModelZoo (line 161) | class ModelZoo: method __init__ (line 172) | def __init__(self) -> None: method __str__ (line 178) | def __str__(self) -> str: method __iter__ (line 193) | def __iter__(self): method __len__ (line 196) | def __len__(self): FILE: xraypulse/models/base_model.py class BaseModel (line 19) | class BaseModel(nn.Module): method __init__ (line 22) | def __init__(self): method device (line 26) | def device(self): method load_checkpoint (line 29) | def load_checkpoint(self, url_or_filename): method from_pretrained (line 59) | def from_pretrained(cls, model_type): method default_config_path (line 75) | def default_config_path(cls, model_type): method load_checkpoint_from_config (line 81) | def load_checkpoint_from_config(self, cfg, **kwargs): method before_evaluation (line 102) | def before_evaluation(self, **kwargs): method show_n_params (line 105) | def show_n_params(self, return_str=True): class BaseEncoder (line 121) | class BaseEncoder(nn.Module): method __init__ (line 126) | def __init__(self): method forward_features (line 129) | def forward_features(self, samples, **kwargs): method device (line 133) | def device(self): class SharedQueueMixin (line 137) | class SharedQueueMixin: method _dequeue_and_enqueue (line 139) | def _dequeue_and_enqueue(self, image_feat, text_feat, idxs=None): class MomentumDistilationMixin (line 161) | class MomentumDistilationMixin: method copy_params (line 163) | def copy_params(self): method _momentum_update (line 172) | def _momentum_update(self): class GatherLayer (line 182) | class GatherLayer(torch.autograd.Function): method forward (line 189) | def forward(ctx, x): method backward (line 197) | def backward(ctx, *grads): function all_gather_with_grad (line 203) | def all_gather_with_grad(tensors): function concat_all_gather (line 221) | def concat_all_gather(tensor): function tile (line 239) | def tile(x, dim, n_tile): FILE: xraypulse/models/blip2.py class Blip2Base (line 28) | class Blip2Base(BaseModel): method init_tokenizer (line 30) | def init_tokenizer(cls): method maybe_autocast (line 35) | def maybe_autocast(self, dtype=torch.float16): method init_Qformer (line 46) | def init_Qformer(cls, num_query_token, vision_width, cross_attention_f... method init_vision_encoder (line 61) | def init_vision_encoder( method load_from_pretrained (line 72) | def load_from_pretrained(self, url_or_filename): function disabled_train (line 93) | def disabled_train(self, mode=True): class LayerNorm (line 99) | class LayerNorm(nn.LayerNorm): method forward (line 102) | def forward(self, x: torch.Tensor): function compute_sim_matrix (line 108) | def compute_sim_matrix(model, data_loader, **kwargs): FILE: xraypulse/models/blip2_outputs.py class BlipSimilarity (line 20) | class BlipSimilarity(ModelOutput): class BlipIntermediateOutput (line 32) | class BlipIntermediateOutput(ModelOutput): class BlipOutput (line 73) | class BlipOutput(ModelOutput): class BlipOutputFeatures (line 89) | class BlipOutputFeatures(ModelOutput): FILE: xraypulse/models/eva_vit.py function _cfg (line 20) | def _cfg(url='', **kwargs): class DropPath (line 30) | class DropPath(nn.Module): method __init__ (line 33) | def __init__(self, drop_prob=None): method forward (line 37) | def forward(self, x): method extra_repr (line 40) | def extra_repr(self) -> str: class Mlp (line 44) | class Mlp(nn.Module): method __init__ (line 45) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 54) | def forward(self, x): class Attention (line 64) | class Attention(nn.Module): method __init__ (line 65) | def __init__( method forward (line 118) | def forward(self, x, rel_pos_bias=None): class Block (line 151) | class Block(nn.Module): method __init__ (line 153) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 173) | def forward(self, x, rel_pos_bias=None): class PatchEmbed (line 183) | class PatchEmbed(nn.Module): method __init__ (line 186) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 198) | def forward(self, x, **kwargs): class RelativePositionBias (line 207) | class RelativePositionBias(nn.Module): method __init__ (line 209) | def __init__(self, window_size, num_heads): method forward (line 238) | def forward(self): class VisionTransformer (line 246) | class VisionTransformer(nn.Module): method __init__ (line 249) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 300) | def fix_init_weight(self): method _init_weights (line 308) | def _init_weights(self, m): method get_classifier (line 317) | def get_classifier(self): method reset_classifier (line 320) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 324) | def forward_features(self, x): method forward (line 349) | def forward(self, x): method get_intermediate_layers (line 354) | def get_intermediate_layers(self, x): function interpolate_pos_embed (line 373) | def interpolate_pos_embed(model, checkpoint_model): function convert_weights_to_fp16 (line 397) | def convert_weights_to_fp16(model: nn.Module): function create_eva_vit_g (line 415) | def create_eva_vit_g(img_size=224,drop_path_rate=0.4,use_checkpoint=Fals... FILE: xraypulse/models/pos_embed.py function get_2d_sincos_pos_embed (line 20) | def get_2d_sincos_pos_embed(embed_dim, grid_size, cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 38) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 49) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): function interpolate_pos_embed (line 75) | def interpolate_pos_embed(model, checkpoint_model): FILE: xraypulse/models/xray_pulse.py class StoppingCriteriaSub (line 18) | class StoppingCriteriaSub(StoppingCriteria): method __init__ (line 20) | def __init__(self, stops=[], encounters=1): method __call__ (line 24) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class SeparatorStyle (line 31) | class SeparatorStyle(Enum): class XrayPulse (line 38) | class XrayPulse(Blip2Base): method __init__ (line 47) | def __init__( method vit_to_cpu (line 144) | def vit_to_cpu(self): method encode_img (line 151) | def encode_img(self, image): method prompt_wrap (line 174) | def prompt_wrap(self, img_embeds, atts_img, prompt): method forward (line 190) | def forward(self, samples): method test (line 246) | def test(self, samples, max_new_tokens=300, num_beams=1, min_length=1,... method get_context_emb (line 305) | def get_context_emb(self, conv, img): method from_config (line 329) | def from_config(cls, cfg): FILE: xraypulse/processors/__init__.py function load_processor (line 25) | def load_processor(name, cfg=None): FILE: xraypulse/processors/base_processor.py class BaseProcessor (line 11) | class BaseProcessor: method __init__ (line 12) | def __init__(self): method __call__ (line 16) | def __call__(self, item): method from_config (line 20) | def from_config(cls, cfg=None): method build (line 23) | def build(self, **kwargs): FILE: xraypulse/processors/blip_processors.py class BlipImageBaseProcessor (line 18) | class BlipImageBaseProcessor(BaseProcessor): method __init__ (line 19) | def __init__(self, mean=None, std=None): class BlipCaptionProcessor (line 29) | class BlipCaptionProcessor(BaseProcessor): method __init__ (line 30) | def __init__(self, prompt="", max_words=50): method __call__ (line 34) | def __call__(self, caption): method from_config (line 40) | def from_config(cls, cfg=None): method pre_caption (line 49) | def pre_caption(self, caption): class Blip2ImageTrainProcessor (line 72) | class Blip2ImageTrainProcessor(BlipImageBaseProcessor): method __init__ (line 73) | def __init__(self, image_size=224, mean=None, std=None, min_scale=0.5,... method __call__ (line 88) | def __call__(self, item): method from_config (line 92) | def from_config(cls, cfg=None): class Blip2ImageEvalProcessor (line 114) | class Blip2ImageEvalProcessor(BlipImageBaseProcessor): method __init__ (line 115) | def __init__(self, image_size=224, mean=None, std=None): method __call__ (line 128) | def __call__(self, item): method from_config (line 132) | def from_config(cls, cfg=None): FILE: xraypulse/processors/randaugment.py function identity_func (line 15) | def identity_func(img): function autocontrast_func (line 19) | def autocontrast_func(img, cutoff=0): function equalize_func (line 52) | def equalize_func(img): function rotate_func (line 76) | def rotate_func(img, degree, fill=(0, 0, 0)): function solarize_func (line 87) | def solarize_func(img, thresh=128): function color_func (line 97) | def color_func(img, factor): function contrast_func (line 115) | def contrast_func(img, factor): function brightness_func (line 129) | def brightness_func(img, factor): function sharpness_func (line 138) | def sharpness_func(img, factor): function shear_x_func (line 159) | def shear_x_func(img, factor, fill=(0, 0, 0)): function translate_x_func (line 168) | def translate_x_func(img, offset, fill=(0, 0, 0)): function translate_y_func (line 180) | def translate_y_func(img, offset, fill=(0, 0, 0)): function posterize_func (line 192) | def posterize_func(img, bits): function shear_y_func (line 200) | def shear_y_func(img, factor, fill=(0, 0, 0)): function cutout_func (line 209) | def cutout_func(img, pad_size, replace=(0, 0, 0)): function enhance_level_to_args (line 223) | def enhance_level_to_args(MAX_LEVEL): function shear_level_to_args (line 230) | def shear_level_to_args(MAX_LEVEL, replace_value): function translate_level_to_args (line 240) | def translate_level_to_args(translate_const, MAX_LEVEL, replace_value): function cutout_level_to_args (line 250) | def cutout_level_to_args(cutout_const, MAX_LEVEL, replace_value): function solarize_level_to_args (line 258) | def solarize_level_to_args(MAX_LEVEL): function none_level_to_args (line 266) | def none_level_to_args(level): function posterize_level_to_args (line 270) | def posterize_level_to_args(MAX_LEVEL): function rotate_level_to_args (line 278) | def rotate_level_to_args(MAX_LEVEL, replace_value): class RandomAugment (line 326) | class RandomAugment(object): method __init__ (line 327) | def __init__(self, N=2, M=10, isPIL=False, augs=[]): method get_random_ops (line 336) | def get_random_ops(self): method __call__ (line 340) | def __call__(self, img): class VideoRandomAugment (line 352) | class VideoRandomAugment(object): method __init__ (line 353) | def __init__(self, N=2, M=10, p=0.0, tensor_in_tensor_out=True, augs=[]): method get_random_ops (line 363) | def get_random_ops(self): method __call__ (line 367) | def __call__(self, frames): method _aug (line 386) | def _aug(self, img, ops, apply_or_not): FILE: xraypulse/runners/runner_base.py class RunnerBase (line 38) | class RunnerBase: method __init__ (line 46) | def __init__(self, cfg, task, model, datasets, job_id): method device (line 68) | def device(self): method use_distributed (line 75) | def use_distributed(self): method model (line 79) | def model(self): method optimizer (line 99) | def optimizer(self): method scaler (line 132) | def scaler(self): method lr_scheduler (line 142) | def lr_scheduler(self): method dataloaders (line 182) | def dataloaders(self) -> dict: method cuda_enabled (line 279) | def cuda_enabled(self): method max_epoch (line 283) | def max_epoch(self): method log_freq (line 287) | def log_freq(self): method init_lr (line 292) | def init_lr(self): method min_lr (line 296) | def min_lr(self): method accum_grad_iters (line 300) | def accum_grad_iters(self): method valid_splits (line 304) | def valid_splits(self): method test_splits (line 313) | def test_splits(self): method train_splits (line 319) | def train_splits(self): method evaluate_only (line 328) | def evaluate_only(self): method use_dist_eval_sampler (line 335) | def use_dist_eval_sampler(self): method resume_ckpt_path (line 339) | def resume_ckpt_path(self): method train_loader (line 343) | def train_loader(self): method setup_output_dir (line 348) | def setup_output_dir(self): method train (line 363) | def train(self): method test (line 422) | def test(self): method evaluate (line 435) | def evaluate(self, ckpt, cur_epoch="best", skip_reload=False): method train_epoch (line 446) | def train_epoch(self, epoch): method test_epoch (line 462) | def test_epoch(self, epoch): method eval_epoch (line 479) | def eval_epoch(self, ckpt, split_name, cur_epoch, skip_reload=False): method unwrap_dist_model (line 513) | def unwrap_dist_model(self, model): method create_loaders (line 519) | def create_loaders( method _save_checkpoint (line 603) | def _save_checkpoint(self, cur_epoch, is_best=False): method _reload_best_model (line 630) | def _reload_best_model(self, model): method _reload_model (line 650) | def _reload_model(self, model,ckpt): method _load_checkpoint (line 669) | def _load_checkpoint(self, url_or_filename): method log_stats (line 694) | def log_stats(self, stats, split_name): method log_config (line 703) | def log_config(self): FILE: xraypulse/tasks/__init__.py function setup_task (line 13) | def setup_task(cfg): FILE: xraypulse/tasks/base_task.py class BaseTask (line 21) | class BaseTask: method __init__ (line 22) | def __init__(self, **kwargs): method setup_task (line 28) | def setup_task(cls, **kwargs): method build_model (line 31) | def build_model(self, cfg): method build_datasets (line 37) | def build_datasets(self, cfg): method train_step (line 69) | def train_step(self, model, samples): method test_step (line 73) | def test_step(self, model, samples): method valid_step (line 77) | def valid_step(self, model, samples): method before_evaluation (line 80) | def before_evaluation(self, model, dataset, **kwargs): method after_evaluation (line 83) | def after_evaluation(self, **kwargs): method inference_step (line 86) | def inference_step(self): method evaluation (line 89) | def evaluation(self, model, data_loader, cuda_enabled=True): method train_epoch (line 108) | def train_epoch( method test_epoch (line 133) | def test_epoch( method train_iters (line 158) | def train_iters( method test_iters (line 186) | def test_iters( method _train_inner_loop (line 214) | def _train_inner_loop( method _test_inner_loop (line 307) | def _test_inner_loop( method save_result (line 354) | def save_result(result, result_dir, filename, remove_duplicate=""): FILE: xraypulse/tasks/image_text_pretrain.py class ImageTextPretrainTask (line 13) | class ImageTextPretrainTask(BaseTask): method __init__ (line 14) | def __init__(self): method evaluation (line 17) | def evaluation(self, model, data_loader, cuda_enabled=True):