SYMBOL INDEX (14415 symbols across 1363 files) FILE: demo/autoaug/hub_fitter.py class HubFitterClassifer (line 27) | class HubFitterClassifer(object): method __init__ (line 30) | def __init__(self, hparams: dict) -> None: method _fit_param (line 80) | def _fit_param(self, show: bool = False) -> None: method _get_label_info (line 92) | def _get_label_info(self, hparams: dict) -> None: method reset_config (line 111) | def reset_config(self, new_hparams: dict) -> None: method save_model (line 124) | def save_model(self, checkpoint_dir: str, step: Optional[str] = None) ... method extract_model_spec (line 137) | def extract_model_spec(self, checkpoint_path: str) -> None: method eval_child_model (line 143) | def eval_child_model(self, mode: str, pass_id: int = 0) -> dict: method train_one_epoch (line 165) | def train_one_epoch(self, pass_id: int) -> dict: method _run_training_loop (line 195) | def _run_training_loop(self, curr_epoch: int) -> dict: method _compute_final_accuracies (line 202) | def _compute_final_accuracies(self, iteration: int) -> dict: method run_model (line 215) | def run_model(self, epoch: int) -> dict: FILE: demo/autoaug/paddlehub_utils/reader.py class PbaAugment (line 41) | class PbaAugment(object): method __init__ (line 46) | def __init__(self, method set_epoch (line 80) | def set_epoch(self, indx: int) -> None: method reset_policy (line 91) | def reset_policy(self, new_hparams: dict) -> None: method __call__ (line 102) | def __call__(self, img: np.ndarray): class PicRecord (line 120) | class PicRecord(object): method __init__ (line 125) | def __init__(self, row: list) -> None: method sub_path (line 134) | def sub_path(self) -> str: method label (line 143) | def label(self) -> str: class PicReader (line 152) | class PicReader(paddle.io.Dataset): method __init__ (line 157) | def __init__(self, method _get_all_img (line 191) | def _get_all_img(self, **kwargs) -> None: method _load_image (line 218) | def _load_image(self, directory: str) -> np.ndarray: method _parse_list (line 242) | def _parse_list(self, **kwargs) -> None: method __getitem__ (line 271) | def __getitem__(self, index: int): method get (line 284) | def get(self, record: PicRecord) -> tuple: method __len__ (line 321) | def __len__(self) -> int: method set_meta (line 329) | def set_meta(self, meta: bool) -> None: method set_epoch (line 340) | def set_epoch(self, epoch: int) -> None: method reset_policy (line 353) | def reset_policy(self, new_hparams: dict) -> None: function _parse (line 366) | def _parse(value: str, function: callable, fmt: str) -> None: function _read_classes (line 380) | def _read_classes(csv_file: str) -> dict: function _init_loader (line 400) | def _init_loader(hparams: dict, TrainTransform=None) -> tuple: FILE: demo/autoaug/paddlehub_utils/trainer.py class CustomTrainer (line 23) | class CustomTrainer(Trainer): method __init__ (line 25) | def __init__(self, **kwargs) -> None: method init_train_and_eval (line 28) | def init_train_and_eval(self, method init_train (line 39) | def init_train(self, train_dataset: paddle.io.Dataset, batch_size: int... method train_one_epoch (line 55) | def train_one_epoch(self, loader: paddle.io.DataLoader, timer: Timer, ... method train (line 95) | def train(self, method init_evaluate (line 153) | def init_evaluate(self, eval_dataset: paddle.io.Dataset, batch_size: i... method evaluate_process (line 170) | def evaluate_process(self, loader: paddle.io.DataLoader) -> dict: method evaluate (line 205) | def evaluate(self, eval_dataset: paddle.io.Dataset, batch_size: int = ... FILE: demo/autoaug/search.py function main (line 22) | def main(): function search_test (line 26) | def search_test(): FILE: demo/serving/module_serving/object_detection_pyramidbox_lite_server_mask/pyramidbox_lite_server_mask_serving_demo.py function cv2_to_base64 (line 8) | def cv2_to_base64(image): FILE: demo/text_classification/embedding/model.py class BoWModel (line 30) | class BoWModel(nn.Layer): method __init__ (line 45) | def __init__(self, method training_step (line 72) | def training_step(self, batch: List[paddle.Tensor], batch_idx: int): method validation_step (line 86) | def validation_step(self, batch: List[paddle.Tensor], batch_idx: int): method forward (line 100) | def forward(self, ids: paddle.Tensor, labels: paddle.Tensor = None): method _batchify (line 126) | def _batchify(self, data: List[List[str]], max_seq_len: int, batch_siz... method predict (line 150) | def predict( FILE: docs/conf.py function setup (line 80) | def setup(app): FILE: modules/audio/asr/deepspeech2_aishell/deepspeech_tester.py class DeepSpeech2Tester (line 28) | class DeepSpeech2Tester: method __init__ (line 29) | def __init__(self, config): method compute_result_transcripts (line 34) | def compute_result_transcripts(self, audio, audio_len, vocab_list, cfg): method test (line 54) | def test(self, audio_file): method setup_model (line 67) | def setup_model(self): method resume (line 76) | def resume(self, checkpoint): FILE: modules/audio/asr/deepspeech2_aishell/module.py class DeepSpeech2 (line 49) | class DeepSpeech2(paddle.nn.Layer): method __init__ (line 50) | def __init__(self): method check_audio (line 82) | def check_audio(audio_file): method speech_recognize (line 87) | def speech_recognize(self, audio_file, device='cpu'): FILE: modules/audio/asr/deepspeech2_librispeech/deepspeech_tester.py class DeepSpeech2Tester (line 28) | class DeepSpeech2Tester: method __init__ (line 29) | def __init__(self, config): method compute_result_transcripts (line 34) | def compute_result_transcripts(self, audio, audio_len, vocab_list, cfg): method test (line 54) | def test(self, audio_file): method setup_model (line 67) | def setup_model(self): method resume (line 76) | def resume(self, checkpoint): FILE: modules/audio/asr/deepspeech2_librispeech/module.py class DeepSpeech2 (line 50) | class DeepSpeech2(paddle.nn.Layer): method __init__ (line 51) | def __init__(self): method check_audio (line 83) | def check_audio(audio_file): method speech_recognize (line 88) | def speech_recognize(self, audio_file, device='cpu'): FILE: modules/audio/asr/u2_conformer_aishell/module.py class U2Conformer (line 35) | class U2Conformer(paddle.nn.Layer): method __init__ (line 36) | def __init__(self): method check_audio (line 63) | def check_audio(audio_file): method speech_recognize (line 68) | def speech_recognize(self, audio_file, device='cpu'): FILE: modules/audio/asr/u2_conformer_aishell/u2_conformer_tester.py class U2ConformerTester (line 27) | class U2ConformerTester: method __init__ (line 28) | def __init__(self, config): method test (line 36) | def test(self, audio_file): method setup_model (line 67) | def setup_model(self): method resume (line 75) | def resume(self, checkpoint): FILE: modules/audio/asr/u2_conformer_librispeech/module.py class U2Conformer (line 36) | class U2Conformer(paddle.nn.Layer): method __init__ (line 37) | def __init__(self): method check_audio (line 64) | def check_audio(audio_file): method speech_recognize (line 69) | def speech_recognize(self, audio_file, device='cpu'): FILE: modules/audio/asr/u2_conformer_librispeech/u2_conformer_tester.py class U2ConformerTester (line 27) | class U2ConformerTester: method __init__ (line 28) | def __init__(self, config): method test (line 36) | def test(self, audio_file): method setup_model (line 67) | def setup_model(self): method resume (line 75) | def resume(self, checkpoint): FILE: modules/audio/asr/u2_conformer_wenetspeech/module.py class U2Conformer (line 26) | class U2Conformer(paddle.nn.Layer): method __init__ (line 27) | def __init__(self): method check_audio (line 39) | def check_audio(audio_file): method speech_recognize (line 52) | def speech_recognize(self, audio_file, device='cpu'): FILE: modules/audio/audio_classification/PANNs/cnn10/module.py class PANN (line 38) | class PANN(nn.Layer): method __init__ (line 39) | def __init__( method forward (line 72) | def forward(self, feats, labels=None): FILE: modules/audio/audio_classification/PANNs/cnn10/network.py class ConvBlock (line 24) | class ConvBlock(nn.Layer): method __init__ (line 25) | def __init__(self, in_channels, out_channels): method forward (line 45) | def forward(self, x, pool_size=(2, 2), pool_type='avg'): class CNN10 (line 66) | class CNN10(nn.Layer): method __init__ (line 69) | def __init__(self, extract_embedding: bool = True, checkpoint: str = N... method forward (line 90) | def forward(self, x): FILE: modules/audio/audio_classification/PANNs/cnn14/module.py class PANN (line 38) | class PANN(nn.Layer): method __init__ (line 39) | def __init__( method forward (line 72) | def forward(self, feats, labels=None): FILE: modules/audio/audio_classification/PANNs/cnn14/network.py class ConvBlock (line 24) | class ConvBlock(nn.Layer): method __init__ (line 25) | def __init__(self, in_channels, out_channels): method forward (line 45) | def forward(self, x, pool_size=(2, 2), pool_type='avg'): class CNN14 (line 66) | class CNN14(nn.Layer): method __init__ (line 69) | def __init__(self, extract_embedding: bool = True, checkpoint: str = N... method forward (line 92) | def forward(self, x): FILE: modules/audio/audio_classification/PANNs/cnn6/module.py class PANN (line 38) | class PANN(nn.Layer): method __init__ (line 39) | def __init__( method forward (line 72) | def forward(self, feats, labels=None): FILE: modules/audio/audio_classification/PANNs/cnn6/network.py class ConvBlock5x5 (line 24) | class ConvBlock5x5(nn.Layer): method __init__ (line 25) | def __init__(self, in_channels, out_channels): method forward (line 37) | def forward(self, x, pool_size=(2, 2), pool_type='avg'): class CNN6 (line 54) | class CNN6(nn.Layer): method __init__ (line 57) | def __init__(self, extract_embedding: bool = True, checkpoint: str = N... method forward (line 78) | def forward(self, x): FILE: modules/audio/keyword_spotting/kwmlp_speech_commands/feature.py function create_dct (line 21) | def create_dct(n_mfcc: int, n_mels: int, norm: str = 'ortho'): function compute_mfcc (line 34) | def compute_mfcc( FILE: modules/audio/keyword_spotting/kwmlp_speech_commands/kwmlp.py class Residual (line 19) | class Residual(nn.Layer): method __init__ (line 20) | def __init__(self, fn): method forward (line 24) | def forward(self, x): class PreNorm (line 28) | class PreNorm(nn.Layer): method __init__ (line 29) | def __init__(self, dim, fn): method forward (line 34) | def forward(self, x, **kwargs): class PostNorm (line 39) | class PostNorm(nn.Layer): method __init__ (line 40) | def __init__(self, dim, fn): method forward (line 45) | def forward(self, x, **kwargs): class SpatialGatingUnit (line 49) | class SpatialGatingUnit(nn.Layer): method __init__ (line 50) | def __init__(self, dim, dim_seq, act=nn.Identity(), init_eps=1e-3): method forward (line 61) | def forward(self, x): class gMLPBlock (line 71) | class gMLPBlock(nn.Layer): method __init__ (line 72) | def __init__(self, *, dim, dim_ff, seq_len, act=nn.Identity()): method forward (line 79) | def forward(self, x): class Rearrange (line 86) | class Rearrange(nn.Layer): method __init__ (line 87) | def __init__(self): method forward (line 90) | def forward(self, x): class Reduce (line 95) | class Reduce(nn.Layer): method __init__ (line 96) | def __init__(self, axis=1): method forward (line 100) | def forward(self, x): class KW_MLP (line 105) | class KW_MLP(nn.Layer): method __init__ (line 108) | def __init__(self, method forward (line 139) | def forward(self, x): FILE: modules/audio/keyword_spotting/kwmlp_speech_commands/module.py class KWS (line 33) | class KWS(paddle.nn.Layer): method __init__ (line 34) | def __init__(self): method load_audio (line 59) | def load_audio(self, wav): method keyword_recognize (line 65) | def keyword_recognize(self, wav): method forward (line 79) | def forward(self, x): FILE: modules/audio/language_identification/ecapa_tdnn_common_language/ecapa_tdnn.py function length_to_mask (line 22) | def length_to_mask(length, max_len=None, dtype=None): class Conv1d (line 36) | class Conv1d(nn.Layer): method __init__ (line 37) | def __init__( method forward (line 68) | def forward(self, x): method _manage_padding (line 76) | def _manage_padding(self, x, kernel_size: int, dilation: int, stride: ... method _get_padding_elem (line 82) | def _get_padding_elem(self, L_in: int, stride: int, kernel_size: int, ... class BatchNorm1d (line 95) | class BatchNorm1d(nn.Layer): method __init__ (line 96) | def __init__( method forward (line 118) | def forward(self, x): class TDNNBlock (line 123) | class TDNNBlock(nn.Layer): method __init__ (line 124) | def __init__( method forward (line 142) | def forward(self, x): class Res2NetBlock (line 146) | class Res2NetBlock(nn.Layer): method __init__ (line 147) | def __init__(self, in_channels, out_channels, scale=8, dilation=1): method forward (line 159) | def forward(self, x): class SEBlock (line 173) | class SEBlock(nn.Layer): method __init__ (line 174) | def __init__(self, in_channels, se_channels, out_channels): method forward (line 182) | def forward(self, x, lengths=None): class AttentiveStatisticsPooling (line 198) | class AttentiveStatisticsPooling(nn.Layer): method __init__ (line 199) | def __init__(self, channels, attention_channels=128, global_context=Tr... method forward (line 211) | def forward(self, x, lengths=None): class SERes2NetBlock (line 253) | class SERes2NetBlock(nn.Layer): method __init__ (line 254) | def __init__( method forward (line 291) | def forward(self, x, lengths=None): class ECAPA_TDNN (line 304) | class ECAPA_TDNN(nn.Layer): method __init__ (line 305) | def __init__( method forward (line 372) | def forward(self, x, lengths=None): class Classifier (line 395) | class Classifier(nn.Layer): method __init__ (line 396) | def __init__(self, backbone, num_class, dtype=paddle.float32): method forward (line 402) | def forward(self, x): FILE: modules/audio/language_identification/ecapa_tdnn_common_language/feature.py function compute_fbank_matrix (line 23) | def compute_fbank_matrix(sample_rate: int = 16000, function compute_log_fbank (line 51) | def compute_log_fbank( function compute_stats (line 84) | def compute_stats(x: paddle.Tensor, mean_norm: bool = True, std_norm: bo... function normalize (line 100) | def normalize( FILE: modules/audio/language_identification/ecapa_tdnn_common_language/module.py class LanguageIdentification (line 38) | class LanguageIdentification(paddle.nn.Layer): method __init__ (line 39) | def __init__(self): method load_audio (line 65) | def load_audio(self, wav): method language_identify (line 71) | def language_identify(self, wav): method forward (line 77) | def forward(self, x): FILE: modules/audio/speaker_recognition/ecapa_tdnn_voxceleb/ecapa_tdnn.py function length_to_mask (line 22) | def length_to_mask(length, max_len=None, dtype=None): class Conv1d (line 36) | class Conv1d(nn.Layer): method __init__ (line 37) | def __init__( method forward (line 68) | def forward(self, x): method _manage_padding (line 76) | def _manage_padding(self, x, kernel_size: int, dilation: int, stride: ... method _get_padding_elem (line 82) | def _get_padding_elem(self, L_in: int, stride: int, kernel_size: int, ... class BatchNorm1d (line 95) | class BatchNorm1d(nn.Layer): method __init__ (line 96) | def __init__( method forward (line 118) | def forward(self, x): class TDNNBlock (line 123) | class TDNNBlock(nn.Layer): method __init__ (line 124) | def __init__( method forward (line 142) | def forward(self, x): class Res2NetBlock (line 146) | class Res2NetBlock(nn.Layer): method __init__ (line 147) | def __init__(self, in_channels, out_channels, scale=8, dilation=1): method forward (line 159) | def forward(self, x): class SEBlock (line 173) | class SEBlock(nn.Layer): method __init__ (line 174) | def __init__(self, in_channels, se_channels, out_channels): method forward (line 182) | def forward(self, x, lengths=None): class AttentiveStatisticsPooling (line 198) | class AttentiveStatisticsPooling(nn.Layer): method __init__ (line 199) | def __init__(self, channels, attention_channels=128, global_context=Tr... method forward (line 211) | def forward(self, x, lengths=None): class SERes2NetBlock (line 253) | class SERes2NetBlock(nn.Layer): method __init__ (line 254) | def __init__( method forward (line 291) | def forward(self, x, lengths=None): class ECAPA_TDNN (line 304) | class ECAPA_TDNN(nn.Layer): method __init__ (line 305) | def __init__( method forward (line 372) | def forward(self, x, lengths=None): FILE: modules/audio/speaker_recognition/ecapa_tdnn_voxceleb/feature.py function compute_fbank_matrix (line 23) | def compute_fbank_matrix(sample_rate: int = 16000, function compute_log_fbank (line 51) | def compute_log_fbank( function compute_stats (line 84) | def compute_stats(x: paddle.Tensor, mean_norm: bool = True, std_norm: bo... function normalize (line 100) | def normalize( FILE: modules/audio/speaker_recognition/ecapa_tdnn_voxceleb/module.py class SpeakerRecognition (line 37) | class SpeakerRecognition(paddle.nn.Layer): method __init__ (line 38) | def __init__(self, threshold=0.25): method load_audio (line 63) | def load_audio(self, wav): method speaker_embedding (line 69) | def speaker_embedding(self, wav): method speaker_verify (line 74) | def speaker_verify(self, wav1, wav2): method forward (line 84) | def forward(self, x): FILE: modules/audio/svs/diffsinger/infer.py class Infer (line 15) | class Infer: method __init__ (line 17) | def __init__(self, root='.', providers=None): method model (line 55) | def model(self, txt_tokens, **kwargs): method norm_spec (line 131) | def norm_spec(self, x): method denorm_spec (line 134) | def denorm_spec(self, x): method forward_model (line 137) | def forward_model(self, inp): method run_vocoder (line 164) | def run_vocoder(self, c, **kwargs): method preprocess_word_level_input (line 179) | def preprocess_word_level_input(self, inp): method preprocess_phoneme_level_input (line 249) | def preprocess_phoneme_level_input(self, inp): method preprocess_input (line 263) | def preprocess_input(self, inp, input_type='word'): method input_to_batch (line 315) | def input_to_batch(self, item): method infer_once (line 340) | def infer_once(self, inp): FILE: modules/audio/svs/diffsinger/inference/svs/opencpop/map.py function cpop_pinyin2ph_func (line 1) | def cpop_pinyin2ph_func(path): FILE: modules/audio/svs/diffsinger/module.py class DiffSinger (line 23) | class DiffSinger: method __init__ (line 25) | def __init__(self, providers: List[str] = None) -> None: method singing_voice_synthesis (line 32) | def singing_voice_synthesis(self, method run_cmd (line 65) | def run_cmd(self, argvs: List[str]) -> str: FILE: modules/audio/svs/diffsinger/test.py class TestHubModule (line 7) | class TestHubModule(unittest.TestCase): method setUpClass (line 10) | def setUpClass(cls) -> None: method tearDownClass (line 14) | def tearDownClass(cls) -> None: method test_singing_voice_synthesis1 (line 17) | def test_singing_voice_synthesis1(self): method test_singing_voice_synthesis2 (line 35) | def test_singing_voice_synthesis2(self): FILE: modules/audio/svs/diffsinger/utils/__init__.py class AvgrageMeter (line 8) | class AvgrageMeter(object): method __init__ (line 10) | def __init__(self): method reset (line 13) | def reset(self): method update (line 18) | def update(self, val, n=1): function collate_1d (line 24) | def collate_1d(values, pad_idx=0, left_pad=False, shift_right=False, max... function collate_2d (line 42) | def collate_2d(values, pad_idx=0, left_pad=False, shift_right=False, max... function _is_batch_full (line 59) | def _is_batch_full(batch, num_tokens, max_tokens, max_sentences): function batch_by_size (line 69) | def batch_by_size(indices, function unpack_dict_to_list (line 125) | def unpack_dict_to_list(samples): function remove_padding (line 139) | def remove_padding(x, padding_idx=0): class Timer (line 149) | class Timer: method __init__ (line 152) | def __init__(self, name, print_time=False): method __enter__ (line 158) | def __enter__(self): method __exit__ (line 161) | def __exit__(self, exc_type, exc_val, exc_tb): FILE: modules/audio/svs/diffsinger/utils/audio.py function save_wav (line 13) | def save_wav(wav, path, sr, norm=False): function get_hop_size (line 21) | def get_hop_size(hparams): function _stft (line 30) | def _stft(y, hparams): function _istft (line 38) | def _istft(y, hparams): function librosa_pad_lr (line 42) | def librosa_pad_lr(x, fsize, fshift, pad_sides=1): function amp_to_db (line 55) | def amp_to_db(x): function normalize (line 59) | def normalize(S, hparams): FILE: modules/audio/svs/diffsinger/utils/cwt.py function load_wav (line 7) | def load_wav(wav_file, sr): function convert_continuos_f0 (line 12) | def convert_continuos_f0(f0): function get_cont_lf0 (line 46) | def get_cont_lf0(f0, frame_period=5.0): function get_lf0_cwt (line 53) | def get_lf0_cwt(lf0): function norm_scale (line 72) | def norm_scale(Wavelet_lf0): function normalize_cwt_lf0 (line 80) | def normalize_cwt_lf0(f0, mean, std): function get_lf0_cwt_norm (line 89) | def get_lf0_cwt_norm(f0s, mean, std): function inverse_cwt (line 118) | def inverse_cwt(Wavelet_lf0, scales): FILE: modules/audio/svs/diffsinger/utils/hparams.py class Args (line 10) | class Args: method __init__ (line 12) | def __init__(self, **kwargs): function override_config (line 17) | def override_config(old_config: dict, new_config: dict): function set_hparams (line 25) | def set_hparams(config='', exp_name='', hparams_str='', print_hparams=Tr... FILE: modules/audio/svs/diffsinger/utils/multiprocess_utils.py function chunked_worker (line 7) | def chunked_worker(worker_id, map_func, args, results_queue=None, init_c... function chunked_multiprocess_run (line 21) | def chunked_multiprocess_run(map_func, args, num_workers=None, ordered=T... FILE: modules/audio/svs/diffsinger/utils/text_encoder.py function strip_ids (line 28) | def strip_ids(ids, ids_to_strip): class TextEncoder (line 36) | class TextEncoder(object): method __init__ (line 39) | def __init__(self, num_reserved_ids=NUM_RESERVED_TOKENS): method num_reserved_ids (line 43) | def num_reserved_ids(self): method encode (line 46) | def encode(self, s): method decode (line 62) | def decode(self, ids, strip_extraneous=False): method decode_list (line 79) | def decode_list(self, ids): method vocab_size (line 101) | def vocab_size(self): class ByteTextEncoder (line 105) | class ByteTextEncoder(TextEncoder): method encode (line 108) | def encode(self, s): method decode (line 112) | def decode(self, ids, strip_extraneous=False): method decode_list (line 128) | def decode_list(self, ids): method vocab_size (line 141) | def vocab_size(self): class ByteTextEncoderWithEos (line 145) | class ByteTextEncoderWithEos(ByteTextEncoder): method encode (line 148) | def encode(self, s): class TokenTextEncoder (line 152) | class TokenTextEncoder(TextEncoder): method __init__ (line 155) | def __init__(self, method encode (line 192) | def encode(self, s): method decode (line 201) | def decode(self, ids, strip_eos=False, strip_padding=False): method decode_list (line 210) | def decode_list(self, ids): method vocab_size (line 215) | def vocab_size(self): method __len__ (line 218) | def __len__(self): method _safe_id_to_token (line 221) | def _safe_id_to_token(self, idx): method _init_vocab_from_file (line 224) | def _init_vocab_from_file(self, filename): method _init_vocab_from_list (line 239) | def _init_vocab_from_list(self, vocab_list): method _init_vocab (line 256) | def _init_vocab(self, token_generator, add_reserved_tokens=True): method pad (line 271) | def pad(self): method eos (line 274) | def eos(self): method unk (line 277) | def unk(self): method seg (line 280) | def seg(self): method store_to_file (line 283) | def store_to_file(self, filename): method sil_phonemes (line 296) | def sil_phonemes(self): FILE: modules/audio/svs/diffsinger/utils/text_norm.py class ChineseChar (line 61) | class ChineseChar(object): method __init__ (line 69) | def __init__(self, simplified, traditional): method __str__ (line 74) | def __str__(self): method __repr__ (line 77) | def __repr__(self): class ChineseNumberUnit (line 81) | class ChineseNumberUnit(ChineseChar): method __init__ (line 88) | def __init__(self, power, simplified, traditional, big_s, big_t): method __str__ (line 94) | def __str__(self): method create (line 98) | def create(cls, index, value, numbering_type=NUMBERING_TYPES[1], small... class ChineseNumberDigit (line 128) | class ChineseNumberDigit(ChineseChar): method __init__ (line 133) | def __init__(self, value, simplified, traditional, big_s, big_t, alt_s... method __str__ (line 141) | def __str__(self): method create (line 145) | def create(cls, i, v): class ChineseMath (line 149) | class ChineseMath(ChineseChar): method __init__ (line 154) | def __init__(self, simplified, traditional, symbol, expression=None): class NumberSystem (line 165) | class NumberSystem(object): class MathSymbol (line 172) | class MathSymbol(object): method __init__ (line 180) | def __init__(self, positive, negative, point): method __iter__ (line 185) | def __iter__(self): function create_system (line 206) | def create_system(numbering_type=NUMBERING_TYPES[1]): function chn2num (line 242) | def chn2num(chinese_string, numbering_type=NUMBERING_TYPES[1]): function num2chn (line 326) | def num2chn(number_string, class Cardinal (line 427) | class Cardinal: method __init__ (line 432) | def __init__(self, cardinal=None, chntext=None): method chntext2cardinal (line 436) | def chntext2cardinal(self): method cardinal2chntext (line 439) | def cardinal2chntext(self): class Digit (line 443) | class Digit: method __init__ (line 448) | def __init__(self, digit=None, chntext=None): method digit2chntext (line 455) | def digit2chntext(self): class TelePhone (line 459) | class TelePhone: method __init__ (line 464) | def __init__(self, telephone=None, raw_chntext=None, chntext=None): method telephone2chntext (line 476) | def telephone2chntext(self, fixed=False): class Fraction (line 489) | class Fraction: method __init__ (line 494) | def __init__(self, fraction=None, chntext=None): method chntext2fraction (line 498) | def chntext2fraction(self): method fraction2chntext (line 502) | def fraction2chntext(self): class Date (line 507) | class Date: method __init__ (line 512) | def __init__(self, date=None, chntext=None): method date2chntext (line 540) | def date2chntext(self): class Money (line 565) | class Money: method __init__ (line 570) | def __init__(self, money=None, chntext=None): method money2chntext (line 577) | def money2chntext(self): class Percentage (line 588) | class Percentage: method __init__ (line 593) | def __init__(self, percentage=None, chntext=None): method chntext2percentage (line 597) | def chntext2percentage(self): method percentage2chntext (line 600) | def percentage2chntext(self): class NSWNormalizer (line 607) | class NSWNormalizer: method __init__ (line 609) | def __init__(self, raw_text): method _particular (line 613) | def _particular(self): method normalize (line 624) | def normalize(self, remove_punc=True): function nsw_test_case (line 717) | def nsw_test_case(raw_text): function nsw_test (line 723) | def nsw_test(): FILE: modules/audio/tts/deepvoice3_ljspeech/module.py class AttrDict (line 68) | class AttrDict(dict): method __init__ (line 69) | def __init__(self, *args, **kwargs): class WaveflowVocoder (line 74) | class WaveflowVocoder(object): method __init__ (line 75) | def __init__(self, config_path, checkpoint_path): method __call__ (line 86) | def __call__(self, mel): class GriffinLimVocoder (line 94) | class GriffinLimVocoder(object): method __init__ (line 95) | def __init__(self, sharpening_factor=1.4, sample_rate=22050, n_fft=102... method __call__ (line 102) | def __call__(self, mel): class DeepVoice3 (line 118) | class DeepVoice3(hub.NLPPredictionModule): method _initialize (line 119) | def _initialize(self): method synthesize (line 183) | def synthesize(self, texts, use_gpu=False, vocoder="griffin-lim"): method serving_method (line 248) | def serving_method(self, texts, use_gpu=False, vocoder="griffin-lim"): method add_module_config_arg (line 257) | def add_module_config_arg(self): method add_module_output_arg (line 267) | def add_module_output_arg(self): method run_cmd (line 278) | def run_cmd(self, argvs): FILE: modules/audio/tts/fastspeech2_baker/module.py class FastSpeech (line 36) | class FastSpeech(paddle.nn.Layer): method __init__ (line 37) | def __init__(self, output_dir='./wavs'): method forward (line 96) | def forward(self, text: str): method generate (line 112) | def generate(self, sentences: List[str], device='cpu'): FILE: modules/audio/tts/fastspeech2_ljspeech/module.py class FastSpeech (line 36) | class FastSpeech(paddle.nn.Layer): method __init__ (line 37) | def __init__(self, output_dir='./wavs'): method forward (line 101) | def forward(self, text: str): method generate (line 117) | def generate(self, sentences: List[str], device='cpu'): FILE: modules/audio/tts/fastspeech_ljspeech/module.py class AttrDict (line 68) | class AttrDict(dict): method __init__ (line 69) | def __init__(self, *args, **kwargs): class FastSpeech (line 83) | class FastSpeech(hub.NLPPredictionModule): method _initialize (line 84) | def _initialize(self): method synthesize (line 107) | def synthesize(self, texts, use_gpu=False, speed=1.0, vocoder="griffin... method synthesis_with_griffinlim (line 164) | def synthesis_with_griffinlim(self, mel_output, cfg): method synthesis_with_waveflow (line 176) | def synthesis_with_waveflow(self, mel_output, sigma): method serving_method (line 189) | def serving_method(self, texts, use_gpu=False, speed=1.0, vocoder="gri... method add_module_config_arg (line 198) | def add_module_config_arg(self): method add_module_output_arg (line 208) | def add_module_output_arg(self): method run_cmd (line 219) | def run_cmd(self, argvs): FILE: modules/audio/tts/transformer_tts_ljspeech/module.py class AttrDict (line 69) | class AttrDict(dict): method __init__ (line 70) | def __init__(self, *args, **kwargs): class TransformerTTS (line 84) | class TransformerTTS(hub.NLPPredictionModule): method _initialize (line 85) | def _initialize(self): method synthesize (line 120) | def synthesize(self, texts, use_gpu=False, vocoder="griffin-lim"): method synthesis_with_griffinlim (line 181) | def synthesis_with_griffinlim(self, mel_output, cfg): method synthesis_with_waveflow (line 193) | def synthesis_with_waveflow(self, mel_output, sigma): method serving_method (line 206) | def serving_method(self, texts, use_gpu=False, vocoder="griffin-lim"): method add_module_config_arg (line 215) | def add_module_config_arg(self): method add_module_output_arg (line 225) | def add_module_output_arg(self): method run_cmd (line 236) | def run_cmd(self, argvs): FILE: modules/audio/voice_cloning/ge2e_fastspeech2_pwgan/module.py class VoiceCloner (line 45) | class VoiceCloner(paddle.nn.Layer): method __init__ (line 46) | def __init__(self, speaker_audio: str = None, output_dir: str = './'): method get_speaker_embedding (line 127) | def get_speaker_embedding(self): method set_speaker_embedding (line 131) | def set_speaker_embedding(self, speaker_audio: str): method generate (line 140) | def generate(self, data: Union[str, List[str]], use_gpu: bool = False): FILE: modules/audio/voice_cloning/lstm_tacotron2/audio_processor.py function normalize_volume (line 32) | def normalize_volume(wav, target_dBFS, increase_only=False, decrease_onl... function trim_long_silences (line 49) | def trim_long_silences(wav, vad_window_length: int, vad_moving_average_w... function compute_partial_slices (line 92) | def compute_partial_slices(n_samples: int, class SpeakerVerificationPreprocessor (line 148) | class SpeakerVerificationPreprocessor(object): method __init__ (line 149) | def __init__(self, method preprocess_wav (line 176) | def preprocess_wav(self, fpath_or_wav, source_sr=None): method melspectrogram (line 196) | def melspectrogram(self, wav): method extract_mel_partials (line 202) | def extract_mel_partials(self, wav): FILE: modules/audio/voice_cloning/lstm_tacotron2/chinese_g2p.py function convert_to_pinyin (line 21) | def convert_to_pinyin(text: str) -> List[str]: function convert_sentence (line 29) | def convert_sentence(text: str) -> List[Tuple[str]]: FILE: modules/audio/voice_cloning/lstm_tacotron2/module.py class VoiceCloner (line 43) | class VoiceCloner(nn.Layer): method __init__ (line 44) | def __init__(self, speaker_audio: str = None, output_dir: str = './'): method get_speaker_embedding (line 119) | def get_speaker_embedding(self): method set_speaker_embedding (line 122) | def set_speaker_embedding(self, speaker_audio: str): method forward (line 129) | def forward(self, phones: paddle.Tensor, tones: paddle.Tensor, speaker... method _convert_text_to_input (line 135) | def _convert_text_to_input(self, text: str): method _batchify (line 144) | def _batchify(self, data: List[str], batch_size: int): method generate (line 170) | def generate(self, data: List[str], batch_size: int = 1, use_gpu: bool... FILE: modules/audio/voice_cloning/lstm_tacotron2/preprocess_transcription.py function is_zh (line 108) | def is_zh(word): function ernized (line 114) | def ernized(syllable): function convert (line 118) | def convert(syllable): function split_syllable (line 148) | def split_syllable(syllable: str): FILE: modules/demo/senta_test/module.py class SentaTest (line 18) | class SentaTest: method __init__ (line 19) | def __init__(self): method sentiment_classify (line 29) | def sentiment_classify(self, texts): method run_cmd (line 42) | def run_cmd(self, argvs): FILE: modules/demo/senta_test/processor.py function load_vocab (line 1) | def load_vocab(vocab_path): FILE: modules/image/Image_editing/colorization/deoldify/base_module.py class SequentialEx (line 10) | class SequentialEx(nn.Layer): method __init__ (line 13) | def __init__(self, *layers): method forward (line 17) | def forward(self, x): method __getitem__ (line 28) | def __getitem__(self, i): method append (line 31) | def append(self, l): method extend (line 34) | def extend(self, l): method insert (line 37) | def insert(self, i, l): class Deoldify (line 41) | class Deoldify(SequentialEx): method __init__ (line 43) | def __init__(self, function custom_conv_layer (line 107) | def custom_conv_layer(ni: int, function relu (line 145) | def relu(inplace: bool = False, leaky: float = None): class UnetBlockWide (line 150) | class UnetBlockWide(nn.Layer): method __init__ (line 153) | def __init__(self, method forward (line 172) | def forward(self, up_in): class UnetBlockDeep (line 182) | class UnetBlockDeep(nn.Layer): method __init__ (line 185) | def __init__( method forward (line 206) | def forward(self, up_in): function ifnone (line 216) | def ifnone(a, b): class PixelShuffle_ICNR (line 221) | class PixelShuffle_ICNR(nn.Layer): method __init__ (line 225) | def __init__(self, method forward (line 242) | def forward(self, x): function conv_layer (line 247) | def conv_layer(ni: int, class CustomPixelShuffle_ICNR (line 279) | class CustomPixelShuffle_ICNR(nn.Layer): method __init__ (line 283) | def __init__(self, ni: int, nf: int = None, scale: int = 2, blur: bool... method forward (line 294) | def forward(self, x): class MergeLayer (line 299) | class MergeLayer(nn.Layer): method __init__ (line 302) | def __init__(self, dense: bool = False): method forward (line 307) | def forward(self, x): function res_block (line 313) | def res_block(nf, dense: bool = False, norm_type='Batch', bottle: bool =... class SigmoidRange (line 322) | class SigmoidRange(nn.Layer): method __init__ (line 325) | def __init__(self, low, high): method forward (line 329) | def forward(self, x): function sigmoid_range (line 333) | def sigmoid_range(x, low, high): class PixelShuffle (line 338) | class PixelShuffle(nn.Layer): method __init__ (line 340) | def __init__(self, upscale_factor): method forward (line 344) | def forward(self, x): class ReplicationPad2d (line 348) | class ReplicationPad2d(nn.Layer): method __init__ (line 350) | def __init__(self, size): method forward (line 354) | def forward(self, x): function conv1d (line 358) | def conv1d(ni: int, no: int, ks: int = 1, stride: int = 1, padding: int ... class SelfAttention (line 364) | class SelfAttention(nn.Layer): method __init__ (line 367) | def __init__(self, n_channels): method forward (line 375) | def forward(self, x): function _get_sfs_idxs (line 386) | def _get_sfs_idxs(sizes): function build_model (line 395) | def build_model(): FILE: modules/image/Image_editing/colorization/deoldify/module.py class DeOldifyPredictor (line 37) | class DeOldifyPredictor(nn.Layer): method __init__ (line 39) | def __init__(self, render_factor: int = 32, output_path: int = 'output... method norm (line 59) | def norm(self, img, render_factor=32, render_base=16): method denorm (line 72) | def denorm(self, img): method post_process (line 82) | def post_process(self, raw_color, orig): method run_image (line 92) | def run_image(self, img): method run_video (line 111) | def run_video(self, video): method predict (line 144) | def predict(self, input): method serving_method (line 158) | def serving_method(self, images, **kwargs): method create_gradio_app (line 167) | def create_gradio_app(self): FILE: modules/image/Image_editing/colorization/deoldify/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_run_image1 (line 32) | def test_run_image1(self): method test_run_image2 (line 36) | def test_run_image2(self): method test_run_image3 (line 40) | def test_run_image3(self): method test_predict1 (line 43) | def test_predict1(self): method test_predict2 (line 48) | def test_predict2(self): FILE: modules/image/Image_editing/colorization/deoldify/utils.py function cv2_to_base64 (line 12) | def cv2_to_base64(image): function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function is_listy (line 24) | def is_listy(x): class Hook (line 28) | class Hook(): method __init__ (line 31) | def __init__(self, m, hook_func, is_forward=True, detach=True): method hook_fn (line 37) | def hook_fn(self, module, input, output): method remove (line 44) | def remove(self): method __enter__ (line 50) | def __enter__(self, *args): method __exit__ (line 53) | def __exit__(self, *args): class Hooks (line 57) | class Hooks(): method __init__ (line 60) | def __init__(self, ms, hook_func, is_forward=True, detach=True): method __getitem__ (line 68) | def __getitem__(self, i: int) -> Hook: method __len__ (line 71) | def __len__(self) -> int: method __iter__ (line 74) | def __iter__(self): method stored (line 78) | def stored(self): method remove (line 81) | def remove(self): method __enter__ (line 86) | def __enter__(self, *args): method __exit__ (line 89) | def __exit__(self, *args): function _hook_inner (line 93) | def _hook_inner(m, i, o): function hook_output (line 97) | def hook_output(module, detach=True, grad=False): function hook_outputs (line 102) | def hook_outputs(modules, detach=True, grad=False): function model_sizes (line 107) | def model_sizes(m, size=(64, 64)): function dummy_eval (line 114) | def dummy_eval(m, size=(64, 64)): function dummy_batch (line 120) | def dummy_batch(size=(64, 64), ch_in=3): class _SpectralNorm (line 126) | class _SpectralNorm(nn.SpectralNorm): method __init__ (line 128) | def __init__(self, weight_shape, dim=0, power_iters=1, eps=1e-12, dtyp... method forward (line 131) | def forward(self, weight): class Spectralnorm (line 149) | class Spectralnorm(paddle.nn.Layer): method __init__ (line 151) | def __init__(self, layer, dim=0, power_iters=1, eps=1e-12, dtype='floa... method forward (line 163) | def forward(self, x): function video2frames (line 170) | def video2frames(video_path, outpath, **kargs): function frames2video (line 200) | def frames2video(frame_path, video_path, r): function is_image (line 211) | def is_image(input): FILE: modules/image/Image_editing/colorization/photo_restoration/module.py class PhotoRestoreModel (line 32) | class PhotoRestoreModel(nn.Layer): method __init__ (line 41) | def __init__(self, visualization: bool = False): method run_image (line 47) | def run_image(self, method serving_method (line 75) | def serving_method(self, images, model_select): FILE: modules/image/Image_editing/colorization/photo_restoration/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_run_image1 (line 31) | def test_run_image1(self): method test_run_image2 (line 37) | def test_run_image2(self): method test_run_image3 (line 43) | def test_run_image3(self): FILE: modules/image/Image_editing/colorization/photo_restoration/utils.py function cv2_to_base64 (line 6) | def cv2_to_base64(image): function base64_to_cv2 (line 11) | def base64_to_cv2(b64str): FILE: modules/image/Image_editing/colorization/user_guided_colorization/data_feed.py class ColorizeHint (line 5) | class ColorizeHint: method __init__ (line 22) | def __init__(self, percent: float, num_points: int = None, samp: str =... method __call__ (line 28) | def __call__(self, data: np.ndarray, hint: np.ndarray, mask: np.ndarray): class ColorizePreprocess (line 69) | class ColorizePreprocess: method __init__ (line 85) | def __init__(self, method __call__ (line 98) | def __call__(self, data_lab): FILE: modules/image/Image_editing/colorization/user_guided_colorization/module.py class UserGuidedColorization (line 34) | class UserGuidedColorization(nn.Layer): method __init__ (line 44) | def __init__(self, use_tanh: bool = True, load_checkpoint: str = None): method transforms (line 186) | def transforms(self, images: str) -> callable: method set_config (line 191) | def set_config(self, classification: bool = True, prob: float = 1., nu... method preprocess (line 195) | def preprocess(self, inputs: paddle.Tensor): method forward (line 199) | def forward(self, FILE: modules/image/Image_editing/colorization/user_guided_colorization/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_predict1 (line 31) | def test_predict1(self): method test_predict2 (line 46) | def test_predict2(self): method test_predict3 (line 61) | def test_predict3(self): method test_predict4 (line 76) | def test_predict4(self): FILE: modules/image/Image_editing/enhancement/fbcnn_color/fbcnn.py function sequential (line 13) | def sequential(*args): function conv (line 37) | def conv(in_channels=64, class ResBlock (line 99) | class ResBlock(nn.Layer): method __init__ (line 101) | def __init__(self, method forward (line 118) | def forward(self, x): function upsample_pixelshuffle (line 126) | def upsample_pixelshuffle(in_channels=64, function upsample_upconv (line 149) | def upsample_upconv(in_channels=64, function upsample_convtranspose (line 172) | def upsample_convtranspose(in_channels=64, function downsample_strideconv (line 203) | def downsample_strideconv(in_channels=64, function downsample_maxpool (line 222) | def downsample_maxpool(in_channels=64, function downsample_avgpool (line 249) | def downsample_avgpool(in_channels=64, class QFAttention (line 273) | class QFAttention(nn.Layer): method __init__ (line 275) | def __init__(self, method forward (line 292) | def forward(self, x, gamma, beta): class FBCNN (line 299) | class FBCNN(nn.Layer): method __init__ (line 301) | def __init__(self, method forward (line 378) | def forward(self, x, qf_input=None): FILE: modules/image/Image_editing/enhancement/fbcnn_color/module.py function cv2_to_base64 (line 18) | def cv2_to_base64(image): function base64_to_cv2 (line 23) | def base64_to_cv2(b64str): class FBCNNColor (line 38) | class FBCNNColor(nn.Layer): method __init__ (line 40) | def __init__(self): method preprocess (line 48) | def preprocess(self, img: np.ndarray) -> np.ndarray: method postprocess (line 54) | def postprocess(self, img: np.ndarray) -> np.ndarray: method artifacts_removal (line 61) | def artifacts_removal(self, method run_cmd (line 97) | def run_cmd(self, argvs): method serving_method (line 119) | def serving_method(self, image, **kwargs): FILE: modules/image/Image_editing/enhancement/fbcnn_color/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_artifacts_removal1 (line 32) | def test_artifacts_removal1(self): method test_artifacts_removal2 (line 37) | def test_artifacts_removal2(self): method test_artifacts_removal3 (line 44) | def test_artifacts_removal3(self): method test_artifacts_removal4 (line 51) | def test_artifacts_removal4(self): method test_artifacts_removal5 (line 54) | def test_artifacts_removal5(self): FILE: modules/image/Image_editing/enhancement/fbcnn_gray/fbcnn.py function sequential (line 13) | def sequential(*args): function conv (line 37) | def conv(in_channels=64, class ResBlock (line 99) | class ResBlock(nn.Layer): method __init__ (line 101) | def __init__(self, method forward (line 118) | def forward(self, x): function upsample_pixelshuffle (line 126) | def upsample_pixelshuffle(in_channels=64, function upsample_upconv (line 149) | def upsample_upconv(in_channels=64, function upsample_convtranspose (line 172) | def upsample_convtranspose(in_channels=64, function downsample_strideconv (line 203) | def downsample_strideconv(in_channels=64, function downsample_maxpool (line 222) | def downsample_maxpool(in_channels=64, function downsample_avgpool (line 249) | def downsample_avgpool(in_channels=64, class QFAttention (line 273) | class QFAttention(nn.Layer): method __init__ (line 275) | def __init__(self, method forward (line 292) | def forward(self, x, gamma, beta): class FBCNN (line 299) | class FBCNN(nn.Layer): method __init__ (line 301) | def __init__(self, method forward (line 378) | def forward(self, x, qf_input=None): FILE: modules/image/Image_editing/enhancement/fbcnn_gray/module.py function cv2_to_base64 (line 18) | def cv2_to_base64(image): function base64_to_cv2 (line 23) | def base64_to_cv2(b64str): class FBCNNGary (line 38) | class FBCNNGary(nn.Layer): method __init__ (line 40) | def __init__(self): method preprocess (line 48) | def preprocess(self, img: np.ndarray) -> np.ndarray: method postprocess (line 53) | def postprocess(self, img: np.ndarray) -> np.ndarray: method artifacts_removal (line 58) | def artifacts_removal(self, method run_cmd (line 94) | def run_cmd(self, argvs): method serving_method (line 116) | def serving_method(self, image, **kwargs): FILE: modules/image/Image_editing/enhancement/fbcnn_gray/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_artifacts_removal1 (line 32) | def test_artifacts_removal1(self): method test_artifacts_removal2 (line 37) | def test_artifacts_removal2(self): method test_artifacts_removal3 (line 44) | def test_artifacts_removal3(self): method test_artifacts_removal4 (line 51) | def test_artifacts_removal4(self): method test_artifacts_removal5 (line 54) | def test_artifacts_removal5(self): FILE: modules/image/Image_editing/super_resolution/dcscn/data_feed.py function reader (line 13) | def reader(images=None, paths=None): FILE: modules/image/Image_editing/super_resolution/dcscn/module.py class Dcscn (line 38) | class Dcscn: method __init__ (line 39) | def __init__(self): method _set_config (line 43) | def _set_config(self): method reconstruct (line 66) | def reconstruct(self, images=None, paths=None, use_gpu=False, visualiz... method serving_method (line 128) | def serving_method(self, images, **kwargs): method run_cmd (line 138) | def run_cmd(self, argvs): method add_module_config_arg (line 162) | def add_module_config_arg(self): method add_module_input_arg (line 175) | def add_module_input_arg(self): FILE: modules/image/Image_editing/super_resolution/dcscn/processor.py function cv2_to_base64 (line 12) | def cv2_to_base64(image): function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function postprocess (line 24) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 61) | def check_dir(dir_path): function get_save_image_name (line 69) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/Image_editing/super_resolution/dcscn/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_reconstruct1 (line 32) | def test_reconstruct1(self): method test_reconstruct2 (line 40) | def test_reconstruct2(self): method test_reconstruct3 (line 48) | def test_reconstruct3(self): method test_reconstruct4 (line 56) | def test_reconstruct4(self): method test_reconstruct5 (line 64) | def test_reconstruct5(self): method test_reconstruct6 (line 71) | def test_reconstruct6(self): method test_save_inference_model (line 78) | def test_save_inference_model(self): FILE: modules/image/Image_editing/super_resolution/falsr_a/data_feed.py function reader (line 11) | def reader(images=None, paths=None): FILE: modules/image/Image_editing/super_resolution/falsr_a/module.py class Falsr_A (line 38) | class Falsr_A: method __init__ (line 40) | def __init__(self): method _set_config (line 44) | def _set_config(self): method reconstruct (line 67) | def reconstruct(self, images=None, paths=None, use_gpu=False, visualiz... method serving_method (line 124) | def serving_method(self, images, **kwargs): method run_cmd (line 134) | def run_cmd(self, argvs): method add_module_config_arg (line 159) | def add_module_config_arg(self): method add_module_input_arg (line 180) | def add_module_input_arg(self): method create_gradio_app (line 186) | def create_gradio_app(self): FILE: modules/image/Image_editing/super_resolution/falsr_a/processor.py function cv2_to_base64 (line 11) | def cv2_to_base64(image): function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function postprocess (line 23) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 58) | def check_dir(dir_path): function get_save_image_name (line 66) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/Image_editing/super_resolution/falsr_a/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_reconstruct1 (line 33) | def test_reconstruct1(self): method test_reconstruct2 (line 37) | def test_reconstruct2(self): method test_reconstruct3 (line 41) | def test_reconstruct3(self): method test_reconstruct4 (line 45) | def test_reconstruct4(self): method test_reconstruct5 (line 49) | def test_reconstruct5(self): method test_reconstruct6 (line 52) | def test_reconstruct6(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/Image_editing/super_resolution/falsr_b/data_feed.py function reader (line 11) | def reader(images=None, paths=None): FILE: modules/image/Image_editing/super_resolution/falsr_b/module.py class Falsr_B (line 38) | class Falsr_B: method __init__ (line 40) | def __init__(self): method _set_config (line 44) | def _set_config(self): method reconstruct (line 67) | def reconstruct(self, images=None, paths=None, use_gpu=False, visualiz... method serving_method (line 124) | def serving_method(self, images, **kwargs): method run_cmd (line 134) | def run_cmd(self, argvs): method add_module_config_arg (line 159) | def add_module_config_arg(self): method add_module_input_arg (line 180) | def add_module_input_arg(self): method create_gradio_app (line 186) | def create_gradio_app(self): FILE: modules/image/Image_editing/super_resolution/falsr_b/processor.py function cv2_to_base64 (line 11) | def cv2_to_base64(image): function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function postprocess (line 23) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 58) | def check_dir(dir_path): function get_save_image_name (line 66) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/Image_editing/super_resolution/falsr_b/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_reconstruct1 (line 33) | def test_reconstruct1(self): method test_reconstruct2 (line 37) | def test_reconstruct2(self): method test_reconstruct3 (line 41) | def test_reconstruct3(self): method test_reconstruct4 (line 45) | def test_reconstruct4(self): method test_reconstruct5 (line 49) | def test_reconstruct5(self): method test_reconstruct6 (line 52) | def test_reconstruct6(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/Image_editing/super_resolution/falsr_c/data_feed.py function reader (line 11) | def reader(images=None, paths=None): FILE: modules/image/Image_editing/super_resolution/falsr_c/module.py class Falsr_C (line 39) | class Falsr_C: method __init__ (line 41) | def __init__(self): method _set_config (line 45) | def _set_config(self): method reconstruct (line 68) | def reconstruct(self, images=None, paths=None, use_gpu=False, visualiz... method serving_method (line 125) | def serving_method(self, images, **kwargs): method run_cmd (line 135) | def run_cmd(self, argvs): method add_module_config_arg (line 160) | def add_module_config_arg(self): method add_module_input_arg (line 181) | def add_module_input_arg(self): method create_gradio_app (line 187) | def create_gradio_app(self): FILE: modules/image/Image_editing/super_resolution/falsr_c/processor.py function cv2_to_base64 (line 11) | def cv2_to_base64(image): function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function postprocess (line 23) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 58) | def check_dir(dir_path): function get_save_image_name (line 66) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/Image_editing/super_resolution/falsr_c/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_reconstruct1 (line 33) | def test_reconstruct1(self): method test_reconstruct2 (line 37) | def test_reconstruct2(self): method test_reconstruct3 (line 41) | def test_reconstruct3(self): method test_reconstruct4 (line 45) | def test_reconstruct4(self): method test_reconstruct5 (line 49) | def test_reconstruct5(self): method test_reconstruct6 (line 52) | def test_reconstruct6(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/Image_editing/super_resolution/realsr/module.py class RealSRPredictor (line 36) | class RealSRPredictor(nn.Layer): method __init__ (line 37) | def __init__(self, output='output', weight_path=None, load_checkpoint:... method norm (line 58) | def norm(self, img): method denorm (line 62) | def denorm(self, img): method run_image (line 66) | def run_image(self, img): method run_video (line 85) | def run_video(self, video): method predict (line 119) | def predict(self, input): method serving_method (line 140) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_editing/super_resolution/realsr/rrdb.py class Registry (line 7) | class Registry(object): method __init__ (line 23) | def __init__(self, name): method _do_register (line 32) | def _do_register(self, name, obj): method register (line 38) | def register(self, obj=None, name=None): method get (line 58) | def get(self, name): class ResidualDenseBlock_5C (line 66) | class ResidualDenseBlock_5C(nn.Layer): method __init__ (line 67) | def __init__(self, nf=64, gc=32, bias=True): method forward (line 77) | def forward(self, x): class RRDB (line 86) | class RRDB(nn.Layer): method __init__ (line 88) | def __init__(self, nf, gc=32): method forward (line 94) | def forward(self, x): function make_layer (line 101) | def make_layer(block, n_layers): class RRDBNet (line 110) | class RRDBNet(nn.Layer): method __init__ (line 111) | def __init__(self, in_nc, out_nc, nf, nb, gc=32): method forward (line 126) | def forward(self, x): FILE: modules/image/Image_editing/super_resolution/realsr/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_run_image1 (line 31) | def test_run_image1(self): method test_run_image2 (line 37) | def test_run_image2(self): method test_run_image3 (line 43) | def test_run_image3(self): method test_predict1 (line 50) | def test_predict1(self): method test_predict2 (line 57) | def test_predict2(self): FILE: modules/image/Image_editing/super_resolution/realsr/utils.py function video2frames (line 10) | def video2frames(video_path, outpath, **kargs): function frames2video (line 39) | def frames2video(frame_path, video_path, r): function is_image (line 52) | def is_image(input): function cv2_to_base64 (line 61) | def cv2_to_base64(image): function base64_to_cv2 (line 66) | def base64_to_cv2(b64str): FILE: modules/image/Image_editing/super_resolution/swin2sr_real_sr_x4/module.py function cv2_to_base64 (line 18) | def cv2_to_base64(image): function base64_to_cv2 (line 23) | def base64_to_cv2(b64str): class SwinIRMRealSR (line 38) | class SwinIRMRealSR(nn.Layer): method __init__ (line 40) | def __init__(self): method preprocess (line 59) | def preprocess(self, img: np.ndarray) -> np.ndarray: method postprocess (line 65) | def postprocess(self, img: np.ndarray) -> np.ndarray: method real_sr (line 72) | def real_sr(self, method run_cmd (line 104) | def run_cmd(self, argvs): method serving_method (line 122) | def serving_method(self, image, **kwargs): FILE: modules/image/Image_editing/super_resolution/swin2sr_real_sr_x4/swin2sr.py function _ntuple (line 11) | def _ntuple(n): class Mlp (line 24) | class Mlp(nn.Layer): method __init__ (line 26) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 35) | def forward(self, x): function window_partition (line 44) | def window_partition(x, window_size): function window_reverse (line 58) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 74) | class WindowAttention(nn.Layer): method __init__ (line 87) | def __init__(self, method forward (line 159) | def forward(self, x, mask=None): method extra_repr (line 203) | def extra_repr(self) -> str: method flops (line 207) | def flops(self, N): class SwinTransformerBlock (line 221) | class SwinTransformerBlock(nn.Layer): method __init__ (line 239) | def __init__(self, method calculate_mask (line 288) | def calculate_mask(self, x_size): method forward (line 317) | def forward(self, x, x_size): method extra_repr (line 361) | def extra_repr(self) -> str: method flops (line 365) | def flops(self): class PatchMerging (line 380) | class PatchMerging(nn.Layer): method __init__ (line 388) | def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm): method forward (line 395) | def forward(self, x): method extra_repr (line 418) | def extra_repr(self) -> str: method flops (line 421) | def flops(self): class BasicLayer (line 428) | class BasicLayer(nn.Layer): method __init__ (line 447) | def __init__(self, method forward (line 491) | def forward(self, x, x_size): method extra_repr (line 498) | def extra_repr(self) -> str: method flops (line 501) | def flops(self): class PatchEmbed (line 510) | class PatchEmbed(nn.Layer): method __init__ (line 520) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 539) | def forward(self, x): method flops (line 549) | def flops(self): class RSTB (line 558) | class RSTB(nn.Layer): method __init__ (line 579) | def __init__(self, method forward (line 635) | def forward(self, x, x_size): method flops (line 638) | def flops(self): class PatchUnEmbed (line 649) | class PatchUnEmbed(nn.Layer): method __init__ (line 659) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 672) | def forward(self, x, x_size): method flops (line 677) | def flops(self): class Upsample (line 682) | class Upsample(nn.Sequential): method __init__ (line 689) | def __init__(self, scale, num_feat): class Upsample_hf (line 704) | class Upsample_hf(nn.Sequential): method __init__ (line 711) | def __init__(self, scale, num_feat): class UpsampleOneStep (line 726) | class UpsampleOneStep(nn.Sequential): method __init__ (line 734) | def __init__(self, scale, num_feat, num_out_ch, input_resolution=None): method flops (line 742) | def flops(self): class Swin2SR (line 748) | class Swin2SR(nn.Layer): method __init__ (line 774) | def __init__(self, method check_image_size (line 951) | def check_image_size(self, x): method forward_features (line 958) | def forward_features(self, x): method forward_features_hf (line 973) | def forward_features_hf(self, x): method forward (line 988) | def forward(self, x): method flops (line 1059) | def flops(self): FILE: modules/image/Image_editing/super_resolution/swin2sr_real_sr_x4/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_real_sr1 (line 35) | def test_real_sr1(self): method test_real_sr2 (line 40) | def test_real_sr2(self): method test_real_sr3 (line 45) | def test_real_sr3(self): method test_real_sr4 (line 50) | def test_real_sr4(self): method test_real_sr5 (line 53) | def test_real_sr5(self): FILE: modules/image/Image_editing/super_resolution/swinir_l_real_sr_x4/module.py function cv2_to_base64 (line 18) | def cv2_to_base64(image): function base64_to_cv2 (line 23) | def base64_to_cv2(b64str): class SwinIRMRealSR (line 38) | class SwinIRMRealSR(nn.Layer): method __init__ (line 40) | def __init__(self): method preprocess (line 59) | def preprocess(self, img: np.ndarray) -> np.ndarray: method postprocess (line 65) | def postprocess(self, img: np.ndarray) -> np.ndarray: method real_sr (line 72) | def real_sr(self, method run_cmd (line 104) | def run_cmd(self, argvs): method serving_method (line 122) | def serving_method(self, image, **kwargs): FILE: modules/image/Image_editing/super_resolution/swinir_l_real_sr_x4/swinir.py function to_2tuple (line 8) | def to_2tuple(x): class Mlp (line 15) | class Mlp(nn.Layer): method __init__ (line 17) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 26) | def forward(self, x): function window_partition (line 35) | def window_partition(x, window_size): function window_reverse (line 49) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 65) | class WindowAttention(nn.Layer): method __init__ (line 78) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 113) | def forward(self, x, mask=None): method extra_repr (line 147) | def extra_repr(self) -> str: method flops (line 150) | def flops(self, N): class SwinTransformerBlock (line 164) | class SwinTransformerBlock(nn.Layer): method __init__ (line 182) | def __init__(self, method calculate_mask (line 230) | def calculate_mask(self, x_size): method forward (line 257) | def forward(self, x, x_size): method extra_repr (line 299) | def extra_repr(self) -> str: method flops (line 303) | def flops(self): class PatchMerging (line 318) | class PatchMerging(nn.Layer): method __init__ (line 326) | def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm): method forward (line 333) | def forward(self, x): method extra_repr (line 356) | def extra_repr(self) -> str: method flops (line 359) | def flops(self): class BasicLayer (line 366) | class BasicLayer(nn.Layer): method __init__ (line 385) | def __init__(self, method forward (line 429) | def forward(self, x, x_size): method extra_repr (line 436) | def extra_repr(self) -> str: method flops (line 439) | def flops(self): class RSTB (line 448) | class RSTB(nn.Layer): method __init__ (line 470) | def __init__(self, method forward (line 528) | def forward(self, x, x_size): method flops (line 531) | def flops(self): class PatchEmbed (line 542) | class PatchEmbed(nn.Layer): method __init__ (line 552) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 570) | def forward(self, x): method flops (line 576) | def flops(self): class PatchUnEmbed (line 584) | class PatchUnEmbed(nn.Layer): method __init__ (line 594) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 607) | def forward(self, x, x_size): method flops (line 612) | def flops(self): class Upsample (line 617) | class Upsample(nn.Sequential): method __init__ (line 624) | def __init__(self, scale, num_feat): class UpsampleOneStep (line 639) | class UpsampleOneStep(nn.Sequential): method __init__ (line 647) | def __init__(self, scale, num_feat, num_out_ch, input_resolution=None): method flops (line 655) | def flops(self): class SwinIR (line 661) | class SwinIR(nn.Layer): method __init__ (line 688) | def __init__(self, method _init_weights (line 827) | def _init_weights(self, m): method check_image_size (line 835) | def check_image_size(self, x): method forward_features (line 842) | def forward_features(self, x): method forward (line 857) | def forward(self, x): method flops (line 894) | def flops(self): FILE: modules/image/Image_editing/super_resolution/swinir_l_real_sr_x4/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_real_sr1 (line 35) | def test_real_sr1(self): method test_real_sr2 (line 40) | def test_real_sr2(self): method test_real_sr3 (line 45) | def test_real_sr3(self): method test_real_sr4 (line 50) | def test_real_sr4(self): method test_real_sr5 (line 53) | def test_real_sr5(self): FILE: modules/image/Image_editing/super_resolution/swinir_m_real_sr_x2/module.py function cv2_to_base64 (line 18) | def cv2_to_base64(image): function base64_to_cv2 (line 23) | def base64_to_cv2(b64str): class SwinIRMRealSR (line 38) | class SwinIRMRealSR(nn.Layer): method __init__ (line 40) | def __init__(self): method preprocess (line 59) | def preprocess(self, img: np.ndarray) -> np.ndarray: method postprocess (line 65) | def postprocess(self, img: np.ndarray) -> np.ndarray: method real_sr (line 72) | def real_sr(self, method run_cmd (line 104) | def run_cmd(self, argvs): method serving_method (line 122) | def serving_method(self, image, **kwargs): FILE: modules/image/Image_editing/super_resolution/swinir_m_real_sr_x2/swinir.py function to_2tuple (line 8) | def to_2tuple(x): class Mlp (line 15) | class Mlp(nn.Layer): method __init__ (line 17) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 26) | def forward(self, x): function window_partition (line 35) | def window_partition(x, window_size): function window_reverse (line 49) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 65) | class WindowAttention(nn.Layer): method __init__ (line 78) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 113) | def forward(self, x, mask=None): method extra_repr (line 147) | def extra_repr(self) -> str: method flops (line 150) | def flops(self, N): class SwinTransformerBlock (line 164) | class SwinTransformerBlock(nn.Layer): method __init__ (line 182) | def __init__(self, method calculate_mask (line 230) | def calculate_mask(self, x_size): method forward (line 257) | def forward(self, x, x_size): method extra_repr (line 299) | def extra_repr(self) -> str: method flops (line 303) | def flops(self): class PatchMerging (line 318) | class PatchMerging(nn.Layer): method __init__ (line 326) | def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm): method forward (line 333) | def forward(self, x): method extra_repr (line 356) | def extra_repr(self) -> str: method flops (line 359) | def flops(self): class BasicLayer (line 366) | class BasicLayer(nn.Layer): method __init__ (line 385) | def __init__(self, method forward (line 429) | def forward(self, x, x_size): method extra_repr (line 436) | def extra_repr(self) -> str: method flops (line 439) | def flops(self): class RSTB (line 448) | class RSTB(nn.Layer): method __init__ (line 470) | def __init__(self, method forward (line 528) | def forward(self, x, x_size): method flops (line 531) | def flops(self): class PatchEmbed (line 542) | class PatchEmbed(nn.Layer): method __init__ (line 552) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 570) | def forward(self, x): method flops (line 576) | def flops(self): class PatchUnEmbed (line 584) | class PatchUnEmbed(nn.Layer): method __init__ (line 594) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 607) | def forward(self, x, x_size): method flops (line 612) | def flops(self): class Upsample (line 617) | class Upsample(nn.Sequential): method __init__ (line 624) | def __init__(self, scale, num_feat): class UpsampleOneStep (line 639) | class UpsampleOneStep(nn.Sequential): method __init__ (line 647) | def __init__(self, scale, num_feat, num_out_ch, input_resolution=None): method flops (line 655) | def flops(self): class SwinIR (line 661) | class SwinIR(nn.Layer): method __init__ (line 688) | def __init__(self, method _init_weights (line 827) | def _init_weights(self, m): method check_image_size (line 835) | def check_image_size(self, x): method forward_features (line 842) | def forward_features(self, x): method forward (line 857) | def forward(self, x): method flops (line 894) | def flops(self): FILE: modules/image/Image_editing/super_resolution/swinir_m_real_sr_x2/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_real_sr1 (line 35) | def test_real_sr1(self): method test_real_sr2 (line 40) | def test_real_sr2(self): method test_real_sr3 (line 45) | def test_real_sr3(self): method test_real_sr4 (line 50) | def test_real_sr4(self): method test_real_sr5 (line 53) | def test_real_sr5(self): FILE: modules/image/Image_editing/super_resolution/swinir_m_real_sr_x4/module.py function cv2_to_base64 (line 18) | def cv2_to_base64(image): function base64_to_cv2 (line 23) | def base64_to_cv2(b64str): class SwinIRMRealSR (line 38) | class SwinIRMRealSR(nn.Layer): method __init__ (line 40) | def __init__(self): method preprocess (line 59) | def preprocess(self, img: np.ndarray) -> np.ndarray: method postprocess (line 65) | def postprocess(self, img: np.ndarray) -> np.ndarray: method real_sr (line 72) | def real_sr(self, method run_cmd (line 104) | def run_cmd(self, argvs): method serving_method (line 122) | def serving_method(self, image, **kwargs): FILE: modules/image/Image_editing/super_resolution/swinir_m_real_sr_x4/swinir.py function to_2tuple (line 8) | def to_2tuple(x): class Mlp (line 15) | class Mlp(nn.Layer): method __init__ (line 17) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 26) | def forward(self, x): function window_partition (line 35) | def window_partition(x, window_size): function window_reverse (line 49) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 65) | class WindowAttention(nn.Layer): method __init__ (line 78) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 113) | def forward(self, x, mask=None): method extra_repr (line 147) | def extra_repr(self) -> str: method flops (line 150) | def flops(self, N): class SwinTransformerBlock (line 164) | class SwinTransformerBlock(nn.Layer): method __init__ (line 182) | def __init__(self, method calculate_mask (line 230) | def calculate_mask(self, x_size): method forward (line 257) | def forward(self, x, x_size): method extra_repr (line 299) | def extra_repr(self) -> str: method flops (line 303) | def flops(self): class PatchMerging (line 318) | class PatchMerging(nn.Layer): method __init__ (line 326) | def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm): method forward (line 333) | def forward(self, x): method extra_repr (line 356) | def extra_repr(self) -> str: method flops (line 359) | def flops(self): class BasicLayer (line 366) | class BasicLayer(nn.Layer): method __init__ (line 385) | def __init__(self, method forward (line 429) | def forward(self, x, x_size): method extra_repr (line 436) | def extra_repr(self) -> str: method flops (line 439) | def flops(self): class RSTB (line 448) | class RSTB(nn.Layer): method __init__ (line 470) | def __init__(self, method forward (line 528) | def forward(self, x, x_size): method flops (line 531) | def flops(self): class PatchEmbed (line 542) | class PatchEmbed(nn.Layer): method __init__ (line 552) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 570) | def forward(self, x): method flops (line 576) | def flops(self): class PatchUnEmbed (line 584) | class PatchUnEmbed(nn.Layer): method __init__ (line 594) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 607) | def forward(self, x, x_size): method flops (line 612) | def flops(self): class Upsample (line 617) | class Upsample(nn.Sequential): method __init__ (line 624) | def __init__(self, scale, num_feat): class UpsampleOneStep (line 639) | class UpsampleOneStep(nn.Sequential): method __init__ (line 647) | def __init__(self, scale, num_feat, num_out_ch, input_resolution=None): method flops (line 655) | def flops(self): class SwinIR (line 661) | class SwinIR(nn.Layer): method __init__ (line 688) | def __init__(self, method _init_weights (line 827) | def _init_weights(self, m): method check_image_size (line 835) | def check_image_size(self, x): method forward_features (line 842) | def forward_features(self, x): method forward (line 857) | def forward(self, x): method flops (line 894) | def flops(self): FILE: modules/image/Image_editing/super_resolution/swinir_m_real_sr_x4/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_real_sr1 (line 35) | def test_real_sr1(self): method test_real_sr2 (line 40) | def test_real_sr2(self): method test_real_sr3 (line 45) | def test_real_sr3(self): method test_real_sr4 (line 50) | def test_real_sr4(self): method test_real_sr5 (line 53) | def test_real_sr5(self): FILE: modules/image/Image_gan/gan/first_order_motion/model.py class FirstOrderPredictor (line 34) | class FirstOrderPredictor: method __init__ (line 35) | def __init__(self, method read_img (line 111) | def read_img(self, path): method run (line 120) | def run(self, source_image, driving_video, ratio, image_size, output_d... method load_checkpoints (line 212) | def load_checkpoints(self, config, checkpoint_path): method make_animation (line 229) | def make_animation(self, method find_best_frame_func (line 274) | def find_best_frame_func(self, source, driving): method extract_bbox (line 299) | def extract_bbox(self, image): method IOU (line 342) | def IOU(self, ax1, ay1, ax2, ay2, sa, bx1, by1, bx2, by2, sb): FILE: modules/image/Image_gan/gan/first_order_motion/module.py class FirstOrderMotion (line 32) | class FirstOrderMotion: method __init__ (line 33) | def __init__(self): method generate (line 37) | def generate(self, method run_cmd (line 63) | def run_cmd(self, argvs: list): method add_module_config_arg (line 88) | def add_module_config_arg(self): method add_module_input_arg (line 98) | def add_module_input_arg(self): FILE: modules/image/Image_gan/gan/photopen/model.py class PhotoPenPredictor (line 26) | class PhotoPenPredictor: method __init__ (line 27) | def __init__(self, weight_path, gen_cfg): method run (line 50) | def run(self, image): FILE: modules/image/Image_gan/gan/photopen/module.py class Photopen (line 36) | class Photopen: method __init__ (line 37) | def __init__(self): method photo_transfer (line 42) | def photo_transfer(self, method run_cmd (line 86) | def run_cmd(self, argvs: list): method serving_method (line 110) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 119) | def add_module_config_arg(self): method add_module_input_arg (line 129) | def add_module_input_arg(self): FILE: modules/image/Image_gan/gan/photopen/util.py function base64_to_cv2 (line 7) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/gan/pixel2style2pixel/model.py function run_alignment (line 69) | def run_alignment(image): class AttrDict (line 148) | class AttrDict(dict): method __init__ (line 149) | def __init__(self, *args, **kwargs): class Pixel2Style2PixelPredictor (line 154) | class Pixel2Style2PixelPredictor: method __init__ (line 155) | def __init__(self, method run (line 195) | def run(self, image): FILE: modules/image/Image_gan/gan/pixel2style2pixel/module.py class pixel2style2pixel (line 38) | class pixel2style2pixel: method __init__ (line 39) | def __init__(self): method style_transfer (line 44) | def style_transfer(self, method run_cmd (line 90) | def run_cmd(self, argvs: list): method serving_method (line 114) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 123) | def add_module_config_arg(self): method add_module_input_arg (line 133) | def add_module_input_arg(self): FILE: modules/image/Image_gan/gan/pixel2style2pixel/util.py function base64_to_cv2 (line 6) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/gan/stgan_bald/data_feed.py function reader (line 12) | def reader(images=None, paths=None, org_labels=None, target_labels=None): FILE: modules/image/Image_gan/gan/stgan_bald/module.py function check_attribute_conflict (line 26) | def check_attribute_conflict(label_batch): class StganBald (line 50) | class StganBald: method __init__ (line 51) | def __init__(self): method _set_config (line 56) | def _set_config(self): method bald (line 83) | def bald(self, method serving_method (line 172) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/gan/stgan_bald/processor.py function cv2_to_base64 (line 12) | def cv2_to_base64(image): function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function postprocess (line 24) | def postprocess(data_out, function check_dir (line 64) | def check_dir(dir_path): function get_save_image_name (line 72) | def get_save_image_name(org_im_path, output_dir, num): FILE: modules/image/Image_gan/gan/stgan_bald/test.py class TestHubModule (line 11) | class TestHubModule(unittest.TestCase): method setUpClass (line 13) | def setUpClass(cls) -> None: method tearDownClass (line 24) | def tearDownClass(cls) -> None: method test_bald1 (line 29) | def test_bald1(self): method test_bald2 (line 40) | def test_bald2(self): method test_bald3 (line 51) | def test_bald3(self): method test_bald4 (line 63) | def test_bald4(self): method test_bald5 (line 70) | def test_bald5(self): method test_save_inference_model (line 77) | def test_save_inference_model(self): FILE: modules/image/Image_gan/gan/styleganv2_editing/basemodel.py function get_mean_style (line 42) | def get_mean_style(generator): function sample (line 59) | def sample(generator, mean_style, n_sample): function style_mixing (line 70) | def style_mixing(generator, mean_style, n_source, n_target): class StyleGANv2Predictor (line 97) | class StyleGANv2Predictor: method __init__ (line 98) | def __init__(self, method run (line 131) | def run(self, n_row=3, n_col=5): FILE: modules/image/Image_gan/gan/styleganv2_editing/model.py function make_image (line 30) | def make_image(tensor): class StyleGANv2EditingPredictor (line 34) | class StyleGANv2EditingPredictor(StyleGANv2Predictor): method __init__ (line 35) | def __init__(self, model_type=None, direction_path=None, **kwargs): method run (line 44) | def run(self, latent, direction, offset): FILE: modules/image/Image_gan/gan/styleganv2_editing/module.py class styleganv2_editing (line 38) | class styleganv2_editing: method __init__ (line 39) | def __init__(self): method generate (line 45) | def generate(self, method run_cmd (line 98) | def run_cmd(self, argvs: list): method serving_method (line 124) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 133) | def add_module_config_arg(self): method add_module_input_arg (line 143) | def add_module_input_arg(self): FILE: modules/image/Image_gan/gan/styleganv2_editing/util.py function base64_to_cv2 (line 6) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/gan/styleganv2_mixing/basemodel.py function get_mean_style (line 42) | def get_mean_style(generator): function sample (line 59) | def sample(generator, mean_style, n_sample): function style_mixing (line 70) | def style_mixing(generator, mean_style, n_source, n_target): class StyleGANv2Predictor (line 97) | class StyleGANv2Predictor: method __init__ (line 98) | def __init__(self, method run (line 131) | def run(self, n_row=3, n_col=5): FILE: modules/image/Image_gan/gan/styleganv2_mixing/model.py function make_image (line 23) | def make_image(tensor): class StyleGANv2MixingPredictor (line 27) | class StyleGANv2MixingPredictor(StyleGANv2Predictor): method run (line 29) | def run(self, latent1, latent2, weights=[0.5] * 18): FILE: modules/image/Image_gan/gan/styleganv2_mixing/module.py class styleganv2_mixing (line 38) | class styleganv2_mixing: method __init__ (line 39) | def __init__(self): method generate (line 44) | def generate(self, method run_cmd (line 100) | def run_cmd(self, argvs: list): method serving_method (line 128) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 140) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/Image_gan/gan/styleganv2_mixing/util.py function base64_to_cv2 (line 6) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/gan/wav2lip/model.py class Wav2LipPredictor (line 18) | class Wav2LipPredictor: method __init__ (line 19) | def __init__(self, method get_smoothened_boxes (line 52) | def get_smoothened_boxes(self, boxes, T): method face_detect (line 61) | def face_detect(self, images): method datagen (line 102) | def datagen(self, frames, mels): method run (line 150) | def run(self, face, audio_seq, output_dir, visualization=True): FILE: modules/image/Image_gan/gan/wav2lip/module.py class wav2lip (line 29) | class wav2lip: method __init__ (line 30) | def __init__(self): method wav2lip_transfer (line 48) | def wav2lip_transfer(self, face, audio, output_dir='./output_result/',... method run_cmd (line 62) | def run_cmd(self, argvs: list): method add_module_config_arg (line 86) | def add_module_config_arg(self): method add_module_input_arg (line 96) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/ID_Photo_GEN/module.py class ID_Photo_GEN (line 19) | class ID_Photo_GEN(nn.Layer): method __init__ (line 20) | def __init__(self): method load_datas (line 30) | def load_datas(paths, images): method preprocess (line 47) | def preprocess(self, images, batch_size, use_gpu): method predict (line 133) | def predict(self, input_datas): method postprocess (line 151) | def postprocess(faces, masks, visualization, output_dir): method Photo_GEN (line 175) | def Photo_GEN(self, images=None, paths=None, batch_size=1, output_dir=... FILE: modules/image/Image_gan/style_transfer/Photo2Cartoon/model/networks.py class ResnetGenerator (line 6) | class ResnetGenerator(nn.Layer): method __init__ (line 7) | def __init__(self, ngf=32, img_size=256, n_blocks=4, light=True): method forward (line 91) | def forward(self, x): class ConvBlock (line 131) | class ConvBlock(nn.Layer): method __init__ (line 132) | def __init__(self, dim_in, dim_out): method __convblock (line 147) | def __convblock(dim_in, dim_out): method forward (line 152) | def forward(self, x): class HourGlassBlock (line 166) | class HourGlassBlock(nn.Layer): method __init__ (line 167) | def __init__(self, dim_in): method forward (line 179) | def forward(self, x): class HourGlass (line 196) | class HourGlass(nn.Layer): method __init__ (line 197) | def __init__(self, dim_in, dim_out, use_res=True): method forward (line 212) | def forward(self, x): class ResnetBlock (line 225) | class ResnetBlock(nn.Layer): method __init__ (line 226) | def __init__(self, dim, use_bias=False): method forward (line 244) | def forward(self, x): class ResnetSoftAdaLINBlock (line 249) | class ResnetSoftAdaLINBlock(nn.Layer): method __init__ (line 250) | def __init__(self, dim, use_bias=False): method forward (line 261) | def forward(self, x, content_features, style_features): class SoftAdaLIN (line 273) | class SoftAdaLIN(nn.Layer): method __init__ (line 274) | def __init__(self, num_features, eps=1e-5): method forward (line 290) | def forward(self, x, content_features, style_features): class AdaLIN (line 305) | class AdaLIN(nn.Layer): method __init__ (line 306) | def __init__(self, num_features, eps=1e-5): method forward (line 311) | def forward(self, x, gamma, beta): class LIN (line 323) | class LIN(nn.Layer): method __init__ (line 324) | def __init__(self, num_features, eps=1e-5): method forward (line 331) | def forward(self, x): FILE: modules/image/Image_gan/style_transfer/Photo2Cartoon/module.py class Photo2Cartoon (line 20) | class Photo2Cartoon(nn.Layer): method __init__ (line 21) | def __init__(self): method load_datas (line 41) | def load_datas(paths, images): method preprocess (line 58) | def preprocess(self, images, batch_size, use_gpu): method predict (line 167) | def predict(self, input_datas): method postprocess (line 185) | def postprocess(outputs, masks, visualization, output_dir): method Cartoon_GEN (line 210) | def Cartoon_GEN(self, FILE: modules/image/Image_gan/style_transfer/U2Net_Portrait/module.py class U2Net_Portrait (line 18) | class U2Net_Portrait(nn.Layer): method __init__ (line 19) | def __init__(self): method predict (line 26) | def predict(self, input_datas): method Portrait_GEN (line 37) | def Portrait_GEN(self, FILE: modules/image/Image_gan/style_transfer/U2Net_Portrait/processor.py class Processor (line 9) | class Processor(): method __init__ (line 10) | def __init__(self, paths, images, batch_size, face_detection=True, sca... method load_datas (line 18) | def load_datas(self, paths, images): method preprocess (line 35) | def preprocess(self, imgs, batch_size=1, face_detection=True, scale=1): method normPRED (line 110) | def normPRED(self, d): method postprocess (line 119) | def postprocess(self, outputs, visualization=False, output_dir='output'): FILE: modules/image/Image_gan/style_transfer/U2Net_Portrait/u2net.py class REBNCONV (line 8) | class REBNCONV(nn.Layer): method __init__ (line 9) | def __init__(self, in_ch=3, out_ch=3, dirate=1): method forward (line 16) | def forward(self, x): function _upsample_like (line 25) | def _upsample_like(src, tar): class RSU7 (line 33) | class RSU7(nn.Layer): #UNet07DRES(nn.Layer): method __init__ (line 34) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 65) | def forward(self, x): class RSU6 (line 110) | class RSU6(nn.Layer): #UNet06DRES(nn.Layer): method __init__ (line 111) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 138) | def forward(self, x): class RSU5 (line 178) | class RSU5(nn.Layer): #UNet05DRES(nn.Layer): method __init__ (line 179) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 202) | def forward(self, x): class RSU4 (line 236) | class RSU4(nn.Layer): #UNet04DRES(nn.Layer): method __init__ (line 237) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 256) | def forward(self, x): class RSU4F (line 284) | class RSU4F(nn.Layer): #UNet04FRES(nn.Layer): method __init__ (line 285) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 300) | def forward(self, x): class U2NET (line 320) | class U2NET(nn.Layer): method __init__ (line 321) | def __init__(self, in_ch=3, out_ch=1): method forward (line 357) | def forward(self, x): class U2NETP (line 424) | class U2NETP(nn.Layer): method __init__ (line 425) | def __init__(self, in_ch=3, out_ch=1): method forward (line 461) | def forward(self, x): FILE: modules/image/Image_gan/style_transfer/UGATIT_100w/model.py class Model (line 9) | class Model(): method __init__ (line 11) | def __init__(self, modelpath, use_gpu=False, use_mkldnn=True, combined... method load_model (line 22) | def load_model(self, modelpath, use_gpu, use_mkldnn, combined): method predict (line 61) | def predict(self, input_datas): FILE: modules/image/Image_gan/style_transfer/UGATIT_100w/module.py class UGATIT_100w (line 18) | class UGATIT_100w(Module): method __init__ (line 20) | def __init__(self, name=None, use_gpu=False): method style_transfer (line 28) | def style_transfer(self, images=None, paths=None, batch_size=1, output... method serving_method (line 43) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/UGATIT_100w/processor.py function check_dir (line 10) | def check_dir(dir_path): function base64_to_cv2 (line 19) | def base64_to_cv2(b64str): function cv2_to_base64 (line 27) | def cv2_to_base64(image): class Processor (line 33) | class Processor(): method __init__ (line 35) | def __init__(self, images=None, paths=None, output_dir='output', batch... method load_datas (line 49) | def load_datas(self): method preprocess (line 66) | def preprocess(self): method postprocess (line 95) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/UGATIT_83w/model.py class Model (line 9) | class Model(): method __init__ (line 11) | def __init__(self, modelpath, use_gpu=False, use_mkldnn=True, combined... method load_model (line 22) | def load_model(self, modelpath, use_gpu, use_mkldnn, combined): method predict (line 61) | def predict(self, input_datas): FILE: modules/image/Image_gan/style_transfer/UGATIT_83w/module.py class UGATIT_83w (line 18) | class UGATIT_83w(Module): method __init__ (line 20) | def __init__(self, name=None, use_gpu=False): method style_transfer (line 28) | def style_transfer(self, images=None, paths=None, batch_size=1, output... method serving_method (line 43) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/UGATIT_83w/processor.py function check_dir (line 10) | def check_dir(dir_path): function base64_to_cv2 (line 19) | def base64_to_cv2(b64str): function cv2_to_base64 (line 27) | def cv2_to_base64(image): class Processor (line 33) | class Processor(): method __init__ (line 35) | def __init__(self, images=None, paths=None, output_dir='output', batch... method load_datas (line 49) | def load_datas(self): method preprocess (line 66) | def preprocess(self): method postprocess (line 95) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/UGATIT_92w/model.py class Model (line 9) | class Model(): method __init__ (line 11) | def __init__(self, modelpath, use_gpu=False, use_mkldnn=True, combined... method load_model (line 22) | def load_model(self, modelpath, use_gpu, use_mkldnn, combined): method predict (line 61) | def predict(self, input_datas): FILE: modules/image/Image_gan/style_transfer/UGATIT_92w/module.py class UGATIT_92w (line 18) | class UGATIT_92w(Module): method __init__ (line 20) | def __init__(self, name=None, use_gpu=False): method style_transfer (line 28) | def style_transfer(self, images=None, paths=None, batch_size=1, output... method serving_method (line 43) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/UGATIT_92w/processor.py function check_dir (line 10) | def check_dir(dir_path): function base64_to_cv2 (line 19) | def base64_to_cv2(b64str): function cv2_to_base64 (line 27) | def cv2_to_base64(image): class Processor (line 33) | class Processor(): method __init__ (line 35) | def __init__(self, images=None, paths=None, output_dir='output', batch... method load_datas (line 49) | def load_datas(self): method preprocess (line 66) | def preprocess(self): method postprocess (line 95) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v1_hayao_60/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v1_hayao_60/module.py class Animegan_V1_Hayao_60 (line 19) | class Animegan_V1_Hayao_60: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v1_hayao_60/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v1_hayao_60/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_64/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_64/module.py class Animegan_V2_Hayao_64 (line 19) | class Animegan_V2_Hayao_64: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_64/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_64/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_99/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_99/module.py class Animegan_V2_Hayao_99 (line 19) | class Animegan_V2_Hayao_99: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_99/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_hayao_99/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_54/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_54/module.py class Animegan_V2_Paprika_54 (line 19) | class Animegan_V2_Paprika_54: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_54/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_54/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_74/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_74/module.py class Animegan_V2_Paprika_74 (line 19) | class Animegan_V2_Paprika_74: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_74/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_74/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_97/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_97/module.py class Animegan_V2_Paprika_97 (line 19) | class Animegan_V2_Paprika_97: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_97/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_97/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_98/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_98/module.py class Animegan_V2_Paprika_98 (line 19) | class Animegan_V2_Paprika_98: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_98/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_paprika_98/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_33/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_33/module.py class Animegan_V2_Shinkai_33 (line 19) | class Animegan_V2_Shinkai_33: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_33/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_33/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_53/model.py class InferenceModel (line 10) | class InferenceModel: method __init__ (line 12) | def __init__(self, modelpath, use_gpu=False, gpu_id=0, use_mkldnn=Fals... method __repr__ (line 23) | def __repr__(self): method __call__ (line 31) | def __call__(self, *input_datas, batch_size=1): method load_config (line 38) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 98) | def eval(self): method forward (line 124) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_53/module.py class Animegan_V2_Shinkai_53 (line 19) | class Animegan_V2_Shinkai_53: method __init__ (line 21) | def __init__(self, use_gpu=False, use_mkldnn=False): method style_transfer (line 31) | def style_transfer(self, method serving_method (line 60) | def serving_method(self, images, **kwargs): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_53/processor.py function check_dir (line 11) | def check_dir(dir_path): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function cv2_to_base64 (line 28) | def cv2_to_base64(image): class Processor (line 34) | class Processor(): method __init__ (line 36) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 53) | def load_datas(self): method preprocess (line 70) | def preprocess(self): method postprocess (line 109) | def postprocess(self, outputs, visualization): FILE: modules/image/Image_gan/style_transfer/animegan_v2_shinkai_53/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 31) | def tearDownClass(cls) -> None: method test_style_transfer1 (line 35) | def test_style_transfer1(self): method test_style_transfer2 (line 39) | def test_style_transfer2(self): method test_style_transfer3 (line 43) | def test_style_transfer3(self): method test_style_transfer4 (line 47) | def test_style_transfer4(self): method test_style_transfer5 (line 51) | def test_style_transfer5(self): method test_style_transfer6 (line 54) | def test_style_transfer6(self): FILE: modules/image/Image_gan/style_transfer/face_parse/model.py class FaceParsePredictor (line 28) | class FaceParsePredictor: method __init__ (line 29) | def __init__(self): method run (line 36) | def run(self, image): FILE: modules/image/Image_gan/style_transfer/face_parse/module.py class Face_parse (line 35) | class Face_parse: method __init__ (line 36) | def __init__(self): method style_transfer (line 41) | def style_transfer(self, method run_cmd (line 86) | def run_cmd(self, argvs: list): method serving_method (line 110) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 119) | def add_module_config_arg(self): method add_module_input_arg (line 129) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/face_parse/util.py function base64_to_cv2 (line 6) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/style_transfer/lapstyle_circuit/model.py function img (line 29) | def img(img): function img_totensor (line 37) | def img_totensor(content_img, style_img): function tensor_resample (line 61) | def tensor_resample(tensor, dst_size, mode='bilinear'): function laplacian (line 65) | def laplacian(x): function make_laplace_pyramid (line 75) | def make_laplace_pyramid(x, levels): function fold_laplace_pyramid (line 88) | def fold_laplace_pyramid(pyramid): class LapStylePredictor (line 99) | class LapStylePredictor: method __init__ (line 100) | def __init__(self, weight_path=None): method run (line 116) | def run(self, content_img, style_image): FILE: modules/image/Image_gan/style_transfer/lapstyle_circuit/module.py class Lapstyle_circuit (line 40) | class Lapstyle_circuit: method __init__ (line 41) | def __init__(self): method style_transfer (line 46) | def style_transfer(self, method run_cmd (line 96) | def run_cmd(self, argvs: list): method serving_method (line 123) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 135) | def add_module_config_arg(self): method add_module_input_arg (line 145) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/lapstyle_circuit/util.py function base64_to_cv2 (line 7) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/style_transfer/lapstyle_ocean/model.py function img (line 29) | def img(img): function img_totensor (line 37) | def img_totensor(content_img, style_img): function tensor_resample (line 61) | def tensor_resample(tensor, dst_size, mode='bilinear'): function laplacian (line 65) | def laplacian(x): function make_laplace_pyramid (line 75) | def make_laplace_pyramid(x, levels): function fold_laplace_pyramid (line 88) | def fold_laplace_pyramid(pyramid): class LapStylePredictor (line 99) | class LapStylePredictor: method __init__ (line 100) | def __init__(self, weight_path=None): method run (line 116) | def run(self, content_img, style_image): FILE: modules/image/Image_gan/style_transfer/lapstyle_ocean/module.py class Lapstyle_ocean (line 40) | class Lapstyle_ocean: method __init__ (line 41) | def __init__(self): method style_transfer (line 46) | def style_transfer(self, method run_cmd (line 95) | def run_cmd(self, argvs: list): method serving_method (line 122) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 134) | def add_module_config_arg(self): method add_module_input_arg (line 144) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/lapstyle_ocean/util.py function base64_to_cv2 (line 7) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/style_transfer/lapstyle_starrynew/model.py function img (line 29) | def img(img): function img_totensor (line 37) | def img_totensor(content_img, style_img): function tensor_resample (line 61) | def tensor_resample(tensor, dst_size, mode='bilinear'): function laplacian (line 65) | def laplacian(x): function make_laplace_pyramid (line 75) | def make_laplace_pyramid(x, levels): function fold_laplace_pyramid (line 88) | def fold_laplace_pyramid(pyramid): class LapStylePredictor (line 99) | class LapStylePredictor: method __init__ (line 100) | def __init__(self, weight_path=None): method run (line 116) | def run(self, content_img, style_image): FILE: modules/image/Image_gan/style_transfer/lapstyle_starrynew/module.py class Lapstyle_starrynew (line 40) | class Lapstyle_starrynew: method __init__ (line 41) | def __init__(self): method style_transfer (line 46) | def style_transfer(self, method run_cmd (line 94) | def run_cmd(self, argvs: list): method serving_method (line 121) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 133) | def add_module_config_arg(self): method add_module_input_arg (line 143) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/lapstyle_starrynew/util.py function base64_to_cv2 (line 7) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/style_transfer/lapstyle_stars/model.py function img (line 29) | def img(img): function img_totensor (line 37) | def img_totensor(content_img, style_img): function tensor_resample (line 61) | def tensor_resample(tensor, dst_size, mode='bilinear'): function laplacian (line 65) | def laplacian(x): function make_laplace_pyramid (line 75) | def make_laplace_pyramid(x, levels): function fold_laplace_pyramid (line 88) | def fold_laplace_pyramid(pyramid): class LapStylePredictor (line 99) | class LapStylePredictor: method __init__ (line 100) | def __init__(self, weight_path=None): method run (line 116) | def run(self, content_img, style_image): FILE: modules/image/Image_gan/style_transfer/lapstyle_stars/module.py class Lapstyle_stars (line 40) | class Lapstyle_stars: method __init__ (line 41) | def __init__(self): method style_transfer (line 46) | def style_transfer(self, method run_cmd (line 95) | def run_cmd(self, argvs: list): method serving_method (line 122) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 134) | def add_module_config_arg(self): method add_module_input_arg (line 144) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/lapstyle_stars/util.py function base64_to_cv2 (line 7) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/style_transfer/msgnet/module.py class GramMatrix (line 15) | class GramMatrix(nn.Layer): method forward (line 18) | def forward(self, y): class ConvLayer (line 26) | class ConvLayer(nn.Layer): method __init__ (line 29) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 35) | def forward(self, x: paddle.Tensor): class UpsampleConvLayer (line 41) | class UpsampleConvLayer(nn.Layer): method __init__ (line 57) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 67) | def forward(self, x): class Bottleneck (line 76) | class Bottleneck(nn.Layer): method __init__ (line 92) | def __init__(self, method forward (line 109) | def forward(self, x: paddle.Tensor): class UpBottleneck (line 118) | class UpBottleneck(nn.Layer): method __init__ (line 133) | def __init__(self, inplanes: int, planes: int, stride: int = 2, norm_l... method forward (line 152) | def forward(self, x: paddle.Tensor): class Inspiration (line 156) | class Inspiration(nn.Layer): method __init__ (line 169) | def __init__(self, C: int, B: int = 1): method setTarget (line 177) | def setTarget(self, target: paddle.Tensor): method forward (line 180) | def forward(self, X: paddle.Tensor): method __repr__ (line 189) | def __repr__(self): class Vgg16 (line 194) | class Vgg16(nn.Layer): method __init__ (line 197) | def __init__(self): method forward (line 222) | def forward(self, X): class MSGNet (line 255) | class MSGNet(nn.Layer): method __init__ (line 272) | def __init__(self, input_nc=3, output_nc=3, ngf=128, n_blocks=6, norm_... method transform (line 328) | def transform(self, path: str): method setTarget (line 332) | def setTarget(self, Xs: paddle.Tensor): method getFeature (line 338) | def getFeature(self, input: paddle.Tensor): method forward (line 343) | def forward(self, input: paddle.Tensor): FILE: modules/image/Image_gan/style_transfer/paint_transformer/inference.py function main (line 15) | def main(input_path, model_path, output_dir, need_animation=False, resiz... FILE: modules/image/Image_gan/style_transfer/paint_transformer/model.py class Painter (line 6) | class Painter(nn.Layer): method __init__ (line 11) | def __init__(self, param_per_stroke, total_strokes, hidden_dim, n_head... method forward (line 46) | def forward(self, img, canvas): FILE: modules/image/Image_gan/style_transfer/paint_transformer/module.py class paint_transformer (line 40) | class paint_transformer: method __init__ (line 41) | def __init__(self): method style_transfer (line 54) | def style_transfer(self, method run_cmd (line 110) | def run_cmd(self, argvs: list): method serving_method (line 135) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 144) | def add_module_config_arg(self): method add_module_input_arg (line 156) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/paint_transformer/render_parallel.py function crop (line 9) | def crop(img, h, w): function stroke_net_predict (line 19) | def stroke_net_predict(img_patch, result_patch, patch_size, net_g, strok... function param2img_parallel (line 44) | def param2img_parallel(param, decision, meta_brushes, cur_canvas, stroke... function render_parallel (line 201) | def render_parallel(original_img, net_g, meta_brushes): FILE: modules/image/Image_gan/style_transfer/paint_transformer/render_serial.py function get_single_layer_lists (line 16) | def get_single_layer_lists(param, decision, ori_img, render_size_x, rend... function get_single_stroke_on_full_image_A (line 85) | def get_single_stroke_on_full_image_A(x_id, y_id, valid_foregrounds, val... function get_single_stroke_on_full_image_B (line 114) | def get_single_stroke_on_full_image_B(x_id, y_id, valid_foregrounds, val... function stroke_net_predict (line 141) | def stroke_net_predict(img_patch, result_patch, patch_size, net_g, strok... function sort_strokes (line 165) | def sort_strokes(params, decision, scores): function render_serial (line 179) | def render_serial(original_img, net_g, meta_brushes): FILE: modules/image/Image_gan/style_transfer/paint_transformer/render_utils.py class Erosion2d (line 10) | class Erosion2d(nn.Layer): method __init__ (line 15) | def __init__(self, m=1): method forward (line 20) | def forward(self, x): class Dilation2d (line 28) | class Dilation2d(nn.Layer): method __init__ (line 33) | def __init__(self, m=1): method forward (line 38) | def forward(self, x): function param2stroke (line 46) | def param2stroke(param, H, W, meta_brushes): function read_img (line 76) | def read_img(img_path, img_type='RGB', h=None, w=None): function preprocess (line 91) | def preprocess(img, w=512, h=512): function totensor (line 98) | def totensor(img): function pad (line 104) | def pad(img, H, W): FILE: modules/image/Image_gan/style_transfer/paint_transformer/util.py function base64_to_cv2 (line 6) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/style_transfer/psgan/model.py function toImage (line 32) | def toImage(net_output): class PreProcess (line 43) | class PreProcess: method __init__ (line 44) | def __init__(self, config, need_parser=True): method __call__ (line 57) | def __call__(self, image): class PostProcess (line 85) | class PostProcess: method __init__ (line 86) | def __init__(self, config): method __call__ (line 90) | def __call__(self, source: Image, result: Image): class Inference (line 105) | class Inference: method __init__ (line 106) | def __init__(self, config, model_path=''): method transfer (line 111) | def transfer(self, source, reference, with_face=False): class PSGANPredictor (line 154) | class PSGANPredictor: method __init__ (line 155) | def __init__(self, cfg, weight_path): method run (line 159) | def run(self, source, reference): FILE: modules/image/Image_gan/style_transfer/psgan/module.py class psgan (line 35) | class psgan: method __init__ (line 36) | def __init__(self): method makeup_transfer (line 41) | def makeup_transfer(self, method run_cmd (line 90) | def run_cmd(self, argvs: list): method serving_method (line 117) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 129) | def add_module_config_arg(self): method add_module_input_arg (line 139) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/psgan/util.py function base64_to_cv2 (line 7) | def base64_to_cv2(b64str): FILE: modules/image/Image_gan/style_transfer/stylepro_artistic/data_feed.py function reader (line 13) | def reader(images=None, paths=None): function _handle_single (line 61) | def _handle_single(im_path=None, im_arr=None): FILE: modules/image/Image_gan/style_transfer/stylepro_artistic/module.py class StyleProjection (line 35) | class StyleProjection(hub.Module): method _initialize (line 37) | def _initialize(self): method _set_config (line 42) | def _set_config(self): method style_transfer (line 75) | def style_transfer(self, method save_inference_model (line 147) | def save_inference_model(self, dirname, model_filename=None, params_fi... method _save_encode_model (line 153) | def _save_encode_model(self, dirname, model_filename=None, params_file... method _save_decode_model (line 171) | def _save_decode_model(self, dirname, model_filename=None, params_file... method serving_method (line 190) | def serving_method(self, images, **kwargs): method run_cmd (line 203) | def run_cmd(self, argvs): method add_module_config_arg (line 229) | def add_module_config_arg(self): method add_module_input_arg (line 246) | def add_module_input_arg(self): FILE: modules/image/Image_gan/style_transfer/stylepro_artistic/processor.py function cv2_to_base64 (line 15) | def cv2_to_base64(image): function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function postprocess (line 27) | def postprocess(im, output_dir, save_im_name, visualization, size): function fr (line 52) | def fr(content_feat, style_feat, alpha): function scatter_numpy (line 65) | def scatter_numpy(dim, index, src): FILE: modules/image/classification/DriverStatusRecognition/module.py function base64_to_cv2 (line 15) | def base64_to_cv2(b64str): function cv2_to_base64 (line 22) | def cv2_to_base64(image): function read_images (line 28) | def read_images(paths): class MODULE (line 42) | class MODULE(hub.Module): method _initialize (line 43) | def _initialize(self, **kwargs): method predict (line 47) | def predict(self, images=None, paths=None, data=None, batch_size=1, us... method serving_method (line 67) | def serving_method(self, images, **kwargs): method run_cmd (line 96) | def run_cmd(self, argvs): method add_module_config_arg (line 114) | def add_module_config_arg(self): method add_module_input_arg (line 120) | def add_module_input_arg(self): FILE: modules/image/classification/DriverStatusRecognition/serving_client_demo.py function cv2_to_base64 (line 8) | def cv2_to_base64(image): FILE: modules/image/classification/SnakeIdentification/module.py function base64_to_cv2 (line 15) | def base64_to_cv2(b64str): function cv2_to_base64 (line 22) | def cv2_to_base64(image): function read_images (line 28) | def read_images(paths): class MODULE (line 42) | class MODULE(hub.Module): method _initialize (line 43) | def _initialize(self, **kwargs): method predict (line 47) | def predict(self, images=None, paths=None, data=None, batch_size=1, us... method serving_method (line 67) | def serving_method(self, images, **kwargs): method run_cmd (line 96) | def run_cmd(self, argvs): method add_module_config_arg (line 114) | def add_module_config_arg(self): method add_module_input_arg (line 120) | def add_module_input_arg(self): FILE: modules/image/classification/SnakeIdentification/serving_client_demo.py function cv2_to_base64 (line 8) | def cv2_to_base64(image): FILE: modules/image/classification/SpinalNet_Gemstones/gem_dataset.py class GemStones (line 7) | class GemStones(paddle.io.Dataset): method __init__ (line 12) | def __init__(self, transforms: Callable, mode: str = 'train'): method __getitem__ (line 38) | def __getitem__(self, index): method __len__ (line 50) | def __len__(self): FILE: modules/image/classification/SpinalNet_Gemstones/spinalnet_res101_gemstone/module.py class BottleneckBlock (line 25) | class BottleneckBlock(nn.Layer): method __init__ (line 29) | def __init__(self, method forward (line 56) | def forward(self, x): class ResNet (line 79) | class ResNet(nn.Layer): method __init__ (line 80) | def __init__(self, block=BottleneckBlock, depth=101, with_pool=True): method _make_layer (line 101) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method forward (line 122) | def forward(self, x): class SpinalNet_ResNet101 (line 147) | class SpinalNet_ResNet101(nn.Layer): method __init__ (line 148) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 198) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 207) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/SpinalNet_Gemstones/spinalnet_res50_gemstone/module.py class BottleneckBlock (line 25) | class BottleneckBlock(nn.Layer): method __init__ (line 29) | def __init__(self, method forward (line 56) | def forward(self, x): class ResNet (line 79) | class ResNet(nn.Layer): method __init__ (line 80) | def __init__(self, block=BottleneckBlock, depth=50, with_pool=True): method _make_layer (line 101) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method forward (line 122) | def forward(self, x): class SpinalNet_ResNet50 (line 147) | class SpinalNet_ResNet50(nn.Layer): method __init__ (line 148) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 198) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 207) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/SpinalNet_Gemstones/spinalnet_vgg16_gemstone/module.py class VGG (line 28) | class VGG(nn.Layer): method __init__ (line 29) | def __init__(self, features, with_pool=True): method forward (line 37) | def forward(self, x): function make_layers (line 46) | def make_layers(cfg, batch_norm=False): function _vgg (line 70) | def _vgg(arch, cfg, batch_norm, **kwargs): function vgg16 (line 75) | def vgg16(batch_norm=False, **kwargs): class SpinalNet_VGG16 (line 91) | class SpinalNet_VGG16(nn.Layer): method __init__ (line 92) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 152) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 161) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/darknet53_imagenet/darknet.py class DarkNet (line 16) | class DarkNet(object): method __init__ (line 26) | def __init__(self, method _conv_norm (line 42) | def _conv_norm(self, input, ch_out, filter_size, stride, padding, act=... method _downsample (line 72) | def _downsample(self, input, ch_out, filter_size=3, stride=2, padding=... method basicblock (line 75) | def basicblock(self, input, ch_out, name=None): method layer_warp (line 81) | def layer_warp(self, block_func, input, ch_out, count, name=None): method __call__ (line 87) | def __call__(self, input): FILE: modules/image/classification/darknet53_imagenet/data_feed.py function resize_short (line 19) | def resize_short(img, target_size): function crop_image (line 27) | def crop_image(img, target_size, center): function process_image (line 42) | def process_image(img): function test_reader (line 54) | def test_reader(paths=None, images=None): FILE: modules/image/classification/darknet53_imagenet/module.py class DarkNet53 (line 25) | class DarkNet53(hub.Module): method _initialize (line 26) | def _initialize(self): method get_expected_image_width (line 33) | def get_expected_image_width(self): method get_expected_image_height (line 36) | def get_expected_image_height(self): method get_pretrained_images_mean (line 39) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 43) | def get_pretrained_images_std(self): method _set_config (line 47) | def _set_config(self): method context (line 68) | def context(self, input_image=None, trainable=True, pretrained=True, p... method classification (line 111) | def classification(self, paths=None, images=None, use_gpu=False, batch... method add_module_config_arg (line 164) | def add_module_config_arg(self): method add_module_input_arg (line 173) | def add_module_input_arg(self): method check_input_data (line 181) | def check_input_data(self, args): method run_cmd (line 193) | def run_cmd(self, argvs): FILE: modules/image/classification/darknet53_imagenet/processor.py function load_label_info (line 2) | def load_label_info(file_path): FILE: modules/image/classification/efficientnetb0_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb0_imagenet/module.py class EfficientNetB0ImageNet (line 39) | class EfficientNetB0ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb0_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 47) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb0_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb0_small_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb0_small_imagenet/module.py class EfficientNetB0SmallImageNet (line 39) | class EfficientNetB0SmallImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb0_small_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 48) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb0_small_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb1_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb1_imagenet/module.py class EfficientNetB1ImageNet (line 39) | class EfficientNetB1ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb1_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 47) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb1_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb2_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb2_imagenet/module.py class EfficientNetB2ImageNet (line 39) | class EfficientNetB2ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 140) | def serving_method(self, images, **kwargs): method run_cmd (line 149) | def run_cmd(self, argvs): method add_module_config_arg (line 166) | def add_module_config_arg(self): method add_module_input_arg (line 177) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb2_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 47) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb2_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb3_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb3_imagenet/module.py class EfficientNetB3ImageNet (line 39) | class EfficientNetB3ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 142) | def serving_method(self, images, **kwargs): method run_cmd (line 151) | def run_cmd(self, argvs): method add_module_config_arg (line 168) | def add_module_config_arg(self): method add_module_input_arg (line 179) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb3_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 47) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb3_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb4_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb4_imagenet/module.py class EfficientNetB4ImageNet (line 39) | class EfficientNetB4ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb4_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 47) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb4_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb5_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb5_imagenet/module.py class EfficientNetB5ImageNet (line 39) | class EfficientNetB5ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb5_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 47) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb5_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb6_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb6_imagenet/module.py class EfficientNetB6ImageNet (line 39) | class EfficientNetB6ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb6_imagenet/processor.py function base64_to_cv2 (line 25) | def base64_to_cv2(b64str): function softmax (line 32) | def softmax(x): function postprocess (line 48) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb6_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/efficientnetb7_imagenet/data_feed.py function resize_short (line 28) | def resize_short(img, target_size): function crop_image (line 36) | def crop_image(img, target_size, center): function process_image (line 51) | def process_image(img): function reader (line 62) | def reader(images=None, paths=None): FILE: modules/image/classification/efficientnetb7_imagenet/module.py class EfficientNetB7ImageNet (line 39) | class EfficientNetB7ImageNet: method __init__ (line 41) | def __init__(self): method get_expected_image_width (line 49) | def get_expected_image_width(self): method get_expected_image_height (line 52) | def get_expected_image_height(self): method get_pretrained_images_mean (line 55) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 59) | def get_pretrained_images_std(self): method _set_config (line 63) | def _set_config(self): method classification (line 86) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/classification/efficientnetb7_imagenet/processor.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): function softmax (line 31) | def softmax(x): function postprocess (line 47) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/efficientnetb7_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/esnet_x0_25_imagenet/model.py class Identity (line 41) | class Identity(nn.Layer): method __init__ (line 43) | def __init__(self): method forward (line 46) | def forward(self, inputs): class TheseusLayer (line 50) | class TheseusLayer(nn.Layer): method __init__ (line 52) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 59) | def _return_dict_hook(self, layer, input, output): method init_res (line 67) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 86) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 90) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 146) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 170) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 208) | def save_sub_res_hook(layer, input, output): function set_identity (line 212) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 244) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function channel_shuffle (line 294) | def channel_shuffle(x, groups): function make_divisible (line 303) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 312) | class ConvBNLayer(TheseusLayer): method __init__ (line 314) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, g... method forward (line 331) | def forward(self, x): class SEModule (line 339) | class SEModule(TheseusLayer): method __init__ (line 341) | def __init__(self, channel, reduction=4): method forward (line 349) | def forward(self, x): class ESBlock1 (line 360) | class ESBlock1(TheseusLayer): method __init__ (line 362) | def __init__(self, in_channels, out_channels): method forward (line 375) | def forward(self, x): class ESBlock2 (line 386) | class ESBlock2(TheseusLayer): method __init__ (line 388) | def __init__(self, in_channels, out_channels): method forward (line 415) | def forward(self, x): class ESNet (line 428) | class ESNet(TheseusLayer): method __init__ (line 430) | def __init__(self, method forward (line 481) | def forward(self, x): function ESNet_x0_25 (line 495) | def ESNet_x0_25(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/esnet_x0_25_imagenet/module.py class Esnet_x0_25_Imagenet (line 42) | class Esnet_x0_25_Imagenet: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/esnet_x0_25_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/esnet_x0_25_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/esnet_x0_5_imagenet/model.py class Identity (line 41) | class Identity(nn.Layer): method __init__ (line 43) | def __init__(self): method forward (line 46) | def forward(self, inputs): class TheseusLayer (line 50) | class TheseusLayer(nn.Layer): method __init__ (line 52) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 59) | def _return_dict_hook(self, layer, input, output): method init_res (line 67) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 86) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 90) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 146) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 170) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 208) | def save_sub_res_hook(layer, input, output): function set_identity (line 212) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 244) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function channel_shuffle (line 294) | def channel_shuffle(x, groups): function make_divisible (line 303) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 312) | class ConvBNLayer(TheseusLayer): method __init__ (line 314) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, g... method forward (line 331) | def forward(self, x): class SEModule (line 339) | class SEModule(TheseusLayer): method __init__ (line 341) | def __init__(self, channel, reduction=4): method forward (line 349) | def forward(self, x): class ESBlock1 (line 360) | class ESBlock1(TheseusLayer): method __init__ (line 362) | def __init__(self, in_channels, out_channels): method forward (line 375) | def forward(self, x): class ESBlock2 (line 386) | class ESBlock2(TheseusLayer): method __init__ (line 388) | def __init__(self, in_channels, out_channels): method forward (line 415) | def forward(self, x): class ESNet (line 428) | class ESNet(TheseusLayer): method __init__ (line 430) | def __init__(self, method forward (line 481) | def forward(self, x): function ESNet_x0_5 (line 495) | def ESNet_x0_5(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/esnet_x0_5_imagenet/module.py class Esnet_x0_5_Imagenet (line 42) | class Esnet_x0_5_Imagenet: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/esnet_x0_5_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/esnet_x0_5_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/fix_resnext101_32x48d_wsl_imagenet/data_feed.py function resize_short (line 15) | def resize_short(img, target_size): function crop_image (line 23) | def crop_image(img, target_size, center): function process_image (line 38) | def process_image(img): function reader (line 49) | def reader(images=None, paths=None): FILE: modules/image/classification/fix_resnext101_32x48d_wsl_imagenet/module.py class FixResnext10132x48dwslImagenet (line 27) | class FixResnext10132x48dwslImagenet: method __init__ (line 29) | def __init__(self): method get_expected_image_width (line 36) | def get_expected_image_width(self): method get_expected_image_height (line 39) | def get_expected_image_height(self): method get_pretrained_images_mean (line 42) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 46) | def get_pretrained_images_std(self): method _set_config (line 50) | def _set_config(self): method classification (line 73) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 132) | def serving_method(self, images, **kwargs): method run_cmd (line 141) | def run_cmd(self, argvs): method add_module_config_arg (line 158) | def add_module_config_arg(self): method add_module_input_arg (line 169) | def add_module_input_arg(self): FILE: modules/image/classification/fix_resnext101_32x48d_wsl_imagenet/processor.py function base64_to_cv2 (line 11) | def base64_to_cv2(b64str): function softmax (line 18) | def softmax(x): function postprocess (line 34) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/fix_resnext101_32x48d_wsl_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/food_classification/module.py function base64_to_cv2 (line 15) | def base64_to_cv2(b64str): function cv2_to_base64 (line 22) | def cv2_to_base64(image): function read_images (line 28) | def read_images(paths): class MODULE (line 42) | class MODULE(hub.Module): method _initialize (line 43) | def _initialize(self, **kwargs): method predict (line 47) | def predict(self, images=None, paths=None, data=None, batch_size=1, us... method serving_method (line 67) | def serving_method(self, images, **kwargs): method run_cmd (line 96) | def run_cmd(self, argvs): method add_module_config_arg (line 114) | def add_module_config_arg(self): method add_module_input_arg (line 120) | def add_module_input_arg(self): FILE: modules/image/classification/ghostnet_x0_5_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 30) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, g... method forward (line 51) | def forward(self, inputs): class SEBlock (line 57) | class SEBlock(nn.Layer): method __init__ (line 58) | def __init__(self, num_channels, reduction_ratio=4, name=None): method forward (line 76) | def forward(self, inputs): class GhostModule (line 88) | class GhostModule(nn.Layer): method __init__ (line 89) | def __init__(self, in_channels, output_channels, kernel_size=1, ratio=... method forward (line 110) | def forward(self, inputs): class GhostBottleneck (line 117) | class GhostBottleneck(nn.Layer): method __init__ (line 118) | def __init__(self, in_channels, hidden_dim, output_channels, kernel_si... method forward (line 168) | def forward(self, inputs): class GhostNet (line 192) | class GhostNet(nn.Layer): method __init__ (line 193) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 290) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 299) | def forward(self, inputs): method _make_divisible (line 311) | def _make_divisible(self, v, divisor, min_value=None): FILE: modules/image/classification/ghostnet_x1_0_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 30) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, g... method forward (line 51) | def forward(self, inputs): class SEBlock (line 57) | class SEBlock(nn.Layer): method __init__ (line 58) | def __init__(self, num_channels, reduction_ratio=4, name=None): method forward (line 76) | def forward(self, inputs): class GhostModule (line 88) | class GhostModule(nn.Layer): method __init__ (line 89) | def __init__(self, in_channels, output_channels, kernel_size=1, ratio=... method forward (line 110) | def forward(self, inputs): class GhostBottleneck (line 117) | class GhostBottleneck(nn.Layer): method __init__ (line 118) | def __init__(self, in_channels, hidden_dim, output_channels, kernel_si... method forward (line 168) | def forward(self, inputs): class GhostNet (line 192) | class GhostNet(nn.Layer): method __init__ (line 193) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 290) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 299) | def forward(self, inputs): method _make_divisible (line 311) | def _make_divisible(self, v, divisor, min_value=None): FILE: modules/image/classification/ghostnet_x1_3_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 30) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, g... method forward (line 51) | def forward(self, inputs): class SEBlock (line 57) | class SEBlock(nn.Layer): method __init__ (line 58) | def __init__(self, num_channels, reduction_ratio=4, name=None): method forward (line 76) | def forward(self, inputs): class GhostModule (line 88) | class GhostModule(nn.Layer): method __init__ (line 89) | def __init__(self, in_channels, output_channels, kernel_size=1, ratio=... method forward (line 110) | def forward(self, inputs): class GhostBottleneck (line 117) | class GhostBottleneck(nn.Layer): method __init__ (line 118) | def __init__(self, in_channels, hidden_dim, output_channels, kernel_si... method forward (line 168) | def forward(self, inputs): class GhostNet (line 192) | class GhostNet(nn.Layer): method __init__ (line 193) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 290) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 299) | def forward(self, inputs): method _make_divisible (line 311) | def _make_divisible(self, v, divisor, min_value=None): FILE: modules/image/classification/ghostnet_x1_3_imagenet_ssld/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 30) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, g... method forward (line 51) | def forward(self, inputs): class SEBlock (line 57) | class SEBlock(nn.Layer): method __init__ (line 58) | def __init__(self, num_channels, reduction_ratio=4, name=None): method forward (line 76) | def forward(self, inputs): class GhostModule (line 88) | class GhostModule(nn.Layer): method __init__ (line 89) | def __init__(self, in_channels, output_channels, kernel_size=1, ratio=... method forward (line 110) | def forward(self, inputs): class GhostBottleneck (line 117) | class GhostBottleneck(nn.Layer): method __init__ (line 118) | def __init__(self, in_channels, hidden_dim, output_channels, kernel_si... method forward (line 168) | def forward(self, inputs): class GhostNet (line 192) | class GhostNet(nn.Layer): method __init__ (line 193) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 290) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 299) | def forward(self, inputs): method _make_divisible (line 311) | def _make_divisible(self, v, divisor, min_value=None): FILE: modules/image/classification/googlenet_imagenet/module.py function xavier (line 28) | def xavier(channels: int, filter_size: int, name: str): class ConvLayer (line 35) | class ConvLayer(nn.Layer): method __init__ (line 38) | def __init__(self, method forward (line 57) | def forward(self, inputs: paddle.Tensor): class Inception (line 62) | class Inception(nn.Layer): method __init__ (line 65) | def __init__(self, method forward (line 86) | def forward(self, inputs: paddle.Tensor): class GoogleNet (line 112) | class GoogleNet(nn.Layer): method __init__ (line 115) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 155) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/hrnet18_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet18 (line 445) | class HRNet18(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet18_imagenet_ssld/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet18 (line 445) | class HRNet18(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet30_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet30 (line 445) | class HRNet30(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet32_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet32 (line 445) | class HRNet32(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet40_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet40 (line 445) | class HRNet40(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet44_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet44 (line 445) | class HRNet44(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet48_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet48 (line 445) | class HRNet48(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet48_imagenet_ssld/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet48 (line 445) | class HRNet48(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/hrnet64_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class HRNet64 (line 445) | class HRNet64(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/inceptionv4_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, method forward (line 60) | def forward(self, inputs: paddle.Tensor): class InceptionStem (line 66) | class InceptionStem(nn.Layer): method __init__ (line 69) | def __init__(self): method forward (line 84) | def forward(self, inputs: paddle.Tensor): class InceptionA (line 110) | class InceptionA(nn.Layer): method __init__ (line 113) | def __init__(self, name: str): method forward (line 124) | def forward(self, inputs: paddle.Tensor): class ReductionA (line 141) | class ReductionA(nn.Layer): method __init__ (line 144) | def __init__(self): method forward (line 152) | def forward(self, inputs: paddle.Tensor): class InceptionB (line 162) | class InceptionB(nn.Layer): method __init__ (line 165) | def __init__(self, name: str = None): method forward (line 179) | def forward(self, inputs: paddle.Tensor): class ReductionB (line 199) | class ReductionB(nn.Layer): method __init__ (line 202) | def __init__(self): method forward (line 212) | def forward(self, inputs: paddle.Tensor): class InceptionC (line 228) | class InceptionC(nn.Layer): method __init__ (line 231) | def __init__(self, name: str = None): method forward (line 246) | def forward(self, inputs: paddle.Tensor): class InceptionV4 (line 276) | class InceptionV4(nn.Layer): method __init__ (line 279) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 326) | def forward(self, inputs): FILE: modules/image/classification/levit_128_imagenet/model.py function cal_attention_biases (line 32) | def cal_attention_biases(attention_biases, attention_bias_idxs): class Conv2d_BN (line 44) | class Conv2d_BN(nn.Sequential): method __init__ (line 46) | def __init__(self, a, b, ks=1, stride=1, pad=0, dilation=1, groups=1, ... class Linear_BN (line 55) | class Linear_BN(nn.Sequential): method __init__ (line 57) | def __init__(self, a, b, bn_weight_init=1): method forward (line 68) | def forward(self, x): class BN_Linear (line 74) | class BN_Linear(nn.Sequential): method __init__ (line 76) | def __init__(self, a, b, bias=True, std=0.02): function b16 (line 86) | def b16(n, activation, resolution=224): class Residual (line 93) | class Residual(nn.Layer): method __init__ (line 95) | def __init__(self, m, drop): method forward (line 100) | def forward(self, x): class Attention (line 109) | class Attention(nn.Layer): method __init__ (line 111) | def __init__(self, dim, key_dim, num_heads=8, attn_ratio=4, activation... method train (line 140) | def train(self, mode=True): method forward (line 150) | def forward(self, x): class Subsample (line 173) | class Subsample(nn.Layer): method __init__ (line 175) | def __init__(self, stride, resolution): method forward (line 180) | def forward(self, x): class AttentionSubsample (line 189) | class AttentionSubsample(nn.Layer): method __init__ (line 191) | def __init__(self, method train (line 246) | def train(self, mode=True): method forward (line 256) | def forward(self, x): class LeViT (line 280) | class LeViT(nn.Layer): method __init__ (line 284) | def __init__(self, method forward (line 364) | def forward(self, x): function model_factory (line 381) | def model_factory(C, D, X, N, drop_path, class_num, distillation): function LeViT_128 (line 448) | def LeViT_128(**kwargs): FILE: modules/image/classification/levit_128_imagenet/module.py class LeViT_128_ImageNet (line 42) | class LeViT_128_ImageNet: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/levit_128_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/levit_128_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/levit_128s_imagenet/model.py function cal_attention_biases (line 32) | def cal_attention_biases(attention_biases, attention_bias_idxs): class Conv2d_BN (line 44) | class Conv2d_BN(nn.Sequential): method __init__ (line 46) | def __init__(self, a, b, ks=1, stride=1, pad=0, dilation=1, groups=1, ... class Linear_BN (line 55) | class Linear_BN(nn.Sequential): method __init__ (line 57) | def __init__(self, a, b, bn_weight_init=1): method forward (line 68) | def forward(self, x): class BN_Linear (line 74) | class BN_Linear(nn.Sequential): method __init__ (line 76) | def __init__(self, a, b, bias=True, std=0.02): function b16 (line 86) | def b16(n, activation, resolution=224): class Residual (line 93) | class Residual(nn.Layer): method __init__ (line 95) | def __init__(self, m, drop): method forward (line 100) | def forward(self, x): class Attention (line 109) | class Attention(nn.Layer): method __init__ (line 111) | def __init__(self, dim, key_dim, num_heads=8, attn_ratio=4, activation... method train (line 140) | def train(self, mode=True): method forward (line 150) | def forward(self, x): class Subsample (line 173) | class Subsample(nn.Layer): method __init__ (line 175) | def __init__(self, stride, resolution): method forward (line 180) | def forward(self, x): class AttentionSubsample (line 189) | class AttentionSubsample(nn.Layer): method __init__ (line 191) | def __init__(self, method train (line 246) | def train(self, mode=True): method forward (line 256) | def forward(self, x): class LeViT (line 280) | class LeViT(nn.Layer): method __init__ (line 284) | def __init__(self, method forward (line 364) | def forward(self, x): function model_factory (line 381) | def model_factory(C, D, X, N, drop_path, class_num, distillation): function LeViT_128S (line 448) | def LeViT_128S(**kwargs): FILE: modules/image/classification/levit_128s_imagenet/module.py class LeViT_128S_ImageNet (line 42) | class LeViT_128S_ImageNet: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/levit_128s_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/levit_128s_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/levit_192_imagenet/model.py function cal_attention_biases (line 32) | def cal_attention_biases(attention_biases, attention_bias_idxs): class Conv2d_BN (line 44) | class Conv2d_BN(nn.Sequential): method __init__ (line 46) | def __init__(self, a, b, ks=1, stride=1, pad=0, dilation=1, groups=1, ... class Linear_BN (line 55) | class Linear_BN(nn.Sequential): method __init__ (line 57) | def __init__(self, a, b, bn_weight_init=1): method forward (line 68) | def forward(self, x): class BN_Linear (line 74) | class BN_Linear(nn.Sequential): method __init__ (line 76) | def __init__(self, a, b, bias=True, std=0.02): function b16 (line 86) | def b16(n, activation, resolution=224): class Residual (line 93) | class Residual(nn.Layer): method __init__ (line 95) | def __init__(self, m, drop): method forward (line 100) | def forward(self, x): class Attention (line 109) | class Attention(nn.Layer): method __init__ (line 111) | def __init__(self, dim, key_dim, num_heads=8, attn_ratio=4, activation... method train (line 140) | def train(self, mode=True): method forward (line 150) | def forward(self, x): class Subsample (line 173) | class Subsample(nn.Layer): method __init__ (line 175) | def __init__(self, stride, resolution): method forward (line 180) | def forward(self, x): class AttentionSubsample (line 189) | class AttentionSubsample(nn.Layer): method __init__ (line 191) | def __init__(self, method train (line 246) | def train(self, mode=True): method forward (line 256) | def forward(self, x): class LeViT (line 280) | class LeViT(nn.Layer): method __init__ (line 284) | def __init__(self, method forward (line 364) | def forward(self, x): function model_factory (line 381) | def model_factory(C, D, X, N, drop_path, class_num, distillation): function LeViT_192 (line 448) | def LeViT_192(**kwargs): FILE: modules/image/classification/levit_192_imagenet/module.py class LeViT_192_ImageNet (line 42) | class LeViT_192_ImageNet: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/levit_192_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/levit_192_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/levit_256_imagenet/model.py function cal_attention_biases (line 32) | def cal_attention_biases(attention_biases, attention_bias_idxs): class Conv2d_BN (line 44) | class Conv2d_BN(nn.Sequential): method __init__ (line 46) | def __init__(self, a, b, ks=1, stride=1, pad=0, dilation=1, groups=1, ... class Linear_BN (line 55) | class Linear_BN(nn.Sequential): method __init__ (line 57) | def __init__(self, a, b, bn_weight_init=1): method forward (line 68) | def forward(self, x): class BN_Linear (line 74) | class BN_Linear(nn.Sequential): method __init__ (line 76) | def __init__(self, a, b, bias=True, std=0.02): function b16 (line 86) | def b16(n, activation, resolution=224): class Residual (line 93) | class Residual(nn.Layer): method __init__ (line 95) | def __init__(self, m, drop): method forward (line 100) | def forward(self, x): class Attention (line 109) | class Attention(nn.Layer): method __init__ (line 111) | def __init__(self, dim, key_dim, num_heads=8, attn_ratio=4, activation... method train (line 140) | def train(self, mode=True): method forward (line 150) | def forward(self, x): class Subsample (line 173) | class Subsample(nn.Layer): method __init__ (line 175) | def __init__(self, stride, resolution): method forward (line 180) | def forward(self, x): class AttentionSubsample (line 189) | class AttentionSubsample(nn.Layer): method __init__ (line 191) | def __init__(self, method train (line 246) | def train(self, mode=True): method forward (line 256) | def forward(self, x): class LeViT (line 280) | class LeViT(nn.Layer): method __init__ (line 284) | def __init__(self, method forward (line 364) | def forward(self, x): function model_factory (line 381) | def model_factory(C, D, X, N, drop_path, class_num, distillation): function LeViT_256 (line 448) | def LeViT_256(**kwargs): FILE: modules/image/classification/levit_256_imagenet/module.py class LeViT_256_ImageNet (line 42) | class LeViT_256_ImageNet: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/levit_256_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/levit_256_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/levit_384_imagenet/model.py function cal_attention_biases (line 32) | def cal_attention_biases(attention_biases, attention_bias_idxs): class Conv2d_BN (line 44) | class Conv2d_BN(nn.Sequential): method __init__ (line 46) | def __init__(self, a, b, ks=1, stride=1, pad=0, dilation=1, groups=1, ... class Linear_BN (line 55) | class Linear_BN(nn.Sequential): method __init__ (line 57) | def __init__(self, a, b, bn_weight_init=1): method forward (line 68) | def forward(self, x): class BN_Linear (line 74) | class BN_Linear(nn.Sequential): method __init__ (line 76) | def __init__(self, a, b, bias=True, std=0.02): function b16 (line 86) | def b16(n, activation, resolution=224): class Residual (line 93) | class Residual(nn.Layer): method __init__ (line 95) | def __init__(self, m, drop): method forward (line 100) | def forward(self, x): class Attention (line 109) | class Attention(nn.Layer): method __init__ (line 111) | def __init__(self, dim, key_dim, num_heads=8, attn_ratio=4, activation... method train (line 140) | def train(self, mode=True): method forward (line 150) | def forward(self, x): class Subsample (line 173) | class Subsample(nn.Layer): method __init__ (line 175) | def __init__(self, stride, resolution): method forward (line 180) | def forward(self, x): class AttentionSubsample (line 189) | class AttentionSubsample(nn.Layer): method __init__ (line 191) | def __init__(self, method train (line 246) | def train(self, mode=True): method forward (line 256) | def forward(self, x): class LeViT (line 280) | class LeViT(nn.Layer): method __init__ (line 284) | def __init__(self, method forward (line 364) | def forward(self, x): function model_factory (line 381) | def model_factory(C, D, X, N, drop_path, class_num, distillation): function LeViT_384 (line 448) | def LeViT_384(**kwargs): FILE: modules/image/classification/levit_384_imagenet/module.py class LeViT_384_ImageNet (line 42) | class LeViT_384_ImageNet: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/levit_384_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/levit_384_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/marine_biometrics/module.py function base64_to_cv2 (line 15) | def base64_to_cv2(b64str): function cv2_to_base64 (line 22) | def cv2_to_base64(image): function read_images (line 28) | def read_images(paths): class MODULE (line 43) | class MODULE(hub.Module): method _initialize (line 44) | def _initialize(self, **kwargs): method predict (line 48) | def predict(self, images=None, paths=None, data=None, batch_size=1, us... method serving_method (line 68) | def serving_method(self, images, **kwargs): method run_cmd (line 97) | def run_cmd(self, argvs): method add_module_config_arg (line 115) | def add_module_config_arg(self): method add_module_input_arg (line 121) | def add_module_input_arg(self): FILE: modules/image/classification/marine_biometrics/serving_client_demo.py function cv2_to_base64 (line 8) | def cv2_to_base64(image): FILE: modules/image/classification/mobilenet_v1_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 63) | def forward(self, inputs: paddle.Tensor): class DepthwiseSeparable (line 69) | class DepthwiseSeparable(nn.Layer): method __init__ (line 72) | def __init__(self, method forward (line 99) | def forward(self, inputs: paddle.Tensor): class MobileNetV1 (line 114) | class MobileNetV1(nn.Layer): method __init__ (line 117) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 256) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/mobilenet_v1_imagenet_ssld/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 63) | def forward(self, inputs: paddle.Tensor): class DepthwiseSeparable (line 69) | class DepthwiseSeparable(nn.Layer): method __init__ (line 72) | def __init__(self, method forward (line 99) | def forward(self, inputs: paddle.Tensor): class MobileNetV1 (line 114) | class MobileNetV1(nn.Layer): method __init__ (line 117) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 256) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/mobilenet_v2_animals/data_feed.py function resize_short (line 16) | def resize_short(img, target_size): function crop_image (line 24) | def crop_image(img, target_size, center): function process_image (line 39) | def process_image(img): function reader (line 50) | def reader(images=None, paths=None): FILE: modules/image/classification/mobilenet_v2_animals/module.py class MobileNetV2Animals (line 27) | class MobileNetV2Animals: method __init__ (line 28) | def __init__(self): method get_expected_image_width (line 35) | def get_expected_image_width(self): method get_expected_image_height (line 38) | def get_expected_image_height(self): method get_pretrained_images_mean (line 41) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 45) | def get_pretrained_images_std(self): method _set_config (line 49) | def _set_config(self): method classification (line 72) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 126) | def serving_method(self, images, **kwargs): method run_cmd (line 135) | def run_cmd(self, argvs): method add_module_config_arg (line 153) | def add_module_config_arg(self): method add_module_input_arg (line 162) | def add_module_input_arg(self): FILE: modules/image/classification/mobilenet_v2_animals/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function softmax (line 19) | def softmax(x): function postprocess (line 36) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/mobilenet_v2_animals/test.py class TestHubModule (line 12) | class TestHubModule(unittest.TestCase): method setUpClass (line 14) | def setUpClass(cls) -> None: method tearDownClass (line 25) | def tearDownClass(cls) -> None: method test_classification1 (line 29) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 45) | def test_classification3(self): method test_classification4 (line 54) | def test_classification4(self): method test_classification5 (line 61) | def test_classification5(self): method test_save_inference_model (line 68) | def test_save_inference_model(self): FILE: modules/image/classification/mobilenet_v2_dishes/data_feed.py function resize_short (line 16) | def resize_short(img, target_size): function crop_image (line 24) | def crop_image(img, target_size, center): function process_image (line 39) | def process_image(img): function reader (line 50) | def reader(images=None, paths=None): FILE: modules/image/classification/mobilenet_v2_dishes/module.py class MobileNetV2Dishes (line 25) | class MobileNetV2Dishes: method __init__ (line 26) | def __init__(self): method get_expected_image_width (line 34) | def get_expected_image_width(self): method get_expected_image_height (line 37) | def get_expected_image_height(self): method get_pretrained_images_mean (line 40) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 44) | def get_pretrained_images_std(self): method _set_config (line 48) | def _set_config(self): method classification (line 72) | def classification(self, method serving_method (line 134) | def serving_method(self, images, **kwargs): method run_cmd (line 143) | def run_cmd(self, argvs): method add_module_config_arg (line 167) | def add_module_config_arg(self): method add_module_input_arg (line 187) | def add_module_input_arg(self): FILE: modules/image/classification/mobilenet_v2_dishes/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function softmax (line 19) | def softmax(x): function postprocess (line 36) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/mobilenet_v2_dishes/test.py class TestHubModule (line 12) | class TestHubModule(unittest.TestCase): method setUpClass (line 14) | def setUpClass(cls) -> None: method tearDownClass (line 25) | def tearDownClass(cls) -> None: method test_classification1 (line 29) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 45) | def test_classification3(self): method test_classification4 (line 54) | def test_classification4(self): method test_classification5 (line 61) | def test_classification5(self): method test_save_inference_model (line 68) | def test_save_inference_model(self): FILE: modules/image/classification/mobilenet_v2_imagenet/module.py class ConvBNLayer (line 26) | class ConvBNLayer(nn.Layer): method __init__ (line 29) | def __init__(self, method forward (line 56) | def forward(self, inputs: paddle.Tensor, if_act: bool = True): class InvertedResidualUnit (line 64) | class InvertedResidualUnit(nn.Layer): method __init__ (line 67) | def __init__(self, num_channels: int, num_in_filter: int, num_filters:... method forward (line 99) | def forward(self, inputs: paddle.Tensor, ifshortcut: bool): class InversiBlocks (line 108) | class InversiBlocks(nn.Layer): method __init__ (line 111) | def __init__(self, in_c: int, t: int, c: int, n: int, s: int, name: str): method forward (line 139) | def forward(self, inputs: paddle.Tensor): class MobileNet (line 155) | class MobileNet(nn.Layer): method __init__ (line 158) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 204) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/mobilenet_v2_imagenet_ssld/module.py class ConvBNLayer (line 26) | class ConvBNLayer(nn.Layer): method __init__ (line 29) | def __init__(self, method forward (line 56) | def forward(self, inputs: paddle.Tensor, if_act: bool = True): class InvertedResidualUnit (line 64) | class InvertedResidualUnit(nn.Layer): method __init__ (line 67) | def __init__(self, num_channels: int, num_in_filter: int, num_filters:... method forward (line 99) | def forward(self, inputs: paddle.Tensor, ifshortcut: bool): class InversiBlocks (line 108) | class InversiBlocks(nn.Layer): method __init__ (line 111) | def __init__(self, in_c: int, t: int, c: int, n: int, s: int, name: str): method forward (line 139) | def forward(self, inputs: paddle.Tensor): class MobileNet (line 155) | class MobileNet(nn.Layer): method __init__ (line 158) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 204) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/mobilenet_v3_large_imagenet_ssld/module.py function make_divisible (line 27) | def make_divisible(v: int, divisor: int = 8, min_value: int = None): class MobileNetV3Large (line 51) | class MobileNetV3Large(nn.Layer): method __init__ (line 54) | def __init__(self, dropout_prob: float = 0.2, class_dim: int = 1000, l... method forward (line 150) | def forward(self, inputs: paddle.Tensor): class ConvBNLayer (line 166) | class ConvBNLayer(nn.Layer): method __init__ (line 169) | def __init__(self, method forward (line 199) | def forward(self, x: paddle.Tensor): class ResidualUnit (line 213) | class ResidualUnit(nn.Layer): method __init__ (line 216) | def __init__(self, method forward (line 246) | def forward(self, inputs: paddle.Tensor): class SEModule (line 257) | class SEModule(nn.Layer): method __init__ (line 260) | def __init__(self, channel: int, reduction: int = 4, name: str = ""): method forward (line 280) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/mobilenet_v3_small_imagenet_ssld/module.py function make_divisible (line 27) | def make_divisible(v, divisor=8, min_value=None): class MobileNetV3Small (line 45) | class MobileNetV3Small(nn.Layer): method __init__ (line 48) | def __init__(self, dropout_prob: float = 0.2, class_dim: int = 1000, l... method forward (line 140) | def forward(self, inputs: paddle.Tensor): class ConvBNLayer (line 156) | class ConvBNLayer(nn.Layer): method __init__ (line 159) | def __init__(self, method forward (line 189) | def forward(self, x): class ResidualUnit (line 203) | class ResidualUnit(nn.Layer): method __init__ (line 206) | def __init__(self, method forward (line 236) | def forward(self, inputs: paddle.Tensor): class SEModule (line 247) | class SEModule(nn.Layer): method __init__ (line 250) | def __init__(self, channel: int, reduction: int = 4, name: str = ""): method forward (line 270) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/pplcnet_x0_25_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x0_25 (line 476) | def PPLCNet_x0_25(**kwargs): FILE: modules/image/classification/pplcnet_x0_25_imagenet/module.py class PPLcNet_x0_5 (line 42) | class PPLcNet_x0_5: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x0_25_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x0_25_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/pplcnet_x0_35_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x0_35 (line 476) | def PPLCNet_x0_35(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/pplcnet_x0_35_imagenet/module.py class PPLcNet_x0_35 (line 42) | class PPLcNet_x0_35: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x0_35_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x0_35_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/pplcnet_x0_5_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x0_5 (line 476) | def PPLCNet_x0_5(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/pplcnet_x0_5_imagenet/module.py class PPLcNet_x0_5 (line 42) | class PPLcNet_x0_5: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x0_5_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x0_5_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/pplcnet_x0_75_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x0_75 (line 476) | def PPLCNet_x0_75(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/pplcnet_x0_75_imagenet/module.py class PPLcNet_x0_75 (line 42) | class PPLcNet_x0_75: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x0_75_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x0_75_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/pplcnet_x1_0_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x1_0 (line 476) | def PPLCNet_x1_0(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/pplcnet_x1_0_imagenet/module.py class PPLcNet_x1_0 (line 42) | class PPLcNet_x1_0: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x1_0_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x1_0_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/pplcnet_x1_5_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x1_5 (line 476) | def PPLCNet_x1_5(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/pplcnet_x1_5_imagenet/module.py class PPLcNet_x1_5 (line 42) | class PPLcNet_x1_5: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x1_5_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x1_5_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/pplcnet_x2_0_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x2_0 (line 476) | def PPLCNet_x2_0(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/pplcnet_x2_0_imagenet/module.py class PPLcNet_x2_0 (line 42) | class PPLcNet_x2_0: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x2_0_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x2_0_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/pplcnet_x2_5_imagenet/model.py class Identity (line 33) | class Identity(nn.Layer): method __init__ (line 35) | def __init__(self): method forward (line 38) | def forward(self, inputs): class TheseusLayer (line 42) | class TheseusLayer(nn.Layer): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _return_dict_hook (line 51) | def _return_dict_hook(self, layer, input, output): method init_res (line 59) | def init_res(self, stages_pattern, return_patterns=None, return_stages... method replace_sub (line 78) | def replace_sub(self, *args, **kwargs) -> None: method upgrade_sublayer (line 82) | def upgrade_sublayer(self, layer_name_pattern: Union[str, List[str]], method stop_after (line 138) | def stop_after(self, stop_layer_name: str) -> bool: method update_res (line 162) | def update_res(self, return_patterns: Union[str, List[str]]) -> Dict[s... function save_sub_res_hook (line 200) | def save_sub_res_hook(layer, input, output): function set_identity (line 204) | def set_identity(parent_layer: nn.Layer, layer_name: str, layer_index: s... function parse_pattern_str (line 236) | def parse_pattern_str(pattern: str, parent_layer: nn.Layer) -> Union[Non... function make_divisible (line 307) | def make_divisible(v, divisor=8, min_value=None): class ConvBNLayer (line 316) | class ConvBNLayer(TheseusLayer): method __init__ (line 318) | def __init__(self, num_channels, filter_size, num_filters, stride, num... method forward (line 335) | def forward(self, x): class DepthwiseSeparable (line 342) | class DepthwiseSeparable(TheseusLayer): method __init__ (line 344) | def __init__(self, num_channels, num_filters, stride, dw_size=3, use_s... method forward (line 356) | def forward(self, x): class SEModule (line 364) | class SEModule(TheseusLayer): method __init__ (line 366) | def __init__(self, channel, reduction=4): method forward (line 374) | def forward(self, x): class PPLCNet (line 385) | class PPLCNet(TheseusLayer): method __init__ (line 387) | def __init__(self, method forward (line 458) | def forward(self, x): function PPLCNet_x2_5 (line 476) | def PPLCNet_x2_5(pretrained=False, use_ssld=False, **kwargs): FILE: modules/image/classification/pplcnet_x2_5_imagenet/module.py class PPLcNet_x2_5 (line 42) | class PPLcNet_x2_5: method __init__ (line 44) | def __init__(self): method classification (line 54) | def classification(self, method run_cmd (line 111) | def run_cmd(self, argvs: list): method serving_method (line 133) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 141) | def add_module_config_arg(self): method add_module_input_arg (line 150) | def add_module_input_arg(self): FILE: modules/image/classification/pplcnet_x2_5_imagenet/processor.py function create_operators (line 36) | def create_operators(params, class_num=None): class UnifiedResize (line 59) | class UnifiedResize(object): method __init__ (line 61) | def __init__(self, interpolation=None, backend="cv2"): method __call__ (line 97) | def __call__(self, src, size): class OperatorParamError (line 101) | class OperatorParamError(ValueError): class DecodeImage (line 107) | class DecodeImage(object): method __init__ (line 110) | def __init__(self, to_rgb=True, to_np=False, channel_first=False): method __call__ (line 115) | def __call__(self, img): class ResizeImage (line 132) | class ResizeImage(object): method __init__ (line 135) | def __init__(self, size=None, resize_short=None, interpolation=None, b... method __call__ (line 150) | def __call__(self, img): class CropImage (line 162) | class CropImage(object): method __init__ (line 165) | def __init__(self, size): method __call__ (line 171) | def __call__(self, img): class RandCropImage (line 182) | class RandCropImage(object): method __init__ (line 185) | def __init__(self, size, scale=None, ratio=None, interpolation=None, b... method __call__ (line 196) | def __call__(self, img): class RandFlipImage (line 224) | class RandFlipImage(object): method __init__ (line 232) | def __init__(self, flip_code=1): method __call__ (line 236) | def __call__(self, img): class NormalizeImage (line 243) | class NormalizeImage(object): method __init__ (line 247) | def __init__(self, scale=None, mean=None, std=None, order='chw', outpu... method __call__ (line 262) | def __call__(self, img): class ToCHWImage (line 280) | class ToCHWImage(object): method __init__ (line 284) | def __init__(self): method __call__ (line 287) | def __call__(self, img): class ColorJitter (line 295) | class ColorJitter(RawColorJitter): method __init__ (line 299) | def __init__(self, *args, **kwargs): method __call__ (line 302) | def __call__(self, img): function base64_to_cv2 (line 312) | def base64_to_cv2(b64str): class Topk (line 319) | class Topk(object): method __init__ (line 321) | def __init__(self, topk=1, class_id_map_file=None): method parse_class_id_map (line 326) | def parse_class_id_map(self, class_id_map_file): method __call__ (line 347) | def __call__(self, x, file_names=None, multilabel=False): FILE: modules/image/classification/pplcnet_x2_5_imagenet/utils.py class AttrDict (line 23) | class AttrDict(dict): method __getattr__ (line 25) | def __getattr__(self, key): method __setattr__ (line 28) | def __setattr__(self, key, value): method __deepcopy__ (line 34) | def __deepcopy__(self, content): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function parse_config (line 54) | def parse_config(cfg_file): function override (line 62) | def override(dl, ks, v): function override_config (line 96) | def override_config(config, options=None): function get_config (line 122) | def get_config(fname, overrides=None, show=False): FILE: modules/image/classification/repvgg_a0_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_A0 (line 167) | class RepVGG_A0(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 211) | def _make_stage(self, planes, num_blocks, stride): method eval (line 228) | def eval(self): method transforms (line 234) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 243) | def forward(self, x): FILE: modules/image/classification/repvgg_a1_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_A1 (line 167) | class RepVGG_A1(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 211) | def _make_stage(self, planes, num_blocks, stride): method eval (line 228) | def eval(self): method transforms (line 234) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 243) | def forward(self, x): FILE: modules/image/classification/repvgg_a2_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_A2 (line 167) | class RepVGG_A2(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 211) | def _make_stage(self, planes, num_blocks, stride): method eval (line 228) | def eval(self): method transforms (line 234) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 243) | def forward(self, x): FILE: modules/image/classification/repvgg_b0_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_B0 (line 167) | class RepVGG_B0(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 211) | def _make_stage(self, planes, num_blocks, stride): method eval (line 228) | def eval(self): method transforms (line 234) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 243) | def forward(self, x): FILE: modules/image/classification/repvgg_b1_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_B1 (line 167) | class RepVGG_B1(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 211) | def _make_stage(self, planes, num_blocks, stride): method eval (line 228) | def eval(self): method transforms (line 234) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 243) | def forward(self, x): FILE: modules/image/classification/repvgg_b1g2_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_B1G2 (line 167) | class RepVGG_B1G2(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 212) | def _make_stage(self, planes, num_blocks, stride): method eval (line 229) | def eval(self): method transforms (line 235) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 244) | def forward(self, x): FILE: modules/image/classification/repvgg_b1g4_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_B1G4 (line 167) | class RepVGG_B1G4(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 212) | def _make_stage(self, planes, num_blocks, stride): method eval (line 229) | def eval(self): method transforms (line 235) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 244) | def forward(self, x): FILE: modules/image/classification/repvgg_b2_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_B2 (line 167) | class RepVGG_B2(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 211) | def _make_stage(self, planes, num_blocks, stride): method eval (line 228) | def eval(self): method transforms (line 234) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 243) | def forward(self, x): FILE: modules/image/classification/repvgg_b2g4_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_B2G4 (line 167) | class RepVGG_B2G4(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 212) | def _make_stage(self, planes, num_blocks, stride): method eval (line 229) | def eval(self): method transforms (line 235) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 244) | def forward(self, x): FILE: modules/image/classification/repvgg_b3g4_imagenet/module.py class ConvBN (line 26) | class ConvBN(nn.Layer): method __init__ (line 27) | def __init__(self, in_channels, out_channels, kernel_size, stride, pad... method forward (line 39) | def forward(self, x): class RepVGGBlock (line 45) | class RepVGGBlock(nn.Layer): method __init__ (line 46) | def __init__(self, method forward (line 89) | def forward(self, inputs): method eval (line 99) | def eval(self): method get_equivalent_kernel_bias (line 117) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 123) | def _pad_1x1_to_3x3_tensor(self, kernel1x1): method _fuse_bn_tensor (line 129) | def _fuse_bn_tensor(self, branch): class RepVGG_B3G4 (line 167) | class RepVGG_B3G4(nn.Layer): method __init__ (line 168) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method _make_stage (line 212) | def _make_stage(self, planes, num_blocks, stride): method eval (line 229) | def eval(self): method transforms (line 235) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 244) | def forward(self, x): FILE: modules/image/classification/res2net101_vd_26w_4s_imagenet/data_feed.py function resize_short (line 15) | def resize_short(img, target_size): function crop_image (line 23) | def crop_image(img, target_size, center): function process_image (line 38) | def process_image(img): function reader (line 49) | def reader(images=None, paths=None): FILE: modules/image/classification/res2net101_vd_26w_4s_imagenet/module.py class Res2Net101vd26w4sImagenet (line 27) | class Res2Net101vd26w4sImagenet: method __init__ (line 29) | def __init__(self): method get_expected_image_width (line 37) | def get_expected_image_width(self): method get_expected_image_height (line 40) | def get_expected_image_height(self): method get_pretrained_images_mean (line 43) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 47) | def get_pretrained_images_std(self): method _set_config (line 51) | def _set_config(self): method classification (line 74) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 124) | def serving_method(self, images, **kwargs): method run_cmd (line 133) | def run_cmd(self, argvs): method add_module_config_arg (line 150) | def add_module_config_arg(self): method add_module_input_arg (line 161) | def add_module_input_arg(self): FILE: modules/image/classification/res2net101_vd_26w_4s_imagenet/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function softmax (line 19) | def softmax(x): function postprocess (line 35) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/res2net101_vd_26w_4s_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/resnet101_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 63) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 99) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 113) | class BasicBlock(nn.Layer): method __init__ (line 116) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 139) | def forward(self, inputs: paddle.Tensor): class ResNet101 (line 160) | class ResNet101(nn.Layer): method __init__ (line 163) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 224) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet101_vd_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet101_vd (line 177) | class ResNet101_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 244) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet101_vd_imagenet_ssld/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet101_vd (line 177) | class ResNet101_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 244) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet152_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 63) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 99) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 113) | class BasicBlock(nn.Layer): method __init__ (line 116) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 139) | def forward(self, inputs: paddle.Tensor): class ResNet152 (line 160) | class ResNet152(nn.Layer): method __init__ (line 163) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 225) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet152_vd_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet152_vd (line 177) | class ResNet152_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 244) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet18_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 63) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 99) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 113) | class BasicBlock(nn.Layer): method __init__ (line 116) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 139) | def forward(self, inputs: paddle.Tensor): class ResNet18 (line 160) | class ResNet18(nn.Layer): method __init__ (line 163) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 218) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet18_vd_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet18_vd (line 177) | class ResNet18_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 236) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet200_vd_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet200_vd (line 177) | class ResNet200_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 244) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet34_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 63) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 99) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 113) | class BasicBlock(nn.Layer): method __init__ (line 116) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 139) | def forward(self, inputs: paddle.Tensor): class ResNet34 (line 160) | class ResNet34(nn.Layer): method __init__ (line 163) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 218) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet34_v2_imagenet/data_feed.py function resize_short (line 19) | def resize_short(img, target_size): function crop_image (line 27) | def crop_image(img, target_size, center): function process_image (line 42) | def process_image(img): function test_reader (line 54) | def test_reader(paths=None, images=None): FILE: modules/image/classification/resnet34_v2_imagenet/module.py class ResNet34 (line 24) | class ResNet34(hub.Module): method _initialize (line 25) | def _initialize(self): method get_expected_image_width (line 32) | def get_expected_image_width(self): method get_expected_image_height (line 35) | def get_expected_image_height(self): method get_pretrained_images_mean (line 38) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 42) | def get_pretrained_images_std(self): method _set_config (line 46) | def _set_config(self): method context (line 67) | def context(self, method classification (line 131) | def classification(self, paths=None, images=None, use_gpu=False, batch... method add_module_config_arg (line 184) | def add_module_config_arg(self): method add_module_input_arg (line 193) | def add_module_input_arg(self): method check_input_data (line 200) | def check_input_data(self, args): method run_cmd (line 212) | def run_cmd(self, argvs): FILE: modules/image/classification/resnet34_v2_imagenet/name_adapter.py class NameAdapter (line 4) | class NameAdapter(object): method __init__ (line 7) | def __init__(self, model): method model_type (line 12) | def model_type(self): method variant (line 16) | def variant(self): method fix_conv_norm_name (line 19) | def fix_conv_norm_name(self, name): method fix_shortcut_name (line 29) | def fix_shortcut_name(self, name): method fix_bottleneck_name (line 34) | def fix_bottleneck_name(self, name): method fix_layer_warp_name (line 47) | def fix_layer_warp_name(self, stage_num, count, i): method fix_c1_stage_name (line 60) | def fix_c1_stage_name(self): FILE: modules/image/classification/resnet34_v2_imagenet/nonlocal_helper.py function space_nonlocal (line 25) | def space_nonlocal(input, dim_in, dim_out, prefix, dim_inner, max_pool_s... function add_space_nonlocal (line 144) | def add_space_nonlocal(input, dim_in, dim_out, prefix, dim_inner): FILE: modules/image/classification/resnet34_v2_imagenet/processor.py function load_label_info (line 2) | def load_label_info(file_path): FILE: modules/image/classification/resnet34_v2_imagenet/resnet.py class ResNet (line 22) | class ResNet(object): method __init__ (line 38) | def __init__(self, method _conv_offset (line 93) | def _conv_offset(self, input, filter_size, stride, padding, act=None, ... method _conv_norm (line 107) | def _conv_norm(self, input, num_filters, filter_size, stride=1, groups... method _shortcut (line 181) | def _shortcut(self, input, ch_out, stride, is_first, name): method bottleneck (line 201) | def bottleneck(self, input, num_filters, stride, is_first, name, dcn_v... method basicblock (line 247) | def basicblock(self, input, num_filters, stride, is_first, name, dcn_v... method layer_warp (line 255) | def layer_warp(self, input, stage_num): method c1_stage (line 299) | def c1_stage(self, input): method __call__ (line 319) | def __call__(self, input): class ResNetC5 (line 353) | class ResNetC5(ResNet): method __init__ (line 354) | def __init__(self, FILE: modules/image/classification/resnet34_vd_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet34_vd (line 177) | class ResNet34_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 236) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet34_vd_imagenet_ssld/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet34_vd (line 177) | class ResNet34_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 236) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet50_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 63) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 99) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 113) | class BasicBlock(nn.Layer): method __init__ (line 116) | def __init__(self, num_channels: int, num_filters: int, stride: int, s... method forward (line 139) | def forward(self, inputs: paddle.Tensor): class ResNet50 (line 160) | class ResNet50(nn.Layer): method __init__ (line 163) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 218) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet50_v2_imagenet/data_feed.py function resize_short (line 19) | def resize_short(img, target_size): function crop_image (line 27) | def crop_image(img, target_size, center): function process_image (line 42) | def process_image(img): function test_reader (line 54) | def test_reader(paths=None, images=None): FILE: modules/image/classification/resnet50_v2_imagenet/module.py class ResNet50 (line 24) | class ResNet50(hub.Module): method _initialize (line 25) | def _initialize(self): method get_expected_image_width (line 32) | def get_expected_image_width(self): method get_expected_image_height (line 35) | def get_expected_image_height(self): method get_pretrained_images_mean (line 38) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 42) | def get_pretrained_images_std(self): method _set_config (line 46) | def _set_config(self): method context (line 67) | def context(self, method classification (line 131) | def classification(self, paths=None, images=None, use_gpu=False, batch... method add_module_config_arg (line 184) | def add_module_config_arg(self): method add_module_input_arg (line 193) | def add_module_input_arg(self): method check_input_data (line 200) | def check_input_data(self, args): method run_cmd (line 212) | def run_cmd(self, argvs): FILE: modules/image/classification/resnet50_v2_imagenet/name_adapter.py class NameAdapter (line 4) | class NameAdapter(object): method __init__ (line 7) | def __init__(self, model): method model_type (line 12) | def model_type(self): method variant (line 16) | def variant(self): method fix_conv_norm_name (line 19) | def fix_conv_norm_name(self, name): method fix_shortcut_name (line 29) | def fix_shortcut_name(self, name): method fix_bottleneck_name (line 34) | def fix_bottleneck_name(self, name): method fix_layer_warp_name (line 47) | def fix_layer_warp_name(self, stage_num, count, i): method fix_c1_stage_name (line 60) | def fix_c1_stage_name(self): FILE: modules/image/classification/resnet50_v2_imagenet/nonlocal_helper.py function space_nonlocal (line 25) | def space_nonlocal(input, dim_in, dim_out, prefix, dim_inner, max_pool_s... function add_space_nonlocal (line 144) | def add_space_nonlocal(input, dim_in, dim_out, prefix, dim_inner): FILE: modules/image/classification/resnet50_v2_imagenet/processor.py function load_label_info (line 2) | def load_label_info(file_path): FILE: modules/image/classification/resnet50_v2_imagenet/resnet.py class ResNet (line 22) | class ResNet(object): method __init__ (line 38) | def __init__(self, method _conv_offset (line 93) | def _conv_offset(self, input, filter_size, stride, padding, act=None, ... method _conv_norm (line 107) | def _conv_norm(self, input, num_filters, filter_size, stride=1, groups... method _shortcut (line 181) | def _shortcut(self, input, ch_out, stride, is_first, name): method bottleneck (line 201) | def bottleneck(self, input, num_filters, stride, is_first, name, dcn_v... method basicblock (line 247) | def basicblock(self, input, num_filters, stride, is_first, name, dcn_v... method layer_warp (line 255) | def layer_warp(self, input, stage_num): method c1_stage (line 299) | def c1_stage(self, input): method __call__ (line 319) | def __call__(self, input): class ResNetC5 (line 353) | class ResNetC5(ResNet): method __init__ (line 354) | def __init__(self, FILE: modules/image/classification/resnet50_vd_10w/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet50_vd (line 177) | class ResNet50_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 236) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet50_vd_animals/data_feed.py function resize_short (line 16) | def resize_short(img, target_size): function crop_image (line 24) | def crop_image(img, target_size, center): function process_image (line 39) | def process_image(img): function reader (line 50) | def reader(images=None, paths=None): FILE: modules/image/classification/resnet50_vd_animals/module.py class ResNet50vdAnimals (line 28) | class ResNet50vdAnimals: method __init__ (line 30) | def __init__(self): method get_expected_image_width (line 37) | def get_expected_image_width(self): method get_expected_image_height (line 40) | def get_expected_image_height(self): method get_pretrained_images_mean (line 43) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 47) | def get_pretrained_images_std(self): method _get_device_id (line 51) | def _get_device_id(self, places): method _set_config (line 59) | def _set_config(self): method classification (line 101) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 168) | def serving_method(self, images, **kwargs): method run_cmd (line 177) | def run_cmd(self, argvs): method add_module_config_arg (line 198) | def add_module_config_arg(self): method add_module_input_arg (line 212) | def add_module_input_arg(self): FILE: modules/image/classification/resnet50_vd_animals/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function softmax (line 19) | def softmax(x): function postprocess (line 35) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/resnet50_vd_animals/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/resnet50_vd_dishes/data_feed.py function resize_short (line 16) | def resize_short(img, target_size): function crop_image (line 24) | def crop_image(img, target_size, center): function process_image (line 39) | def process_image(img): function reader (line 50) | def reader(images=None, paths=None): FILE: modules/image/classification/resnet50_vd_dishes/module.py class ResNet50vdDishes (line 28) | class ResNet50vdDishes: method __init__ (line 30) | def __init__(self): method get_expected_image_width (line 37) | def get_expected_image_width(self): method get_expected_image_height (line 40) | def get_expected_image_height(self): method get_pretrained_images_mean (line 43) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 47) | def get_pretrained_images_std(self): method _set_config (line 51) | def _set_config(self): method classification (line 74) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 120) | def serving_method(self, images, **kwargs): method run_cmd (line 129) | def run_cmd(self, argvs): method add_module_config_arg (line 146) | def add_module_config_arg(self): method add_module_input_arg (line 157) | def add_module_input_arg(self): FILE: modules/image/classification/resnet50_vd_dishes/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function softmax (line 19) | def softmax(x): function postprocess (line 35) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/resnet50_vd_dishes/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/resnet50_vd_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__( method forward (line 67) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 75) | class BottleneckBlock(nn.Layer): method __init__ (line 78) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 123) | class BasicBlock(nn.Layer): method __init__ (line 126) | def __init__(self, method forward (line 156) | def forward(self, inputs: paddle.Tensor): class ResNet50_vd (line 177) | class ResNet50_vd(nn.Layer): method __init__ (line 180) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 237) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet50_vd_imagenet_ssld/module.py class ConvBNLayer (line 31) | class ConvBNLayer(nn.Layer): method __init__ (line 34) | def __init__( method forward (line 70) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 78) | class BottleneckBlock(nn.Layer): method __init__ (line 81) | def __init__(self, method forward (line 113) | def forward(self, inputs: paddle.Tensor): class BasicBlock (line 127) | class BasicBlock(nn.Layer): method __init__ (line 130) | def __init__(self, method forward (line 160) | def forward(self, inputs: paddle.Tensor): class ResNet50_vd (line 182) | class ResNet50_vd(nn.Layer): method __init__ (line 185) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 250) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 259) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnet50_vd_wildanimals/data_feed.py function resize_short (line 15) | def resize_short(img, target_size): function crop_image (line 23) | def crop_image(img, target_size, center): function process_image (line 38) | def process_image(img): function reader (line 49) | def reader(images=None, paths=None): FILE: modules/image/classification/resnet50_vd_wildanimals/module.py class ResNet50vdWildAnimals (line 29) | class ResNet50vdWildAnimals: method __init__ (line 31) | def __init__(self): method get_expected_image_width (line 38) | def get_expected_image_width(self): method get_expected_image_height (line 41) | def get_expected_image_height(self): method get_pretrained_images_mean (line 44) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 48) | def get_pretrained_images_std(self): method _set_config (line 52) | def _set_config(self): method classification (line 75) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 121) | def serving_method(self, images, **kwargs): method run_cmd (line 130) | def run_cmd(self, argvs): method add_module_config_arg (line 147) | def add_module_config_arg(self): method add_module_input_arg (line 158) | def add_module_input_arg(self): FILE: modules/image/classification/resnet50_vd_wildanimals/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function softmax (line 19) | def softmax(x): function postprocess (line 35) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/resnet50_vd_wildanimals/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/resnext101_32x4d_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class ResNeXt101_32x4d (line 130) | class ResNeXt101_32x4d(nn.Layer): method __init__ (line 131) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 192) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext101_64x4d_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class ResNeXt101_64x4d (line 130) | class ResNeXt101_64x4d(nn.Layer): method __init__ (line 131) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 192) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext101_vd_32x4d_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__( method forward (line 68) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 76) | class BottleneckBlock(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 117) | def forward(self, inputs: paddle.Tensor): class ResNeXt101_vd (line 140) | class ResNeXt101_vd(nn.Layer): method __init__ (line 143) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 210) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext101_vd_64x4d_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__( method forward (line 68) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 76) | class BottleneckBlock(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 117) | def forward(self, inputs: paddle.Tensor): class ResNeXt101_vd (line 140) | class ResNeXt101_vd(nn.Layer): method __init__ (line 143) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 210) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext152_32x4d_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class ResNeXt152_32x4d (line 130) | class ResNeXt152_32x4d(nn.Layer): method __init__ (line 131) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 192) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext152_64x4d_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class ResNeXt152_64x4d (line 130) | class ResNeXt152_64x4d(nn.Layer): method __init__ (line 131) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 192) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext152_vd_32x4d_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__( method forward (line 68) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 76) | class BottleneckBlock(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 117) | def forward(self, inputs: paddle.Tensor): class ResNeXt152_vd (line 140) | class ResNeXt152_vd(nn.Layer): method __init__ (line 143) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 210) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext152_vd_64x4d_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__( method forward (line 68) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 76) | class BottleneckBlock(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 117) | def forward(self, inputs: paddle.Tensor): class ResNeXt152_vd (line 140) | class ResNeXt152_vd(nn.Layer): method __init__ (line 143) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 210) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext50_32x4d_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class ResNeXt50_32x4d (line 130) | class ResNeXt50_32x4d(nn.Layer): method __init__ (line 131) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 186) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext50_64x4d_imagenet/module.py class ConvBNLayer (line 28) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class ResNeXt50_64x4d (line 130) | class ResNeXt50_64x4d(nn.Layer): method __init__ (line 131) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 186) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext50_vd_32x4d_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__( method forward (line 68) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 76) | class BottleneckBlock(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 117) | def forward(self, inputs: paddle.Tensor): class ResNeXt50_vd (line 140) | class ResNeXt50_vd(nn.Layer): method __init__ (line 143) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 204) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/resnext50_vd_64x4d_imagenet/module.py class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__( method forward (line 68) | def forward(self, inputs: paddle.Tensor): class BottleneckBlock (line 76) | class BottleneckBlock(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 117) | def forward(self, inputs: paddle.Tensor): class ResNeXt50_vd (line 140) | class ResNeXt50_vd(nn.Layer): method __init__ (line 143) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 204) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/rexnet_1_0_imagenet/module.py function conv_bn_act (line 27) | def conv_bn_act(out, in_channels, channels, kernel=1, stride=1, pad=0, n... function conv_bn_swish (line 34) | def conv_bn_swish(out, in_channels, channels, kernel=1, stride=1, pad=0,... class SE (line 40) | class SE(nn.Layer): method __init__ (line 41) | def __init__(self, in_channels, channels, se_ratio=12): method forward (line 49) | def forward(self, x): class LinearBottleneck (line 55) | class LinearBottleneck(nn.Layer): method __init__ (line 56) | def __init__(self, in_channels, channels, t, stride, use_se=True, se_r... method forward (line 86) | def forward(self, x): class ReXNetV1 (line 103) | class ReXNetV1(nn.Layer): method __init__ (line 104) | def __init__(self, method transforms (line 184) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 193) | def forward(self, x): FILE: modules/image/classification/rexnet_1_3_imagenet/module.py function conv_bn_act (line 27) | def conv_bn_act(out, in_channels, channels, kernel=1, stride=1, pad=0, n... function conv_bn_swish (line 34) | def conv_bn_swish(out, in_channels, channels, kernel=1, stride=1, pad=0,... class SE (line 40) | class SE(nn.Layer): method __init__ (line 41) | def __init__(self, in_channels, channels, se_ratio=12): method forward (line 49) | def forward(self, x): class LinearBottleneck (line 55) | class LinearBottleneck(nn.Layer): method __init__ (line 56) | def __init__(self, in_channels, channels, t, stride, use_se=True, se_r... method forward (line 86) | def forward(self, x): class ReXNetV1 (line 103) | class ReXNetV1(nn.Layer): method __init__ (line 104) | def __init__(self, method transforms (line 184) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 193) | def forward(self, x): FILE: modules/image/classification/rexnet_1_5_imagenet/module.py function conv_bn_act (line 27) | def conv_bn_act(out, in_channels, channels, kernel=1, stride=1, pad=0, n... function conv_bn_swish (line 34) | def conv_bn_swish(out, in_channels, channels, kernel=1, stride=1, pad=0,... class SE (line 40) | class SE(nn.Layer): method __init__ (line 41) | def __init__(self, in_channels, channels, se_ratio=12): method forward (line 49) | def forward(self, x): class LinearBottleneck (line 55) | class LinearBottleneck(nn.Layer): method __init__ (line 56) | def __init__(self, in_channels, channels, t, stride, use_se=True, se_r... method forward (line 86) | def forward(self, x): class ReXNetV1 (line 103) | class ReXNetV1(nn.Layer): method __init__ (line 104) | def __init__(self, method transforms (line 184) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 193) | def forward(self, x): FILE: modules/image/classification/rexnet_2_0_imagenet/module.py function conv_bn_act (line 27) | def conv_bn_act(out, in_channels, channels, kernel=1, stride=1, pad=0, n... function conv_bn_swish (line 34) | def conv_bn_swish(out, in_channels, channels, kernel=1, stride=1, pad=0,... class SE (line 40) | class SE(nn.Layer): method __init__ (line 41) | def __init__(self, in_channels, channels, se_ratio=12): method forward (line 49) | def forward(self, x): class LinearBottleneck (line 55) | class LinearBottleneck(nn.Layer): method __init__ (line 56) | def __init__(self, in_channels, channels, t, stride, use_se=True, se_r... method forward (line 86) | def forward(self, x): class ReXNetV1 (line 103) | class ReXNetV1(nn.Layer): method __init__ (line 104) | def __init__(self, method transforms (line 184) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 193) | def forward(self, x): FILE: modules/image/classification/rexnet_3_0_imagenet/module.py function conv_bn_act (line 27) | def conv_bn_act(out, in_channels, channels, kernel=1, stride=1, pad=0, n... function conv_bn_swish (line 34) | def conv_bn_swish(out, in_channels, channels, kernel=1, stride=1, pad=0,... class SE (line 40) | class SE(nn.Layer): method __init__ (line 41) | def __init__(self, in_channels, channels, se_ratio=12): method forward (line 49) | def forward(self, x): class LinearBottleneck (line 55) | class LinearBottleneck(nn.Layer): method __init__ (line 56) | def __init__(self, in_channels, channels, t, stride, use_se=True, se_r... method forward (line 86) | def forward(self, x): class ReXNetV1 (line 103) | class ReXNetV1(nn.Layer): method __init__ (line 104) | def __init__(self, method transforms (line 184) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 193) | def forward(self, x): FILE: modules/image/classification/se_hrnet64_imagenet_ssld/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 31) | def __init__(self, num_channels, num_filters, filter_size, stride=1, g... method forward (line 52) | def forward(self, input): class Layer1 (line 58) | class Layer1(nn.Layer): method __init__ (line 59) | def __init__(self, num_channels, has_se=False, name=None): method forward (line 76) | def forward(self, input): class TransitionLayer (line 83) | class TransitionLayer(nn.Layer): method __init__ (line 84) | def __init__(self, in_channels, out_channels, name=None): method forward (line 113) | def forward(self, input): class Branches (line 126) | class Branches(nn.Layer): method __init__ (line 127) | def __init__(self, block_num, in_channels, out_channels, has_se=False,... method forward (line 145) | def forward(self, inputs): class BottleneckBlock (line 156) | class BottleneckBlock(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 192) | def forward(self, input): class BasicBlock (line 209) | class BasicBlock(nn.Layer): method __init__ (line 210) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 237) | def forward(self, input): class SELayer (line 253) | class SELayer(nn.Layer): method __init__ (line 254) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 276) | def forward(self, input): class Stage (line 288) | class Stage(nn.Layer): method __init__ (line 289) | def __init__(self, num_channels, num_modules, num_filters, has_se=Fals... method forward (line 314) | def forward(self, input): class HighResolutionModule (line 321) | class HighResolutionModule(nn.Layer): method __init__ (line 322) | def __init__(self, num_channels, num_filters, has_se=False, multi_scal... method forward (line 331) | def forward(self, input): class FuseLayers (line 337) | class FuseLayers(nn.Layer): method __init__ (line 338) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 386) | def forward(self, input): class LastClsOut (line 412) | class LastClsOut(nn.Layer): method __init__ (line 413) | def __init__(self, num_channel_list, has_se, num_filters_list=[32, 64,... method forward (line 428) | def forward(self, inputs): class SE_HRNet64 (line 445) | class SE_HRNet64(nn.Layer): method __init__ (line 446) | def __init__(self, label_list: list = None, load_checkpoint: str = None): method transforms (line 545) | def transforms(self, images: Union[str, np.ndarray]): method forward (line 554) | def forward(self, input): FILE: modules/image/classification/se_resnet18_vd_imagenet/data_feed.py function resize_short (line 15) | def resize_short(img, target_size): function crop_image (line 23) | def crop_image(img, target_size, center): function process_image (line 38) | def process_image(img): function reader (line 49) | def reader(images=None, paths=None): FILE: modules/image/classification/se_resnet18_vd_imagenet/module.py class SEResNet18vdImageNet (line 26) | class SEResNet18vdImageNet: method __init__ (line 28) | def __init__(self): method get_expected_image_width (line 35) | def get_expected_image_width(self): method get_expected_image_height (line 38) | def get_expected_image_height(self): method get_pretrained_images_mean (line 41) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 45) | def get_pretrained_images_std(self): method _set_config (line 49) | def _set_config(self): method classification (line 72) | def classification(self, images=None, paths=None, batch_size=1, use_gp... method serving_method (line 131) | def serving_method(self, images, **kwargs): method run_cmd (line 140) | def run_cmd(self, argvs): method add_module_config_arg (line 157) | def add_module_config_arg(self): method add_module_input_arg (line 168) | def add_module_input_arg(self): FILE: modules/image/classification/se_resnet18_vd_imagenet/processor.py function base64_to_cv2 (line 11) | def base64_to_cv2(b64str): function softmax (line 18) | def softmax(x): function postprocess (line 35) | def postprocess(data_out, label_list, top_k): FILE: modules/image/classification/se_resnet18_vd_imagenet/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_classification1 (line 31) | def test_classification1(self): method test_classification2 (line 37) | def test_classification2(self): method test_classification3 (line 43) | def test_classification3(self): method test_classification4 (line 49) | def test_classification4(self): method test_classification5 (line 52) | def test_classification5(self): method test_save_inference_model (line 55) | def test_save_inference_model(self): FILE: modules/image/classification/shufflenet_v2_imagenet/module.py function channel_shuffle (line 28) | def channel_shuffle(x: paddle.Tensor, groups: int): class ConvBNLayer (line 42) | class ConvBNLayer(nn.Layer): method __init__ (line 45) | def __init__(self, method forward (line 79) | def forward(self, inputs: paddle.Tensor, if_act: bool = True): class InvertedResidualUnit (line 87) | class InvertedResidualUnit(nn.Layer): method __init__ (line 90) | def __init__(self, method forward (line 188) | def forward(self, inputs: paddle.Tensor): class ShuffleNet (line 216) | class ShuffleNet(nn.Layer): method __init__ (line 219) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 304) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/vgg16_imagenet/data_feed.py function resize_short (line 19) | def resize_short(img, target_size): function crop_image (line 27) | def crop_image(img, target_size, center): function process_image (line 42) | def process_image(img): function test_reader (line 54) | def test_reader(paths=None, images=None): FILE: modules/image/classification/vgg16_imagenet/module.py class VGG16 (line 25) | class VGG16(hub.Module): method _initialize (line 26) | def _initialize(self): method get_expected_image_width (line 33) | def get_expected_image_width(self): method get_expected_image_height (line 36) | def get_expected_image_height(self): method get_pretrained_images_mean (line 39) | def get_pretrained_images_mean(self): method get_pretrained_images_std (line 43) | def get_pretrained_images_std(self): method _set_config (line 47) | def _set_config(self): method context (line 69) | def context(self, method classification (line 130) | def classification(self, paths=None, images=None, use_gpu=False, batch... method add_module_config_arg (line 182) | def add_module_config_arg(self): method add_module_input_arg (line 191) | def add_module_input_arg(self): method check_input_data (line 199) | def check_input_data(self, args): method run_cmd (line 211) | def run_cmd(self, argvs): FILE: modules/image/classification/vgg16_imagenet/processor.py function load_label_info (line 2) | def load_label_info(file_path): FILE: modules/image/classification/vgg16_imagenet/vgg.py class VGG (line 12) | class VGG(object): method __init__ (line 26) | def __init__(self, method __call__ (line 41) | def __call__(self, input): method _vgg_block (line 56) | def _vgg_block(self, input): method _add_extras_block (line 100) | def _add_extras_block(self, input): method _conv_block (line 111) | def _conv_block(self, input, num_filter, groups, name=None): method _extra_block (line 124) | def _extra_block(self, input, num_filters1, num_filters2, padding_size... method _conv_layer (line 140) | def _conv_layer(self, method _pooling_block (line 164) | def _pooling_block(self, conv, pool_size, pool_stride, pool_padding=0,... method _l2_norm_scale (line 174) | def _l2_norm_scale(self, input, init_scale=1.0, channel_shared=False): FILE: modules/image/classification/xception41_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 61) | def forward(self, inputs: paddle.Tensor): class SeparableConv (line 67) | class SeparableConv(nn.Layer): method __init__ (line 70) | def __init__(self, input_channels: int, output_channels: int, stride: ... method forward (line 77) | def forward(self, inputs: paddle.Tensor): class EntryFlowBottleneckBlock (line 83) | class EntryFlowBottleneckBlock(nn.Layer): method __init__ (line 86) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class EntryFlow (line 119) | class EntryFlow(nn.Layer): method __init__ (line 122) | def __init__(self, block_num: int = 3): method forward (line 142) | def forward(self, inputs: paddle.Tensor): class MiddleFlowBottleneckBlock (line 159) | class MiddleFlowBottleneckBlock(nn.Layer): method __init__ (line 162) | def __init__(self, input_channels: int, output_channels: int, name: str): method forward (line 169) | def forward(self, inputs: paddle.Tensor): class MiddleFlow (line 179) | class MiddleFlow(nn.Layer): method __init__ (line 182) | def __init__(self, block_num: int = 8): method forward (line 204) | def forward(self, inputs: paddle.Tensor): class ExitFlowBottleneckBlock (line 225) | class ExitFlowBottleneckBlock(nn.Layer): method __init__ (line 228) | def __init__(self, input_channels: int, output_channels1: int, output_... method forward (line 243) | def forward(self, inputs: paddle.Tensor): class ExitFlow (line 253) | class ExitFlow(nn.Layer): method __init__ (line 256) | def __init__(self, class_dim: int): method forward (line 272) | def forward(self, inputs: paddle.Tensor): class Xception41 (line 293) | class Xception41(nn.Layer): method __init__ (line 296) | def __init__(self, class_dim: int = 1000, load_checkpoint: str = None): method forward (line 319) | def forward(self, inputs: paddle.Tensor): FILE: modules/image/classification/xception65_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 61) | def forward(self, inputs: paddle.Tensor): class SeparableConv (line 67) | class SeparableConv(nn.Layer): method __init__ (line 70) | def __init__(self, input_channels: int, output_channels: int, stride: ... method forward (line 77) | def forward(self, inputs: paddle.Tensor): class EntryFlowBottleneckBlock (line 83) | class EntryFlowBottleneckBlock(nn.Layer): method __init__ (line 86) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class EntryFlow (line 119) | class EntryFlow(nn.Layer): method __init__ (line 122) | def __init__(self, block_num: int = 3): method forward (line 142) | def forward(self, inputs: paddle.Tensor): class MiddleFlowBottleneckBlock (line 159) | class MiddleFlowBottleneckBlock(nn.Layer): method __init__ (line 162) | def __init__(self, input_channels: int, output_channels: int, name: str): method forward (line 169) | def forward(self, inputs: paddle.Tensor): class MiddleFlow (line 179) | class MiddleFlow(nn.Layer): method __init__ (line 182) | def __init__(self, block_num: int = 8): method forward (line 204) | def forward(self, inputs: paddle.Tensor): class ExitFlowBottleneckBlock (line 225) | class ExitFlowBottleneckBlock(nn.Layer): method __init__ (line 228) | def __init__(self, input_channels, output_channels1, output_channels2,... method forward (line 243) | def forward(self, inputs: paddle.Tensor): class ExitFlow (line 253) | class ExitFlow(nn.Layer): method __init__ (line 256) | def __init__(self, class_dim): method forward (line 272) | def forward(self, inputs: paddle.Tensor): class Xception65 (line 293) | class Xception65(nn.Layer): method __init__ (line 294) | def __init__(self, class_dim=1000, load_checkpoint: str = None): method forward (line 317) | def forward(self, inputs): FILE: modules/image/classification/xception71_imagenet/module.py class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 61) | def forward(self, inputs: paddle.Tensor): class SeparableConv (line 67) | class SeparableConv(nn.Layer): method __init__ (line 70) | def __init__(self, input_channels: int, output_channels: int, stride: ... method forward (line 77) | def forward(self, inputs: paddle.Tensor): class EntryFlowBottleneckBlock (line 83) | class EntryFlowBottleneckBlock(nn.Layer): method __init__ (line 86) | def __init__(self, method forward (line 107) | def forward(self, inputs: paddle.Tensor): class EntryFlow (line 119) | class EntryFlow(nn.Layer): method __init__ (line 122) | def __init__(self, block_num: int = 3): method forward (line 142) | def forward(self, inputs: paddle.Tensor): class MiddleFlowBottleneckBlock (line 159) | class MiddleFlowBottleneckBlock(nn.Layer): method __init__ (line 162) | def __init__(self, input_channels: int, output_channels: int, name: str): method forward (line 169) | def forward(self, inputs: paddle.Tensor): class MiddleFlow (line 179) | class MiddleFlow(nn.Layer): method __init__ (line 182) | def __init__(self, block_num: int = 8): method forward (line 204) | def forward(self, inputs: paddle.Tensor): class ExitFlowBottleneckBlock (line 225) | class ExitFlowBottleneckBlock(nn.Layer): method __init__ (line 228) | def __init__(self, input_channels: int, output_channels1: int, output_... method forward (line 243) | def forward(self, inputs: paddle.Tensor): class ExitFlow (line 253) | class ExitFlow(nn.Layer): method __init__ (line 254) | def __init__(self, class_dim: int): method forward (line 270) | def forward(self, inputs: paddle.Tensor): class Xception71 (line 291) | class Xception71(nn.Layer): method __init__ (line 292) | def __init__(self, class_dim=1000, load_checkpoint: str = None): method forward (line 315) | def forward(self, inputs): FILE: modules/image/depth_estimation/MiDaS_Large/inference.py class InferenceModel (line 9) | class InferenceModel(): method __init__ (line 11) | def __init__(self, modelpath, use_gpu=False, use_mkldnn=False, combine... method __repr__ (line 27) | def __repr__(self): method __call__ (line 35) | def __call__(self, *input_datas, batch_size=1): method load_config (line 42) | def load_config(self, modelpath, use_gpu, use_mkldnn, combined): method eval (line 84) | def eval(self): method forward (line 106) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/depth_estimation/MiDaS_Large/module.py class MiDaS_Large (line 22) | class MiDaS_Large(Module): method __init__ (line 24) | def __init__(self, name=None, directory=None, use_gpu=False): method load_datas (line 50) | def load_datas(paths, images): method preprocess (line 67) | def preprocess(self, datas): method postprocess (line 89) | def postprocess(datas, results, output_dir='output', visualization=Fal... method depth_estimation (line 110) | def depth_estimation(self, images=None, paths=None, batch_size=1, outp... FILE: modules/image/depth_estimation/MiDaS_Large/transforms.py class Resize (line 7) | class Resize(object): method __init__ (line 11) | def __init__(self, method constrain_to_multiple_of (line 51) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 62) | def get_size(self, width, height): method __call__ (line 109) | def __call__(self, sample): class NormalizeImage (line 140) | class NormalizeImage(object): method __init__ (line 144) | def __init__(self, mean, std): method __call__ (line 148) | def __call__(self, sample): class PrepareForNet (line 154) | class PrepareForNet(object): method __init__ (line 158) | def __init__(self): method __call__ (line 161) | def __call__(self, sample): FILE: modules/image/depth_estimation/MiDaS_Large/utils.py function write_pfm (line 9) | def write_pfm(path, image, scale=1): function read_image (line 46) | def read_image(path): function write_depth (line 62) | def write_depth(path, depth, bits=1): FILE: modules/image/depth_estimation/MiDaS_Small/inference.py class InferenceModel (line 9) | class InferenceModel(): method __init__ (line 11) | def __init__(self, modelpath, use_gpu=False, use_mkldnn=False, combine... method __repr__ (line 27) | def __repr__(self): method __call__ (line 35) | def __call__(self, *input_datas, batch_size=1): method load_config (line 42) | def load_config(self, modelpath, use_gpu, use_mkldnn, combined): method eval (line 84) | def eval(self): method forward (line 106) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/depth_estimation/MiDaS_Small/module.py class MiDaS_Small (line 22) | class MiDaS_Small(Module): method __init__ (line 24) | def __init__(self, name=None, directory=None, use_gpu=False): method load_datas (line 50) | def load_datas(paths, images): method preprocess (line 67) | def preprocess(self, datas): method postprocess (line 89) | def postprocess(datas, results, output_dir='output', visualization=Fal... method depth_estimation (line 110) | def depth_estimation(self, images=None, paths=None, batch_size=1, outp... FILE: modules/image/depth_estimation/MiDaS_Small/transforms.py class Resize (line 7) | class Resize(object): method __init__ (line 11) | def __init__(self, method constrain_to_multiple_of (line 51) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 62) | def get_size(self, width, height): method __call__ (line 109) | def __call__(self, sample): class NormalizeImage (line 140) | class NormalizeImage(object): method __init__ (line 144) | def __init__(self, mean, std): method __call__ (line 148) | def __call__(self, sample): class PrepareForNet (line 154) | class PrepareForNet(object): method __init__ (line 158) | def __init__(self): method __call__ (line 161) | def __call__(self, sample): FILE: modules/image/depth_estimation/MiDaS_Small/utils.py function write_pfm (line 9) | def write_pfm(path, image, scale=1): function read_image (line 46) | def read_image(path): function write_depth (line 62) | def write_depth(path, depth, bits=1): FILE: modules/image/face_detection/pyramidbox_face_detection/data_feed.py function preprocess (line 13) | def preprocess(image): function to_chw_bgr (line 34) | def to_chw_bgr(image): function get_shrink (line 50) | def get_shrink(height, width): function reader (line 90) | def reader(images, paths): FILE: modules/image/face_detection/pyramidbox_face_detection/module.py class PyramidBoxFaceDetection (line 27) | class PyramidBoxFaceDetection: method __init__ (line 28) | def __init__(self): method _set_config (line 32) | def _set_config(self): method face_detection (line 55) | def face_detection(self, method serving_method (line 123) | def serving_method(self, images, **kwargs): method run_cmd (line 132) | def run_cmd(self, argvs): method add_module_config_arg (line 155) | def add_module_config_arg(self): method add_module_input_arg (line 166) | def add_module_input_arg(self): FILE: modules/image/face_detection/pyramidbox_face_detection/processor.py function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function check_dir (line 24) | def check_dir(dir_path): function get_save_image_name (line 39) | def get_save_image_name(img, org_im_path, output_dir): function draw_bboxes (line 58) | def draw_bboxes(image, bboxes, org_im_path, output_dir): function postprocess (line 74) | def postprocess(data_out, org_im, org_im_path, org_im_width, org_im_heig... FILE: modules/image/face_detection/pyramidbox_face_detection/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_face_detection1 (line 31) | def test_face_detection1(self): method test_face_detection2 (line 51) | def test_face_detection2(self): method test_face_detection3 (line 71) | def test_face_detection3(self): method test_face_detection4 (line 91) | def test_face_detection4(self): method test_face_detection5 (line 111) | def test_face_detection5(self): method test_face_detection6 (line 118) | def test_face_detection6(self): method test_save_inference_model (line 125) | def test_save_inference_model(self): FILE: modules/image/face_detection/pyramidbox_lite_mobile/data_feed.py function preprocess (line 11) | def preprocess(org_im, shrink): function reader (line 30) | def reader(images, paths, shrink): FILE: modules/image/face_detection/pyramidbox_lite_mobile/module.py class PyramidBoxLiteMobile (line 27) | class PyramidBoxLiteMobile: method __init__ (line 29) | def __init__(self): method _set_config (line 35) | def _set_config(self): method face_detection (line 58) | def face_detection(self, method serving_method (line 130) | def serving_method(self, images, **kwargs): method run_cmd (line 139) | def run_cmd(self, argvs): method add_module_config_arg (line 161) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): method create_gradio_app (line 193) | def create_gradio_app(self): FILE: modules/image/face_detection/pyramidbox_lite_mobile/processor.py function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function check_dir (line 23) | def check_dir(dir_path): function get_save_image_name (line 38) | def get_save_image_name(org_im, org_im_path, output_dir): function clip_bbox (line 59) | def clip_bbox(bbox, img_height, img_width): function postprocess (line 67) | def postprocess(data_out, org_im, org_im_path, image_height, image_width... FILE: modules/image/face_detection/pyramidbox_lite_mobile/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_face_detection1 (line 31) | def test_face_detection1(self): method test_face_detection2 (line 51) | def test_face_detection2(self): method test_face_detection3 (line 71) | def test_face_detection3(self): method test_face_detection4 (line 91) | def test_face_detection4(self): method test_face_detection5 (line 111) | def test_face_detection5(self): method test_face_detection6 (line 118) | def test_face_detection6(self): method test_save_inference_model (line 125) | def test_save_inference_model(self): FILE: modules/image/face_detection/pyramidbox_lite_mobile_mask/data_feed.py function bbox_vote (line 15) | def bbox_vote(det): function crop (line 56) | def crop(image, pts, shift=0, scale=1.5, rotate=0, res_width=128, res_he... function color_normalize (line 82) | def color_normalize(image, mean, std=None): function process_image (line 92) | def process_image(org_im, face): function reader (line 104) | def reader(face_detector, shrink, confs_threshold, images, paths, use_gp... FILE: modules/image/face_detection/pyramidbox_lite_mobile_mask/module.py class PyramidBoxLiteMobileMask (line 30) | class PyramidBoxLiteMobileMask: method __init__ (line 32) | def __init__(self, face_detector_module=None): method _set_config (line 45) | def _set_config(self): method set_face_detector_module (line 68) | def set_face_detector_module(self, face_detector_module): method get_face_detector_module (line 76) | def get_face_detector_module(self): method face_detection (line 79) | def face_detection(self, method serving_method (line 185) | def serving_method(self, images, **kwargs): method run_cmd (line 194) | def run_cmd(self, argvs): method add_module_config_arg (line 216) | def add_module_config_arg(self): method add_module_input_arg (line 233) | def add_module_input_arg(self): method create_gradio_app (line 248) | def create_gradio_app(self): FILE: modules/image/face_detection/pyramidbox_lite_mobile_mask/processor.py function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function check_dir (line 27) | def check_dir(dir_path): function get_save_image_name (line 42) | def get_save_image_name(org_im, org_im_path, output_dir): function draw_bounding_box_on_image (line 65) | def draw_bounding_box_on_image(save_im_path, output_data): function postprocess (line 97) | def postprocess(confidence_out, org_im, org_im_path, detected_faces, out... FILE: modules/image/face_detection/pyramidbox_lite_mobile_mask/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_face_detection1 (line 32) | def test_face_detection1(self): method test_face_detection2 (line 50) | def test_face_detection2(self): method test_face_detection3 (line 68) | def test_face_detection3(self): method test_face_detection4 (line 86) | def test_face_detection4(self): method test_face_detection5 (line 104) | def test_face_detection5(self): method test_face_detection6 (line 107) | def test_face_detection6(self): method test_save_inference_model (line 110) | def test_save_inference_model(self): FILE: modules/image/face_detection/pyramidbox_lite_server/data_feed.py function preprocess (line 11) | def preprocess(org_im, shrink): function reader (line 30) | def reader(images, paths, shrink): FILE: modules/image/face_detection/pyramidbox_lite_server/module.py class PyramidBoxLiteServer (line 26) | class PyramidBoxLiteServer: method __init__ (line 28) | def __init__(self): method _set_config (line 34) | def _set_config(self): method face_detection (line 57) | def face_detection(self, method serving_method (line 129) | def serving_method(self, images, **kwargs): method run_cmd (line 138) | def run_cmd(self, argvs): method add_module_config_arg (line 160) | def add_module_config_arg(self): method add_module_input_arg (line 177) | def add_module_input_arg(self): method create_gradio_app (line 192) | def create_gradio_app(self): FILE: modules/image/face_detection/pyramidbox_lite_server/processor.py function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function check_dir (line 23) | def check_dir(dir_path): function get_save_image_name (line 38) | def get_save_image_name(org_im, org_im_path, output_dir): function clip_bbox (line 59) | def clip_bbox(bbox, img_height, img_width): function postprocess (line 67) | def postprocess(data_out, org_im, org_im_path, image_height, image_width... FILE: modules/image/face_detection/pyramidbox_lite_server/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_face_detection1 (line 31) | def test_face_detection1(self): method test_face_detection2 (line 51) | def test_face_detection2(self): method test_face_detection3 (line 71) | def test_face_detection3(self): method test_face_detection4 (line 91) | def test_face_detection4(self): method test_face_detection5 (line 111) | def test_face_detection5(self): method test_face_detection6 (line 118) | def test_face_detection6(self): method test_save_inference_model (line 125) | def test_save_inference_model(self): FILE: modules/image/face_detection/pyramidbox_lite_server_mask/data_feed.py function bbox_vote (line 15) | def bbox_vote(det): function crop (line 56) | def crop(image, pts, shift=0, scale=1.5, rotate=0, res_width=128, res_he... function color_normalize (line 82) | def color_normalize(image, mean, std=None): function process_image (line 92) | def process_image(org_im, face): function reader (line 104) | def reader(face_detector, shrink, confs_threshold, images, paths, use_gp... FILE: modules/image/face_detection/pyramidbox_lite_server_mask/module.py class PyramidBoxLiteServerMask (line 31) | class PyramidBoxLiteServerMask: method __init__ (line 33) | def __init__(self, face_detector_module=None): method _set_config (line 46) | def _set_config(self): method set_face_detector_module (line 69) | def set_face_detector_module(self, face_detector_module): method get_face_detector_module (line 77) | def get_face_detector_module(self): method face_detection (line 80) | def face_detection(self, method serving_method (line 185) | def serving_method(self, images, **kwargs): method run_cmd (line 194) | def run_cmd(self, argvs): method add_module_config_arg (line 216) | def add_module_config_arg(self): method add_module_input_arg (line 233) | def add_module_input_arg(self): method create_gradio_app (line 248) | def create_gradio_app(self): FILE: modules/image/face_detection/pyramidbox_lite_server_mask/processor.py function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): function check_dir (line 27) | def check_dir(dir_path): function get_save_image_name (line 42) | def get_save_image_name(org_im, org_im_path, output_dir): function draw_bounding_box_on_image (line 65) | def draw_bounding_box_on_image(save_im_path, output_data): function postprocess (line 97) | def postprocess(confidence_out, org_im, org_im_path, detected_faces, out... FILE: modules/image/face_detection/pyramidbox_lite_server_mask/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_face_detection1 (line 32) | def test_face_detection1(self): method test_face_detection2 (line 50) | def test_face_detection2(self): method test_face_detection3 (line 68) | def test_face_detection3(self): method test_face_detection4 (line 86) | def test_face_detection4(self): method test_face_detection5 (line 104) | def test_face_detection5(self): method test_face_detection6 (line 107) | def test_face_detection6(self): method test_save_inference_model (line 110) | def test_save_inference_model(self): FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_320/data_feed.py function preprocess (line 11) | def preprocess(orig_image): function reader (line 20) | def reader(images=None, paths=None): FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_320/module.py class FaceDetector320 (line 30) | class FaceDetector320: method __init__ (line 31) | def __init__(self): method _set_config (line 36) | def _set_config(self): method face_detection (line 59) | def face_detection(self, method serving_method (line 147) | def serving_method(self, images, **kwargs): method run_cmd (line 156) | def run_cmd(self, argvs): method add_module_config_arg (line 177) | def add_module_config_arg(self): method add_module_input_arg (line 195) | def add_module_input_arg(self): FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_320/processor.py function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function area_of (line 23) | def area_of(left_top, right_bottom): function iou_of (line 28) | def iou_of(boxes0, boxes1, eps=1e-5): function hard_nms (line 37) | def hard_nms(box_scores, iou_threshold, top_k=-1, candidate_size=200): function check_dir (line 60) | def check_dir(dir_path): function get_image_ext (line 68) | def get_image_ext(image): function postprocess (line 74) | def postprocess(confidences, FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_320/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_face_detection1 (line 31) | def test_face_detection1(self): method test_face_detection2 (line 51) | def test_face_detection2(self): method test_face_detection3 (line 71) | def test_face_detection3(self): method test_face_detection4 (line 91) | def test_face_detection4(self): method test_face_detection5 (line 111) | def test_face_detection5(self): method test_face_detection6 (line 118) | def test_face_detection6(self): method test_save_inference_model (line 125) | def test_save_inference_model(self): FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_640/data_feed.py function preprocess (line 11) | def preprocess(orig_image): function reader (line 20) | def reader(images=None, paths=None): FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_640/module.py class FaceDetector640 (line 31) | class FaceDetector640: method __init__ (line 32) | def __init__(self): method _set_config (line 37) | def _set_config(self): method face_detection (line 60) | def face_detection(self, method serving_method (line 147) | def serving_method(self, images, **kwargs): method run_cmd (line 156) | def run_cmd(self, argvs): method add_module_config_arg (line 177) | def add_module_config_arg(self): method add_module_input_arg (line 195) | def add_module_input_arg(self): FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_640/processor.py function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function area_of (line 23) | def area_of(left_top, right_bottom): function iou_of (line 28) | def iou_of(boxes0, boxes1, eps=1e-5): function hard_nms (line 37) | def hard_nms(box_scores, iou_threshold, top_k=-1, candidate_size=200): function check_dir (line 60) | def check_dir(dir_path): function get_image_ext (line 68) | def get_image_ext(image): function postprocess (line 74) | def postprocess(confidences, FILE: modules/image/face_detection/ultra_light_fast_generic_face_detector_1mb_640/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_face_detection1 (line 31) | def test_face_detection1(self): method test_face_detection2 (line 51) | def test_face_detection2(self): method test_face_detection3 (line 71) | def test_face_detection3(self): method test_face_detection4 (line 91) | def test_face_detection4(self): method test_face_detection5 (line 111) | def test_face_detection5(self): method test_face_detection6 (line 118) | def test_face_detection6(self): method test_save_inference_model (line 125) | def test_save_inference_model(self): FILE: modules/image/image_processing/enlightengan/enlighten_inference/pd_model/x2paddle_code.py class ONNXModel (line 5) | class ONNXModel(paddle.nn.Layer): method __init__ (line 6) | def __init__(self): method forward (line 93) | def forward(self, x2paddle_input): FILE: modules/image/image_processing/enlightengan/module.py class EnlightenGAN (line 35) | class EnlightenGAN: method __init__ (line 37) | def __init__(self): method enlightening (line 43) | def enlightening(self, method run_cmd (line 100) | def run_cmd(self, argvs: list): method serving_method (line 122) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 131) | def add_module_config_arg(self): method add_module_input_arg (line 143) | def add_module_input_arg(self): FILE: modules/image/image_processing/enlightengan/util.py function base64_to_cv2 (line 7) | def base64_to_cv2(b64str): FILE: modules/image/image_processing/prnet/api.py class PRN (line 27) | class PRN: method __init__ (line 34) | def __init__(self, is_dlib=False, prefix='.'): method generate_uv_coords (line 59) | def generate_uv_coords(self): method dlib_detect (line 68) | def dlib_detect(self, image): method net_forward (line 71) | def net_forward(self, image): method process (line 80) | def process(self, input, image_info=None): method get_landmarks (line 156) | def get_landmarks(self, pos): method get_vertices (line 166) | def get_vertices(self, pos): method get_colors_from_texture (line 178) | def get_colors_from_texture(self, texture): method get_colors (line 190) | def get_colors(self, image, vertices): FILE: modules/image/image_processing/prnet/module.py class PRNet (line 36) | class PRNet: method __init__ (line 37) | def __init__(self): method face_swap (line 41) | def face_swap(self, method texture_editing (line 90) | def texture_editing(self, source_img, ref_img, mode): method run_cmd (line 171) | def run_cmd(self, argvs: list): method serving_method (line 199) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 211) | def add_module_config_arg(self): method add_module_input_arg (line 223) | def add_module_input_arg(self): FILE: modules/image/image_processing/prnet/pd_model/x2paddle_code.py class TFModel (line 5) | class TFModel(paddle.nn.Layer): method __init__ (line 6) | def __init__(self): method forward (line 862) | def forward(self, Placeholder): function main (line 1532) | def main(Placeholder): FILE: modules/image/image_processing/prnet/predictor.py class PosPrediction (line 20) | class PosPrediction(): method __init__ (line 21) | def __init__(self, params, resolution_inp=256, resolution_op=256): method predict (line 32) | def predict(self, image): method predict_batch (line 40) | def predict_batch(self, images): FILE: modules/image/image_processing/prnet/util.py function base64_to_cv2 (line 20) | def base64_to_cv2(b64str): FILE: modules/image/image_processing/prnet/utils/cv_plot.py function plot_kpt (line 20) | def plot_kpt(image, kpt): function plot_vertices (line 38) | def plot_vertices(image, vertices): function plot_pose_box (line 47) | def plot_pose_box(image, P, kpt, color=(0, 255, 0), line_width=2): FILE: modules/image/image_processing/prnet/utils/estimate_pose.py function isRotationMatrix (line 22) | def isRotationMatrix(R): function matrix2angle (line 32) | def matrix2angle(R): function P2sRt (line 60) | def P2sRt(P): function compute_similarity_transform (line 81) | def compute_similarity_transform(points_static, points_to_transform): function estimate_pose (line 107) | def estimate_pose(vertices): FILE: modules/image/image_processing/prnet/utils/render.py function isPointInTri (line 8) | def isPointInTri(point, tri_points): function get_point_weight (line 45) | def get_point_weight(point, tri_points): function render_texture (line 87) | def render_texture(vertices, colors, triangles, h, w, c=3): function map_texture (line 125) | def map_texture(src_image, function get_depth_buffer (line 200) | def get_depth_buffer(vertices, triangles, h, w): function get_triangle_buffer (line 250) | def get_triangle_buffer(vertices, triangles, h, w): function vis_of_vertices (line 302) | def vis_of_vertices(vertices, triangles, h, w, depth_buffer=None): FILE: modules/image/image_processing/prnet/utils/render_app.py function get_visibility (line 20) | def get_visibility(vertices, triangles, h, w): function get_uv_mask (line 36) | def get_uv_mask(vertices_vis, triangles, uv_coords, h, w, resolution): function get_depth_image (line 52) | def get_depth_image(vertices, triangles, h, w, isShow=False): FILE: modules/image/image_processing/prnet/utils/rotate_vertices.py function frontalize (line 18) | def frontalize(vertices): FILE: modules/image/image_processing/prnet/utils/write.py function write_asc (line 20) | def write_asc(path, vertices): function write_obj_with_colors (line 31) | def write_obj_with_colors(obj_name, vertices, triangles, colors): function write_obj_with_texture (line 63) | def write_obj_with_texture(obj_name, vertices, triangles, texture, uv_co... function write_obj_with_colors_texture (line 116) | def write_obj_with_colors_texture(obj_name, vertices, colors, triangles,... FILE: modules/image/image_processing/seeinthedark/module.py function pack_raw (line 28) | def pack_raw(raw): class LearningToSeeInDark (line 46) | class LearningToSeeInDark: method __init__ (line 47) | def __init__(self): method set_device (line 52) | def set_device(self, use_gpu=False): method denoising (line 79) | def denoising(self, method run_cmd (line 147) | def run_cmd(self, argvs: list): method serving_method (line 170) | def serving_method(self, images, **kwargs): method add_module_config_arg (line 179) | def add_module_config_arg(self): method add_module_input_arg (line 189) | def add_module_input_arg(self): FILE: modules/image/industrial_application/meter_readings/barometer_reader/module.py function base64_to_cv2 (line 33) | def base64_to_cv2(b64str: str): function cv2_to_base64 (line 40) | def cv2_to_base64(image: np.ndarray): class BarometerReader (line 54) | class BarometerReader(nn.Layer): method __init__ (line 55) | def __init__(self): method read_process (line 61) | def read_process(self, label_maps: np.ndarray): method creat_line_image (line 68) | def creat_line_image(self, meter_image: np.ndarray): method convert_1d_data (line 79) | def convert_1d_data(self, meter_image: np.ndarray): method scale_mean_filtration (line 90) | def scale_mean_filtration(self, scale_data: np.ndarray): method get_meter_reader (line 96) | def get_meter_reader(self, scale_data: np.ndarray, pointer_data: np.nd... method predict (line 142) | def predict(self, method serving_method (line 220) | def serving_method(self, image: str, **kwargs): method run_cmd (line 235) | def run_cmd(self, argvs: list): method add_module_input_arg (line 252) | def add_module_input_arg(self): FILE: modules/image/instance_segmentation/solov2/data_feed.py function create_inputs (line 12) | def create_inputs(im, im_info): function visualize_box_mask (line 34) | def visualize_box_mask(im, results, labels=None, mask_resolution=14, thr... function get_color_map_list (line 74) | def get_color_map_list(num_classes): function expand_boxes (line 95) | def expand_boxes(boxes, scale=0.0): function draw_mask (line 118) | def draw_mask(im, np_boxes, np_masks, labels, resolution=14, threshold=0... function draw_box (line 172) | def draw_box(im, np_boxes, labels): function draw_segm (line 209) | def draw_segm(im, np_segms, np_label, np_score, labels, threshold=0.5, a... function load_predictor (line 248) | def load_predictor(model_dir, run_mode='paddle', batch_size=1, use_gpu=F... function cv2_to_base64 (line 292) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 297) | def base64_to_cv2(b64str: str): FILE: modules/image/instance_segmentation/solov2/module.py class Detector (line 28) | class Detector: method __init__ (line 36) | def __init__(self, min_subgraph_size: int = 60, use_gpu=False): method transform (line 49) | def transform(self, im: Union[str, np.ndarray]): method postprocess (line 54) | def postprocess(self, np_boxes: np.ndarray, np_masks: np.ndarray, thre... method predict (line 69) | def predict(self, image: Union[str, np.ndarray], threshold: float = 0.5): class DetectorSOLOv2 (line 108) | class DetectorSOLOv2(Detector): method __init__ (line 115) | def __init__(self, use_gpu: bool = False): method predict (line 118) | def predict(self, method serving_method (line 157) | def serving_method(self, images: list, **kwargs): method create_gradio_app (line 169) | def create_gradio_app(self): FILE: modules/image/instance_segmentation/solov2/processor.py function decode_image (line 19) | def decode_image(im_file, im_info): class Resize (line 44) | class Resize(object): method __init__ (line 55) | def __init__(self, method __call__ (line 68) | def __call__(self, im, im_info): method generate_scale (line 103) | def generate_scale(self, im): class Normalize (line 127) | class Normalize(object): method __init__ (line 136) | def __init__(self, mean, std, is_scale=True, is_channel_first=False): method __call__ (line 142) | def __call__(self, im, im_info): class Permute (line 165) | class Permute(object): method __init__ (line 172) | def __init__(self, to_bgr=False, channel_first=True): method __call__ (line 176) | def __call__(self, im, im_info): class PadStride (line 192) | class PadStride(object): method __init__ (line 198) | def __init__(self, stride=0): method __call__ (line 201) | def __call__(self, im, im_info): function preprocess (line 222) | def preprocess(im, preprocess_ops): FILE: modules/image/instance_segmentation/solov2/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_predict1 (line 33) | def test_predict1(self): method test_predict2 (line 42) | def test_predict2(self): method test_predict3 (line 51) | def test_predict3(self): method test_predict4 (line 60) | def test_predict4(self): method test_predict5 (line 70) | def test_predict5(self): method test_save_inference_model (line 73) | def test_save_inference_model(self): FILE: modules/image/keypoint_detection/face_landmark_localization/data_feed.py function reader (line 11) | def reader(face_detector, images=None, paths=None, use_gpu=False): FILE: modules/image/keypoint_detection/face_landmark_localization/module.py class FaceLandmarkLocalization (line 33) | class FaceLandmarkLocalization: method __init__ (line 34) | def __init__(self, face_detector_module=None): method _set_config (line 46) | def _set_config(self): method set_face_detector_module (line 69) | def set_face_detector_module(self, face_detector_module): method get_face_detector_module (line 78) | def get_face_detector_module(self): method keypoint_detection (line 81) | def keypoint_detection(self, method serving_method (line 148) | def serving_method(self, images, **kwargs): method run_cmd (line 157) | def run_cmd(self, argvs): method add_module_config_arg (line 178) | def add_module_config_arg(self): method add_module_input_arg (line 195) | def add_module_input_arg(self): FILE: modules/image/keypoint_detection/face_landmark_localization/processor.py function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function check_dir (line 23) | def check_dir(dir_path): function get_image_ext (line 31) | def get_image_ext(image): function postprocess (line 37) | def postprocess(res, output_dir, visualization): FILE: modules/image/keypoint_detection/face_landmark_localization/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_keypoint_detection1 (line 31) | def test_keypoint_detection1(self): method test_keypoint_detection2 (line 40) | def test_keypoint_detection2(self): method test_keypoint_detection3 (line 49) | def test_keypoint_detection3(self): method test_keypoint_detection4 (line 58) | def test_keypoint_detection4(self): method test_keypoint_detection5 (line 67) | def test_keypoint_detection5(self): method test_keypoint_detection6 (line 74) | def test_keypoint_detection6(self): method test_save_inference_model (line 81) | def test_save_inference_model(self): FILE: modules/image/keypoint_detection/hand_pose_localization/model.py class InferenceModel (line 9) | class InferenceModel: method __init__ (line 11) | def __init__(self, method __repr__ (line 27) | def __repr__(self): method __call__ (line 39) | def __call__(self, *input_datas, batch_size=1): method load_config (line 46) | def load_config(self, modelpath, use_gpu, gpu_id, use_mkldnn, cpu_thre... method eval (line 105) | def eval(self): method forward (line 133) | def forward(self, *input_datas, batch_size=1): FILE: modules/image/keypoint_detection/hand_pose_localization/module.py class Hand_Pose_Localization (line 19) | class Hand_Pose_Localization: method __init__ (line 21) | def __init__(self, use_gpu=False): method keypoint_detection (line 31) | def keypoint_detection(self, images=None, paths=None, batch_size=1, ou... method serving_method (line 50) | def serving_method(self, images, **kwargs): FILE: modules/image/keypoint_detection/hand_pose_localization/processor.py function check_dir (line 10) | def check_dir(dir_path): function base64_to_cv2 (line 19) | def base64_to_cv2(b64str): class Processor (line 27) | class Processor(): method __init__ (line 29) | def __init__(self, images=None, paths=None, batch_size=1, output_dir='... method load_datas (line 49) | def load_datas(self): method preprocess (line 66) | def preprocess(self): method postprocess (line 88) | def postprocess(self, outputs, visualization): method vis_pose (line 118) | def vis_pose(self, img, points, im_id): FILE: modules/image/keypoint_detection/hand_pose_localization/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_keypoint_detection1 (line 30) | def test_keypoint_detection1(self): method test_keypoint_detection2 (line 38) | def test_keypoint_detection2(self): method test_keypoint_detection3 (line 46) | def test_keypoint_detection3(self): method test_keypoint_detection4 (line 54) | def test_keypoint_detection4(self): method test_keypoint_detection5 (line 63) | def test_keypoint_detection5(self): method test_keypoint_detection6 (line 70) | def test_keypoint_detection6(self): FILE: modules/image/keypoint_detection/human_pose_estimation_resnet50_mpii/data_feed.py function reader (line 12) | def reader(images=None, paths=None): FILE: modules/image/keypoint_detection/human_pose_estimation_resnet50_mpii/module.py class HumanPoseEstimation (line 28) | class HumanPoseEstimation: method __init__ (line 29) | def __init__(self): method _set_config (line 33) | def _set_config(self): method keypoint_detection (line 56) | def keypoint_detection(self, method serving_method (line 117) | def serving_method(self, images, **kwargs): method run_cmd (line 126) | def run_cmd(self, argvs): method add_module_config_arg (line 150) | def add_module_config_arg(self): method add_module_input_arg (line 162) | def add_module_input_arg(self): FILE: modules/image/keypoint_detection/human_pose_estimation_resnet50_mpii/processor.py function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function get_max_preds (line 24) | def get_max_preds(batch_heatmaps): function predict_results (line 52) | def predict_results(batch_heatmaps): function postprocess (line 58) | def postprocess(out_heatmaps, org_im, org_im_shape, org_im_path, output_... function check_dir (line 117) | def check_dir(dir_path): function get_save_image_name (line 131) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/keypoint_detection/human_pose_estimation_resnet50_mpii/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_keypoint_detection1 (line 31) | def test_keypoint_detection1(self): method test_keypoint_detection2 (line 38) | def test_keypoint_detection2(self): method test_keypoint_detection3 (line 45) | def test_keypoint_detection3(self): method test_keypoint_detection4 (line 53) | def test_keypoint_detection4(self): method test_keypoint_detection5 (line 61) | def test_keypoint_detection5(self): method test_keypoint_detection6 (line 68) | def test_keypoint_detection6(self): method test_save_inference_model (line 75) | def test_save_inference_model(self): FILE: modules/image/keypoint_detection/openpose_body_estimation/module.py class BodyPoseModel (line 39) | class BodyPoseModel(nn.Layer): method __init__ (line 47) | def __init__(self, load_checkpoint: str = None): method make_layers (line 130) | def make_layers(self, block: dict, no_relu_layers: list): method transform (line 144) | def transform(self, orgimg: np.ndarray, scale_search: float = 0.5): method forward (line 152) | def forward(self, x: paddle.Tensor): method predict (line 181) | def predict(self, img: Union[str, np.ndarray], save_path: str = "openp... method serving_method (line 214) | def serving_method(self, images: list, **kwargs): method run_cmd (line 228) | def run_cmd(self, argvs: list): method add_module_config_arg (line 247) | def add_module_config_arg(self): method add_module_input_arg (line 257) | def add_module_input_arg(self): FILE: modules/image/keypoint_detection/openpose_body_estimation/processor.py class PadDownRight (line 10) | class PadDownRight: method __init__ (line 19) | def __init__(self, stride: int = 8, padValue: int = 128): method __call__ (line 23) | def __call__(self, img: np.ndarray): class RemovePadding (line 42) | class RemovePadding: method __init__ (line 51) | def __init__(self, stride: int = 8): method __call__ (line 54) | def __call__(self, data: np.ndarray, imageToTest_padded: np.ndarray, o... class GetPeak (line 63) | class GetPeak: method __init__ (line 71) | def __init__(self, thresh=0.1): method __call__ (line 74) | def __call__(self, heatmap: np.ndarray): class Connection (line 104) | class Connection: method __init__ (line 114) | def __init__(self, mapIdx: list = None, limbSeq: list = None): method __call__ (line 128) | def __call__(self, all_peaks: list, paf_avg: np.ndarray, orgimg: np.nd... class CalculateVector (line 156) | class CalculateVector: method __init__ (line 165) | def __init__(self, thresh: float = 0.05): method __call__ (line 168) | def __call__(self, candA: list, candB: list, nA: int, nB: int, score_m... class DrawPose (line 194) | class DrawPose: method __init__ (line 203) | def __init__(self, stickwidth: int = 4): method __call__ (line 214) | def __call__(self, canvas: np.ndarray, candidate: np.ndarray, subset: ... class Candidate (line 241) | class Candidate: method __init__ (line 250) | def __init__(self, mapIdx: list = None, limbSeq: list = None): method __call__ (line 262) | def __call__(self, all_peaks: list, connection_all: list, special_k: l... class ResizeScaling (line 316) | class ResizeScaling: method __init__ (line 324) | def __init__(self, target: int = 368, interpolation: Callable = cv2.IN... method __call__ (line 328) | def __call__(self, img, scale_search): function cv2_to_base64 (line 334) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 339) | def base64_to_cv2(b64str: str): FILE: modules/image/keypoint_detection/openpose_body_estimation/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_predict1 (line 31) | def test_predict1(self): method test_predict2 (line 39) | def test_predict2(self): method test_predict3 (line 47) | def test_predict3(self): method test_predict4 (line 55) | def test_predict4(self): method test_predict5 (line 62) | def test_predict5(self): method test_save_inference_model (line 69) | def test_save_inference_model(self): FILE: modules/image/keypoint_detection/openpose_hands_estimation/module.py class HandPoseModel (line 43) | class HandPoseModel(nn.Layer): method __init__ (line 51) | def __init__(self, load_checkpoint: str = None): method make_layers (line 113) | def make_layers(self, block: dict, no_relu_layers: list): method forward (line 127) | def forward(self, x: paddle.Tensor): method hand_estimation (line 142) | def hand_estimation(self, handimg: np.ndarray, scale_search: list): method predict (line 172) | def predict(self, method serving_method (line 217) | def serving_method(self, images: list, **kwargs): method run_cmd (line 229) | def run_cmd(self, argvs: list): method add_module_config_arg (line 249) | def add_module_config_arg(self): method add_module_input_arg (line 261) | def add_module_input_arg(self): FILE: modules/image/keypoint_detection/openpose_hands_estimation/processor.py class HandDetect (line 15) | class HandDetect: method __init__ (line 23) | def __init__(self, ratioWristElbow: float = 0.33): method __call__ (line 26) | def __call__(self, candidate: np.ndarray, subset: np.ndarray, oriImg: ... class PadDownRight (line 75) | class PadDownRight: method __init__ (line 84) | def __init__(self, stride: int = 8, padValue: int = 128): method __call__ (line 88) | def __call__(self, img: np.ndarray): class RemovePadding (line 107) | class RemovePadding: method __init__ (line 116) | def __init__(self, stride: int = 8): method __call__ (line 119) | def __call__(self, data: np.ndarray, imageToTest_padded: np.ndarray, o... class DrawPose (line 128) | class DrawPose: method __init__ (line 137) | def __init__(self, stickwidth: int = 4): method __call__ (line 148) | def __call__(self, canvas: np.ndarray, candidate: np.ndarray, subset: ... class DrawHandPose (line 175) | class DrawHandPose: method __init__ (line 183) | def __init__(self, show_number: bool = False): method __call__ (line 188) | def __call__(self, canvas: np.ndarray, all_hand_peaks: list): class ResizeScaling (line 218) | class ResizeScaling: method __init__ (line 226) | def __init__(self, target: int = 368, interpolation: Callable = cv2.IN... method __call__ (line 230) | def __call__(self, img, scale_search): function npmax (line 236) | def npmax(array: np.ndarray): function cv2_to_base64 (line 245) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 250) | def base64_to_cv2(b64str: str): FILE: modules/image/keypoint_detection/openpose_hands_estimation/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_predict1 (line 32) | def test_predict1(self): method test_predict2 (line 40) | def test_predict2(self): method test_predict3 (line 48) | def test_predict3(self): method test_predict4 (line 56) | def test_predict4(self): method test_predict5 (line 63) | def test_predict5(self): method test_save_inference_model (line 70) | def test_save_inference_model(self): FILE: modules/image/keypoint_detection/pp-tinypose/det_keypoint_unite_infer.py function predict_with_given_det (line 21) | def predict_with_given_det(image, det_res, keypoint_detector, keypoint_b... FILE: modules/image/keypoint_detection/pp-tinypose/infer.py class Detector (line 64) | class Detector(object): method __init__ (line 86) | def __init__(self, method set_config (line 122) | def set_config(self, model_dir): method preprocess (line 125) | def preprocess(self, image_list): method postprocess (line 146) | def postprocess(self, inputs, result): method filter_box (line 155) | def filter_box(self, result, threshold): method predict (line 174) | def predict(self, repeats=1): method merge_batch_result (line 199) | def merge_batch_result(self, batch_result): method predict_image (line 212) | def predict_image(self, image_list, run_benchmark=False, repeats=1, vi... method predict_video (line 247) | def predict_video(self, video_file, camera_id): method format_coco_results (line 285) | def format_coco_results(image_list, results, save_file=None): function create_inputs (line 342) | def create_inputs(imgs, im_info): class PredictConfig (line 380) | class PredictConfig(): method __init__ (line 386) | def __init__(self, model_dir): method check_model (line 411) | def check_model(self, yml_conf): method print_config (line 421) | def print_config(self): function load_predictor (line 430) | def load_predictor(model_dir, function get_test_images (line 520) | def get_test_images(infer_dir, infer_img): function visualize (line 551) | def visualize(image_list, result, labels, output_dir='output/', threshol... FILE: modules/image/keypoint_detection/pp-tinypose/keypoint_infer.py class KeyPointDetector (line 30) | class KeyPointDetector(Detector): method __init__ (line 47) | def __init__(self, method set_config (line 77) | def set_config(self, model_dir): method get_person_from_rect (line 80) | def get_person_from_rect(self, image, results): method postprocess (line 95) | def postprocess(self, inputs, result): method predict (line 124) | def predict(self, repeats=1): method predict_image (line 149) | def predict_image(self, image_list, run_benchmark=False, repeats=1, vi... method predict_video (line 175) | def predict_video(self, video_file, camera_id): function create_inputs (line 213) | def create_inputs(imgs, im_info): class PredictConfig_KeyPoint (line 230) | class PredictConfig_KeyPoint(): method __init__ (line 236) | def __init__(self, model_dir): method check_model (line 253) | def check_model(self, yml_conf): method print_config (line 263) | def print_config(self): function visualize (line 272) | def visualize(image_list, results, visual_thresh=0.6, save_dir='output'): FILE: modules/image/keypoint_detection/pp-tinypose/keypoint_postprocess.py class HRNetPostProcess (line 22) | class HRNetPostProcess(object): method __init__ (line 24) | def __init__(self, use_dark=True): method flip_back (line 27) | def flip_back(self, output_flipped, matched_parts): method get_max_preds (line 40) | def get_max_preds(self, heatmaps): method gaussian_blur (line 75) | def gaussian_blur(self, heatmap, kernel): method dark_parse (line 91) | def dark_parse(self, hm, coord): method dark_postprocess (line 112) | def dark_postprocess(self, hm, coords, kernelsize): method get_final_preds (line 125) | def get_final_preds(self, heatmaps, center, scale, kernelsize=3): method __call__ (line 163) | def __call__(self, output, center, scale): function transform_preds (line 168) | def transform_preds(coords, center, scale, output_size): function affine_transform (line 176) | def affine_transform(pt, t): function translate_to_ori_images (line 182) | def translate_to_ori_images(keypoint_result, batch_records): FILE: modules/image/keypoint_detection/pp-tinypose/keypoint_preprocess.py class EvalAffine (line 21) | class EvalAffine(object): method __init__ (line 23) | def __init__(self, size, stride=64): method __call__ (line 28) | def __call__(self, image, im_info): function get_affine_mat_kernel (line 36) | def get_affine_mat_kernel(h, w, s, inv=False): function get_affine_transform (line 57) | def get_affine_transform(center, input_size, rot, output_size, shift=(0.... function get_warp_matrix (line 108) | def get_warp_matrix(theta, size_input, size_dst, size_target): function rotate_point (line 140) | def rotate_point(pt, angle_rad): function _get_3rd_point (line 159) | def _get_3rd_point(a, b): class TopDownEvalAffine (line 181) | class TopDownEvalAffine(object): method __init__ (line 194) | def __init__(self, trainsize, use_udp=False): method __call__ (line 198) | def __call__(self, image, im_info): function expand_crop (line 217) | def expand_crop(images, rect, expand_ratio=0.3): FILE: modules/image/keypoint_detection/pp-tinypose/module.py class PP_TinyPose (line 41) | class PP_TinyPose: method __init__ (line 46) | def __init__(self): method predict (line 52) | def predict(self, method serving_method (line 86) | def serving_method(self, images: list, **kwargs): method run_cmd (line 96) | def run_cmd(self, argvs: list): method add_module_config_arg (line 117) | def add_module_config_arg(self): method add_module_input_arg (line 133) | def add_module_input_arg(self): method create_gradio_app (line 139) | def create_gradio_app(self): FILE: modules/image/keypoint_detection/pp-tinypose/preprocess.py function decode_image (line 22) | def decode_image(im_file, im_info): class Resize (line 44) | class Resize(object): method __init__ (line 52) | def __init__(self, target_size, keep_ratio=True, interp=cv2.INTER_LINE... method __call__ (line 59) | def __call__(self, im, im_info): method generate_scale (line 77) | def generate_scale(self, im): class NormalizeImage (line 104) | class NormalizeImage(object): method __init__ (line 113) | def __init__(self, mean, std, is_scale=True): method __call__ (line 118) | def __call__(self, im, im_info): class Permute (line 138) | class Permute(object): method __init__ (line 145) | def __init__(self, ): method __call__ (line 148) | def __call__(self, im, im_info): class PadStride (line 161) | class PadStride(object): method __init__ (line 167) | def __init__(self, stride=0): method __call__ (line 170) | def __call__(self, im, im_info): class LetterBoxResize (line 190) | class LetterBoxResize(object): method __init__ (line 192) | def __init__(self, target_size): method letterbox (line 204) | def letterbox(self, img, height, width, color=(127.5, 127.5, 127.5)): method __call__ (line 220) | def __call__(self, im, im_info): class Pad (line 241) | class Pad(object): method __init__ (line 243) | def __init__(self, size, fill_value=[114.0, 114.0, 114.0]): method __call__ (line 256) | def __call__(self, im, im_info): class WarpAffine (line 270) | class WarpAffine(object): method __init__ (line 274) | def __init__(self, keep_res=False, pad=31, input_h=512, input_w=512, s... method __call__ (line 282) | def __call__(self, im, im_info): function preprocess (line 312) | def preprocess(im, preprocess_ops): function cv2_to_base64 (line 324) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 329) | def base64_to_cv2(b64str: str): FILE: modules/image/keypoint_detection/pp-tinypose/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_predict1 (line 31) | def test_predict1(self): method test_predict2 (line 36) | def test_predict2(self): method test_predict3 (line 41) | def test_predict3(self): method test_predict4 (line 46) | def test_predict4(self): method test_predict5 (line 49) | def test_predict5(self): FILE: modules/image/keypoint_detection/pp-tinypose/visualize.py function visualize_box (line 28) | def visualize_box(im, results, labels, threshold=0.5): function get_color_map_list (line 50) | def get_color_map_list(num_classes): function draw_box (line 71) | def draw_box(im, np_boxes, labels, threshold=0.5): function get_color (line 117) | def get_color(idx): function visualize_pose (line 123) | def visualize_pose(imgfile, FILE: modules/image/matting/dim_vgg16_matting/module.py class DIMVGG16 (line 42) | class DIMVGG16(nn.Layer): method __init__ (line 56) | def __init__(self, method preprocess (line 91) | def preprocess(self, img: Union[str, np.ndarray] , transforms: Callabl... method forward (line 107) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: method predict (line 138) | def predict(self, image_list: list, trimap_list: list, visualization: ... method serving_method (line 161) | def serving_method(self, images: list, trimaps:list, **kwargs) -> dict: method run_cmd (line 180) | def run_cmd(self, argvs: list) -> list: method add_module_config_arg (line 204) | def add_module_config_arg(self): method add_module_input_arg (line 214) | def add_module_input_arg(self): class Up (line 222) | class Up(nn.Layer): method __init__ (line 223) | def __init__(self, input_channels: int, output_channels: int): method forward (line 232) | def forward(self, x: paddle.Tensor, skip: paddle.Tensor, output_shape:... class Decoder (line 242) | class Decoder(nn.Layer): method __init__ (line 243) | def __init__(self, input_channels: int, output_channels: list = [64, 1... method forward (line 256) | def forward(self, fea_list: list, shape_list: list) -> paddle.Tensor: class Refine (line 270) | class Refine(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 282) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/matting/dim_vgg16_matting/processor.py class Compose (line 27) | class Compose: method __init__ (line 33) | def __init__(self, transforms: Callable, to_rgb: bool = True): method __call__ (line 39) | def __call__(self, data: dict) -> dict: class LoadImages (line 57) | class LoadImages: method __init__ (line 64) | def __init__(self, to_rgb: bool = True): method __call__ (line 67) | def __call__(self, data: dict) -> dict: class LimitLong (line 90) | class LimitLong: method __init__ (line 107) | def __init__(self, max_long=None, min_long=None): method __call__ (line 126) | def __call__(self, data): class Normalize (line 144) | class Normalize: method __init__ (line 156) | def __init__(self, mean: Union[List[float], Tuple[float]] = (0.5, 0.5,... method __call__ (line 168) | def __call__(self, data: dict) -> dict: function reverse_transform (line 180) | def reverse_transform(alpha: paddle.Tensor, trans_info: List[str]): function save_alpha_pred (line 193) | def save_alpha_pred(alpha: np.ndarray, trimap: np.ndarray = None): function cv2_to_base64 (line 205) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 213) | def base64_to_cv2(b64str: str): FILE: modules/image/matting/dim_vgg16_matting/vgg.py class ConvBlock (line 27) | class ConvBlock(nn.Layer): method __init__ (line 28) | def __init__(self, input_channels: int, output_channels: int, groups: ... method forward (line 71) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: class VGGNet (line 88) | class VGGNet(nn.Layer): method __init__ (line 89) | def __init__(self, input_channels: int = 4, layers: int = 11, pretrain... method forward (line 117) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: function VGG16 (line 140) | def VGG16(**args): FILE: modules/image/matting/gfm_resnet34_matting/gfm.py function conv3x3 (line 23) | def conv3x3(in_planes: int, out_planes: int, stride: int = 1) -> Callable: function conv_up_psp (line 28) | def conv_up_psp(in_channels: int, out_channels: int, up_sample: float) -... function build_bb (line 33) | def build_bb(in_channels: int, mid_channels: int, out_channels: int) -> ... function build_decoder (line 41) | def build_decoder(in_channels: int, mid_channels_1: int, mid_channels_2:... class BasicBlock (line 63) | class BasicBlock(nn.Layer): method __init__ (line 66) | def __init__(self, inplanes: int, planes: int, stride: int = 1, downsa... method forward (line 76) | def forward(self, x: paddle.Tensor) -> Callable: class PSPModule (line 90) | class PSPModule(nn.Layer): method __init__ (line 92) | def __init__(self, features: paddle.Tensor, out_features: int = 1024, ... method _make_stage (line 99) | def _make_stage(self, features: paddle.Tensor, size: int) -> Callable: method forward (line 104) | def forward(self, feats: paddle.Tensor) -> paddle.Tensor: class SELayer (line 112) | class SELayer(nn.Layer): method __init__ (line 114) | def __init__(self, channel: int, reduction: int = 4): method forward (line 120) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GFM (line 127) | class GFM(nn.Layer): method __init__ (line 142) | def __init__(self): method forward (line 287) | def forward(self, input: paddle.Tensor) -> List[paddle.Tensor]: function collaborative_matting (line 375) | def collaborative_matting(rosta, glance_sigmoid, focus_sigmoid): FILE: modules/image/matting/gfm_resnet34_matting/module.py class GFMResNet34 (line 40) | class GFMResNet34(nn.Layer): method __init__ (line 52) | def __init__(self, pretrained: str = None): method preprocess (line 69) | def preprocess(self, img: Union[str, np.ndarray], h: int, w: int) -> p... method scale_image (line 75) | def scale_image(self, img: np.ndarray, h: int, w: int, ratio: float = ... method inference_img_scale (line 88) | def inference_img_scale(self, input: paddle.Tensor) -> List[paddle.Ten... method predict (line 95) | def predict(self, image_list: list, visualization: bool = True, save_p... method serving_method (line 123) | def serving_method(self, images: str, **kwargs): method run_cmd (line 135) | def run_cmd(self, argvs: list): method add_module_config_arg (line 156) | def add_module_config_arg(self): method add_module_input_arg (line 170) | def add_module_input_arg(self): FILE: modules/image/matting/gfm_resnet34_matting/processor.py class ResizeByLong (line 22) | class ResizeByLong: method __init__ (line 30) | def __init__(self, long_size): method __call__ (line 33) | def __call__(self, data): class ResizeByShort (line 38) | class ResizeByShort: method __init__ (line 46) | def __init__(self, short_size): method __call__ (line 49) | def __call__(self, data): function gen_trimap_from_segmap_e2e (line 55) | def gen_trimap_from_segmap_e2e(segmap): function get_masked_local_from_global_test (line 62) | def get_masked_local_from_global_test(global_result, local_result): function cv2_to_base64 (line 69) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 77) | def base64_to_cv2(b64str: str): FILE: modules/image/matting/gfm_resnet34_matting/resnet.py function conv3x3 (line 20) | def conv3x3(in_planes: int, out_planes: int, stride: int=1, groups: int=1, function conv1x1 (line 27) | def conv1x1(in_planes: int, out_planes: int, stride: int=1) ->paddle.nn.... class BasicBlock (line 33) | class BasicBlock(nn.Layer): method __init__ (line 36) | def __init__(self, inplanes: int, planes: int, stride: int=1, method forward (line 57) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Bottleneck (line 71) | class Bottleneck(nn.Layer): method __init__ (line 74) | def __init__(self, inplanes: int, planes: int, stride: int=1, method forward (line 92) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ResNet (line 109) | class ResNet(nn.Layer): method __init__ (line 111) | def __init__(self, block: Type[Union[BasicBlock, Bottleneck]], layers: method _make_layer (line 145) | def _make_layer(self, block: Type[Union[BasicBlock, Bottleneck]], method _forward_impl (line 167) | def _forward_impl(self, x: paddle.Tensor) ->paddle.Tensor: method forward (line 181) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: function _resnet (line 185) | def _resnet(arch: str, block: Type[Union[BasicBlock, Bottleneck]], layers: function resnet34 (line 191) | def resnet34(pretrained: bool=False, progress: bool=True, **kwargs: Any FILE: modules/image/matting/modnet_hrnet18_matting/hrnet.py class HRNet (line 28) | class HRNet(nn.Layer): method __init__ (line 55) | def __init__(self, method forward (line 163) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Layer1 (line 185) | class Layer1(nn.Layer): method __init__ (line 186) | def __init__(self, method forward (line 210) | def forward(self, x: paddle.Tensor): class TransitionLayer (line 217) | class TransitionLayer(nn.Layer): method __init__ (line 218) | def __init__(self, method forward (line 252) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Branches (line 265) | class Branches(nn.Layer): method __init__ (line 266) | def __init__(self, method forward (line 292) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 302) | class BottleneckBlock(nn.Layer): method __init__ (line 303) | def __init__(self, method forward (line 353) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 370) | class BasicBlock(nn.Layer): method __init__ (line 371) | def __init__(self, method forward (line 415) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SELayer (line 431) | class SELayer(nn.Layer): method __init__ (line 432) | def __init__(self, num_channels: int, num_filters: int, reduction_rati... method forward (line 454) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Stage (line 467) | class Stage(nn.Layer): method __init__ (line 468) | def __init__(self, method forward (line 510) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class HighResolutionModule (line 517) | class HighResolutionModule(nn.Layer): method __init__ (line 518) | def __init__(self, method forward (line 545) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FuseLayers (line 551) | class FuseLayers(nn.Layer): method __init__ (line 552) | def __init__(self, method forward (line 606) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: function HRNet_W18 (line 637) | def HRNet_W18(**kwargs): FILE: modules/image/matting/modnet_hrnet18_matting/module.py class MODNetHRNet18 (line 41) | class MODNetHRNet18(nn.Layer): method __init__ (line 54) | def __init__(self, hr_channels:int = 32, pretrained=None): method preprocess (line 76) | def preprocess(self, img: Union[str, np.ndarray] , transforms: Callabl... method forward (line 92) | def forward(self, inputs: dict) -> paddle.Tensor: method predict (line 98) | def predict(self, image_list: list, trimap_list: list = None, visualiz... method serving_method (line 121) | def serving_method(self, images: list, trimaps:list = None, **kwargs) ... method run_cmd (line 138) | def run_cmd(self, argvs: list): method add_module_config_arg (line 162) | def add_module_config_arg(self): method add_module_input_arg (line 172) | def add_module_input_arg(self): class MODNetHead (line 181) | class MODNetHead(nn.Layer): method __init__ (line 185) | def __init__(self, hr_channels: int, backbone_channels: int): method forward (line 192) | def forward(self, inputs: paddle.Tensor, feat_list: list): class FusionBranch (line 209) | class FusionBranch(nn.Layer): method __init__ (line 210) | def __init__(self, hr_channels: int, enc_channels: int): method forward (line 229) | def forward(self, img: paddle.Tensor, lr8x: paddle.Tensor, hr2x: paddl... class HRBranch (line 245) | class HRBranch(nn.Layer): method __init__ (line 250) | def __init__(self, hr_channels: int, enc_channels:int): method forward (line 295) | def forward(self, img: paddle.Tensor, enc2x: paddle.Tensor, enc4x: pad... class LRBranch (line 325) | class LRBranch(nn.Layer): method __init__ (line 329) | def __init__(self, backbone_channels: int): method forward (line 345) | def forward(self, feat_list: list): class IBNorm (line 364) | class IBNorm(nn.Layer): method __init__ (line 369) | def __init__(self, in_channels: int): method forward (line 377) | def forward(self, x): class Conv2dIBNormRelu (line 384) | class Conv2dIBNormRelu(nn.Layer): method __init__ (line 389) | def __init__(self, method forward (line 423) | def forward(self, x: paddle.Tensor): class SEBlock (line 427) | class SEBlock(nn.Layer): method __init__ (line 432) | def __init__(self, num_channels: int, reduction:int = 1): method forward (line 447) | def forward(self, x: paddle.Tensor): class GaussianBlurLayer (line 453) | class GaussianBlurLayer(nn.Layer): method __init__ (line 459) | def __init__(self, channels: int, kernel_size: int): method forward (line 485) | def forward(self, x: paddle.Tensor): method _init_kernel (line 504) | def _init_kernel(self): FILE: modules/image/matting/modnet_hrnet18_matting/processor.py class Compose (line 27) | class Compose: method __init__ (line 33) | def __init__(self, transforms: Callable, to_rgb: bool = True): method __call__ (line 39) | def __call__(self, data: dict) -> dict: class LoadImages (line 57) | class LoadImages: method __init__ (line 64) | def __init__(self, to_rgb: bool = True): method __call__ (line 67) | def __call__(self, data: dict) -> dict: class ResizeByShort (line 90) | class ResizeByShort: method __init__ (line 98) | def __init__(self, short_size: int =512): method __call__ (line 101) | def __call__(self, data: dict) -> dict: class ResizeToIntMult (line 110) | class ResizeToIntMult: method __init__ (line 115) | def __init__(self, mult_int: int = 32): method __call__ (line 118) | def __call__(self, data: dict) -> dict: class Normalize (line 131) | class Normalize: method __init__ (line 143) | def __init__(self, mean: Union[List[float], Tuple[float]] = (0.5, 0.5,... method __call__ (line 155) | def __call__(self, data: dict) -> dict: function reverse_transform (line 167) | def reverse_transform(alpha: paddle.Tensor, trans_info: List[str]): function save_alpha_pred (line 180) | def save_alpha_pred(alpha: np.ndarray, trimap: Union[np.ndarray, str] =... function cv2_to_base64 (line 193) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 201) | def base64_to_cv2(b64str: str): FILE: modules/image/matting/modnet_mobilenetv2_matting/mobilenetv2.py class ConvBNLayer (line 32) | class ConvBNLayer(nn.Layer): method __init__ (line 34) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor, if_act: bool = True) -> paddl... class InvertedResidualUnit (line 70) | class InvertedResidualUnit(nn.Layer): method __init__ (line 72) | def __init__(self, num_channels: int, num_in_filter: int, num_filters:... method forward (line 104) | def forward(self, inputs: paddle.Tensor, ifshortcut: bool) -> paddle.T... class InvresiBlocks (line 113) | class InvresiBlocks(nn.Layer): method __init__ (line 114) | def __init__(self, in_c: int, t: int, c: int, n: int, s: int, name: str): method forward (line 142) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class MobileNet (line 149) | class MobileNet(nn.Layer): method __init__ (line 151) | def __init__(self, method forward (line 207) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: function MobileNetV2 (line 222) | def MobileNetV2(**kwargs): FILE: modules/image/matting/modnet_mobilenetv2_matting/module.py class MODNetMobilenetV2 (line 41) | class MODNetMobilenetV2(nn.Layer): method __init__ (line 55) | def __init__(self, hr_channels:int = 32, pretrained=None): method preprocess (line 77) | def preprocess(self, img: Union[str, np.ndarray] , transforms: Callabl... method forward (line 93) | def forward(self, inputs: dict): method predict (line 99) | def predict(self, image_list: list, trimap_list: list = None, visualiz... method serving_method (line 122) | def serving_method(self, images: list, trimaps:list = None, **kwargs): method run_cmd (line 139) | def run_cmd(self, argvs: list): method add_module_config_arg (line 163) | def add_module_config_arg(self): method add_module_input_arg (line 173) | def add_module_input_arg(self): class MODNetHead (line 182) | class MODNetHead(nn.Layer): method __init__ (line 186) | def __init__(self, hr_channels: int, backbone_channels: int): method forward (line 193) | def forward(self, inputs: paddle.Tensor, feat_list: list): class FusionBranch (line 210) | class FusionBranch(nn.Layer): method __init__ (line 211) | def __init__(self, hr_channels: int, enc_channels: int): method forward (line 230) | def forward(self, img: paddle.Tensor, lr8x: paddle.Tensor, hr2x: paddl... class HRBranch (line 246) | class HRBranch(nn.Layer): method __init__ (line 251) | def __init__(self, hr_channels: int, enc_channels:int): method forward (line 296) | def forward(self, img: paddle.Tensor, enc2x: paddle.Tensor, enc4x: pad... class LRBranch (line 326) | class LRBranch(nn.Layer): method __init__ (line 330) | def __init__(self, backbone_channels: int): method forward (line 346) | def forward(self, feat_list: list): class IBNorm (line 365) | class IBNorm(nn.Layer): method __init__ (line 370) | def __init__(self, in_channels: int): method forward (line 378) | def forward(self, x): class Conv2dIBNormRelu (line 385) | class Conv2dIBNormRelu(nn.Layer): method __init__ (line 390) | def __init__(self, method forward (line 424) | def forward(self, x: paddle.Tensor): class SEBlock (line 428) | class SEBlock(nn.Layer): method __init__ (line 433) | def __init__(self, num_channels: int, reduction:int = 1): method forward (line 448) | def forward(self, x: paddle.Tensor): class GaussianBlurLayer (line 454) | class GaussianBlurLayer(nn.Layer): method __init__ (line 460) | def __init__(self, channels: int, kernel_size: int): method forward (line 486) | def forward(self, x: paddle.Tensor): method _init_kernel (line 505) | def _init_kernel(self): FILE: modules/image/matting/modnet_mobilenetv2_matting/processor.py class Compose (line 27) | class Compose: method __init__ (line 33) | def __init__(self, transforms: Callable, to_rgb: bool = True): method __call__ (line 39) | def __call__(self, data: dict) -> dict: class LoadImages (line 57) | class LoadImages: method __init__ (line 64) | def __init__(self, to_rgb: bool = True): method __call__ (line 67) | def __call__(self, data: dict) -> dict: class ResizeByShort (line 90) | class ResizeByShort: method __init__ (line 98) | def __init__(self, short_size: int =512): method __call__ (line 101) | def __call__(self, data: dict) -> dict: class ResizeToIntMult (line 110) | class ResizeToIntMult: method __init__ (line 115) | def __init__(self, mult_int: int = 32): method __call__ (line 118) | def __call__(self, data: dict) -> dict: class Normalize (line 131) | class Normalize: method __init__ (line 143) | def __init__(self, mean: Union[List[float], Tuple[float]] = (0.5, 0.5,... method __call__ (line 155) | def __call__(self, data: dict) -> dict: function reverse_transform (line 167) | def reverse_transform(alpha: paddle.Tensor, trans_info: List[str]): function save_alpha_pred (line 180) | def save_alpha_pred(alpha: np.ndarray, trimap: np.ndarray = None): function cv2_to_base64 (line 192) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 200) | def base64_to_cv2(b64str: str): FILE: modules/image/matting/modnet_resnet50vd_matting/module.py class MODNetResNet50Vd (line 40) | class MODNetResNet50Vd(nn.Layer): method __init__ (line 53) | def __init__(self, hr_channels: int = 32, pretrained=None): method preprocess (line 74) | def preprocess(self, img: Union[str, np.ndarray], transforms: Callable... method forward (line 90) | def forward(self, inputs: dict): method predict (line 96) | def predict(self, method serving_method (line 123) | def serving_method(self, images: list, trimaps: list = None, **kwargs): method run_cmd (line 140) | def run_cmd(self, argvs: list): method add_module_config_arg (line 166) | def add_module_config_arg(self): method add_module_input_arg (line 180) | def add_module_input_arg(self): class MODNetHead (line 188) | class MODNetHead(nn.Layer): method __init__ (line 193) | def __init__(self, hr_channels: int, backbone_channels: int): method forward (line 200) | def forward(self, inputs: paddle.Tensor, feat_list: list) -> paddle.Te... class FusionBranch (line 207) | class FusionBranch(nn.Layer): method __init__ (line 209) | def __init__(self, hr_channels: int, enc_channels: int): method forward (line 218) | def forward(self, img: paddle.Tensor, lr8x: paddle.Tensor, hr2x: paddl... class HRBranch (line 231) | class HRBranch(nn.Layer): method __init__ (line 236) | def __init__(self, hr_channels: int, enc_channels: int): method forward (line 259) | def forward(self, img: paddle.Tensor, enc2x: paddle.Tensor, enc4x: pad... class LRBranch (line 279) | class LRBranch(nn.Layer): method __init__ (line 284) | def __init__(self, backbone_channels: int): method forward (line 297) | def forward(self, feat_list: list) -> List[paddle.Tensor]: class IBNorm (line 314) | class IBNorm(nn.Layer): method __init__ (line 319) | def __init__(self, in_channels: int): method forward (line 327) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Conv2dIBNormRelu (line 334) | class Conv2dIBNormRelu(nn.Layer): method __init__ (line 339) | def __init__(self, method forward (line 372) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SEBlock (line 376) | class SEBlock(nn.Layer): method __init__ (line 381) | def __init__(self, num_channels: int, reduction: int = 1): method forward (line 389) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GaussianBlurLayer (line 395) | class GaussianBlurLayer(nn.Layer): method __init__ (line 401) | def __init__(self, channels: int, kernel_size: int): method forward (line 420) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: method _init_kernel (line 438) | def _init_kernel(self): FILE: modules/image/matting/modnet_resnet50vd_matting/processor.py class Compose (line 27) | class Compose: method __init__ (line 33) | def __init__(self, transforms: Callable, to_rgb: bool = True): method __call__ (line 39) | def __call__(self, data: dict) -> dict: class LoadImages (line 57) | class LoadImages: method __init__ (line 65) | def __init__(self, to_rgb: bool = True): method __call__ (line 68) | def __call__(self, data: dict) -> dict: class ResizeByShort (line 91) | class ResizeByShort: method __init__ (line 99) | def __init__(self, short_size: int = 512): method __call__ (line 102) | def __call__(self, data: dict) -> dict: class ResizeToIntMult (line 111) | class ResizeToIntMult: method __init__ (line 116) | def __init__(self, mult_int: int = 32): method __call__ (line 119) | def __call__(self, data: dict) -> dict: class Normalize (line 132) | class Normalize: method __init__ (line 144) | def __init__(self, method __call__ (line 155) | def __call__(self, data: dict) -> dict: function reverse_transform (line 167) | def reverse_transform(alpha: paddle.Tensor, trans_info: List[str]): function save_alpha_pred (line 181) | def save_alpha_pred(alpha: np.ndarray, trimap: np.ndarray = None): function cv2_to_base64 (line 193) | def cv2_to_base64(image: np.ndarray): function base64_to_cv2 (line 201) | def base64_to_cv2(b64str: str): FILE: modules/image/matting/modnet_resnet50vd_matting/resnet.py class ConvBNLayer (line 22) | class ConvBNLayer(nn.Layer): method __init__ (line 25) | def __init__( method forward (line 52) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 62) | class BottleneckBlock(nn.Layer): method __init__ (line 65) | def __init__(self, method forward (line 95) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 119) | class BasicBlock(nn.Layer): method __init__ (line 122) | def __init__(self, in_channels: int, out_channels: int, stride: int, s... method forward (line 141) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 155) | class ResNet_vd(nn.Layer): method __init__ (line 165) | def __init__(self, method forward (line 264) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: function ResNet50_vd (line 282) | def ResNet50_vd(**args): FILE: modules/image/object_detection/faster_rcnn_resnet50_coco2017/data_feed.py function test_reader (line 14) | def test_reader(paths=None, images=None): function padding_minibatch (line 80) | def padding_minibatch(batch_data, coarsest_stride=0, use_padded_im_info=... FILE: modules/image/object_detection/faster_rcnn_resnet50_coco2017/module.py class FasterRCNNResNet50 (line 29) | class FasterRCNNResNet50: method __init__ (line 30) | def __init__(self): method _set_config (line 38) | def _set_config(self): method object_detection (line 61) | def object_detection(self, method add_module_config_arg (line 149) | def add_module_config_arg(self): method add_module_input_arg (line 165) | def add_module_input_arg(self): method check_input_data (line 178) | def check_input_data(self, args): method serving_method (line 190) | def serving_method(self, images, **kwargs): method run_cmd (line 199) | def run_cmd(self, argvs): FILE: modules/image/object_detection/faster_rcnn_resnet50_coco2017/processor.py function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function check_dir (line 22) | def check_dir(dir_path): function get_save_image_name (line 29) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 53) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 84) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 92) | def load_label_info(file_path): function postprocess (line 101) | def postprocess(paths, FILE: modules/image/object_detection/faster_rcnn_resnet50_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/data_feed.py function test_reader (line 14) | def test_reader(paths=None, images=None): function padding_minibatch (line 81) | def padding_minibatch(batch_data, coarsest_stride=0, use_padded_im_info=... FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/module.py class FasterRCNNResNet50RPN (line 30) | class FasterRCNNResNet50RPN: method __init__ (line 31) | def __init__(self): method _set_config (line 39) | def _set_config(self): method object_detection (line 62) | def object_detection(self, method add_module_config_arg (line 156) | def add_module_config_arg(self): method add_module_input_arg (line 172) | def add_module_input_arg(self): method check_input_data (line 185) | def check_input_data(self, args): method serving_method (line 197) | def serving_method(self, images, **kwargs): method run_cmd (line 206) | def run_cmd(self, argvs): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/processor.py function base64_to_cv2 (line 15) | def base64_to_cv2(b64str): function check_dir (line 21) | def check_dir(dir_path): function get_save_image_name (line 28) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 52) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 83) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 91) | def load_label_info(file_path): function postprocess (line 100) | def postprocess(paths, FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/bbox_assigner.py class BBoxAssigner (line 1) | class BBoxAssigner(object): method __init__ (line 3) | def __init__(self, FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/bbox_head.py class MultiClassNMS (line 15) | class MultiClassNMS(object): method __init__ (line 17) | def __init__(self, class SmoothL1Loss (line 35) | class SmoothL1Loss(object): method __init__ (line 42) | def __init__(self, sigma=1.0): method __call__ (line 46) | def __call__(self, x, y, inside_weight=None, outside_weight=None): class BoxCoder (line 51) | class BoxCoder(object): method __init__ (line 52) | def __init__(self, prior_box_var=[0.1, 0.1, 0.2, 0.2], code_type='deco... class TwoFCHead (line 61) | class TwoFCHead(object): method __init__ (line 69) | def __init__(self, mlp_dim=1024): method __call__ (line 73) | def __call__(self, roi_feat): class BBoxHead (line 94) | class BBoxHead(object): method __init__ (line 107) | def __init__(self, head, box_coder=BoxCoder(), nms=MultiClassNMS(), bb... method get_head_feat (line 116) | def get_head_feat(self, input=None): method _get_output (line 128) | def _get_output(self, roi_feat): method get_loss (line 161) | def get_loss(self, roi_feat, labels_int32, bbox_targets, bbox_inside_w... method get_prediction (line 194) | def get_prediction(self, roi_feat, rois, im_info, im_shape, return_box... FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/data_feed.py function test_reader (line 17) | def test_reader(paths=None, images=None): function padding_minibatch (line 77) | def padding_minibatch(batch_data, coarsest_stride=0, use_padded_im_info=... FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/fpn.py function ConvNorm (line 30) | def ConvNorm(input, class FPN (line 93) | class FPN(object): method __init__ (line 107) | def __init__(self, method _add_topdown_lateral (line 123) | def _add_topdown_lateral(self, body_name, body_input, upper_output): method get_output (line 149) | def get_output(self, body_dict): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/module.py class FasterRCNNResNet50RPN (line 39) | class FasterRCNNResNet50RPN(hub.Module): method _initialize (line 40) | def _initialize(self): method context (line 44) | def context(self, num_classes=708, trainable=True, pretrained=True, ph... method rpn_head (line 162) | def rpn_head(self): method roi_extractor (line 182) | def roi_extractor(self): method bbox_head (line 186) | def bbox_head(self, num_classes): method bbox_assigner (line 192) | def bbox_assigner(self, num_classes): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/name_adapter.py class NameAdapter (line 4) | class NameAdapter(object): method __init__ (line 7) | def __init__(self, model): method model_type (line 12) | def model_type(self): method variant (line 16) | def variant(self): method fix_conv_norm_name (line 19) | def fix_conv_norm_name(self, name): method fix_shortcut_name (line 29) | def fix_shortcut_name(self, name): method fix_bottleneck_name (line 34) | def fix_bottleneck_name(self, name): method fix_layer_warp_name (line 47) | def fix_layer_warp_name(self, stage_num, count, i): method fix_c1_stage_name (line 60) | def fix_c1_stage_name(self): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/nonlocal_helper.py function space_nonlocal (line 25) | def space_nonlocal(input, dim_in, dim_out, prefix, dim_inner, max_pool_s... function add_space_nonlocal (line 144) | def add_space_nonlocal(input, dim_in, dim_out, prefix, dim_inner): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/processor.py function base64_to_cv2 (line 16) | def base64_to_cv2(b64str): function get_save_image_name (line 23) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 47) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 72) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 80) | def load_label_info(file_path): function postprocess (line 89) | def postprocess(paths, images, data_out, score_thresh, label_names, outp... FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/resnet.py class ResNet (line 22) | class ResNet(object): method __init__ (line 38) | def __init__(self, method _conv_offset (line 93) | def _conv_offset(self, input, filter_size, stride, padding, act=None, ... method _conv_norm (line 107) | def _conv_norm(self, input, num_filters, filter_size, stride=1, groups... method _shortcut (line 181) | def _shortcut(self, input, ch_out, stride, is_first, name): method bottleneck (line 201) | def bottleneck(self, input, num_filters, stride, is_first, name, dcn_v... method basicblock (line 247) | def basicblock(self, input, num_filters, stride, is_first, name, dcn_v... method layer_warp (line 255) | def layer_warp(self, input, stage_num): method c1_stage (line 299) | def c1_stage(self, input): method __call__ (line 319) | def __call__(self, input): class ResNetC5 (line 353) | class ResNetC5(ResNet): method __init__ (line 354) | def __init__(self, FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/roi_extractor.py class FPNRoIAlign (line 7) | class FPNRoIAlign(object): method __init__ (line 20) | def __init__(self, method __call__ (line 37) | def __call__(self, head_inputs, rois, spatial_scale, is_mask=False): FILE: modules/image/object_detection/faster_rcnn_resnet50_fpn_venus/rpn_head.py class AnchorGenerator (line 14) | class AnchorGenerator(object): method __init__ (line 16) | def __init__(self, class RPNTargetAssign (line 28) | class RPNTargetAssign(object): method __init__ (line 30) | def __init__(self, class GenerateProposals (line 46) | class GenerateProposals(object): method __init__ (line 48) | def __init__(self, pre_nms_top_n=6000, post_nms_top_n=1000, nms_thresh... class RPNHead (line 57) | class RPNHead(object): method __init__ (line 70) | def __init__(self, anchor_generator, rpn_target_assign, train_proposal... method _get_output (line 78) | def _get_output(self, input): method get_proposals (line 133) | def get_proposals(self, body_feats, im_info, mode='train'): method _transform_input (line 177) | def _transform_input(self, rpn_cls_score, rpn_bbox_pred, anchor, ancho... method _get_loss_input (line 186) | def _get_loss_input(self): method get_loss (line 192) | def get_loss(self, im_info, gt_box, is_crowd, gt_label=None): class FPNRPNHead (line 263) | class FPNRPNHead(RPNHead): method __init__ (line 279) | def __init__(self, method _get_output (line 300) | def _get_output(self, input, feat_lvl): method _get_single_proposals (line 361) | def _get_single_proposals(self, body_feat, im_info, feat_lvl, mode='tr... method get_proposals (line 406) | def get_proposals(self, fpn_feats, im_info, mode='train'): method _get_loss_input (line 438) | def _get_loss_input(self): FILE: modules/image/object_detection/ssd_mobilenet_v1_pascal/data_feed.py class DecodeImage (line 16) | class DecodeImage(object): method __init__ (line 17) | def __init__(self, to_rgb=True, with_mixup=False): method __call__ (line 27) | def __call__(self, im): class ResizeImage (line 34) | class ResizeImage(object): method __init__ (line 35) | def __init__(self, method __call__ (line 59) | def __call__(self, im): class NormalizeImage (line 113) | class NormalizeImage(object): method __init__ (line 114) | def __init__(self, method __call__ (line 129) | def __call__(self, im): class Permute (line 150) | class Permute(object): method __init__ (line 151) | def __init__(self, to_bgr=True, channel_first=True): method __call__ (line 162) | def __call__(self, im): function reader (line 171) | def reader(paths=[], FILE: modules/image/object_detection/ssd_mobilenet_v1_pascal/module.py class SSDMobileNetv1 (line 32) | class SSDMobileNetv1: method __init__ (line 33) | def __init__(self): method _set_config (line 39) | def _set_config(self): method object_detection (line 70) | def object_detection(self, method serving_method (line 141) | def serving_method(self, images, **kwargs): method run_cmd (line 150) | def run_cmd(self, argvs): method add_module_config_arg (line 172) | def add_module_config_arg(self): method add_module_input_arg (line 189) | def add_module_input_arg(self): FILE: modules/image/object_detection/ssd_mobilenet_v1_pascal/processor.py function base64_to_cv2 (line 13) | def base64_to_cv2(b64str): function check_dir (line 20) | def check_dir(dir_path): function get_save_image_name (line 28) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 52) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 78) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 86) | def load_label_info(file_path): function postprocess (line 95) | def postprocess(paths, images, data_out, score_thresh, label_names, outp... FILE: modules/image/object_detection/ssd_mobilenet_v1_pascal/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/ssd_vgg16_300_coco2017/data_feed.py class DecodeImage (line 16) | class DecodeImage(object): method __init__ (line 17) | def __init__(self, to_rgb=True, with_mixup=False): method __call__ (line 27) | def __call__(self, im): class ResizeImage (line 34) | class ResizeImage(object): method __init__ (line 35) | def __init__(self, target_size=0, max_size=0, interp=cv2.INTER_LINEAR,... method __call__ (line 55) | def __call__(self, im): class NormalizeImage (line 102) | class NormalizeImage(object): method __init__ (line 103) | def __init__(self, mean=[0.485, 0.456, 0.406], std=[1, 1, 1], is_scale... method __call__ (line 114) | def __call__(self, im): class Permute (line 135) | class Permute(object): method __init__ (line 136) | def __init__(self, to_bgr=True, channel_first=True): method __call__ (line 147) | def __call__(self, im): function reader (line 156) | def reader(paths=[], FILE: modules/image/object_detection/ssd_vgg16_300_coco2017/module.py class SSDVGG16 (line 27) | class SSDVGG16: method __init__ (line 28) | def __init__(self): method _set_config (line 36) | def _set_config(self): method object_detection (line 68) | def object_detection(self, method serving_method (line 126) | def serving_method(self, images, **kwargs): method run_cmd (line 135) | def run_cmd(self, argvs): method add_module_config_arg (line 162) | def add_module_config_arg(self): method add_module_input_arg (line 182) | def add_module_input_arg(self): FILE: modules/image/object_detection/ssd_vgg16_300_coco2017/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function get_save_image_name (line 19) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 43) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 69) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 77) | def load_label_info(file_path): function postprocess (line 86) | def postprocess(paths, images, data_out, score_thresh, label_names, outp... FILE: modules/image/object_detection/ssd_vgg16_300_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/ssd_vgg16_512_coco2017/data_feed.py class DecodeImage (line 16) | class DecodeImage(object): method __init__ (line 17) | def __init__(self, to_rgb=True, with_mixup=False): method __call__ (line 27) | def __call__(self, im): class ResizeImage (line 34) | class ResizeImage(object): method __init__ (line 35) | def __init__(self, method __call__ (line 59) | def __call__(self, im): class NormalizeImage (line 113) | class NormalizeImage(object): method __init__ (line 114) | def __init__(self, method __call__ (line 129) | def __call__(self, im): class Permute (line 150) | class Permute(object): method __init__ (line 151) | def __init__(self, to_bgr=True, channel_first=True): method __call__ (line 162) | def __call__(self, im): function reader (line 171) | def reader(paths=[], FILE: modules/image/object_detection/ssd_vgg16_512_coco2017/module.py class SSDVGG16_512 (line 27) | class SSDVGG16_512: method __init__ (line 28) | def __init__(self): method _set_config (line 36) | def _set_config(self): method object_detection (line 68) | def object_detection(self, method serving_method (line 135) | def serving_method(self, images, **kwargs): method run_cmd (line 144) | def run_cmd(self, argvs): method add_module_config_arg (line 171) | def add_module_config_arg(self): method add_module_input_arg (line 191) | def add_module_input_arg(self): FILE: modules/image/object_detection/ssd_vgg16_512_coco2017/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function check_dir (line 18) | def check_dir(dir_path): function get_save_image_name (line 25) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 49) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 81) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 89) | def load_label_info(file_path): function postprocess (line 98) | def postprocess(paths, FILE: modules/image/object_detection/ssd_vgg16_512_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/yolov3_darknet53_coco2017/data_feed.py function reader (line 14) | def reader(paths=[], images=None): FILE: modules/image/object_detection/yolov3_darknet53_coco2017/module.py class YOLOv3DarkNet53Coco2017 (line 27) | class YOLOv3DarkNet53Coco2017: method __init__ (line 28) | def __init__(self): method _set_config (line 33) | def _set_config(self): method object_detection (line 57) | def object_detection(self, method serving_method (line 126) | def serving_method(self, images, **kwargs): method run_cmd (line 135) | def run_cmd(self, argvs): method add_module_config_arg (line 159) | def add_module_config_arg(self): method add_module_input_arg (line 170) | def add_module_input_arg(self): FILE: modules/image/object_detection/yolov3_darknet53_coco2017/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function check_dir (line 19) | def check_dir(dir_path): function get_save_image_name (line 27) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 49) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 72) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 80) | def load_label_info(file_path): function postprocess (line 89) | def postprocess(paths, images, data_out, score_thresh, label_names, outp... FILE: modules/image/object_detection/yolov3_darknet53_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/yolov3_darknet53_pedestrian/data_feed.py function reader (line 14) | def reader(paths=[], images=None): FILE: modules/image/object_detection/yolov3_darknet53_pedestrian/module.py class YOLOv3DarkNet53Pedestrian (line 31) | class YOLOv3DarkNet53Pedestrian: method __init__ (line 32) | def __init__(self): method _set_config (line 37) | def _set_config(self): method object_detection (line 61) | def object_detection(self, method serving_method (line 130) | def serving_method(self, images, **kwargs): method run_cmd (line 139) | def run_cmd(self, argvs): method add_module_config_arg (line 161) | def add_module_config_arg(self): method add_module_input_arg (line 178) | def add_module_input_arg(self): FILE: modules/image/object_detection/yolov3_darknet53_pedestrian/processor.py function base64_to_cv2 (line 13) | def base64_to_cv2(b64str): function check_dir (line 20) | def check_dir(dir_path): function get_save_image_name (line 28) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 50) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 73) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 81) | def load_label_info(file_path): function postprocess (line 90) | def postprocess(paths, images, data_out, score_thresh, label_names, outp... FILE: modules/image/object_detection/yolov3_darknet53_pedestrian/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/yolov3_darknet53_vehicles/data_feed.py function reader (line 14) | def reader(paths=[], images=None): FILE: modules/image/object_detection/yolov3_darknet53_vehicles/module.py class YOLOv3DarkNet53Vehicles (line 31) | class YOLOv3DarkNet53Vehicles: method __init__ (line 32) | def __init__(self): method _get_device_id (line 37) | def _get_device_id(self, places): method _set_config (line 45) | def _set_config(self): method object_detection (line 87) | def object_detection(self, method serving_method (line 174) | def serving_method(self, images, **kwargs): method run_cmd (line 183) | def run_cmd(self, argvs): method add_module_config_arg (line 206) | def add_module_config_arg(self): method add_module_input_arg (line 226) | def add_module_input_arg(self): FILE: modules/image/object_detection/yolov3_darknet53_vehicles/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function check_dir (line 19) | def check_dir(dir_path): function get_save_image_name (line 27) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 49) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 72) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 80) | def load_label_info(file_path): function postprocess (line 89) | def postprocess(paths, images, data_out, score_thresh, label_names, outp... FILE: modules/image/object_detection/yolov3_darknet53_vehicles/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/yolov3_darknet53_venus/darknet.py class DarkNet (line 16) | class DarkNet(object): method __init__ (line 27) | def __init__(self, method _conv_norm (line 43) | def _conv_norm(self, input, ch_out, filter_size, stride, padding, act=... method _downsample (line 73) | def _downsample(self, input, ch_out, filter_size=3, stride=2, padding=... method basicblock (line 76) | def basicblock(self, input, ch_out, name=None): method layer_warp (line 82) | def layer_warp(self, block_func, input, ch_out, count, name=None): method __call__ (line 88) | def __call__(self, input): FILE: modules/image/object_detection/yolov3_darknet53_venus/data_feed.py function reader (line 14) | def reader(paths=[], images=None): FILE: modules/image/object_detection/yolov3_darknet53_venus/module.py class YOLOv3DarkNet53Venus (line 29) | class YOLOv3DarkNet53Venus(hub.Module): method _initialize (line 30) | def _initialize(self): method context (line 33) | def context(self, trainable=True, pretrained=True, get_prediction=False): FILE: modules/image/object_detection/yolov3_darknet53_venus/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function check_dir (line 19) | def check_dir(dir_path): function get_save_image_name (line 27) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 49) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 72) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 80) | def load_label_info(file_path): function postprocess (line 89) | def postprocess(paths, images, data_out, score_thresh, label_names, outp... FILE: modules/image/object_detection/yolov3_darknet53_venus/yolo_head.py class MultiClassNMS (line 14) | class MultiClassNMS(object): method __init__ (line 16) | def __init__(self, background_label, keep_top_k, nms_threshold, nms_to... class YOLOv3Head (line 26) | class YOLOv3Head(object): method __init__ (line 39) | def __init__(self, method _conv_bn (line 64) | def _conv_bn(self, input, ch_out, filter_size, stride, padding, act='l... method _detection_block (line 91) | def _detection_block(self, input, channel, is_test=True, name=None): method _upsample (line 108) | def _upsample(self, input, scale=2, name=None): method _parse_anchors (line 112) | def _parse_anchors(self, anchors): method _get_outputs (line 134) | def _get_outputs(self, input, is_train=True): method get_prediction (line 190) | def get_prediction(self, outputs, im_size): FILE: modules/image/object_detection/yolov3_mobilenet_v1_coco2017/data_feed.py function reader (line 14) | def reader(paths=[], images=None): FILE: modules/image/object_detection/yolov3_mobilenet_v1_coco2017/module.py class YOLOv3MobileNetV1Coco2017 (line 28) | class YOLOv3MobileNetV1Coco2017: method __init__ (line 29) | def __init__(self): method _set_config (line 36) | def _set_config(self): method object_detection (line 60) | def object_detection(self, method serving_method (line 129) | def serving_method(self, images, **kwargs): method run_cmd (line 138) | def run_cmd(self, argvs): method add_module_config_arg (line 165) | def add_module_config_arg(self): method add_module_input_arg (line 185) | def add_module_input_arg(self): FILE: modules/image/object_detection/yolov3_mobilenet_v1_coco2017/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function check_dir (line 19) | def check_dir(dir_path): function get_save_image_name (line 27) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 49) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 78) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 86) | def load_label_info(file_path): function postprocess (line 95) | def postprocess(paths, FILE: modules/image/object_detection/yolov3_mobilenet_v1_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/yolov3_resnet34_coco2017/data_feed.py function reader (line 14) | def reader(paths=[], images=None): FILE: modules/image/object_detection/yolov3_resnet34_coco2017/module.py class YOLOv3ResNet34Coco2017 (line 29) | class YOLOv3ResNet34Coco2017: method __init__ (line 30) | def __init__(self): method _set_config (line 37) | def _set_config(self): method object_detection (line 61) | def object_detection(self, method serving_method (line 130) | def serving_method(self, images, **kwargs): method run_cmd (line 139) | def run_cmd(self, argvs): method add_module_config_arg (line 166) | def add_module_config_arg(self): method add_module_input_arg (line 186) | def add_module_input_arg(self): FILE: modules/image/object_detection/yolov3_resnet34_coco2017/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function check_dir (line 19) | def check_dir(dir_path): function get_save_image_name (line 27) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 49) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 78) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 86) | def load_label_info(file_path): function postprocess (line 95) | def postprocess(paths, FILE: modules/image/object_detection/yolov3_resnet34_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/object_detection/yolov3_resnet50_vd_coco2017/data_feed.py function reader (line 14) | def reader(paths=[], images=None): FILE: modules/image/object_detection/yolov3_resnet50_vd_coco2017/module.py class YOLOv3ResNet50Coco2017 (line 27) | class YOLOv3ResNet50Coco2017: method __init__ (line 28) | def __init__(self): method _set_config (line 35) | def _set_config(self): method object_detection (line 59) | def object_detection(self, method serving_method (line 128) | def serving_method(self, images, **kwargs): method run_cmd (line 137) | def run_cmd(self, argvs): method add_module_config_arg (line 164) | def add_module_config_arg(self): method add_module_input_arg (line 184) | def add_module_input_arg(self): FILE: modules/image/object_detection/yolov3_resnet50_vd_coco2017/processor.py function base64_to_cv2 (line 12) | def base64_to_cv2(b64str): function check_dir (line 19) | def check_dir(dir_path): function get_save_image_name (line 27) | def get_save_image_name(img, output_dir, image_path): function draw_bounding_box_on_image (line 49) | def draw_bounding_box_on_image(image_path, data_list, save_dir): function clip_bbox (line 78) | def clip_bbox(bbox, img_width, img_height): function load_label_info (line 86) | def load_label_info(file_path): function postprocess (line 95) | def postprocess(paths, FILE: modules/image/object_detection/yolov3_resnet50_vd_coco2017/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 12) | def setUpClass(cls) -> None: method tearDownClass (line 23) | def tearDownClass(cls) -> None: method test_object_detection1 (line 28) | def test_object_detection1(self): method test_object_detection2 (line 47) | def test_object_detection2(self): method test_object_detection3 (line 66) | def test_object_detection3(self): method test_object_detection4 (line 86) | def test_object_detection4(self): method test_object_detection5 (line 93) | def test_object_detection5(self): method test_save_inference_model (line 100) | def test_save_inference_model(self): FILE: modules/image/semantic_segmentation/Extract_Line_Draft/function.py function get_normal_map (line 6) | def get_normal_map(img): function get_gray_map (line 15) | def get_gray_map(img): function get_light_map (line 24) | def get_light_map(img): function get_light_map_single (line 34) | def get_light_map_single(img): function get_light_map_drawer (line 46) | def get_light_map_drawer(img): function get_light_map_drawer2 (line 59) | def get_light_map_drawer2(img): function get_light_map_drawer3 (line 69) | def get_light_map_drawer3(img): function normalize_pic (line 81) | def normalize_pic(img): function superlize_pic (line 86) | def superlize_pic(img): function mask_pic (line 92) | def mask_pic(img, mask): function resize_img_512 (line 108) | def resize_img_512(img): function resize_img_512_3d (line 114) | def resize_img_512_3d(img): function denoise_mat (line 120) | def denoise_mat(img, i): function show_active_img_and_save_denoise (line 124) | def show_active_img_and_save_denoise(img, path): function show_active_img (line 136) | def show_active_img(name, img): function get_active_img (line 147) | def get_active_img(img): function get_active_img_fil (line 157) | def get_active_img_fil(img): function show_double_active_img (line 168) | def show_double_active_img(name, img): function debug_pic_helper (line 178) | def debug_pic_helper(): FILE: modules/image/semantic_segmentation/Extract_Line_Draft/module.py class ExtractLineDraft (line 20) | class ExtractLineDraft: method __init__ (line 21) | def __init__(self): method _set_config (line 30) | def _set_config(self): method predict (line 65) | def predict(self, input_datas): method ExtractLine (line 81) | def ExtractLine(self, image, use_gpu=False): method run_cmd (line 152) | def run_cmd(self, argvs): method add_module_input_arg (line 181) | def add_module_input_arg(self): method check_input_data (line 196) | def check_input_data(self, args): FILE: modules/image/semantic_segmentation/Extract_Line_Draft/test.py class TestHubModule (line 12) | class TestHubModule(unittest.TestCase): method setUpClass (line 14) | def setUpClass(cls) -> None: method tearDownClass (line 25) | def tearDownClass(cls) -> None: method test_ExtractLine1 (line 30) | def test_ExtractLine1(self): method test_ExtractLine2 (line 37) | def test_ExtractLine2(self): method test_ExtractLine3 (line 44) | def test_ExtractLine3(self): method test_ExtractLine4 (line 51) | def test_ExtractLine4(self): method test_save_inference_model (line 58) | def test_save_inference_model(self): FILE: modules/image/semantic_segmentation/ExtremeC3_Portrait_Segmentation/module.py class ExtremeC3_Portrait_Segmentation (line 18) | class ExtremeC3_Portrait_Segmentation(Layer): method __init__ (line 20) | def __init__(self, name=None, directory=None): method load_datas (line 35) | def load_datas(paths, images): method preprocess (line 52) | def preprocess(self, datas, batch_size): method postprocess (line 82) | def postprocess(self, outputs, datas, output_dir, visualization): method Segmentation (line 116) | def Segmentation(self, images=None, paths=None, batch_size=1, output_d... FILE: modules/image/semantic_segmentation/FCN_HRNet_W18_Face_Seg/model/fcn.py class FCN (line 21) | class FCN(nn.Layer): method __init__ (line 41) | def __init__(self, method forward (line 58) | def forward(self, x): class FCNHead (line 66) | class FCNHead(nn.Layer): method __init__ (line 79) | def __init__(self, num_classes, backbone_indices=(-1, ), backbone_chan... method forward (line 91) | def forward(self, feat_list): FILE: modules/image/semantic_segmentation/FCN_HRNet_W18_Face_Seg/model/hrnet.py class HRNet (line 29) | class HRNet(nn.Layer): method __init__ (line 56) | def __init__(self, method forward (line 137) | def forward(self, x): class Layer1 (line 161) | class Layer1(nn.Layer): method __init__ (line 162) | def __init__(self, num_channels, num_filters, num_blocks, has_se=False... method forward (line 179) | def forward(self, x): class TransitionLayer (line 186) | class TransitionLayer(nn.Layer): method __init__ (line 187) | def __init__(self, in_channels, out_channels, name=None): method forward (line 217) | def forward(self, x): class Branches (line 230) | class Branches(nn.Layer): method __init__ (line 231) | def __init__(self, num_blocks, in_channels, out_channels, has_se=False... method forward (line 249) | def forward(self, x): class BottleneckBlock (line 259) | class BottleneckBlock(nn.Layer): method __init__ (line 260) | def __init__(self, num_channels, num_filters, has_se, stride=1, downsa... method forward (line 288) | def forward(self, x): class BasicBlock (line 305) | class BasicBlock(nn.Layer): method __init__ (line 306) | def __init__(self, num_channels, num_filters, stride=1, has_se=False, ... method forward (line 329) | def forward(self, x): class SELayer (line 345) | class SELayer(nn.Layer): method __init__ (line 346) | def __init__(self, num_channels, num_filters, reduction_ratio, name=No... method forward (line 362) | def forward(self, x): class Stage (line 374) | class Stage(nn.Layer): method __init__ (line 375) | def __init__(self, method forward (line 414) | def forward(self, x): class HighResolutionModule (line 421) | class HighResolutionModule(nn.Layer): method __init__ (line 422) | def __init__(self, method forward (line 442) | def forward(self, x): class FuseLayers (line 448) | class FuseLayers(nn.Layer): method __init__ (line 449) | def __init__(self, in_channels, out_channels, multi_scale_output=True,... method forward (line 496) | def forward(self, x): function HRNet_W18_Small_V1 (line 523) | def HRNet_W18_Small_V1(**kwargs): function HRNet_W18_Small_V2 (line 541) | def HRNet_W18_Small_V2(**kwargs): function HRNet_W18 (line 559) | def HRNet_W18(**kwargs): function HRNet_W30 (line 577) | def HRNet_W30(**kwargs): function HRNet_W32 (line 595) | def HRNet_W32(**kwargs): function HRNet_W40 (line 613) | def HRNet_W40(**kwargs): function HRNet_W44 (line 631) | def HRNet_W44(**kwargs): function HRNet_W48 (line 649) | def HRNet_W48(**kwargs): function HRNet_W60 (line 667) | def HRNet_W60(**kwargs): function HRNet_W64 (line 685) | def HRNet_W64(**kwargs): FILE: modules/image/semantic_segmentation/FCN_HRNet_W18_Face_Seg/model/layers.py function SyncBatchNorm (line 20) | def SyncBatchNorm(*args, **kwargs): class ConvBNReLU (line 28) | class ConvBNReLU(nn.Layer): method __init__ (line 29) | def __init__(self, in_channels, out_channels, kernel_size, padding='sa... method forward (line 36) | def forward(self, x): class ConvBN (line 43) | class ConvBN(nn.Layer): method __init__ (line 44) | def __init__(self, in_channels, out_channels, kernel_size, padding='sa... method forward (line 49) | def forward(self, x): FILE: modules/image/semantic_segmentation/FCN_HRNet_W18_Face_Seg/module.py class FCN_HRNet_W18_Face_Seg (line 18) | class FCN_HRNet_W18_Face_Seg(nn.Layer): method __init__ (line 19) | def __init__(self): method load_datas (line 33) | def load_datas(paths, images): method preprocess (line 51) | def preprocess(images, batch_size): method normPRED (line 75) | def normPRED(d): method postprocess (line 84) | def postprocess(self, outputs, datas, output_dir, visualization): method predict (line 118) | def predict(self, input_datas): method Segmentation (line 134) | def Segmentation(self, images=None, paths=None, batch_size=1, output_d... FILE: modules/image/semantic_segmentation/SINet_Portrait_Segmentation/module.py class SINet_Portrait_Segmentation (line 18) | class SINet_Portrait_Segmentation(Layer): method __init__ (line 20) | def __init__(self, name=None, directory=None): method load_datas (line 35) | def load_datas(paths, images): method preprocess (line 52) | def preprocess(self, datas, batch_size): method postprocess (line 82) | def postprocess(self, outputs, datas, output_dir, visualization): method Segmentation (line 116) | def Segmentation(self, images=None, paths=None, batch_size=1, output_d... FILE: modules/image/semantic_segmentation/U2Net/module.py class U2Net (line 18) | class U2Net(nn.Layer): method __init__ (line 19) | def __init__(self): method predict (line 26) | def predict(self, input_datas): method Segmentation (line 37) | def Segmentation(self, FILE: modules/image/semantic_segmentation/U2Net/processor.py class Processor (line 8) | class Processor(): method __init__ (line 9) | def __init__(self, paths, images, batch_size, input_size): method load_datas (line 17) | def load_datas(self, paths, images): method preprocess (line 34) | def preprocess(self, imgs, batch_size=1, input_size=320): method normPRED (line 59) | def normPRED(self, d): method postprocess (line 68) | def postprocess(self, outputs, visualization=False, output_dir='output'): FILE: modules/image/semantic_segmentation/U2Net/u2net.py class REBNCONV (line 8) | class REBNCONV(nn.Layer): method __init__ (line 9) | def __init__(self, in_ch=3, out_ch=3, dirate=1): method forward (line 16) | def forward(self, x): function _upsample_like (line 25) | def _upsample_like(src, tar): class RSU7 (line 33) | class RSU7(nn.Layer): #UNet07DRES(nn.Layer): method __init__ (line 34) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 65) | def forward(self, x): class RSU6 (line 110) | class RSU6(nn.Layer): #UNet06DRES(nn.Layer): method __init__ (line 111) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 138) | def forward(self, x): class RSU5 (line 178) | class RSU5(nn.Layer): #UNet05DRES(nn.Layer): method __init__ (line 179) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 202) | def forward(self, x): class RSU4 (line 236) | class RSU4(nn.Layer): #UNet04DRES(nn.Layer): method __init__ (line 237) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 256) | def forward(self, x): class RSU4F (line 284) | class RSU4F(nn.Layer): #UNet04FRES(nn.Layer): method __init__ (line 285) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 300) | def forward(self, x): class U2NET (line 320) | class U2NET(nn.Layer): method __init__ (line 321) | def __init__(self, in_ch=3, out_ch=1): method forward (line 357) | def forward(self, x): class U2NETP (line 424) | class U2NETP(nn.Layer): method __init__ (line 425) | def __init__(self, in_ch=3, out_ch=1): method forward (line 461) | def forward(self, x): FILE: modules/image/semantic_segmentation/U2Netp/module.py class U2Netp (line 18) | class U2Netp(nn.Layer): method __init__ (line 19) | def __init__(self): method predict (line 26) | def predict(self, input_datas): method Segmentation (line 37) | def Segmentation(self, FILE: modules/image/semantic_segmentation/U2Netp/processor.py class Processor (line 8) | class Processor(): method __init__ (line 9) | def __init__(self, paths, images, batch_size, input_size): method load_datas (line 17) | def load_datas(self, paths, images): method preprocess (line 34) | def preprocess(self, imgs, batch_size=1, input_size=320): method normPRED (line 59) | def normPRED(self, d): method postprocess (line 68) | def postprocess(self, outputs, visualization=False, output_dir='output'): FILE: modules/image/semantic_segmentation/U2Netp/u2net.py class REBNCONV (line 8) | class REBNCONV(nn.Layer): method __init__ (line 9) | def __init__(self, in_ch=3, out_ch=3, dirate=1): method forward (line 16) | def forward(self, x): function _upsample_like (line 25) | def _upsample_like(src, tar): class RSU7 (line 33) | class RSU7(nn.Layer): #UNet07DRES(nn.Layer): method __init__ (line 34) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 65) | def forward(self, x): class RSU6 (line 110) | class RSU6(nn.Layer): #UNet06DRES(nn.Layer): method __init__ (line 111) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 138) | def forward(self, x): class RSU5 (line 178) | class RSU5(nn.Layer): #UNet05DRES(nn.Layer): method __init__ (line 179) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 202) | def forward(self, x): class RSU4 (line 236) | class RSU4(nn.Layer): #UNet04DRES(nn.Layer): method __init__ (line 237) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 256) | def forward(self, x): class RSU4F (line 284) | class RSU4F(nn.Layer): #UNet04FRES(nn.Layer): method __init__ (line 285) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 300) | def forward(self, x): class U2NET (line 320) | class U2NET(nn.Layer): method __init__ (line 321) | def __init__(self, in_ch=3, out_ch=1): method forward (line 357) | def forward(self, x): class U2NETP (line 424) | class U2NETP(nn.Layer): method __init__ (line 425) | def __init__(self, in_ch=3, out_ch=1): method forward (line 461) | def forward(self, x): FILE: modules/image/semantic_segmentation/WatermeterSegmentation/module.py function base64_to_cv2 (line 18) | def base64_to_cv2(b64str): function cv2_to_base64 (line 25) | def cv2_to_base64(image): function read_images (line 31) | def read_images(paths): function rotate (line 41) | def rotate( class MODULE (line 101) | class MODULE(hub.Module): method _initialize (line 102) | def _initialize(self, **kwargs): method predict (line 106) | def predict(self, images=None, paths=None, data=None, batch_size=1, us... method cutPic (line 125) | def cutPic(self, picUrl): method serving_method (line 155) | def serving_method(self, images, **kwargs): method run_cmd (line 184) | def run_cmd(self, argvs): method add_module_config_arg (line 202) | def add_module_config_arg(self): method add_module_input_arg (line 208) | def add_module_input_arg(self): FILE: modules/image/semantic_segmentation/WatermeterSegmentation/serving_client_demo.py function cv2_to_base64 (line 8) | def cv2_to_base64(image): FILE: modules/image/semantic_segmentation/ace2p/data_feed.py function _box2cs (line 14) | def _box2cs(box, aspect_ratio): function _xywh2cs (line 19) | def _xywh2cs(x, y, w, h, aspect_ratio, pixel_std=200): function preprocess (line 31) | def preprocess(org_im, scale, rotation): function reader (line 64) | def reader(images, paths, scale, rotation): FILE: modules/image/semantic_segmentation/ace2p/module.py class ACE2P (line 27) | class ACE2P: method __init__ (line 28) | def __init__(self): method _set_config (line 40) | def _set_config(self): method segmentation (line 63) | def segmentation(self, method serving_method (line 144) | def serving_method(self, images, **kwargs): method run_cmd (line 154) | def run_cmd(self, argvs): method add_module_config_arg (line 177) | def add_module_config_arg(self): method add_module_input_arg (line 189) | def add_module_input_arg(self): FILE: modules/image/semantic_segmentation/ace2p/processor.py function cv2_to_base64 (line 17) | def cv2_to_base64(image): function base64_to_cv2 (line 22) | def base64_to_cv2(b64str): function check_dir (line 29) | def check_dir(dir_path): function get_save_image_name (line 43) | def get_save_image_name(org_im, org_im_path, output_dir): function get_direction (line 59) | def get_direction(src_point, rot_rad): function get_3rd_point (line 67) | def get_3rd_point(a, b): function get_affine_transform (line 72) | def get_affine_transform(center, scale, rot, output_size, shift=np.array... function transform_logits (line 100) | def transform_logits(logits, center, scale, width, height, input_size): function get_palette (line 116) | def get_palette(num_cls): function postprocess (line 143) | def postprocess(data_out, org_im, org_im_path, image_info, output_dir, v... FILE: modules/image/semantic_segmentation/ace2p/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 34) | def tearDownClass(cls) -> None: method test_segmentation1 (line 39) | def test_segmentation1(self): method test_segmentation2 (line 47) | def test_segmentation2(self): method test_segmentation3 (line 55) | def test_segmentation3(self): method test_segmentation4 (line 63) | def test_segmentation4(self): method test_segmentation5 (line 71) | def test_segmentation5(self): method test_segmentation6 (line 78) | def test_segmentation6(self): method test_save_inference_model (line 85) | def test_save_inference_model(self): FILE: modules/image/semantic_segmentation/ann_resnet50_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 30) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 56) | class ConvBN(nn.Layer): method __init__ (line 59) | def __init__(self, method forward (line 70) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 76) | class ConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 91) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 98) | class Activation(nn.Layer): method __init__ (line 124) | def __init__(self, act: str = None): method forward (line 140) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 148) | class ASPPModule(nn.Layer): method __init__ (line 161) | def __init__(self, method forward (line 203) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 230) | class AuxLayer(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 263) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 270) | class Add(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 274) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name: str = None): FILE: modules/image/semantic_segmentation/ann_resnet50_cityscapes/module.py class ANN (line 37) | class ANN(nn.Layer): method __init__ (line 58) | def __init__(self, method transform (line 89) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 92) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class ANNHead (line 105) | class ANNHead(nn.Layer): method __init__ (line 125) | def __init__(self, method forward (line 174) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class AFNB (line 190) | class AFNB(nn.Layer): method __init__ (line 205) | def __init__(self, method forward (line 228) | def forward(self, low_feats: List[paddle.Tensor], high_feats: List[pad... class APNB (line 240) | class APNB(nn.Layer): method __init__ (line 254) | def __init__(self, method forward (line 276) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: function _pp_module (line 288) | def _pp_module(x: paddle.Tensor, psp_size: List[int]) -> paddle.Tensor: class SelfAttentionBlock_AFNB (line 299) | class SelfAttentionBlock_AFNB(nn.Layer): method __init__ (line 313) | def __init__(self, method forward (line 351) | def forward(self, low_feats: List[paddle.Tensor], high_feats: List[pad... class SelfAttentionBlock_APNB (line 380) | class SelfAttentionBlock_APNB(nn.Layer): method __init__ (line 393) | def __init__(self, method forward (line 424) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ann_resnet50_cityscapes/resnet.py class ConvBNLayer (line 23) | class ConvBNLayer(nn.Layer): method __init__ (line 24) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 73) | def __init__(self, method forward (line 122) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 137) | class BasicBlock(nn.Layer): method __init__ (line 138) | def __init__(self, method forward (line 178) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 192) | class ResNet_vd(nn.Layer): method __init__ (line 208) | def __init__(self, method forward (line 342) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 359) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/ann_resnet50_voc/layers.py function SyncBatchNorm (line 23) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 31) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 34) | def __init__(self, method forward (line 51) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 57) | class ConvBN(nn.Layer): method __init__ (line 60) | def __init__(self, method forward (line 71) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 77) | class ConvBNReLU(nn.Layer): method __init__ (line 80) | def __init__(self, method forward (line 92) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 99) | class Activation(nn.Layer): method __init__ (line 125) | def __init__(self, act: str = None): method forward (line 141) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 149) | class ASPPModule(nn.Layer): method __init__ (line 162) | def __init__(self, method forward (line 204) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 231) | class AuxLayer(nn.Layer): method __init__ (line 242) | def __init__(self, method forward (line 264) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 271) | class Add(nn.Layer): method __init__ (line 272) | def __init__(self): method forward (line 275) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name: str = None... FILE: modules/image/semantic_segmentation/ann_resnet50_voc/module.py class ANN (line 37) | class ANN(nn.Layer): method __init__ (line 58) | def __init__(self, method transform (line 89) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 92) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class ANNHead (line 105) | class ANNHead(nn.Layer): method __init__ (line 125) | def __init__(self, method forward (line 174) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class AFNB (line 190) | class AFNB(nn.Layer): method __init__ (line 205) | def __init__(self, method forward (line 228) | def forward(self, low_feats: List[paddle.Tensor], high_feats: List[pad... class APNB (line 240) | class APNB(nn.Layer): method __init__ (line 254) | def __init__(self, method forward (line 276) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: function _pp_module (line 288) | def _pp_module(x: paddle.Tensor, psp_size: List[int]) -> paddle.Tensor: class SelfAttentionBlock_AFNB (line 299) | class SelfAttentionBlock_AFNB(nn.Layer): method __init__ (line 313) | def __init__(self, method forward (line 351) | def forward(self, low_feats: List[paddle.Tensor], high_feats: List[pad... class SelfAttentionBlock_APNB (line 380) | class SelfAttentionBlock_APNB(nn.Layer): method __init__ (line 393) | def __init__(self, method forward (line 424) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ann_resnet50_voc/resnet.py class ConvBNLayer (line 23) | class ConvBNLayer(nn.Layer): method __init__ (line 24) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 73) | def __init__(self, method forward (line 122) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 137) | class BasicBlock(nn.Layer): method __init__ (line 138) | def __init__(self, method forward (line 178) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 192) | class ResNet_vd(nn.Layer): method __init__ (line 208) | def __init__(self, method forward (line 342) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 359) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/bisenet_lane_segmentation/lane_processor/get_lane_coords.py class LaneProcessor (line 21) | class LaneProcessor: method __init__ (line 22) | def __init__(self, method get_lane_coords (line 39) | def get_lane_coords(self, seg_pred): method process_gap (line 50) | def process_gap(self, coordinate): method get_coords (line 86) | def get_coords(self, heat_map): method fix_outliers (line 107) | def fix_outliers(self, coords): method heatmap2coords (line 132) | def heatmap2coords(self, seg_pred): method add_coords (line 150) | def add_coords(self, coordinates, coords): FILE: modules/image/semantic_segmentation/bisenet_lane_segmentation/lane_processor/lane.py class LaneEval (line 21) | class LaneEval(object): method get_angle (line 27) | def get_angle(xs, y_samples): method line_accuracy (line 38) | def line_accuracy(pred, gt, thresh): method bench (line 44) | def bench(pred, gt, y_samples, running_time): method bench_one_submit (line 80) | def bench_one_submit(pred_file, gt_file): FILE: modules/image/semantic_segmentation/bisenet_lane_segmentation/lane_processor/tusimple_processor.py function mkdir (line 25) | def mkdir(path): class TusimpleProcessor (line 31) | class TusimpleProcessor: method __init__ (line 32) | def __init__(self, method dump_data_to_json (line 56) | def dump_data_to_json(self, method predict (line 98) | def predict(self, output, im_path): method bench_one_submit (line 102) | def bench_one_submit(self): method draw (line 115) | def draw(self, img, coords, file_path=None): FILE: modules/image/semantic_segmentation/bisenet_lane_segmentation/module.py class BiSeNetLane (line 42) | class BiSeNetLane(nn.Layer): method __init__ (line 52) | def __init__(self, method forward (line 81) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method predict (line 85) | def predict(self, image_list: list, visualization: bool = False, save_... method serving_method (line 118) | def serving_method(self, images: str, **kwargs) -> dict: method run_cmd (line 130) | def run_cmd(self, argvs: list) -> List[np.ndarray]: method add_module_config_arg (line 150) | def add_module_config_arg(self): method add_module_input_arg (line 160) | def add_module_input_arg(self): FILE: modules/image/semantic_segmentation/bisenet_lane_segmentation/processor.py function get_reverse_list (line 12) | def get_reverse_list(ori_shape: list, transforms: Callable) -> list: function reverse_transform (line 94) | def reverse_transform(pred: paddle.Tensor, ori_shape: list, transforms: ... class Crop (line 122) | class Crop: method __init__ (line 133) | def __init__(self, up_h_off: int = 0, down_h_off: int = 0, left_w_off:... method __call__ (line 139) | def __call__(self, im: np.ndarray, label: np.ndarray = None) -> Tuple[... function cv2_to_base64 (line 170) | def cv2_to_base64(image: np.ndarray) -> str: function base64_to_cv2 (line 178) | def base64_to_cv2(b64str: str) -> np.ndarray: FILE: modules/image/semantic_segmentation/bisenetv2_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNReLU (line 30) | class ConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 40) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 47) | class ConvBN(nn.Layer): method __init__ (line 50) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 55) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvReLUPool (line 61) | class ConvReLUPool(nn.Layer): method __init__ (line 64) | def __init__(self, in_channels: int, out_channels: int): method forward (line 68) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 75) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 78) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 89) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class DepthwiseConvBN (line 95) | class DepthwiseConvBN(nn.Layer): method __init__ (line 98) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 109) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 114) | class AuxLayer(nn.Layer): method __init__ (line 125) | def __init__(self, in_channels: int, inter_channels: int, out_channels... method forward (line 134) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 141) | class Activation(nn.Layer): method __init__ (line 167) | def __init__(self, act: str = None): method forward (line 182) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/bisenetv2_cityscapes/module.py class BiSeNetV2 (line 37) | class BiSeNetV2(nn.Layer): method __init__ (line 53) | def __init__(self, num_classes: int = 19, lambd: float = 0.25, align_c... method transform (line 86) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 89) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class StemBlock (line 111) | class StemBlock(nn.Layer): method __init__ (line 112) | def __init__(self, in_dim: int, out_dim: int): method forward (line 124) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ContextEmbeddingBlock (line 132) | class ContextEmbeddingBlock(nn.Layer): method __init__ (line 133) | def __init__(self, in_dim: int, out_dim: int): method forward (line 142) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GatherAndExpansionLayer1 (line 149) | class GatherAndExpansionLayer1(nn.Layer): method __init__ (line 152) | def __init__(self, in_dim: int, out_dim: int, expand: int): method forward (line 161) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GatherAndExpansionLayer2 (line 165) | class GatherAndExpansionLayer2(nn.Layer): method __init__ (line 168) | def __init__(self, in_dim: int, out_dim: int, expand: int): method forward (line 180) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class DetailBranch (line 184) | class DetailBranch(nn.Layer): method __init__ (line 187) | def __init__(self, in_channels: int): method forward (line 206) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SemanticBranch (line 210) | class SemanticBranch(nn.Layer): method __init__ (line 213) | def __init__(self, in_channels: int): method forward (line 229) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BGA (line 238) | class BGA(nn.Layer): method __init__ (line 241) | def __init__(self, out_dim: int, align_corners: bool): method forward (line 259) | def forward(self, dfm: int, sfm: int) -> paddle.Tensor: class SegHead (line 277) | class SegHead(nn.Layer): method __init__ (line 278) | def __init__(self, in_dim: int, mid_dim: int, num_classes: int): method forward (line 285) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/danet_resnet50_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__( method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 139) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 142) | def __init__(self, method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 165) | class ConvBN(nn.Layer): method __init__ (line 168) | def __init__(self, method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 185) | class ConvBNReLU(nn.Layer): method __init__ (line 188) | def __init__(self, method forward (line 200) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 207) | class Activation(nn.Layer): method __init__ (line 241) | def __init__(self, act: str = None): method forward (line 257) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 265) | class ASPPModule(nn.Layer): method __init__ (line 279) | def __init__(self, method forward (line 321) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/danet_resnet50_cityscapes/module.py class DANet (line 38) | class DANet(nn.Layer): method __init__ (line 56) | def __init__(self, method forward (line 83) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method transform (line 100) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... class DAHead (line 104) | class DAHead(nn.Layer): method __init__ (line 113) | def __init__(self, num_classes: int, in_channels: int): method forward (line 137) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class PAM (line 159) | class PAM(nn.Layer): method __init__ (line 162) | def __init__(self, in_channels: int): method forward (line 177) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class CAM (line 206) | class CAM(nn.Layer): method __init__ (line 209) | def __init__(self, channels: int): method forward (line 218) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/danet_resnet50_cityscapes/resnet.py class ConvBNLayer (line 21) | class ConvBNLayer(nn.Layer): method __init__ (line 22) | def __init__(self, method forward (line 60) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 70) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 135) | class BasicBlock(nn.Layer): method __init__ (line 136) | def __init__(self, method forward (line 176) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 190) | class ResNet_vd(nn.Layer): method __init__ (line 206) | def __init__(self, method forward (line 340) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 357) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/danet_resnet50_voc/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__( method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 139) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 142) | def __init__(self, method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 165) | class ConvBN(nn.Layer): method __init__ (line 168) | def __init__(self, method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 185) | class ConvBNReLU(nn.Layer): method __init__ (line 188) | def __init__(self, method forward (line 200) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 207) | class Activation(nn.Layer): method __init__ (line 241) | def __init__(self, act: str = None): method forward (line 257) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 265) | class ASPPModule(nn.Layer): method __init__ (line 279) | def __init__(self, method forward (line 321) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/danet_resnet50_voc/module.py class DANet (line 38) | class DANet(nn.Layer): method __init__ (line 56) | def __init__(self, method forward (line 83) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method transform (line 100) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... class DAHead (line 105) | class DAHead(nn.Layer): method __init__ (line 114) | def __init__(self, num_classes: int, in_channels: int): method forward (line 138) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class PAM (line 160) | class PAM(nn.Layer): method __init__ (line 163) | def __init__(self, in_channels: int): method forward (line 178) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class CAM (line 207) | class CAM(nn.Layer): method __init__ (line 210) | def __init__(self, channels: int): method forward (line 219) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/danet_resnet50_voc/resnet.py class ConvBNLayer (line 21) | class ConvBNLayer(nn.Layer): method __init__ (line 22) | def __init__(self, method forward (line 60) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 70) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 135) | class BasicBlock(nn.Layer): method __init__ (line 136) | def __init__(self, method forward (line 176) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 190) | class ResNet_vd(nn.Layer): method __init__ (line 206) | def __init__(self, method forward (line 340) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 357) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/deeplabv3p_resnet50_cityscapes/layers.py function SyncBatchNorm (line 21) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 59) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, method forward (line 109) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 128) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 131) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 142) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 148) | class ConvBN(nn.Layer): method __init__ (line 151) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 156) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 162) | class ConvBNReLU(nn.Layer): method __init__ (line 165) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 171) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 178) | class Activation(nn.Layer): method __init__ (line 204) | def __init__(self, act: str = None): method forward (line 219) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 226) | class ASPPModule(nn.Layer): method __init__ (line 240) | def __init__(self, method forward (line 279) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/deeplabv3p_resnet50_cityscapes/module.py class DeepLabV3PResnet50 (line 38) | class DeepLabV3PResnet50(nn.Layer): method __init__ (line 64) | def __init__(self, method transform (line 90) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 93) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class DeepLabV3PHead (line 101) | class DeepLabV3PHead(nn.Layer): method __init__ (line 121) | def __init__(self, num_classes: int, backbone_indices: Tuple[paddle.Te... method forward (line 131) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class Decoder (line 141) | class Decoder(nn.Layer): method __init__ (line 151) | def __init__(self, num_classes: int, in_channels: int, align_corners: ... method forward (line 162) | def forward(self, x: paddle.Tensor, low_level_feat: paddle.Tensor) -> ... FILE: modules/image/semantic_segmentation/deeplabv3p_resnet50_cityscapes/resnet.py class BasicBlock (line 22) | class BasicBlock(nn.Layer): method __init__ (line 23) | def __init__(self, method forward (line 53) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet50_vd (line 66) | class ResNet50_vd(nn.Layer): method __init__ (line 67) | def __init__(self, multi_grid: Tuple[int] = (1, 2, 4)): method forward (line 105) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/deeplabv3p_resnet50_voc/layers.py function SyncBatchNorm (line 21) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 59) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, method forward (line 109) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 128) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 131) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 142) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 148) | class ConvBN(nn.Layer): method __init__ (line 151) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 156) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 162) | class ConvBNReLU(nn.Layer): method __init__ (line 165) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 171) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 178) | class Activation(nn.Layer): method __init__ (line 212) | def __init__(self, act: str = None): method forward (line 227) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 235) | class ASPPModule(nn.Layer): method __init__ (line 249) | def __init__(self, method forward (line 288) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/deeplabv3p_resnet50_voc/module.py class DeepLabV3PResnet50 (line 38) | class DeepLabV3PResnet50(nn.Layer): method __init__ (line 64) | def __init__(self, method transform (line 90) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 93) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class DeepLabV3PHead (line 101) | class DeepLabV3PHead(nn.Layer): method __init__ (line 121) | def __init__(self, num_classes: int, backbone_indices: Tuple[paddle.Te... method forward (line 131) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class Decoder (line 141) | class Decoder(nn.Layer): method __init__ (line 151) | def __init__(self, num_classes: int, in_channels: int, align_corners: ... method forward (line 162) | def forward(self, x: paddle.Tensor, low_level_feat: paddle.Tensor) -> ... FILE: modules/image/semantic_segmentation/deeplabv3p_resnet50_voc/resnet.py class BasicBlock (line 21) | class BasicBlock(nn.Layer): method __init__ (line 22) | def __init__(self, method forward (line 52) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet50_vd (line 65) | class ResNet50_vd(nn.Layer): method __init__ (line 66) | def __init__(self, multi_grid: tuple = (1, 2, 4)): method forward (line 104) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/deeplabv3p_xception65_humanseg/data_feed.py function reader (line 12) | def reader(images=None, paths=None): FILE: modules/image/semantic_segmentation/deeplabv3p_xception65_humanseg/module.py class DeeplabV3pXception65HumanSeg (line 29) | class DeeplabV3pXception65HumanSeg: method __init__ (line 31) | def __init__(self): method _set_config (line 35) | def _set_config(self): method segmentation (line 58) | def segmentation(self, method serving_method (line 139) | def serving_method(self, images, **kwargs): method run_cmd (line 149) | def run_cmd(self, argvs): method add_module_config_arg (line 171) | def add_module_config_arg(self): method add_module_input_arg (line 189) | def add_module_input_arg(self): FILE: modules/image/semantic_segmentation/deeplabv3p_xception65_humanseg/processor.py function cv2_to_base64 (line 16) | def cv2_to_base64(image): function base64_to_cv2 (line 21) | def base64_to_cv2(b64str): function postprocess (line 28) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 64) | def check_dir(dir_path): function get_save_image_name (line 72) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/semantic_segmentation/deeplabv3p_xception65_humanseg/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_segmentation1 (line 32) | def test_segmentation1(self): method test_segmentation2 (line 40) | def test_segmentation2(self): method test_segmentation3 (line 48) | def test_segmentation3(self): method test_segmentation4 (line 56) | def test_segmentation4(self): method test_segmentation5 (line 64) | def test_segmentation5(self): method test_segmentation6 (line 71) | def test_segmentation6(self): method test_save_inference_model (line 78) | def test_save_inference_model(self): FILE: modules/image/semantic_segmentation/fastscnn_cityscapes/layers.py function SyncBatchNorm (line 23) | def SyncBatchNorm(*args, **kwargs): class ConvBNReLU (line 31) | class ConvBNReLU(nn.Layer): method __init__ (line 34) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 41) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 48) | class ConvBN(nn.Layer): method __init__ (line 51) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 56) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvReLUPool (line 62) | class ConvReLUPool(nn.Layer): method __init__ (line 65) | def __init__(self, in_channels: int, out_channels: int): method forward (line 69) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 76) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 90) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class DepthwiseConvBN (line 96) | class DepthwiseConvBN(nn.Layer): method __init__ (line 99) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 109) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 114) | class AuxLayer(nn.Layer): method __init__ (line 125) | def __init__(self, in_channels: int, inter_channels: int, out_channels... method forward (line 134) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 141) | class Activation(nn.Layer): method __init__ (line 167) | def __init__(self, act: str = None): method forward (line 182) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class PPModule (line 189) | class PPModule(nn.Layer): method __init__ (line 202) | def __init__(self, in_channels: int, out_channels: int, bin_sizes: Tup... method _make_stage (line 222) | def _make_stage(self, in_channels: int, out_channels: int, size: int): method forward (line 246) | def forward(self, input: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fastscnn_cityscapes/module.py class FastSCNN (line 36) | class FastSCNN(nn.Layer): method __init__ (line 51) | def __init__(self, num_classes: int = 19, align_corners: bool = False,... method transform (line 79) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 82) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class LearningToDownsample (line 95) | class LearningToDownsample(nn.Layer): method __init__ (line 105) | def __init__(self, dw_channels1: int = 32, dw_channels2: int = 48, out... method forward (line 114) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GlobalFeatureExtractor (line 121) | class GlobalFeatureExtractor(nn.Layer): method __init__ (line 136) | def __init__(self, in_channels: int, block_channels: int, out_channels... method _make_layer (line 150) | def _make_layer(self, method forward (line 163) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class InvertedBottleneck (line 171) | class InvertedBottleneck(nn.Layer): method __init__ (line 181) | def __init__(self, in_channels: int, out_channels: int, expansion: int... method forward (line 202) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FeatureFusionModule (line 209) | class FeatureFusionModule(nn.Layer): method __init__ (line 221) | def __init__(self, high_in_channels: int, low_in_channels: int, out_ch... method forward (line 237) | def forward(self, high_res_input: int, low_res_input: int) -> paddle.T... class Classifier (line 248) | class Classifier(nn.Layer): method __init__ (line 257) | def __init__(self, input_channels: int, num_classes: int): method forward (line 270) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw18_cityscapes/hrnet.py class HRNet_W18 (line 25) | class HRNet_W18(nn.Layer): method __init__ (line 51) | def __init__(self, method forward (line 131) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Layer1 (line 155) | class Layer1(nn.Layer): method __init__ (line 156) | def __init__(self, num_channels: int, num_filters: int, num_blocks: in... method forward (line 173) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class TransitionLayer (line 180) | class TransitionLayer(nn.Layer): method __init__ (line 181) | def __init__(self, in_channels: int, out_channels: int, name=None): method forward (line 211) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Branches (line 224) | class Branches(nn.Layer): method __init__ (line 225) | def __init__(self, num_blocks: int, in_channels: int, out_channels: in... method forward (line 243) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 253) | class BottleneckBlock(nn.Layer): method __init__ (line 254) | def __init__(self, method forward (line 288) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 305) | class BasicBlock(nn.Layer): method __init__ (line 306) | def __init__(self, method forward (line 335) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SELayer (line 351) | class SELayer(nn.Layer): method __init__ (line 352) | def __init__(self, num_channels: int, num_filters: int, reduction_rati... method forward (line 368) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Stage (line 380) | class Stage(nn.Layer): method __init__ (line 381) | def __init__(self, method forward (line 420) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class HighResolutionModule (line 427) | class HighResolutionModule(nn.Layer): method __init__ (line 428) | def __init__(self, method forward (line 448) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FuseLayers (line 454) | class FuseLayers(nn.Layer): method __init__ (line 455) | def __init__(self, method forward (line 507) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw18_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 60) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 70) | class BottleneckBlock(nn.Layer): method __init__ (line 73) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 129) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 132) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 143) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 149) | class ConvBN(nn.Layer): method __init__ (line 152) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 157) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 163) | class ConvBNReLU(nn.Layer): method __init__ (line 166) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 172) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 179) | class Activation(nn.Layer): method __init__ (line 205) | def __init__(self, act: str = None): method forward (line 220) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 227) | class ASPPModule(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 280) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw18_cityscapes/module.py class FCN (line 38) | class FCN(nn.Layer): method __init__ (line 57) | def __init__(self, method transform (line 84) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 87) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class FCNHead (line 96) | class FCNHead(nn.Layer): method __init__ (line 111) | def __init__(self, method forward (line 127) | def forward(self, feat_list: nn.Layer) -> List[paddle.Tensor]: FILE: modules/image/semantic_segmentation/fcn_hrnetw18_voc/hrnet.py class HRNet_W18 (line 25) | class HRNet_W18(nn.Layer): method __init__ (line 51) | def __init__(self, method forward (line 131) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Layer1 (line 155) | class Layer1(nn.Layer): method __init__ (line 156) | def __init__(self, num_channels: int, num_filters: int, num_blocks: in... method forward (line 173) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class TransitionLayer (line 180) | class TransitionLayer(nn.Layer): method __init__ (line 181) | def __init__(self, in_channels: int, out_channels: int, name=None): method forward (line 211) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Branches (line 224) | class Branches(nn.Layer): method __init__ (line 225) | def __init__(self, num_blocks: int, in_channels: int, out_channels: in... method forward (line 243) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 253) | class BottleneckBlock(nn.Layer): method __init__ (line 254) | def __init__(self, method forward (line 288) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 305) | class BasicBlock(nn.Layer): method __init__ (line 306) | def __init__(self, method forward (line 335) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SELayer (line 351) | class SELayer(nn.Layer): method __init__ (line 352) | def __init__(self, num_channels: int, num_filters: int, reduction_rati... method forward (line 368) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Stage (line 380) | class Stage(nn.Layer): method __init__ (line 381) | def __init__(self, method forward (line 420) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class HighResolutionModule (line 427) | class HighResolutionModule(nn.Layer): method __init__ (line 428) | def __init__(self, method forward (line 448) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FuseLayers (line 454) | class FuseLayers(nn.Layer): method __init__ (line 455) | def __init__(self, method forward (line 507) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw18_voc/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 60) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 70) | class BottleneckBlock(nn.Layer): method __init__ (line 73) | def __init__(self, method forward (line 110) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 129) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 132) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 143) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 149) | class ConvBN(nn.Layer): method __init__ (line 152) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 157) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 163) | class ConvBNReLU(nn.Layer): method __init__ (line 166) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 172) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 179) | class Activation(nn.Layer): method __init__ (line 205) | def __init__(self, act: str = None): method forward (line 220) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 227) | class ASPPModule(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 280) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw18_voc/module.py class FCN (line 38) | class FCN(nn.Layer): method __init__ (line 57) | def __init__(self, method transform (line 84) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 87) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class FCNHead (line 96) | class FCNHead(nn.Layer): method __init__ (line 111) | def __init__(self, method forward (line 127) | def forward(self, feat_list: nn.Layer) -> List[paddle.Tensor]: FILE: modules/image/semantic_segmentation/fcn_hrnetw48_cityscapes/hrnet.py class HRNet_W48 (line 25) | class HRNet_W48(nn.Layer): method __init__ (line 49) | def __init__(self, method forward (line 128) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class Layer1 (line 152) | class Layer1(nn.Layer): method __init__ (line 153) | def __init__(self, num_channels: int, num_filters: int, num_blocks: in... method forward (line 170) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class TransitionLayer (line 177) | class TransitionLayer(nn.Layer): method __init__ (line 178) | def __init__(self, in_channels: int, out_channels: int, name: str = No... method forward (line 208) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Branches (line 221) | class Branches(nn.Layer): method __init__ (line 222) | def __init__(self, num_blocks: int, in_channels: int, out_channels: in... method forward (line 240) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 250) | class BottleneckBlock(nn.Layer): method __init__ (line 251) | def __init__(self, method forward (line 285) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 302) | class BasicBlock(nn.Layer): method __init__ (line 303) | def __init__(self, method forward (line 332) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SELayer (line 348) | class SELayer(nn.Layer): method __init__ (line 349) | def __init__(self, num_channels: int, num_filters: int, reduction_rati... method forward (line 365) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Stage (line 377) | class Stage(nn.Layer): method __init__ (line 378) | def __init__(self, method forward (line 417) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class HighResolutionModule (line 424) | class HighResolutionModule(nn.Layer): method __init__ (line 425) | def __init__(self, method forward (line 445) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FuseLayers (line 451) | class FuseLayers(nn.Layer): method __init__ (line 452) | def __init__(self, method forward (line 504) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw48_cityscapes/layers.py function SyncBatchNorm (line 23) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 31) | class ConvBNLayer(nn.Layer): method __init__ (line 34) | def __init__(self, method forward (line 61) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 71) | class BottleneckBlock(nn.Layer): method __init__ (line 74) | def __init__(self, method forward (line 111) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 130) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 133) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 144) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 150) | class ConvBN(nn.Layer): method __init__ (line 153) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 158) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 164) | class ConvBNReLU(nn.Layer): method __init__ (line 167) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 173) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 180) | class Activation(nn.Layer): method __init__ (line 206) | def __init__(self, act: str = None): method forward (line 221) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 228) | class ASPPModule(nn.Layer): method __init__ (line 242) | def __init__(self, method forward (line 281) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw48_cityscapes/module.py class FCN (line 38) | class FCN(nn.Layer): method __init__ (line 57) | def __init__(self, method transform (line 84) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 87) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class FCNHead (line 96) | class FCNHead(nn.Layer): method __init__ (line 111) | def __init__(self, method forward (line 127) | def forward(self, feat_list: nn.Layer) -> List[paddle.Tensor]: FILE: modules/image/semantic_segmentation/fcn_hrnetw48_voc/hrnet.py class HRNet_W48 (line 25) | class HRNet_W48(nn.Layer): method __init__ (line 49) | def __init__(self, method forward (line 128) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class Layer1 (line 152) | class Layer1(nn.Layer): method __init__ (line 153) | def __init__(self, num_channels: int, num_filters: int, num_blocks: in... method forward (line 170) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class TransitionLayer (line 177) | class TransitionLayer(nn.Layer): method __init__ (line 178) | def __init__(self, in_channels: int, out_channels: int, name: str = No... method forward (line 208) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Branches (line 221) | class Branches(nn.Layer): method __init__ (line 222) | def __init__(self, num_blocks: int, in_channels: int, out_channels: in... method forward (line 240) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 250) | class BottleneckBlock(nn.Layer): method __init__ (line 251) | def __init__(self, method forward (line 285) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 302) | class BasicBlock(nn.Layer): method __init__ (line 303) | def __init__(self, method forward (line 332) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SELayer (line 348) | class SELayer(nn.Layer): method __init__ (line 349) | def __init__(self, num_channels: int, num_filters: int, reduction_rati... method forward (line 365) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Stage (line 377) | class Stage(nn.Layer): method __init__ (line 378) | def __init__(self, method forward (line 417) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class HighResolutionModule (line 424) | class HighResolutionModule(nn.Layer): method __init__ (line 425) | def __init__(self, method forward (line 445) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FuseLayers (line 451) | class FuseLayers(nn.Layer): method __init__ (line 452) | def __init__(self, method forward (line 504) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw48_voc/layers.py function SyncBatchNorm (line 24) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 32) | class ConvBNLayer(nn.Layer): method __init__ (line 35) | def __init__(self, method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 112) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 131) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 134) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 145) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 151) | class ConvBN(nn.Layer): method __init__ (line 154) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 165) | class ConvBNReLU(nn.Layer): method __init__ (line 168) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 174) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 181) | class Activation(nn.Layer): method __init__ (line 207) | def __init__(self, act: str = None): method forward (line 222) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 229) | class ASPPModule(nn.Layer): method __init__ (line 243) | def __init__(self, method forward (line 282) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/fcn_hrnetw48_voc/module.py class FCN (line 38) | class FCN(nn.Layer): method __init__ (line 57) | def __init__(self, method transform (line 84) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 87) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class FCNHead (line 96) | class FCNHead(nn.Layer): method __init__ (line 111) | def __init__(self, method forward (line 127) | def forward(self, feat_list: nn.Layer) -> List[paddle.Tensor]: FILE: modules/image/semantic_segmentation/ginet_resnet101vd_ade20k/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__( method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 139) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 142) | def __init__(self, method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 165) | class ConvBN(nn.Layer): method __init__ (line 168) | def __init__(self, method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 185) | class ConvBNReLU(nn.Layer): method __init__ (line 188) | def __init__(self, method forward (line 200) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 207) | class Activation(nn.Layer): method __init__ (line 241) | def __init__(self, act: str = None): method forward (line 257) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 265) | class ASPPModule(nn.Layer): method __init__ (line 279) | def __init__(self, method forward (line 321) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet101vd_ade20k/module.py class GINetResNet101 (line 39) | class GINetResNet101(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 91) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method base_forward (line 94) | def base_forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method forward (line 103) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GIHead (line 124) | class GIHead(nn.Layer): method __init__ (line 127) | def __init__(self, in_channels: int, nclass: int): method forward (line 157) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GlobalReasonUnit (line 172) | class GlobalReasonUnit(nn.Layer): method __init__ (line 178) | def __init__(self, in_channels: int, num_state: int = 256, num_node: i... method forward (line 191) | def forward(self, x: paddle.Tensor, inp: paddle.Tensor) -> List[paddle... class GraphLayer (line 217) | class GraphLayer(nn.Layer): method __init__ (line 218) | def __init__(self, num_state: int, num_node: int, num_class: int): method forward (line 234) | def forward(self, inp: paddle.Tensor, vis_node: paddle.Tensor) -> List... class GCN (line 244) | class GCN(nn.Layer): method __init__ (line 245) | def __init__(self, num_state: int = 128, num_node: int = 64, bias=False): method forward (line 265) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GraphTransfer (line 273) | class GraphTransfer(nn.Layer): method __init__ (line 276) | def __init__(self, in_dim: int): method forward (line 290) | def forward(self, word: paddle.Tensor, vis_node: paddle.Tensor) -> Lis... FILE: modules/image/semantic_segmentation/ginet_resnet101vd_ade20k/resnet.py class BasicBlock (line 20) | class BasicBlock(nn.Layer): method __init__ (line 21) | def __init__(self, method forward (line 55) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet101_vd (line 68) | class ResNet101_vd(nn.Layer): method __init__ (line 69) | def __init__(self, method forward (line 126) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet101vd_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__( method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 139) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 142) | def __init__(self, method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 165) | class ConvBN(nn.Layer): method __init__ (line 168) | def __init__(self, method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 185) | class ConvBNReLU(nn.Layer): method __init__ (line 188) | def __init__(self, method forward (line 200) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 207) | class Activation(nn.Layer): method __init__ (line 241) | def __init__(self, act: str = None): method forward (line 257) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 265) | class ASPPModule(nn.Layer): method __init__ (line 279) | def __init__(self, method forward (line 321) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet101vd_cityscapes/module.py class GINetResNet101 (line 39) | class GINetResNet101(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 91) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method base_forward (line 94) | def base_forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method forward (line 103) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GIHead (line 124) | class GIHead(nn.Layer): method __init__ (line 127) | def __init__(self, in_channels: int, nclass: int): method forward (line 157) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GlobalReasonUnit (line 172) | class GlobalReasonUnit(nn.Layer): method __init__ (line 178) | def __init__(self, in_channels: int, num_state: int = 256, num_node: i... method forward (line 191) | def forward(self, x: paddle.Tensor, inp: paddle.Tensor) -> paddle.Tensor: class GraphLayer (line 217) | class GraphLayer(nn.Layer): method __init__ (line 218) | def __init__(self, num_state: int, num_node: int, num_class: int): method forward (line 234) | def forward(self, inp: paddle.Tensor, vis_node: paddle.Tensor) -> List... class GCN (line 244) | class GCN(nn.Layer): method __init__ (line 245) | def __init__(self, num_state: int = 128, num_node: int = 64, bias=False): method forward (line 265) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GraphTransfer (line 273) | class GraphTransfer(nn.Layer): method __init__ (line 276) | def __init__(self, in_dim: int): method forward (line 290) | def forward(self, word: paddle.Tensor, vis_node: paddle.Tensor) -> Lis... FILE: modules/image/semantic_segmentation/ginet_resnet101vd_cityscapes/resnet.py class BasicBlock (line 20) | class BasicBlock(nn.Layer): method __init__ (line 21) | def __init__(self, method forward (line 55) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet101_vd (line 68) | class ResNet101_vd(nn.Layer): method __init__ (line 69) | def __init__(self, method forward (line 126) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet101vd_voc/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__( method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 139) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 142) | def __init__(self, method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 165) | class ConvBN(nn.Layer): method __init__ (line 168) | def __init__(self, method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 185) | class ConvBNReLU(nn.Layer): method __init__ (line 188) | def __init__(self, method forward (line 200) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 207) | class Activation(nn.Layer): method __init__ (line 241) | def __init__(self, act: str = None): method forward (line 257) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 265) | class ASPPModule(nn.Layer): method __init__ (line 279) | def __init__(self, method forward (line 321) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet101vd_voc/module.py class GINetResNet101 (line 39) | class GINetResNet101(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 91) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method base_forward (line 94) | def base_forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method forward (line 103) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GIHead (line 124) | class GIHead(nn.Layer): method __init__ (line 127) | def __init__(self, in_channels: int, nclass: int): method forward (line 157) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GlobalReasonUnit (line 172) | class GlobalReasonUnit(nn.Layer): method __init__ (line 178) | def __init__(self, in_channels: int, num_state: int = 256, num_node: i... method forward (line 191) | def forward(self, x: paddle.Tensor, inp: paddle.Tensor) -> List[paddle... class GraphLayer (line 217) | class GraphLayer(nn.Layer): method __init__ (line 218) | def __init__(self, num_state: int, num_node: int, num_class: int): method forward (line 234) | def forward(self, inp: paddle.Tensor, vis_node: paddle.Tensor) -> List... class GCN (line 244) | class GCN(nn.Layer): method __init__ (line 245) | def __init__(self, num_state: int = 128, num_node: int = 64, bias=False): method forward (line 265) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GraphTransfer (line 273) | class GraphTransfer(nn.Layer): method __init__ (line 276) | def __init__(self, in_dim: int): method forward (line 290) | def forward(self, word: paddle.Tensor, vis_node: paddle.Tensor) -> Lis... FILE: modules/image/semantic_segmentation/ginet_resnet101vd_voc/resnet.py class BasicBlock (line 20) | class BasicBlock(nn.Layer): method __init__ (line 21) | def __init__(self, method forward (line 55) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet101_vd (line 68) | class ResNet101_vd(nn.Layer): method __init__ (line 69) | def __init__(self, method forward (line 126) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet50vd_ade20k/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__( method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 139) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 142) | def __init__(self, method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 165) | class ConvBN(nn.Layer): method __init__ (line 168) | def __init__(self, method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 185) | class ConvBNReLU(nn.Layer): method __init__ (line 188) | def __init__(self, method forward (line 200) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 207) | class Activation(nn.Layer): method __init__ (line 241) | def __init__(self, act: str = None): method forward (line 257) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 265) | class ASPPModule(nn.Layer): method __init__ (line 279) | def __init__(self, method forward (line 321) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet50vd_ade20k/module.py class GINetResNet50 (line 39) | class GINetResNet50(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 91) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method base_forward (line 94) | def base_forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method forward (line 103) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GIHead (line 124) | class GIHead(nn.Layer): method __init__ (line 127) | def __init__(self, in_channels: int, nclass: int): method forward (line 157) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GlobalReasonUnit (line 172) | class GlobalReasonUnit(nn.Layer): method __init__ (line 178) | def __init__(self, in_channels: int, num_state: int = 256, num_node: i... method forward (line 191) | def forward(self, x: paddle.Tensor, inp:paddle.Tensor) -> List[paddle.... class GraphLayer (line 217) | class GraphLayer(nn.Layer): method __init__ (line 218) | def __init__(self, num_state: int, num_node: int, num_class: int): method forward (line 234) | def forward(self, inp: paddle.Tensor, vis_node: paddle.Tensor) -> List... class GCN (line 244) | class GCN(nn.Layer): method __init__ (line 245) | def __init__(self, num_state: int = 128, num_node: int = 64, bias: boo... method forward (line 265) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GraphTransfer (line 273) | class GraphTransfer(nn.Layer): method __init__ (line 276) | def __init__(self, in_dim: int): method forward (line 290) | def forward(self, word: paddle.Tensor, vis_node: paddle.Tensor) -> Lis... FILE: modules/image/semantic_segmentation/ginet_resnet50vd_ade20k/resnet.py class BasicBlock (line 21) | class BasicBlock(nn.Layer): method __init__ (line 22) | def __init__(self, method forward (line 56) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet50_vd (line 69) | class ResNet50_vd(nn.Layer): method __init__ (line 70) | def __init__(self, method forward (line 127) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet50vd_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__( method forward (line 62) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 72) | class BottleneckBlock(nn.Layer): method __init__ (line 75) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 139) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 142) | def __init__(self, method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 165) | class ConvBN(nn.Layer): method __init__ (line 168) | def __init__(self, method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 185) | class ConvBNReLU(nn.Layer): method __init__ (line 188) | def __init__(self, method forward (line 200) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 207) | class Activation(nn.Layer): method __init__ (line 241) | def __init__(self, act: str = None): method forward (line 257) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 265) | class ASPPModule(nn.Layer): method __init__ (line 279) | def __init__(self, method forward (line 321) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet50vd_cityscapes/module.py class GINetResNet50 (line 39) | class GINetResNet50(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 91) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method base_forward (line 94) | def base_forward(self, x: paddle.Tensor) -> paddle.Tensor: method forward (line 103) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GIHead (line 124) | class GIHead(nn.Layer): method __init__ (line 127) | def __init__(self, in_channels: int, nclass: int): method forward (line 157) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GlobalReasonUnit (line 172) | class GlobalReasonUnit(nn.Layer): method __init__ (line 178) | def __init__(self, in_channels: int, num_state: int = 256, num_node: i... method forward (line 191) | def forward(self, x: paddle.Tensor, inp: paddle.Tensor) -> paddle.Tensor: class GraphLayer (line 217) | class GraphLayer(nn.Layer): method __init__ (line 218) | def __init__(self, num_state: int, num_node: int, num_class: int): method forward (line 234) | def forward(self, inp: paddle.Tensor, vis_node: paddle.Tensor) -> List... class GCN (line 244) | class GCN(nn.Layer): method __init__ (line 245) | def __init__(self, num_state: int = 128, num_node: int = 64, bias: boo... method forward (line 265) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GraphTransfer (line 273) | class GraphTransfer(nn.Layer): method __init__ (line 276) | def __init__(self, in_dim: int): method forward (line 290) | def forward(self, word: paddle.Tensor, vis_node: paddle.Tensor) -> Lis... FILE: modules/image/semantic_segmentation/ginet_resnet50vd_cityscapes/resnet.py class BasicBlock (line 21) | class BasicBlock(nn.Layer): method __init__ (line 22) | def __init__(self, method forward (line 56) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet50_vd (line 69) | class ResNet50_vd(nn.Layer): method __init__ (line 70) | def __init__(self, method forward (line 127) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet50vd_voc/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 30) | class ConvBNLayer(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 59) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, method forward (line 113) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 132) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 135) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 145) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 151) | class ConvBN(nn.Layer): method __init__ (line 154) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 159) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 165) | class ConvBNReLU(nn.Layer): method __init__ (line 168) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 174) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 181) | class Activation(nn.Layer): method __init__ (line 215) | def __init__(self, act: str = None): method forward (line 230) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 238) | class ASPPModule(nn.Layer): method __init__ (line 252) | def __init__(self, method forward (line 289) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ginet_resnet50vd_voc/module.py class GINetResNet50 (line 38) | class GINetResNet50(nn.Layer): method __init__ (line 55) | def __init__(self, method transform (line 89) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method base_forward (line 92) | def base_forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: method forward (line 101) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GIHead (line 117) | class GIHead(nn.Layer): method __init__ (line 120) | def __init__(self, in_channels: int, nclass: int): method forward (line 136) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class GlobalReasonUnit (line 151) | class GlobalReasonUnit(nn.Layer): method __init__ (line 157) | def __init__(self, in_channels: int, num_state: int = 256, num_node: i... method forward (line 167) | def forward(self, x: paddle.Tensor, inp: paddle.Tensor) -> List[paddle... class GraphLayer (line 192) | class GraphLayer(nn.Layer): method __init__ (line 194) | def __init__(self, num_state: int, num_node: int, num_class: int): method forward (line 208) | def forward(self, inp: paddle.Tensor, vis_node: paddle.Tensor) -> List... class GCN (line 218) | class GCN(nn.Layer): method __init__ (line 220) | def __init__(self, num_state: int = 128, num_node: int = 64, bias: boo... method forward (line 233) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class GraphTransfer (line 241) | class GraphTransfer(nn.Layer): method __init__ (line 244) | def __init__(self, in_dim: int): method forward (line 254) | def forward(self, word: paddle.Tensor, vis_node: paddle.Tensor) -> Lis... FILE: modules/image/semantic_segmentation/ginet_resnet50vd_voc/resnet.py class BasicBlock (line 19) | class BasicBlock(nn.Layer): method __init__ (line 21) | def __init__(self, method forward (line 52) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet50_vd (line 65) | class ResNet50_vd(nn.Layer): method __init__ (line 67) | def __init__(self, multi_grid: tuple = (1, 2, 4)): method forward (line 116) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/hardnet_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNReLU (line 30) | class ConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 40) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 47) | class ConvBN(nn.Layer): method __init__ (line 50) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 55) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvReLUPool (line 61) | class ConvReLUPool(nn.Layer): method __init__ (line 64) | def __init__(self, in_channels: int, out_channels: int): method forward (line 68) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 75) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 78) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 89) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class DepthwiseConvBN (line 95) | class DepthwiseConvBN(nn.Layer): method __init__ (line 98) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 108) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 113) | class AuxLayer(nn.Layer): method __init__ (line 124) | def __init__(self, in_channels: int, inter_channels: int, out_channels... method forward (line 133) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 140) | class Activation(nn.Layer): method __init__ (line 166) | def __init__(self, act: str = None): method forward (line 181) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/hardnet_cityscapes/module.py class HarDNet (line 37) | class HarDNet(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 102) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 105) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class Encoder (line 115) | class Encoder(nn.Layer): method __init__ (line 127) | def __init__(self, n_blocks: int, in_channels: int, ch_list: List[int]... method forward (line 148) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: method get_skip_channels (line 156) | def get_skip_channels(self): method get_out_channels (line 159) | def get_out_channels(self): class Decoder (line 163) | class Decoder(nn.Layer): method __init__ (line 175) | def __init__(self, method forward (line 202) | def forward(self, x: paddle.Tensor, skip_connections: List[paddle.Tens... method get_out_channels (line 211) | def get_out_channels(self): class HarDBlock (line 215) | class HarDBlock(nn.Layer): method __init__ (line 226) | def __init__(self, method forward (line 246) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: method get_out_ch (line 270) | def get_out_ch(self): function get_link (line 274) | def get_link(layer: int, base_ch: int, growth_rate: List[int], grmul: fl... FILE: modules/image/semantic_segmentation/humanseg_lite/data_feed.py function preprocess_v (line 12) | def preprocess_v(img, w, h): function reader (line 22) | def reader(images=None, paths=None): FILE: modules/image/semantic_segmentation/humanseg_lite/module.py class ShufflenetHumanSeg (line 46) | class ShufflenetHumanSeg: method __init__ (line 48) | def __init__(self): method _set_config (line 52) | def _set_config(self): method segment (line 80) | def segment(self, method video_stream_segment (line 153) | def video_stream_segment(self, frame_org, frame_id, prev_gray, prev_cf... method video_segment (line 205) | def video_segment(self, video_path=None, use_gpu=False, save_dir='huma... method serving_method (line 322) | def serving_method(self, images, **kwargs): method run_cmd (line 332) | def run_cmd(self, argvs): method add_module_config_arg (line 358) | def add_module_config_arg(self): method add_module_input_arg (line 380) | def add_module_input_arg(self): method create_gradio_app (line 386) | def create_gradio_app(self): FILE: modules/image/semantic_segmentation/humanseg_lite/optimal.py function human_seg_tracking (line 5) | def human_seg_tracking(pre_gray, cur_gray, prev_cfd, dl_weights, disflow): function human_seg_track_fuse (line 46) | def human_seg_track_fuse(track_cfd, dl_cfd, dl_weights, is_track): function threshold_mask (line 68) | def threshold_mask(img, thresh_bg, thresh_fg): function postprocess_v (line 75) | def postprocess_v(cur_gray, scoremap, prev_gray, pre_cfd, disflow, is_in... FILE: modules/image/semantic_segmentation/humanseg_lite/processor.py function cv2_to_base64 (line 12) | def cv2_to_base64(image): function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function postprocess (line 24) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 56) | def check_dir(dir_path): function get_save_image_name (line 64) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/semantic_segmentation/humanseg_lite/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 34) | def tearDownClass(cls) -> None: method test_segment1 (line 40) | def test_segment1(self): method test_segment2 (line 44) | def test_segment2(self): method test_segment3 (line 48) | def test_segment3(self): method test_segment4 (line 52) | def test_segment4(self): method test_segment5 (line 56) | def test_segment5(self): method test_segment6 (line 59) | def test_segment6(self): method test_video_stream_segment1 (line 62) | def test_video_stream_segment1(self): method test_video_stream_segment2 (line 80) | def test_video_stream_segment2(self): method test_video_segment1 (line 98) | def test_video_segment1(self): method test_save_inference_model (line 101) | def test_save_inference_model(self): FILE: modules/image/semantic_segmentation/humanseg_mobile/data_feed.py function preprocess_v (line 12) | def preprocess_v(img, w, h): function reader (line 22) | def reader(images=None, paths=None): FILE: modules/image/semantic_segmentation/humanseg_mobile/module.py class HRNetw18samllv1humanseg (line 46) | class HRNetw18samllv1humanseg: method __init__ (line 48) | def __init__(self): method _set_config (line 52) | def _set_config(self): method segment (line 78) | def segment(self, method video_stream_segment (line 149) | def video_stream_segment(self, frame_org, frame_id, prev_gray, prev_cf... method video_segment (line 199) | def video_segment(self, video_path=None, use_gpu=False, save_dir='huma... method serving_method (line 311) | def serving_method(self, images, **kwargs): method run_cmd (line 321) | def run_cmd(self, argvs): method add_module_config_arg (line 346) | def add_module_config_arg(self): method add_module_input_arg (line 368) | def add_module_input_arg(self): method create_gradio_app (line 374) | def create_gradio_app(self): FILE: modules/image/semantic_segmentation/humanseg_mobile/optimal.py function human_seg_tracking (line 5) | def human_seg_tracking(pre_gray, cur_gray, prev_cfd, dl_weights, disflow): function human_seg_track_fuse (line 46) | def human_seg_track_fuse(track_cfd, dl_cfd, dl_weights, is_track): function threshold_mask (line 68) | def threshold_mask(img, thresh_bg, thresh_fg): function postprocess_v (line 75) | def postprocess_v(cur_gray, scoremap, prev_gray, pre_cfd, disflow, is_in... FILE: modules/image/semantic_segmentation/humanseg_mobile/processor.py function cv2_to_base64 (line 12) | def cv2_to_base64(image): function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function postprocess (line 24) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 57) | def check_dir(dir_path): function get_save_image_name (line 65) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/semantic_segmentation/humanseg_mobile/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 34) | def tearDownClass(cls) -> None: method test_segment1 (line 40) | def test_segment1(self): method test_segment2 (line 44) | def test_segment2(self): method test_segment3 (line 48) | def test_segment3(self): method test_segment4 (line 52) | def test_segment4(self): method test_segment5 (line 56) | def test_segment5(self): method test_segment6 (line 59) | def test_segment6(self): method test_video_stream_segment1 (line 62) | def test_video_stream_segment1(self): method test_video_stream_segment2 (line 80) | def test_video_stream_segment2(self): method test_video_segment1 (line 98) | def test_video_segment1(self): method test_save_inference_model (line 101) | def test_save_inference_model(self): FILE: modules/image/semantic_segmentation/humanseg_server/data_feed.py function preprocess_v (line 12) | def preprocess_v(img, w, h): function reader (line 22) | def reader(images=None, paths=None): FILE: modules/image/semantic_segmentation/humanseg_server/module.py class DeeplabV3pXception65HumanSeg (line 46) | class DeeplabV3pXception65HumanSeg: method __init__ (line 48) | def __init__(self): method _set_config (line 52) | def _set_config(self): method segment (line 78) | def segment(self, method video_stream_segment (line 150) | def video_stream_segment(self, frame_org, frame_id, prev_gray, prev_cf... method video_segment (line 200) | def video_segment(self, video_path=None, use_gpu=False, save_dir='huma... method serving_method (line 294) | def serving_method(self, images, **kwargs): method run_cmd (line 304) | def run_cmd(self, argvs): method add_module_config_arg (line 328) | def add_module_config_arg(self): method add_module_input_arg (line 350) | def add_module_input_arg(self): method create_gradio_app (line 356) | def create_gradio_app(self): FILE: modules/image/semantic_segmentation/humanseg_server/optimal.py function human_seg_tracking (line 5) | def human_seg_tracking(pre_gray, cur_gray, prev_cfd, dl_weights, disflow): function human_seg_track_fuse (line 46) | def human_seg_track_fuse(track_cfd, dl_cfd, dl_weights, is_track): function threshold_mask (line 68) | def threshold_mask(img, thresh_bg, thresh_fg): function postprocess_v (line 75) | def postprocess_v(cur_gray, scoremap, prev_gray, pre_cfd, disflow, is_in... FILE: modules/image/semantic_segmentation/humanseg_server/processor.py function cv2_to_base64 (line 12) | def cv2_to_base64(image): function base64_to_cv2 (line 17) | def base64_to_cv2(b64str): function postprocess (line 24) | def postprocess(data_out, org_im, org_im_shape, org_im_path, output_dir,... function check_dir (line 55) | def check_dir(dir_path): function get_save_image_name (line 63) | def get_save_image_name(org_im, org_im_path, output_dir): FILE: modules/image/semantic_segmentation/humanseg_server/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 34) | def tearDownClass(cls) -> None: method test_segment1 (line 40) | def test_segment1(self): method test_segment2 (line 44) | def test_segment2(self): method test_segment3 (line 48) | def test_segment3(self): method test_segment4 (line 52) | def test_segment4(self): method test_segment5 (line 56) | def test_segment5(self): method test_segment6 (line 59) | def test_segment6(self): method test_video_stream_segment1 (line 62) | def test_video_stream_segment1(self): method test_video_stream_segment2 (line 80) | def test_video_stream_segment2(self): method test_video_segment1 (line 98) | def test_video_segment1(self): method test_save_inference_model (line 101) | def test_save_inference_model(self): FILE: modules/image/semantic_segmentation/isanet_resnet50_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 30) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 56) | class ConvBN(nn.Layer): method __init__ (line 59) | def __init__(self, method forward (line 70) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 76) | class ConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 91) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 98) | class Activation(nn.Layer): method __init__ (line 124) | def __init__(self, act: str = None): method forward (line 140) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 148) | class ASPPModule(nn.Layer): method __init__ (line 161) | def __init__(self, method forward (line 203) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 230) | class AuxLayer(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 263) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 270) | class Add(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 274) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name: str = None): class AttentionBlock (line 277) | class AttentionBlock(nn.Layer): method __init__ (line 299) | def __init__(self, key_in_channels, query_in_channels, channels, method build_project (line 345) | def build_project(self, in_channels: int , channels: int, num_convs: i... method forward (line 372) | def forward(self, query_feats: paddle.Tensor, key_feats: paddle.Tensor... FILE: modules/image/semantic_segmentation/isanet_resnet50_cityscapes/module.py class ISANet (line 38) | class ISANet(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 85) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 88) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class ISAHead (line 104) | class ISAHead(nn.Layer): method __init__ (line 116) | def __init__(self, method forward (line 144) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class SelfAttentionBlock (line 192) | class SelfAttentionBlock(layers.AttentionBlock): method __init__ (line 200) | def __init__(self, in_channels: int, channels: int): method forward (line 219) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/isanet_resnet50_cityscapes/resnet.py class ConvBNLayer (line 21) | class ConvBNLayer(nn.Layer): method __init__ (line 22) | def __init__(self, method forward (line 60) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 70) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 135) | class BasicBlock(nn.Layer): method __init__ (line 136) | def __init__(self, method forward (line 176) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 190) | class ResNet_vd(nn.Layer): method __init__ (line 206) | def __init__(self, method forward (line 340) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 357) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/isanet_resnet50_voc/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 30) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 56) | class ConvBN(nn.Layer): method __init__ (line 59) | def __init__(self, method forward (line 70) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 76) | class ConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 91) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 98) | class Activation(nn.Layer): method __init__ (line 124) | def __init__(self, act: str = None): method forward (line 140) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 148) | class ASPPModule(nn.Layer): method __init__ (line 161) | def __init__(self, method forward (line 203) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 230) | class AuxLayer(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 263) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 270) | class Add(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 274) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name: str = None): class AttentionBlock (line 277) | class AttentionBlock(nn.Layer): method __init__ (line 299) | def __init__(self, key_in_channels, query_in_channels, channels, method build_project (line 345) | def build_project(self, in_channels: int, channels: int, num_convs: in... method forward (line 372) | def forward(self, query_feats: paddle.Tensor, key_feats: paddle.Tensor... FILE: modules/image/semantic_segmentation/isanet_resnet50_voc/module.py class ISANet (line 38) | class ISANet(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 85) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 88) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class ISAHead (line 104) | class ISAHead(nn.Layer): method __init__ (line 116) | def __init__(self, method forward (line 144) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: class SelfAttentionBlock (line 192) | class SelfAttentionBlock(layers.AttentionBlock): method __init__ (line 200) | def __init__(self, in_channels, channels): method forward (line 219) | def forward(self, x): FILE: modules/image/semantic_segmentation/isanet_resnet50_voc/resnet.py class ConvBNLayer (line 21) | class ConvBNLayer(nn.Layer): method __init__ (line 22) | def __init__(self, method forward (line 60) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 70) | class BottleneckBlock(nn.Layer): method __init__ (line 71) | def __init__(self, method forward (line 120) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 135) | class BasicBlock(nn.Layer): method __init__ (line 136) | def __init__(self, method forward (line 176) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 190) | class ResNet_vd(nn.Layer): method __init__ (line 206) | def __init__(self, method forward (line 340) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 357) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/lseg/models/clip.py class CLIPText (line 6) | class CLIPText(nn.Layer): method __init__ (line 8) | def __init__(self, method get_text_features (line 28) | def get_text_features( FILE: modules/image/semantic_segmentation/lseg/models/lseg.py class LSeg (line 8) | class LSeg(nn.Layer): method __init__ (line 10) | def __init__(self): method forward (line 16) | def forward(self, images, texts): FILE: modules/image/semantic_segmentation/lseg/models/scratch.py class Interpolate (line 6) | class Interpolate(nn.Layer): method __init__ (line 9) | def __init__(self, scale_factor, mode, align_corners=False): method forward (line 23) | def forward(self, x): class ResidualConvUnit (line 43) | class ResidualConvUnit(nn.Layer): method __init__ (line 46) | def __init__(self, features): method forward (line 60) | def forward(self, x): class FeatureFusionBlock (line 77) | class FeatureFusionBlock(nn.Layer): method __init__ (line 80) | def __init__(self, features): method forward (line 91) | def forward(self, *xs): class ResidualConvUnit_custom (line 109) | class ResidualConvUnit_custom(nn.Layer): method __init__ (line 112) | def __init__(self, features, activation, bn): method forward (line 150) | def forward(self, x): class FeatureFusionBlock_custom (line 176) | class FeatureFusionBlock_custom(nn.Layer): method __init__ (line 179) | def __init__( method forward (line 218) | def forward(self, *xs): class Scratch (line 239) | class Scratch(nn.Layer): method __init__ (line 241) | def __init__(self, in_channels=[256, 512, 1024, 1024], out_channels=256): method forward (line 291) | def forward(self, layer_1, layer_2, layer_3, layer_4, text_features): FILE: modules/image/semantic_segmentation/lseg/models/vit.py class Slice (line 9) | class Slice(nn.Layer): method __init__ (line 11) | def __init__(self, start_index=1): method forward (line 15) | def forward(self, x): class AddReadout (line 19) | class AddReadout(nn.Layer): method __init__ (line 21) | def __init__(self, start_index=1): method forward (line 25) | def forward(self, x): class Transpose (line 33) | class Transpose(nn.Layer): method __init__ (line 35) | def __init__(self, dim0, dim1): method forward (line 40) | def forward(self, x): class Unflatten (line 47) | class Unflatten(nn.Layer): method __init__ (line 49) | def __init__(self, start_axis, shape): method forward (line 54) | def forward(self, x): class ProjectReadout (line 58) | class ProjectReadout(nn.Layer): method __init__ (line 60) | def __init__(self, in_features, start_index=1): method forward (line 66) | def forward(self, x): class ViT (line 73) | class ViT(VisionTransformer): method __init__ (line 75) | def __init__(self, method _resize_pos_embed (line 178) | def _resize_pos_embed(self, posemb, gs_h, gs_w): method forward (line 194) | def forward(self, x): FILE: modules/image/semantic_segmentation/lseg/module.py function cv2_to_base64 (line 22) | def cv2_to_base64(image): function base64_to_cv2 (line 27) | def base64_to_cv2(b64str): class LSeg (line 42) | class LSeg(models.LSeg): method __init__ (line 44) | def __init__(self): method get_colormap (line 60) | def get_colormap(n): method segment (line 80) | def segment(self, method run_cmd (line 162) | def run_cmd(self, argvs): method serving_method (line 181) | def serving_method(self, image, **kwargs): FILE: modules/image/semantic_segmentation/lseg/test.py class TestHubModule (line 14) | class TestHubModule(unittest.TestCase): method setUpClass (line 17) | def setUpClass(cls) -> None: method tearDownClass (line 28) | def tearDownClass(cls) -> None: method test_segment1 (line 32) | def test_segment1(self): method test_segment2 (line 41) | def test_segment2(self): method test_segment3 (line 50) | def test_segment3(self): method test_segment4 (line 59) | def test_segment4(self): method test_segment5 (line 62) | def test_segment5(self): FILE: modules/image/semantic_segmentation/ocrnet_hrnetw18_cityscapes/hrnet.py class HRNet_W18 (line 25) | class HRNet_W18(nn.Layer): method __init__ (line 51) | def __init__(self, method forward (line 131) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Layer1 (line 155) | class Layer1(nn.Layer): method __init__ (line 156) | def __init__(self, num_channels: int, num_filters: int, num_blocks: in... method forward (line 173) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class TransitionLayer (line 180) | class TransitionLayer(nn.Layer): method __init__ (line 181) | def __init__(self, in_channels: int, out_channels: int, name=None): method forward (line 211) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Branches (line 224) | class Branches(nn.Layer): method __init__ (line 225) | def __init__(self, num_blocks: int, in_channels: int, out_channels: in... method forward (line 243) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 253) | class BottleneckBlock(nn.Layer): method __init__ (line 254) | def __init__(self, method forward (line 288) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 305) | class BasicBlock(nn.Layer): method __init__ (line 306) | def __init__(self, method forward (line 335) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SELayer (line 351) | class SELayer(nn.Layer): method __init__ (line 352) | def __init__(self, num_channels: int, num_filters: int, reduction_rati... method forward (line 368) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Stage (line 380) | class Stage(nn.Layer): method __init__ (line 381) | def __init__(self, method forward (line 420) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class HighResolutionModule (line 427) | class HighResolutionModule(nn.Layer): method __init__ (line 428) | def __init__(self, method forward (line 448) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FuseLayers (line 454) | class FuseLayers(nn.Layer): method __init__ (line 455) | def __init__(self, method forward (line 507) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ocrnet_hrnetw18_cityscapes/layers.py function SyncBatchNorm (line 23) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 31) | class ConvBNLayer(nn.Layer): method __init__ (line 34) | def __init__(self, method forward (line 61) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 71) | class BottleneckBlock(nn.Layer): method __init__ (line 74) | def __init__(self, method forward (line 111) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 130) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 133) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 144) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 150) | class ConvBN(nn.Layer): method __init__ (line 153) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 158) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 164) | class ConvBNReLU(nn.Layer): method __init__ (line 167) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 173) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 180) | class Activation(nn.Layer): method __init__ (line 206) | def __init__(self, act: str = None): method forward (line 221) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 228) | class ASPPModule(nn.Layer): method __init__ (line 242) | def __init__(self, method forward (line 281) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ocrnet_hrnetw18_cityscapes/module.py class OCRNetHRNetW18 (line 37) | class OCRNetHRNetW18(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 86) | def transform(self, img: np.ndarray) -> np.ndarray: method forward (line 89) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class OCRHead (line 99) | class OCRHead(nn.Layer): method __init__ (line 109) | def __init__(self, num_classes: int, in_channels: int, ocr_mid_channel... method forward (line 124) | def forward(self, feat_list: List[paddle.Tensor]) -> paddle.Tensor: class SpatialGatherBlock (line 137) | class SpatialGatherBlock(nn.Layer): method forward (line 140) | def forward(self, pixels: paddle.Tensor, regions: paddle.Tensor) -> pa... class SpatialOCRModule (line 160) | class SpatialOCRModule(nn.Layer): method __init__ (line 163) | def __init__(self, in_channels: int, key_channels: int, out_channels: ... method forward (line 169) | def forward(self, pixels: paddle.Tensor, regions: paddle.Tensor) -> pa... class ObjectAttentionBlock (line 177) | class ObjectAttentionBlock(nn.Layer): method __init__ (line 180) | def __init__(self, in_channels: int, key_channels: int): method forward (line 196) | def forward(self, x: paddle.Tensor, proxy: paddle.Tensor) -> paddle.Te... FILE: modules/image/semantic_segmentation/ocrnet_hrnetw18_voc/hrnet.py class HRNet_W18 (line 24) | class HRNet_W18(nn.Layer): method __init__ (line 51) | def __init__(self, method forward (line 132) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Layer1 (line 156) | class Layer1(nn.Layer): method __init__ (line 157) | def __init__(self, num_channels: int, num_filters: int, num_blocks: in... method forward (line 174) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class TransitionLayer (line 181) | class TransitionLayer(nn.Layer): method __init__ (line 182) | def __init__(self, in_channels: int, out_channels: int, name=None): method forward (line 212) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Branches (line 225) | class Branches(nn.Layer): method __init__ (line 226) | def __init__(self, num_blocks: int, in_channels: int, out_channels: in... method forward (line 244) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 254) | class BottleneckBlock(nn.Layer): method __init__ (line 255) | def __init__(self, method forward (line 289) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 306) | class BasicBlock(nn.Layer): method __init__ (line 307) | def __init__(self, method forward (line 336) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SELayer (line 352) | class SELayer(nn.Layer): method __init__ (line 353) | def __init__(self, num_channels: int, num_filters: int, reduction_rati... method forward (line 369) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Stage (line 381) | class Stage(nn.Layer): method __init__ (line 382) | def __init__(self, method forward (line 421) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class HighResolutionModule (line 428) | class HighResolutionModule(nn.Layer): method __init__ (line 429) | def __init__(self, method forward (line 449) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FuseLayers (line 455) | class FuseLayers(nn.Layer): method __init__ (line 456) | def __init__(self, method forward (line 508) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ocrnet_hrnetw18_voc/layers.py function SyncBatchNorm (line 21) | def SyncBatchNorm(*args, **kwargs): class ConvBNLayer (line 29) | class ConvBNLayer(nn.Layer): method __init__ (line 32) | def __init__(self, method forward (line 59) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 69) | class BottleneckBlock(nn.Layer): method __init__ (line 72) | def __init__(self, method forward (line 109) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 128) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 131) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 142) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 148) | class ConvBN(nn.Layer): method __init__ (line 151) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 156) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 162) | class ConvBNReLU(nn.Layer): method __init__ (line 165) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 171) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 178) | class Activation(nn.Layer): method __init__ (line 212) | def __init__(self, act: str = None): method forward (line 227) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 235) | class ASPPModule(nn.Layer): method __init__ (line 249) | def __init__(self, aspp_ratios, in_channels, out_channels, align_corne... method forward (line 282) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/ocrnet_hrnetw18_voc/module.py class OCRNetHRNetW18 (line 37) | class OCRNetHRNetW18(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 86) | def transform(self, img: np.ndarray) -> np.ndarray: method forward (line 89) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class OCRHead (line 99) | class OCRHead(nn.Layer): method __init__ (line 109) | def __init__(self, num_classes: int, in_channels: int, ocr_mid_channel... method forward (line 124) | def forward(self, feat_list: List[paddle.Tensor]) -> paddle.Tensor: class SpatialGatherBlock (line 137) | class SpatialGatherBlock(nn.Layer): method forward (line 140) | def forward(self, pixels: paddle.Tensor, regions: paddle.Tensor) -> pa... class SpatialOCRModule (line 160) | class SpatialOCRModule(nn.Layer): method __init__ (line 163) | def __init__(self, in_channels: int, key_channels: int, out_channels: ... method forward (line 169) | def forward(self, pixels: paddle.Tensor, regions: paddle.Tensor) -> pa... class ObjectAttentionBlock (line 177) | class ObjectAttentionBlock(nn.Layer): method __init__ (line 180) | def __init__(self, in_channels: int, key_channels: int): method forward (line 196) | def forward(self, x: paddle.Tensor, proxy: paddle.Tensor) -> paddle.Te... FILE: modules/image/semantic_segmentation/pspnet_resnet50_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 30) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 56) | class ConvBN(nn.Layer): method __init__ (line 59) | def __init__(self, method forward (line 70) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 76) | class ConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 91) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 98) | class Activation(nn.Layer): method __init__ (line 124) | def __init__(self, act: str = None): method forward (line 140) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 148) | class ASPPModule(nn.Layer): method __init__ (line 161) | def __init__(self, method forward (line 203) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 230) | class AuxLayer(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 263) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 270) | class Add(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 274) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name: str = None... class PPModule (line 277) | class PPModule(nn.Layer): method __init__ (line 290) | def __init__(self, method _make_stage (line 318) | def _make_stage(self, in_channels: int, out_channels: int, size: int): method forward (line 342) | def forward(self, input: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/pspnet_resnet50_cityscapes/module.py class PSPNet (line 37) | class PSPNet(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 87) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 90) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class PSPNetHead (line 102) | class PSPNetHead(nn.Layer): method __init__ (line 122) | def __init__(self, num_classes, backbone_indices, backbone_channels, method forward (line 152) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: FILE: modules/image/semantic_segmentation/pspnet_resnet50_cityscapes/resnet.py class ConvBNLayer (line 19) | class ConvBNLayer(nn.Layer): method __init__ (line 20) | def __init__(self, method forward (line 58) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 69) | def __init__(self, method forward (line 118) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 133) | class BasicBlock(nn.Layer): method __init__ (line 134) | def __init__(self, method forward (line 174) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 188) | class ResNet_vd(nn.Layer): method __init__ (line 204) | def __init__(self, method forward (line 338) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 355) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/pspnet_resnet50_voc/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 30) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 56) | class ConvBN(nn.Layer): method __init__ (line 59) | def __init__(self, method forward (line 70) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 76) | class ConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 91) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 98) | class Activation(nn.Layer): method __init__ (line 124) | def __init__(self, act: str = None): method forward (line 140) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 148) | class ASPPModule(nn.Layer): method __init__ (line 161) | def __init__(self, method forward (line 203) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 230) | class AuxLayer(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 263) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 270) | class Add(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 274) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name: str = None): class PPModule (line 277) | class PPModule(nn.Layer): method __init__ (line 290) | def __init__(self, in_channels: int, out_channels: int, bin_sizes: tup... method _make_stage (line 314) | def _make_stage(self, in_channels: int, out_channels: int, size: int): method forward (line 339) | def forward(self, input: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/pspnet_resnet50_voc/module.py class PSPNet (line 37) | class PSPNet(nn.Layer): method __init__ (line 56) | def __init__(self, method transform (line 87) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 90) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class PSPNetHead (line 102) | class PSPNetHead(nn.Layer): method __init__ (line 122) | def __init__(self, num_classes, backbone_indices, backbone_channels, method forward (line 152) | def forward(self, feat_list: List[paddle.Tensor]) -> List[paddle.Tensor]: FILE: modules/image/semantic_segmentation/pspnet_resnet50_voc/resnet.py class ConvBNLayer (line 19) | class ConvBNLayer(nn.Layer): method __init__ (line 20) | def __init__(self, method forward (line 58) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BottleneckBlock (line 68) | class BottleneckBlock(nn.Layer): method __init__ (line 69) | def __init__(self, method forward (line 118) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class BasicBlock (line 133) | class BasicBlock(nn.Layer): method __init__ (line 134) | def __init__(self, method forward (line 174) | def forward(self, inputs: paddle.Tensor) -> paddle.Tensor: class ResNet_vd (line 188) | class ResNet_vd(nn.Layer): method __init__ (line 204) | def __init__(self, method forward (line 338) | def forward(self, inputs: paddle.Tensor) -> List[paddle.Tensor]: function ResNet50_vd (line 355) | def ResNet50_vd(**args): FILE: modules/image/semantic_segmentation/stdc1_seg_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 30) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 56) | class ConvBN(nn.Layer): method __init__ (line 59) | def __init__(self, method forward (line 70) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 76) | class ConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 91) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 98) | class Activation(nn.Layer): method __init__ (line 124) | def __init__(self, act: str = None): method forward (line 140) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 148) | class ASPPModule(nn.Layer): method __init__ (line 161) | def __init__(self, method forward (line 203) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 230) | class AuxLayer(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 263) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 270) | class Add(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 274) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name=None) -> pa... class PPModule (line 277) | class PPModule(nn.Layer): method __init__ (line 290) | def __init__(self, method _make_stage (line 318) | def _make_stage(self, in_channels: int, out_channels: int, size: int): method forward (line 343) | def forward(self, input: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/stdc1_seg_cityscapes/module.py class STDCSeg (line 38) | class STDCSeg(nn.Layer): method __init__ (line 54) | def __init__(self, method transform (line 90) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 93) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class SegHead (line 129) | class SegHead(nn.Layer): method __init__ (line 130) | def __init__(self, in_chan: int, mid_chan: int, n_classes:int): method forward (line 137) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AttentionRefinementModule (line 143) | class AttentionRefinementModule(nn.Layer): method __init__ (line 144) | def __init__(self, in_chan: int, out_chan: int): method forward (line 153) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ContextPath (line 163) | class ContextPath(nn.Layer): method __init__ (line 164) | def __init__(self, backbone, use_conv_last: bool = False): method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FeatureFusionModule (line 203) | class FeatureFusionModule(nn.Layer): method __init__ (line 204) | def __init__(self, in_chan:int , out_chan: int): method forward (line 225) | def forward(self, fsp: paddle.Tensor, fcp: paddle.Tensor) -> paddle.Te... FILE: modules/image/semantic_segmentation/stdc1_seg_cityscapes/stdcnet.py class STDCNet (line 26) | class STDCNet(nn.Layer): method __init__ (line 45) | def __init__(self, method forward (line 78) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: method _make_layers (line 91) | def _make_layers(self, base, layers, block_num, block): class ConvBNRelu (line 112) | class ConvBNRelu(nn.Layer): method __init__ (line 113) | def __init__(self, in_planes: int, out_planes: int, kernel: int = 3, s... method forward (line 125) | def forward(self, x): class AddBottleneck (line 130) | class AddBottleneck(nn.Layer): method __init__ (line 131) | def __init__(self, in_planes: int, out_planes: int, block_num: int = 3... method forward (line 183) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class CatBottleneck (line 197) | class CatBottleneck(nn.Layer): method __init__ (line 198) | def __init__(self, in_planes: int, out_planes: int, block_num: int = 3... method forward (line 237) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: function STDC2 (line 257) | def STDC2(**kwargs): function STDC1 (line 261) | def STDC1(**kwargs): FILE: modules/image/semantic_segmentation/stdc1_seg_voc/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class SeparableConvBNReLU (line 30) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 56) | class ConvBN(nn.Layer): method __init__ (line 59) | def __init__(self, method forward (line 70) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBNReLU (line 76) | class ConvBNReLU(nn.Layer): method __init__ (line 79) | def __init__(self, method forward (line 91) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 98) | class Activation(nn.Layer): method __init__ (line 124) | def __init__(self, act: str = None): method forward (line 140) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ASPPModule (line 148) | class ASPPModule(nn.Layer): method __init__ (line 161) | def __init__(self, method forward (line 203) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 230) | class AuxLayer(nn.Layer): method __init__ (line 241) | def __init__(self, method forward (line 263) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Add (line 270) | class Add(nn.Layer): method __init__ (line 271) | def __init__(self): method forward (line 274) | def forward(self, x: paddle.Tensor, y: paddle.Tensor, name=None) -> pa... class PPModule (line 277) | class PPModule(nn.Layer): method __init__ (line 290) | def __init__(self, method _make_stage (line 318) | def _make_stage(self, in_channels: int, out_channels: int, size: int): method forward (line 343) | def forward(self, input: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/stdc1_seg_voc/module.py class STDCSeg (line 38) | class STDCSeg(nn.Layer): method __init__ (line 54) | def __init__(self, method transform (line 90) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 93) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class SegHead (line 129) | class SegHead(nn.Layer): method __init__ (line 130) | def __init__(self, in_chan: int, mid_chan: int, n_classes:int): method forward (line 137) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AttentionRefinementModule (line 143) | class AttentionRefinementModule(nn.Layer): method __init__ (line 144) | def __init__(self, in_chan: int, out_chan: int): method forward (line 153) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ContextPath (line 163) | class ContextPath(nn.Layer): method __init__ (line 164) | def __init__(self, backbone, use_conv_last: bool = False): method forward (line 179) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class FeatureFusionModule (line 203) | class FeatureFusionModule(nn.Layer): method __init__ (line 204) | def __init__(self, in_chan:int , out_chan: int): method forward (line 225) | def forward(self, fsp: paddle.Tensor, fcp: paddle.Tensor) -> paddle.Te... FILE: modules/image/semantic_segmentation/stdc1_seg_voc/stdcnet.py class STDCNet (line 25) | class STDCNet(nn.Layer): method __init__ (line 44) | def __init__(self, method forward (line 77) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: method _make_layers (line 90) | def _make_layers(self, base, layers, block_num, block): class ConvBNRelu (line 111) | class ConvBNRelu(nn.Layer): method __init__ (line 112) | def __init__(self, in_planes: int, out_planes: int, kernel: int = 3, s... method forward (line 124) | def forward(self, x): class AddBottleneck (line 129) | class AddBottleneck(nn.Layer): method __init__ (line 130) | def __init__(self, in_planes: int, out_planes: int, block_num: int = 3... method forward (line 182) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class CatBottleneck (line 196) | class CatBottleneck(nn.Layer): method __init__ (line 197) | def __init__(self, in_planes: int, out_planes: int, block_num: int = 3... method forward (line 236) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: function STDC2 (line 256) | def STDC2(**kwargs): function STDC1 (line 260) | def STDC1(**kwargs): FILE: modules/image/semantic_segmentation/unet_cityscapes/layers.py function SyncBatchNorm (line 22) | def SyncBatchNorm(*args, **kwargs): class ConvBNReLU (line 30) | class ConvBNReLU(nn.Layer): method __init__ (line 33) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 40) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvBN (line 47) | class ConvBN(nn.Layer): method __init__ (line 50) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 55) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class ConvReLUPool (line 61) | class ConvReLUPool(nn.Layer): method __init__ (line 64) | def __init__(self, in_channels: int, out_channels: int): method forward (line 68) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class SeparableConvBNReLU (line 75) | class SeparableConvBNReLU(nn.Layer): method __init__ (line 78) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 89) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class DepthwiseConvBN (line 95) | class DepthwiseConvBN(nn.Layer): method __init__ (line 98) | def __init__(self, in_channels: int, out_channels: int, kernel_size: i... method forward (line 108) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class AuxLayer (line 113) | class AuxLayer(nn.Layer): method __init__ (line 124) | def __init__(self, in_channels: int, inter_channels: int, out_channels... method forward (line 133) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: class Activation (line 140) | class Activation(nn.Layer): method __init__ (line 166) | def __init__(self, act: str = None): method forward (line 181) | def forward(self, x: paddle.Tensor) -> paddle.Tensor: FILE: modules/image/semantic_segmentation/unet_cityscapes/module.py class UNet (line 37) | class UNet(nn.Layer): method __init__ (line 54) | def __init__(self, method transform (line 78) | def transform(self, img: Union[np.ndarray, str]) -> Union[np.ndarray, ... method forward (line 81) | def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]: class Encoder (line 90) | class Encoder(nn.Layer): method __init__ (line 91) | def __init__(self): method down_sampling (line 98) | def down_sampling(self, in_channels: int, out_channels: int) -> nn.Layer: method forward (line 105) | def forward(self, x: paddle.Tensor) -> Tuple: class Decoder (line 114) | class Decoder(nn.Layer): method __init__ (line 115) | def __init__(self, align_corners: bool, use_deconv: bool = False): method forward (line 122) | def forward(self, x: paddle.Tensor, short_cuts: List) -> paddle.Tensor: class UpSampling (line 128) | class UpSampling(nn.Layer): method __init__ (line 129) | def __init__(self, in_channels: int, out_channels: int, align_corners:... method forward (line 144) | def forward(self, x: paddle.Tensor, short_cut: paddle.Tensor) -> paddl... FILE: modules/image/text_recognition/Vehicle_License_Plate_Recognition/module.py class Vehicle_License_Plate_Recognition (line 17) | class Vehicle_License_Plate_Recognition(nn.Layer): method __init__ (line 18) | def __init__(self): method base64_to_cv2 (line 25) | def base64_to_cv2(b64str): method plate_recognition (line 31) | def plate_recognition(self, images=None): method serving_method (line 47) | def serving_method(self, images): FILE: modules/image/text_recognition/arabic_ocr_db_crnn_mobile/module.py class ArabicOCRDBCRNNMobile (line 13) | class ArabicOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/ch_pp-ocrv3/character.py class CharacterOps (line 19) | class CharacterOps(object): method __init__ (line 25) | def __init__(self, config): method add_special_char (line 61) | def add_special_char(self, dict_character): method encode (line 65) | def encode(self, text): method decode (line 86) | def decode(self, text_index, text_prob=None, is_remove_duplicate=False): method get_char_num (line 109) | def get_char_num(self): method get_beg_end_flag_idx (line 112) | def get_beg_end_flag_idx(self, beg_or_end): method get_ignored_tokens (line 127) | def get_ignored_tokens(self): function cal_predicts_accuracy (line 131) | def cal_predicts_accuracy(char_ops, preds, preds_lod, labels, labels_lod... function cal_predicts_accuracy_srn (line 167) | def cal_predicts_accuracy_srn(char_ops, preds, labels, max_text_len, is_... function convert_rec_attention_infer_res (line 197) | def convert_rec_attention_infer_res(preds): function convert_rec_label_to_lod (line 214) | def convert_rec_label_to_lod(ori_labels): FILE: modules/image/text_recognition/ch_pp-ocrv3/module.py class ChPPOCRv3 (line 48) | class ChPPOCRv3: method __init__ (line 50) | def __init__(self, text_detector_module=None, enable_mkldnn=False): method _set_config (line 75) | def _set_config(self, pretrained_model_path): method text_detector_module (line 116) | def text_detector_module(self): method read_images (line 126) | def read_images(self, paths=[]): method get_rotate_crop_image (line 137) | def get_rotate_crop_image(self, img, points): method resize_norm_img_rec (line 161) | def resize_norm_img_rec(self, img, max_wh_ratio): method resize_norm_img_cls (line 180) | def resize_norm_img_cls(self, img): method recognize_text (line 203) | def recognize_text(self, method serving_method (line 295) | def serving_method(self, images, **kwargs): method save_result_image (line 303) | def save_result_image( method _classify_text (line 330) | def _classify_text(self, image_list, angle_classification_thresh=0.9): method _recognize_text (line 372) | def _recognize_text(self, img_list): method run_cmd (line 425) | def run_cmd(self, argvs): method add_module_config_arg (line 450) | def add_module_config_arg(self): method add_module_input_arg (line 476) | def add_module_input_arg(self): method create_gradio_app (line 482) | def create_gradio_app(self): FILE: modules/image/text_recognition/ch_pp-ocrv3/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_recognize_text1 (line 32) | def test_recognize_text1(self): method test_recognize_text2 (line 48) | def test_recognize_text2(self): method test_recognize_text3 (line 64) | def test_recognize_text3(self): method test_recognize_text4 (line 80) | def test_recognize_text4(self): method test_recognize_text5 (line 96) | def test_recognize_text5(self): method test_recognize_text6 (line 99) | def test_recognize_text6(self): method test_save_inference_model (line 102) | def test_save_inference_model(self): FILE: modules/image/text_recognition/ch_pp-ocrv3/utils.py function draw_ocr (line 30) | def draw_ocr(image, boxes, txts, scores, font_file, draw_txt=True, drop_... function text_visual (line 59) | def text_visual(texts, scores, font_file, img_h=400, img_w=600, threshol... function str_count (line 128) | def str_count(s): function resize_img (line 152) | def resize_img(img, input_size=600): function get_image_ext (line 162) | def get_image_ext(image): function sorted_boxes (line 168) | def sorted_boxes(dt_boxes): function base64_to_cv2 (line 189) | def base64_to_cv2(b64str): FILE: modules/image/text_recognition/ch_pp-ocrv3_det/module.py function base64_to_cv2 (line 37) | def base64_to_cv2(b64str): class ChPPOCRv3Det (line 65) | class ChPPOCRv3Det: method __init__ (line 67) | def __init__(self, enable_mkldnn=False): method check_requirements (line 76) | def check_requirements(self): method _set_config (line 84) | def _set_config(self): method read_images (line 123) | def read_images(self, paths=[]): method order_points_clockwise (line 134) | def order_points_clockwise(self, pts): method clip_det_res (line 144) | def clip_det_res(self, points, img_height, img_width): method filter_tag_det_res (line 150) | def filter_tag_det_res(self, dt_boxes, image_shape): method filter_tag_det_res_only_clip (line 164) | def filter_tag_det_res_only_clip(self, dt_boxes, image_shape): method detect_text (line 173) | def detect_text(self, method serving_method (line 273) | def serving_method(self, images, **kwargs): method run_cmd (line 282) | def run_cmd(self, argvs): method add_module_config_arg (line 307) | def add_module_config_arg(self): method add_module_input_arg (line 333) | def add_module_input_arg(self): FILE: modules/image/text_recognition/ch_pp-ocrv3_det/processor.py class DBProcessTest (line 28) | class DBProcessTest(object): method __init__ (line 33) | def __init__(self, params): method resize_image_type0 (line 44) | def resize_image_type0(self, img): method resize_image_type1 (line 80) | def resize_image_type1(self, im): method normalize (line 88) | def normalize(self, im): method __call__ (line 103) | def __call__(self, im): class DBPostProcess (line 114) | class DBPostProcess(object): method __init__ (line 119) | def __init__(self, params): method boxes_from_bitmap (line 128) | def boxes_from_bitmap(self, pred, _bitmap, dest_width, dest_height): method unclip (line 172) | def unclip(self, box): method get_mini_boxes (line 181) | def get_mini_boxes(self, contour): method box_score_fast (line 202) | def box_score_fast(self, bitmap, _box): method box_score_slow (line 219) | def box_score_slow(self, bitmap, contour): method __call__ (line 240) | def __call__(self, outs_dict, shape_list): function draw_boxes (line 257) | def draw_boxes(image, boxes, scores=None, drop_score=0.5): function get_image_ext (line 276) | def get_image_ext(image): FILE: modules/image/text_recognition/ch_pp-ocrv3_det/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_detect_text1 (line 32) | def test_detect_text1(self): method test_detect_text2 (line 42) | def test_detect_text2(self): method test_detect_text3 (line 52) | def test_detect_text3(self): method test_detect_text4 (line 62) | def test_detect_text4(self): method test_detect_text5 (line 72) | def test_detect_text5(self): method test_detect_text6 (line 75) | def test_detect_text6(self): method test_save_inference_model (line 78) | def test_save_inference_model(self): FILE: modules/image/text_recognition/chinese_cht_ocr_db_crnn_mobile/module.py class ChineseChtOCRDBCRNNMobile (line 13) | class ChineseChtOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/chinese_ocr_db_crnn_mobile/character.py class CharacterOps (line 19) | class CharacterOps(object): method __init__ (line 25) | def __init__(self, config): method encode (line 68) | def encode(self, text): method decode (line 89) | def decode(self, text_index, is_remove_duplicate=False): method get_char_num (line 111) | def get_char_num(self): method get_beg_end_flag_idx (line 114) | def get_beg_end_flag_idx(self, beg_or_end): function cal_predicts_accuracy (line 130) | def cal_predicts_accuracy(char_ops, preds, preds_lod, labels, labels_lod... function cal_predicts_accuracy_srn (line 166) | def cal_predicts_accuracy_srn(char_ops, preds, labels, max_text_len, is_... function convert_rec_attention_infer_res (line 196) | def convert_rec_attention_infer_res(preds): function convert_rec_label_to_lod (line 213) | def convert_rec_label_to_lod(ori_labels): FILE: modules/image/text_recognition/chinese_ocr_db_crnn_mobile/module.py class ChineseOCRDBCRNN (line 35) | class ChineseOCRDBCRNN: method __init__ (line 37) | def __init__(self, text_detector_module=None, enable_mkldnn=False): method _set_config (line 62) | def _set_config(self, pretrained_model_path): method text_detector_module (line 103) | def text_detector_module(self): method read_images (line 112) | def read_images(self, paths=[]): method get_rotate_crop_image (line 123) | def get_rotate_crop_image(self, img, points): method resize_norm_img_rec (line 147) | def resize_norm_img_rec(self, img, max_wh_ratio): method resize_norm_img_cls (line 166) | def resize_norm_img_cls(self, img): method recognize_text (line 189) | def recognize_text(self, method serving_method (line 276) | def serving_method(self, images, **kwargs): method save_result_image (line 284) | def save_result_image( method _classify_text (line 311) | def _classify_text(self, image_list, angle_classification_thresh=0.9): method _recognize_text (line 355) | def _recognize_text(self, img_list): method save_inference_model (line 408) | def save_inference_model(self, dirname): method _save_detector_model (line 418) | def _save_detector_model(self, dirname): method _save_recognizer_model (line 421) | def _save_recognizer_model(self, dirname): method _save_classifier_model (line 435) | def _save_classifier_model(self, dirname): method run_cmd (line 450) | def run_cmd(self, argvs): method add_module_config_arg (line 473) | def add_module_config_arg(self): method add_module_input_arg (line 490) | def add_module_input_arg(self): method create_gradio_app (line 496) | def create_gradio_app(self): FILE: modules/image/text_recognition/chinese_ocr_db_crnn_mobile/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_recognize_text1 (line 32) | def test_recognize_text1(self): method test_recognize_text2 (line 48) | def test_recognize_text2(self): method test_recognize_text3 (line 64) | def test_recognize_text3(self): method test_recognize_text4 (line 80) | def test_recognize_text4(self): method test_recognize_text5 (line 96) | def test_recognize_text5(self): method test_recognize_text6 (line 99) | def test_recognize_text6(self): method test_save_inference_model (line 102) | def test_save_inference_model(self): FILE: modules/image/text_recognition/chinese_ocr_db_crnn_mobile/utils.py function draw_ocr (line 16) | def draw_ocr(image, boxes, txts, scores, font_file, draw_txt=True, drop_... function text_visual (line 45) | def text_visual(texts, scores, font_file, img_h=400, img_w=600, threshol... function str_count (line 114) | def str_count(s): function resize_img (line 138) | def resize_img(img, input_size=600): function get_image_ext (line 148) | def get_image_ext(image): function sorted_boxes (line 154) | def sorted_boxes(dt_boxes): function base64_to_cv2 (line 175) | def base64_to_cv2(b64str): FILE: modules/image/text_recognition/chinese_ocr_db_crnn_server/character.py class CharacterOps (line 19) | class CharacterOps(object): method __init__ (line 25) | def __init__(self, config): method encode (line 68) | def encode(self, text): method decode (line 89) | def decode(self, text_index, is_remove_duplicate=False): method get_char_num (line 111) | def get_char_num(self): method get_beg_end_flag_idx (line 114) | def get_beg_end_flag_idx(self, beg_or_end): function cal_predicts_accuracy (line 130) | def cal_predicts_accuracy(char_ops, preds, preds_lod, labels, labels_lod... function cal_predicts_accuracy_srn (line 166) | def cal_predicts_accuracy_srn(char_ops, preds, labels, max_text_len, is_... function convert_rec_attention_infer_res (line 196) | def convert_rec_attention_infer_res(preds): function convert_rec_label_to_lod (line 213) | def convert_rec_label_to_lod(ori_labels): FILE: modules/image/text_recognition/chinese_ocr_db_crnn_server/module.py class ChineseOCRDBCRNNServer (line 39) | class ChineseOCRDBCRNNServer: method __init__ (line 41) | def __init__(self, text_detector_module=None, enable_mkldnn=False): method _set_config (line 66) | def _set_config(self, pretrained_model_path): method text_detector_module (line 107) | def text_detector_module(self): method read_images (line 116) | def read_images(self, paths=[]): method get_rotate_crop_image (line 127) | def get_rotate_crop_image(self, img, points): method resize_norm_img_rec (line 151) | def resize_norm_img_rec(self, img, max_wh_ratio): method resize_norm_img_cls (line 170) | def resize_norm_img_cls(self, img): method recognize_text (line 193) | def recognize_text(self, method serving_method (line 280) | def serving_method(self, images, **kwargs): method save_result_image (line 288) | def save_result_image( method _classify_text (line 315) | def _classify_text(self, image_list, angle_classification_thresh=0.9): method _recognize_text (line 359) | def _recognize_text(self, img_list): method save_inference_model (line 412) | def save_inference_model(self, dirname): method _save_detector_model (line 422) | def _save_detector_model(self, dirname): method _save_recognizer_model (line 425) | def _save_recognizer_model(self, dirname): method _save_classifier_model (line 439) | def _save_classifier_model(self, dirname): method run_cmd (line 454) | def run_cmd(self, argvs): method add_module_config_arg (line 477) | def add_module_config_arg(self): method add_module_input_arg (line 494) | def add_module_input_arg(self): method create_gradio_app (line 500) | def create_gradio_app(self): FILE: modules/image/text_recognition/chinese_ocr_db_crnn_server/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_recognize_text1 (line 32) | def test_recognize_text1(self): method test_recognize_text2 (line 48) | def test_recognize_text2(self): method test_recognize_text3 (line 64) | def test_recognize_text3(self): method test_recognize_text4 (line 80) | def test_recognize_text4(self): method test_recognize_text5 (line 96) | def test_recognize_text5(self): method test_recognize_text6 (line 99) | def test_recognize_text6(self): method test_save_inference_model (line 102) | def test_save_inference_model(self): FILE: modules/image/text_recognition/chinese_ocr_db_crnn_server/utils.py function draw_ocr (line 16) | def draw_ocr(image, boxes, txts, scores, font_file, draw_txt=True, drop_... function text_visual (line 45) | def text_visual(texts, scores, font_file, img_h=400, img_w=600, threshol... function str_count (line 114) | def str_count(s): function resize_img (line 138) | def resize_img(img, input_size=600): function get_image_ext (line 148) | def get_image_ext(image): function sorted_boxes (line 154) | def sorted_boxes(dt_boxes): function base64_to_cv2 (line 175) | def base64_to_cv2(b64str): FILE: modules/image/text_recognition/chinese_text_detection_db_mobile/module.py function base64_to_cv2 (line 24) | def base64_to_cv2(b64str): class ChineseTextDetectionDB (line 52) | class ChineseTextDetectionDB: method __init__ (line 54) | def __init__(self, enable_mkldnn=False): method check_requirements (line 63) | def check_requirements(self): method _set_config (line 71) | def _set_config(self): method read_images (line 110) | def read_images(self, paths=[]): method order_points_clockwise (line 121) | def order_points_clockwise(self, pts): method clip_det_res (line 145) | def clip_det_res(self, points, img_height, img_width): method filter_tag_det_res (line 151) | def filter_tag_det_res(self, dt_boxes, image_shape): method filter_tag_det_res_only_clip (line 165) | def filter_tag_det_res_only_clip(self, dt_boxes, image_shape): method detect_text (line 174) | def detect_text(self, method serving_method (line 270) | def serving_method(self, images, **kwargs): method run_cmd (line 279) | def run_cmd(self, argvs): method add_module_config_arg (line 302) | def add_module_config_arg(self): method add_module_input_arg (line 319) | def add_module_input_arg(self): FILE: modules/image/text_recognition/chinese_text_detection_db_mobile/processor.py class DBProcessTest (line 14) | class DBProcessTest(object): method __init__ (line 19) | def __init__(self, params): method resize_image_type0 (line 31) | def resize_image_type0(self, im): method resize_image_type1 (line 78) | def resize_image_type1(self, im): method normalize (line 86) | def normalize(self, im): method __call__ (line 101) | def __call__(self, im): class DBPostProcess (line 111) | class DBPostProcess(object): method __init__ (line 116) | def __init__(self, params): method boxes_from_bitmap (line 124) | def boxes_from_bitmap(self, pred, _bitmap, dest_width, dest_height): method unclip (line 168) | def unclip(self, box): method get_mini_boxes (line 177) | def get_mini_boxes(self, contour): method box_score_fast (line 198) | def box_score_fast(self, bitmap, _box): method __call__ (line 212) | def __call__(self, outs_dict, ratio_list): function draw_boxes (line 240) | def draw_boxes(image, boxes, scores=None, drop_score=0.5): function get_image_ext (line 259) | def get_image_ext(image): FILE: modules/image/text_recognition/chinese_text_detection_db_mobile/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_detect_text1 (line 32) | def test_detect_text1(self): method test_detect_text2 (line 42) | def test_detect_text2(self): method test_detect_text3 (line 52) | def test_detect_text3(self): method test_detect_text4 (line 62) | def test_detect_text4(self): method test_detect_text5 (line 72) | def test_detect_text5(self): method test_detect_text6 (line 75) | def test_detect_text6(self): method test_save_inference_model (line 78) | def test_save_inference_model(self): FILE: modules/image/text_recognition/chinese_text_detection_db_server/module.py function base64_to_cv2 (line 25) | def base64_to_cv2(b64str): class ChineseTextDetectionDBServer (line 53) | class ChineseTextDetectionDBServer: method __init__ (line 55) | def __init__(self, enable_mkldnn=False): method check_requirements (line 64) | def check_requirements(self): method _set_config (line 72) | def _set_config(self): method read_images (line 108) | def read_images(self, paths=[]): method filter_tag_det_res (line 119) | def filter_tag_det_res(self, dt_boxes, image_shape): method order_points_clockwise (line 140) | def order_points_clockwise(self, pts): method detect_text (line 164) | def detect_text(self, method serving_method (line 245) | def serving_method(self, images, **kwargs): method run_cmd (line 254) | def run_cmd(self, argvs): method add_module_config_arg (line 277) | def add_module_config_arg(self): method add_module_input_arg (line 294) | def add_module_input_arg(self): FILE: modules/image/text_recognition/chinese_text_detection_db_server/processor.py class DBPreProcess (line 14) | class DBPreProcess(object): method __init__ (line 16) | def __init__(self, max_side_len=960): method resize_image_type (line 19) | def resize_image_type(self, im): method normalize (line 61) | def normalize(self, im): method __call__ (line 72) | def __call__(self, im): class DBPostProcess (line 79) | class DBPostProcess(object): method __init__ (line 84) | def __init__(self, thresh=0.3, box_thresh=0.5, max_candidates=1000): method boxes_from_bitmap (line 90) | def boxes_from_bitmap(self, pred, _bitmap, dest_width, dest_height): method unclip (line 134) | def unclip(self, box, unclip_ratio=2.0): method get_mini_boxes (line 142) | def get_mini_boxes(self, contour): method box_score_fast (line 163) | def box_score_fast(self, bitmap, _box): method __call__ (line 177) | def __call__(self, predictions, ratio_list): function draw_boxes (line 201) | def draw_boxes(image, boxes, scores=None, drop_score=0.5): function get_image_ext (line 220) | def get_image_ext(image): FILE: modules/image/text_recognition/chinese_text_detection_db_server/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 16) | def setUpClass(cls) -> None: method tearDownClass (line 27) | def tearDownClass(cls) -> None: method test_detect_text1 (line 32) | def test_detect_text1(self): method test_detect_text2 (line 42) | def test_detect_text2(self): method test_detect_text3 (line 52) | def test_detect_text3(self): method test_detect_text4 (line 62) | def test_detect_text4(self): method test_detect_text5 (line 72) | def test_detect_text5(self): method test_detect_text6 (line 75) | def test_detect_text6(self): method test_save_inference_model (line 78) | def test_save_inference_model(self): FILE: modules/image/text_recognition/cyrillic_ocr_db_crnn_mobile/module.py class CyrillicOCRDBCRNNMobile (line 13) | class CyrillicOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/devanagari_ocr_db_crnn_mobile/module.py class DevanagariOCRDBCRNNMobile (line 13) | class DevanagariOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/french_ocr_db_crnn_mobile/module.py class FrechOCRDBCRNNMobile (line 13) | class FrechOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/german_ocr_db_crnn_mobile/module.py class GermanOCRDBCRNNMobile (line 13) | class GermanOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/japan_ocr_db_crnn_mobile/module.py class JapanOCRDBCRNNMobile (line 13) | class JapanOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/kannada_ocr_db_crnn_mobile/module.py class KannadaOCRDBCRNNMobile (line 13) | class KannadaOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/korean_ocr_db_crnn_mobile/module.py class KoreanOCRDBCRNNMobile (line 13) | class KoreanOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/latin_ocr_db_crnn_mobile/module.py class LatinOCRDBCRNNMobile (line 13) | class LatinOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/multi_languages_ocr_db_crnn/module.py class MultiLangOCR (line 23) | class MultiLangOCR: method __init__ (line 24) | def __init__(self, method recognize_text (line 63) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 118) | def serving_method(self, images, **kwargs): method run_cmd (line 127) | def run_cmd(self, argvs): method arg_parser (line 151) | def arg_parser(self): method export_onnx_model (line 179) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/multi_languages_ocr_db_crnn/test.py class TestHubModule (line 13) | class TestHubModule(unittest.TestCase): method setUpClass (line 15) | def setUpClass(cls) -> None: method tearDownClass (line 26) | def tearDownClass(cls) -> None: method test_recognize_text1 (line 31) | def test_recognize_text1(self): method test_recognize_text2 (line 46) | def test_recognize_text2(self): method test_recognize_text3 (line 61) | def test_recognize_text3(self): method test_recognize_text4 (line 76) | def test_recognize_text4(self): method test_recognize_text5 (line 83) | def test_recognize_text5(self): method test_export_onnx_model (line 90) | def test_export_onnx_model(self): FILE: modules/image/text_recognition/multi_languages_ocr_db_crnn/utils.py function save_result_image (line 11) | def save_result_image(original_image, function read_images (line 61) | def read_images(paths=[]): function draw_boxes (line 72) | def draw_boxes(image, boxes, scores=None, drop_score=0.5): function get_image_ext (line 91) | def get_image_ext(image): function mkdir (line 97) | def mkdir(path): FILE: modules/image/text_recognition/tamil_ocr_db_crnn_mobile/module.py class TamilOCRDBCRNNMobile (line 13) | class TamilOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_recognition/telugu_ocr_db_crnn_mobile/module.py class TeluguOCRDBCRNNMobile (line 13) | class TeluguOCRDBCRNNMobile: method __init__ (line 14) | def __init__(self, method recognize_text (line 46) | def recognize_text(self, images=[], paths=[], output_dir='ocr_result',... method serving_method (line 62) | def serving_method(self, images, **kwargs): method run_cmd (line 71) | def run_cmd(self, argvs): method export_onnx_model (line 78) | def export_onnx_model(self, dirname: str, input_shape_dict=None, opset... FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/clip/clip/layers.py function multi_head_attention_forward (line 12) | def multi_head_attention_forward(x: Tensor, class MultiHeadAttention (line 47) | class MultiHeadAttention(nn.Layer): # without attention mask method __init__ (line 49) | def __init__(self, emb_dim: int, num_heads: int): method forward (line 61) | def forward(self, x, attn_mask=None): # x is in shape[max_len,batch_s... class Identity (line 74) | class Identity(nn.Layer): method __init__ (line 76) | def __init__(self): method forward (line 79) | def forward(self, x): class Bottleneck (line 83) | class Bottleneck(nn.Layer): method __init__ (line 86) | def __init__(self, inplanes, planes, stride=1): method forward (line 111) | def forward(self, x): class AttentionPool2d (line 127) | class AttentionPool2d(nn.Layer): method __init__ (line 129) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 143) | def forward(self, x): class QuickGELU (line 155) | class QuickGELU(nn.Layer): method forward (line 157) | def forward(self, x): class ResidualAttentionBlock (line 161) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 163) | def __init__(self, d_model: int, n_head: int, attn_mask=None): method attention (line 173) | def attention(self, x): method forward (line 178) | def forward(self, x): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/clip/clip/model.py class ModifiedResNet (line 15) | class ModifiedResNet(nn.Layer): method __init__ (line 23) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 48) | def _make_layer(self, planes, blocks, stride=1): method forward (line 57) | def forward(self, x): class Transformer (line 76) | class Transformer(nn.Layer): method __init__ (line 78) | def __init__(self, width: int, layers: int, heads: int, attn_mask=None): method forward (line 84) | def forward(self, x): class VisualTransformer (line 88) | class VisualTransformer(nn.Layer): method __init__ (line 90) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 113) | def forward(self, x): class CLIP (line 132) | class CLIP(nn.Layer): method __init__ (line 134) | def __init__( method build_attention_mask (line 180) | def build_attention_mask(self): method encode_image (line 191) | def encode_image(self, image): method encode_text (line 194) | def encode_text(self, text): method forward (line 213) | def forward(self, image, text): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/clip/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 64) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 83) | def bpe(self, token): method encode (line 124) | def encode(self, text): method decode (line 132) | def decode(self, tokens): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/clip/clip/utils.py function tokenize (line 38) | def tokenize(texts: Union[str, List[str]], context_length: int = 77): function build_model (line 70) | def build_model(name='RN101'): function build_vit_model (line 81) | def build_vit_model(): function build_rn101_model (line 96) | def build_rn101_model(): function build_rn50_model (line 111) | def build_rn50_model(): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/module.py class DiscoDiffusionClip (line 39) | class DiscoDiffusionClip: method generate_image (line 41) | def generate_image(self, method serving_method (line 173) | def serving_method(self, text_prompts, **kwargs): method run_cmd (line 181) | def run_cmd(self, argvs): method add_module_config_arg (line 230) | def add_module_config_arg(self): method add_module_input_arg (line 391) | def add_module_input_arg(self): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/resize_right/interp_methods.py function set_framework_dependencies (line 18) | def set_framework_dependencies(x): function support_sz (line 30) | def support_sz(sz): function cubic (line 40) | def cubic(x): function lanczos2 (line 50) | def lanczos2(x): function lanczos3 (line 56) | def lanczos3(x): function linear (line 62) | def linear(x): function box (line 68) | def box(x): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/resize_right/resize_right.py class NoneClass (line 9) | class NoneClass: function resize (line 33) | def resize(input, function get_projected_grid (line 111) | def get_projected_grid(in_sz, out_sz, scale_factor, fw, by_convs, device... function get_field_of_view (line 125) | def get_field_of_view(projected_grid, cur_support_sz, fw, eps, device): function calc_pad_sz (line 137) | def calc_pad_sz(in_sz, out_sz, field_of_view, projected_grid, scale_fact... function get_weights (line 186) | def get_weights(interp_method, projected_grid, field_of_view): function apply_weights (line 199) | def apply_weights(input, field_of_view, weights, dim, n_dims, pad_sz, pa... function apply_convs (line 232) | def apply_convs(input, scale_factor, in_sz, out_sz, weights, dim, pad_sz... function set_scale_and_out_sz (line 260) | def set_scale_and_out_sz(in_shape, out_shape, scale_factors, by_convs, s... function apply_antialiasing_if_needed (line 315) | def apply_antialiasing_if_needed(interp_method, support_sz, scale_factor... function fw_ceil (line 328) | def fw_ceil(x, fw): function fw_floor (line 335) | def fw_floor(x, fw): function fw_cat (line 342) | def fw_cat(x, fw): function fw_swapaxes (line 349) | def fw_swapaxes(x, ax_1, ax_2, fw): function fw_pad (line 364) | def fw_pad(x, fw, pad_sz, pad_mode, dim=0): function fw_conv (line 380) | def fw_conv(input, filter, stride): function fw_arange (line 392) | def fw_arange(upper_bound, fw, device): function fw_empty (line 399) | def fw_empty(shape, fw, device): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/__init__.py function create (line 40) | def create(text_prompts: Optional[List[str]] = [ function create (line 118) | def create(init_document: 'Document') -> 'DocumentArray': function create (line 126) | def create(**kwargs) -> 'DocumentArray': FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/config.py function load_config (line 19) | def load_config(user_config: Dict, ): function print_args_table (line 53) | def print_args_table(cfg): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/helper.py function _get_logger (line 19) | def _get_logger(): function load_clip_models (line 33) | def load_clip_models(enabled: List[str], clip_models: Dict[str, Any] = {}): function load_all_models (line 54) | def load_all_models(diffusion_model, use_secondary_model): function load_diffusion_model (line 109) | def load_diffusion_model(model_config, diffusion_model, steps): function parse_prompt (line 130) | def parse_prompt(prompt): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/gaussian_diffusion.py function get_named_beta_schedule (line 17) | def get_named_beta_schedule(schedule_name, num_diffusion_timesteps): function betas_for_alpha_bar (line 42) | def betas_for_alpha_bar(num_diffusion_timesteps, alpha_bar, max_beta=0.9... class ModelMeanType (line 62) | class ModelMeanType(enum.Enum): class ModelVarType (line 72) | class ModelVarType(enum.Enum): class LossType (line 86) | class LossType(enum.Enum): method is_vb (line 92) | def is_vb(self): class GaussianDiffusion (line 96) | class GaussianDiffusion: method __init__ (line 113) | def __init__( method q_mean_variance (line 156) | def q_mean_variance(self, x_start, t): method q_sample (line 169) | def q_sample(self, x_start, t, noise=None): method q_posterior_mean_variance (line 187) | def q_posterior_mean_variance(self, x_start, x_t, t): method p_mean_variance (line 203) | def p_mean_variance(self, model, x, t, clip_denoised=True, denoised_fn... method _predict_xstart_from_eps (line 287) | def _predict_xstart_from_eps(self, x_t, t, eps): method _predict_xstart_from_xprev (line 292) | def _predict_xstart_from_xprev(self, x_t, t, xprev): method _predict_eps_from_xstart (line 298) | def _predict_eps_from_xstart(self, x_t, t, pred_xstart): method _scale_timesteps (line 302) | def _scale_timesteps(self, t): method condition_mean (line 307) | def condition_mean(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_mean_with_grad (line 321) | def condition_mean_with_grad(self, cond_fn, p_mean_var, x, t, model_kw... method condition_score (line 335) | def condition_score(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_score_with_grad (line 355) | def condition_score_with_grad(self, cond_fn, p_mean_var, x, t, model_k... method p_sample (line 375) | def p_sample( method p_sample_with_grad (line 419) | def p_sample_with_grad( method p_sample_loop (line 467) | def p_sample_loop( method p_sample_loop_progressive (line 521) | def p_sample_loop_progressive( method ddim_sample (line 586) | def ddim_sample( method ddim_sample_with_grad (line 633) | def ddim_sample_with_grad( method ddim_reverse_sample (line 686) | def ddim_reverse_sample( method ddim_sample_loop (line 719) | def ddim_sample_loop( method ddim_sample_loop_progressive (line 761) | def ddim_sample_loop_progressive( method plms_sample (line 831) | def plms_sample( method plms_sample_loop (line 915) | def plms_sample_loop( method plms_sample_loop_progressive (line 957) | def plms_sample_loop_progressive( method _vb_terms_bpd (line 1026) | def _vb_terms_bpd(self, model, x_start, x_t, t, clip_denoised=True, mo... method training_losses (line 1052) | def training_losses(self, model, x_start, t, model_kwargs=None, noise=... method _prior_bpd (line 1126) | def _prior_bpd(self, x_start): method calc_bpd_loop (line 1142) | def calc_bpd_loop(self, model, x_start, clip_denoised=True, model_kwar... function _extract_into_tensor (line 1201) | def _extract_into_tensor(arr, timesteps, broadcast_shape): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/losses.py function normal_kl (line 11) | def normal_kl(mean1, logvar1, mean2, logvar2): function approx_standard_normal_cdf (line 33) | def approx_standard_normal_cdf(x): function discretized_gaussian_log_likelihood (line 41) | def discretized_gaussian_log_likelihood(x, *, means, log_scales): function spherical_dist_loss (line 71) | def spherical_dist_loss(x, y): function tv_loss (line 77) | def tv_loss(input): function range_loss (line 85) | def range_loss(input): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/make_cutouts.py function sinc (line 17) | def sinc(x): function lanczos (line 21) | def lanczos(x, a): function ramp (line 27) | def ramp(ratio, width): class MakeCutouts (line 37) | class MakeCutouts(nn.Layer): method __init__ (line 39) | def __init__(self, cut_size, cutn, skip_augs=False): method forward (line 56) | def forward(self, input): class MakeCutoutsDango (line 81) | class MakeCutoutsDango(nn.Layer): method __init__ (line 83) | def __init__(self, cut_size, Overview=4, InnerCrop=0, IC_Size_Pow=0.5,... method forward (line 104) | def forward(self, input): function resample (line 155) | def resample(input, size, align_corners=True): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/nn.py class SiLU (line 11) | class SiLU(nn.Layer): method forward (line 13) | def forward(self, x): class GroupNorm32 (line 17) | class GroupNorm32(nn.GroupNorm): method forward (line 19) | def forward(self, x): function conv_nd (line 23) | def conv_nd(dims, *args, **kwargs): function linear (line 36) | def linear(*args, **kwargs): function avg_pool_nd (line 43) | def avg_pool_nd(dims, *args, **kwargs): function update_ema (line 56) | def update_ema(target_params, source_params, rate=0.99): function zero_module (line 69) | def zero_module(module): function scale_module (line 78) | def scale_module(module, scale): function mean_flat (line 87) | def mean_flat(tensor): function normalization (line 94) | def normalization(channels): function timestep_embedding (line 104) | def timestep_embedding(timesteps, dim, max_period=10000): function checkpoint (line 123) | def checkpoint(func, inputs, params, flag): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/perlin_noises.py function interp (line 13) | def interp(t): function perlin (line 17) | def perlin(width, height, scale=10): function perlin_ms (line 31) | def perlin_ms(octaves, width, height, grayscale): function create_perlin_noise (line 47) | def create_perlin_noise(octaves, width, height, grayscale, side_y, side_x): function regen_perlin (line 65) | def regen_perlin(perlin_mode, side_y, side_x, batch_size): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/respace.py function space_timesteps (line 11) | def space_timesteps(num_timesteps, section_counts): class SpacedDiffusion (line 63) | class SpacedDiffusion(GaussianDiffusion): method __init__ (line 72) | def __init__(self, use_timesteps, **kwargs): method p_mean_variance (line 88) | def p_mean_variance(self, model, *args, **kwargs): # pylint: disable=... method training_losses (line 91) | def training_losses(self, model, *args, **kwargs): # pylint: disable=... method condition_mean (line 94) | def condition_mean(self, cond_fn, *args, **kwargs): method condition_score (line 97) | def condition_score(self, cond_fn, *args, **kwargs): method _wrap_model (line 100) | def _wrap_model(self, model): method _scale_timesteps (line 105) | def _scale_timesteps(self, t): class _WrappedModel (line 110) | class _WrappedModel: method __init__ (line 112) | def __init__(self, model, timestep_map, rescale_timesteps, original_nu... method __call__ (line 118) | def __call__(self, x, ts, **kwargs): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/script_util.py function diffusion_defaults (line 18) | def diffusion_defaults(): function model_and_diffusion_defaults (line 34) | def model_and_diffusion_defaults(): function create_model_and_diffusion (line 59) | def create_model_and_diffusion( function create_model (line 115) | def create_model( function create_gaussian_diffusion (line 172) | def create_gaussian_diffusion( FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/sec_diff.py class DiffusionOutput (line 14) | class DiffusionOutput: class SkipBlock (line 20) | class SkipBlock(nn.Layer): method __init__ (line 22) | def __init__(self, main, skip=None): method forward (line 27) | def forward(self, input): function append_dims (line 31) | def append_dims(x, n): function expand_to_planes (line 35) | def expand_to_planes(x, shape): function alpha_sigma_to_t (line 39) | def alpha_sigma_to_t(alpha, sigma): function t_to_alpha_sigma (line 43) | def t_to_alpha_sigma(t): class SecondaryDiffusionImageNet2 (line 47) | class SecondaryDiffusionImageNet2(nn.Layer): method __init__ (line 49) | def __init__(self): method forward (line 105) | def forward(self, input, t): class FourierFeatures (line 114) | class FourierFeatures(nn.Layer): method __init__ (line 116) | def __init__(self, in_features, out_features, std=1.0): method forward (line 124) | def forward(self, input): class ConvBlock (line 129) | class ConvBlock(nn.Sequential): method __init__ (line 131) | def __init__(self, c_in, c_out): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/transforms.py class Normalize (line 25) | class Normalize(nn.Layer): method __init__ (line 27) | def __init__(self, mean, std): method forward (line 32) | def forward(self, tensor: Tensor): class InterpolationMode (line 42) | class InterpolationMode(Enum): class Grayscale (line 56) | class Grayscale(nn.Layer): method __init__ (line 58) | def __init__(self, num_output_channels): method forward (line 62) | def forward(self, x): class Lambda (line 70) | class Lambda(nn.Layer): method __init__ (line 72) | def __init__(self, func): method forward (line 76) | def forward(self, x): class RandomGrayscale (line 80) | class RandomGrayscale(nn.Layer): method __init__ (line 82) | def __init__(self, p): method forward (line 87) | def forward(self, x): class RandomHorizontalFlip (line 94) | class RandomHorizontalFlip(nn.Layer): method __init__ (line 96) | def __init__(self, prob): method forward (line 100) | def forward(self, x): function _blend (line 107) | def _blend(img1: Tensor, img2: Tensor, ratio: float) -> Tensor: function trunc_div (line 113) | def trunc_div(a, b): function fmod (line 122) | def fmod(a, b): function _rgb2hsv (line 126) | def _rgb2hsv(img: Tensor) -> Tensor: function _hsv2rgb (line 165) | def _hsv2rgb(img: Tensor) -> Tensor: function adjust_brightness (line 186) | def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: function adjust_contrast (line 193) | def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: function adjust_hue (line 209) | def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: function adjust_saturation (line 221) | def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: class ColorJitter (line 230) | class ColorJitter(nn.Layer): method __init__ (line 232) | def __init__(self, brightness=0, contrast=0, saturation=0, hue=0): method _check_input (line 239) | def _check_input(self, value, name, center=1, bound=(0, float("inf")),... method get_params (line 259) | def get_params( method forward (line 290) | def forward(self, img): method __repr__ (line 313) | def __repr__(self) -> str: function _apply_grid_transform (line 322) | def _apply_grid_transform(img: Tensor, grid: Tensor, mode: str, fill: Op... function _gen_affine_grid (line 350) | def _gen_affine_grid( function affine_impl (line 375) | def affine_impl(img: Tensor, function _get_inverse_affine_matrix (line 386) | def _get_inverse_affine_matrix(center: List[float], function affine (line 449) | def affine( function _interpolation_modes_from_int (line 558) | def _interpolation_modes_from_int(i: int) -> InterpolationMode: function _check_sequence_input (line 570) | def _check_sequence_input(x, name, req_sizes): function _setup_angle (line 578) | def _setup_angle(x, name, req_sizes=(2, )): class RandomAffine (line 589) | class RandomAffine(nn.Layer): method __init__ (line 631) | def __init__( method get_params (line 696) | def get_params( method forward (line 733) | def forward(self, img): method __repr__ (line 747) | def __repr__(self) -> str: FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/model/unet.py class AttentionPool2d (line 23) | class AttentionPool2d(nn.Layer): method __init__ (line 28) | def __init__( method forward (line 46) | def forward(self, x): class TimestepBlock (line 58) | class TimestepBlock(nn.Layer): method forward (line 64) | def forward(self, x, emb): class TimestepEmbedSequential (line 70) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 76) | def forward(self, x, emb): class Upsample (line 85) | class Upsample(nn.Layer): method __init__ (line 95) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 104) | def forward(self, x): class Downsample (line 115) | class Downsample(nn.Layer): method __init__ (line 125) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 138) | def forward(self, x): class ResBlock (line 143) | class ResBlock(TimestepBlock): method __init__ (line 160) | def __init__( method forward (line 220) | def forward(self, x, emb): method _forward (line 230) | def _forward(self, x, emb): class AttentionBlock (line 254) | class AttentionBlock(nn.Layer): method __init__ (line 262) | def __init__( method forward (line 290) | def forward(self, x): method _forward (line 293) | def _forward(self, x): function count_flops_attn (line 304) | def count_flops_attn(model, _x, y): class QKVAttentionLegacy (line 324) | class QKVAttentionLegacy(nn.Layer): method __init__ (line 329) | def __init__(self, n_heads): method forward (line 333) | def forward(self, qkv): method count_flops (line 353) | def count_flops(model, _x, y): class QKVAttention (line 357) | class QKVAttention(nn.Layer): method __init__ (line 362) | def __init__(self, n_heads): method forward (line 366) | def forward(self, qkv): method count_flops (line 389) | def count_flops(model, _x, y): class UNetModel (line 393) | class UNetModel(nn.Layer): method __init__ (line 424) | def __init__( method forward (line 602) | def forward(self, x, timesteps, y=None): class SuperResModel (line 632) | class SuperResModel(UNetModel): method __init__ (line 639) | def __init__(self, image_size, in_channels, *args, **kwargs): method forward (line 642) | def forward(self, x, timesteps, low_res=None, **kwargs): class EncoderUNetModel (line 649) | class EncoderUNetModel(nn.Layer): method __init__ (line 656) | def __init__( method forward (line 812) | def forward(self, x, timesteps): FILE: modules/image/text_to_image/disco_diffusion_clip_rn101/reverse_diffusion/runner.py function do_run (line 32) | def do_run(args, models) -> 'DocumentArray': function _silent_push (line 281) | def _silent_push(da_batches: DocumentArray, name: str) -> None: FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/clip/clip/layers.py function multi_head_attention_forward (line 12) | def multi_head_attention_forward(x: Tensor, class MultiHeadAttention (line 47) | class MultiHeadAttention(nn.Layer): # without attention mask method __init__ (line 49) | def __init__(self, emb_dim: int, num_heads: int): method forward (line 61) | def forward(self, x, attn_mask=None): # x is in shape[max_len,batch_s... class Identity (line 74) | class Identity(nn.Layer): method __init__ (line 76) | def __init__(self): method forward (line 79) | def forward(self, x): class Bottleneck (line 83) | class Bottleneck(nn.Layer): method __init__ (line 86) | def __init__(self, inplanes, planes, stride=1): method forward (line 111) | def forward(self, x): class AttentionPool2d (line 127) | class AttentionPool2d(nn.Layer): method __init__ (line 129) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 143) | def forward(self, x): class QuickGELU (line 155) | class QuickGELU(nn.Layer): method forward (line 157) | def forward(self, x): class ResidualAttentionBlock (line 161) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 163) | def __init__(self, d_model: int, n_head: int, attn_mask=None): method attention (line 173) | def attention(self, x): method forward (line 178) | def forward(self, x): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/clip/clip/model.py class ModifiedResNet (line 15) | class ModifiedResNet(nn.Layer): method __init__ (line 23) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 48) | def _make_layer(self, planes, blocks, stride=1): method forward (line 57) | def forward(self, x): class Transformer (line 76) | class Transformer(nn.Layer): method __init__ (line 78) | def __init__(self, width: int, layers: int, heads: int, attn_mask=None): method forward (line 84) | def forward(self, x): class VisualTransformer (line 88) | class VisualTransformer(nn.Layer): method __init__ (line 90) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 113) | def forward(self, x): class CLIP (line 132) | class CLIP(nn.Layer): method __init__ (line 134) | def __init__( method build_attention_mask (line 180) | def build_attention_mask(self): method encode_image (line 191) | def encode_image(self, image): method encode_text (line 194) | def encode_text(self, text): method forward (line 213) | def forward(self, image, text): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/clip/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 64) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 83) | def bpe(self, token): method encode (line 124) | def encode(self, text): method decode (line 132) | def decode(self, tokens): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/clip/clip/utils.py function tokenize (line 38) | def tokenize(texts: Union[str, List[str]], context_length: int = 77): function build_model (line 70) | def build_model(name='RN50'): function build_vit_model (line 81) | def build_vit_model(): function build_rn101_model (line 96) | def build_rn101_model(): function build_rn50_model (line 111) | def build_rn50_model(): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/module.py class DiscoDiffusionClip (line 39) | class DiscoDiffusionClip: method generate_image (line 41) | def generate_image(self, method serving_method (line 173) | def serving_method(self, text_prompts, **kwargs): method run_cmd (line 181) | def run_cmd(self, argvs): method add_module_config_arg (line 230) | def add_module_config_arg(self): method add_module_input_arg (line 391) | def add_module_input_arg(self): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/resize_right/interp_methods.py function set_framework_dependencies (line 18) | def set_framework_dependencies(x): function support_sz (line 30) | def support_sz(sz): function cubic (line 40) | def cubic(x): function lanczos2 (line 50) | def lanczos2(x): function lanczos3 (line 56) | def lanczos3(x): function linear (line 62) | def linear(x): function box (line 68) | def box(x): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/resize_right/resize_right.py class NoneClass (line 9) | class NoneClass: function resize (line 33) | def resize(input, function get_projected_grid (line 111) | def get_projected_grid(in_sz, out_sz, scale_factor, fw, by_convs, device... function get_field_of_view (line 125) | def get_field_of_view(projected_grid, cur_support_sz, fw, eps, device): function calc_pad_sz (line 137) | def calc_pad_sz(in_sz, out_sz, field_of_view, projected_grid, scale_fact... function get_weights (line 186) | def get_weights(interp_method, projected_grid, field_of_view): function apply_weights (line 199) | def apply_weights(input, field_of_view, weights, dim, n_dims, pad_sz, pa... function apply_convs (line 232) | def apply_convs(input, scale_factor, in_sz, out_sz, weights, dim, pad_sz... function set_scale_and_out_sz (line 260) | def set_scale_and_out_sz(in_shape, out_shape, scale_factors, by_convs, s... function apply_antialiasing_if_needed (line 315) | def apply_antialiasing_if_needed(interp_method, support_sz, scale_factor... function fw_ceil (line 328) | def fw_ceil(x, fw): function fw_floor (line 335) | def fw_floor(x, fw): function fw_cat (line 342) | def fw_cat(x, fw): function fw_swapaxes (line 349) | def fw_swapaxes(x, ax_1, ax_2, fw): function fw_pad (line 364) | def fw_pad(x, fw, pad_sz, pad_mode, dim=0): function fw_conv (line 380) | def fw_conv(input, filter, stride): function fw_arange (line 392) | def fw_arange(upper_bound, fw, device): function fw_empty (line 399) | def fw_empty(shape, fw, device): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/__init__.py function create (line 40) | def create(text_prompts: Optional[List[str]] = [ function create (line 118) | def create(init_document: 'Document') -> 'DocumentArray': function create (line 126) | def create(**kwargs) -> 'DocumentArray': FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/config.py function load_config (line 19) | def load_config(user_config: Dict, ): function print_args_table (line 53) | def print_args_table(cfg): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/helper.py function _get_logger (line 19) | def _get_logger(): function load_clip_models (line 33) | def load_clip_models(enabled: List[str], clip_models: Dict[str, Any] = {}): function load_all_models (line 54) | def load_all_models(diffusion_model, use_secondary_model): function load_diffusion_model (line 109) | def load_diffusion_model(model_config, diffusion_model, steps): function parse_prompt (line 130) | def parse_prompt(prompt): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/gaussian_diffusion.py function get_named_beta_schedule (line 17) | def get_named_beta_schedule(schedule_name, num_diffusion_timesteps): function betas_for_alpha_bar (line 42) | def betas_for_alpha_bar(num_diffusion_timesteps, alpha_bar, max_beta=0.9... class ModelMeanType (line 62) | class ModelMeanType(enum.Enum): class ModelVarType (line 72) | class ModelVarType(enum.Enum): class LossType (line 86) | class LossType(enum.Enum): method is_vb (line 92) | def is_vb(self): class GaussianDiffusion (line 96) | class GaussianDiffusion: method __init__ (line 113) | def __init__( method q_mean_variance (line 156) | def q_mean_variance(self, x_start, t): method q_sample (line 169) | def q_sample(self, x_start, t, noise=None): method q_posterior_mean_variance (line 187) | def q_posterior_mean_variance(self, x_start, x_t, t): method p_mean_variance (line 203) | def p_mean_variance(self, model, x, t, clip_denoised=True, denoised_fn... method _predict_xstart_from_eps (line 287) | def _predict_xstart_from_eps(self, x_t, t, eps): method _predict_xstart_from_xprev (line 292) | def _predict_xstart_from_xprev(self, x_t, t, xprev): method _predict_eps_from_xstart (line 298) | def _predict_eps_from_xstart(self, x_t, t, pred_xstart): method _scale_timesteps (line 302) | def _scale_timesteps(self, t): method condition_mean (line 307) | def condition_mean(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_mean_with_grad (line 321) | def condition_mean_with_grad(self, cond_fn, p_mean_var, x, t, model_kw... method condition_score (line 335) | def condition_score(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_score_with_grad (line 355) | def condition_score_with_grad(self, cond_fn, p_mean_var, x, t, model_k... method p_sample (line 375) | def p_sample( method p_sample_with_grad (line 419) | def p_sample_with_grad( method p_sample_loop (line 467) | def p_sample_loop( method p_sample_loop_progressive (line 521) | def p_sample_loop_progressive( method ddim_sample (line 586) | def ddim_sample( method ddim_sample_with_grad (line 633) | def ddim_sample_with_grad( method ddim_reverse_sample (line 686) | def ddim_reverse_sample( method ddim_sample_loop (line 719) | def ddim_sample_loop( method ddim_sample_loop_progressive (line 761) | def ddim_sample_loop_progressive( method plms_sample (line 831) | def plms_sample( method plms_sample_loop (line 915) | def plms_sample_loop( method plms_sample_loop_progressive (line 957) | def plms_sample_loop_progressive( method _vb_terms_bpd (line 1026) | def _vb_terms_bpd(self, model, x_start, x_t, t, clip_denoised=True, mo... method training_losses (line 1052) | def training_losses(self, model, x_start, t, model_kwargs=None, noise=... method _prior_bpd (line 1126) | def _prior_bpd(self, x_start): method calc_bpd_loop (line 1142) | def calc_bpd_loop(self, model, x_start, clip_denoised=True, model_kwar... function _extract_into_tensor (line 1201) | def _extract_into_tensor(arr, timesteps, broadcast_shape): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/losses.py function normal_kl (line 11) | def normal_kl(mean1, logvar1, mean2, logvar2): function approx_standard_normal_cdf (line 33) | def approx_standard_normal_cdf(x): function discretized_gaussian_log_likelihood (line 41) | def discretized_gaussian_log_likelihood(x, *, means, log_scales): function spherical_dist_loss (line 71) | def spherical_dist_loss(x, y): function tv_loss (line 77) | def tv_loss(input): function range_loss (line 85) | def range_loss(input): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/make_cutouts.py function sinc (line 17) | def sinc(x): function lanczos (line 21) | def lanczos(x, a): function ramp (line 27) | def ramp(ratio, width): class MakeCutouts (line 37) | class MakeCutouts(nn.Layer): method __init__ (line 39) | def __init__(self, cut_size, cutn, skip_augs=False): method forward (line 56) | def forward(self, input): class MakeCutoutsDango (line 81) | class MakeCutoutsDango(nn.Layer): method __init__ (line 83) | def __init__(self, cut_size, Overview=4, InnerCrop=0, IC_Size_Pow=0.5,... method forward (line 104) | def forward(self, input): function resample (line 155) | def resample(input, size, align_corners=True): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/nn.py class SiLU (line 11) | class SiLU(nn.Layer): method forward (line 13) | def forward(self, x): class GroupNorm32 (line 17) | class GroupNorm32(nn.GroupNorm): method forward (line 19) | def forward(self, x): function conv_nd (line 23) | def conv_nd(dims, *args, **kwargs): function linear (line 36) | def linear(*args, **kwargs): function avg_pool_nd (line 43) | def avg_pool_nd(dims, *args, **kwargs): function update_ema (line 56) | def update_ema(target_params, source_params, rate=0.99): function zero_module (line 69) | def zero_module(module): function scale_module (line 78) | def scale_module(module, scale): function mean_flat (line 87) | def mean_flat(tensor): function normalization (line 94) | def normalization(channels): function timestep_embedding (line 104) | def timestep_embedding(timesteps, dim, max_period=10000): function checkpoint (line 123) | def checkpoint(func, inputs, params, flag): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/perlin_noises.py function interp (line 13) | def interp(t): function perlin (line 17) | def perlin(width, height, scale=10): function perlin_ms (line 31) | def perlin_ms(octaves, width, height, grayscale): function create_perlin_noise (line 47) | def create_perlin_noise(octaves, width, height, grayscale, side_y, side_x): function regen_perlin (line 65) | def regen_perlin(perlin_mode, side_y, side_x, batch_size): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/respace.py function space_timesteps (line 11) | def space_timesteps(num_timesteps, section_counts): class SpacedDiffusion (line 63) | class SpacedDiffusion(GaussianDiffusion): method __init__ (line 72) | def __init__(self, use_timesteps, **kwargs): method p_mean_variance (line 88) | def p_mean_variance(self, model, *args, **kwargs): # pylint: disable=... method training_losses (line 91) | def training_losses(self, model, *args, **kwargs): # pylint: disable=... method condition_mean (line 94) | def condition_mean(self, cond_fn, *args, **kwargs): method condition_score (line 97) | def condition_score(self, cond_fn, *args, **kwargs): method _wrap_model (line 100) | def _wrap_model(self, model): method _scale_timesteps (line 105) | def _scale_timesteps(self, t): class _WrappedModel (line 110) | class _WrappedModel: method __init__ (line 112) | def __init__(self, model, timestep_map, rescale_timesteps, original_nu... method __call__ (line 118) | def __call__(self, x, ts, **kwargs): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/script_util.py function diffusion_defaults (line 18) | def diffusion_defaults(): function model_and_diffusion_defaults (line 34) | def model_and_diffusion_defaults(): function create_model_and_diffusion (line 59) | def create_model_and_diffusion( function create_model (line 115) | def create_model( function create_gaussian_diffusion (line 172) | def create_gaussian_diffusion( FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/sec_diff.py class DiffusionOutput (line 14) | class DiffusionOutput: class SkipBlock (line 20) | class SkipBlock(nn.Layer): method __init__ (line 22) | def __init__(self, main, skip=None): method forward (line 27) | def forward(self, input): function append_dims (line 31) | def append_dims(x, n): function expand_to_planes (line 35) | def expand_to_planes(x, shape): function alpha_sigma_to_t (line 39) | def alpha_sigma_to_t(alpha, sigma): function t_to_alpha_sigma (line 43) | def t_to_alpha_sigma(t): class SecondaryDiffusionImageNet2 (line 47) | class SecondaryDiffusionImageNet2(nn.Layer): method __init__ (line 49) | def __init__(self): method forward (line 105) | def forward(self, input, t): class FourierFeatures (line 114) | class FourierFeatures(nn.Layer): method __init__ (line 116) | def __init__(self, in_features, out_features, std=1.0): method forward (line 124) | def forward(self, input): class ConvBlock (line 129) | class ConvBlock(nn.Sequential): method __init__ (line 131) | def __init__(self, c_in, c_out): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/transforms.py class Normalize (line 25) | class Normalize(nn.Layer): method __init__ (line 27) | def __init__(self, mean, std): method forward (line 32) | def forward(self, tensor: Tensor): class InterpolationMode (line 42) | class InterpolationMode(Enum): class Grayscale (line 56) | class Grayscale(nn.Layer): method __init__ (line 58) | def __init__(self, num_output_channels): method forward (line 62) | def forward(self, x): class Lambda (line 70) | class Lambda(nn.Layer): method __init__ (line 72) | def __init__(self, func): method forward (line 76) | def forward(self, x): class RandomGrayscale (line 80) | class RandomGrayscale(nn.Layer): method __init__ (line 82) | def __init__(self, p): method forward (line 87) | def forward(self, x): class RandomHorizontalFlip (line 94) | class RandomHorizontalFlip(nn.Layer): method __init__ (line 96) | def __init__(self, prob): method forward (line 100) | def forward(self, x): function _blend (line 107) | def _blend(img1: Tensor, img2: Tensor, ratio: float) -> Tensor: function trunc_div (line 113) | def trunc_div(a, b): function fmod (line 122) | def fmod(a, b): function _rgb2hsv (line 126) | def _rgb2hsv(img: Tensor) -> Tensor: function _hsv2rgb (line 165) | def _hsv2rgb(img: Tensor) -> Tensor: function adjust_brightness (line 186) | def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: function adjust_contrast (line 193) | def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: function adjust_hue (line 209) | def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: function adjust_saturation (line 221) | def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: class ColorJitter (line 230) | class ColorJitter(nn.Layer): method __init__ (line 232) | def __init__(self, brightness=0, contrast=0, saturation=0, hue=0): method _check_input (line 239) | def _check_input(self, value, name, center=1, bound=(0, float("inf")),... method get_params (line 259) | def get_params( method forward (line 290) | def forward(self, img): method __repr__ (line 313) | def __repr__(self) -> str: function _apply_grid_transform (line 322) | def _apply_grid_transform(img: Tensor, grid: Tensor, mode: str, fill: Op... function _gen_affine_grid (line 350) | def _gen_affine_grid( function affine_impl (line 375) | def affine_impl(img: Tensor, function _get_inverse_affine_matrix (line 386) | def _get_inverse_affine_matrix(center: List[float], function affine (line 449) | def affine( function _interpolation_modes_from_int (line 558) | def _interpolation_modes_from_int(i: int) -> InterpolationMode: function _check_sequence_input (line 570) | def _check_sequence_input(x, name, req_sizes): function _setup_angle (line 578) | def _setup_angle(x, name, req_sizes=(2, )): class RandomAffine (line 589) | class RandomAffine(nn.Layer): method __init__ (line 631) | def __init__( method get_params (line 696) | def get_params( method forward (line 733) | def forward(self, img): method __repr__ (line 747) | def __repr__(self) -> str: FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/model/unet.py class AttentionPool2d (line 23) | class AttentionPool2d(nn.Layer): method __init__ (line 28) | def __init__( method forward (line 46) | def forward(self, x): class TimestepBlock (line 58) | class TimestepBlock(nn.Layer): method forward (line 64) | def forward(self, x, emb): class TimestepEmbedSequential (line 70) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 76) | def forward(self, x, emb): class Upsample (line 85) | class Upsample(nn.Layer): method __init__ (line 95) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 104) | def forward(self, x): class Downsample (line 115) | class Downsample(nn.Layer): method __init__ (line 125) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 138) | def forward(self, x): class ResBlock (line 143) | class ResBlock(TimestepBlock): method __init__ (line 160) | def __init__( method forward (line 220) | def forward(self, x, emb): method _forward (line 230) | def _forward(self, x, emb): class AttentionBlock (line 254) | class AttentionBlock(nn.Layer): method __init__ (line 262) | def __init__( method forward (line 290) | def forward(self, x): method _forward (line 293) | def _forward(self, x): function count_flops_attn (line 304) | def count_flops_attn(model, _x, y): class QKVAttentionLegacy (line 324) | class QKVAttentionLegacy(nn.Layer): method __init__ (line 329) | def __init__(self, n_heads): method forward (line 333) | def forward(self, qkv): method count_flops (line 353) | def count_flops(model, _x, y): class QKVAttention (line 357) | class QKVAttention(nn.Layer): method __init__ (line 362) | def __init__(self, n_heads): method forward (line 366) | def forward(self, qkv): method count_flops (line 389) | def count_flops(model, _x, y): class UNetModel (line 393) | class UNetModel(nn.Layer): method __init__ (line 424) | def __init__( method forward (line 602) | def forward(self, x, timesteps, y=None): class SuperResModel (line 632) | class SuperResModel(UNetModel): method __init__ (line 639) | def __init__(self, image_size, in_channels, *args, **kwargs): method forward (line 642) | def forward(self, x, timesteps, low_res=None, **kwargs): class EncoderUNetModel (line 649) | class EncoderUNetModel(nn.Layer): method __init__ (line 656) | def __init__( method forward (line 812) | def forward(self, x, timesteps): FILE: modules/image/text_to_image/disco_diffusion_clip_rn50/reverse_diffusion/runner.py function do_run (line 32) | def do_run(args, models) -> 'DocumentArray': function _silent_push (line 281) | def _silent_push(da_batches: DocumentArray, name: str) -> None: FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/clip/clip/layers.py function multi_head_attention_forward (line 12) | def multi_head_attention_forward(x: Tensor, class MultiHeadAttention (line 47) | class MultiHeadAttention(nn.Layer): # without attention mask method __init__ (line 49) | def __init__(self, emb_dim: int, num_heads: int): method forward (line 61) | def forward(self, x, attn_mask=None): # x is in shape[max_len,batch_s... class Identity (line 74) | class Identity(nn.Layer): method __init__ (line 76) | def __init__(self): method forward (line 79) | def forward(self, x): class Bottleneck (line 83) | class Bottleneck(nn.Layer): method __init__ (line 86) | def __init__(self, inplanes, planes, stride=1): method forward (line 111) | def forward(self, x): class AttentionPool2d (line 127) | class AttentionPool2d(nn.Layer): method __init__ (line 129) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 143) | def forward(self, x): class QuickGELU (line 155) | class QuickGELU(nn.Layer): method forward (line 157) | def forward(self, x): class ResidualAttentionBlock (line 161) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 163) | def __init__(self, d_model: int, n_head: int, attn_mask=None): method attention (line 173) | def attention(self, x): method forward (line 178) | def forward(self, x): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/clip/clip/model.py class ModifiedResNet (line 15) | class ModifiedResNet(nn.Layer): method __init__ (line 23) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 48) | def _make_layer(self, planes, blocks, stride=1): method forward (line 57) | def forward(self, x): class Transformer (line 76) | class Transformer(nn.Layer): method __init__ (line 78) | def __init__(self, width: int, layers: int, heads: int, attn_mask=None): method forward (line 84) | def forward(self, x): class VisualTransformer (line 88) | class VisualTransformer(nn.Layer): method __init__ (line 90) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 113) | def forward(self, x): class CLIP (line 132) | class CLIP(nn.Layer): method __init__ (line 134) | def __init__( method build_attention_mask (line 180) | def build_attention_mask(self): method encode_image (line 191) | def encode_image(self, image): method encode_text (line 194) | def encode_text(self, text): method forward (line 213) | def forward(self, image, text): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/clip/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 64) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 83) | def bpe(self, token): method encode (line 124) | def encode(self, text): method decode (line 132) | def decode(self, tokens): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/clip/clip/utils.py function tokenize (line 38) | def tokenize(texts: Union[str, List[str]], context_length: int = 77): function build_model (line 70) | def build_model(name='VIT32'): function build_vit_model (line 81) | def build_vit_model(): function build_rn101_model (line 96) | def build_rn101_model(): function build_rn50_model (line 111) | def build_rn50_model(): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/module.py class DiscoDiffusionClip (line 39) | class DiscoDiffusionClip: method generate_image (line 41) | def generate_image(self, method serving_method (line 173) | def serving_method(self, text_prompts, **kwargs): method run_cmd (line 181) | def run_cmd(self, argvs): method add_module_config_arg (line 230) | def add_module_config_arg(self): method add_module_input_arg (line 391) | def add_module_input_arg(self): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/resize_right/interp_methods.py function set_framework_dependencies (line 18) | def set_framework_dependencies(x): function support_sz (line 30) | def support_sz(sz): function cubic (line 40) | def cubic(x): function lanczos2 (line 50) | def lanczos2(x): function lanczos3 (line 56) | def lanczos3(x): function linear (line 62) | def linear(x): function box (line 68) | def box(x): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/resize_right/resize_right.py class NoneClass (line 9) | class NoneClass: function resize (line 33) | def resize(input, function get_projected_grid (line 111) | def get_projected_grid(in_sz, out_sz, scale_factor, fw, by_convs, device... function get_field_of_view (line 125) | def get_field_of_view(projected_grid, cur_support_sz, fw, eps, device): function calc_pad_sz (line 137) | def calc_pad_sz(in_sz, out_sz, field_of_view, projected_grid, scale_fact... function get_weights (line 186) | def get_weights(interp_method, projected_grid, field_of_view): function apply_weights (line 199) | def apply_weights(input, field_of_view, weights, dim, n_dims, pad_sz, pa... function apply_convs (line 232) | def apply_convs(input, scale_factor, in_sz, out_sz, weights, dim, pad_sz... function set_scale_and_out_sz (line 260) | def set_scale_and_out_sz(in_shape, out_shape, scale_factors, by_convs, s... function apply_antialiasing_if_needed (line 315) | def apply_antialiasing_if_needed(interp_method, support_sz, scale_factor... function fw_ceil (line 328) | def fw_ceil(x, fw): function fw_floor (line 335) | def fw_floor(x, fw): function fw_cat (line 342) | def fw_cat(x, fw): function fw_swapaxes (line 349) | def fw_swapaxes(x, ax_1, ax_2, fw): function fw_pad (line 364) | def fw_pad(x, fw, pad_sz, pad_mode, dim=0): function fw_conv (line 380) | def fw_conv(input, filter, stride): function fw_arange (line 392) | def fw_arange(upper_bound, fw, device): function fw_empty (line 399) | def fw_empty(shape, fw, device): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/__init__.py function create (line 40) | def create(text_prompts: Optional[List[str]] = [ function create (line 118) | def create(init_document: 'Document') -> 'DocumentArray': function create (line 126) | def create(**kwargs) -> 'DocumentArray': FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/config.py function load_config (line 19) | def load_config(user_config: Dict, ): function print_args_table (line 53) | def print_args_table(cfg): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/helper.py function _get_logger (line 19) | def _get_logger(): function load_clip_models (line 33) | def load_clip_models(enabled: List[str], clip_models: Dict[str, Any] = {}): function load_all_models (line 54) | def load_all_models(diffusion_model, use_secondary_model): function load_diffusion_model (line 109) | def load_diffusion_model(model_config, diffusion_model, steps): function parse_prompt (line 130) | def parse_prompt(prompt): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/gaussian_diffusion.py function get_named_beta_schedule (line 17) | def get_named_beta_schedule(schedule_name, num_diffusion_timesteps): function betas_for_alpha_bar (line 42) | def betas_for_alpha_bar(num_diffusion_timesteps, alpha_bar, max_beta=0.9... class ModelMeanType (line 62) | class ModelMeanType(enum.Enum): class ModelVarType (line 72) | class ModelVarType(enum.Enum): class LossType (line 86) | class LossType(enum.Enum): method is_vb (line 92) | def is_vb(self): class GaussianDiffusion (line 96) | class GaussianDiffusion: method __init__ (line 113) | def __init__( method q_mean_variance (line 156) | def q_mean_variance(self, x_start, t): method q_sample (line 169) | def q_sample(self, x_start, t, noise=None): method q_posterior_mean_variance (line 187) | def q_posterior_mean_variance(self, x_start, x_t, t): method p_mean_variance (line 203) | def p_mean_variance(self, model, x, t, clip_denoised=True, denoised_fn... method _predict_xstart_from_eps (line 287) | def _predict_xstart_from_eps(self, x_t, t, eps): method _predict_xstart_from_xprev (line 292) | def _predict_xstart_from_xprev(self, x_t, t, xprev): method _predict_eps_from_xstart (line 298) | def _predict_eps_from_xstart(self, x_t, t, pred_xstart): method _scale_timesteps (line 302) | def _scale_timesteps(self, t): method condition_mean (line 307) | def condition_mean(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_mean_with_grad (line 321) | def condition_mean_with_grad(self, cond_fn, p_mean_var, x, t, model_kw... method condition_score (line 335) | def condition_score(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_score_with_grad (line 355) | def condition_score_with_grad(self, cond_fn, p_mean_var, x, t, model_k... method p_sample (line 375) | def p_sample( method p_sample_with_grad (line 419) | def p_sample_with_grad( method p_sample_loop (line 467) | def p_sample_loop( method p_sample_loop_progressive (line 521) | def p_sample_loop_progressive( method ddim_sample (line 586) | def ddim_sample( method ddim_sample_with_grad (line 633) | def ddim_sample_with_grad( method ddim_reverse_sample (line 686) | def ddim_reverse_sample( method ddim_sample_loop (line 719) | def ddim_sample_loop( method ddim_sample_loop_progressive (line 761) | def ddim_sample_loop_progressive( method plms_sample (line 831) | def plms_sample( method plms_sample_loop (line 915) | def plms_sample_loop( method plms_sample_loop_progressive (line 957) | def plms_sample_loop_progressive( method _vb_terms_bpd (line 1026) | def _vb_terms_bpd(self, model, x_start, x_t, t, clip_denoised=True, mo... method training_losses (line 1052) | def training_losses(self, model, x_start, t, model_kwargs=None, noise=... method _prior_bpd (line 1126) | def _prior_bpd(self, x_start): method calc_bpd_loop (line 1142) | def calc_bpd_loop(self, model, x_start, clip_denoised=True, model_kwar... function _extract_into_tensor (line 1201) | def _extract_into_tensor(arr, timesteps, broadcast_shape): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/losses.py function normal_kl (line 11) | def normal_kl(mean1, logvar1, mean2, logvar2): function approx_standard_normal_cdf (line 33) | def approx_standard_normal_cdf(x): function discretized_gaussian_log_likelihood (line 41) | def discretized_gaussian_log_likelihood(x, *, means, log_scales): function spherical_dist_loss (line 71) | def spherical_dist_loss(x, y): function tv_loss (line 77) | def tv_loss(input): function range_loss (line 85) | def range_loss(input): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/make_cutouts.py function sinc (line 17) | def sinc(x): function lanczos (line 21) | def lanczos(x, a): function ramp (line 27) | def ramp(ratio, width): class MakeCutouts (line 37) | class MakeCutouts(nn.Layer): method __init__ (line 39) | def __init__(self, cut_size, cutn, skip_augs=False): method forward (line 56) | def forward(self, input): class MakeCutoutsDango (line 81) | class MakeCutoutsDango(nn.Layer): method __init__ (line 83) | def __init__(self, cut_size, Overview=4, InnerCrop=0, IC_Size_Pow=0.5,... method forward (line 104) | def forward(self, input): function resample (line 155) | def resample(input, size, align_corners=True): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/nn.py class SiLU (line 11) | class SiLU(nn.Layer): method forward (line 13) | def forward(self, x): class GroupNorm32 (line 17) | class GroupNorm32(nn.GroupNorm): method forward (line 19) | def forward(self, x): function conv_nd (line 23) | def conv_nd(dims, *args, **kwargs): function linear (line 36) | def linear(*args, **kwargs): function avg_pool_nd (line 43) | def avg_pool_nd(dims, *args, **kwargs): function update_ema (line 56) | def update_ema(target_params, source_params, rate=0.99): function zero_module (line 69) | def zero_module(module): function scale_module (line 78) | def scale_module(module, scale): function mean_flat (line 87) | def mean_flat(tensor): function normalization (line 94) | def normalization(channels): function timestep_embedding (line 104) | def timestep_embedding(timesteps, dim, max_period=10000): function checkpoint (line 123) | def checkpoint(func, inputs, params, flag): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/perlin_noises.py function interp (line 13) | def interp(t): function perlin (line 17) | def perlin(width, height, scale=10): function perlin_ms (line 31) | def perlin_ms(octaves, width, height, grayscale): function create_perlin_noise (line 47) | def create_perlin_noise(octaves, width, height, grayscale, side_y, side_x): function regen_perlin (line 65) | def regen_perlin(perlin_mode, side_y, side_x, batch_size): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/respace.py function space_timesteps (line 11) | def space_timesteps(num_timesteps, section_counts): class SpacedDiffusion (line 63) | class SpacedDiffusion(GaussianDiffusion): method __init__ (line 72) | def __init__(self, use_timesteps, **kwargs): method p_mean_variance (line 88) | def p_mean_variance(self, model, *args, **kwargs): # pylint: disable=... method training_losses (line 91) | def training_losses(self, model, *args, **kwargs): # pylint: disable=... method condition_mean (line 94) | def condition_mean(self, cond_fn, *args, **kwargs): method condition_score (line 97) | def condition_score(self, cond_fn, *args, **kwargs): method _wrap_model (line 100) | def _wrap_model(self, model): method _scale_timesteps (line 105) | def _scale_timesteps(self, t): class _WrappedModel (line 110) | class _WrappedModel: method __init__ (line 112) | def __init__(self, model, timestep_map, rescale_timesteps, original_nu... method __call__ (line 118) | def __call__(self, x, ts, **kwargs): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/script_util.py function diffusion_defaults (line 18) | def diffusion_defaults(): function model_and_diffusion_defaults (line 34) | def model_and_diffusion_defaults(): function create_model_and_diffusion (line 59) | def create_model_and_diffusion( function create_model (line 115) | def create_model( function create_gaussian_diffusion (line 172) | def create_gaussian_diffusion( FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/sec_diff.py class DiffusionOutput (line 14) | class DiffusionOutput: class SkipBlock (line 20) | class SkipBlock(nn.Layer): method __init__ (line 22) | def __init__(self, main, skip=None): method forward (line 27) | def forward(self, input): function append_dims (line 31) | def append_dims(x, n): function expand_to_planes (line 35) | def expand_to_planes(x, shape): function alpha_sigma_to_t (line 39) | def alpha_sigma_to_t(alpha, sigma): function t_to_alpha_sigma (line 43) | def t_to_alpha_sigma(t): class SecondaryDiffusionImageNet2 (line 47) | class SecondaryDiffusionImageNet2(nn.Layer): method __init__ (line 49) | def __init__(self): method forward (line 105) | def forward(self, input, t): class FourierFeatures (line 114) | class FourierFeatures(nn.Layer): method __init__ (line 116) | def __init__(self, in_features, out_features, std=1.0): method forward (line 124) | def forward(self, input): class ConvBlock (line 129) | class ConvBlock(nn.Sequential): method __init__ (line 131) | def __init__(self, c_in, c_out): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/transforms.py class Normalize (line 25) | class Normalize(nn.Layer): method __init__ (line 27) | def __init__(self, mean, std): method forward (line 32) | def forward(self, tensor: Tensor): class InterpolationMode (line 42) | class InterpolationMode(Enum): class Grayscale (line 56) | class Grayscale(nn.Layer): method __init__ (line 58) | def __init__(self, num_output_channels): method forward (line 62) | def forward(self, x): class Lambda (line 70) | class Lambda(nn.Layer): method __init__ (line 72) | def __init__(self, func): method forward (line 76) | def forward(self, x): class RandomGrayscale (line 80) | class RandomGrayscale(nn.Layer): method __init__ (line 82) | def __init__(self, p): method forward (line 87) | def forward(self, x): class RandomHorizontalFlip (line 94) | class RandomHorizontalFlip(nn.Layer): method __init__ (line 96) | def __init__(self, prob): method forward (line 100) | def forward(self, x): function _blend (line 107) | def _blend(img1: Tensor, img2: Tensor, ratio: float) -> Tensor: function trunc_div (line 113) | def trunc_div(a, b): function fmod (line 122) | def fmod(a, b): function _rgb2hsv (line 126) | def _rgb2hsv(img: Tensor) -> Tensor: function _hsv2rgb (line 165) | def _hsv2rgb(img: Tensor) -> Tensor: function adjust_brightness (line 186) | def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: function adjust_contrast (line 193) | def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: function adjust_hue (line 209) | def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: function adjust_saturation (line 221) | def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: class ColorJitter (line 230) | class ColorJitter(nn.Layer): method __init__ (line 232) | def __init__(self, brightness=0, contrast=0, saturation=0, hue=0): method _check_input (line 239) | def _check_input(self, value, name, center=1, bound=(0, float("inf")),... method get_params (line 259) | def get_params( method forward (line 290) | def forward(self, img): method __repr__ (line 313) | def __repr__(self) -> str: function _apply_grid_transform (line 322) | def _apply_grid_transform(img: Tensor, grid: Tensor, mode: str, fill: Op... function _gen_affine_grid (line 350) | def _gen_affine_grid( function affine_impl (line 375) | def affine_impl(img: Tensor, function _get_inverse_affine_matrix (line 386) | def _get_inverse_affine_matrix(center: List[float], function affine (line 449) | def affine( function _interpolation_modes_from_int (line 558) | def _interpolation_modes_from_int(i: int) -> InterpolationMode: function _check_sequence_input (line 570) | def _check_sequence_input(x, name, req_sizes): function _setup_angle (line 578) | def _setup_angle(x, name, req_sizes=(2, )): class RandomAffine (line 589) | class RandomAffine(nn.Layer): method __init__ (line 631) | def __init__( method get_params (line 696) | def get_params( method forward (line 733) | def forward(self, img): method __repr__ (line 747) | def __repr__(self) -> str: FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/model/unet.py class AttentionPool2d (line 23) | class AttentionPool2d(nn.Layer): method __init__ (line 28) | def __init__( method forward (line 46) | def forward(self, x): class TimestepBlock (line 58) | class TimestepBlock(nn.Layer): method forward (line 64) | def forward(self, x, emb): class TimestepEmbedSequential (line 70) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 76) | def forward(self, x, emb): class Upsample (line 85) | class Upsample(nn.Layer): method __init__ (line 95) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 104) | def forward(self, x): class Downsample (line 115) | class Downsample(nn.Layer): method __init__ (line 125) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 138) | def forward(self, x): class ResBlock (line 143) | class ResBlock(TimestepBlock): method __init__ (line 160) | def __init__( method forward (line 220) | def forward(self, x, emb): method _forward (line 230) | def _forward(self, x, emb): class AttentionBlock (line 254) | class AttentionBlock(nn.Layer): method __init__ (line 262) | def __init__( method forward (line 290) | def forward(self, x): method _forward (line 293) | def _forward(self, x): function count_flops_attn (line 304) | def count_flops_attn(model, _x, y): class QKVAttentionLegacy (line 324) | class QKVAttentionLegacy(nn.Layer): method __init__ (line 329) | def __init__(self, n_heads): method forward (line 333) | def forward(self, qkv): method count_flops (line 353) | def count_flops(model, _x, y): class QKVAttention (line 357) | class QKVAttention(nn.Layer): method __init__ (line 362) | def __init__(self, n_heads): method forward (line 366) | def forward(self, qkv): method count_flops (line 389) | def count_flops(model, _x, y): class UNetModel (line 393) | class UNetModel(nn.Layer): method __init__ (line 424) | def __init__( method forward (line 602) | def forward(self, x, timesteps, y=None): class SuperResModel (line 632) | class SuperResModel(UNetModel): method __init__ (line 639) | def __init__(self, image_size, in_channels, *args, **kwargs): method forward (line 642) | def forward(self, x, timesteps, low_res=None, **kwargs): class EncoderUNetModel (line 649) | class EncoderUNetModel(nn.Layer): method __init__ (line 656) | def __init__( method forward (line 812) | def forward(self, x, timesteps): FILE: modules/image/text_to_image/disco_diffusion_clip_vitb32/reverse_diffusion/runner.py function do_run (line 32) | def do_run(args, models) -> 'DocumentArray': function _silent_push (line 281) | def _silent_push(da_batches: DocumentArray, name: str) -> None: FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/cn_clip/clip/bert_tokenizer.py function default_vocab (line 30) | def default_vocab(): function validate_case_matches_checkpoint (line 34) | def validate_case_matches_checkpoint(do_lower_case, init_checkpoint): function convert_to_unicode (line 79) | def convert_to_unicode(text): function printable_text (line 99) | def printable_text(text): function load_vocab (line 122) | def load_vocab(vocab_file): function convert_by_vocab (line 137) | def convert_by_vocab(vocab, items): function convert_tokens_to_ids (line 145) | def convert_tokens_to_ids(vocab, tokens): function convert_ids_to_tokens (line 149) | def convert_ids_to_tokens(inv_vocab, ids): function whitespace_tokenize (line 153) | def whitespace_tokenize(text): class FullTokenizer (line 162) | class FullTokenizer(object): method __init__ (line 165) | def __init__(self, vocab_file=default_vocab(), do_lower_case=True): method tokenize (line 171) | def tokenize(self, text): method convert_tokens_to_ids (line 179) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 182) | def convert_ids_to_tokens(self, ids): method convert_tokens_to_string (line 186) | def convert_tokens_to_string(tokens, clean_up_tokenization_spaces=True): method vocab_size (line 210) | def vocab_size(self): class BasicTokenizer (line 214) | class BasicTokenizer(object): method __init__ (line 217) | def __init__(self, do_lower_case=True): method tokenize (line 225) | def tokenize(self, text): method _run_strip_accents (line 249) | def _run_strip_accents(self, text): method _run_split_on_punc (line 260) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 280) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 293) | def _is_chinese_char(self, cp): method _clean_text (line 314) | def _clean_text(self, text): class WordpieceTokenizer (line 328) | class WordpieceTokenizer(object): method __init__ (line 331) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 336) | def tokenize(self, text): function _is_whitespace (line 390) | def _is_whitespace(char): function _is_control (line 402) | def _is_control(char): function _is_punctuation (line 414) | def _is_punctuation(char): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/cn_clip/clip/configuration_bert.py class BertConfig (line 27) | class BertConfig(object): method __init__ (line 57) | def __init__(self, FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/cn_clip/clip/model.py class Bottleneck (line 15) | class Bottleneck(nn.Layer): method __init__ (line 18) | def __init__(self, inplanes, planes, stride=1): method forward (line 44) | def forward(self, x: paddle.Tensor): class QuickGELU (line 60) | class QuickGELU(nn.Layer): method forward (line 62) | def forward(self, x: paddle.Tensor): class ResidualAttentionBlock (line 66) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 68) | def __init__(self, d_model: int, n_head: int, attn_mask: paddle.Tensor... method attention (line 77) | def attention(self, x: paddle.Tensor): method forward (line 81) | def forward(self, x: paddle.Tensor): class Transformer (line 87) | class Transformer(nn.Layer): method __init__ (line 89) | def __init__(self, width: int, layers: int, heads: int, attn_mask: pad... method forward (line 95) | def forward(self, x: paddle.Tensor): class VisualTransformer (line 99) | class VisualTransformer(nn.Layer): method __init__ (line 101) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 127) | def forward(self, x: paddle.Tensor): class CLIP (line 146) | class CLIP(nn.Layer): method __init__ (line 148) | def __init__( method dtype (line 204) | def dtype(self): method encode_image (line 207) | def encode_image(self, image): method encode_text (line 210) | def encode_text(self, text): method forward (line 218) | def forward(self, image, text): method get_similarity (line 233) | def get_similarity(self, image, text): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/cn_clip/clip/modeling_bert.py function gelu (line 37) | def gelu(x): function gelu_new (line 46) | def gelu_new(x): function swish (line 53) | def swish(x): class BertEmbeddings (line 62) | class BertEmbeddings(nn.Layer): method __init__ (line 66) | def __init__(self, config): method forward (line 77) | def forward(self, input_ids, token_type_ids=None, position_ids=None): class BertSelfAttention (line 98) | class BertSelfAttention(nn.Layer): method __init__ (line 100) | def __init__(self, config): method transpose_for_scores (line 117) | def transpose_for_scores(self, x): method forward (line 122) | def forward(self, hidden_states, attention_mask=None, head_mask=None): class BertSelfOutput (line 159) | class BertSelfOutput(nn.Layer): method __init__ (line 161) | def __init__(self, config): method forward (line 167) | def forward(self, hidden_states, input_tensor): class BertAttention (line 174) | class BertAttention(nn.Layer): method __init__ (line 176) | def __init__(self, config): method forward (line 182) | def forward(self, input_tensor, attention_mask=None, head_mask=None): class BertIntermediate (line 189) | class BertIntermediate(nn.Layer): method __init__ (line 191) | def __init__(self, config): method forward (line 199) | def forward(self, hidden_states): class BertOutput (line 205) | class BertOutput(nn.Layer): method __init__ (line 207) | def __init__(self, config): method forward (line 213) | def forward(self, hidden_states, input_tensor): class BertLayer (line 220) | class BertLayer(nn.Layer): method __init__ (line 222) | def __init__(self, config): method forward (line 228) | def forward(self, hidden_states, attention_mask=None, head_mask=None): class BertEncoder (line 237) | class BertEncoder(nn.Layer): method __init__ (line 239) | def __init__(self, config): method forward (line 245) | def forward(self, hidden_states, attention_mask=None, head_mask=None): class BertPooler (line 269) | class BertPooler(nn.Layer): method __init__ (line 271) | def __init__(self, config): method forward (line 276) | def forward(self, hidden_states): class BertPredictionHeadTransform (line 285) | class BertPredictionHeadTransform(nn.Layer): method __init__ (line 287) | def __init__(self, config): method forward (line 296) | def forward(self, hidden_states): class BertLMPredictionHead (line 303) | class BertLMPredictionHead(nn.Layer): method __init__ (line 305) | def __init__(self, config): method forward (line 315) | def forward(self, hidden_states): class BertOnlyMLMHead (line 321) | class BertOnlyMLMHead(nn.Layer): method __init__ (line 323) | def __init__(self, config): method forward (line 327) | def forward(self, sequence_output): class BertOnlyNSPHead (line 332) | class BertOnlyNSPHead(nn.Layer): method __init__ (line 334) | def __init__(self, config): method forward (line 338) | def forward(self, pooled_output): class BertPreTrainingHeads (line 343) | class BertPreTrainingHeads(nn.Layer): method __init__ (line 345) | def __init__(self, config): method forward (line 350) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 356) | class BertPreTrainedModel(nn.Layer): method __init__ (line 360) | def __init__(self, config): class BertModel (line 365) | class BertModel(BertPreTrainedModel): method __init__ (line 395) | def __init__(self, config): method forward (line 402) | def forward(self, input_ids, attention_mask=None, token_type_ids=None,... FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/cn_clip/clip/utils.py function available_models (line 18) | def available_models() -> List[str]: function tokenize (line 23) | def tokenize(texts: Union[str, List[str]], context_length: int = 64): function create_model (line 54) | def create_model(name): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/module.py class DiscoDiffusionClip (line 38) | class DiscoDiffusionClip: method generate_image (line 40) | def generate_image(self, method serving_method (line 172) | def serving_method(self, text_prompts, **kwargs): method run_cmd (line 180) | def run_cmd(self, argvs): method add_module_config_arg (line 229) | def add_module_config_arg(self): method add_module_input_arg (line 390) | def add_module_input_arg(self): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/resize_right/interp_methods.py function set_framework_dependencies (line 18) | def set_framework_dependencies(x): function support_sz (line 30) | def support_sz(sz): function cubic (line 40) | def cubic(x): function lanczos2 (line 50) | def lanczos2(x): function lanczos3 (line 56) | def lanczos3(x): function linear (line 62) | def linear(x): function box (line 68) | def box(x): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/resize_right/resize_right.py class NoneClass (line 9) | class NoneClass: function resize (line 33) | def resize(input, function get_projected_grid (line 111) | def get_projected_grid(in_sz, out_sz, scale_factor, fw, by_convs, device... function get_field_of_view (line 125) | def get_field_of_view(projected_grid, cur_support_sz, fw, eps, device): function calc_pad_sz (line 137) | def calc_pad_sz(in_sz, out_sz, field_of_view, projected_grid, scale_fact... function get_weights (line 186) | def get_weights(interp_method, projected_grid, field_of_view): function apply_weights (line 199) | def apply_weights(input, field_of_view, weights, dim, n_dims, pad_sz, pa... function apply_convs (line 232) | def apply_convs(input, scale_factor, in_sz, out_sz, weights, dim, pad_sz... function set_scale_and_out_sz (line 260) | def set_scale_and_out_sz(in_shape, out_shape, scale_factors, by_convs, s... function apply_antialiasing_if_needed (line 315) | def apply_antialiasing_if_needed(interp_method, support_sz, scale_factor... function fw_ceil (line 328) | def fw_ceil(x, fw): function fw_floor (line 335) | def fw_floor(x, fw): function fw_cat (line 342) | def fw_cat(x, fw): function fw_swapaxes (line 349) | def fw_swapaxes(x, ax_1, ax_2, fw): function fw_pad (line 364) | def fw_pad(x, fw, pad_sz, pad_mode, dim=0): function fw_conv (line 380) | def fw_conv(input, filter, stride): function fw_arange (line 392) | def fw_arange(upper_bound, fw, device): function fw_empty (line 399) | def fw_empty(shape, fw, device): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/__init__.py function create (line 40) | def create(text_prompts: Optional[List[str]] = [ function create (line 118) | def create(init_document: 'Document') -> 'DocumentArray': function create (line 126) | def create(**kwargs) -> 'DocumentArray': FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/config.py function load_config (line 19) | def load_config(user_config: Dict, ): function print_args_table (line 53) | def print_args_table(cfg): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/helper.py function _get_logger (line 19) | def _get_logger(): function load_clip_models (line 34) | def load_clip_models(enabled: List[str], clip_models: Dict[str, Any] = {}): function load_all_models (line 55) | def load_all_models(diffusion_model, use_secondary_model): function load_diffusion_model (line 110) | def load_diffusion_model(model_config, diffusion_model, steps): function parse_prompt (line 131) | def parse_prompt(prompt): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/gaussian_diffusion.py function get_named_beta_schedule (line 17) | def get_named_beta_schedule(schedule_name, num_diffusion_timesteps): function betas_for_alpha_bar (line 42) | def betas_for_alpha_bar(num_diffusion_timesteps, alpha_bar, max_beta=0.9... class ModelMeanType (line 62) | class ModelMeanType(enum.Enum): class ModelVarType (line 72) | class ModelVarType(enum.Enum): class LossType (line 86) | class LossType(enum.Enum): method is_vb (line 92) | def is_vb(self): class GaussianDiffusion (line 96) | class GaussianDiffusion: method __init__ (line 113) | def __init__( method q_mean_variance (line 156) | def q_mean_variance(self, x_start, t): method q_sample (line 169) | def q_sample(self, x_start, t, noise=None): method q_posterior_mean_variance (line 187) | def q_posterior_mean_variance(self, x_start, x_t, t): method p_mean_variance (line 203) | def p_mean_variance(self, model, x, t, clip_denoised=True, denoised_fn... method _predict_xstart_from_eps (line 287) | def _predict_xstart_from_eps(self, x_t, t, eps): method _predict_xstart_from_xprev (line 292) | def _predict_xstart_from_xprev(self, x_t, t, xprev): method _predict_eps_from_xstart (line 298) | def _predict_eps_from_xstart(self, x_t, t, pred_xstart): method _scale_timesteps (line 302) | def _scale_timesteps(self, t): method condition_mean (line 307) | def condition_mean(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_mean_with_grad (line 321) | def condition_mean_with_grad(self, cond_fn, p_mean_var, x, t, model_kw... method condition_score (line 335) | def condition_score(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_score_with_grad (line 355) | def condition_score_with_grad(self, cond_fn, p_mean_var, x, t, model_k... method p_sample (line 375) | def p_sample( method p_sample_with_grad (line 419) | def p_sample_with_grad( method p_sample_loop (line 467) | def p_sample_loop( method p_sample_loop_progressive (line 521) | def p_sample_loop_progressive( method ddim_sample (line 586) | def ddim_sample( method ddim_sample_with_grad (line 633) | def ddim_sample_with_grad( method ddim_reverse_sample (line 686) | def ddim_reverse_sample( method ddim_sample_loop (line 719) | def ddim_sample_loop( method ddim_sample_loop_progressive (line 761) | def ddim_sample_loop_progressive( method plms_sample (line 831) | def plms_sample( method plms_sample_loop (line 915) | def plms_sample_loop( method plms_sample_loop_progressive (line 957) | def plms_sample_loop_progressive( method _vb_terms_bpd (line 1026) | def _vb_terms_bpd(self, model, x_start, x_t, t, clip_denoised=True, mo... method training_losses (line 1052) | def training_losses(self, model, x_start, t, model_kwargs=None, noise=... method _prior_bpd (line 1126) | def _prior_bpd(self, x_start): method calc_bpd_loop (line 1142) | def calc_bpd_loop(self, model, x_start, clip_denoised=True, model_kwar... function _extract_into_tensor (line 1201) | def _extract_into_tensor(arr, timesteps, broadcast_shape): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/losses.py function normal_kl (line 11) | def normal_kl(mean1, logvar1, mean2, logvar2): function approx_standard_normal_cdf (line 33) | def approx_standard_normal_cdf(x): function discretized_gaussian_log_likelihood (line 41) | def discretized_gaussian_log_likelihood(x, *, means, log_scales): function spherical_dist_loss (line 71) | def spherical_dist_loss(x, y): function tv_loss (line 77) | def tv_loss(input): function range_loss (line 85) | def range_loss(input): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/make_cutouts.py function sinc (line 17) | def sinc(x): function lanczos (line 21) | def lanczos(x, a): function ramp (line 27) | def ramp(ratio, width): class MakeCutouts (line 37) | class MakeCutouts(nn.Layer): method __init__ (line 39) | def __init__(self, cut_size, cutn, skip_augs=False): method forward (line 56) | def forward(self, input): class MakeCutoutsDango (line 81) | class MakeCutoutsDango(nn.Layer): method __init__ (line 83) | def __init__(self, cut_size, Overview=4, InnerCrop=0, IC_Size_Pow=0.5,... method forward (line 104) | def forward(self, input): function resample (line 155) | def resample(input, size, align_corners=True): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/nn.py class SiLU (line 11) | class SiLU(nn.Layer): method forward (line 13) | def forward(self, x): class GroupNorm32 (line 17) | class GroupNorm32(nn.GroupNorm): method forward (line 19) | def forward(self, x): function conv_nd (line 23) | def conv_nd(dims, *args, **kwargs): function linear (line 36) | def linear(*args, **kwargs): function avg_pool_nd (line 43) | def avg_pool_nd(dims, *args, **kwargs): function update_ema (line 56) | def update_ema(target_params, source_params, rate=0.99): function zero_module (line 69) | def zero_module(module): function scale_module (line 78) | def scale_module(module, scale): function mean_flat (line 87) | def mean_flat(tensor): function normalization (line 94) | def normalization(channels): function timestep_embedding (line 104) | def timestep_embedding(timesteps, dim, max_period=10000): function checkpoint (line 123) | def checkpoint(func, inputs, params, flag): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/perlin_noises.py function interp (line 13) | def interp(t): function perlin (line 17) | def perlin(width, height, scale=10): function perlin_ms (line 31) | def perlin_ms(octaves, width, height, grayscale): function create_perlin_noise (line 47) | def create_perlin_noise(octaves, width, height, grayscale, side_y, side_x): function regen_perlin (line 65) | def regen_perlin(perlin_mode, side_y, side_x, batch_size): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/respace.py function space_timesteps (line 11) | def space_timesteps(num_timesteps, section_counts): class SpacedDiffusion (line 63) | class SpacedDiffusion(GaussianDiffusion): method __init__ (line 72) | def __init__(self, use_timesteps, **kwargs): method p_mean_variance (line 88) | def p_mean_variance(self, model, *args, **kwargs): # pylint: disable=... method training_losses (line 91) | def training_losses(self, model, *args, **kwargs): # pylint: disable=... method condition_mean (line 94) | def condition_mean(self, cond_fn, *args, **kwargs): method condition_score (line 97) | def condition_score(self, cond_fn, *args, **kwargs): method _wrap_model (line 100) | def _wrap_model(self, model): method _scale_timesteps (line 105) | def _scale_timesteps(self, t): class _WrappedModel (line 110) | class _WrappedModel: method __init__ (line 112) | def __init__(self, model, timestep_map, rescale_timesteps, original_nu... method __call__ (line 118) | def __call__(self, x, ts, **kwargs): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/script_util.py function diffusion_defaults (line 18) | def diffusion_defaults(): function model_and_diffusion_defaults (line 34) | def model_and_diffusion_defaults(): function create_model_and_diffusion (line 59) | def create_model_and_diffusion( function create_model (line 115) | def create_model( function create_gaussian_diffusion (line 172) | def create_gaussian_diffusion( FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/sec_diff.py class DiffusionOutput (line 14) | class DiffusionOutput: class SkipBlock (line 20) | class SkipBlock(nn.Layer): method __init__ (line 22) | def __init__(self, main, skip=None): method forward (line 27) | def forward(self, input): function append_dims (line 31) | def append_dims(x, n): function expand_to_planes (line 35) | def expand_to_planes(x, shape): function alpha_sigma_to_t (line 39) | def alpha_sigma_to_t(alpha, sigma): function t_to_alpha_sigma (line 43) | def t_to_alpha_sigma(t): class SecondaryDiffusionImageNet2 (line 47) | class SecondaryDiffusionImageNet2(nn.Layer): method __init__ (line 49) | def __init__(self): method forward (line 105) | def forward(self, input, t): class FourierFeatures (line 114) | class FourierFeatures(nn.Layer): method __init__ (line 116) | def __init__(self, in_features, out_features, std=1.0): method forward (line 124) | def forward(self, input): class ConvBlock (line 129) | class ConvBlock(nn.Sequential): method __init__ (line 131) | def __init__(self, c_in, c_out): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/transforms.py class Normalize (line 25) | class Normalize(nn.Layer): method __init__ (line 27) | def __init__(self, mean, std): method forward (line 32) | def forward(self, tensor: Tensor): class InterpolationMode (line 42) | class InterpolationMode(Enum): class Grayscale (line 56) | class Grayscale(nn.Layer): method __init__ (line 58) | def __init__(self, num_output_channels): method forward (line 62) | def forward(self, x): class Lambda (line 70) | class Lambda(nn.Layer): method __init__ (line 72) | def __init__(self, func): method forward (line 76) | def forward(self, x): class RandomGrayscale (line 80) | class RandomGrayscale(nn.Layer): method __init__ (line 82) | def __init__(self, p): method forward (line 87) | def forward(self, x): class RandomHorizontalFlip (line 94) | class RandomHorizontalFlip(nn.Layer): method __init__ (line 96) | def __init__(self, prob): method forward (line 100) | def forward(self, x): function _blend (line 107) | def _blend(img1: Tensor, img2: Tensor, ratio: float) -> Tensor: function trunc_div (line 113) | def trunc_div(a, b): function fmod (line 122) | def fmod(a, b): function _rgb2hsv (line 126) | def _rgb2hsv(img: Tensor) -> Tensor: function _hsv2rgb (line 165) | def _hsv2rgb(img: Tensor) -> Tensor: function adjust_brightness (line 186) | def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: function adjust_contrast (line 193) | def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: function adjust_hue (line 209) | def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: function adjust_saturation (line 221) | def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: class ColorJitter (line 230) | class ColorJitter(nn.Layer): method __init__ (line 232) | def __init__(self, brightness=0, contrast=0, saturation=0, hue=0): method _check_input (line 239) | def _check_input(self, value, name, center=1, bound=(0, float("inf")),... method get_params (line 259) | def get_params( method forward (line 290) | def forward(self, img): method __repr__ (line 313) | def __repr__(self) -> str: function _apply_grid_transform (line 322) | def _apply_grid_transform(img: Tensor, grid: Tensor, mode: str, fill: Op... function _gen_affine_grid (line 350) | def _gen_affine_grid( function affine_impl (line 375) | def affine_impl(img: Tensor, function _get_inverse_affine_matrix (line 386) | def _get_inverse_affine_matrix(center: List[float], function affine (line 449) | def affine( function _interpolation_modes_from_int (line 558) | def _interpolation_modes_from_int(i: int) -> InterpolationMode: function _check_sequence_input (line 570) | def _check_sequence_input(x, name, req_sizes): function _setup_angle (line 578) | def _setup_angle(x, name, req_sizes=(2, )): class RandomAffine (line 589) | class RandomAffine(nn.Layer): method __init__ (line 631) | def __init__( method get_params (line 696) | def get_params( method forward (line 733) | def forward(self, img): method __repr__ (line 747) | def __repr__(self) -> str: FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/model/unet.py class AttentionPool2d (line 23) | class AttentionPool2d(nn.Layer): method __init__ (line 28) | def __init__( method forward (line 46) | def forward(self, x): class TimestepBlock (line 58) | class TimestepBlock(nn.Layer): method forward (line 64) | def forward(self, x, emb): class TimestepEmbedSequential (line 70) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 76) | def forward(self, x, emb): class Upsample (line 85) | class Upsample(nn.Layer): method __init__ (line 95) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 104) | def forward(self, x): class Downsample (line 115) | class Downsample(nn.Layer): method __init__ (line 125) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 138) | def forward(self, x): class ResBlock (line 143) | class ResBlock(TimestepBlock): method __init__ (line 160) | def __init__( method forward (line 220) | def forward(self, x, emb): method _forward (line 230) | def _forward(self, x, emb): class AttentionBlock (line 254) | class AttentionBlock(nn.Layer): method __init__ (line 262) | def __init__( method forward (line 290) | def forward(self, x): method _forward (line 293) | def _forward(self, x): function count_flops_attn (line 304) | def count_flops_attn(model, _x, y): class QKVAttentionLegacy (line 324) | class QKVAttentionLegacy(nn.Layer): method __init__ (line 329) | def __init__(self, n_heads): method forward (line 333) | def forward(self, qkv): method count_flops (line 353) | def count_flops(model, _x, y): class QKVAttention (line 357) | class QKVAttention(nn.Layer): method __init__ (line 362) | def __init__(self, n_heads): method forward (line 366) | def forward(self, qkv): method count_flops (line 389) | def count_flops(model, _x, y): class UNetModel (line 393) | class UNetModel(nn.Layer): method __init__ (line 424) | def __init__( method forward (line 602) | def forward(self, x, timesteps, y=None): class SuperResModel (line 632) | class SuperResModel(UNetModel): method __init__ (line 639) | def __init__(self, image_size, in_channels, *args, **kwargs): method forward (line 642) | def forward(self, x, timesteps, low_res=None, **kwargs): class EncoderUNetModel (line 649) | class EncoderUNetModel(nn.Layer): method __init__ (line 656) | def __init__( method forward (line 812) | def forward(self, x, timesteps): FILE: modules/image/text_to_image/disco_diffusion_cnclip_vitb16/reverse_diffusion/runner.py function do_run (line 32) | def do_run(args, models) -> 'DocumentArray': function _silent_push (line 281) | def _silent_push(da_batches: DocumentArray, name: str) -> None: FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/module.py class DiscoDiffusionClip (line 39) | class DiscoDiffusionClip: method generate_image (line 41) | def generate_image(self, method serving_method (line 174) | def serving_method(self, text_prompts, **kwargs): method run_cmd (line 182) | def run_cmd(self, argvs): method add_module_config_arg (line 231) | def add_module_config_arg(self): method add_module_input_arg (line 392) | def add_module_input_arg(self): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/resize_right/interp_methods.py function set_framework_dependencies (line 18) | def set_framework_dependencies(x): function support_sz (line 30) | def support_sz(sz): function cubic (line 40) | def cubic(x): function lanczos2 (line 50) | def lanczos2(x): function lanczos3 (line 56) | def lanczos3(x): function linear (line 62) | def linear(x): function box (line 68) | def box(x): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/resize_right/resize_right.py class NoneClass (line 9) | class NoneClass: function resize (line 33) | def resize(input, function get_projected_grid (line 111) | def get_projected_grid(in_sz, out_sz, scale_factor, fw, by_convs, device... function get_field_of_view (line 125) | def get_field_of_view(projected_grid, cur_support_sz, fw, eps, device): function calc_pad_sz (line 137) | def calc_pad_sz(in_sz, out_sz, field_of_view, projected_grid, scale_fact... function get_weights (line 186) | def get_weights(interp_method, projected_grid, field_of_view): function apply_weights (line 199) | def apply_weights(input, field_of_view, weights, dim, n_dims, pad_sz, pa... function apply_convs (line 232) | def apply_convs(input, scale_factor, in_sz, out_sz, weights, dim, pad_sz... function set_scale_and_out_sz (line 260) | def set_scale_and_out_sz(in_shape, out_shape, scale_factors, by_convs, s... function apply_antialiasing_if_needed (line 315) | def apply_antialiasing_if_needed(interp_method, support_sz, scale_factor... function fw_ceil (line 328) | def fw_ceil(x, fw): function fw_floor (line 335) | def fw_floor(x, fw): function fw_cat (line 342) | def fw_cat(x, fw): function fw_swapaxes (line 349) | def fw_swapaxes(x, ax_1, ax_2, fw): function fw_pad (line 364) | def fw_pad(x, fw, pad_sz, pad_mode, dim=0): function fw_conv (line 380) | def fw_conv(input, filter, stride): function fw_arange (line 392) | def fw_arange(upper_bound, fw, device): function fw_empty (line 399) | def fw_empty(shape, fw, device): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/__init__.py function create (line 40) | def create(text_prompts: Optional[List[str]] = [ function create (line 118) | def create(init_document: 'Document') -> 'DocumentArray': function create (line 126) | def create(**kwargs) -> 'DocumentArray': FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/config.py function load_config (line 19) | def load_config(user_config: Dict, ): function print_args_table (line 53) | def print_args_table(cfg): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/helper.py function _get_logger (line 19) | def _get_logger(): function load_clip_models (line 34) | def load_clip_models(enabled: List[str], clip_models: Dict[str, Any] = {}): function load_all_models (line 55) | def load_all_models(diffusion_model, use_secondary_model): function load_diffusion_model (line 110) | def load_diffusion_model(model_config, diffusion_model, steps): function parse_prompt (line 131) | def parse_prompt(prompt): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/gaussian_diffusion.py function get_named_beta_schedule (line 17) | def get_named_beta_schedule(schedule_name, num_diffusion_timesteps): function betas_for_alpha_bar (line 42) | def betas_for_alpha_bar(num_diffusion_timesteps, alpha_bar, max_beta=0.9... class ModelMeanType (line 62) | class ModelMeanType(enum.Enum): class ModelVarType (line 72) | class ModelVarType(enum.Enum): class LossType (line 86) | class LossType(enum.Enum): method is_vb (line 92) | def is_vb(self): class GaussianDiffusion (line 96) | class GaussianDiffusion: method __init__ (line 113) | def __init__( method q_mean_variance (line 156) | def q_mean_variance(self, x_start, t): method q_sample (line 169) | def q_sample(self, x_start, t, noise=None): method q_posterior_mean_variance (line 187) | def q_posterior_mean_variance(self, x_start, x_t, t): method p_mean_variance (line 203) | def p_mean_variance(self, model, x, t, clip_denoised=True, denoised_fn... method _predict_xstart_from_eps (line 287) | def _predict_xstart_from_eps(self, x_t, t, eps): method _predict_xstart_from_xprev (line 292) | def _predict_xstart_from_xprev(self, x_t, t, xprev): method _predict_eps_from_xstart (line 298) | def _predict_eps_from_xstart(self, x_t, t, pred_xstart): method _scale_timesteps (line 302) | def _scale_timesteps(self, t): method condition_mean (line 307) | def condition_mean(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_mean_with_grad (line 321) | def condition_mean_with_grad(self, cond_fn, p_mean_var, x, t, model_kw... method condition_score (line 335) | def condition_score(self, cond_fn, p_mean_var, x, t, model_kwargs=None): method condition_score_with_grad (line 355) | def condition_score_with_grad(self, cond_fn, p_mean_var, x, t, model_k... method p_sample (line 375) | def p_sample( method p_sample_with_grad (line 419) | def p_sample_with_grad( method p_sample_loop (line 467) | def p_sample_loop( method p_sample_loop_progressive (line 521) | def p_sample_loop_progressive( method ddim_sample (line 586) | def ddim_sample( method ddim_sample_with_grad (line 633) | def ddim_sample_with_grad( method ddim_reverse_sample (line 686) | def ddim_reverse_sample( method ddim_sample_loop (line 719) | def ddim_sample_loop( method ddim_sample_loop_progressive (line 761) | def ddim_sample_loop_progressive( method plms_sample (line 831) | def plms_sample( method plms_sample_loop (line 915) | def plms_sample_loop( method plms_sample_loop_progressive (line 957) | def plms_sample_loop_progressive( method _vb_terms_bpd (line 1026) | def _vb_terms_bpd(self, model, x_start, x_t, t, clip_denoised=True, mo... method training_losses (line 1052) | def training_losses(self, model, x_start, t, model_kwargs=None, noise=... method _prior_bpd (line 1126) | def _prior_bpd(self, x_start): method calc_bpd_loop (line 1142) | def calc_bpd_loop(self, model, x_start, clip_denoised=True, model_kwar... function _extract_into_tensor (line 1201) | def _extract_into_tensor(arr, timesteps, broadcast_shape): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/losses.py function normal_kl (line 11) | def normal_kl(mean1, logvar1, mean2, logvar2): function approx_standard_normal_cdf (line 33) | def approx_standard_normal_cdf(x): function discretized_gaussian_log_likelihood (line 41) | def discretized_gaussian_log_likelihood(x, *, means, log_scales): function spherical_dist_loss (line 71) | def spherical_dist_loss(x, y): function tv_loss (line 77) | def tv_loss(input): function range_loss (line 85) | def range_loss(input): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/make_cutouts.py function sinc (line 17) | def sinc(x): function lanczos (line 21) | def lanczos(x, a): function ramp (line 27) | def ramp(ratio, width): class MakeCutouts (line 37) | class MakeCutouts(nn.Layer): method __init__ (line 39) | def __init__(self, cut_size, cutn, skip_augs=False): method forward (line 56) | def forward(self, input): class MakeCutoutsDango (line 81) | class MakeCutoutsDango(nn.Layer): method __init__ (line 83) | def __init__(self, cut_size, Overview=4, InnerCrop=0, IC_Size_Pow=0.5,... method forward (line 104) | def forward(self, input): function resample (line 155) | def resample(input, size, align_corners=True): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/nn.py class SiLU (line 11) | class SiLU(nn.Layer): method forward (line 13) | def forward(self, x): class GroupNorm32 (line 17) | class GroupNorm32(nn.GroupNorm): method forward (line 19) | def forward(self, x): function conv_nd (line 23) | def conv_nd(dims, *args, **kwargs): function linear (line 36) | def linear(*args, **kwargs): function avg_pool_nd (line 43) | def avg_pool_nd(dims, *args, **kwargs): function update_ema (line 56) | def update_ema(target_params, source_params, rate=0.99): function zero_module (line 69) | def zero_module(module): function scale_module (line 78) | def scale_module(module, scale): function mean_flat (line 87) | def mean_flat(tensor): function normalization (line 94) | def normalization(channels): function timestep_embedding (line 104) | def timestep_embedding(timesteps, dim, max_period=10000): function checkpoint (line 123) | def checkpoint(func, inputs, params, flag): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/perlin_noises.py function interp (line 13) | def interp(t): function perlin (line 17) | def perlin(width, height, scale=10): function perlin_ms (line 31) | def perlin_ms(octaves, width, height, grayscale): function create_perlin_noise (line 47) | def create_perlin_noise(octaves, width, height, grayscale, side_y, side_x): function regen_perlin (line 65) | def regen_perlin(perlin_mode, side_y, side_x, batch_size): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/respace.py function space_timesteps (line 11) | def space_timesteps(num_timesteps, section_counts): class SpacedDiffusion (line 63) | class SpacedDiffusion(GaussianDiffusion): method __init__ (line 72) | def __init__(self, use_timesteps, **kwargs): method p_mean_variance (line 88) | def p_mean_variance(self, model, *args, **kwargs): # pylint: disable=... method training_losses (line 91) | def training_losses(self, model, *args, **kwargs): # pylint: disable=... method condition_mean (line 94) | def condition_mean(self, cond_fn, *args, **kwargs): method condition_score (line 97) | def condition_score(self, cond_fn, *args, **kwargs): method _wrap_model (line 100) | def _wrap_model(self, model): method _scale_timesteps (line 105) | def _scale_timesteps(self, t): class _WrappedModel (line 110) | class _WrappedModel: method __init__ (line 112) | def __init__(self, model, timestep_map, rescale_timesteps, original_nu... method __call__ (line 118) | def __call__(self, x, ts, **kwargs): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/script_util.py function diffusion_defaults (line 18) | def diffusion_defaults(): function model_and_diffusion_defaults (line 34) | def model_and_diffusion_defaults(): function create_model_and_diffusion (line 59) | def create_model_and_diffusion( function create_model (line 115) | def create_model( function create_gaussian_diffusion (line 172) | def create_gaussian_diffusion( FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/sec_diff.py class DiffusionOutput (line 14) | class DiffusionOutput: class SkipBlock (line 20) | class SkipBlock(nn.Layer): method __init__ (line 22) | def __init__(self, main, skip=None): method forward (line 27) | def forward(self, input): function append_dims (line 31) | def append_dims(x, n): function expand_to_planes (line 35) | def expand_to_planes(x, shape): function alpha_sigma_to_t (line 39) | def alpha_sigma_to_t(alpha, sigma): function t_to_alpha_sigma (line 43) | def t_to_alpha_sigma(t): class SecondaryDiffusionImageNet2 (line 47) | class SecondaryDiffusionImageNet2(nn.Layer): method __init__ (line 49) | def __init__(self): method forward (line 105) | def forward(self, input, t): class FourierFeatures (line 114) | class FourierFeatures(nn.Layer): method __init__ (line 116) | def __init__(self, in_features, out_features, std=1.0): method forward (line 124) | def forward(self, input): class ConvBlock (line 129) | class ConvBlock(nn.Sequential): method __init__ (line 131) | def __init__(self, c_in, c_out): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/transforms.py class Normalize (line 25) | class Normalize(nn.Layer): method __init__ (line 27) | def __init__(self, mean, std): method forward (line 32) | def forward(self, tensor: Tensor): class InterpolationMode (line 42) | class InterpolationMode(Enum): class Grayscale (line 56) | class Grayscale(nn.Layer): method __init__ (line 58) | def __init__(self, num_output_channels): method forward (line 62) | def forward(self, x): class Lambda (line 70) | class Lambda(nn.Layer): method __init__ (line 72) | def __init__(self, func): method forward (line 76) | def forward(self, x): class RandomGrayscale (line 80) | class RandomGrayscale(nn.Layer): method __init__ (line 82) | def __init__(self, p): method forward (line 87) | def forward(self, x): class RandomHorizontalFlip (line 94) | class RandomHorizontalFlip(nn.Layer): method __init__ (line 96) | def __init__(self, prob): method forward (line 100) | def forward(self, x): function _blend (line 107) | def _blend(img1: Tensor, img2: Tensor, ratio: float) -> Tensor: function trunc_div (line 113) | def trunc_div(a, b): function fmod (line 122) | def fmod(a, b): function _rgb2hsv (line 126) | def _rgb2hsv(img: Tensor) -> Tensor: function _hsv2rgb (line 165) | def _hsv2rgb(img: Tensor) -> Tensor: function adjust_brightness (line 186) | def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: function adjust_contrast (line 193) | def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: function adjust_hue (line 209) | def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: function adjust_saturation (line 221) | def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: class ColorJitter (line 230) | class ColorJitter(nn.Layer): method __init__ (line 232) | def __init__(self, brightness=0, contrast=0, saturation=0, hue=0): method _check_input (line 239) | def _check_input(self, value, name, center=1, bound=(0, float("inf")),... method get_params (line 259) | def get_params( method forward (line 290) | def forward(self, img): method __repr__ (line 313) | def __repr__(self) -> str: function _apply_grid_transform (line 322) | def _apply_grid_transform(img: Tensor, grid: Tensor, mode: str, fill: Op... function _gen_affine_grid (line 350) | def _gen_affine_grid( function affine_impl (line 375) | def affine_impl(img: Tensor, function _get_inverse_affine_matrix (line 386) | def _get_inverse_affine_matrix(center: List[float], function affine (line 449) | def affine( function _interpolation_modes_from_int (line 558) | def _interpolation_modes_from_int(i: int) -> InterpolationMode: function _check_sequence_input (line 570) | def _check_sequence_input(x, name, req_sizes): function _setup_angle (line 578) | def _setup_angle(x, name, req_sizes=(2, )): class RandomAffine (line 589) | class RandomAffine(nn.Layer): method __init__ (line 631) | def __init__( method get_params (line 696) | def get_params( method forward (line 733) | def forward(self, img): method __repr__ (line 747) | def __repr__(self) -> str: FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/model/unet.py class AttentionPool2d (line 23) | class AttentionPool2d(nn.Layer): method __init__ (line 28) | def __init__( method forward (line 46) | def forward(self, x): class TimestepBlock (line 58) | class TimestepBlock(nn.Layer): method forward (line 64) | def forward(self, x, emb): class TimestepEmbedSequential (line 70) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 76) | def forward(self, x, emb): class Upsample (line 85) | class Upsample(nn.Layer): method __init__ (line 95) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 104) | def forward(self, x): class Downsample (line 115) | class Downsample(nn.Layer): method __init__ (line 125) | def __init__(self, channels, use_conv, dims=2, out_channels=None): method forward (line 138) | def forward(self, x): class ResBlock (line 143) | class ResBlock(TimestepBlock): method __init__ (line 160) | def __init__( method forward (line 220) | def forward(self, x, emb): method _forward (line 230) | def _forward(self, x, emb): class AttentionBlock (line 254) | class AttentionBlock(nn.Layer): method __init__ (line 262) | def __init__( method forward (line 290) | def forward(self, x): method _forward (line 293) | def _forward(self, x): function count_flops_attn (line 304) | def count_flops_attn(model, _x, y): class QKVAttentionLegacy (line 324) | class QKVAttentionLegacy(nn.Layer): method __init__ (line 329) | def __init__(self, n_heads): method forward (line 333) | def forward(self, qkv): method count_flops (line 353) | def count_flops(model, _x, y): class QKVAttention (line 357) | class QKVAttention(nn.Layer): method __init__ (line 362) | def __init__(self, n_heads): method forward (line 366) | def forward(self, qkv): method count_flops (line 389) | def count_flops(model, _x, y): class UNetModel (line 393) | class UNetModel(nn.Layer): method __init__ (line 424) | def __init__( method forward (line 602) | def forward(self, x, timesteps, y=None): class SuperResModel (line 632) | class SuperResModel(UNetModel): method __init__ (line 639) | def __init__(self, image_size, in_channels, *args, **kwargs): method forward (line 642) | def forward(self, x, timesteps, low_res=None, **kwargs): class EncoderUNetModel (line 649) | class EncoderUNetModel(nn.Layer): method __init__ (line 656) | def __init__( method forward (line 812) | def forward(self, x, timesteps): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/reverse_diffusion/runner.py function do_run (line 32) | def do_run(args, models) -> 'DocumentArray': function _silent_push (line 281) | def _silent_push(da_batches: DocumentArray, name: str) -> None: FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/clip_vision_transformer.py class QuickGELU (line 37) | class QuickGELU(Layer): method forward (line 40) | def forward(self, x): function to_2tuple (line 44) | def to_2tuple(x): function drop_path (line 48) | def drop_path(x, drop_prob=0., training=False): class DropPath (line 63) | class DropPath(nn.Layer): method __init__ (line 67) | def __init__(self, drop_prob=None): method forward (line 71) | def forward(self, x): class Identity (line 75) | class Identity(nn.Layer): method __init__ (line 77) | def __init__(self): method forward (line 80) | def forward(self, input): class Mlp (line 84) | class Mlp(nn.Layer): method __init__ (line 86) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 95) | def forward(self, x): class Attention (line 104) | class Attention(nn.Layer): method __init__ (line 106) | def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, at... method forward (line 117) | def forward(self, x): class Block (line 133) | class Block(nn.Layer): method __init__ (line 135) | def __init__(self, method forward (line 161) | def forward(self, x): class PatchEmbed (line 167) | class PatchEmbed(nn.Layer): method __init__ (line 171) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 183) | def forward(self, x): class VisionTransformer (line 192) | class VisionTransformer(nn.Layer): method __init__ (line 196) | def __init__(self, method _init_weights (line 256) | def _init_weights(self, m): method forward_features (line 265) | def forward_features(self, x): method forward (line 282) | def forward(self, x): function ViT_small_patch16_224 (line 287) | def ViT_small_patch16_224(**kwargs): function ViT_base_patch16_224 (line 298) | def ViT_base_patch16_224(**kwargs): function ViT_base_patch16_384 (line 310) | def ViT_base_patch16_384(**kwargs): function ViT_base_patch32_384 (line 323) | def ViT_base_patch32_384(**kwargs): function ViT_base_patch32_224 (line 336) | def ViT_base_patch32_224(**kwargs): function ViT_large_patch16_224 (line 349) | def ViT_large_patch16_224(**kwargs): function ViT_large_patch16_384 (line 361) | def ViT_large_patch16_384(**kwargs): function ViT_large_patch14_224 (line 374) | def ViT_large_patch14_224(**kwargs): function ViT_large_patch32_384 (line 386) | def ViT_large_patch32_384(**kwargs): function ViT_huge_patch16_224 (line 399) | def ViT_huge_patch16_224(**kwargs): function ViT_huge_patch32_384 (line 404) | def ViT_huge_patch32_384(**kwargs): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/droppath.py class DropPath (line 21) | class DropPath(nn.Layer): method __init__ (line 24) | def __init__(self, drop_prob=None): method drop_path (line 28) | def drop_path(self, inputs): method forward (line 48) | def forward(self, inputs): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/efficientnet.py function load_dygraph_pretrain (line 54) | def load_dygraph_pretrain(model, path=None): function efficientnet_params (line 63) | def efficientnet_params(model_name): function efficientnet (line 78) | def efficientnet(width_coefficient=None, depth_coefficient=None, dropout... function get_model_params (line 103) | def get_model_params(model_name, override_params): function round_filters (line 115) | def round_filters(filters, global_params): function round_repeats (line 130) | def round_repeats(repeats, global_params): class BlockDecoder (line 138) | class BlockDecoder(object): method _decode_block_string (line 144) | def _decode_block_string(block_string): method _encode_block_string (line 171) | def _encode_block_string(block): method decode (line 188) | def decode(string_list): method encode (line 202) | def encode(blocks_args): function initial_type (line 214) | def initial_type(name, use_bias=False): function init_batch_norm_layer (line 223) | def init_batch_norm_layer(name="batch_norm"): function init_fc_layer (line 229) | def init_fc_layer(name="fc"): function cal_padding (line 235) | def cal_padding(img_size, stride, filter_size, dilation=1): function _drop_connect (line 269) | def _drop_connect(inputs, prob, is_test): class Conv2ds (line 281) | class Conv2ds(nn.Layer): method __init__ (line 283) | def __init__(self, method forward (line 348) | def forward(self, inputs): class ConvBNLayer (line 360) | class ConvBNLayer(nn.Layer): method __init__ (line 362) | def __init__(self, method forward (line 403) | def forward(self, inputs): class ExpandConvNorm (line 415) | class ExpandConvNorm(nn.Layer): method __init__ (line 417) | def __init__(self, input_channels, block_args, padding_type, name=None... method forward (line 435) | def forward(self, inputs): class DepthwiseConvNorm (line 442) | class DepthwiseConvNorm(nn.Layer): method __init__ (line 444) | def __init__(self, input_channels, block_args, padding_type, name=None... method forward (line 465) | def forward(self, inputs): class ProjectConvNorm (line 469) | class ProjectConvNorm(nn.Layer): method __init__ (line 471) | def __init__(self, input_channels, block_args, padding_type, name=None... method forward (line 487) | def forward(self, inputs): class SEBlock (line 491) | class SEBlock(nn.Layer): method __init__ (line 493) | def __init__(self, method forward (line 522) | def forward(self, inputs): class MbConvBlock (line 530) | class MbConvBlock(nn.Layer): method __init__ (line 532) | def __init__(self, method forward (line 582) | def forward(self, inputs): class ConvStemNorm (line 601) | class ConvStemNorm(nn.Layer): method __init__ (line 603) | def __init__(self, input_channels, padding_type, _global_params, name=... method forward (line 620) | def forward(self, inputs): class ExtractFeatures (line 624) | class ExtractFeatures(nn.Layer): method __init__ (line 626) | def __init__(self, input_channels, _block_args, _global_params, paddin... method forward (line 689) | def forward(self, inputs): class EfficientNet (line 701) | class EfficientNet(nn.Layer): method __init__ (line 703) | def __init__(self, name="b0", padding_type="SAME", override_params=Non... method forward (line 756) | def forward(self, inputs): function _load_pretrained (line 771) | def _load_pretrained(pretrained, model, model_url, use_ssld=False): function EfficientNetB0_small (line 780) | def EfficientNetB0_small(padding_type='DYNAMIC', function EfficientNetB0 (line 791) | def EfficientNetB0(padding_type='SAME', override_params=None, use_se=Tru... function EfficientNetB1 (line 797) | def EfficientNetB1(padding_type='SAME', override_params=None, use_se=Tru... function EfficientNetB2 (line 803) | def EfficientNetB2(padding_type='SAME', override_params=None, use_se=Tru... function EfficientNetB3 (line 809) | def EfficientNetB3(padding_type='SAME', override_params=None, use_se=Tru... function EfficientNetB4 (line 815) | def EfficientNetB4(padding_type='SAME', override_params=None, use_se=Tru... function EfficientNetB5 (line 821) | def EfficientNetB5(padding_type='SAME', override_params=None, use_se=Tru... function EfficientNetB6 (line 827) | def EfficientNetB6(padding_type='SAME', override_params=None, use_se=Tru... function EfficientNetB7 (line 833) | def EfficientNetB7(padding_type='SAME', override_params=None, use_se=Tru... FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/ernie2.py class ErnieModel (line 19) | class ErnieModel(nn.Layer): method __init__ (line 22) | def __init__(self, cfg, name=''): method get_checkpoints (line 86) | def get_checkpoints(self): method eval (line 92) | def eval(self): method train (line 101) | def train(self): method forward (line 110) | def forward(self, class ErnieEncoderStack (line 207) | class ErnieEncoderStack(nn.Layer): method __init__ (line 210) | def __init__(self, cfg, name=None): method forward (line 215) | def forward(self, inputs, attn_bias=None, past_cache=None, key_tag=None): class ErnieBlock (line 238) | class ErnieBlock(nn.Layer): method __init__ (line 241) | def __init__(self, cfg, name=None): method forward (line 251) | def forward(self, inputs, attn_bias=None, past_cache=None, key_tag=None): class AttentionLayer (line 266) | class AttentionLayer(nn.Layer): method __init__ (line 269) | def __init__(self, cfg, name=None): method forward (line 290) | def forward(self, queries, keys, values, attn_bias, past_cache, key_ta... class PositionWiseFeedForwardLayer (line 331) | class PositionWiseFeedForwardLayer(nn.Layer): method __init__ (line 334) | def __init__(self, cfg, name=None): method forward (line 346) | def forward(self, inputs): function _build_linear (line 354) | def _build_linear(n_in, n_out, name, init): function _build_ln (line 363) | def _build_ln(n_in, name): function append_name (line 373) | def append_name(name, postfix): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/ernie_modeling.py function _get_rel_pos_bias (line 29) | def _get_rel_pos_bias(seq_len, max_len=128, num_buckets=32, bidirectiona... function _build_linear (line 61) | def _build_linear(n_in, n_out, name, init): function _build_ln (line 70) | def _build_ln(n_in, name): function append_name (line 80) | def append_name(name, postfix): class AttentionLayer (line 90) | class AttentionLayer(nn.Layer): method __init__ (line 92) | def __init__(self, cfg, name=None): method forward (line 108) | def forward(self, queries, keys, values, attn_bias, past_cache): class PositionwiseFeedForwardLayer (line 142) | class PositionwiseFeedForwardLayer(nn.Layer): method __init__ (line 144) | def __init__(self, cfg, name=None): method forward (line 160) | def forward(self, inputs): class ErnieBlock (line 167) | class ErnieBlock(nn.Layer): method __init__ (line 169) | def __init__(self, cfg, name=None): method forward (line 179) | def forward(self, inputs, attn_bias=None, past_cache=None): class ErnieEncoderStack (line 192) | class ErnieEncoderStack(nn.Layer): method __init__ (line 194) | def __init__(self, cfg, name=None): method forward (line 199) | def forward(self, inputs, attn_bias=None, past_cache=None): class PretrainedModel (line 219) | class PretrainedModel(object): method from_pretrained (line 231) | def from_pretrained(cls, pretrain_dir_or_url, force_download=False, **... class ErnieModel (line 270) | class ErnieModel(nn.Layer, PretrainedModel): method __init__ (line 272) | def __init__(self, cfg, name=None): method eval (line 325) | def eval(self): method train (line 333) | def train(self): method forward (line 341) | def forward(self, class ErnieModelForSequenceClassification (line 424) | class ErnieModelForSequenceClassification(ErnieModel): method __init__ (line 429) | def __init__(self, cfg, name=None): method forward (line 440) | def forward(self, *args, **kwargs): class ErnieModelForTokenClassification (line 466) | class ErnieModelForTokenClassification(ErnieModel): method __init__ (line 471) | def __init__(self, cfg, name=None): method forward (line 482) | def forward(self, *args, **kwargs): class ErnieModelForQuestionAnswering (line 517) | class ErnieModelForQuestionAnswering(ErnieModel): method __init__ (line 522) | def __init__(self, cfg, name=None): method forward (line 533) | def forward(self, *args, **kwargs): class NSPHead (line 569) | class NSPHead(nn.Layer): method __init__ (line 571) | def __init__(self, cfg, name=None): method forward (line 576) | def forward(self, inputs, labels): class ErnieModelForPretraining (line 598) | class ErnieModelForPretraining(ErnieModel): method __init__ (line 603) | def __init__(self, cfg, name=None): method forward (line 628) | def forward(self, *args, **kwargs): class ErnieModelForGeneration (line 666) | class ErnieModelForGeneration(ErnieModel): method __init__ (line 677) | def __init__(self, cfg, name=None): method forward (line 703) | def forward(self, *args, **kwargs): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/ernie_tokenizer.py function _wordpiece (line 33) | def _wordpiece(token, vocab, unk_token, prefix='##', sentencepiece_prefi... class ErnieTokenizer (line 68) | class ErnieTokenizer(object): method from_pretrained (line 82) | def from_pretrained(cls, pretrain_dir_or_url, force_download=False, **... method __init__ (line 99) | def __init__(self, method tokenize (line 134) | def tokenize(self, text): method convert_tokens_to_ids (line 158) | def convert_tokens_to_ids(self, tokens): method truncate (line 161) | def truncate(self, id1, id2, seqlen): method build_for_ernie (line 171) | def build_for_ernie(self, text_id, pair_id=[]): method encode (line 183) | def encode(self, text, pair=None, truncate_to=None): class ErnieTinyTokenizer (line 197) | class ErnieTinyTokenizer(ErnieTokenizer): method from_pretrained (line 202) | def from_pretrained(cls, pretrain_dir_or_url, force_download=False, **... method __init__ (line 222) | def __init__(self, vocab, sp_model_path, **kwargs): method cut (line 231) | def cut(self, sentence): method tokenize (line 234) | def tokenize(self, text): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/file_utils.py function _fetch_from_remote (line 21) | def _fetch_from_remote(url, force_download=False, cached_dir='~/.paddle-... function add_docstring (line 76) | def add_docstring(doc): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/multimodal.py class MultiModalModel (line 20) | class MultiModalModel(nn.Layer): method __init__ (line 22) | def __init__(self, image_model=None, text_model=None, args=None): method encode_text (line 27) | def encode_text(self, input_ids, pos_ids=None): method encode_image (line 31) | def encode_image(self, img_word): method forward (line 35) | def forward(self, img_word=None, input_ids=None, pos_ids=None): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/paddle_vision_transformer.py class Identity (line 24) | class Identity(nn.Layer): method __init__ (line 30) | def __init__(self): method forward (line 33) | def forward(self, x): class PatchEmbedding (line 37) | class PatchEmbedding(nn.Layer): method __init__ (line 47) | def __init__(self, image_size=224, patch_size=16, in_channels=3, embed... method forward (line 67) | def forward(self, x): class Attention (line 79) | class Attention(nn.Layer): method __init__ (line 95) | def __init__(self, embed_dim, num_heads, attn_head_size=None, qkv_bias... method _init_weights (line 139) | def _init_weights(self): method transpose_multihead (line 144) | def transpose_multihead(self, x): method forward (line 150) | def forward(self, x): class Mlp (line 169) | class Mlp(nn.Layer): method __init__ (line 181) | def __init__(self, embed_dim, mlp_ratio, dropout=0.): method _init_weights (line 192) | def _init_weights(self): method forward (line 197) | def forward(self, x): class EncoderLayer (line 206) | class EncoderLayer(nn.Layer): method __init__ (line 217) | def __init__(self, method _init_weights (line 238) | def _init_weights(self): method forward (line 243) | def forward(self, x): class Encoder (line 259) | class Encoder(nn.Layer): method __init__ (line 267) | def __init__(self, method _init_weights (line 296) | def _init_weights(self): method forward (line 301) | def forward(self, x): class VisualTransformer (line 308) | class VisualTransformer(nn.Layer): method __init__ (line 328) | def __init__(self, method _init_weights (line 366) | def _init_weights(self): method forward (line 371) | def forward(self, x): function build_vit (line 380) | def build_vit(config): function ViT_large_patch16_384 (line 399) | def ViT_large_patch16_384(**kwargs): function ViT_large_patch16_224 (line 415) | def ViT_large_patch16_224(**kwargs): function ViT_base_patch16_224 (line 431) | def ViT_base_patch16_224(**kwargs): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/transformers/resnet.py class BasicBlock (line 35) | class BasicBlock(nn.Layer): method __init__ (line 38) | def __init__(self, method forward (line 62) | def forward(self, x): class BottleneckBlock (line 81) | class BottleneckBlock(nn.Layer): method __init__ (line 85) | def __init__(self, method forward (line 118) | def forward(self, x): class ResNet (line 141) | class ResNet(nn.Layer): method __init__ (line 173) | def __init__(self, block, depth=50, width=64, num_classes=1000, with_p... method _make_layer (line 200) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method forward (line 224) | def forward(self, x): function _resnet (line 244) | def _resnet(arch, Block, depth, pretrained, **kwargs): function resnet18 (line 257) | def resnet18(pretrained=False, **kwargs): function resnet34 (line 284) | def resnet34(pretrained=False, **kwargs): function resnet50 (line 311) | def resnet50(pretrained=False, **kwargs): function resnet101 (line 338) | def resnet101(pretrained=False, **kwargs): function resnet152 (line 365) | def resnet152(pretrained=False, **kwargs): function wide_resnet50_2 (line 392) | def wide_resnet50_2(pretrained=False, **kwargs): function wide_resnet101_2 (line 420) | def wide_resnet101_2(pretrained=False, **kwargs): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/utils/tokenizer.py function convert_to_unicode (line 27) | def convert_to_unicode(text): function load_vocab (line 47) | def load_vocab(vocab_file): function convert_by_vocab (line 62) | def convert_by_vocab(vocab, items): function convert_tokens_to_ids_include_unk (line 70) | def convert_tokens_to_ids_include_unk(vocab, tokens, unk_token="[UNK]"): function convert_tokens_to_ids (line 80) | def convert_tokens_to_ids(vocab, tokens): function convert_ids_to_tokens (line 84) | def convert_ids_to_tokens(inv_vocab, ids): function whitespace_tokenize (line 88) | def whitespace_tokenize(text): class FullTokenizer (line 97) | class FullTokenizer(object): method __init__ (line 100) | def __init__(self, vocab_file, do_lower_case=True): method tokenize (line 106) | def tokenize(self, text): method convert_tokens_to_ids (line 114) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 117) | def convert_ids_to_tokens(self, ids): class CharTokenizer (line 121) | class CharTokenizer(object): method __init__ (line 124) | def __init__(self, vocab_file, do_lower_case=True): method tokenize (line 129) | def tokenize(self, text): method convert_tokens_to_ids (line 136) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 139) | def convert_ids_to_tokens(self, ids): class BasicTokenizer (line 143) | class BasicTokenizer(object): method __init__ (line 146) | def __init__(self, do_lower_case=True): method tokenize (line 154) | def tokenize(self, text): method _run_strip_accents (line 178) | def _run_strip_accents(self, text): method _run_split_on_punc (line 189) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 209) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 222) | def _is_chinese_char(self, cp): method _clean_text (line 243) | def _clean_text(self, text): class WordpieceTokenizer (line 257) | class WordpieceTokenizer(object): method __init__ (line 260) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 265) | def tokenize(self, text): function _is_whitespace (line 319) | def _is_whitespace(char): function _is_control (line 331) | def _is_control(char): function _is_punctuation (line 343) | def _is_punctuation(char): FILE: modules/image/text_to_image/disco_diffusion_ernievil_base/vit_b_16x/ernievil2/utils/utils.py function tokenize (line 26) | def tokenize(texts: Union[str, List[str]], context_length: int = 64): function build_model (line 57) | def build_model(name='vit_b_16x'): function build_vit_b_16x_model (line 64) | def build_vit_b_16x_model(): FILE: modules/image/text_to_image/ernie_vilg/module.py class ErnieVilG (line 25) | class ErnieVilG: method __init__ (line 27) | def __init__(self, ak=None, sk=None): method _apply_token (line 37) | def _apply_token(self, ak, sk): method generate_image (line 59) | def generate_image(self, method run_cmd (line 218) | def run_cmd(self, argvs): method serving_method (line 240) | def serving_method(self, text_prompts, **kwargs): method add_module_input_arg (line 253) | def add_module_input_arg(self): method create_gradio_app (line 272) | def create_gradio_app(self): FILE: modules/image/text_to_image/ernie_vilg/test.py class TestHubModule (line 7) | class TestHubModule(unittest.TestCase): method setUpClass (line 10) | def setUpClass(cls) -> None: method tearDownClass (line 14) | def tearDownClass(cls) -> None: method test_generate_image (line 17) | def test_generate_image(self): FILE: modules/image/text_to_image/stable_diffusion/clip/clip/layers.py function multi_head_attention_forward (line 12) | def multi_head_attention_forward(x: Tensor, class MultiHeadAttention (line 47) | class MultiHeadAttention(nn.Layer): # without attention mask method __init__ (line 49) | def __init__(self, emb_dim: int, num_heads: int): method forward (line 61) | def forward(self, x, attn_mask=None): # x is in shape[max_len,batch_s... class Identity (line 74) | class Identity(nn.Layer): method __init__ (line 76) | def __init__(self): method forward (line 79) | def forward(self, x): class Bottleneck (line 83) | class Bottleneck(nn.Layer): method __init__ (line 86) | def __init__(self, inplanes, planes, stride=1): method forward (line 111) | def forward(self, x): class AttentionPool2d (line 127) | class AttentionPool2d(nn.Layer): method __init__ (line 129) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 143) | def forward(self, x): class QuickGELU (line 155) | class QuickGELU(nn.Layer): method forward (line 157) | def forward(self, x): class ResidualAttentionBlock (line 161) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 163) | def __init__(self, d_model: int, n_head: int, attn_mask=None): method attention (line 173) | def attention(self, x): method forward (line 178) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion/clip/clip/model.py class ModifiedResNet (line 15) | class ModifiedResNet(nn.Layer): method __init__ (line 23) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 48) | def _make_layer(self, planes, blocks, stride=1): method forward (line 57) | def forward(self, x): class Transformer (line 76) | class Transformer(nn.Layer): method __init__ (line 78) | def __init__(self, width: int, layers: int, heads: int, attn_mask=None): method forward (line 84) | def forward(self, x): class VisualTransformer (line 88) | class VisualTransformer(nn.Layer): method __init__ (line 90) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 113) | def forward(self, x): class TextTransformer (line 132) | class TextTransformer(nn.Layer): method __init__ (line 134) | def __init__(self, context_length: int, vocab_size: int, transformer_w... method build_attention_mask (line 148) | def build_attention_mask(self): method forward (line 159) | def forward(self, text): class CLIP (line 169) | class CLIP(nn.Layer): method __init__ (line 171) | def __init__( method build_attention_mask (line 217) | def build_attention_mask(self): method encode_image (line 228) | def encode_image(self, image): method encode_text (line 231) | def encode_text(self, text): method forward (line 245) | def forward(self, image, text): FILE: modules/image/text_to_image/stable_diffusion/clip/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 64) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 83) | def bpe(self, token): method encode (line 124) | def encode(self, text): method decode (line 132) | def decode(self, tokens): FILE: modules/image/text_to_image/stable_diffusion/clip/clip/utils.py function tokenize (line 35) | def tokenize(texts: Union[str, List[str]], context_length: int = 77): function build_model (line 67) | def build_model(name='VITL14'): function build_vitl14_language_model (line 82) | def build_vitl14_language_model(): FILE: modules/image/text_to_image/stable_diffusion/diffusers/configuration_utils.py class ConfigMixin (line 38) | class ConfigMixin: method register_to_config (line 47) | def register_to_config(self, **kwargs): method save_config (line 69) | def save_config(self, save_directory: Union[str, os.PathLike], push_to... method from_config (line 92) | def from_config(cls, pretrained_model_name_or_path: Union[str, os.Path... method get_config_dict (line 105) | def get_config_dict(cls, pretrained_model_name_or_path: Union[str, os.... method extract_init_dict (line 180) | def extract_init_dict(cls, config_dict, **kwargs): method _dict_from_json_file (line 208) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __repr__ (line 213) | def __repr__(self): method config (line 217) | def config(self) -> Dict[str, Any]: method to_json_string (line 220) | def to_json_string(self) -> str: method to_json_file (line 230) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): class FrozenDict (line 242) | class FrozenDict(OrderedDict): method __init__ (line 244) | def __init__(self, *args, **kwargs): method __delitem__ (line 252) | def __delitem__(self, *args, **kwargs): method setdefault (line 255) | def setdefault(self, *args, **kwargs): method pop (line 258) | def pop(self, *args, **kwargs): method update (line 261) | def update(self, *args, **kwargs): method __setattr__ (line 264) | def __setattr__(self, name, value): method __setitem__ (line 269) | def __setitem__(self, name, value): function register_to_config (line 275) | def register_to_config(init): FILE: modules/image/text_to_image/stable_diffusion/diffusers/models/attention.py function finfo (line 23) | def finfo(dtype): class AttentionBlockNew (line 35) | class AttentionBlockNew(nn.Layer): method __init__ (line 43) | def __init__( method transpose_for_scores (line 66) | def transpose_for_scores(self, projection: paddle.Tensor) -> paddle.Te... method forward (line 72) | def forward(self, hidden_states): method set_weight (line 113) | def set_weight(self, attn_layer): class SpatialTransformer (line 162) | class SpatialTransformer(nn.Layer): method __init__ (line 168) | def __init__(self, in_channels, n_heads, d_head, depth=1, dropout=0.0,... method forward (line 185) | def forward(self, x, context=None): method set_weight (line 198) | def set_weight(self, layer): class BasicTransformerBlock (line 205) | class BasicTransformerBlock(nn.Layer): method __init__ (line 207) | def __init__(self, dim, n_heads, d_head, dropout=0.0, context_dim=None... method forward (line 222) | def forward(self, x, context=None): class CrossAttention (line 229) | class CrossAttention(nn.Layer): method __init__ (line 231) | def __init__(self, query_dim, context_dim=None, heads=8, dim_head=64, ... method reshape_heads_to_batch_dim (line 245) | def reshape_heads_to_batch_dim(self, tensor): method reshape_batch_dim_to_heads (line 252) | def reshape_batch_dim_to_heads(self, tensor): method forward (line 259) | def forward(self, x, context=None, mask=None): class FeedForward (line 289) | class FeedForward(nn.Layer): method __init__ (line 291) | def __init__(self, dim, dim_out=None, mult=4, glu=False, dropout=0.0): method forward (line 299) | def forward(self, x): class GEGLU (line 304) | class GEGLU(nn.Layer): method __init__ (line 306) | def __init__(self, dim_in, dim_out): method forward (line 310) | def forward(self, x): class NIN (line 316) | class NIN(nn.Layer): method __init__ (line 318) | def __init__(self, in_dim, num_units, init_scale=0.1): function exists (line 328) | def exists(val): function default (line 332) | def default(val, d): class AttentionBlock (line 339) | class AttentionBlock(nn.Layer): method __init__ (line 347) | def __init__( method set_weights (line 403) | def set_weights(self, layer): method forward (line 430) | def forward(self, x, encoder_out=None): FILE: modules/image/text_to_image/stable_diffusion/diffusers/models/embeddings.py function get_timestep_embedding (line 22) | def get_timestep_embedding(timesteps, class TimestepEmbedding (line 61) | class TimestepEmbedding(nn.Layer): method __init__ (line 63) | def __init__(self, channel, time_embed_dim, act_fn="silu"): method forward (line 72) | def forward(self, sample): class Timesteps (line 82) | class Timesteps(nn.Layer): method __init__ (line 84) | def __init__(self, num_channels, flip_sin_to_cos, downscale_freq_shift): method forward (line 90) | def forward(self, timesteps): class GaussianFourierProjection (line 100) | class GaussianFourierProjection(nn.Layer): method __init__ (line 103) | def __init__(self, embedding_size=256, scale=1.0): method forward (line 112) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion/diffusers/models/resnet.py function pad_new (line 22) | def pad_new(x, pad, mode="constant", value=0): class Upsample2D (line 54) | class Upsample2D(nn.Layer): method __init__ (line 63) | def __init__(self, channels, use_conv=False, use_conv_transpose=False,... method forward (line 83) | def forward(self, x): class Downsample2D (line 100) | class Downsample2D(nn.Layer): method __init__ (line 109) | def __init__(self, channels, use_conv=False, out_channels=None, paddin... method forward (line 133) | def forward(self, x): class FirUpsample2D (line 145) | class FirUpsample2D(nn.Layer): method __init__ (line 147) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _upsample_2d (line 156) | def _upsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 223) | def forward(self, x): class FirDownsample2D (line 233) | class FirDownsample2D(nn.Layer): method __init__ (line 235) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _downsample_2d (line 244) | def _downsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 286) | def forward(self, x): class ResnetBlock (line 296) | class ResnetBlock(nn.Layer): method __init__ (line 298) | def __init__( method forward (line 377) | def forward(self, x, temb, hey=False): class Mish (line 414) | class Mish(nn.Layer): method forward (line 416) | def forward(self, x): function upsample_2d (line 420) | def upsample_2d(x, k=None, factor=2, gain=1): function downsample_2d (line 451) | def downsample_2d(x, k=None, factor=2, gain=1): function upfirdn2d_native (line 483) | def upfirdn2d_native(input, kernel, up=1, down=1, pad=(0, 0)): FILE: modules/image/text_to_image/stable_diffusion/diffusers/models/unet_2d.py class UNet2DModel (line 30) | class UNet2DModel(nn.Layer, ConfigMixin): method __init__ (line 33) | def __init__( method forward (line 141) | def forward(self, sample: paddle.Tensor, timestep: Union[paddle.Tensor... FILE: modules/image/text_to_image/stable_diffusion/diffusers/models/unet_2d_condition.py class UNet2DConditionModel (line 29) | class UNet2DConditionModel(nn.Layer, ConfigMixin): method __init__ (line 32) | def __init__( method forward (line 138) | def forward( FILE: modules/image/text_to_image/stable_diffusion/diffusers/models/unet_blocks.py function get_down_block (line 27) | def get_down_block( function get_up_block (line 114) | def get_up_block( class UNetMidBlock2D (line 201) | class UNetMidBlock2D(nn.Layer): method __init__ (line 203) | def __init__( method forward (line 267) | def forward(self, hidden_states, temb=None, encoder_states=None): class UNetMidBlock2DCrossAttn (line 279) | class UNetMidBlock2DCrossAttn(nn.Layer): method __init__ (line 281) | def __init__( method forward (line 346) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class AttnDownBlock2D (line 355) | class AttnDownBlock2D(nn.Layer): method __init__ (line 357) | def __init__( method forward (line 418) | def forward(self, hidden_states, temb=None): class CrossAttnDownBlock2D (line 435) | class CrossAttnDownBlock2D(nn.Layer): method __init__ (line 437) | def __init__( method forward (line 499) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class DownBlock2D (line 516) | class DownBlock2D(nn.Layer): method __init__ (line 518) | def __init__( method forward (line 566) | def forward(self, hidden_states, temb=None): class DownEncoderBlock2D (line 582) | class DownEncoderBlock2D(nn.Layer): method __init__ (line 584) | def __init__( method forward (line 631) | def forward(self, hidden_states): class AttnDownEncoderBlock2D (line 642) | class AttnDownEncoderBlock2D(nn.Layer): method __init__ (line 644) | def __init__( method forward (line 702) | def forward(self, hidden_states): class AttnSkipDownBlock2D (line 714) | class AttnSkipDownBlock2D(nn.Layer): method __init__ (line 716) | def __init__( method forward (line 786) | def forward(self, hidden_states, temb=None, skip_sample=None): class SkipDownBlock2D (line 806) | class SkipDownBlock2D(nn.Layer): method __init__ (line 808) | def __init__( method forward (line 866) | def forward(self, hidden_states, temb=None, skip_sample=None): class AttnUpBlock2D (line 885) | class AttnUpBlock2D(nn.Layer): method __init__ (line 887) | def __init__( method forward (line 944) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class CrossAttnUpBlock2D (line 962) | class CrossAttnUpBlock2D(nn.Layer): method __init__ (line 964) | def __init__( method forward (line 1023) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, e... class UpBlock2D (line 1041) | class UpBlock2D(nn.Layer): method __init__ (line 1043) | def __init__( method forward (line 1087) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class UpDecoderBlock2D (line 1104) | class UpDecoderBlock2D(nn.Layer): method __init__ (line 1106) | def __init__( method forward (line 1147) | def forward(self, hidden_states): class AttnUpDecoderBlock2D (line 1158) | class AttnUpDecoderBlock2D(nn.Layer): method __init__ (line 1160) | def __init__( method forward (line 1212) | def forward(self, hidden_states): class AttnSkipUpBlock2D (line 1224) | class AttnSkipUpBlock2D(nn.Layer): method __init__ (line 1226) | def __init__( method forward (line 1307) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... class SkipUpBlock2D (line 1335) | class SkipUpBlock2D(nn.Layer): method __init__ (line 1337) | def __init__( method forward (line 1405) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... FILE: modules/image/text_to_image/stable_diffusion/diffusers/models/vae.py class Encoder (line 25) | class Encoder(nn.Layer): method __init__ (line 27) | def __init__( method forward (line 86) | def forward(self, x): class Decoder (line 105) | class Decoder(nn.Layer): method __init__ (line 107) | def __init__( method forward (line 166) | def forward(self, z): class VectorQuantizer (line 185) | class VectorQuantizer(nn.Layer): method __init__ (line 194) | def __init__(self, n_e, e_dim, beta, remap=None, unknown_index="random... method remap_to_used (line 219) | def remap_to_used(self, inds): method unmap_to_all (line 233) | def unmap_to_all(self, inds): method forward (line 243) | def forward(self, z): method get_codebook_entry (line 279) | def get_codebook_entry(self, indices, shape): class DiagonalGaussianDistribution (line 297) | class DiagonalGaussianDistribution(object): method __init__ (line 299) | def __init__(self, parameters, deterministic=False): method sample (line 309) | def sample(self): method kl (line 313) | def kl(self, other=None): method nll (line 326) | def nll(self, sample, dims=[1, 2, 3]): method mode (line 332) | def mode(self): class VQModel (line 336) | class VQModel(ConfigMixin): method __init__ (line 339) | def __init__( method encode (line 383) | def encode(self, x): method decode (line 388) | def decode(self, h, force_not_quantize=False): method forward (line 398) | def forward(self, sample): class AutoencoderKL (line 405) | class AutoencoderKL(nn.Layer, ConfigMixin): method __init__ (line 408) | def __init__( method encode (line 446) | def encode(self, x): method decode (line 452) | def decode(self, z): method forward (line 457) | def forward(self, sample, sample_posterior=False): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_ddim.py function betas_for_alpha_bar (line 27) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDIMScheduler (line 50) | class DDIMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 53) | def __init__( method _get_variance (line 93) | def _get_variance(self, timestep, prev_timestep): method set_timesteps (line 103) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 110) | def step( method add_noise (line 172) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 181) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_ddpm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDPMScheduler (line 49) | class DDPMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 90) | def set_timesteps(self, num_inference_steps): method _get_variance (line 97) | def _get_variance(self, t, predicted_variance=None, variance_type=None): method step (line 130) | def step( method add_noise (line 181) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 190) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_karras_ve.py class KarrasVeScheduler (line 24) | class KarrasVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 35) | def __init__( method set_timesteps (line 70) | def set_timesteps(self, num_inference_steps): method add_noise_to_input (line 79) | def add_noise_to_input(self, sample, sigma, generator=None): method step (line 96) | def step( method step_correct (line 109) | def step_correct( method add_noise (line 123) | def add_noise(self, original_samples, noise, timesteps): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_lms_discrete.py class LMSDiscreteScheduler (line 25) | class LMSDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 28) | def __init__( method get_lms_coefficient (line 65) | def get_lms_coefficient(self, order, t, current_order): method set_timesteps (line 82) | def set_timesteps(self, num_inference_steps): method step (line 97) | def step( method add_noise (line 125) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 132) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_pndm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class PNDMScheduler (line 49) | class PNDMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 100) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 125) | def step( method step_prk (line 136) | def step_prk( method step_plms (line 170) | def step_plms( method _get_prev_sample (line 214) | def _get_prev_sample(self, sample, timestep, timestep_prev, model_outp... method add_noise (line 248) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 257) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_sde_ve.py class ScoreSdeVeScheduler (line 26) | class ScoreSdeVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 39) | def __init__( method set_timesteps (line 61) | def set_timesteps(self, num_inference_steps, sampling_eps=None): method set_sigmas (line 71) | def set_sigmas(self, num_inference_steps, sigma_min=None, sigma_max=No... method get_adjacent_sigma (line 89) | def get_adjacent_sigma(self, timesteps, t): method set_seed (line 98) | def set_seed(self, seed): method step_pred (line 107) | def step_pred( method step_correct (line 141) | def step_correct( method __len__ (line 171) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_sde_vp.py class ScoreSdeVpScheduler (line 24) | class ScoreSdeVpScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 27) | def __init__(self, num_train_timesteps=2000, beta_min=0.1, beta_max=20... method set_timesteps (line 33) | def set_timesteps(self, num_inference_steps): method step_pred (line 36) | def step_pred(self, score, x, t): method __len__ (line 58) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion/diffusers/schedulers/scheduling_utils.py class SchedulerMixin (line 22) | class SchedulerMixin: method set_format (line 27) | def set_format(self, tensor_format="pd"): method clip (line 36) | def clip(self, tensor, min_value=None, max_value=None): method log (line 46) | def log(self, tensor): method match_shape (line 56) | def match_shape(self, values: Union[np.ndarray, paddle.Tensor], broadc... method norm (line 76) | def norm(self, tensor): method randn_like (line 85) | def randn_like(self, tensor, generator=None): method zeros_like (line 95) | def zeros_like(self, tensor): FILE: modules/image/text_to_image/stable_diffusion/module.py class StableDiffusion (line 50) | class StableDiffusion: method __init__ (line 52) | def __init__(self): method generate_image (line 105) | def generate_image(self, method serving_method (line 253) | def serving_method(self, text_prompts, **kwargs): method run_cmd (line 261) | def run_cmd(self, argvs): method add_module_config_arg (line 289) | def add_module_config_arg(self): method add_module_input_arg (line 336) | def add_module_input_arg(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/clip/clip/layers.py function multi_head_attention_forward (line 12) | def multi_head_attention_forward(x: Tensor, class MultiHeadAttention (line 47) | class MultiHeadAttention(nn.Layer): # without attention mask method __init__ (line 49) | def __init__(self, emb_dim: int, num_heads: int): method forward (line 61) | def forward(self, x, attn_mask=None): # x is in shape[max_len,batch_s... class Identity (line 74) | class Identity(nn.Layer): method __init__ (line 76) | def __init__(self): method forward (line 79) | def forward(self, x): class Bottleneck (line 83) | class Bottleneck(nn.Layer): method __init__ (line 86) | def __init__(self, inplanes, planes, stride=1): method forward (line 111) | def forward(self, x): class AttentionPool2d (line 127) | class AttentionPool2d(nn.Layer): method __init__ (line 129) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 143) | def forward(self, x): class QuickGELU (line 155) | class QuickGELU(nn.Layer): method forward (line 157) | def forward(self, x): class ResidualAttentionBlock (line 161) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 163) | def __init__(self, d_model: int, n_head: int, attn_mask=None): method attention (line 173) | def attention(self, x): method forward (line 178) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion_img2img/clip/clip/model.py class ModifiedResNet (line 15) | class ModifiedResNet(nn.Layer): method __init__ (line 23) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 48) | def _make_layer(self, planes, blocks, stride=1): method forward (line 57) | def forward(self, x): class Transformer (line 76) | class Transformer(nn.Layer): method __init__ (line 78) | def __init__(self, width: int, layers: int, heads: int, attn_mask=None): method forward (line 84) | def forward(self, x): class VisualTransformer (line 88) | class VisualTransformer(nn.Layer): method __init__ (line 90) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 113) | def forward(self, x): class TextTransformer (line 132) | class TextTransformer(nn.Layer): method __init__ (line 134) | def __init__(self, context_length: int, vocab_size: int, transformer_w... method build_attention_mask (line 148) | def build_attention_mask(self): method forward (line 159) | def forward(self, text): class CLIP (line 169) | class CLIP(nn.Layer): method __init__ (line 171) | def __init__( method build_attention_mask (line 217) | def build_attention_mask(self): method encode_image (line 228) | def encode_image(self, image): method encode_text (line 231) | def encode_text(self, text): method forward (line 245) | def forward(self, image, text): FILE: modules/image/text_to_image/stable_diffusion_img2img/clip/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 64) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 83) | def bpe(self, token): method encode (line 124) | def encode(self, text): method decode (line 132) | def decode(self, tokens): FILE: modules/image/text_to_image/stable_diffusion_img2img/clip/clip/utils.py function tokenize (line 35) | def tokenize(texts: Union[str, List[str]], context_length: int = 77): function build_model (line 67) | def build_model(name='VITL14'): function build_vitl14_language_model (line 82) | def build_vitl14_language_model(): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/configuration_utils.py class ConfigMixin (line 38) | class ConfigMixin: method register_to_config (line 47) | def register_to_config(self, **kwargs): method save_config (line 69) | def save_config(self, save_directory: Union[str, os.PathLike], push_to... method from_config (line 92) | def from_config(cls, pretrained_model_name_or_path: Union[str, os.Path... method get_config_dict (line 105) | def get_config_dict(cls, pretrained_model_name_or_path: Union[str, os.... method extract_init_dict (line 180) | def extract_init_dict(cls, config_dict, **kwargs): method _dict_from_json_file (line 208) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __repr__ (line 213) | def __repr__(self): method config (line 217) | def config(self) -> Dict[str, Any]: method to_json_string (line 220) | def to_json_string(self) -> str: method to_json_file (line 230) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): class FrozenDict (line 242) | class FrozenDict(OrderedDict): method __init__ (line 244) | def __init__(self, *args, **kwargs): method __delitem__ (line 252) | def __delitem__(self, *args, **kwargs): method setdefault (line 255) | def setdefault(self, *args, **kwargs): method pop (line 258) | def pop(self, *args, **kwargs): method update (line 261) | def update(self, *args, **kwargs): method __setattr__ (line 264) | def __setattr__(self, name, value): method __setitem__ (line 269) | def __setitem__(self, name, value): function register_to_config (line 275) | def register_to_config(init): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/models/attention.py function finfo (line 23) | def finfo(dtype): class AttentionBlockNew (line 35) | class AttentionBlockNew(nn.Layer): method __init__ (line 43) | def __init__( method transpose_for_scores (line 66) | def transpose_for_scores(self, projection: paddle.Tensor) -> paddle.Te... method forward (line 72) | def forward(self, hidden_states): method set_weight (line 113) | def set_weight(self, attn_layer): class SpatialTransformer (line 162) | class SpatialTransformer(nn.Layer): method __init__ (line 168) | def __init__(self, in_channels, n_heads, d_head, depth=1, dropout=0.0,... method forward (line 185) | def forward(self, x, context=None): method set_weight (line 198) | def set_weight(self, layer): class BasicTransformerBlock (line 205) | class BasicTransformerBlock(nn.Layer): method __init__ (line 207) | def __init__(self, dim, n_heads, d_head, dropout=0.0, context_dim=None... method forward (line 222) | def forward(self, x, context=None): class CrossAttention (line 229) | class CrossAttention(nn.Layer): method __init__ (line 231) | def __init__(self, query_dim, context_dim=None, heads=8, dim_head=64, ... method reshape_heads_to_batch_dim (line 245) | def reshape_heads_to_batch_dim(self, tensor): method reshape_batch_dim_to_heads (line 252) | def reshape_batch_dim_to_heads(self, tensor): method forward (line 259) | def forward(self, x, context=None, mask=None): class FeedForward (line 289) | class FeedForward(nn.Layer): method __init__ (line 291) | def __init__(self, dim, dim_out=None, mult=4, glu=False, dropout=0.0): method forward (line 299) | def forward(self, x): class GEGLU (line 304) | class GEGLU(nn.Layer): method __init__ (line 306) | def __init__(self, dim_in, dim_out): method forward (line 310) | def forward(self, x): class NIN (line 316) | class NIN(nn.Layer): method __init__ (line 318) | def __init__(self, in_dim, num_units, init_scale=0.1): function exists (line 328) | def exists(val): function default (line 332) | def default(val, d): class AttentionBlock (line 339) | class AttentionBlock(nn.Layer): method __init__ (line 347) | def __init__( method set_weights (line 403) | def set_weights(self, layer): method forward (line 430) | def forward(self, x, encoder_out=None): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/models/embeddings.py function get_timestep_embedding (line 22) | def get_timestep_embedding(timesteps, class TimestepEmbedding (line 61) | class TimestepEmbedding(nn.Layer): method __init__ (line 63) | def __init__(self, channel, time_embed_dim, act_fn="silu"): method forward (line 72) | def forward(self, sample): class Timesteps (line 82) | class Timesteps(nn.Layer): method __init__ (line 84) | def __init__(self, num_channels, flip_sin_to_cos, downscale_freq_shift): method forward (line 90) | def forward(self, timesteps): class GaussianFourierProjection (line 100) | class GaussianFourierProjection(nn.Layer): method __init__ (line 103) | def __init__(self, embedding_size=256, scale=1.0): method forward (line 112) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/models/resnet.py function pad_new (line 22) | def pad_new(x, pad, mode="constant", value=0): class Upsample2D (line 54) | class Upsample2D(nn.Layer): method __init__ (line 63) | def __init__(self, channels, use_conv=False, use_conv_transpose=False,... method forward (line 83) | def forward(self, x): class Downsample2D (line 100) | class Downsample2D(nn.Layer): method __init__ (line 109) | def __init__(self, channels, use_conv=False, out_channels=None, paddin... method forward (line 133) | def forward(self, x): class FirUpsample2D (line 145) | class FirUpsample2D(nn.Layer): method __init__ (line 147) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _upsample_2d (line 156) | def _upsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 223) | def forward(self, x): class FirDownsample2D (line 233) | class FirDownsample2D(nn.Layer): method __init__ (line 235) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _downsample_2d (line 244) | def _downsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 286) | def forward(self, x): class ResnetBlock (line 296) | class ResnetBlock(nn.Layer): method __init__ (line 298) | def __init__( method forward (line 377) | def forward(self, x, temb, hey=False): class Mish (line 414) | class Mish(nn.Layer): method forward (line 416) | def forward(self, x): function upsample_2d (line 420) | def upsample_2d(x, k=None, factor=2, gain=1): function downsample_2d (line 451) | def downsample_2d(x, k=None, factor=2, gain=1): function upfirdn2d_native (line 483) | def upfirdn2d_native(input, kernel, up=1, down=1, pad=(0, 0)): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/models/unet_2d.py class UNet2DModel (line 30) | class UNet2DModel(nn.Layer, ConfigMixin): method __init__ (line 33) | def __init__( method forward (line 141) | def forward(self, sample: paddle.Tensor, timestep: Union[paddle.Tensor... FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/models/unet_2d_condition.py class UNet2DConditionModel (line 29) | class UNet2DConditionModel(nn.Layer, ConfigMixin): method __init__ (line 32) | def __init__( method forward (line 138) | def forward( FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/models/unet_blocks.py function get_down_block (line 27) | def get_down_block( function get_up_block (line 114) | def get_up_block( class UNetMidBlock2D (line 201) | class UNetMidBlock2D(nn.Layer): method __init__ (line 203) | def __init__( method forward (line 267) | def forward(self, hidden_states, temb=None, encoder_states=None): class UNetMidBlock2DCrossAttn (line 279) | class UNetMidBlock2DCrossAttn(nn.Layer): method __init__ (line 281) | def __init__( method forward (line 346) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class AttnDownBlock2D (line 355) | class AttnDownBlock2D(nn.Layer): method __init__ (line 357) | def __init__( method forward (line 418) | def forward(self, hidden_states, temb=None): class CrossAttnDownBlock2D (line 435) | class CrossAttnDownBlock2D(nn.Layer): method __init__ (line 437) | def __init__( method forward (line 499) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class DownBlock2D (line 516) | class DownBlock2D(nn.Layer): method __init__ (line 518) | def __init__( method forward (line 566) | def forward(self, hidden_states, temb=None): class DownEncoderBlock2D (line 582) | class DownEncoderBlock2D(nn.Layer): method __init__ (line 584) | def __init__( method forward (line 631) | def forward(self, hidden_states): class AttnDownEncoderBlock2D (line 642) | class AttnDownEncoderBlock2D(nn.Layer): method __init__ (line 644) | def __init__( method forward (line 702) | def forward(self, hidden_states): class AttnSkipDownBlock2D (line 714) | class AttnSkipDownBlock2D(nn.Layer): method __init__ (line 716) | def __init__( method forward (line 786) | def forward(self, hidden_states, temb=None, skip_sample=None): class SkipDownBlock2D (line 806) | class SkipDownBlock2D(nn.Layer): method __init__ (line 808) | def __init__( method forward (line 866) | def forward(self, hidden_states, temb=None, skip_sample=None): class AttnUpBlock2D (line 885) | class AttnUpBlock2D(nn.Layer): method __init__ (line 887) | def __init__( method forward (line 944) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class CrossAttnUpBlock2D (line 962) | class CrossAttnUpBlock2D(nn.Layer): method __init__ (line 964) | def __init__( method forward (line 1023) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, e... class UpBlock2D (line 1041) | class UpBlock2D(nn.Layer): method __init__ (line 1043) | def __init__( method forward (line 1087) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class UpDecoderBlock2D (line 1104) | class UpDecoderBlock2D(nn.Layer): method __init__ (line 1106) | def __init__( method forward (line 1147) | def forward(self, hidden_states): class AttnUpDecoderBlock2D (line 1158) | class AttnUpDecoderBlock2D(nn.Layer): method __init__ (line 1160) | def __init__( method forward (line 1212) | def forward(self, hidden_states): class AttnSkipUpBlock2D (line 1224) | class AttnSkipUpBlock2D(nn.Layer): method __init__ (line 1226) | def __init__( method forward (line 1307) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... class SkipUpBlock2D (line 1335) | class SkipUpBlock2D(nn.Layer): method __init__ (line 1337) | def __init__( method forward (line 1405) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/models/vae.py class Encoder (line 25) | class Encoder(nn.Layer): method __init__ (line 27) | def __init__( method forward (line 86) | def forward(self, x): class Decoder (line 105) | class Decoder(nn.Layer): method __init__ (line 107) | def __init__( method forward (line 166) | def forward(self, z): class VectorQuantizer (line 185) | class VectorQuantizer(nn.Layer): method __init__ (line 194) | def __init__(self, n_e, e_dim, beta, remap=None, unknown_index="random... method remap_to_used (line 219) | def remap_to_used(self, inds): method unmap_to_all (line 233) | def unmap_to_all(self, inds): method forward (line 243) | def forward(self, z): method get_codebook_entry (line 279) | def get_codebook_entry(self, indices, shape): class DiagonalGaussianDistribution (line 297) | class DiagonalGaussianDistribution(object): method __init__ (line 299) | def __init__(self, parameters, deterministic=False): method sample (line 309) | def sample(self): method kl (line 313) | def kl(self, other=None): method nll (line 326) | def nll(self, sample, dims=[1, 2, 3]): method mode (line 332) | def mode(self): class VQModel (line 336) | class VQModel(ConfigMixin): method __init__ (line 339) | def __init__( method encode (line 383) | def encode(self, x): method decode (line 388) | def decode(self, h, force_not_quantize=False): method forward (line 398) | def forward(self, sample): class AutoencoderKL (line 405) | class AutoencoderKL(nn.Layer, ConfigMixin): method __init__ (line 408) | def __init__( method encode (line 446) | def encode(self, x): method decode (line 452) | def decode(self, z): method forward (line 457) | def forward(self, sample, sample_posterior=False): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_ddim.py function betas_for_alpha_bar (line 27) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDIMScheduler (line 50) | class DDIMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 53) | def __init__( method _get_variance (line 93) | def _get_variance(self, timestep, prev_timestep): method set_timesteps (line 103) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 110) | def step( method add_noise (line 172) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 181) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_ddpm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDPMScheduler (line 49) | class DDPMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 90) | def set_timesteps(self, num_inference_steps): method _get_variance (line 97) | def _get_variance(self, t, predicted_variance=None, variance_type=None): method step (line 130) | def step( method add_noise (line 181) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 190) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_karras_ve.py class KarrasVeScheduler (line 24) | class KarrasVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 35) | def __init__( method set_timesteps (line 70) | def set_timesteps(self, num_inference_steps): method add_noise_to_input (line 79) | def add_noise_to_input(self, sample, sigma, generator=None): method step (line 96) | def step( method step_correct (line 109) | def step_correct( method add_noise (line 123) | def add_noise(self, original_samples, noise, timesteps): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_lms_discrete.py class LMSDiscreteScheduler (line 25) | class LMSDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 28) | def __init__( method get_lms_coefficient (line 65) | def get_lms_coefficient(self, order, t, current_order): method set_timesteps (line 82) | def set_timesteps(self, num_inference_steps): method step (line 97) | def step( method add_noise (line 125) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 132) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_pndm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class PNDMScheduler (line 49) | class PNDMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 100) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 125) | def step( method step_prk (line 136) | def step_prk( method step_plms (line 170) | def step_plms( method _get_prev_sample (line 214) | def _get_prev_sample(self, sample, timestep, timestep_prev, model_outp... method add_noise (line 248) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 257) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_sde_ve.py class ScoreSdeVeScheduler (line 26) | class ScoreSdeVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 39) | def __init__( method set_timesteps (line 61) | def set_timesteps(self, num_inference_steps, sampling_eps=None): method set_sigmas (line 71) | def set_sigmas(self, num_inference_steps, sigma_min=None, sigma_max=No... method get_adjacent_sigma (line 89) | def get_adjacent_sigma(self, timesteps, t): method set_seed (line 98) | def set_seed(self, seed): method step_pred (line 107) | def step_pred( method step_correct (line 141) | def step_correct( method __len__ (line 171) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_sde_vp.py class ScoreSdeVpScheduler (line 24) | class ScoreSdeVpScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 27) | def __init__(self, num_train_timesteps=2000, beta_min=0.1, beta_max=20... method set_timesteps (line 33) | def set_timesteps(self, num_inference_steps): method step_pred (line 36) | def step_pred(self, score, x, t): method __len__ (line 58) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/diffusers/schedulers/scheduling_utils.py class SchedulerMixin (line 22) | class SchedulerMixin: method set_format (line 27) | def set_format(self, tensor_format="pd"): method clip (line 36) | def clip(self, tensor, min_value=None, max_value=None): method log (line 46) | def log(self, tensor): method match_shape (line 56) | def match_shape(self, values: Union[np.ndarray, paddle.Tensor], broadc... method norm (line 76) | def norm(self, tensor): method randn_like (line 85) | def randn_like(self, tensor, generator=None): method zeros_like (line 95) | def zeros_like(self, tensor): FILE: modules/image/text_to_image/stable_diffusion_img2img/module.py class StableDiffusionImg2Img (line 54) | class StableDiffusionImg2Img: method __init__ (line 56) | def __init__(self): method generate_image (line 109) | def generate_image(self, method serving_method (line 309) | def serving_method(self, text_prompts, init_image, **kwargs): method run_cmd (line 318) | def run_cmd(self, argvs): method add_module_config_arg (line 347) | def add_module_config_arg(self): method add_module_input_arg (line 394) | def add_module_input_arg(self): FILE: modules/image/text_to_image/stable_diffusion_img2img/utils.py function preprocess (line 7) | def preprocess(image): FILE: modules/image/text_to_image/stable_diffusion_inpainting/clip/clip/layers.py function multi_head_attention_forward (line 12) | def multi_head_attention_forward(x: Tensor, class MultiHeadAttention (line 47) | class MultiHeadAttention(nn.Layer): # without attention mask method __init__ (line 49) | def __init__(self, emb_dim: int, num_heads: int): method forward (line 61) | def forward(self, x, attn_mask=None): # x is in shape[max_len,batch_s... class Identity (line 74) | class Identity(nn.Layer): method __init__ (line 76) | def __init__(self): method forward (line 79) | def forward(self, x): class Bottleneck (line 83) | class Bottleneck(nn.Layer): method __init__ (line 86) | def __init__(self, inplanes, planes, stride=1): method forward (line 111) | def forward(self, x): class AttentionPool2d (line 127) | class AttentionPool2d(nn.Layer): method __init__ (line 129) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 143) | def forward(self, x): class QuickGELU (line 155) | class QuickGELU(nn.Layer): method forward (line 157) | def forward(self, x): class ResidualAttentionBlock (line 161) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 163) | def __init__(self, d_model: int, n_head: int, attn_mask=None): method attention (line 173) | def attention(self, x): method forward (line 178) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion_inpainting/clip/clip/model.py class ModifiedResNet (line 15) | class ModifiedResNet(nn.Layer): method __init__ (line 23) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 48) | def _make_layer(self, planes, blocks, stride=1): method forward (line 57) | def forward(self, x): class Transformer (line 76) | class Transformer(nn.Layer): method __init__ (line 78) | def __init__(self, width: int, layers: int, heads: int, attn_mask=None): method forward (line 84) | def forward(self, x): class VisualTransformer (line 88) | class VisualTransformer(nn.Layer): method __init__ (line 90) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 113) | def forward(self, x): class TextTransformer (line 132) | class TextTransformer(nn.Layer): method __init__ (line 134) | def __init__(self, context_length: int, vocab_size: int, transformer_w... method build_attention_mask (line 148) | def build_attention_mask(self): method forward (line 159) | def forward(self, text): class CLIP (line 169) | class CLIP(nn.Layer): method __init__ (line 171) | def __init__( method build_attention_mask (line 217) | def build_attention_mask(self): method encode_image (line 228) | def encode_image(self, image): method encode_text (line 231) | def encode_text(self, text): method forward (line 245) | def forward(self, image, text): FILE: modules/image/text_to_image/stable_diffusion_inpainting/clip/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 64) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 83) | def bpe(self, token): method encode (line 124) | def encode(self, text): method decode (line 132) | def decode(self, tokens): FILE: modules/image/text_to_image/stable_diffusion_inpainting/clip/clip/utils.py function tokenize (line 35) | def tokenize(texts: Union[str, List[str]], context_length: int = 77): function build_model (line 67) | def build_model(name='VITL14'): function build_vitl14_language_model (line 82) | def build_vitl14_language_model(): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/configuration_utils.py class ConfigMixin (line 38) | class ConfigMixin: method register_to_config (line 47) | def register_to_config(self, **kwargs): method save_config (line 69) | def save_config(self, save_directory: Union[str, os.PathLike], push_to... method from_config (line 92) | def from_config(cls, pretrained_model_name_or_path: Union[str, os.Path... method get_config_dict (line 105) | def get_config_dict(cls, pretrained_model_name_or_path: Union[str, os.... method extract_init_dict (line 180) | def extract_init_dict(cls, config_dict, **kwargs): method _dict_from_json_file (line 208) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __repr__ (line 213) | def __repr__(self): method config (line 217) | def config(self) -> Dict[str, Any]: method to_json_string (line 220) | def to_json_string(self) -> str: method to_json_file (line 230) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): class FrozenDict (line 242) | class FrozenDict(OrderedDict): method __init__ (line 244) | def __init__(self, *args, **kwargs): method __delitem__ (line 252) | def __delitem__(self, *args, **kwargs): method setdefault (line 255) | def setdefault(self, *args, **kwargs): method pop (line 258) | def pop(self, *args, **kwargs): method update (line 261) | def update(self, *args, **kwargs): method __setattr__ (line 264) | def __setattr__(self, name, value): method __setitem__ (line 269) | def __setitem__(self, name, value): function register_to_config (line 275) | def register_to_config(init): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/models/attention.py function finfo (line 23) | def finfo(dtype): class AttentionBlockNew (line 35) | class AttentionBlockNew(nn.Layer): method __init__ (line 43) | def __init__( method transpose_for_scores (line 66) | def transpose_for_scores(self, projection: paddle.Tensor) -> paddle.Te... method forward (line 72) | def forward(self, hidden_states): method set_weight (line 113) | def set_weight(self, attn_layer): class SpatialTransformer (line 162) | class SpatialTransformer(nn.Layer): method __init__ (line 168) | def __init__(self, in_channels, n_heads, d_head, depth=1, dropout=0.0,... method forward (line 185) | def forward(self, x, context=None): method set_weight (line 198) | def set_weight(self, layer): class BasicTransformerBlock (line 205) | class BasicTransformerBlock(nn.Layer): method __init__ (line 207) | def __init__(self, dim, n_heads, d_head, dropout=0.0, context_dim=None... method forward (line 222) | def forward(self, x, context=None): class CrossAttention (line 229) | class CrossAttention(nn.Layer): method __init__ (line 231) | def __init__(self, query_dim, context_dim=None, heads=8, dim_head=64, ... method reshape_heads_to_batch_dim (line 245) | def reshape_heads_to_batch_dim(self, tensor): method reshape_batch_dim_to_heads (line 252) | def reshape_batch_dim_to_heads(self, tensor): method forward (line 259) | def forward(self, x, context=None, mask=None): class FeedForward (line 289) | class FeedForward(nn.Layer): method __init__ (line 291) | def __init__(self, dim, dim_out=None, mult=4, glu=False, dropout=0.0): method forward (line 299) | def forward(self, x): class GEGLU (line 304) | class GEGLU(nn.Layer): method __init__ (line 306) | def __init__(self, dim_in, dim_out): method forward (line 310) | def forward(self, x): class NIN (line 316) | class NIN(nn.Layer): method __init__ (line 318) | def __init__(self, in_dim, num_units, init_scale=0.1): function exists (line 328) | def exists(val): function default (line 332) | def default(val, d): class AttentionBlock (line 339) | class AttentionBlock(nn.Layer): method __init__ (line 347) | def __init__( method set_weights (line 403) | def set_weights(self, layer): method forward (line 430) | def forward(self, x, encoder_out=None): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/models/embeddings.py function get_timestep_embedding (line 22) | def get_timestep_embedding(timesteps, class TimestepEmbedding (line 61) | class TimestepEmbedding(nn.Layer): method __init__ (line 63) | def __init__(self, channel, time_embed_dim, act_fn="silu"): method forward (line 72) | def forward(self, sample): class Timesteps (line 82) | class Timesteps(nn.Layer): method __init__ (line 84) | def __init__(self, num_channels, flip_sin_to_cos, downscale_freq_shift): method forward (line 90) | def forward(self, timesteps): class GaussianFourierProjection (line 100) | class GaussianFourierProjection(nn.Layer): method __init__ (line 103) | def __init__(self, embedding_size=256, scale=1.0): method forward (line 112) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/models/resnet.py function pad_new (line 22) | def pad_new(x, pad, mode="constant", value=0): class Upsample2D (line 54) | class Upsample2D(nn.Layer): method __init__ (line 63) | def __init__(self, channels, use_conv=False, use_conv_transpose=False,... method forward (line 83) | def forward(self, x): class Downsample2D (line 100) | class Downsample2D(nn.Layer): method __init__ (line 109) | def __init__(self, channels, use_conv=False, out_channels=None, paddin... method forward (line 133) | def forward(self, x): class FirUpsample2D (line 145) | class FirUpsample2D(nn.Layer): method __init__ (line 147) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _upsample_2d (line 156) | def _upsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 223) | def forward(self, x): class FirDownsample2D (line 233) | class FirDownsample2D(nn.Layer): method __init__ (line 235) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _downsample_2d (line 244) | def _downsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 286) | def forward(self, x): class ResnetBlock (line 296) | class ResnetBlock(nn.Layer): method __init__ (line 298) | def __init__( method forward (line 377) | def forward(self, x, temb, hey=False): class Mish (line 414) | class Mish(nn.Layer): method forward (line 416) | def forward(self, x): function upsample_2d (line 420) | def upsample_2d(x, k=None, factor=2, gain=1): function downsample_2d (line 451) | def downsample_2d(x, k=None, factor=2, gain=1): function upfirdn2d_native (line 483) | def upfirdn2d_native(input, kernel, up=1, down=1, pad=(0, 0)): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/models/unet_2d.py class UNet2DModel (line 30) | class UNet2DModel(nn.Layer, ConfigMixin): method __init__ (line 33) | def __init__( method forward (line 141) | def forward(self, sample: paddle.Tensor, timestep: Union[paddle.Tensor... FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/models/unet_2d_condition.py class UNet2DConditionModel (line 29) | class UNet2DConditionModel(nn.Layer, ConfigMixin): method __init__ (line 32) | def __init__( method forward (line 138) | def forward( FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/models/unet_blocks.py function get_down_block (line 27) | def get_down_block( function get_up_block (line 114) | def get_up_block( class UNetMidBlock2D (line 201) | class UNetMidBlock2D(nn.Layer): method __init__ (line 203) | def __init__( method forward (line 267) | def forward(self, hidden_states, temb=None, encoder_states=None): class UNetMidBlock2DCrossAttn (line 279) | class UNetMidBlock2DCrossAttn(nn.Layer): method __init__ (line 281) | def __init__( method forward (line 346) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class AttnDownBlock2D (line 355) | class AttnDownBlock2D(nn.Layer): method __init__ (line 357) | def __init__( method forward (line 418) | def forward(self, hidden_states, temb=None): class CrossAttnDownBlock2D (line 435) | class CrossAttnDownBlock2D(nn.Layer): method __init__ (line 437) | def __init__( method forward (line 499) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class DownBlock2D (line 516) | class DownBlock2D(nn.Layer): method __init__ (line 518) | def __init__( method forward (line 566) | def forward(self, hidden_states, temb=None): class DownEncoderBlock2D (line 582) | class DownEncoderBlock2D(nn.Layer): method __init__ (line 584) | def __init__( method forward (line 631) | def forward(self, hidden_states): class AttnDownEncoderBlock2D (line 642) | class AttnDownEncoderBlock2D(nn.Layer): method __init__ (line 644) | def __init__( method forward (line 702) | def forward(self, hidden_states): class AttnSkipDownBlock2D (line 714) | class AttnSkipDownBlock2D(nn.Layer): method __init__ (line 716) | def __init__( method forward (line 786) | def forward(self, hidden_states, temb=None, skip_sample=None): class SkipDownBlock2D (line 806) | class SkipDownBlock2D(nn.Layer): method __init__ (line 808) | def __init__( method forward (line 866) | def forward(self, hidden_states, temb=None, skip_sample=None): class AttnUpBlock2D (line 885) | class AttnUpBlock2D(nn.Layer): method __init__ (line 887) | def __init__( method forward (line 944) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class CrossAttnUpBlock2D (line 962) | class CrossAttnUpBlock2D(nn.Layer): method __init__ (line 964) | def __init__( method forward (line 1023) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, e... class UpBlock2D (line 1041) | class UpBlock2D(nn.Layer): method __init__ (line 1043) | def __init__( method forward (line 1087) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class UpDecoderBlock2D (line 1104) | class UpDecoderBlock2D(nn.Layer): method __init__ (line 1106) | def __init__( method forward (line 1147) | def forward(self, hidden_states): class AttnUpDecoderBlock2D (line 1158) | class AttnUpDecoderBlock2D(nn.Layer): method __init__ (line 1160) | def __init__( method forward (line 1212) | def forward(self, hidden_states): class AttnSkipUpBlock2D (line 1224) | class AttnSkipUpBlock2D(nn.Layer): method __init__ (line 1226) | def __init__( method forward (line 1307) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... class SkipUpBlock2D (line 1335) | class SkipUpBlock2D(nn.Layer): method __init__ (line 1337) | def __init__( method forward (line 1405) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/models/vae.py class Encoder (line 25) | class Encoder(nn.Layer): method __init__ (line 27) | def __init__( method forward (line 86) | def forward(self, x): class Decoder (line 105) | class Decoder(nn.Layer): method __init__ (line 107) | def __init__( method forward (line 166) | def forward(self, z): class VectorQuantizer (line 185) | class VectorQuantizer(nn.Layer): method __init__ (line 194) | def __init__(self, n_e, e_dim, beta, remap=None, unknown_index="random... method remap_to_used (line 219) | def remap_to_used(self, inds): method unmap_to_all (line 233) | def unmap_to_all(self, inds): method forward (line 243) | def forward(self, z): method get_codebook_entry (line 279) | def get_codebook_entry(self, indices, shape): class DiagonalGaussianDistribution (line 297) | class DiagonalGaussianDistribution(object): method __init__ (line 299) | def __init__(self, parameters, deterministic=False): method sample (line 309) | def sample(self): method kl (line 313) | def kl(self, other=None): method nll (line 326) | def nll(self, sample, dims=[1, 2, 3]): method mode (line 332) | def mode(self): class VQModel (line 336) | class VQModel(ConfigMixin): method __init__ (line 339) | def __init__( method encode (line 383) | def encode(self, x): method decode (line 388) | def decode(self, h, force_not_quantize=False): method forward (line 398) | def forward(self, sample): class AutoencoderKL (line 405) | class AutoencoderKL(nn.Layer, ConfigMixin): method __init__ (line 408) | def __init__( method encode (line 446) | def encode(self, x): method decode (line 452) | def decode(self, z): method forward (line 457) | def forward(self, sample, sample_posterior=False): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_ddim.py function betas_for_alpha_bar (line 27) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDIMScheduler (line 50) | class DDIMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 53) | def __init__( method _get_variance (line 93) | def _get_variance(self, timestep, prev_timestep): method set_timesteps (line 103) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 110) | def step( method add_noise (line 172) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 181) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_ddpm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDPMScheduler (line 49) | class DDPMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 90) | def set_timesteps(self, num_inference_steps): method _get_variance (line 97) | def _get_variance(self, t, predicted_variance=None, variance_type=None): method step (line 130) | def step( method add_noise (line 181) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 190) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_karras_ve.py class KarrasVeScheduler (line 24) | class KarrasVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 35) | def __init__( method set_timesteps (line 70) | def set_timesteps(self, num_inference_steps): method add_noise_to_input (line 79) | def add_noise_to_input(self, sample, sigma, generator=None): method step (line 96) | def step( method step_correct (line 109) | def step_correct( method add_noise (line 123) | def add_noise(self, original_samples, noise, timesteps): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_lms_discrete.py class LMSDiscreteScheduler (line 25) | class LMSDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 28) | def __init__( method get_lms_coefficient (line 65) | def get_lms_coefficient(self, order, t, current_order): method set_timesteps (line 82) | def set_timesteps(self, num_inference_steps): method step (line 97) | def step( method add_noise (line 125) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 132) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_pndm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class PNDMScheduler (line 49) | class PNDMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 100) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 125) | def step( method step_prk (line 136) | def step_prk( method step_plms (line 170) | def step_plms( method _get_prev_sample (line 214) | def _get_prev_sample(self, sample, timestep, timestep_prev, model_outp... method add_noise (line 248) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 257) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_sde_ve.py class ScoreSdeVeScheduler (line 26) | class ScoreSdeVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 39) | def __init__( method set_timesteps (line 61) | def set_timesteps(self, num_inference_steps, sampling_eps=None): method set_sigmas (line 71) | def set_sigmas(self, num_inference_steps, sigma_min=None, sigma_max=No... method get_adjacent_sigma (line 89) | def get_adjacent_sigma(self, timesteps, t): method set_seed (line 98) | def set_seed(self, seed): method step_pred (line 107) | def step_pred( method step_correct (line 141) | def step_correct( method __len__ (line 171) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_sde_vp.py class ScoreSdeVpScheduler (line 24) | class ScoreSdeVpScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 27) | def __init__(self, num_train_timesteps=2000, beta_min=0.1, beta_max=20... method set_timesteps (line 33) | def set_timesteps(self, num_inference_steps): method step_pred (line 36) | def step_pred(self, score, x, t): method __len__ (line 58) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_inpainting/diffusers/schedulers/scheduling_utils.py class SchedulerMixin (line 22) | class SchedulerMixin: method set_format (line 27) | def set_format(self, tensor_format="pd"): method clip (line 36) | def clip(self, tensor, min_value=None, max_value=None): method log (line 46) | def log(self, tensor): method match_shape (line 56) | def match_shape(self, values: Union[np.ndarray, paddle.Tensor], broadc... method norm (line 76) | def norm(self, tensor): method randn_like (line 85) | def randn_like(self, tensor, generator=None): method zeros_like (line 95) | def zeros_like(self, tensor): FILE: modules/image/text_to_image/stable_diffusion_inpainting/module.py class StableDiffusionInpainting (line 55) | class StableDiffusionInpainting: method __init__ (line 57) | def __init__(self): method generate_image (line 110) | def generate_image(self, method serving_method (line 329) | def serving_method(self, text_prompts, init_image, mask_image, **kwargs): method run_cmd (line 340) | def run_cmd(self, argvs): method add_module_config_arg (line 367) | def add_module_config_arg(self): method add_module_input_arg (line 414) | def add_module_input_arg(self): FILE: modules/image/text_to_image/stable_diffusion_inpainting/utils.py function preprocess (line 7) | def preprocess(image): function preprocess_mask (line 19) | def preprocess_mask(mask): FILE: modules/image/text_to_image/stable_diffusion_waifu/clip/clip/layers.py function multi_head_attention_forward (line 12) | def multi_head_attention_forward(x: Tensor, class MultiHeadAttention (line 47) | class MultiHeadAttention(nn.Layer): # without attention mask method __init__ (line 49) | def __init__(self, emb_dim: int, num_heads: int): method forward (line 61) | def forward(self, x, attn_mask=None): # x is in shape[max_len,batch_s... class Identity (line 74) | class Identity(nn.Layer): method __init__ (line 76) | def __init__(self): method forward (line 79) | def forward(self, x): class Bottleneck (line 83) | class Bottleneck(nn.Layer): method __init__ (line 86) | def __init__(self, inplanes, planes, stride=1): method forward (line 111) | def forward(self, x): class AttentionPool2d (line 127) | class AttentionPool2d(nn.Layer): method __init__ (line 129) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 143) | def forward(self, x): class QuickGELU (line 155) | class QuickGELU(nn.Layer): method forward (line 157) | def forward(self, x): class ResidualAttentionBlock (line 161) | class ResidualAttentionBlock(nn.Layer): method __init__ (line 163) | def __init__(self, d_model: int, n_head: int, attn_mask=None): method attention (line 173) | def attention(self, x): method forward (line 178) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion_waifu/clip/clip/model.py class ModifiedResNet (line 15) | class ModifiedResNet(nn.Layer): method __init__ (line 23) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 48) | def _make_layer(self, planes, blocks, stride=1): method forward (line 57) | def forward(self, x): class Transformer (line 76) | class Transformer(nn.Layer): method __init__ (line 78) | def __init__(self, width: int, layers: int, heads: int, attn_mask=None): method forward (line 84) | def forward(self, x): class VisualTransformer (line 88) | class VisualTransformer(nn.Layer): method __init__ (line 90) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method forward (line 113) | def forward(self, x): class TextTransformer (line 132) | class TextTransformer(nn.Layer): method __init__ (line 134) | def __init__(self, context_length: int, vocab_size: int, transformer_w... method build_attention_mask (line 148) | def build_attention_mask(self): method forward (line 159) | def forward(self, text): class CLIP (line 169) | class CLIP(nn.Layer): method __init__ (line 171) | def __init__( method build_attention_mask (line 217) | def build_attention_mask(self): method encode_image (line 228) | def encode_image(self, image): method encode_text (line 231) | def encode_text(self, text): method forward (line 245) | def forward(self, image, text): FILE: modules/image/text_to_image/stable_diffusion_waifu/clip/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 64) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 83) | def bpe(self, token): method encode (line 124) | def encode(self, text): method decode (line 132) | def decode(self, tokens): FILE: modules/image/text_to_image/stable_diffusion_waifu/clip/clip/utils.py function tokenize (line 35) | def tokenize(texts: Union[str, List[str]], context_length: int = 77): function build_model (line 67) | def build_model(name='VITL14'): function build_vitl14_language_model (line 82) | def build_vitl14_language_model(): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/configuration_utils.py class ConfigMixin (line 38) | class ConfigMixin: method register_to_config (line 47) | def register_to_config(self, **kwargs): method save_config (line 69) | def save_config(self, save_directory: Union[str, os.PathLike], push_to... method from_config (line 92) | def from_config(cls, pretrained_model_name_or_path: Union[str, os.Path... method get_config_dict (line 105) | def get_config_dict(cls, pretrained_model_name_or_path: Union[str, os.... method extract_init_dict (line 180) | def extract_init_dict(cls, config_dict, **kwargs): method _dict_from_json_file (line 208) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __repr__ (line 213) | def __repr__(self): method config (line 217) | def config(self) -> Dict[str, Any]: method to_json_string (line 220) | def to_json_string(self) -> str: method to_json_file (line 230) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): class FrozenDict (line 242) | class FrozenDict(OrderedDict): method __init__ (line 244) | def __init__(self, *args, **kwargs): method __delitem__ (line 252) | def __delitem__(self, *args, **kwargs): method setdefault (line 255) | def setdefault(self, *args, **kwargs): method pop (line 258) | def pop(self, *args, **kwargs): method update (line 261) | def update(self, *args, **kwargs): method __setattr__ (line 264) | def __setattr__(self, name, value): method __setitem__ (line 269) | def __setitem__(self, name, value): function register_to_config (line 275) | def register_to_config(init): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/models/attention.py function finfo (line 23) | def finfo(dtype): class AttentionBlockNew (line 35) | class AttentionBlockNew(nn.Layer): method __init__ (line 43) | def __init__( method transpose_for_scores (line 66) | def transpose_for_scores(self, projection: paddle.Tensor) -> paddle.Te... method forward (line 72) | def forward(self, hidden_states): method set_weight (line 113) | def set_weight(self, attn_layer): class SpatialTransformer (line 162) | class SpatialTransformer(nn.Layer): method __init__ (line 168) | def __init__(self, in_channels, n_heads, d_head, depth=1, dropout=0.0,... method forward (line 185) | def forward(self, x, context=None): method set_weight (line 198) | def set_weight(self, layer): class BasicTransformerBlock (line 205) | class BasicTransformerBlock(nn.Layer): method __init__ (line 207) | def __init__(self, dim, n_heads, d_head, dropout=0.0, context_dim=None... method forward (line 222) | def forward(self, x, context=None): class CrossAttention (line 229) | class CrossAttention(nn.Layer): method __init__ (line 231) | def __init__(self, query_dim, context_dim=None, heads=8, dim_head=64, ... method reshape_heads_to_batch_dim (line 245) | def reshape_heads_to_batch_dim(self, tensor): method reshape_batch_dim_to_heads (line 252) | def reshape_batch_dim_to_heads(self, tensor): method forward (line 259) | def forward(self, x, context=None, mask=None): class FeedForward (line 289) | class FeedForward(nn.Layer): method __init__ (line 291) | def __init__(self, dim, dim_out=None, mult=4, glu=False, dropout=0.0): method forward (line 299) | def forward(self, x): class GEGLU (line 304) | class GEGLU(nn.Layer): method __init__ (line 306) | def __init__(self, dim_in, dim_out): method forward (line 310) | def forward(self, x): class NIN (line 316) | class NIN(nn.Layer): method __init__ (line 318) | def __init__(self, in_dim, num_units, init_scale=0.1): function exists (line 328) | def exists(val): function default (line 332) | def default(val, d): class AttentionBlock (line 339) | class AttentionBlock(nn.Layer): method __init__ (line 347) | def __init__( method set_weights (line 403) | def set_weights(self, layer): method forward (line 430) | def forward(self, x, encoder_out=None): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/models/embeddings.py function get_timestep_embedding (line 22) | def get_timestep_embedding(timesteps, class TimestepEmbedding (line 61) | class TimestepEmbedding(nn.Layer): method __init__ (line 63) | def __init__(self, channel, time_embed_dim, act_fn="silu"): method forward (line 72) | def forward(self, sample): class Timesteps (line 82) | class Timesteps(nn.Layer): method __init__ (line 84) | def __init__(self, num_channels, flip_sin_to_cos, downscale_freq_shift): method forward (line 90) | def forward(self, timesteps): class GaussianFourierProjection (line 100) | class GaussianFourierProjection(nn.Layer): method __init__ (line 103) | def __init__(self, embedding_size=256, scale=1.0): method forward (line 112) | def forward(self, x): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/models/resnet.py function pad_new (line 22) | def pad_new(x, pad, mode="constant", value=0): class Upsample2D (line 54) | class Upsample2D(nn.Layer): method __init__ (line 63) | def __init__(self, channels, use_conv=False, use_conv_transpose=False,... method forward (line 83) | def forward(self, x): class Downsample2D (line 100) | class Downsample2D(nn.Layer): method __init__ (line 109) | def __init__(self, channels, use_conv=False, out_channels=None, paddin... method forward (line 133) | def forward(self, x): class FirUpsample2D (line 145) | class FirUpsample2D(nn.Layer): method __init__ (line 147) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _upsample_2d (line 156) | def _upsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 223) | def forward(self, x): class FirDownsample2D (line 233) | class FirDownsample2D(nn.Layer): method __init__ (line 235) | def __init__(self, channels=None, out_channels=None, use_conv=False, f... method _downsample_2d (line 244) | def _downsample_2d(self, x, w=None, k=None, factor=2, gain=1): method forward (line 286) | def forward(self, x): class ResnetBlock (line 296) | class ResnetBlock(nn.Layer): method __init__ (line 298) | def __init__( method forward (line 377) | def forward(self, x, temb, hey=False): class Mish (line 414) | class Mish(nn.Layer): method forward (line 416) | def forward(self, x): function upsample_2d (line 420) | def upsample_2d(x, k=None, factor=2, gain=1): function downsample_2d (line 451) | def downsample_2d(x, k=None, factor=2, gain=1): function upfirdn2d_native (line 483) | def upfirdn2d_native(input, kernel, up=1, down=1, pad=(0, 0)): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/models/unet_2d.py class UNet2DModel (line 30) | class UNet2DModel(nn.Layer, ConfigMixin): method __init__ (line 33) | def __init__( method forward (line 141) | def forward(self, sample: paddle.Tensor, timestep: Union[paddle.Tensor... FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/models/unet_2d_condition.py class UNet2DConditionModel (line 29) | class UNet2DConditionModel(nn.Layer, ConfigMixin): method __init__ (line 32) | def __init__( method forward (line 138) | def forward( FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/models/unet_blocks.py function get_down_block (line 27) | def get_down_block( function get_up_block (line 114) | def get_up_block( class UNetMidBlock2D (line 201) | class UNetMidBlock2D(nn.Layer): method __init__ (line 203) | def __init__( method forward (line 267) | def forward(self, hidden_states, temb=None, encoder_states=None): class UNetMidBlock2DCrossAttn (line 279) | class UNetMidBlock2DCrossAttn(nn.Layer): method __init__ (line 281) | def __init__( method forward (line 346) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class AttnDownBlock2D (line 355) | class AttnDownBlock2D(nn.Layer): method __init__ (line 357) | def __init__( method forward (line 418) | def forward(self, hidden_states, temb=None): class CrossAttnDownBlock2D (line 435) | class CrossAttnDownBlock2D(nn.Layer): method __init__ (line 437) | def __init__( method forward (line 499) | def forward(self, hidden_states, temb=None, encoder_hidden_states=None): class DownBlock2D (line 516) | class DownBlock2D(nn.Layer): method __init__ (line 518) | def __init__( method forward (line 566) | def forward(self, hidden_states, temb=None): class DownEncoderBlock2D (line 582) | class DownEncoderBlock2D(nn.Layer): method __init__ (line 584) | def __init__( method forward (line 631) | def forward(self, hidden_states): class AttnDownEncoderBlock2D (line 642) | class AttnDownEncoderBlock2D(nn.Layer): method __init__ (line 644) | def __init__( method forward (line 702) | def forward(self, hidden_states): class AttnSkipDownBlock2D (line 714) | class AttnSkipDownBlock2D(nn.Layer): method __init__ (line 716) | def __init__( method forward (line 786) | def forward(self, hidden_states, temb=None, skip_sample=None): class SkipDownBlock2D (line 806) | class SkipDownBlock2D(nn.Layer): method __init__ (line 808) | def __init__( method forward (line 866) | def forward(self, hidden_states, temb=None, skip_sample=None): class AttnUpBlock2D (line 885) | class AttnUpBlock2D(nn.Layer): method __init__ (line 887) | def __init__( method forward (line 944) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class CrossAttnUpBlock2D (line 962) | class CrossAttnUpBlock2D(nn.Layer): method __init__ (line 964) | def __init__( method forward (line 1023) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, e... class UpBlock2D (line 1041) | class UpBlock2D(nn.Layer): method __init__ (line 1043) | def __init__( method forward (line 1087) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): class UpDecoderBlock2D (line 1104) | class UpDecoderBlock2D(nn.Layer): method __init__ (line 1106) | def __init__( method forward (line 1147) | def forward(self, hidden_states): class AttnUpDecoderBlock2D (line 1158) | class AttnUpDecoderBlock2D(nn.Layer): method __init__ (line 1160) | def __init__( method forward (line 1212) | def forward(self, hidden_states): class AttnSkipUpBlock2D (line 1224) | class AttnSkipUpBlock2D(nn.Layer): method __init__ (line 1226) | def __init__( method forward (line 1307) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... class SkipUpBlock2D (line 1335) | class SkipUpBlock2D(nn.Layer): method __init__ (line 1337) | def __init__( method forward (line 1405) | def forward(self, hidden_states, res_hidden_states_tuple, temb=None, s... FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/models/vae.py class Encoder (line 25) | class Encoder(nn.Layer): method __init__ (line 27) | def __init__( method forward (line 86) | def forward(self, x): class Decoder (line 105) | class Decoder(nn.Layer): method __init__ (line 107) | def __init__( method forward (line 166) | def forward(self, z): class VectorQuantizer (line 185) | class VectorQuantizer(nn.Layer): method __init__ (line 194) | def __init__(self, n_e, e_dim, beta, remap=None, unknown_index="random... method remap_to_used (line 219) | def remap_to_used(self, inds): method unmap_to_all (line 233) | def unmap_to_all(self, inds): method forward (line 243) | def forward(self, z): method get_codebook_entry (line 279) | def get_codebook_entry(self, indices, shape): class DiagonalGaussianDistribution (line 297) | class DiagonalGaussianDistribution(object): method __init__ (line 299) | def __init__(self, parameters, deterministic=False): method sample (line 309) | def sample(self): method kl (line 313) | def kl(self, other=None): method nll (line 326) | def nll(self, sample, dims=[1, 2, 3]): method mode (line 332) | def mode(self): class VQModel (line 336) | class VQModel(ConfigMixin): method __init__ (line 339) | def __init__( method encode (line 383) | def encode(self, x): method decode (line 388) | def decode(self, h, force_not_quantize=False): method forward (line 398) | def forward(self, sample): class AutoencoderKL (line 405) | class AutoencoderKL(nn.Layer, ConfigMixin): method __init__ (line 408) | def __init__( method encode (line 446) | def encode(self, x): method decode (line 452) | def decode(self, z): method forward (line 457) | def forward(self, sample, sample_posterior=False): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_ddim.py function betas_for_alpha_bar (line 27) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDIMScheduler (line 50) | class DDIMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 53) | def __init__( method _get_variance (line 93) | def _get_variance(self, timestep, prev_timestep): method set_timesteps (line 103) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 110) | def step( method add_noise (line 172) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 181) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_ddpm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class DDPMScheduler (line 49) | class DDPMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 90) | def set_timesteps(self, num_inference_steps): method _get_variance (line 97) | def _get_variance(self, t, predicted_variance=None, variance_type=None): method step (line 130) | def step( method add_noise (line 181) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 190) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_karras_ve.py class KarrasVeScheduler (line 24) | class KarrasVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 35) | def __init__( method set_timesteps (line 70) | def set_timesteps(self, num_inference_steps): method add_noise_to_input (line 79) | def add_noise_to_input(self, sample, sigma, generator=None): method step (line 96) | def step( method step_correct (line 109) | def step_correct( method add_noise (line 123) | def add_noise(self, original_samples, noise, timesteps): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_lms_discrete.py class LMSDiscreteScheduler (line 25) | class LMSDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 28) | def __init__( method get_lms_coefficient (line 65) | def get_lms_coefficient(self, order, t, current_order): method set_timesteps (line 82) | def set_timesteps(self, num_inference_steps): method step (line 97) | def step( method add_noise (line 125) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 132) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_pndm.py function betas_for_alpha_bar (line 26) | def betas_for_alpha_bar(num_diffusion_timesteps, max_beta=0.999): class PNDMScheduler (line 49) | class PNDMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 52) | def __init__( method set_timesteps (line 100) | def set_timesteps(self, num_inference_steps, offset=0): method step (line 125) | def step( method step_prk (line 136) | def step_prk( method step_plms (line 170) | def step_plms( method _get_prev_sample (line 214) | def _get_prev_sample(self, sample, timestep, timestep_prev, model_outp... method add_noise (line 248) | def add_noise(self, original_samples, noise, timesteps): method __len__ (line 257) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_sde_ve.py class ScoreSdeVeScheduler (line 26) | class ScoreSdeVeScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 39) | def __init__( method set_timesteps (line 61) | def set_timesteps(self, num_inference_steps, sampling_eps=None): method set_sigmas (line 71) | def set_sigmas(self, num_inference_steps, sigma_min=None, sigma_max=No... method get_adjacent_sigma (line 89) | def get_adjacent_sigma(self, timesteps, t): method set_seed (line 98) | def set_seed(self, seed): method step_pred (line 107) | def step_pred( method step_correct (line 141) | def step_correct( method __len__ (line 171) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_sde_vp.py class ScoreSdeVpScheduler (line 24) | class ScoreSdeVpScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 27) | def __init__(self, num_train_timesteps=2000, beta_min=0.1, beta_max=20... method set_timesteps (line 33) | def set_timesteps(self, num_inference_steps): method step_pred (line 36) | def step_pred(self, score, x, t): method __len__ (line 58) | def __len__(self): FILE: modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_utils.py class SchedulerMixin (line 22) | class SchedulerMixin: method set_format (line 27) | def set_format(self, tensor_format="pd"): method clip (line 36) | def clip(self, tensor, min_value=None, max_value=None): method log (line 46) | def log(self, tensor): method match_shape (line 56) | def match_shape(self, values: Union[np.ndarray, paddle.Tensor], broadc... method norm (line 76) | def norm(self, tensor): method randn_like (line 85) | def randn_like(self, tensor, generator=None): method zeros_like (line 95) | def zeros_like(self, tensor): FILE: modules/image/text_to_image/stable_diffusion_waifu/module.py class StableDiffusion (line 50) | class StableDiffusion: method __init__ (line 52) | def __init__(self): method generate_image (line 105) | def generate_image(self, method serving_method (line 253) | def serving_method(self, text_prompts, **kwargs): method run_cmd (line 261) | def run_cmd(self, argvs): method add_module_config_arg (line 289) | def add_module_config_arg(self): method add_module_input_arg (line 336) | def add_module_input_arg(self): FILE: modules/text/embedding/fasttext_crawl_target_word-word_dim300_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/fasttext_wiki-news_target_word-word_dim300_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_twitter_target_word-word_dim100_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_twitter_target_word-word_dim200_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_twitter_target_word-word_dim25_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_twitter_target_word-word_dim50_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_wiki2014-gigaword_target_word-word_dim100_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_wiki2014-gigaword_target_word-word_dim200_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_wiki2014-gigaword_target_word-word_dim300_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/glove_wiki2014-gigaword_target_word-word_dim50_en/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-character_char1-1_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-character_char1-2_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-character_char1-4_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-ngram_1-2_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-ngram_1-3_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-ngram_2-2_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-wordLR_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-wordPosition_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_context_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-character_char1-1_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-character_char1-2_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-character_char1-4_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-ngram_1-2_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-ngram_1-3_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-ngram_2-2_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-wordLR_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-wordPosition_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_baidu_encyclopedia_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_financial_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_financial_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_financial_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_financial_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_literature_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_literature_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_literature_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_literature_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_mixed-large_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_mixed-large_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_people_daily_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_people_daily_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_people_daily_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_people_daily_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_sikuquanshu_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_sikuquanshu_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_sogou_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_sogou_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_sogou_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_sogou_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_weibo_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_weibo_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_weibo_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_weibo_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_wiki_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_wiki_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_wiki_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_wiki_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_zhihu_target_bigram-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_zhihu_target_word-bigram_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_zhihu_target_word-char_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/w2v_zhihu_target_word-word_dim300/module.py class Embedding (line 28) | class Embedding(TokenEmbedding): method __init__ (line 34) | def __init__(self, *args, **kwargs): FILE: modules/text/embedding/word2vec_skipgram/module.py function load_vocab (line 28) | def load_vocab(file_path): class Word2vecSkipGram (line 48) | class Word2vecSkipGram(hub.Module): method _initialize (line 49) | def _initialize(self): method context (line 57) | def context(self, trainable=False, max_seq_len=128, num_slots=1): method get_vocab_path (line 154) | def get_vocab_path(self): FILE: modules/text/language_model/albert-base-v1/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 96) | def forward(self, method get_tokenizer (line 173) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-base-v2/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 96) | def forward(self, method get_tokenizer (line 173) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-chinese-base/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 94) | def forward(self, method get_tokenizer (line 171) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-chinese-large/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 94) | def forward(self, method get_tokenizer (line 171) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-chinese-small/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 94) | def forward(self, method get_tokenizer (line 171) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-chinese-tiny/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 94) | def forward(self, method get_tokenizer (line 171) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-chinese-xlarge/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 94) | def forward(self, method get_tokenizer (line 171) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-chinese-xxlarge/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 94) | def forward(self, method get_tokenizer (line 171) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-xxlarge-v1/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 95) | def forward(self, method get_tokenizer (line 172) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/albert-xxlarge-v2/module.py class Albert (line 39) | class Albert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 95) | def forward(self, method get_tokenizer (line 172) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/bert-base-cased/module.py class Bert (line 39) | class Bert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/bert-base-chinese/module.py class Bert (line 39) | class Bert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/bert-base-multilingual-cased/module.py class Bert (line 39) | class Bert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 95) | def forward(self, method get_tokenizer (line 172) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/bert-base-multilingual-uncased/module.py class Bert (line 39) | class Bert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 95) | def forward(self, method get_tokenizer (line 172) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/bert-base-uncased/module.py class Bert (line 39) | class Bert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/bert-large-cased/module.py class Bert (line 39) | class Bert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/bert-large-uncased/module.py class Bert (line 39) | class Bert(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/chinese_bert_wwm/module.py class BertWwm (line 39) | class BertWwm(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/chinese_bert_wwm_ext/module.py class BertWwm (line 39) | class BertWwm(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/chinese_electra_base/module.py class Electra (line 39) | class Electra(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 169) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/chinese_electra_small/module.py class Electra (line 39) | class Electra(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 169) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/electra_base/module.py class Electra (line 38) | class Electra(nn.Layer): method __init__ (line 43) | def __init__( method forward (line 92) | def forward(self, method get_tokenizer (line 168) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/electra_large/module.py class Electra (line 38) | class Electra(nn.Layer): method __init__ (line 43) | def __init__( method forward (line 92) | def forward(self, method get_tokenizer (line 168) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/electra_small/module.py class Electra (line 38) | class Electra(nn.Layer): method __init__ (line 43) | def __init__( method forward (line 92) | def forward(self, method get_tokenizer (line 168) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/ernie/module.py class Ernie (line 39) | class Ernie(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/ernie_tiny/module.py class ErnieTiny (line 38) | class ErnieTiny(nn.Layer): method __init__ (line 43) | def __init__( method forward (line 92) | def forward(self, method get_tokenizer (line 169) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/ernie_v2_eng_base/module.py class ErnieV2 (line 41) | class ErnieV2(nn.Layer): method __init__ (line 46) | def __init__( method forward (line 97) | def forward(self, method get_tokenizer (line 174) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/ernie_v2_eng_large/module.py class ErnieV2 (line 39) | class ErnieV2(nn.Layer): method __init__ (line 44) | def __init__( method forward (line 93) | def forward(self, method get_tokenizer (line 170) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/lda_news/config.py class ModelType (line 6) | class ModelType: class ModelConfig (line 11) | class ModelConfig: FILE: modules/text/language_model/lda_news/document.py class Topic (line 4) | class Topic(object): method __init__ (line 9) | def __init__(self, tid, prob): class Token (line 14) | class Token(object): method __init__ (line 19) | def __init__(self, topic, id): class Sentence (line 24) | class Sentence(object): method __init__ (line 29) | def __init__(self, topic, tokens): class LDADoc (line 34) | class LDADoc(object): method __init__ (line 38) | def __init__(self): method init (line 46) | def init(self, num_topics): method add_token (line 55) | def add_token(self, token): method token (line 65) | def token(self, index): method set_topic (line 68) | def set_topic(self, index, new_topic): method set_alpha (line 81) | def set_alpha(self, alpha): method size (line 84) | def size(self): method topic_sum (line 89) | def topic_sum(self, topic_id): method sparse_topic_dist (line 92) | def sparse_topic_dist(self, sort=True): method dense_topic_dist (line 116) | def dense_topic_dist(self): method accumulate_topic_num (line 127) | def accumulate_topic_num(self): class SLDADoc (line 132) | class SLDADoc(LDADoc): method __init__ (line 137) | def __init__(self): method init (line 141) | def init(self, num_topics): method add_sentence (line 150) | def add_sentence(self, sent): method set_topic (line 160) | def set_topic(self, index, new_topic): method size (line 170) | def size(self): method sent (line 175) | def sent(self, index): FILE: modules/text/language_model/lda_news/inference_engine.py class SamplerType (line 13) | class SamplerType: class InferenceEngine (line 18) | class InferenceEngine(object): method __init__ (line 19) | def __init__(self, model_dir, conf_file, type=SamplerType.MetropolisHa... method infer (line 33) | def infer(self, input, doc): method lda_infer (line 64) | def lda_infer(self, doc, burn_in_iter, total_iter): method slda_infer (line 74) | def slda_infer(self, doc, burn_in_iter, total_iter): method model_type (line 84) | def model_type(self): method get_model (line 87) | def get_model(self): method get_config (line 90) | def get_config(self): FILE: modules/text/language_model/lda_news/model.py class TopicModel (line 11) | class TopicModel(object): method __init__ (line 15) | def __init__(self, model_dir, config): method term_id (line 35) | def term_id(self, term): method load_model (line 38) | def load_model(self, word_topic_path, vocab_path): method word_topic_value (line 49) | def word_topic_value(self, word_id, topic_id): method word_topic (line 57) | def word_topic(self, term_id): method topic_sum_value (line 62) | def topic_sum_value(self, topic_id): method topic_sum (line 65) | def topic_sum(self): method num_topics (line 68) | def num_topics(self): method vocab_size (line 71) | def vocab_size(self): method alpha (line 74) | def alpha(self): method alpha_sum (line 77) | def alpha_sum(self): method beta (line 80) | def beta(self): method beta_sum (line 83) | def beta_sum(self): method type (line 86) | def type(self): method __load_word_dict (line 89) | def __load_word_dict(self, word_dict_path): method get_vocab (line 119) | def get_vocab(self): method topic_words (line 122) | def topic_words(self): FILE: modules/text/language_model/lda_news/module.py class TopicModel (line 23) | class TopicModel(hub.Module): method _initialize (line 24) | def _initialize(self): method cal_doc_distance (line 49) | def cal_doc_distance(self, doc_text1, doc_text2): method cal_doc_keywords_similarity (line 80) | def cal_doc_keywords_similarity(self, document, top_k=10): method cal_query_doc_similarity (line 126) | def cal_query_doc_similarity(self, query, document): method infer_doc_topic_distribution (line 150) | def infer_doc_topic_distribution(self, document): method show_topic_keywords (line 171) | def show_topic_keywords(self, topic_id, k=10): FILE: modules/text/language_model/lda_news/sampler.py class Sampler (line 10) | class Sampler(object): method __init__ (line 11) | def __init__(self): method sample_doc (line 14) | def sample_doc(self, doc): class MHSampler (line 20) | class MHSampler(Sampler): method __init__ (line 21) | def __init__(self, model): method __construct_alias_table (line 32) | def __construct_alias_table(self): method sample_doc (line 64) | def sample_doc(self, doc): method __sample_token (line 74) | def __sample_token(self, doc, token): method __sample_sentence (line 81) | def __sample_sentence(self, doc, sent): method __doc_proposal (line 88) | def __doc_proposal(self, doc, token): method __word_proposal (line 132) | def __word_proposal(self, doc, token, old_topic): method __proportional_function (line 162) | def __proportional_function(self, doc, token, new_topic): method __word_proposal_distribution (line 192) | def __word_proposal_distribution(self, word_id, topic): method __doc_proposal_distribution (line 197) | def __doc_proposal_distribution(self, doc, topic): method __propose (line 200) | def __propose(self, word_id): class GibbsSampler (line 210) | class GibbsSampler(Sampler): method __init__ (line 211) | def __init__(self, model): method sample_doc (line 215) | def sample_doc(self, doc): method __sample_token (line 225) | def __sample_token(self, doc, token): method __sample_sentence (line 252) | def __sample_sentence(self, doc, sent): FILE: modules/text/language_model/lda_news/semantic_matching.py class WordAndDis (line 8) | class WordAndDis(object): method __init__ (line 9) | def __init__(self): class SemanticMatching (line 14) | class SemanticMatching(object): method __init__ (line 15) | def __init__(self): method l2_norm (line 18) | def l2_norm(self, vec): method cosine_similarity (line 24) | def cosine_similarity(self, vec1, vec2): method likelihood_based_similarity (line 32) | def likelihood_based_similarity(self, terms, doc_topic_dist, model): method kullback_leibler_divergence (line 56) | def kullback_leibler_divergence(self, dist1, dist2): method jensen_shannon_divergence (line 62) | def jensen_shannon_divergence(self, dist1, dist2): method hellinger_distance (line 71) | def hellinger_distance(self, dist1, dist2): FILE: modules/text/language_model/lda_news/tokenizer.py class Tokenizer (line 5) | class Tokenizer(object): method __init__ (line 9) | def __init__(self): method tokenize (line 12) | def tokenize(self, text): class SimpleTokenizer (line 16) | class SimpleTokenizer(Tokenizer): method __init__ (line 23) | def __init__(self, vocab_path): method tokenize (line 29) | def tokenize(self, text): method contains (line 59) | def contains(self, word): method __load_vocab (line 64) | def __load_vocab(self, vocab_path): method __is_eng_char (line 77) | def __is_eng_char(self, c): method __tolower (line 82) | def __tolower(self, c): class LACTokenizer (line 89) | class LACTokenizer(Tokenizer): method __init__ (line 90) | def __init__(self, vocab_path, lac): method __load_vocab (line 97) | def __load_vocab(self, vocab_path): method tokenize (line 110) | def tokenize(self, text): method contains (line 122) | def contains(self, word): FILE: modules/text/language_model/lda_news/util.py function load_prototxt (line 10) | def load_prototxt(config_file, config): function fix_random_seed (line 32) | def fix_random_seed(seed=2147483647): function rand (line 36) | def rand(min_=0, max_=1): function rand_k (line 40) | def rand_k(k): function timeit (line 46) | def timeit(f): FILE: modules/text/language_model/lda_news/vocab.py class WordCount (line 6) | class WordCount(object): method __init__ (line 7) | def __init__(self, word_id, count): class Vocab (line 12) | class Vocab(object): method __init__ (line 13) | def __init__(self): method get_id (line 17) | def get_id(self, word): method load (line 22) | def load(self, vocab_file): method size (line 37) | def size(self): method vocabulary (line 40) | def vocabulary(self): FILE: modules/text/language_model/lda_news/vose_alias.py class VoseAlias (line 6) | class VoseAlias(object): method __init__ (line 10) | def __init__(self): method initialize (line 14) | def initialize(self, distribution): method generate (line 54) | def generate(self): method size (line 61) | def size(self): FILE: modules/text/language_model/lda_novel/config.py class ModelType (line 6) | class ModelType: class ModelConfig (line 11) | class ModelConfig: FILE: modules/text/language_model/lda_novel/document.py class Topic (line 4) | class Topic(object): method __init__ (line 9) | def __init__(self, tid, prob): class Token (line 14) | class Token(object): method __init__ (line 19) | def __init__(self, topic, id): class Sentence (line 24) | class Sentence(object): method __init__ (line 29) | def __init__(self, topic, tokens): class LDADoc (line 34) | class LDADoc(object): method __init__ (line 38) | def __init__(self): method init (line 46) | def init(self, num_topics): method add_token (line 55) | def add_token(self, token): method token (line 65) | def token(self, index): method set_topic (line 68) | def set_topic(self, index, new_topic): method set_alpha (line 81) | def set_alpha(self, alpha): method size (line 84) | def size(self): method topic_sum (line 89) | def topic_sum(self, topic_id): method sparse_topic_dist (line 92) | def sparse_topic_dist(self, sort=True): method dense_topic_dist (line 116) | def dense_topic_dist(self): method accumulate_topic_num (line 127) | def accumulate_topic_num(self): class SLDADoc (line 132) | class SLDADoc(LDADoc): method __init__ (line 137) | def __init__(self): method init (line 141) | def init(self, num_topics): method add_sentence (line 150) | def add_sentence(self, sent): method set_topic (line 160) | def set_topic(self, index, new_topic): method size (line 170) | def size(self): method sent (line 175) | def sent(self, index): FILE: modules/text/language_model/lda_novel/inference_engine.py class SamplerType (line 13) | class SamplerType: class InferenceEngine (line 18) | class InferenceEngine(object): method __init__ (line 19) | def __init__(self, model_dir, conf_file, type=SamplerType.MetropolisHa... method infer (line 33) | def infer(self, input, doc): method lda_infer (line 64) | def lda_infer(self, doc, burn_in_iter, total_iter): method slda_infer (line 74) | def slda_infer(self, doc, burn_in_iter, total_iter): method model_type (line 84) | def model_type(self): method get_model (line 87) | def get_model(self): method get_config (line 90) | def get_config(self): FILE: modules/text/language_model/lda_novel/model.py class TopicModel (line 11) | class TopicModel(object): method __init__ (line 15) | def __init__(self, model_dir, config): method term_id (line 35) | def term_id(self, term): method load_model (line 38) | def load_model(self, word_topic_path, vocab_path): method word_topic_value (line 49) | def word_topic_value(self, word_id, topic_id): method word_topic (line 57) | def word_topic(self, term_id): method topic_sum_value (line 62) | def topic_sum_value(self, topic_id): method topic_sum (line 65) | def topic_sum(self): method num_topics (line 68) | def num_topics(self): method vocab_size (line 71) | def vocab_size(self): method alpha (line 74) | def alpha(self): method alpha_sum (line 77) | def alpha_sum(self): method beta (line 80) | def beta(self): method beta_sum (line 83) | def beta_sum(self): method type (line 86) | def type(self): method __load_word_dict (line 89) | def __load_word_dict(self, word_dict_path): method get_vocab (line 119) | def get_vocab(self): method topic_words (line 122) | def topic_words(self): FILE: modules/text/language_model/lda_novel/module.py class TopicModel (line 23) | class TopicModel(hub.Module): method _initialize (line 24) | def _initialize(self): method cal_doc_distance (line 49) | def cal_doc_distance(self, doc_text1, doc_text2): method cal_doc_keywords_similarity (line 80) | def cal_doc_keywords_similarity(self, document, top_k=10): method cal_query_doc_similarity (line 126) | def cal_query_doc_similarity(self, query, document): method infer_doc_topic_distribution (line 150) | def infer_doc_topic_distribution(self, document): method show_topic_keywords (line 171) | def show_topic_keywords(self, topic_id, k=10): FILE: modules/text/language_model/lda_novel/sampler.py class Sampler (line 12) | class Sampler(object): method __init__ (line 13) | def __init__(self): method sample_doc (line 16) | def sample_doc(self, doc): class MHSampler (line 22) | class MHSampler(Sampler): method __init__ (line 23) | def __init__(self, model): method __construct_alias_table (line 34) | def __construct_alias_table(self): method sample_doc (line 66) | def sample_doc(self, doc): method __sample_token (line 76) | def __sample_token(self, doc, token): method __sample_sentence (line 83) | def __sample_sentence(self, doc, sent): method __doc_proposal (line 90) | def __doc_proposal(self, doc, token): method __word_proposal (line 134) | def __word_proposal(self, doc, token, old_topic): method __proportional_function (line 164) | def __proportional_function(self, doc, token, new_topic): method __word_proposal_distribution (line 194) | def __word_proposal_distribution(self, word_id, topic): method __doc_proposal_distribution (line 199) | def __doc_proposal_distribution(self, doc, topic): method __propose (line 202) | def __propose(self, word_id): class GibbsSampler (line 212) | class GibbsSampler(Sampler): method __init__ (line 213) | def __init__(self, model): method sample_doc (line 217) | def sample_doc(self, doc): method __sample_token (line 227) | def __sample_token(self, doc, token): method __sample_sentence (line 254) | def __sample_sentence(self, doc, sent): FILE: modules/text/language_model/lda_novel/semantic_matching.py class WordAndDis (line 11) | class WordAndDis(object): method __init__ (line 12) | def __init__(self): class SemanticMatching (line 17) | class SemanticMatching(object): method __init__ (line 18) | def __init__(self): method l2_norm (line 21) | def l2_norm(self, vec): method cosine_similarity (line 27) | def cosine_similarity(self, vec1, vec2): method likelihood_based_similarity (line 33) | def likelihood_based_similarity(self, terms, doc_topic_dist, model): method kullback_leibler_divergence (line 57) | def kullback_leibler_divergence(self, dist1, dist2): method jensen_shannon_divergence (line 63) | def jensen_shannon_divergence(self, dist1, dist2): method hellinger_distance (line 72) | def hellinger_distance(self, dist1, dist2): FILE: modules/text/language_model/lda_novel/tokenizer.py class Tokenizer (line 7) | class Tokenizer(object): method __init__ (line 11) | def __init__(self): method tokenize (line 14) | def tokenize(self, text): class SimpleTokenizer (line 18) | class SimpleTokenizer(Tokenizer): method __init__ (line 25) | def __init__(self, vocab_path): method tokenize (line 31) | def tokenize(self, text): method contains (line 61) | def contains(self, word): method __load_vocab (line 66) | def __load_vocab(self, vocab_path): method __is_eng_char (line 79) | def __is_eng_char(self, c): method __tolower (line 84) | def __tolower(self, c): class LACTokenizer (line 91) | class LACTokenizer(Tokenizer): method __init__ (line 92) | def __init__(self, vocab_path, lac): method __load_vocab (line 99) | def __load_vocab(self, vocab_path): method tokenize (line 112) | def tokenize(self, text): method contains (line 124) | def contains(self, word): FILE: modules/text/language_model/lda_novel/util.py function load_prototxt (line 10) | def load_prototxt(config_file, config): function fix_random_seed (line 32) | def fix_random_seed(seed=2147483647): function rand (line 36) | def rand(min_=0, max_=1): function rand_k (line 40) | def rand_k(k): function timeit (line 46) | def timeit(f): FILE: modules/text/language_model/lda_novel/vocab.py class WordCount (line 6) | class WordCount(object): method __init__ (line 7) | def __init__(self, word_id, count): class Vocab (line 12) | class Vocab(object): method __init__ (line 13) | def __init__(self): method get_id (line 17) | def get_id(self, word): method load (line 22) | def load(self, vocab_file): method size (line 37) | def size(self): method vocabulary (line 40) | def vocabulary(self): FILE: modules/text/language_model/lda_novel/vose_alias.py class VoseAlias (line 9) | class VoseAlias(object): method __init__ (line 13) | def __init__(self): method initialize (line 17) | def initialize(self, distribution): method generate (line 57) | def generate(self): method size (line 64) | def size(self): FILE: modules/text/language_model/lda_webpage/config.py class ModelType (line 6) | class ModelType: class ModelConfig (line 11) | class ModelConfig: FILE: modules/text/language_model/lda_webpage/document.py class Topic (line 4) | class Topic(object): method __init__ (line 9) | def __init__(self, tid, prob): class Token (line 14) | class Token(object): method __init__ (line 19) | def __init__(self, topic, id): class Sentence (line 24) | class Sentence(object): method __init__ (line 29) | def __init__(self, topic, tokens): class LDADoc (line 34) | class LDADoc(object): method __init__ (line 38) | def __init__(self): method init (line 46) | def init(self, num_topics): method add_token (line 55) | def add_token(self, token): method token (line 65) | def token(self, index): method set_topic (line 68) | def set_topic(self, index, new_topic): method set_alpha (line 81) | def set_alpha(self, alpha): method size (line 84) | def size(self): method topic_sum (line 89) | def topic_sum(self, topic_id): method sparse_topic_dist (line 92) | def sparse_topic_dist(self, sort=True): method dense_topic_dist (line 116) | def dense_topic_dist(self): method accumulate_topic_num (line 127) | def accumulate_topic_num(self): class SLDADoc (line 132) | class SLDADoc(LDADoc): method __init__ (line 137) | def __init__(self): method init (line 141) | def init(self, num_topics): method add_sentence (line 150) | def add_sentence(self, sent): method set_topic (line 160) | def set_topic(self, index, new_topic): method size (line 170) | def size(self): method sent (line 175) | def sent(self, index): FILE: modules/text/language_model/lda_webpage/inference_engine.py class SamplerType (line 13) | class SamplerType: class InferenceEngine (line 18) | class InferenceEngine(object): method __init__ (line 19) | def __init__(self, model_dir, conf_file, type=SamplerType.MetropolisHa... method infer (line 33) | def infer(self, input, doc): method lda_infer (line 64) | def lda_infer(self, doc, burn_in_iter, total_iter): method slda_infer (line 74) | def slda_infer(self, doc, burn_in_iter, total_iter): method model_type (line 84) | def model_type(self): method get_model (line 87) | def get_model(self): method get_config (line 90) | def get_config(self): FILE: modules/text/language_model/lda_webpage/model.py class TopicModel (line 11) | class TopicModel(object): method __init__ (line 15) | def __init__(self, model_dir, config): method term_id (line 35) | def term_id(self, term): method load_model (line 38) | def load_model(self, word_topic_path, vocab_path): method word_topic_value (line 49) | def word_topic_value(self, word_id, topic_id): method word_topic (line 57) | def word_topic(self, term_id): method topic_sum_value (line 62) | def topic_sum_value(self, topic_id): method topic_sum (line 65) | def topic_sum(self): method num_topics (line 68) | def num_topics(self): method vocab_size (line 71) | def vocab_size(self): method alpha (line 74) | def alpha(self): method alpha_sum (line 77) | def alpha_sum(self): method beta (line 80) | def beta(self): method beta_sum (line 83) | def beta_sum(self): method type (line 86) | def type(self): method __load_word_dict (line 89) | def __load_word_dict(self, word_dict_path): method get_vocab (line 119) | def get_vocab(self): method topic_words (line 122) | def topic_words(self): FILE: modules/text/language_model/lda_webpage/module.py class TopicModel (line 23) | class TopicModel(hub.Module): method _initialize (line 24) | def _initialize(self): method cal_doc_distance (line 49) | def cal_doc_distance(self, doc_text1, doc_text2): method cal_doc_keywords_similarity (line 80) | def cal_doc_keywords_similarity(self, document, top_k=10): method cal_query_doc_similarity (line 126) | def cal_query_doc_similarity(self, query, document): method infer_doc_topic_distribution (line 149) | def infer_doc_topic_distribution(self, document): method show_topic_keywords (line 170) | def show_topic_keywords(self, topic_id, k=10): FILE: modules/text/language_model/lda_webpage/sampler.py class Sampler (line 12) | class Sampler(object): method __init__ (line 13) | def __init__(self): method sample_doc (line 16) | def sample_doc(self, doc): class MHSampler (line 22) | class MHSampler(Sampler): method __init__ (line 23) | def __init__(self, model): method __construct_alias_table (line 34) | def __construct_alias_table(self): method sample_doc (line 66) | def sample_doc(self, doc): method __sample_token (line 76) | def __sample_token(self, doc, token): method __sample_sentence (line 83) | def __sample_sentence(self, doc, sent): method __doc_proposal (line 90) | def __doc_proposal(self, doc, token): method __word_proposal (line 134) | def __word_proposal(self, doc, token, old_topic): method __proportional_function (line 164) | def __proportional_function(self, doc, token, new_topic): method __word_proposal_distribution (line 194) | def __word_proposal_distribution(self, word_id, topic): method __doc_proposal_distribution (line 199) | def __doc_proposal_distribution(self, doc, topic): method __propose (line 202) | def __propose(self, word_id): class GibbsSampler (line 212) | class GibbsSampler(Sampler): method __init__ (line 213) | def __init__(self, model): method sample_doc (line 217) | def sample_doc(self, doc): method __sample_token (line 227) | def __sample_token(self, doc, token): method __sample_sentence (line 254) | def __sample_sentence(self, doc, sent): FILE: modules/text/language_model/lda_webpage/semantic_matching.py class WordAndDis (line 11) | class WordAndDis(object): method __init__ (line 12) | def __init__(self): class SemanticMatching (line 17) | class SemanticMatching(object): method __init__ (line 18) | def __init__(self): method l2_norm (line 21) | def l2_norm(self, vec): method cosine_similarity (line 27) | def cosine_similarity(self, vec1, vec2): method likelihood_based_similarity (line 33) | def likelihood_based_similarity(self, terms, doc_topic_dist, model): method kullback_leibler_divergence (line 57) | def kullback_leibler_divergence(self, dist1, dist2): method jensen_shannon_divergence (line 63) | def jensen_shannon_divergence(self, dist1, dist2): method hellinger_distance (line 72) | def hellinger_distance(self, dist1, dist2): FILE: modules/text/language_model/lda_webpage/tokenizer.py class Tokenizer (line 7) | class Tokenizer(object): method __init__ (line 11) | def __init__(self): method tokenize (line 14) | def tokenize(self, text): class SimpleTokenizer (line 18) | class SimpleTokenizer(Tokenizer): method __init__ (line 25) | def __init__(self, vocab_path): method tokenize (line 31) | def tokenize(self, text): method contains (line 61) | def contains(self, word): method __load_vocab (line 66) | def __load_vocab(self, vocab_path): method __is_eng_char (line 79) | def __is_eng_char(self, c): method __tolower (line 84) | def __tolower(self, c): class LACTokenizer (line 91) | class LACTokenizer(Tokenizer): method __init__ (line 92) | def __init__(self, vocab_path, lac): method __load_vocab (line 99) | def __load_vocab(self, vocab_path): method tokenize (line 112) | def tokenize(self, text): method contains (line 124) | def contains(self, word): FILE: modules/text/language_model/lda_webpage/util.py function load_prototxt (line 10) | def load_prototxt(config_file, config): function fix_random_seed (line 32) | def fix_random_seed(seed=2147483647): function rand (line 36) | def rand(min_=0, max_=1): function rand_k (line 40) | def rand_k(k): function timeit (line 46) | def timeit(f): FILE: modules/text/language_model/lda_webpage/vocab.py class WordCount (line 6) | class WordCount(object): method __init__ (line 7) | def __init__(self, word_id, count): class Vocab (line 12) | class Vocab(object): method __init__ (line 13) | def __init__(self): method get_id (line 17) | def get_id(self, word): method load (line 22) | def load(self, vocab_file): method size (line 37) | def size(self): method vocabulary (line 40) | def vocabulary(self): FILE: modules/text/language_model/lda_webpage/vose_alias.py class VoseAlias (line 9) | class VoseAlias(object): method __init__ (line 13) | def __init__(self): method initialize (line 17) | def initialize(self, distribution): method generate (line 57) | def generate(self): method size (line 64) | def size(self): FILE: modules/text/language_model/rbt3/module.py class Roberta (line 41) | class Roberta(nn.Layer): method __init__ (line 46) | def __init__( method forward (line 98) | def forward(self, method get_tokenizer (line 175) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/rbtl3/module.py class Roberta (line 41) | class Roberta(nn.Layer): method __init__ (line 46) | def __init__( method forward (line 98) | def forward(self, method get_tokenizer (line 175) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/roberta-wwm-ext-large/module.py class Roberta (line 42) | class Roberta(nn.Layer): method __init__ (line 47) | def __init__( method forward (line 97) | def forward(self, method get_tokenizer (line 174) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/roberta-wwm-ext/module.py class Roberta (line 42) | class Roberta(nn.Layer): method __init__ (line 47) | def __init__( method forward (line 97) | def forward(self, method get_tokenizer (line 174) | def get_tokenizer(*args, **kwargs): FILE: modules/text/language_model/simnet_bow/module.py class DataFormatError (line 30) | class DataFormatError(Exception): method __init__ (line 32) | def __init__(self, *args): class SimnetBow (line 42) | class SimnetBow(hub.Module): method _initialize (line 44) | def _initialize(self): method word_seg_module (line 57) | def word_seg_module(self): method _set_config (line 65) | def _set_config(self): method _texts_process (line 87) | def _texts_process(self, texts): method to_unicode (line 95) | def to_unicode(self, texts): method check_data (line 114) | def check_data(self, texts=[], data={}): method similarity (line 144) | def similarity(self, texts=[], data={}, use_gpu=False, batch_size=1): method run_cmd (line 208) | def run_cmd(self, argvs): method add_module_config_arg (line 236) | def add_module_config_arg(self): method add_module_input_arg (line 247) | def add_module_input_arg(self): method check_input_data (line 255) | def check_input_data(self, args): method get_vocab_path (line 281) | def get_vocab_path(self): FILE: modules/text/language_model/simnet_bow/processor.py function load_vocab (line 5) | def load_vocab(file_path): function preprocess (line 24) | def preprocess(lac, word_dict, data_dict, use_gpu=False, batch_size=1): function postprocess (line 49) | def postprocess(pred, data_info): FILE: modules/text/language_model/slda_news/config.py class ModelType (line 6) | class ModelType: class ModelConfig (line 11) | class ModelConfig: FILE: modules/text/language_model/slda_news/document.py class Topic (line 4) | class Topic(object): method __init__ (line 9) | def __init__(self, tid, prob): class Token (line 14) | class Token(object): method __init__ (line 19) | def __init__(self, topic, id): class Sentence (line 24) | class Sentence(object): method __init__ (line 29) | def __init__(self, topic, tokens): class LDADoc (line 34) | class LDADoc(object): method __init__ (line 38) | def __init__(self): method init (line 46) | def init(self, num_topics): method add_token (line 55) | def add_token(self, token): method token (line 65) | def token(self, index): method set_topic (line 68) | def set_topic(self, index, new_topic): method set_alpha (line 81) | def set_alpha(self, alpha): method size (line 84) | def size(self): method topic_sum (line 89) | def topic_sum(self, topic_id): method sparse_topic_dist (line 92) | def sparse_topic_dist(self, sort=True): method dense_topic_dist (line 116) | def dense_topic_dist(self): method accumulate_topic_num (line 127) | def accumulate_topic_num(self): class SLDADoc (line 132) | class SLDADoc(LDADoc): method __init__ (line 137) | def __init__(self): method init (line 141) | def init(self, num_topics): method add_sentence (line 150) | def add_sentence(self, sent): method set_topic (line 160) | def set_topic(self, index, new_topic): method size (line 170) | def size(self): method sent (line 175) | def sent(self, index): FILE: modules/text/language_model/slda_news/inference_engine.py class SamplerType (line 13) | class SamplerType: class InferenceEngine (line 18) | class InferenceEngine(object): method __init__ (line 19) | def __init__(self, model_dir, conf_file, type=SamplerType.MetropolisHa... method infer (line 33) | def infer(self, input, doc): method lda_infer (line 64) | def lda_infer(self, doc, burn_in_iter, total_iter): method slda_infer (line 74) | def slda_infer(self, doc, burn_in_iter, total_iter): method model_type (line 84) | def model_type(self): method get_model (line 87) | def get_model(self): method get_config (line 90) | def get_config(self): FILE: modules/text/language_model/slda_news/model.py class TopicModel (line 11) | class TopicModel(object): method __init__ (line 15) | def __init__(self, model_dir, config): method term_id (line 35) | def term_id(self, term): method load_model (line 38) | def load_model(self, word_topic_path, vocab_path): method word_topic_value (line 49) | def word_topic_value(self, word_id, topic_id): method word_topic (line 57) | def word_topic(self, term_id): method topic_sum_value (line 62) | def topic_sum_value(self, topic_id): method topic_sum (line 65) | def topic_sum(self): method num_topics (line 68) | def num_topics(self): method vocab_size (line 71) | def vocab_size(self): method alpha (line 74) | def alpha(self): method alpha_sum (line 77) | def alpha_sum(self): method beta (line 80) | def beta(self): method beta_sum (line 83) | def beta_sum(self): method type (line 86) | def type(self): method __load_word_dict (line 89) | def __load_word_dict(self, word_dict_path): method get_vocab (line 119) | def get_vocab(self): method topic_words (line 122) | def topic_words(self): FILE: modules/text/language_model/slda_news/module.py class TopicModel (line 23) | class TopicModel(hub.Module): method _initialize (line 24) | def _initialize(self): method infer_doc_topic_distribution (line 48) | def infer_doc_topic_distribution(self, document): method show_topic_keywords (line 78) | def show_topic_keywords(self, topic_id, k=10): FILE: modules/text/language_model/slda_news/sampler.py class Sampler (line 12) | class Sampler(object): method __init__ (line 13) | def __init__(self): method sample_doc (line 16) | def sample_doc(self, doc): class MHSampler (line 22) | class MHSampler(Sampler): method __init__ (line 23) | def __init__(self, model): method __construct_alias_table (line 34) | def __construct_alias_table(self): method sample_doc (line 66) | def sample_doc(self, doc): method __sample_token (line 76) | def __sample_token(self, doc, token): method __sample_sentence (line 83) | def __sample_sentence(self, doc, sent): method __doc_proposal (line 90) | def __doc_proposal(self, doc, token): method __word_proposal (line 134) | def __word_proposal(self, doc, token, old_topic): method __proportional_function (line 164) | def __proportional_function(self, doc, token, new_topic): method __word_proposal_distribution (line 194) | def __word_proposal_distribution(self, word_id, topic): method __doc_proposal_distribution (line 199) | def __doc_proposal_distribution(self, doc, topic): method __propose (line 202) | def __propose(self, word_id): class GibbsSampler (line 212) | class GibbsSampler(Sampler): method __init__ (line 213) | def __init__(self, model): method sample_doc (line 217) | def sample_doc(self, doc): method __sample_token (line 227) | def __sample_token(self, doc, token): method __sample_sentence (line 254) | def __sample_sentence(self, doc, sent): FILE: modules/text/language_model/slda_news/semantic_matching.py class WordAndDis (line 11) | class WordAndDis(object): method __init__ (line 12) | def __init__(self): class SemanticMatching (line 17) | class SemanticMatching(object): method __init__ (line 18) | def __init__(self): method l2_norm (line 21) | def l2_norm(self, vec): method cosine_similarity (line 27) | def cosine_similarity(self, vec1, vec2): method likelihood_based_similarity (line 33) | def likelihood_based_similarity(self, terms, doc_topic_dist, model): method kullback_leibler_divergence (line 57) | def kullback_leibler_divergence(self, dist1, dist2): method jensen_shannon_divergence (line 63) | def jensen_shannon_divergence(self, dist1, dist2): method hellinger_distance (line 72) | def hellinger_distance(self, dist1, dist2): FILE: modules/text/language_model/slda_news/tokenizer.py class Tokenizer (line 7) | class Tokenizer(object): method __init__ (line 11) | def __init__(self): method tokenize (line 14) | def tokenize(self, text): class SimpleTokenizer (line 18) | class SimpleTokenizer(Tokenizer): method __init__ (line 25) | def __init__(self, vocab_path): method tokenize (line 31) | def tokenize(self, text): method contains (line 61) | def contains(self, word): method __load_vocab (line 66) | def __load_vocab(self, vocab_path): method __is_eng_char (line 79) | def __is_eng_char(self, c): method __tolower (line 84) | def __tolower(self, c): class LACTokenizer (line 91) | class LACTokenizer(Tokenizer): method __init__ (line 92) | def __init__(self, vocab_path, lac): method __load_vocab (line 99) | def __load_vocab(self, vocab_path): method tokenize (line 112) | def tokenize(self, text): method contains (line 124) | def contains(self, word): FILE: modules/text/language_model/slda_news/util.py function load_prototxt (line 10) | def load_prototxt(config_file, config): function fix_random_seed (line 32) | def fix_random_seed(seed=2147483647): function rand (line 36) | def rand(min_=0, max_=1): function rand_k (line 40) | def rand_k(k): function timeit (line 46) | def timeit(f): FILE: modules/text/language_model/slda_news/vocab.py class WordCount (line 6) | class WordCount(object): method __init__ (line 7) | def __init__(self, word_id, count): class Vocab (line 12) | class Vocab(object): method __init__ (line 13) | def __init__(self): method get_id (line 17) | def get_id(self, word): method load (line 22) | def load(self, vocab_file): method size (line 37) | def size(self): method vocabulary (line 40) | def vocabulary(self): FILE: modules/text/language_model/slda_news/vose_alias.py class VoseAlias (line 9) | class VoseAlias(object): method __init__ (line 13) | def __init__(self): method initialize (line 17) | def initialize(self, distribution): method generate (line 57) | def generate(self): method size (line 64) | def size(self): FILE: modules/text/language_model/slda_novel/config.py class ModelType (line 6) | class ModelType: class ModelConfig (line 11) | class ModelConfig: FILE: modules/text/language_model/slda_novel/document.py class Topic (line 4) | class Topic(object): method __init__ (line 9) | def __init__(self, tid, prob): class Token (line 14) | class Token(object): method __init__ (line 19) | def __init__(self, topic, id): class Sentence (line 24) | class Sentence(object): method __init__ (line 29) | def __init__(self, topic, tokens): class LDADoc (line 34) | class LDADoc(object): method __init__ (line 38) | def __init__(self): method init (line 46) | def init(self, num_topics): method add_token (line 55) | def add_token(self, token): method token (line 65) | def token(self, index): method set_topic (line 68) | def set_topic(self, index, new_topic): method set_alpha (line 81) | def set_alpha(self, alpha): method size (line 84) | def size(self): method topic_sum (line 89) | def topic_sum(self, topic_id): method sparse_topic_dist (line 92) | def sparse_topic_dist(self, sort=True): method dense_topic_dist (line 116) | def dense_topic_dist(self): method accumulate_topic_num (line 127) | def accumulate_topic_num(self): class SLDADoc (line 132) | class SLDADoc(LDADoc): method __init__ (line 137) | def __init__(self): method init (line 141) | def init(self, num_topics): method add_sentence (line 150) | def add_sentence(self, sent): method set_topic (line 160) | def set_topic(self, index, new_topic): method size (line 170) | def size(self): method sent (line 175) | def sent(self, index): FILE: modules/text/language_model/slda_novel/inference_engine.py class SamplerType (line 13) | class SamplerType: class InferenceEngine (line 18) | class InferenceEngine(object): method __init__ (line 19) | def __init__(self, model_dir, conf_file, type=SamplerType.MetropolisHa... method infer (line 33) | def infer(self, input, doc): method lda_infer (line 64) | def lda_infer(self, doc, burn_in_iter, total_iter): method slda_infer (line 74) | def slda_infer(self, doc, burn_in_iter, total_iter): method model_type (line 84) | def model_type(self): method get_model (line 87) | def get_model(self): method get_config (line 90) | def get_config(self): FILE: modules/text/language_model/slda_novel/model.py class TopicModel (line 11) | class TopicModel(object): method __init__ (line 15) | def __init__(self, model_dir, config): method term_id (line 35) | def term_id(self, term): method load_model (line 38) | def load_model(self, word_topic_path, vocab_path): method word_topic_value (line 49) | def word_topic_value(self, word_id, topic_id): method word_topic (line 57) | def word_topic(self, term_id): method topic_sum_value (line 62) | def topic_sum_value(self, topic_id): method topic_sum (line 65) | def topic_sum(self): method num_topics (line 68) | def num_topics(self): method vocab_size (line 71) | def vocab_size(self): method alpha (line 74) | def alpha(self): method alpha_sum (line 77) | def alpha_sum(self): method beta (line 80) | def beta(self): method beta_sum (line 83) | def beta_sum(self): method type (line 86) | def type(self): method __load_word_dict (line 89) | def __load_word_dict(self, word_dict_path): method get_vocab (line 119) | def get_vocab(self): method topic_words (line 122) | def topic_words(self): FILE: modules/text/language_model/slda_novel/module.py class TopicModel (line 23) | class TopicModel(hub.Module): method _initialize (line 24) | def _initialize(self): method infer_doc_topic_distribution (line 49) | def infer_doc_topic_distribution(self, document): method show_topic_keywords (line 80) | def show_topic_keywords(self, topic_id, k=10): FILE: modules/text/language_model/slda_novel/sampler.py class Sampler (line 12) | class Sampler(object): method __init__ (line 13) | def __init__(self): method sample_doc (line 16) | def sample_doc(self, doc): class MHSampler (line 22) | class MHSampler(Sampler): method __init__ (line 23) | def __init__(self, model): method __construct_alias_table (line 34) | def __construct_alias_table(self): method sample_doc (line 66) | def sample_doc(self, doc): method __sample_token (line 76) | def __sample_token(self, doc, token): method __sample_sentence (line 83) | def __sample_sentence(self, doc, sent): method __doc_proposal (line 90) | def __doc_proposal(self, doc, token): method __word_proposal (line 134) | def __word_proposal(self, doc, token, old_topic): method __proportional_function (line 164) | def __proportional_function(self, doc, token, new_topic): method __word_proposal_distribution (line 194) | def __word_proposal_distribution(self, word_id, topic): method __doc_proposal_distribution (line 199) | def __doc_proposal_distribution(self, doc, topic): method __propose (line 202) | def __propose(self, word_id): class GibbsSampler (line 212) | class GibbsSampler(Sampler): method __init__ (line 213) | def __init__(self, model): method sample_doc (line 217) | def sample_doc(self, doc): method __sample_token (line 227) | def __sample_token(self, doc, token): method __sample_sentence (line 254) | def __sample_sentence(self, doc, sent): FILE: modules/text/language_model/slda_novel/semantic_matching.py class WordAndDis (line 11) | class WordAndDis(object): method __init__ (line 12) | def __init__(self): class SemanticMatching (line 17) | class SemanticMatching(object): method __init__ (line 18) | def __init__(self): method l2_norm (line 21) | def l2_norm(self, vec): method cosine_similarity (line 27) | def cosine_similarity(self, vec1, vec2): method likelihood_based_similarity (line 33) | def likelihood_based_similarity(self, terms, doc_topic_dist, model): method kullback_leibler_divergence (line 57) | def kullback_leibler_divergence(self, dist1, dist2): method jensen_shannon_divergence (line 63) | def jensen_shannon_divergence(self, dist1, dist2): method hellinger_distance (line 72) | def hellinger_distance(self, dist1, dist2): FILE: modules/text/language_model/slda_novel/tokenizer.py class Tokenizer (line 7) | class Tokenizer(object): method __init__ (line 11) | def __init__(self): method tokenize (line 14) | def tokenize(self, text): class SimpleTokenizer (line 18) | class SimpleTokenizer(Tokenizer): method __init__ (line 25) | def __init__(self, vocab_path): method tokenize (line 31) | def tokenize(self, text): method contains (line 61) | def contains(self, word): method __load_vocab (line 66) | def __load_vocab(self, vocab_path): method __is_eng_char (line 79) | def __is_eng_char(self, c): method __tolower (line 84) | def __tolower(self, c): class LACTokenizer (line 91) | class LACTokenizer(Tokenizer): method __init__ (line 92) | def __init__(self, vocab_path, lac): method __load_vocab (line 99) | def __load_vocab(self, vocab_path): method tokenize (line 112) | def tokenize(self, text): method contains (line 124) | def contains(self, word): FILE: modules/text/language_model/slda_novel/util.py function load_prototxt (line 10) | def load_prototxt(config_file, config): function fix_random_seed (line 32) | def fix_random_seed(seed=2147483647): function rand (line 36) | def rand(min_=0, max_=1): function rand_k (line 40) | def rand_k(k): function timeit (line 46) | def timeit(f): FILE: modules/text/language_model/slda_novel/vocab.py class WordCount (line 6) | class WordCount(object): method __init__ (line 7) | def __init__(self, word_id, count): class Vocab (line 12) | class Vocab(object): method __init__ (line 13) | def __init__(self): method get_id (line 17) | def get_id(self, word): method load (line 22) | def load(self, vocab_file): method size (line 37) | def size(self): method vocabulary (line 40) | def vocabulary(self): FILE: modules/text/language_model/slda_novel/vose_alias.py class VoseAlias (line 9) | class VoseAlias(object): method __init__ (line 13) | def __init__(self): method initialize (line 17) | def initialize(self, distribution): method generate (line 57) | def generate(self): method size (line 64) | def size(self): FILE: modules/text/language_model/slda_webpage/config.py class ModelType (line 6) | class ModelType: class ModelConfig (line 11) | class ModelConfig: FILE: modules/text/language_model/slda_webpage/document.py class Topic (line 4) | class Topic(object): method __init__ (line 9) | def __init__(self, tid, prob): class Token (line 14) | class Token(object): method __init__ (line 19) | def __init__(self, topic, id): class Sentence (line 24) | class Sentence(object): method __init__ (line 29) | def __init__(self, topic, tokens): class LDADoc (line 34) | class LDADoc(object): method __init__ (line 38) | def __init__(self): method init (line 46) | def init(self, num_topics): method add_token (line 55) | def add_token(self, token): method token (line 65) | def token(self, index): method set_topic (line 68) | def set_topic(self, index, new_topic): method set_alpha (line 81) | def set_alpha(self, alpha): method size (line 84) | def size(self): method topic_sum (line 89) | def topic_sum(self, topic_id): method sparse_topic_dist (line 92) | def sparse_topic_dist(self, sort=True): method dense_topic_dist (line 116) | def dense_topic_dist(self): method accumulate_topic_num (line 127) | def accumulate_topic_num(self): class SLDADoc (line 132) | class SLDADoc(LDADoc): method __init__ (line 137) | def __init__(self): method init (line 141) | def init(self, num_topics): method add_sentence (line 150) | def add_sentence(self, sent): method set_topic (line 160) | def set_topic(self, index, new_topic): method size (line 170) | def size(self): method sent (line 175) | def sent(self, index): FILE: modules/text/language_model/slda_webpage/inference_engine.py class SamplerType (line 13) | class SamplerType: class InferenceEngine (line 18) | class InferenceEngine(object): method __init__ (line 19) | def __init__(self, model_dir, conf_file, type=SamplerType.MetropolisHa... method infer (line 33) | def infer(self, input, doc): method lda_infer (line 64) | def lda_infer(self, doc, burn_in_iter, total_iter): method slda_infer (line 74) | def slda_infer(self, doc, burn_in_iter, total_iter): method model_type (line 84) | def model_type(self): method get_model (line 87) | def get_model(self): method get_config (line 90) | def get_config(self): FILE: modules/text/language_model/slda_webpage/model.py class TopicModel (line 11) | class TopicModel(object): method __init__ (line 15) | def __init__(self, model_dir, config): method term_id (line 35) | def term_id(self, term): method load_model (line 38) | def load_model(self, word_topic_path, vocab_path): method word_topic_value (line 49) | def word_topic_value(self, word_id, topic_id): method word_topic (line 57) | def word_topic(self, term_id): method topic_sum_value (line 62) | def topic_sum_value(self, topic_id): method topic_sum (line 65) | def topic_sum(self): method num_topics (line 68) | def num_topics(self): method vocab_size (line 71) | def vocab_size(self): method alpha (line 74) | def alpha(self): method alpha_sum (line 77) | def alpha_sum(self): method beta (line 80) | def beta(self): method beta_sum (line 83) | def beta_sum(self): method type (line 86) | def type(self): method __load_word_dict (line 89) | def __load_word_dict(self, word_dict_path): method get_vocab (line 119) | def get_vocab(self): method topic_words (line 122) | def topic_words(self): FILE: modules/text/language_model/slda_webpage/module.py class TopicModel (line 23) | class TopicModel(hub.Module): method _initialize (line 24) | def _initialize(self): method infer_doc_topic_distribution (line 49) | def infer_doc_topic_distribution(self, document): method show_topic_keywords (line 80) | def show_topic_keywords(self, topic_id, k=10): FILE: modules/text/language_model/slda_webpage/sampler.py class Sampler (line 12) | class Sampler(object): method __init__ (line 13) | def __init__(self): method sample_doc (line 16) | def sample_doc(self, doc): class MHSampler (line 22) | class MHSampler(Sampler): method __init__ (line 23) | def __init__(self, model): method __construct_alias_table (line 34) | def __construct_alias_table(self): method sample_doc (line 66) | def sample_doc(self, doc): method __sample_token (line 76) | def __sample_token(self, doc, token): method __sample_sentence (line 83) | def __sample_sentence(self, doc, sent): method __doc_proposal (line 90) | def __doc_proposal(self, doc, token): method __word_proposal (line 134) | def __word_proposal(self, doc, token, old_topic): method __proportional_function (line 164) | def __proportional_function(self, doc, token, new_topic): method __word_proposal_distribution (line 194) | def __word_proposal_distribution(self, word_id, topic): method __doc_proposal_distribution (line 199) | def __doc_proposal_distribution(self, doc, topic): method __propose (line 202) | def __propose(self, word_id): class GibbsSampler (line 212) | class GibbsSampler(Sampler): method __init__ (line 213) | def __init__(self, model): method sample_doc (line 217) | def sample_doc(self, doc): method __sample_token (line 227) | def __sample_token(self, doc, token): method __sample_sentence (line 254) | def __sample_sentence(self, doc, sent): FILE: modules/text/language_model/slda_webpage/semantic_matching.py class WordAndDis (line 11) | class WordAndDis(object): method __init__ (line 12) | def __init__(self): class SemanticMatching (line 17) | class SemanticMatching(object): method __init__ (line 18) | def __init__(self): method l2_norm (line 21) | def l2_norm(self, vec): method cosine_similarity (line 27) | def cosine_similarity(self, vec1, vec2): method likelihood_based_similarity (line 33) | def likelihood_based_similarity(self, terms, doc_topic_dist, model): method kullback_leibler_divergence (line 57) | def kullback_leibler_divergence(self, dist1, dist2): method jensen_shannon_divergence (line 63) | def jensen_shannon_divergence(self, dist1, dist2): method hellinger_distance (line 72) | def hellinger_distance(self, dist1, dist2): FILE: modules/text/language_model/slda_webpage/tokenizer.py class Tokenizer (line 7) | class Tokenizer(object): method __init__ (line 11) | def __init__(self): method tokenize (line 14) | def tokenize(self, text): class SimpleTokenizer (line 18) | class SimpleTokenizer(Tokenizer): method __init__ (line 25) | def __init__(self, vocab_path): method tokenize (line 31) | def tokenize(self, text): method contains (line 61) | def contains(self, word): method __load_vocab (line 66) | def __load_vocab(self, vocab_path): method __is_eng_char (line 79) | def __is_eng_char(self, c): method __tolower (line 84) | def __tolower(self, c): class LACTokenizer (line 91) | class LACTokenizer(Tokenizer): method __init__ (line 92) | def __init__(self, vocab_path, lac): method __load_vocab (line 99) | def __load_vocab(self, vocab_path): method tokenize (line 112) | def tokenize(self, text): method contains (line 124) | def contains(self, word): FILE: modules/text/language_model/slda_webpage/util.py function load_prototxt (line 10) | def load_prototxt(config_file, config): function fix_random_seed (line 32) | def fix_random_seed(seed=2147483647): function rand (line 36) | def rand(min_=0, max_=1): function rand_k (line 40) | def rand_k(k): function timeit (line 46) | def timeit(f): FILE: modules/text/language_model/slda_webpage/vocab.py class WordCount (line 6) | class WordCount(object): method __init__ (line 7) | def __init__(self, word_id, count): class Vocab (line 12) | class Vocab(object): method __init__ (line 13) | def __init__(self): method get_id (line 17) | def get_id(self, word): method load (line 22) | def load(self, vocab_file): method size (line 37) | def size(self): method vocabulary (line 40) | def vocabulary(self): FILE: modules/text/language_model/slda_webpage/vose_alias.py class VoseAlias (line 9) | class VoseAlias(object): method __init__ (line 13) | def __init__(self): method initialize (line 17) | def initialize(self, distribution): method generate (line 57) | def generate(self): method size (line 64) | def size(self): FILE: modules/text/language_model/slda_weibo/config.py class ModelType (line 6) | class ModelType: class ModelConfig (line 11) | class ModelConfig: FILE: modules/text/language_model/slda_weibo/document.py class Topic (line 4) | class Topic(object): method __init__ (line 9) | def __init__(self, tid, prob): class Token (line 14) | class Token(object): method __init__ (line 19) | def __init__(self, topic, id): class Sentence (line 24) | class Sentence(object): method __init__ (line 29) | def __init__(self, topic, tokens): class LDADoc (line 34) | class LDADoc(object): method __init__ (line 38) | def __init__(self): method init (line 46) | def init(self, num_topics): method add_token (line 55) | def add_token(self, token): method token (line 65) | def token(self, index): method set_topic (line 68) | def set_topic(self, index, new_topic): method set_alpha (line 81) | def set_alpha(self, alpha): method size (line 84) | def size(self): method topic_sum (line 89) | def topic_sum(self, topic_id): method sparse_topic_dist (line 92) | def sparse_topic_dist(self, sort=True): method dense_topic_dist (line 116) | def dense_topic_dist(self): method accumulate_topic_num (line 127) | def accumulate_topic_num(self): class SLDADoc (line 132) | class SLDADoc(LDADoc): method __init__ (line 137) | def __init__(self): method init (line 141) | def init(self, num_topics): method add_sentence (line 150) | def add_sentence(self, sent): method set_topic (line 160) | def set_topic(self, index, new_topic): method size (line 170) | def size(self): method sent (line 175) | def sent(self, index): FILE: modules/text/language_model/slda_weibo/inference_engine.py class SamplerType (line 13) | class SamplerType: class InferenceEngine (line 18) | class InferenceEngine(object): method __init__ (line 19) | def __init__(self, model_dir, conf_file, type=SamplerType.MetropolisHa... method infer (line 33) | def infer(self, input, doc): method lda_infer (line 64) | def lda_infer(self, doc, burn_in_iter, total_iter): method slda_infer (line 74) | def slda_infer(self, doc, burn_in_iter, total_iter): method model_type (line 84) | def model_type(self): method get_model (line 87) | def get_model(self): method get_config (line 90) | def get_config(self): FILE: modules/text/language_model/slda_weibo/model.py class TopicModel (line 11) | class TopicModel(object): method __init__ (line 15) | def __init__(self, model_dir, config): method term_id (line 35) | def term_id(self, term): method load_model (line 38) | def load_model(self, word_topic_path, vocab_path): method word_topic_value (line 49) | def word_topic_value(self, word_id, topic_id): method word_topic (line 57) | def word_topic(self, term_id): method topic_sum_value (line 62) | def topic_sum_value(self, topic_id): method topic_sum (line 65) | def topic_sum(self): method num_topics (line 68) | def num_topics(self): method vocab_size (line 71) | def vocab_size(self): method alpha (line 74) | def alpha(self): method alpha_sum (line 77) | def alpha_sum(self): method beta (line 80) | def beta(self): method beta_sum (line 83) | def beta_sum(self): method type (line 86) | def type(self): method __load_word_dict (line 89) | def __load_word_dict(self, word_dict_path): method get_vocab (line 119) | def get_vocab(self): method topic_words (line 122) | def topic_words(self): FILE: modules/text/language_model/slda_weibo/module.py class TopicModel (line 23) | class TopicModel(hub.Module): method _initialize (line 24) | def _initialize(self): method infer_doc_topic_distribution (line 49) | def infer_doc_topic_distribution(self, document): method show_topic_keywords (line 80) | def show_topic_keywords(self, topic_id, k=10): FILE: modules/text/language_model/slda_weibo/sampler.py class Sampler (line 12) | class Sampler(object): method __init__ (line 13) | def __init__(self): method sample_doc (line 16) | def sample_doc(self, doc): class MHSampler (line 22) | class MHSampler(Sampler): method __init__ (line 23) | def __init__(self, model): method __construct_alias_table (line 34) | def __construct_alias_table(self): method sample_doc (line 66) | def sample_doc(self, doc): method __sample_token (line 76) | def __sample_token(self, doc, token): method __sample_sentence (line 83) | def __sample_sentence(self, doc, sent): method __doc_proposal (line 90) | def __doc_proposal(self, doc, token): method __word_proposal (line 134) | def __word_proposal(self, doc, token, old_topic): method __proportional_function (line 164) | def __proportional_function(self, doc, token, new_topic): method __word_proposal_distribution (line 194) | def __word_proposal_distribution(self, word_id, topic): method __doc_proposal_distribution (line 199) | def __doc_proposal_distribution(self, doc, topic): method __propose (line 202) | def __propose(self, word_id): class GibbsSampler (line 212) | class GibbsSampler(Sampler): method __init__ (line 213) | def __init__(self, model): method sample_doc (line 217) | def sample_doc(self, doc): method __sample_token (line 227) | def __sample_token(self, doc, token): method __sample_sentence (line 254) | def __sample_sentence(self, doc, sent): FILE: modules/text/language_model/slda_weibo/semantic_matching.py class WordAndDis (line 11) | class WordAndDis(object): method __init__ (line 12) | def __init__(self): class SemanticMatching (line 17) | class SemanticMatching(object): method __init__ (line 18) | def __init__(self): method l2_norm (line 21) | def l2_norm(self, vec): method cosine_similarity (line 27) | def cosine_similarity(self, vec1, vec2): method likelihood_based_similarity (line 33) | def likelihood_based_similarity(self, terms, doc_topic_dist, model): method kullback_leibler_divergence (line 57) | def kullback_leibler_divergence(self, dist1, dist2): method jensen_shannon_divergence (line 63) | def jensen_shannon_divergence(self, dist1, dist2): method hellinger_distance (line 72) | def hellinger_distance(self, dist1, dist2): FILE: modules/text/language_model/slda_weibo/tokenizer.py class Tokenizer (line 7) | class Tokenizer(object): method __init__ (line 11) | def __init__(self): method tokenize (line 14) | def tokenize(self, text): class SimpleTokenizer (line 18) | class SimpleTokenizer(Tokenizer): method __init__ (line 25) | def __init__(self, vocab_path): method tokenize (line 31) | def tokenize(self, text): method contains (line 61) | def contains(self, word): method __load_vocab (line 66) | def __load_vocab(self, vocab_path): method __is_eng_char (line 79) | def __is_eng_char(self, c): method __tolower (line 84) | def __tolower(self, c): class LACTokenizer (line 91) | class LACTokenizer(Tokenizer): method __init__ (line 92) | def __init__(self, vocab_path, lac): method __load_vocab (line 99) | def __load_vocab(self, vocab_path): method tokenize (line 112) | def tokenize(self, text): method contains (line 124) | def contains(self, word): FILE: modules/text/language_model/slda_weibo/util.py function load_prototxt (line 10) | def load_prototxt(config_file, config): function fix_random_seed (line 32) | def fix_random_seed(seed=2147483647): function rand (line 36) | def rand(min_=0, max_=1): function rand_k (line 40) | def rand_k(k): function timeit (line 46) | def timeit(f): FILE: modules/text/language_model/slda_weibo/vocab.py class WordCount (line 6) | class WordCount(object): method __init__ (line 7) | def __init__(self, word_id, count): class Vocab (line 12) | class Vocab(object): method __init__ (line 13) | def __init__(self): method get_id (line 17) | def get_id(self, word): method load (line 22) | def load(self, vocab_file): method size (line 37) | def size(self): method vocabulary (line 40) | def vocabulary(self): FILE: modules/text/language_model/slda_weibo/vose_alias.py class VoseAlias (line 9) | class VoseAlias(object): method __init__ (line 13) | def __init__(self): method initialize (line 17) | def initialize(self, distribution): method generate (line 57) | def generate(self): method size (line 64) | def size(self): FILE: modules/text/lexical_analysis/jieba_paddle/module.py class JiebaPaddle (line 23) | class JiebaPaddle(hub.Module): method _initialize (line 25) | def _initialize(self): method cut (line 29) | def cut(self, sentence, use_paddle=True, cut_all=False, HMM=True): method create_gradio_app (line 57) | def create_gradio_app(self): method check_dependency (line 75) | def check_dependency(self): method cut_for_search (line 87) | def cut_for_search(self, sentence, HMM=True): method load_userdict (line 104) | def load_userdict(self, user_dict): method extract_tags (line 122) | def extract_tags(self, sentence, topK=20, withWeight=False, allowPOS=(... method textrank (line 148) | def textrank(self, sentence, topK=20, withWeight=False, allowPOS=('ns'... FILE: modules/text/lexical_analysis/lac/ahocorasick.py class Node (line 6) | class Node(object): method __init__ (line 16) | def __init__(self): class Ahocorasick (line 23) | class Ahocorasick(object): method __init__ (line 30) | def __init__(self): method add_word (line 34) | def add_word(self, word): method make (line 41) | def make(self): method search (line 70) | def search(self, content): method search_all (line 100) | def search_all(self, content): FILE: modules/text/lexical_analysis/lac/custom.py class Customization (line 9) | class Customization(object): method __init__ (line 14) | def __init__(self): method load_customization (line 19) | def load_customization(self, filename, sep=None): method parse_customization (line 51) | def parse_customization(self, query, lac_tags): FILE: modules/text/lexical_analysis/lac/module.py class DataFormatError (line 27) | class DataFormatError(Exception): method __init__ (line 29) | def __init__(self, *args): class LAC (line 41) | class LAC: method __init__ (line 43) | def __init__(self, user_dict=None): method _set_config (line 65) | def _set_config(self): method set_user_dict (line 88) | def set_user_dict(self, dict_path, sep=None): method del_user_dict (line 101) | def del_user_dict(self): method to_unicode (line 110) | def to_unicode(self, texts): method preprocess (line 130) | def preprocess(self, texts): method _get_index (line 146) | def _get_index(self, data_list, item=""): method cut (line 157) | def cut(self, text, use_gpu=False, batch_size=1, return_tag=True): method lexical_analysis (line 246) | def lexical_analysis(self, texts=[], data={}, use_gpu=False, batch_siz... method run_cmd (line 320) | def run_cmd(self, argvs): method get_tags (line 354) | def get_tags(self): method add_module_config_arg (line 368) | def add_module_config_arg(self): method add_module_input_arg (line 387) | def add_module_input_arg(self): method check_input_data (line 394) | def check_input_data(self, args): method create_gradio_app (line 415) | def create_gradio_app(self): FILE: modules/text/lexical_analysis/lac/processor.py class Query (line 7) | class Query(object): method __init__ (line 9) | def __init__(self, lac_query): method set_query (line 12) | def set_query(self, lac_query): class Bound (line 37) | class Bound(object): method __init__ (line 39) | def __init__(self, start_index=0, end_index=0, left_bound=0, right_bou... class Interventer (line 48) | class Interventer(object): method __init__ (line 50) | def __init__(self, ngram_dict_path, user_dict_path): method init_pos_types (line 56) | def init_pos_types(self): method load_dict (line 61) | def load_dict(self): method find_min_bound (line 96) | def find_min_bound(self, match_info, query): method calc_lm_score (line 123) | def calc_lm_score(self, phrase_list): method get_new_phrase_list (line 132) | def get_new_phrase_list(self, match_info, bound, query): method run (line 152) | def run(self, query): function load_kv_dict (line 220) | def load_kv_dict(dict_path, reverse=False, delimiter="\t", key_func=None... function word_to_ids (line 243) | def word_to_ids(words, word2id_dict, word_replace_dict, oov_id=None): function parse_result (line 254) | def parse_result(lines, crf_decode, id2label_dict, interventer=None): FILE: modules/text/lexical_analysis/lac/test.py class TestHubModule (line 10) | class TestHubModule(unittest.TestCase): method setUpClass (line 13) | def setUpClass(cls) -> None: method tearDownClass (line 19) | def tearDownClass(cls) -> None: method test_cut1 (line 22) | def test_cut1(self): method test_cut2 (line 26) | def test_cut2(self): method test_cut3 (line 36) | def test_cut3(self): method test_cut4 (line 46) | def test_cut4(self): method test_cut5 (line 56) | def test_cut5(self): method test_save_inference_model (line 69) | def test_save_inference_model(self): FILE: modules/text/machine_translation/transformer/en-de/module.py class MTTransformer (line 37) | class MTTransformer(nn.Layer): method __init__ (line 79) | def __init__(self, max_length: int = 256, max_out_len: int = 256, beam... method forward (line 117) | def forward(self, src_words: paddle.Tensor): method _convert_text_to_input (line 120) | def _convert_text_to_input(self, text: str): method _batchify (line 129) | def _batchify(self, data: List[str], batch_size: int): method predict (line 153) | def predict(self, data: List[str], batch_size: int = 1, n_best: int = ... FILE: modules/text/machine_translation/transformer/en-de/utils.py class MTTokenizer (line 23) | class MTTokenizer(object): method __init__ (line 24) | def __init__(self, bpe_codes_file: str, lang_src: str = 'en', lang_trg... method tokenize (line 34) | def tokenize(self, text: str): method detokenize (line 44) | def detokenize(self, tokens: List[str]): function post_process_seq (line 56) | def post_process_seq(seq, bos_idx, eos_idx, output_bos=False, output_eos... FILE: modules/text/machine_translation/transformer/zh-en/module.py class MTTransformer (line 39) | class MTTransformer(nn.Layer): method __init__ (line 81) | def __init__(self, max_length: int = 256, max_out_len: int = 256, beam... method forward (line 125) | def forward(self, src_words: paddle.Tensor): method _convert_text_to_input (line 128) | def _convert_text_to_input(self, text: str): method _batchify (line 137) | def _batchify(self, data: List[str], batch_size: int): method predict (line 161) | def predict(self, data: List[str], batch_size: int = 1, n_best: int = ... method create_gradio_app (line 188) | def create_gradio_app(self): FILE: modules/text/machine_translation/transformer/zh-en/utils.py class MTTokenizer (line 27) | class MTTokenizer(object): method __init__ (line 29) | def __init__(self, bpe_codes_file: str, lang_src: str = 'zh', lang_trg... method tokenize (line 37) | def tokenize(self, text: str): method detokenize (line 48) | def detokenize(self, tokens: List[str]): function post_process_seq (line 60) | def post_process_seq(seq, bos_idx, eos_idx, output_bos=False, output_eos... FILE: modules/text/punctuation_restoration/auto_punc/module.py class Ernie (line 35) | class Ernie(paddle.nn.Layer): method __init__ (line 36) | def __init__(self): method _load_dict (line 49) | def _load_dict(dict_path): method _clean_text (line 60) | def _clean_text(text, punc_list): method forward (line 66) | def forward(self, text: str): method add_puncs (line 81) | def add_puncs(self, texts: Union[str, List[str]], max_length=256, devi... FILE: modules/text/sentiment_analysis/emotion_detection_textcnn/module.py class EmotionDetectionTextCNN (line 18) | class EmotionDetectionTextCNN(hub.NLPPredictionModule): method _initialize (line 20) | def _initialize(self): method word_seg_module (line 34) | def word_seg_module(self): method emotion_classify (line 43) | def emotion_classify(self, texts=[], data={}, use_gpu=False, batch_siz... method get_labels (line 92) | def get_labels(self): FILE: modules/text/sentiment_analysis/emotion_detection_textcnn/processor.py function load_vocab (line 6) | def load_vocab(file_path): function get_predict_label (line 26) | def get_predict_label(probs): function preprocess (line 37) | def preprocess(lac, predicted_data, word_dict, use_gpu=False, batch_size... function postprocess (line 55) | def postprocess(prediction, texts): FILE: modules/text/sentiment_analysis/ernie_skep_sentiment_analysis/model/ernie.py class ErnieConfig (line 27) | class ErnieConfig(object): method __init__ (line 30) | def __init__(self, config_path): method _parse (line 36) | def _parse(self, config_path): method __getitem__ (line 49) | def __getitem__(self, key): method has (line 56) | def has(self, key): method get (line 65) | def get(self, key, default_value): method print_config (line 75) | def print_config(self): FILE: modules/text/sentiment_analysis/ernie_skep_sentiment_analysis/module.py class ErnieSkepSentimentAnalysis (line 45) | class ErnieSkepSentimentAnalysis(TransformerModule): method _initialize (line 52) | def _initialize(self): method _set_config (line 68) | def _set_config(self): method array2tensor (line 92) | def array2tensor(self, arr_data): method predict_sentiment (line 100) | def predict_sentiment(self, texts=[], use_gpu=False): method _convert_text_to_feature (line 151) | def _convert_text_to_feature(self, text): method run_cmd (line 189) | def run_cmd(self, argvs): method add_module_config_arg (line 209) | def add_module_config_arg(self): method add_module_input_arg (line 218) | def add_module_input_arg(self): FILE: modules/text/sentiment_analysis/senta_bilstm/module.py class SentaBiLSTM (line 27) | class SentaBiLSTM(hub.NLPPredictionModule): method _initialize (line 29) | def _initialize(self): method word_seg_module (line 43) | def word_seg_module(self): method sentiment_classify (line 52) | def sentiment_classify(self, texts=[], data={}, use_gpu=False, batch_s... method get_labels (line 103) | def get_labels(self): FILE: modules/text/sentiment_analysis/senta_bilstm/processor.py function load_vocab (line 6) | def load_vocab(file_path): function preprocess (line 20) | def preprocess(lac, texts, word_dict, use_gpu=False, batch_size=1): function postprocess (line 42) | def postprocess(predict_out, texts): FILE: modules/text/sentiment_analysis/senta_bow/module.py class SentaBow (line 27) | class SentaBow(hub.NLPPredictionModule): method _initialize (line 29) | def _initialize(self): method word_seg_module (line 43) | def word_seg_module(self): method sentiment_classify (line 52) | def sentiment_classify(self, texts=[], data={}, use_gpu=False, batch_s... method get_labels (line 103) | def get_labels(self): FILE: modules/text/sentiment_analysis/senta_bow/processor.py function load_vocab (line 6) | def load_vocab(file_path): function preprocess (line 20) | def preprocess(lac, texts, word_dict, use_gpu=False, batch_size=1): function postprocess (line 42) | def postprocess(predict_out, texts): FILE: modules/text/sentiment_analysis/senta_cnn/module.py class SentaCNN (line 27) | class SentaCNN(hub.NLPPredictionModule): method _initialize (line 29) | def _initialize(self, user_dict=None): method word_seg_module (line 43) | def word_seg_module(self): method sentiment_classify (line 52) | def sentiment_classify(self, texts=[], data={}, use_gpu=False, batch_s... method get_labels (line 103) | def get_labels(self): FILE: modules/text/sentiment_analysis/senta_cnn/processor.py function load_vocab (line 6) | def load_vocab(file_path): function preprocess (line 20) | def preprocess(lac, texts, word_dict, use_gpu=False, batch_size=1): function postprocess (line 42) | def postprocess(predict_out, texts): FILE: modules/text/sentiment_analysis/senta_gru/module.py class SentaGRU (line 27) | class SentaGRU(hub.NLPPredictionModule): method _initialize (line 29) | def _initialize(self, user_dict=None): method word_seg_module (line 43) | def word_seg_module(self): method sentiment_classify (line 52) | def sentiment_classify(self, texts=[], data={}, use_gpu=False, batch_s... method get_labels (line 103) | def get_labels(self): FILE: modules/text/sentiment_analysis/senta_gru/processor.py function load_vocab (line 6) | def load_vocab(file_path): function preprocess (line 20) | def preprocess(lac, texts, word_dict, use_gpu=False, batch_size=1): function postprocess (line 42) | def postprocess(predict_out, texts): FILE: modules/text/sentiment_analysis/senta_lstm/module.py class SentaLSTM (line 27) | class SentaLSTM(hub.NLPPredictionModule): method _initialize (line 29) | def _initialize(self, user_dict=None): method word_seg_module (line 43) | def word_seg_module(self): method sentiment_classify (line 52) | def sentiment_classify(self, texts=[], data={}, use_gpu=False, batch_s... method get_labels (line 103) | def get_labels(self): FILE: modules/text/sentiment_analysis/senta_lstm/processor.py function load_vocab (line 6) | def load_vocab(file_path): function preprocess (line 20) | def preprocess(lac, texts, word_dict, use_gpu=False, batch_size=1): function postprocess (line 42) | def postprocess(predict_out, texts): FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_1/model.py class DecoderLayer (line 23) | class DecoderLayer(nn.TransformerDecoderLayer): method __init__ (line 24) | def __init__(self, *args, **kwargs): method forward (line 27) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class Decoder (line 73) | class Decoder(nn.TransformerDecoder): method forward (line 79) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class SimultaneousTransformer (line 103) | class SimultaneousTransformer(nn.Layer): method __init__ (line 107) | def __init__(self, method forward (line 180) | def forward(self, src_word, trg_word): method beam_search (line 239) | def beam_search(self, src_word, beam_size=4, max_len=256, waitk=-1): method greedy_search (line 243) | def greedy_search(self, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_1/module.py class STTransformer (line 36) | class STTransformer(): method __init__ (line 53) | def __init__(self, method translate (line 89) | def translate(self, text, use_gpu=False): FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_1/processor.py class STACLTokenizer (line 20) | class STACLTokenizer: method __init__ (line 25) | def __init__(self, method tokenize (line 53) | def tokenize(self, text): function post_process_seq (line 59) | def post_process_seq(seq, function predict (line 79) | def predict(tokenized_src, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_3/model.py class DecoderLayer (line 23) | class DecoderLayer(nn.TransformerDecoderLayer): method __init__ (line 24) | def __init__(self, *args, **kwargs): method forward (line 27) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class Decoder (line 73) | class Decoder(nn.TransformerDecoder): method forward (line 79) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class SimultaneousTransformer (line 103) | class SimultaneousTransformer(nn.Layer): method __init__ (line 107) | def __init__(self, method forward (line 180) | def forward(self, src_word, trg_word): method beam_search (line 239) | def beam_search(self, src_word, beam_size=4, max_len=256, waitk=-1): method greedy_search (line 243) | def greedy_search(self, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_3/module.py class STTransformer (line 36) | class STTransformer(): method __init__ (line 53) | def __init__(self, method translate (line 89) | def translate(self, text, use_gpu=False): FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_3/processor.py class STACLTokenizer (line 20) | class STACLTokenizer: method __init__ (line 25) | def __init__(self, method tokenize (line 53) | def tokenize(self, text): function post_process_seq (line 59) | def post_process_seq(seq, function predict (line 79) | def predict(tokenized_src, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_5/model.py class DecoderLayer (line 23) | class DecoderLayer(nn.TransformerDecoderLayer): method __init__ (line 24) | def __init__(self, *args, **kwargs): method forward (line 27) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class Decoder (line 73) | class Decoder(nn.TransformerDecoder): method forward (line 79) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class SimultaneousTransformer (line 103) | class SimultaneousTransformer(nn.Layer): method __init__ (line 107) | def __init__(self, method forward (line 180) | def forward(self, src_word, trg_word): method beam_search (line 239) | def beam_search(self, src_word, beam_size=4, max_len=256, waitk=-1): method greedy_search (line 243) | def greedy_search(self, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_5/module.py class STTransformer (line 36) | class STTransformer(): method __init__ (line 53) | def __init__(self, method translate (line 89) | def translate(self, text, use_gpu=False): FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_5/processor.py class STACLTokenizer (line 20) | class STACLTokenizer: method __init__ (line 25) | def __init__(self, method tokenize (line 53) | def tokenize(self, text): function post_process_seq (line 59) | def post_process_seq(seq, function predict (line 79) | def predict(tokenized_src, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_7/model.py class DecoderLayer (line 23) | class DecoderLayer(nn.TransformerDecoderLayer): method __init__ (line 24) | def __init__(self, *args, **kwargs): method forward (line 27) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class Decoder (line 73) | class Decoder(nn.TransformerDecoder): method forward (line 79) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class SimultaneousTransformer (line 103) | class SimultaneousTransformer(nn.Layer): method __init__ (line 107) | def __init__(self, method forward (line 180) | def forward(self, src_word, trg_word): method beam_search (line 239) | def beam_search(self, src_word, beam_size=4, max_len=256, waitk=-1): method greedy_search (line 243) | def greedy_search(self, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_7/module.py class STTransformer (line 36) | class STTransformer(): method __init__ (line 53) | def __init__(self, method translate (line 89) | def translate(self, text, use_gpu=False): FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_7/processor.py class STACLTokenizer (line 20) | class STACLTokenizer: method __init__ (line 25) | def __init__(self, method tokenize (line 53) | def tokenize(self, text): function post_process_seq (line 59) | def post_process_seq(seq, function predict (line 79) | def predict(tokenized_src, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_all/model.py class DecoderLayer (line 23) | class DecoderLayer(nn.TransformerDecoderLayer): method __init__ (line 24) | def __init__(self, *args, **kwargs): method forward (line 27) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class Decoder (line 73) | class Decoder(nn.TransformerDecoder): method forward (line 79) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, cache=... class SimultaneousTransformer (line 103) | class SimultaneousTransformer(nn.Layer): method __init__ (line 107) | def __init__(self, method forward (line 180) | def forward(self, src_word, trg_word): method beam_search (line 239) | def beam_search(self, src_word, beam_size=4, max_len=256, waitk=-1): method greedy_search (line 243) | def greedy_search(self, FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_all/module.py class STTransformer (line 36) | class STTransformer(): method __init__ (line 53) | def __init__(self, method translate (line 89) | def translate(self, text, use_gpu=False): FILE: modules/text/simultaneous_translation/stacl/transformer_nist_wait_all/processor.py class STACLTokenizer (line 20) | class STACLTokenizer: method __init__ (line 25) | def __init__(self, method tokenize (line 53) | def tokenize(self, text): function post_process_seq (line 59) | def post_process_seq(seq, function predict (line 79) | def predict(tokenized_src, FILE: modules/text/syntactic_analysis/DDParser/module.py class ddparser (line 17) | class ddparser(hub.NLPPredictionModule): method __init__ (line 18) | def __init__(self, method serving_parse (line 34) | def serving_parse(self, texts): method parse (line 41) | def parse(self, texts): method run_cmd (line 62) | def run_cmd(self, argvs): method visualize (line 84) | def visualize(self, text): FILE: modules/text/text_correction/ernie-csc/module.py class Ernie_CSC (line 19) | class Ernie_CSC(paddle.nn.Layer): method __init__ (line 20) | def __init__(self, method predict (line 25) | def predict(self, texts): method run_cmd (line 47) | def run_cmd(self, argvs): FILE: modules/text/text_generation/GPT2_Base_CN/module.py class GPT2_Base_CN (line 16) | class GPT2_Base_CN(nn.Layer): method __init__ (line 17) | def __init__(self): method greedy_search (line 32) | def greedy_search(self, text, max_len=32, end_word=None): method top_k_top_p_filtering (line 60) | def top_k_top_p_filtering(logits, top_k=0, top_p=1.0, filter_value=-fl... method nucleus_sample (line 92) | def nucleus_sample(self, method serving_method (line 140) | def serving_method(self, text, mode='search', **kwargs): FILE: modules/text/text_generation/GPT2_CPM_LM/module.py class GPT2_CPM_LM (line 17) | class GPT2_CPM_LM(nn.Layer): method __init__ (line 18) | def __init__(self): method greedy_search (line 58) | def greedy_search(self, text, max_len=32, end_word=None): method top_k_top_p_filtering (line 86) | def top_k_top_p_filtering(logits, top_k=0, top_p=1.0, filter_value=-fl... method nucleus_sample (line 118) | def nucleus_sample(self, method serving_method (line 168) | def serving_method(self, text, mode='search', **kwargs): FILE: modules/text/text_generation/Rumor_prediction/module.py class Rumorprediction (line 38) | class Rumorprediction(hub.Module): method _initialize (line 39) | def _initialize(self): method Rumor (line 46) | def Rumor(self, texts, use_gpu=False): method add_module_config_arg (line 102) | def add_module_config_arg(self): method add_module_input_arg (line 109) | def add_module_input_arg(self): method run_cmd (line 116) | def run_cmd(self, argvs): FILE: modules/text/text_generation/ernie_gen/decode.py function gen_bias (line 34) | def gen_bias(encoder_inputs, decoder_inputs, step): function greedy_search_infilling (line 55) | def greedy_search_infilling(model, function log_softmax (line 120) | def log_softmax(x): function mask_prob (line 125) | def mask_prob(p, onehot_eos, finished): function hyp_score (line 131) | def hyp_score(log_probs, length, length_penalty): function beam_search_step (line 136) | def beam_search_step(state, logits, eos_id, beam_width, is_first_step, l... function beam_search_infilling (line 179) | def beam_search_infilling(model, function post_process (line 278) | def post_process(token): FILE: modules/text/text_generation/ernie_gen/encode.py function convert_example (line 20) | def convert_example(tokenizer, function gen_mask (line 63) | def gen_mask(batch_ids, mask_type='bidi', query_len=None, pad_value=0): function after_padding (line 87) | def after_padding(args): FILE: modules/text/text_generation/ernie_gen/model.py class StackModel (line 20) | class StackModel(nn.Layer): method __init__ (line 21) | def __init__(self, model): method forward (line 25) | def forward(self, src_ids, src_sids, src_pids, tgt_ids, tgt_sids, tgt_... FILE: modules/text/text_generation/ernie_gen/module.py class ErnieGen (line 45) | class ErnieGen(): method __init__ (line 46) | def __init__(self): method model (line 56) | def model(self): method finetune (line 61) | def finetune( method export (line 236) | def export(self, method _evaluate (line 292) | def _evaluate(self, model, data_loader, tokenizer, rouge1, rouge2, att... method _load_dataset (line 349) | def _load_dataset(self, datafiles): FILE: modules/text/text_generation/ernie_gen/template/decode.py function gen_bias (line 34) | def gen_bias(encoder_inputs, decoder_inputs, step): function greedy_search_infilling (line 55) | def greedy_search_infilling(model, function log_softmax (line 120) | def log_softmax(x): function mask_prob (line 125) | def mask_prob(p, onehot_eos, finished): function hyp_score (line 131) | def hyp_score(log_probs, length, length_penalty): function beam_search_step (line 136) | def beam_search_step(state, logits, eos_id, beam_width, is_first_step, l... function beam_search_infilling (line 179) | def beam_search_infilling(model, function post_process (line 278) | def post_process(token): FILE: modules/text/text_generation/ernie_gen_acrostic_poetry/decode.py function gen_bias (line 34) | def gen_bias(encoder_inputs, decoder_inputs, step): function greedy_search_infilling (line 55) | def greedy_search_infilling(model, function log_softmax (line 120) | def log_softmax(x): function mask_prob (line 125) | def mask_prob(p, onehot_eos, finished): function hyp_score (line 131) | def hyp_score(log_probs, length, length_penalty): function beam_search_step (line 136) | def beam_search_step(state, logits, eos_id, beam_width, is_first_step, l... function beam_search_infilling (line 179) | def beam_search_infilling(model, function post_process (line 278) | def post_process(token): FILE: modules/text/text_generation/ernie_gen_acrostic_poetry/module.py class ErnieGen (line 41) | class ErnieGen(hub.NLPPredictionModule): method __init__ (line 42) | def __init__(self, line=4, word=7): method generate (line 64) | def generate(self, texts, use_gpu=False, beam_width=5): method add_module_config_arg (line 132) | def add_module_config_arg(self): method run_cmd (line 142) | def run_cmd(self, argvs): FILE: modules/text/text_generation/ernie_gen_couplet/decode.py function gen_bias (line 34) | def gen_bias(encoder_inputs, decoder_inputs, step): function greedy_search_infilling (line 55) | def greedy_search_infilling(model, function log_softmax (line 120) | def log_softmax(x): function mask_prob (line 125) | def mask_prob(p, onehot_eos, finished): function hyp_score (line 131) | def hyp_score(log_probs, length, length_penalty): function beam_search_step (line 136) | def beam_search_step(state, logits, eos_id, beam_width, is_first_step, l... function beam_search_infilling (line 179) | def beam_search_infilling(model, function post_process (line 278) | def post_process(token): FILE: modules/text/text_generation/ernie_gen_couplet/module.py class ErnieGen (line 41) | class ErnieGen(hub.NLPPredictionModule): method __init__ (line 42) | def __init__(self): method generate (line 58) | def generate(self, texts, use_gpu=False, beam_width=5): method add_module_config_arg (line 121) | def add_module_config_arg(self): method run_cmd (line 131) | def run_cmd(self, argvs): FILE: modules/text/text_generation/ernie_gen_lover_words/decode.py function gen_bias (line 34) | def gen_bias(encoder_inputs, decoder_inputs, step): function greedy_search_infilling (line 55) | def greedy_search_infilling(model, function log_softmax (line 120) | def log_softmax(x): function mask_prob (line 125) | def mask_prob(p, onehot_eos, finished): function hyp_score (line 131) | def hyp_score(log_probs, length, length_penalty): function beam_search_step (line 136) | def beam_search_step(state, logits, eos_id, beam_width, is_first_step, l... function beam_search_infilling (line 179) | def beam_search_infilling(model, function post_process (line 278) | def post_process(token): FILE: modules/text/text_generation/ernie_gen_lover_words/module.py class ErnieGen (line 41) | class ErnieGen(hub.NLPPredictionModule): method __init__ (line 42) | def __init__(self): method generate (line 58) | def generate(self, texts, use_gpu=False, beam_width=5): method add_module_config_arg (line 113) | def add_module_config_arg(self): method run_cmd (line 123) | def run_cmd(self, argvs): FILE: modules/text/text_generation/ernie_gen_poetry/decode.py function gen_bias (line 34) | def gen_bias(encoder_inputs, decoder_inputs, step): function greedy_search_infilling (line 55) | def greedy_search_infilling(model, function log_softmax (line 114) | def log_softmax(x): function mask_prob (line 119) | def mask_prob(p, onehot_eos, finished): function hyp_score (line 125) | def hyp_score(log_probs, length, length_penalty): function beam_search_step (line 130) | def beam_search_step(state, logits, eos_id, beam_width, is_first_step, l... function beam_search_infilling (line 173) | def beam_search_infilling(model, function post_process (line 267) | def post_process(token): FILE: modules/text/text_generation/ernie_gen_poetry/module.py class ErnieGen (line 41) | class ErnieGen(hub.NLPPredictionModule): method __init__ (line 42) | def __init__(self): method generate (line 58) | def generate(self, texts, use_gpu=False, beam_width=5): method add_module_config_arg (line 130) | def add_module_config_arg(self): method run_cmd (line 140) | def run_cmd(self, argvs): FILE: modules/text/text_generation/ernie_tiny_couplet/module.py class ErnieTinyCouplet (line 32) | class ErnieTinyCouplet(hub.NLPPredictionModule): method _initialize (line 33) | def _initialize(self, use_gpu=False): method generate (line 66) | def generate(self, texts): method add_module_config_arg (line 80) | def add_module_config_arg(self): method run_cmd (line 88) | def run_cmd(self, argvs): method serving_method (line 118) | def serving_method(self, texts): FILE: modules/text/text_generation/ernie_zeus/module.py function get_access_token (line 12) | def get_access_token(ak: str = None, sk: str = None) -> str: class ERNIEZeus (line 51) | class ERNIEZeus: method __init__ (line 53) | def __init__(self, ak: str = None, sk: str = None) -> None: method custom_generation (line 57) | def custom_generation(self, method text_generation (line 128) | def text_generation(self, method text_summarization (line 151) | def text_summarization(self, method copywriting_generation (line 175) | def copywriting_generation(self, method novel_continuation (line 199) | def novel_continuation(self, method answer_generation (line 223) | def answer_generation(self, method couplet_continuation (line 247) | def couplet_continuation(self, method composition_generation (line 271) | def composition_generation(self, method text_cloze (line 295) | def text_cloze(self, method cmd (line 319) | def cmd(self, argvs): method create_gradio_app (line 385) | def create_gradio_app(self): FILE: modules/text/text_generation/ernie_zeus/test.py class TestHubModule (line 6) | class TestHubModule(unittest.TestCase): method setUpClass (line 9) | def setUpClass(cls) -> None: method test_custom_generation (line 12) | def test_custom_generation(self): method test_text_generation (line 16) | def test_text_generation(self): method test_text_summarization (line 20) | def test_text_summarization(self): method test_copywriting_generation (line 26) | def test_copywriting_generation(self): method test_modulenovel_continuation (line 30) | def test_modulenovel_continuation(self): method test_answer_generation (line 34) | def test_answer_generation(self): method test_couplet_continuation (line 38) | def test_couplet_continuation(self): method test_composition_generation (line 42) | def test_composition_generation(self): method test_text_cloze (line 46) | def test_text_cloze(self): FILE: modules/text/text_generation/plato-mini/module.py class UnifiedTransformer (line 37) | class UnifiedTransformer(nn.Layer): method __init__ (line 38) | def __init__(self): method _convert_text_to_input (line 45) | def _convert_text_to_input(self, texts: List[str], max_seq_len: int): method _batchify (line 52) | def _batchify(self, data: List[List[str]], max_seq_len: int, batch_siz... method interactive_mode (line 101) | def interactive_mode(self, max_turn=3): method forward (line 112) | def forward(self, method predict (line 147) | def predict(self, FILE: modules/text/text_generation/plato-mini/utils.py function post_process_response (line 18) | def post_process_response(token_ids: List[int], tokenizer): function get_in_turn_repetition (line 33) | def get_in_turn_repetition(pred: List[str], is_cn: bool = False): function select_response (line 52) | def select_response(ids, FILE: modules/text/text_generation/plato2_en_base/model.py function post_process_context (line 21) | def post_process_context(token_ids, reader, merge=True): function post_process_response (line 37) | def post_process_response(token_ids, reader, merge=True): function get_cross_turn_repetition (line 54) | def get_cross_turn_repetition(context, pred_tokens, eos_idx, is_cn=False): function get_in_turn_repetition (line 74) | def get_in_turn_repetition(pred, is_cn=False): class Plato2EncoderLayer (line 91) | class Plato2EncoderLayer(nn.Layer): method __init__ (line 93) | def __init__(self, n_head, hidden_size, attn_dropout, act_dropout): method forward (line 105) | def forward(self, x, attn_mask, cache): method gen_cache (line 122) | def gen_cache(self, key): class Plato2Encoder (line 126) | class Plato2Encoder(nn.Layer): method __init__ (line 128) | def __init__(self, vocab_size, type_size, max_position_seq_len, num_la... method forward (line 147) | def forward(self, caches, token_ids, type_ids, pos_ids, generation_mas... method gen_input (line 158) | def gen_input(self, token_ids, type_ids, pos_ids, input_mask, aux_emb=... method gen_caches (line 178) | def gen_caches(self, key): class NSP (line 183) | class NSP(nn.Layer): method __init__ (line 185) | def __init__(self, vocab_size, type_size, max_position_seq_len, num_la... method forward (line 207) | def forward(self, inputs): method gen_input (line 230) | def gen_input(self, token_ids, type_ids, pos_ids, input_mask, aux_emb=... class Plato2InferModel (line 251) | class Plato2InferModel(nn.Layer): method __init__ (line 253) | def __init__(self, method forward (line 300) | def forward(self, inputs): method decode (line 326) | def decode(self, inputs, caches): method gen_nsp_input (line 374) | def gen_nsp_input(self, token_ids, pred_ids): method get_results (line 409) | def get_results(self, data_id, token_ids, pred_ids, probs): FILE: modules/text/text_generation/plato2_en_base/module.py class Plato2 (line 46) | class Plato2(nn.Layer, hub.NLPPredictionModule): method __init__ (line 48) | def __init__(self): method setup_args (line 75) | def setup_args(self): method generate (line 111) | def generate(self, texts): method interactive_mode (line 149) | def interactive_mode(self, max_turn=6): method run_cmd (line 164) | def run_cmd(self, argvs): FILE: modules/text/text_generation/plato2_en_base/readers/dialog_reader.py class DialogReader (line 29) | class DialogReader(object): method add_cmdline_args (line 33) | def add_cmdline_args(cls, parser): method __init__ (line 64) | def __init__(self, args): method get_train_progress (line 106) | def get_train_progress(self): method _convert_example_to_record (line 110) | def _convert_example_to_record(self, example, is_infer): method _read_tsv (line 208) | def _read_tsv(self, fp, phase, is_infer, delimiter="\t", quotechar=None): method _read_numerical_file (line 223) | def _read_numerical_file(self, fp, delimiter=";"): method _read_file (line 234) | def _read_file(self, input_file, phase, is_infer): method _read_files (line 247) | def _read_files(self, filelist, phase, is_infer, shuffle_files): method _batch_reader (line 267) | def _batch_reader(self, method _distributed_batch_reader (line 353) | def _distributed_batch_reader(self, method data_generator (line 372) | def data_generator(self, method _gen_self_attn_mask (line 421) | def _gen_self_attn_mask(self, method _pad_batch_records (line 445) | def _pad_batch_records(self, batch_records, is_infer): function open_file (line 491) | def open_file(filename): FILE: modules/text/text_generation/plato2_en_base/readers/nsp_reader.py class NSPReader (line 26) | class NSPReader(DialogReader): method add_cmdline_args (line 30) | def add_cmdline_args(cls, parser): method __init__ (line 42) | def __init__(self, args): method _convert_example_to_record (line 53) | def _convert_example_to_record(self, example, is_infer): method _mix_negative_sample (line 60) | def _mix_negative_sample(self, reader, neg_pool_size=2**16): method _batch_reader (line 105) | def _batch_reader(self, method _pad_batch_records (line 118) | def _pad_batch_records(self, batch_records, is_infer): FILE: modules/text/text_generation/plato2_en_base/readers/plato_reader.py class PlatoReader (line 23) | class PlatoReader(DialogReader): method __init__ (line 26) | def __init__(self, args): method _pad_batch_records (line 31) | def _pad_batch_records(self, batch_records, is_infer): FILE: modules/text/text_generation/plato2_en_base/utils/__init__.py function repeat_array (line 21) | def repeat_array(array, times): function gen_inputs (line 29) | def gen_inputs(inputs, latent_type_size): function pad_batch_data (line 53) | def pad_batch_data(insts, pad_id=0): FILE: modules/text/text_generation/plato2_en_base/utils/args.py function str2bool (line 20) | def str2bool(v): class Args (line 30) | class Args(dict): method __getattr__ (line 36) | def __getattr__(self, name): method get (line 45) | def get(self, key, default_value=None): method __setattr__ (line 55) | def __setattr__(self, name, value): method save (line 58) | def save(self, filename): method load (line 62) | def load(self, filename, group_name=None): function parse_args (line 77) | def parse_args(parser: argparse.ArgumentParser, allow_unknown=False) -> ... FILE: modules/text/text_generation/plato2_en_base/utils/masking.py function mask (line 19) | def mask(batch_tokens, FILE: modules/text/text_generation/plato2_en_base/utils/tokenization.py function clean_text (line 23) | def clean_text(text): function preprocess_text (line 42) | def preprocess_text(inputs, remove_space=True, lower=False): function encode_pieces (line 56) | def encode_pieces(spm_model, text, return_unicode=True, sample=False): function encode_ids (line 69) | def encode_ids(spm_model, text, sample=False): function convert_to_unicode (line 76) | def convert_to_unicode(text): function load_vocab (line 86) | def load_vocab(vocab_file): function convert_by_vocab (line 101) | def convert_by_vocab(vocab, items): class SentencePieceTokenizer (line 109) | class SentencePieceTokenizer(object): method add_cmdline_args (line 113) | def add_cmdline_args(cls, parser): method __init__ (line 121) | def __init__(self, args): method tokenize (line 128) | def tokenize(self, text): method convert_tokens_to_ids (line 133) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 144) | def convert_ids_to_tokens(self, ids): method merge_subword (line 148) | def merge_subword(self, tokens): method convert_ids_to_str (line 163) | def convert_ids_to_str(self, ids): function _is_whitespace (line 172) | def _is_whitespace(char): function _is_control (line 184) | def _is_control(char): FILE: modules/text/text_generation/plato2_en_large/model.py function post_process_context (line 21) | def post_process_context(token_ids, reader, merge=True): function post_process_response (line 37) | def post_process_response(token_ids, reader, merge=True): function get_cross_turn_repetition (line 54) | def get_cross_turn_repetition(context, pred_tokens, eos_idx, is_cn=False): function get_in_turn_repetition (line 74) | def get_in_turn_repetition(pred, is_cn=False): class Plato2EncoderLayer (line 91) | class Plato2EncoderLayer(nn.Layer): method __init__ (line 93) | def __init__(self, n_head, hidden_size, attn_dropout, act_dropout): method forward (line 105) | def forward(self, x, attn_mask, cache): method gen_cache (line 122) | def gen_cache(self, key): class Plato2Encoder (line 126) | class Plato2Encoder(nn.Layer): method __init__ (line 128) | def __init__(self, vocab_size, type_size, max_position_seq_len, num_la... method forward (line 147) | def forward(self, caches, token_ids, type_ids, pos_ids, generation_mas... method gen_input (line 158) | def gen_input(self, token_ids, type_ids, pos_ids, input_mask, aux_emb=... method gen_caches (line 178) | def gen_caches(self, key): class NSP (line 183) | class NSP(nn.Layer): method __init__ (line 185) | def __init__(self, vocab_size, type_size, max_position_seq_len, num_la... method forward (line 207) | def forward(self, inputs): method gen_input (line 230) | def gen_input(self, token_ids, type_ids, pos_ids, input_mask, aux_emb=... class Plato2InferModel (line 251) | class Plato2InferModel(nn.Layer): method __init__ (line 253) | def __init__(self, method forward (line 300) | def forward(self, inputs): method decode (line 326) | def decode(self, inputs, caches): method gen_nsp_input (line 374) | def gen_nsp_input(self, token_ids, pred_ids): method get_results (line 409) | def get_results(self, data_id, token_ids, pred_ids, probs): FILE: modules/text/text_generation/plato2_en_large/module.py class Plato2 (line 46) | class Plato2(nn.Layer, hub.NLPPredictionModule): method __init__ (line 48) | def __init__(self): method setup_args (line 75) | def setup_args(self): method generate (line 111) | def generate(self, texts): method interactive_mode (line 149) | def interactive_mode(self, max_turn=6): method run_cmd (line 164) | def run_cmd(self, argvs): FILE: modules/text/text_generation/plato2_en_large/readers/dialog_reader.py class DialogReader (line 29) | class DialogReader(object): method add_cmdline_args (line 33) | def add_cmdline_args(cls, parser): method __init__ (line 64) | def __init__(self, args): method get_train_progress (line 106) | def get_train_progress(self): method _convert_example_to_record (line 110) | def _convert_example_to_record(self, example, is_infer): method _read_tsv (line 208) | def _read_tsv(self, fp, phase, is_infer, delimiter="\t", quotechar=None): method _read_numerical_file (line 223) | def _read_numerical_file(self, fp, delimiter=";"): method _read_file (line 234) | def _read_file(self, input_file, phase, is_infer): method _read_files (line 247) | def _read_files(self, filelist, phase, is_infer, shuffle_files): method _batch_reader (line 267) | def _batch_reader(self, method _distributed_batch_reader (line 353) | def _distributed_batch_reader(self, method data_generator (line 372) | def data_generator(self, method _gen_self_attn_mask (line 421) | def _gen_self_attn_mask(self, method _pad_batch_records (line 445) | def _pad_batch_records(self, batch_records, is_infer): function open_file (line 491) | def open_file(filename): FILE: modules/text/text_generation/plato2_en_large/readers/nsp_reader.py class NSPReader (line 26) | class NSPReader(DialogReader): method add_cmdline_args (line 30) | def add_cmdline_args(cls, parser): method __init__ (line 42) | def __init__(self, args): method _convert_example_to_record (line 53) | def _convert_example_to_record(self, example, is_infer): method _mix_negative_sample (line 60) | def _mix_negative_sample(self, reader, neg_pool_size=2**16): method _batch_reader (line 105) | def _batch_reader(self, method _pad_batch_records (line 118) | def _pad_batch_records(self, batch_records, is_infer): FILE: modules/text/text_generation/plato2_en_large/readers/plato_reader.py class PlatoReader (line 23) | class PlatoReader(DialogReader): method __init__ (line 26) | def __init__(self, args): method _pad_batch_records (line 31) | def _pad_batch_records(self, batch_records, is_infer): FILE: modules/text/text_generation/plato2_en_large/utils/__init__.py function repeat_array (line 21) | def repeat_array(array, times): function gen_inputs (line 29) | def gen_inputs(inputs, latent_type_size): function pad_batch_data (line 53) | def pad_batch_data(insts, pad_id=0): FILE: modules/text/text_generation/plato2_en_large/utils/args.py function str2bool (line 20) | def str2bool(v): class Args (line 30) | class Args(dict): method __getattr__ (line 36) | def __getattr__(self, name): method get (line 45) | def get(self, key, default_value=None): method __setattr__ (line 55) | def __setattr__(self, name, value): method save (line 58) | def save(self, filename): method load (line 62) | def load(self, filename, group_name=None): function parse_args (line 77) | def parse_args(parser: argparse.ArgumentParser, allow_unknown=False) -> ... FILE: modules/text/text_generation/plato2_en_large/utils/masking.py function mask (line 19) | def mask(batch_tokens, FILE: modules/text/text_generation/plato2_en_large/utils/tokenization.py function clean_text (line 23) | def clean_text(text): function preprocess_text (line 42) | def preprocess_text(inputs, remove_space=True, lower=False): function encode_pieces (line 56) | def encode_pieces(spm_model, text, return_unicode=True, sample=False): function encode_ids (line 69) | def encode_ids(spm_model, text, sample=False): function convert_to_unicode (line 76) | def convert_to_unicode(text): function load_vocab (line 86) | def load_vocab(vocab_file): function convert_by_vocab (line 101) | def convert_by_vocab(vocab, items): class SentencePieceTokenizer (line 109) | class SentencePieceTokenizer(object): method add_cmdline_args (line 113) | def add_cmdline_args(cls, parser): method __init__ (line 121) | def __init__(self, args): method tokenize (line 128) | def tokenize(self, text): method convert_tokens_to_ids (line 133) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 144) | def convert_ids_to_tokens(self, ids): method merge_subword (line 148) | def merge_subword(self, tokens): method convert_ids_to_str (line 163) | def convert_ids_to_str(self, ids): function _is_whitespace (line 172) | def _is_whitespace(char): function _is_control (line 184) | def _is_control(char): FILE: modules/text/text_generation/reading_pictures_writing_poems/module.py class ReadingPicturesWritingPoems (line 18) | class ReadingPicturesWritingPoems: method __init__ (line 20) | def __init__(self): method is_chinese (line 28) | def is_chinese(self, string): method WritingPoem (line 45) | def WritingPoem(self, image, use_gpu=False): method run_cmd (line 78) | def run_cmd(self, argvs): method add_module_config_arg (line 106) | def add_module_config_arg(self): method add_module_input_arg (line 115) | def add_module_input_arg(self): method check_input_data (line 121) | def check_input_data(self, args): FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/MidAutumnDetection/module.py function base64_to_cv2 (line 15) | def base64_to_cv2(b64str): function cv2_to_base64 (line 22) | def cv2_to_base64(image): function read_images (line 28) | def read_images(paths): class MODULE (line 42) | class MODULE(hub.Module): method _initialize (line 43) | def _initialize(self, **kwargs): method predict (line 47) | def predict(self, images=None, paths=None, data=None, batch_size=1, us... method serving_method (line 66) | def serving_method(self, images, **kwargs): method run_cmd (line 95) | def run_cmd(self, argvs): method add_module_config_arg (line 113) | def add_module_config_arg(self): method add_module_input_arg (line 119) | def add_module_input_arg(self): FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/MidAutumnPoetry/model/decode.py function gen_bias (line 24) | def gen_bias(encoder_inputs, decoder_inputs, step): function greedy_search_infilling (line 40) | def greedy_search_infilling(model, function log_softmax (line 94) | def log_softmax(x): function mask_prob (line 99) | def mask_prob(p, onehot_eos, finished): function hyp_score (line 105) | def hyp_score(log_probs, length, length_penalty): function beam_search_step (line 110) | def beam_search_step(state, logits, eos_id, beam_width, is_first_step, l... function beam_search_infilling (line 157) | def beam_search_infilling(model, function post_process (line 251) | def post_process(token): FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/MidAutumnPoetry/model/file_utils.py function _fetch_from_remote (line 21) | def _fetch_from_remote(url, force_download=False): function add_docstring (line 60) | def add_docstring(doc): FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/MidAutumnPoetry/model/modeling_ernie.py function _build_linear (line 29) | def _build_linear(n_in, n_out, name, init, act=None): function _build_ln (line 38) | def _build_ln(n_in, name): function append_name (line 48) | def append_name(name, postfix): class AttentionLayer (line 57) | class AttentionLayer(D.Layer): method __init__ (line 58) | def __init__(self, cfg, name=None): method forward (line 78) | def forward(self, queries, keys, values, attn_bias, past_cache): class PositionwiseFeedForwardLayer (line 113) | class PositionwiseFeedForwardLayer(D.Layer): method __init__ (line 114) | def __init__(self, cfg, name=None): method forward (line 129) | def forward(self, inputs): class ErnieBlock (line 136) | class ErnieBlock(D.Layer): method __init__ (line 137) | def __init__(self, cfg, name=None): method forward (line 153) | def forward(self, inputs, attn_bias=None, past_cache=None): class ErnieEncoderStack (line 166) | class ErnieEncoderStack(D.Layer): method __init__ (line 167) | def __init__(self, cfg, name=None): method forward (line 172) | def forward(self, inputs, attn_bias=None, past_cache=None): class ErnieModel (line 192) | class ErnieModel(D.Layer): method __init__ (line 193) | def __init__(self, cfg, name=None): method eval (line 233) | def eval(self): method train (line 240) | def train(self): method forward (line 247) | def forward(self, FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/MidAutumnPoetry/model/modeling_ernie_gen.py class ErnieModelForGeneration (line 22) | class ErnieModelForGeneration(ErnieModel): method __init__ (line 23) | def __init__(self, cfg, name=None): method forward (line 42) | def forward(self, src_ids, *args, **kwargs): FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/MidAutumnPoetry/model/tokenizing_ernie.py function _wordpiece (line 31) | def _wordpiece(token, vocab, unk_token, prefix='##', sentencepiece_prefi... class ErnieTokenizer (line 66) | class ErnieTokenizer(object): method __init__ (line 67) | def __init__(self, method tokenize (line 102) | def tokenize(self, text): method convert_tokens_to_ids (line 127) | def convert_tokens_to_ids(self, tokens): method truncate (line 130) | def truncate(self, id1, id2, seqlen): method build_for_ernie (line 140) | def build_for_ernie(self, text_id, pair_id=[]): method encode (line 152) | def encode(self, text, pair=None, truncate_to=None): FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/MidAutumnPoetry/module.py class ErnieGen (line 43) | class ErnieGen(hub.NLPPredictionModule): method _initialize (line 44) | def _initialize(self): method generate (line 70) | def generate(self, texts, use_gpu=False, beam_width=5): method add_module_config_arg (line 125) | def add_module_config_arg(self): method run_cmd (line 135) | def run_cmd(self, argvs): FILE: modules/text/text_generation/reading_pictures_writing_poems_for_midautumn/module.py class ReadingPicturesWritingPoems (line 25) | class ReadingPicturesWritingPoems(hub.Module): method _initialize (line 26) | def _initialize(self): method WritingPoem (line 37) | def WritingPoem(self, images, use_gpu=False): method run_cmd (line 68) | def run_cmd(self, argvs): method add_module_config_arg (line 97) | def add_module_config_arg(self): method add_module_input_arg (line 104) | def add_module_input_arg(self): method check_input_data (line 110) | def check_input_data(self, args): FILE: modules/text/text_generation/unified_transformer-12L-cn-luge/module.py class UnifiedTransformer (line 37) | class UnifiedTransformer(nn.Layer): method __init__ (line 38) | def __init__(self): method _convert_text_to_input (line 45) | def _convert_text_to_input(self, texts: List[str], max_seq_len: int): method _batchify (line 52) | def _batchify(self, data: List[List[str]], max_seq_len: int, batch_siz... method interactive_mode (line 101) | def interactive_mode(self, max_turn=3): method forward (line 112) | def forward(self, method predict (line 147) | def predict(self, FILE: modules/text/text_generation/unified_transformer-12L-cn-luge/utils.py function post_process_response (line 18) | def post_process_response(token_ids: List[int], tokenizer): function get_in_turn_repetition (line 33) | def get_in_turn_repetition(pred: List[str], is_cn: bool = False): function select_response (line 52) | def select_response(ids, FILE: modules/text/text_generation/unified_transformer-12L-cn/module.py class UnifiedTransformer (line 37) | class UnifiedTransformer(nn.Layer): method __init__ (line 38) | def __init__(self): method _convert_text_to_input (line 45) | def _convert_text_to_input(self, texts: List[str], max_seq_len: int): method _batchify (line 52) | def _batchify(self, data: List[List[str]], max_seq_len: int, batch_siz... method interactive_mode (line 101) | def interactive_mode(self, max_turn=3): method forward (line 112) | def forward(self, method predict (line 147) | def predict(self, FILE: modules/text/text_generation/unified_transformer-12L-cn/utils.py function post_process_response (line 18) | def post_process_response(token_ids: List[int], tokenizer): function get_in_turn_repetition (line 33) | def get_in_turn_repetition(pred: List[str], is_cn: bool = False): function select_response (line 52) | def select_response(ids, FILE: modules/text/text_review/porn_detection_cnn/module.py class PornDetectionCNN (line 19) | class PornDetectionCNN(hub.NLPPredictionModule): method __init__ (line 21) | def __init__(self): method detection (line 39) | def detection(self, texts=[], data={}, use_gpu=False, batch_size=1): method get_labels (line 87) | def get_labels(self): FILE: modules/text/text_review/porn_detection_cnn/processor.py function load_vocab (line 6) | def load_vocab(file_path): function get_predict_label (line 17) | def get_predict_label(pos_prob): function preprocess (line 30) | def preprocess(predicted_data, tokenizer, vocab, sequence_max_len=256): function postprocess (line 50) | def postprocess(predict_out, texts): FILE: modules/text/text_review/porn_detection_gru/module.py class PornDetectionGRU (line 20) | class PornDetectionGRU(hub.NLPPredictionModule): method __init__ (line 22) | def __init__(self): method detection (line 40) | def detection(self, texts=[], data={}, use_gpu=False, batch_size=1): method get_labels (line 88) | def get_labels(self): FILE: modules/text/text_review/porn_detection_gru/processor.py function load_vocab (line 6) | def load_vocab(file_path): function get_predict_label (line 17) | def get_predict_label(pos_prob): function preprocess (line 30) | def preprocess(predicted_data, tokenizer, vocab, sequence_max_len=256): function postprocess (line 50) | def postprocess(predict_out, texts): FILE: modules/text/text_review/porn_detection_lstm/module.py class PornDetectionLSTM (line 19) | class PornDetectionLSTM(hub.NLPPredictionModule): method __init__ (line 21) | def __init__(self): method detection (line 39) | def detection(self, texts=[], data={}, use_gpu=False, batch_size=1): method get_labels (line 87) | def get_labels(self): FILE: modules/text/text_review/porn_detection_lstm/processor.py function load_vocab (line 6) | def load_vocab(file_path): function get_predict_label (line 17) | def get_predict_label(pos_prob): function preprocess (line 30) | def preprocess(predicted_data, tokenizer, vocab, sequence_max_len=256): function postprocess (line 50) | def postprocess(predict_out, texts): FILE: modules/text/text_to_knowledge/nptag/module.py class NPTag (line 19) | class NPTag(paddle.nn.Layer): method __init__ (line 20) | def __init__(self, method predict (line 28) | def predict(self, texts): method run_cmd (line 52) | def run_cmd(self, argvs): FILE: modules/text/text_to_knowledge/wordtag/module.py class WordTag (line 19) | class WordTag(paddle.nn.Layer): method __init__ (line 20) | def __init__(self, method predict (line 28) | def predict(self, texts): method run_cmd (line 52) | def run_cmd(self, argvs): FILE: modules/video/Video_editing/SkyAR/module.py class SkyAR (line 8) | class SkyAR(nn.Layer): method __init__ (line 9) | def __init__(self, model_path=None): method MagicSky (line 20) | def MagicSky(self, FILE: modules/video/Video_editing/SkyAR/rain.py class Rain (line 7) | class Rain(): method __init__ (line 8) | def __init__(self, rain_cap_path, rain_intensity=1.0, haze_intensity=4... method _get_rain_layer (line 17) | def _get_rain_layer(self): method _create_haze_layer (line 31) | def _create_haze_layer(self, rain_layer): method forward (line 34) | def forward(self, img): FILE: modules/video/Video_editing/SkyAR/skybox.py class SkyBox (line 8) | class SkyBox(): method __init__ (line 9) | def __init__(self, out_size, skybox_img, skybox_video, halo_effect, au... method tile_skybox_img (line 36) | def tile_skybox_img(self, imgtile): method load_skybox (line 44) | def load_skybox(self): method skymask_refinement (line 70) | def skymask_refinement(self, G_pred, img): method get_skybg_from_box (line 78) | def get_skybg_from_box(self, m): method skybox_tracking (line 92) | def skybox_tracking(self, frame, frame_prev, skymask): method relighting (line 135) | def relighting(self, img, skybg, skymask): method halo (line 156) | def halo(self, syneth, skybg, skymask): method skyblend (line 164) | def skyblend(self, img, img_prev, skymask): FILE: modules/video/Video_editing/SkyAR/skyfilter.py class SkyFilter (line 10) | class SkyFilter(): method __init__ (line 11) | def __init__(self, model_path, video_path, save_path, in_size, halo_ef... method synthesize (line 43) | def synthesize(self, img_HD, img_HD_prev): method run (line 64) | def run(self, preview_frames_num=0): FILE: modules/video/Video_editing/SkyAR/utils.py function build_transformation_matrix (line 11) | def build_transformation_matrix(transform): function update_transformation_matrix (line 29) | def update_transformation_matrix(M, m): function estimate_partial_transform (line 41) | def estimate_partial_transform(matched_keypoints): function removeOutliers (line 63) | def removeOutliers(prev_pts, curr_pts): function boxfilter (line 77) | def boxfilter(img, r): function guidedfilter (line 94) | def guidedfilter(img, p, r, eps): FILE: modules/video/classification/videotag_tsn_lstm/module.py class VideoTag (line 45) | class VideoTag(hub.Module): method _initialize (line 46) | def _initialize(self): method _extractor (line 57) | def _extractor(self, args, exe, place): method _predictor (line 81) | def _predictor(self, args, exe, place): method run_cmd (line 107) | def run_cmd(self, argsv): method classify (line 112) | def classify(self, paths, use_gpu=False, threshold=0.5, top_k=10): FILE: modules/video/classification/videotag_tsn_lstm/resource/metrics/metrics_util.py class Metrics (line 30) | class Metrics(object): method __init__ (line 31) | def __init__(self, name, mode, metrics_args): method calculate_and_log_out (line 35) | def calculate_and_log_out(self, fetch_list, info=''): method accumulate (line 39) | def accumulate(self, fetch_list, info=''): method finalize_and_log_out (line 43) | def finalize_and_log_out(self, info='', savedir='./'): method reset (line 47) | def reset(self): class Youtube8mMetrics (line 52) | class Youtube8mMetrics(Metrics): method __init__ (line 53) | def __init__(self, name, mode, metrics_args): method calculate_and_log_out (line 64) | def calculate_and_log_out(self, fetch_list, info=''): method accumulate (line 74) | def accumulate(self, fetch_list, info=''): method finalize_and_log_out (line 89) | def finalize_and_log_out(self, info='', label_file='./label_3396.txt'): method reset (line 116) | def reset(self): class MetricsZoo (line 122) | class MetricsZoo(object): method __init__ (line 123) | def __init__(self): method regist (line 126) | def regist(self, name, metrics): method get (line 130) | def get(self, name, mode, cfg): function regist_metrics (line 141) | def regist_metrics(name, metrics): function get_metrics (line 145) | def get_metrics(name, mode, cfg): FILE: modules/video/classification/videotag_tsn_lstm/resource/metrics/youtube8m/average_precision_calculator.py class AveragePrecisionCalculator (line 60) | class AveragePrecisionCalculator(object): method __init__ (line 63) | def __init__(self, top_n=None): method heap_size (line 83) | def heap_size(self): method num_accumulated_positives (line 88) | def num_accumulated_positives(self): method accumulate (line 92) | def accumulate(self, predictions, actuals, num_positives=None): method clear (line 133) | def clear(self): method peek_ap_at_n (line 138) | def peek_ap_at_n(self): method ap (line 154) | def ap(predictions, actuals): method ap_at_n (line 174) | def ap_at_n(predictions, actuals, n=20, total_num_positives=None): method _shuffle (line 237) | def _shuffle(predictions, actuals): method _zero_one_normalize (line 245) | def _zero_one_normalize(predictions, epsilon=1e-7): FILE: modules/video/classification/videotag_tsn_lstm/resource/metrics/youtube8m/eval_util.py function flatten (line 22) | def flatten(l): function calculate_hit_at_one (line 27) | def calculate_hit_at_one(predictions, actuals): function calculate_precision_at_equal_recall_rate (line 44) | def calculate_precision_at_equal_recall_rate(predictions, actuals): function calculate_gap (line 71) | def calculate_gap(predictions, actuals, top_k=20): function top_k_by_class (line 92) | def top_k_by_class(predictions, labels, k=20): function top_k_triplets (line 129) | def top_k_triplets(predictions, labels, k=20): class EvaluationMetrics (line 138) | class EvaluationMetrics(object): method __init__ (line 141) | def __init__(self, num_class, top_k): method accumulate (line 161) | def accumulate(self, loss, predictions, labels): method get (line 195) | def get(self): method clear (line 218) | def clear(self): FILE: modules/video/classification/videotag_tsn_lstm/resource/metrics/youtube8m/mean_average_precision_calculator.py class MeanAveragePrecisionCalculator (line 43) | class MeanAveragePrecisionCalculator(object): method __init__ (line 47) | def __init__(self, num_class): method accumulate (line 69) | def accumulate(self, predictions, actuals, num_positives=None): method clear (line 93) | def clear(self): method is_empty (line 97) | def is_empty(self): method peek_map_at_n (line 100) | def peek_map_at_n(self): FILE: modules/video/classification/videotag_tsn_lstm/resource/models/attention_lstm/attention_lstm.py class AttentionLSTM (line 27) | class AttentionLSTM(ModelBase): method __init__ (line 28) | def __init__(self, name, cfg, mode='train'): method get_config (line 32) | def get_config(self): method build_input (line 46) | def build_input(self, use_dataloader): method build_model (line 58) | def build_model(self): method optimizer (line 91) | def optimizer(self): method loss (line 101) | def loss(self): method outputs (line 109) | def outputs(self): method feeds (line 112) | def feeds(self): method fetches (line 115) | def fetches(self): method weights_info (line 119) | def weights_info(self): method load_pretrain_params (line 123) | def load_pretrain_params(self, exe, pretrain, prog, place): FILE: modules/video/classification/videotag_tsn_lstm/resource/models/attention_lstm/lstm_attention.py class LSTMAttentionModel (line 18) | class LSTMAttentionModel(object): method __init__ (line 21) | def __init__(self, bias_attr, embedding_size=512, lstm_size=1024, drop... method forward (line 26) | def forward(self, input, is_training): FILE: modules/video/classification/videotag_tsn_lstm/resource/models/model.py function is_parameter (line 29) | def is_parameter(var): class NotImplementError (line 33) | class NotImplementError(Exception): method __init__ (line 36) | def __init__(self, model, function): method __str__ (line 41) | def __str__(self): class ModelNotFoundError (line 45) | class ModelNotFoundError(Exception): method __init__ (line 48) | def __init__(self, model_name, avail_models): method __str__ (line 53) | def __str__(self): class ModelBase (line 60) | class ModelBase(object): method __init__ (line 61) | def __init__(self, name, cfg, mode='train'): method build_model (line 70) | def build_model(self): method build_input (line 74) | def build_input(self, use_dataloader): method optimizer (line 78) | def optimizer(self): method outputs (line 82) | def outputs(self): method loss (line 86) | def loss(self): method feeds (line 90) | def feeds(self): method fetches (line 94) | def fetches(self): method weights_info (line 98) | def weights_info(self): method dataloader (line 102) | def dataloader(self): method epoch_num (line 105) | def epoch_num(self): method pretrain_info (line 109) | def pretrain_info(self): method load_pretrain_params (line 113) | def load_pretrain_params(self, exe, pretrain, prog, place): method load_test_weights (line 118) | def load_test_weights(self, exe, weights, prog): method get_config_from_sec (line 122) | def get_config_from_sec(self, sec, item, default=None): class ModelZoo (line 128) | class ModelZoo(object): method __init__ (line 129) | def __init__(self): method regist (line 132) | def regist(self, name, model): method get (line 136) | def get(self, name, cfg, mode='train'): function regist_model (line 147) | def regist_model(name, model): function get_model (line 151) | def get_model(name, cfg, mode='train'): FILE: modules/video/classification/videotag_tsn_lstm/resource/models/tsn/tsn.py class TSN (line 29) | class TSN(ModelBase): method __init__ (line 30) | def __init__(self, name, cfg, mode='train'): method get_config (line 34) | def get_config(self): method build_input (line 53) | def build_input(self, use_dataloader=True): method create_model_args (line 73) | def create_model_args(self): method build_model (line 80) | def build_model(self): method optimizer (line 87) | def optimizer(self): method loss (line 105) | def loss(self): method outputs (line 112) | def outputs(self): method feeds (line 115) | def feeds(self): method fetches (line 120) | def fetches(self): method pretrain_info (line 134) | def pretrain_info(self): method weights_info (line 138) | def weights_info(self): method load_pretrain_params (line 141) | def load_pretrain_params(self, exe, pretrain, prog, place): FILE: modules/video/classification/videotag_tsn_lstm/resource/models/tsn/tsn_res_model.py class TSN_ResNet (line 22) | class TSN_ResNet(): method __init__ (line 23) | def __init__(self, layers=50, seg_num=7, is_training=True): method conv_bn_layer (line 28) | def conv_bn_layer(self, input, num_filters, filter_size, stride=1, gro... method shortcut (line 53) | def shortcut(self, input, ch_out, stride, name): method bottleneck_block (line 60) | def bottleneck_block(self, input, num_filters, stride, name): method net (line 72) | def net(self, input, class_dim=101): FILE: modules/video/classification/videotag_tsn_lstm/resource/reader/kinetics_reader.py class KineticsReader (line 37) | class KineticsReader(DataReader): method __init__ (line 56) | def __init__(self, name, mode, cfg): method create_reader (line 75) | def create_reader(self): method _reader_creator (line 95) | def _reader_creator(self, function imgs_transform (line 144) | def imgs_transform(imgs, mode, seg_num, seglen, short_size, target_size,... function group_center_crop (line 156) | def group_center_crop(np_imgs, target_size): function group_scale (line 169) | def group_scale(imgs, target_size): function mp4_loader (line 190) | def mp4_loader(filepath, nsample, seglen, mode): FILE: modules/video/classification/videotag_tsn_lstm/resource/reader/reader_utils.py class ReaderNotFoundError (line 16) | class ReaderNotFoundError(Exception): method __init__ (line 19) | def __init__(self, reader_name, avail_readers): method __str__ (line 24) | def __str__(self): class DataReader (line 31) | class DataReader(object): method __init__ (line 34) | def __init__(self, model_name, mode, cfg): method create_reader (line 39) | def create_reader(self): method get_config_from_sec (line 43) | def get_config_from_sec(self, sec, item, default=None): class ReaderZoo (line 49) | class ReaderZoo(object): method __init__ (line 50) | def __init__(self): method regist (line 53) | def regist(self, name, reader): method get (line 57) | def get(self, name, mode, cfg): function regist_reader (line 68) | def regist_reader(name, reader): function get_reader (line 72) | def get_reader(name, mode, cfg): FILE: modules/video/classification/videotag_tsn_lstm/resource/utils/config_utils.py function parse_config (line 29) | def parse_config(cfg_file): function create_attr_dict (line 38) | def create_attr_dict(yaml_config): function merge_configs (line 55) | def merge_configs(cfg, sec, args_dict): function print_configs (line 69) | def print_configs(cfg, mode): FILE: modules/video/classification/videotag_tsn_lstm/resource/utils/train_utils.py function log_lr_and_step (line 27) | def log_lr_and_step(): function test_with_dataloader (line 49) | def test_with_dataloader(exe, function train_with_dataloader (line 71) | def train_with_dataloader(exe, train_prog, compiled_train_prog, train_da... function save_model (line 126) | def save_model(exe, program, save_dir, model_name, postfix=None, save_ty... FILE: modules/video/classification/videotag_tsn_lstm/resource/utils/utility.py function _term (line 27) | def _term(sig_num, addition): class AttrDict (line 36) | class AttrDict(dict): method __getattr__ (line 37) | def __getattr__(self, key): method __setattr__ (line 40) | def __setattr__(self, key, value): function check_cuda (line 46) | def check_cuda(use_cuda, err = \ function check_version (line 58) | def check_version(): FILE: modules/video/multiple_object_tracking/fairmot_dla34/dataset.py function default_collate_fn (line 38) | def default_collate_fn(batch): class MOTVideoStream (line 88) | class MOTVideoStream: method __init__ (line 98) | def __init__(self, video_stream=None, keep_ori_im=False, **kwargs): method set_kwargs (line 118) | def set_kwargs(self, **kwargs): method set_transform (line 123) | def set_transform(self, transform): method set_epoch (line 126) | def set_epoch(self, epoch_id): method parse_dataset (line 129) | def parse_dataset(self): method __iter__ (line 132) | def __iter__(self): class MOTImageStream (line 156) | class MOTImageStream: method __init__ (line 165) | def __init__(self, sample_num=-1, keep_ori_im=False, **kwargs): method add_image (line 175) | def add_image(self, image): method set_kwargs (line 178) | def set_kwargs(self, **kwargs): method set_transform (line 183) | def set_transform(self, transform): method set_epoch (line 186) | def set_epoch(self, epoch_id): method parse_dataset (line 189) | def parse_dataset(self): method __iter__ (line 192) | def __iter__(self): class MOTVideoStreamReader (line 215) | class MOTVideoStreamReader: method __init__ (line 218) | def __init__(self, sample_transforms=[], batch_size=1, drop_last=False... method __call__ (line 225) | def __call__( method __len__ (line 239) | def __len__(self): method __iter__ (line 242) | def __iter__(self): method to_tensor (line 245) | def to_tensor(self, batch): method __next__ (line 253) | def __next__(self): method next (line 264) | def next(self): FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/matching/deepsort_matching.py function iou_1toN (line 36) | def iou_1toN(bbox, candidates): function iou_cost (line 68) | def iou_cost(tracks, detections, track_indices=None, detection_indices=N... function _nn_euclidean_distance (line 102) | def _nn_euclidean_distance(s, q): function _nn_cosine_distance (line 124) | def _nn_cosine_distance(s, q): class NearestNeighborDistanceMetric (line 143) | class NearestNeighborDistanceMetric(object): method __init__ (line 160) | def __init__(self, metric, matching_threshold, budget=None): method partial_fit (line 171) | def partial_fit(self, features, targets, active_targets): method distance (line 187) | def distance(self, features, targets): function min_cost_matching (line 206) | def min_cost_matching(distance_metric, max_distance, tracks, detections,... function matching_cascade (line 267) | def matching_cascade(distance_metric, function gate_cost_matrix (line 329) | def gate_cost_matrix(kf, FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/matching/jde_matching.py function merge_matches (line 44) | def merge_matches(m1, m2, shape): function linear_assignment (line 61) | def linear_assignment(cost_matrix, thresh): function bbox_ious (line 81) | def bbox_ious(atlbrs, btlbrs): function iou_distance (line 102) | def iou_distance(atracks, btracks): function embedding_distance (line 119) | def embedding_distance(tracks, detections, metric='euclidean'): function fuse_motion (line 132) | def fuse_motion(kf, cost_matrix, tracks, detections, only_position=False... FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/motion/kalman_filter.py class KalmanFilter (line 31) | class KalmanFilter(object): method __init__ (line 48) | def __init__(self): method initiate (line 63) | def initiate(self, measurement): method predict (line 88) | def predict(self, mean, covariance): method project (line 118) | def project(self, mean, covariance): method multi_predict (line 139) | def multi_predict(self, mean, covariance): method update (line 174) | def update(self, mean, covariance, measurement): method gating_distance (line 200) | def gating_distance(self, mean, covariance, measurements, only_positio... FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/tracker/base_jde_tracker.py class TrackState (line 33) | class TrackState(object): class BaseTrack (line 40) | class BaseTrack(object): method end_frame (line 59) | def end_frame(self): method next_id (line 63) | def next_id(): method activate (line 67) | def activate(self, *args): method predict (line 70) | def predict(self): method update (line 73) | def update(self, *args, **kwargs): method mark_lost (line 76) | def mark_lost(self): method mark_removed (line 79) | def mark_removed(self): class STrack (line 83) | class STrack(BaseTrack): method __init__ (line 84) | def __init__(self, tlwh, score, temp_feat, buffer_size=30): method update_features (line 99) | def update_features(self, feat): method predict (line 109) | def predict(self): method multi_predict (line 116) | def multi_predict(stracks, kalman_filter): method activate (line 128) | def activate(self, kalman_filter, frame_id): method re_activate (line 141) | def re_activate(self, new_track, frame_id, new_id=False): method update (line 153) | def update(self, new_track, frame_id, update_feature=True): method tlwh (line 167) | def tlwh(self): method tlbr (line 180) | def tlbr(self): method tlwh_to_xyah (line 190) | def tlwh_to_xyah(tlwh): method to_xyah (line 200) | def to_xyah(self): method tlbr_to_tlwh (line 204) | def tlbr_to_tlwh(tlbr): method tlwh_to_tlbr (line 210) | def tlwh_to_tlbr(tlwh): method __repr__ (line 215) | def __repr__(self): function joint_stracks (line 219) | def joint_stracks(tlista, tlistb): function sub_stracks (line 233) | def sub_stracks(tlista, tlistb): function remove_duplicate_stracks (line 244) | def remove_duplicate_stracks(stracksa, stracksb): FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/tracker/base_sde_tracker.py class TrackState (line 23) | class TrackState(object): class Track (line 36) | class Track(object): method __init__ (line 64) | def __init__(self, mean, covariance, track_id, n_init, max_age, featur... method to_tlwh (line 80) | def to_tlwh(self): method to_tlbr (line 87) | def to_tlbr(self): method predict (line 93) | def predict(self, kalman_filter): method update (line 102) | def update(self, kalman_filter, detection): method mark_missed (line 115) | def mark_missed(self): method is_tentative (line 123) | def is_tentative(self): method is_confirmed (line 127) | def is_confirmed(self): method is_deleted (line 131) | def is_deleted(self): FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/tracker/jde_tracker.py class FrozenJDETracker (line 33) | class FrozenJDETracker(object): method __init__ (line 57) | def __init__(self, method update (line 88) | def update(self, pred_dets, pred_embs): FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/utils.py class Timer (line 32) | class Timer(object): method __init__ (line 37) | def __init__(self): method tic (line 45) | def tic(self): method toc (line 50) | def toc(self, average=True): method clear (line 61) | def clear(self): class Detection (line 70) | class Detection(object): method __init__ (line 82) | def __init__(self, tlwh, confidence, feature): method to_tlbr (line 87) | def to_tlbr(self): method to_xyah (line 96) | def to_xyah(self): function load_det_results (line 107) | def load_det_results(det_file, num_frames): function scale_coords (line 122) | def scale_coords(coords, input_shape, im_shape, scale_factor): function clip_box (line 135) | def clip_box(xyxy, input_shape, im_shape, scale_factor): function get_crops (line 145) | def get_crops(xyxy, ori_img, pred_scores, w, h): function preprocess_reid (line 164) | def preprocess_reid(imgs, w=64, h=192, mean=[0.485, 0.456, 0.406], std=[... FILE: modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/visualization.py function tlwhs_to_tlbrs (line 19) | def tlwhs_to_tlbrs(tlwhs): function get_color (line 28) | def get_color(idx): function resize_image (line 34) | def resize_image(image, max_size=800): function plot_tracking (line 41) | def plot_tracking(image, tlwhs, obj_ids, scores=None, frame_id=0, fps=0.... function plot_trajectory (line 87) | def plot_trajectory(image, tlwhs, track_ids): function plot_detections (line 97) | def plot_detections(image, tlbrs, scores=None, color=(255, 0, 0), ids=No... FILE: modules/video/multiple_object_tracking/fairmot_dla34/module.py class FairmotTracker_1088x608 (line 44) | class FairmotTracker_1088x608: method __init__ (line 46) | def __init__(self): method tracking (line 49) | def tracking(self, video_stream, output_dir='mot_result', visualizatio... method stream_mode (line 85) | def stream_mode(self, output_dir='mot_result', visualization=True, dra... method __enter__ (line 113) | def __enter__(self): method __exit__ (line 121) | def __exit__(self, exc_type, exc_value, traceback): method predict (line 149) | def predict(self, images: list = []): method run_cmd (line 174) | def run_cmd(self, argvs: list): method signalhandler (line 197) | def signalhandler(self, signum, frame): method add_module_config_arg (line 227) | def add_module_config_arg(self): method add_module_input_arg (line 245) | def add_module_input_arg(self): FILE: modules/video/multiple_object_tracking/fairmot_dla34/tracker.py class StreamTracker (line 36) | class StreamTracker(object): method __init__ (line 37) | def __init__(self, cfg, mode='eval'): method load_weights_jde (line 51) | def load_weights_jde(self, weights): method _eval_seq_jde (line 54) | def _eval_seq_jde(self, dataloader, save_dir=None, show_image=False, f... method _eval_seq_jde_single_image (line 97) | def _eval_seq_jde_single_image(self, iterator, save_dir=None, show_ima... method imagestream_predict (line 136) | def imagestream_predict(self, output_dir, data_type='mot', model_type=... method videostream_predict (line 169) | def videostream_predict(self, method write_mot_results (line 228) | def write_mot_results(self, filename, results, data_type='mot'): method save_results (line 250) | def save_results(self, data, frame_id, online_ids, online_tlwhs, onlin... FILE: modules/video/multiple_object_tracking/fairmot_dla34/utils.py class Timer (line 4) | class Timer(object): method __init__ (line 9) | def __init__(self): method tic (line 17) | def tic(self): method toc (line 22) | def toc(self, average=True): method clear (line 33) | def clear(self): FILE: modules/video/multiple_object_tracking/jde_darknet53/dataset.py function default_collate_fn (line 39) | def default_collate_fn(batch): class MOTVideoStream (line 89) | class MOTVideoStream: method __init__ (line 99) | def __init__(self, video_stream=None, keep_ori_im=False, **kwargs): method set_kwargs (line 119) | def set_kwargs(self, **kwargs): method set_transform (line 124) | def set_transform(self, transform): method set_epoch (line 127) | def set_epoch(self, epoch_id): method parse_dataset (line 130) | def parse_dataset(self): method __iter__ (line 133) | def __iter__(self): class MOTImageStream (line 157) | class MOTImageStream: method __init__ (line 166) | def __init__(self, sample_num=-1, keep_ori_im=False, **kwargs): method add_image (line 176) | def add_image(self, image): method set_kwargs (line 179) | def set_kwargs(self, **kwargs): method set_transform (line 184) | def set_transform(self, transform): method set_epoch (line 187) | def set_epoch(self, epoch_id): method parse_dataset (line 190) | def parse_dataset(self): method __iter__ (line 193) | def __iter__(self): class MOTVideoStreamReader (line 216) | class MOTVideoStreamReader: method __init__ (line 219) | def __init__(self, sample_transforms=[], batch_size=1, drop_last=False... method __call__ (line 226) | def __call__( method __len__ (line 240) | def __len__(self): method __iter__ (line 243) | def __iter__(self): method to_tensor (line 246) | def to_tensor(self, batch): method __next__ (line 254) | def __next__(self): method next (line 265) | def next(self): FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/matching/deepsort_matching.py function iou_1toN (line 36) | def iou_1toN(bbox, candidates): function iou_cost (line 68) | def iou_cost(tracks, detections, track_indices=None, detection_indices=N... function _nn_euclidean_distance (line 102) | def _nn_euclidean_distance(s, q): function _nn_cosine_distance (line 124) | def _nn_cosine_distance(s, q): class NearestNeighborDistanceMetric (line 143) | class NearestNeighborDistanceMetric(object): method __init__ (line 160) | def __init__(self, metric, matching_threshold, budget=None): method partial_fit (line 171) | def partial_fit(self, features, targets, active_targets): method distance (line 187) | def distance(self, features, targets): function min_cost_matching (line 206) | def min_cost_matching(distance_metric, max_distance, tracks, detections,... function matching_cascade (line 267) | def matching_cascade(distance_metric, function gate_cost_matrix (line 329) | def gate_cost_matrix(kf, FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/matching/jde_matching.py function merge_matches (line 44) | def merge_matches(m1, m2, shape): function linear_assignment (line 61) | def linear_assignment(cost_matrix, thresh): function bbox_ious (line 81) | def bbox_ious(atlbrs, btlbrs): function iou_distance (line 102) | def iou_distance(atracks, btracks): function embedding_distance (line 119) | def embedding_distance(tracks, detections, metric='euclidean'): function fuse_motion (line 132) | def fuse_motion(kf, cost_matrix, tracks, detections, only_position=False... FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/motion/kalman_filter.py class KalmanFilter (line 31) | class KalmanFilter(object): method __init__ (line 48) | def __init__(self): method initiate (line 63) | def initiate(self, measurement): method predict (line 88) | def predict(self, mean, covariance): method project (line 118) | def project(self, mean, covariance): method multi_predict (line 139) | def multi_predict(self, mean, covariance): method update (line 174) | def update(self, mean, covariance, measurement): method gating_distance (line 200) | def gating_distance(self, mean, covariance, measurements, only_positio... FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/tracker/base_jde_tracker.py class TrackState (line 33) | class TrackState(object): class BaseTrack (line 40) | class BaseTrack(object): method end_frame (line 59) | def end_frame(self): method next_id (line 63) | def next_id(): method activate (line 67) | def activate(self, *args): method predict (line 70) | def predict(self): method update (line 73) | def update(self, *args, **kwargs): method mark_lost (line 76) | def mark_lost(self): method mark_removed (line 79) | def mark_removed(self): class STrack (line 83) | class STrack(BaseTrack): method __init__ (line 84) | def __init__(self, tlwh, score, temp_feat, buffer_size=30): method update_features (line 99) | def update_features(self, feat): method predict (line 109) | def predict(self): method multi_predict (line 116) | def multi_predict(stracks, kalman_filter): method activate (line 128) | def activate(self, kalman_filter, frame_id): method re_activate (line 141) | def re_activate(self, new_track, frame_id, new_id=False): method update (line 153) | def update(self, new_track, frame_id, update_feature=True): method tlwh (line 167) | def tlwh(self): method tlbr (line 180) | def tlbr(self): method tlwh_to_xyah (line 190) | def tlwh_to_xyah(tlwh): method to_xyah (line 200) | def to_xyah(self): method tlbr_to_tlwh (line 204) | def tlbr_to_tlwh(tlbr): method tlwh_to_tlbr (line 210) | def tlwh_to_tlbr(tlwh): method __repr__ (line 215) | def __repr__(self): function joint_stracks (line 219) | def joint_stracks(tlista, tlistb): function sub_stracks (line 233) | def sub_stracks(tlista, tlistb): function remove_duplicate_stracks (line 244) | def remove_duplicate_stracks(stracksa, stracksb): FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/tracker/base_sde_tracker.py class TrackState (line 23) | class TrackState(object): class Track (line 36) | class Track(object): method __init__ (line 64) | def __init__(self, mean, covariance, track_id, n_init, max_age, featur... method to_tlwh (line 80) | def to_tlwh(self): method to_tlbr (line 87) | def to_tlbr(self): method predict (line 93) | def predict(self, kalman_filter): method update (line 102) | def update(self, kalman_filter, detection): method mark_missed (line 115) | def mark_missed(self): method is_tentative (line 123) | def is_tentative(self): method is_confirmed (line 127) | def is_confirmed(self): method is_deleted (line 131) | def is_deleted(self): FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/tracker/jde_tracker.py class FrozenJDETracker (line 33) | class FrozenJDETracker(object): method __init__ (line 57) | def __init__(self, method update (line 88) | def update(self, pred_dets, pred_embs): FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/utils.py class Timer (line 32) | class Timer(object): method __init__ (line 37) | def __init__(self): method tic (line 45) | def tic(self): method toc (line 50) | def toc(self, average=True): method clear (line 61) | def clear(self): class Detection (line 70) | class Detection(object): method __init__ (line 82) | def __init__(self, tlwh, confidence, feature): method to_tlbr (line 87) | def to_tlbr(self): method to_xyah (line 96) | def to_xyah(self): function load_det_results (line 107) | def load_det_results(det_file, num_frames): function scale_coords (line 122) | def scale_coords(coords, input_shape, im_shape, scale_factor): function clip_box (line 135) | def clip_box(xyxy, input_shape, im_shape, scale_factor): function get_crops (line 145) | def get_crops(xyxy, ori_img, pred_scores, w, h): function preprocess_reid (line 164) | def preprocess_reid(imgs, w=64, h=192, mean=[0.485, 0.456, 0.406], std=[... FILE: modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/visualization.py function tlwhs_to_tlbrs (line 19) | def tlwhs_to_tlbrs(tlwhs): function get_color (line 28) | def get_color(idx): function resize_image (line 34) | def resize_image(image, max_size=800): function plot_tracking (line 41) | def plot_tracking(image, tlwhs, obj_ids, scores=None, frame_id=0, fps=0.... function plot_trajectory (line 87) | def plot_trajectory(image, tlwhs, track_ids): function plot_detections (line 97) | def plot_detections(image, tlbrs, scores=None, color=(255, 0, 0), ids=No... FILE: modules/video/multiple_object_tracking/jde_darknet53/module.py class JDETracker_1088x608 (line 45) | class JDETracker_1088x608: method __init__ (line 47) | def __init__(self): method tracking (line 50) | def tracking(self, video_stream, output_dir='mot_result', visualizatio... method stream_mode (line 86) | def stream_mode(self, output_dir='mot_result', visualization=True, dra... method __enter__ (line 114) | def __enter__(self): method __exit__ (line 122) | def __exit__(self, exc_type, exc_value, traceback): method predict (line 150) | def predict(self, images: list = []): method run_cmd (line 175) | def run_cmd(self, argvs: list): method signalhandler (line 198) | def signalhandler(self, signum, frame): method add_module_config_arg (line 228) | def add_module_config_arg(self): method add_module_input_arg (line 246) | def add_module_input_arg(self): FILE: modules/video/multiple_object_tracking/jde_darknet53/tracker.py class StreamTracker (line 36) | class StreamTracker(object): method __init__ (line 37) | def __init__(self, cfg, mode='eval'): method load_weights_jde (line 50) | def load_weights_jde(self, weights): method _eval_seq_jde (line 53) | def _eval_seq_jde(self, dataloader, save_dir=None, show_image=False, f... method _eval_seq_jde_single_image (line 96) | def _eval_seq_jde_single_image(self, iterator, save_dir=None, show_ima... method imagestream_predict (line 136) | def imagestream_predict(self, output_dir, data_type='mot', model_type=... method videostream_predict (line 169) | def videostream_predict(self, method write_mot_results (line 228) | def write_mot_results(self, filename, results, data_type='mot'): method save_results (line 250) | def save_results(self, data, frame_id, online_ids, online_tlwhs, onlin... FILE: modules/video/multiple_object_tracking/jde_darknet53/utils.py class Timer (line 4) | class Timer(object): method __init__ (line 9) | def __init__(self): method tic (line 17) | def tic(self): method toc (line 22) | def toc(self, average=True): method clear (line 33) | def clear(self): FILE: paddlehub/__init__.py function load (line 74) | def load(*args, **kwargs): function list (line 86) | def list(*args, **kwargs): function help (line 98) | def help(*args, **kwargs): FILE: paddlehub/commands/clear.py function file_size_in_human_format (line 24) | def file_size_in_human_format(size: int) -> str: class ClearCommand (line 37) | class ClearCommand: method execute (line 38) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/config.py class ConfigCommand (line 25) | class ConfigCommand: method show_config (line 27) | def show_config(): method show_help (line 32) | def show_help(): method execute (line 46) | def execute(self, argv): FILE: paddlehub/commands/convert.py class ConvertCommand (line 34) | class ConvertCommand: method __init__ (line 35) | def __init__(self): method create_module_tar (line 44) | def create_module_tar(self): method create_module_py (line 60) | def create_module_py(self): method create_init_py (line 78) | def create_init_py(self): method create_serving_demo_py (line 84) | def create_serving_demo_py(self): method show_help (line 95) | def show_help(): method execute (line 109) | def execute(self, argv): FILE: paddlehub/commands/download.py class DownloadCommand (line 26) | class DownloadCommand: method execute (line 27) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/help.py class HelpCommand (line 23) | class HelpCommand: method execute (line 24) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/hub.py class HubCommand (line 23) | class HubCommand: method execute (line 24) | def execute(self, argv): FILE: paddlehub/commands/install.py class InstallCommand (line 27) | class InstallCommand: method __init__ (line 28) | def __init__(self): method execute (line 35) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/list.py class ListCommand (line 25) | class ListCommand: method execute (line 26) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/run.py class RunCommand (line 29) | class RunCommand: method execute (line 30) | def execute(self, argv: List) -> bool: method run_module_v1 (line 61) | def run_module_v1(self, module, argv: List) -> Any: FILE: paddlehub/commands/search.py class SearchCommand (line 28) | class SearchCommand: method execute (line 29) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/serving.py function number_of_workers (line 34) | def number_of_workers(): function pid_is_exist (line 41) | def pid_is_exist(pid: int): class ServingCommand (line 65) | class ServingCommand: method dump_pid_file (line 69) | def dump_pid_file(self): method load_pid_file (line 82) | def load_pid_file(filepath: str, port: int = None): method stop_serving (line 97) | def stop_serving(self, port: int): method start_bert_serving (line 125) | def start_bert_serving(args): method preinstall_modules (line 143) | def preinstall_modules(self): method start_app_with_args (line 168) | def start_app_with_args(self): method start_zmq_serving_with_args (line 185) | def start_zmq_serving_with_args(self): method start_single_app_with_args (line 211) | def start_single_app_with_args(self): method start_serving (line 227) | def start_serving(self): method show_help (line 248) | def show_help(): method parse_args (line 287) | def parse_args(self): method execute (line 324) | def execute(self, argv): FILE: paddlehub/commands/show.py class ShowCommand (line 26) | class ShowCommand: method execute (line 27) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/uninstall.py class UninstallCommand (line 24) | class UninstallCommand: method execute (line 25) | def execute(self, argv: List) -> bool: FILE: paddlehub/commands/utils.py function _CommandDict (line 19) | def _CommandDict(): function register (line 26) | def register(name: str, description: str = '') -> Any: function get_command (line 49) | def get_command(name: str) -> Any: function execute (line 58) | def execute(): FILE: paddlehub/commands/version.py class VersionCommand (line 23) | class VersionCommand: method execute (line 24) | def execute(self, argv: List) -> bool: FILE: paddlehub/compat/datasets/base_dataset.py class InputExample (line 21) | class InputExample(object): method __init__ (line 37) | def __init__(self, guid, text_a, text_b=None, label=None): method __str__ (line 43) | def __str__(self): class BaseDataset (line 50) | class BaseDataset(object): method __init__ (line 51) | def __init__(self, method get_train_examples (line 102) | def get_train_examples(self): method get_dev_examples (line 105) | def get_dev_examples(self): method get_test_examples (line 108) | def get_test_examples(self): method get_val_examples (line 111) | def get_val_examples(self): method get_predict_examples (line 114) | def get_predict_examples(self): method get_examples (line 117) | def get_examples(self, phase): method get_labels (line 131) | def get_labels(self): method num_labels (line 135) | def num_labels(self): method label_dict (line 139) | def label_dict(self): method _load_train_examples (line 142) | def _load_train_examples(self): method _load_dev_examples (line 146) | def _load_dev_examples(self): method _load_test_examples (line 150) | def _load_test_examples(self): method _load_predict_examples (line 154) | def _load_predict_examples(self): method _read_file (line 158) | def _read_file(self, path, phase=None): method _load_label_data (line 161) | def _load_label_data(self): method __str__ (line 165) | def __str__(self): FILE: paddlehub/compat/datasets/couplet.py class Couplet (line 27) | class Couplet(GenerationDataset): method __init__ (line 30) | def __init__(self, tokenizer=None, max_seq_len=None): method _read_file (line 43) | def _read_file(self, input_file, phase=None): FILE: paddlehub/compat/datasets/nlp_dataset.py class BaseNLPDataset (line 29) | class BaseNLPDataset(BaseDataset): method __init__ (line 30) | def __init__(self, method train_records (line 64) | def train_records(self): method dev_records (line 74) | def dev_records(self): method test_records (line 84) | def test_records(self): method predict_records (line 94) | def predict_records(self): method _read_file (line 103) | def _read_file(self, input_file, phase=None): method _convert_examples_to_records (line 139) | def _convert_examples_to_records(self, examples, phase): method get_train_records (line 166) | def get_train_records(self, shuffle=False): method get_dev_records (line 169) | def get_dev_records(self, shuffle=False): method get_test_records (line 172) | def get_test_records(self, shuffle=False): method get_val_records (line 175) | def get_val_records(self, shuffle=False): method get_predict_records (line 178) | def get_predict_records(self, shuffle=False): method get_records (line 181) | def get_records(self, phase, shuffle=False): method get_feed_list (line 199) | def get_feed_list(self, phase): method batch_records_generator (line 207) | def batch_records_generator(self, phase, batch_size, shuffle=True, pad... class GenerationDataset (line 255) | class GenerationDataset(BaseNLPDataset): method __init__ (line 256) | def __init__(self, method _convert_examples_to_records (line 293) | def _convert_examples_to_records(self, examples, phase): FILE: paddlehub/compat/module/module_v1.py class ModuleV1 (line 30) | class ModuleV1(object): method __init__ (line 39) | def __init__(self, name: str = None, directory: str = None, version: s... method _load_processor (line 57) | def _load_processor(self): method _load_assets (line 67) | def _load_assets(self): method _load_parameters (line 73) | def _load_parameters(self): method _load_extra_info (line 101) | def _load_extra_info(self): method _generate_func (line 108) | def _generate_func(self): method _load_model (line 112) | def _load_model(self): method context (line 125) | def context(self, method _update_bert_max_seq_len (line 158) | def _update_bert_max_seq_len(self, program: paddle.static.Program, fee... method __call__ (line 173) | def __call__(self, sign_name: str, data: dict, use_gpu: bool = False, ... method get_py_requirements (line 215) | def get_py_requirements(cls) -> List[str]: method load (line 220) | def load(cls, directory: str) -> EasyDict: method load_module_info (line 241) | def load_module_info(cls, directory: str) -> EasyDict: method assets_path (line 252) | def assets_path(self): method get_name_prefix (line 255) | def get_name_prefix(self): method is_runnable (line 259) | def is_runnable(self): method save_inference_model (line 267) | def save_inference_model(self, method export_onnx_model (line 306) | def export_onnx_model(self, dirname: str, **kwargs): method sub_modules (line 332) | def sub_modules(self, recursive: bool = True): FILE: paddlehub/compat/module/module_v1_utils.py function convert_module_desc (line 21) | def convert_module_desc(desc_file): function convert_signatures (line 31) | def convert_signatures(signmaps): function convert_attr (line 44) | def convert_attr(module_attr): FILE: paddlehub/compat/module/nlp_module.py class DataFormatError (line 39) | class DataFormatError(Exception): method __init__ (line 41) | def __init__(self, *args): class NLPBaseModule (line 45) | class NLPBaseModule(RunModule): method get_vocab_path (line 47) | def get_vocab_path(self): class NLPPredictionModule (line 56) | class NLPPredictionModule(NLPBaseModule): method _set_config (line 58) | def _set_config(self): method texts2tensor (line 77) | def texts2tensor(self, texts: List[dict]) -> paddle.Tensor: method to_unicode (line 97) | def to_unicode(self, texts: str) -> Text: method run_cmd (line 116) | def run_cmd(self, argvs: List[Any]): method add_module_config_arg (line 142) | def add_module_config_arg(self): method add_module_input_arg (line 151) | def add_module_input_arg(self): method check_input_data (line 156) | def check_input_data(self, args): class TransformerModule (line 169) | class TransformerModule(NLPBaseModule): method __init__ (line 174) | def __init__(self, method init_pretraining_params (line 191) | def init_pretraining_params(self, exe: paddle.static.Executor, pretrai... method param_prefix (line 205) | def param_prefix(self) -> str: method context (line 209) | def context( method get_embedding (line 350) | def get_embedding(self, texts: List[str], max_seq_len: int = 512, use_... method get_spm_path (line 399) | def get_spm_path(self) -> str: method get_word_dict_path (line 404) | def get_word_dict_path(self) -> str: method get_params_layer (line 409) | def get_params_layer(self) -> dict: FILE: paddlehub/compat/module/processor.py class BaseProcessor (line 19) | class BaseProcessor(object): method __init__ (line 23) | def __init__(self, module): method configs (line 26) | def configs(self) -> List: method preprocess (line 29) | def preprocess(self, signature: str, data: dict): method postprocess (line 34) | def postprocess(self, signature: str, data_out: dict, data_info: dict,... method data_format (line 39) | def data_format(self, signature: str): FILE: paddlehub/compat/paddle_utils.py function convert_dtype_to_string (line 39) | def convert_dtype_to_string(dtype: str) -> core.VarDesc.VarType: function get_variable_info (line 45) | def get_variable_info(var: paddle.static.Variable) -> dict: function remove_feed_fetch_op (line 77) | def remove_feed_fetch_op(program: paddle.static.Program): function rename_var (line 102) | def rename_var(block: paddle.device.framework.Block, old_name: str, new_... function add_vars_prefix (line 117) | def add_vars_prefix(program: paddle.static.Program, function remove_vars_prefix (line 130) | def remove_vars_prefix(program: paddle.static.Program, function clone_program (line 144) | def clone_program(origin_program: paddle.static.Program, for_test: bool ... function _copy_vars_and_ops_in_blocks (line 157) | def _copy_vars_and_ops_in_blocks(from_block: paddle.device.framework.Blo... function set_op_attr (line 193) | def set_op_attr(program: paddle.static.Program, is_test: bool = False): function static_mode_guard (line 203) | def static_mode_guard(): function run_in_static_mode (line 216) | def run_in_static_mode(func): FILE: paddlehub/compat/task/base_task.py class BaseTask (line 42) | class BaseTask(object): method __init__ (line 52) | def __init__(self, method phase_guard (line 130) | def phase_guard(self, phase: str): method enter_phase (line 135) | def enter_phase(self, phase: str): method exit_phase (line 144) | def exit_phase(self): method init_if_necessary (line 147) | def init_if_necessary(self): method init_if_load_best_model (line 154) | def init_if_load_best_model(self): method _build_env (line 167) | def _build_env(self): method places (line 232) | def places(self) -> List[Union[paddle.CPUPlace, paddle.CUDAPlace]]: method return_numpy (line 243) | def return_numpy(self) -> bool: method is_train_phase (line 247) | def is_train_phase(self) -> bool: method is_test_phase (line 251) | def is_test_phase(self) -> bool: method is_predict_phase (line 255) | def is_predict_phase(self) -> bool: method phase (line 259) | def phase(self) -> str: method env (line 263) | def env(self) -> RunEnv: method current_step (line 272) | def current_step(self) -> int: method current_epoch (line 278) | def current_epoch(self) -> int: method main_program (line 284) | def main_program(self) -> paddle.static.Program: method startup_program (line 290) | def startup_program(self) -> paddle.static.Program: method main_program_compiled (line 296) | def main_program_compiled(self) -> paddle.static.CompiledProgram: method main_program_to_be_run (line 302) | def main_program_to_be_run(self) -> Union[paddle.static.Program, paddl... method generator (line 310) | def generator(self) -> Generator: method loss (line 342) | def loss(self) -> paddle.static.Variable: method labels (line 351) | def labels(self) -> List[paddle.static.Variable]: method outputs (line 360) | def outputs(self) -> List[paddle.static.Variable]: method metrics (line 366) | def metrics(self) -> List[str]: method unique_name_generator (line 375) | def unique_name_generator(self): method feed_list (line 379) | def feed_list(self) -> List[str]: method feed_var_list (line 392) | def feed_var_list(self) -> List[paddle.static.Variable]: method fetch_list (line 400) | def fetch_list(self) -> List[str]: method fetch_var_list (line 406) | def fetch_var_list(self) -> List[paddle.static.Variable]: method vdl_writer (line 411) | def vdl_writer(self) -> LogWriter: method create_event_function (line 422) | def create_event_function(self, hook_type: str) -> Callable: method hooks (line 442) | def hooks(self) -> List[dict]: method hooks_info (line 445) | def hooks_info(self, show_default: bool = False) -> str: method add_hook (line 455) | def add_hook(self, hook_type: str, name: str = None, func: Callable = ... method delete_hook (line 468) | def delete_hook(self, hook_type: str, name: str): method modify_hook (line 478) | def modify_hook(self, hook_type: str, name: str, func: Callable): method _default_build_env_start_event (line 489) | def _default_build_env_start_event(self): method _default_build_env_end_event (line 492) | def _default_build_env_end_event(self): method _default_finetune_start_event (line 496) | def _default_finetune_start_event(self): method _default_finetune_end_event (line 499) | def _default_finetune_end_event(self, run_states: List[RunState]): method _default_predict_start_event (line 502) | def _default_predict_start_event(self): method _default_predict_end_event (line 505) | def _default_predict_end_event(self, run_states: List[RunState]): method _default_eval_start_event (line 508) | def _default_eval_start_event(self): method _default_eval_end_event (line 511) | def _default_eval_end_event(self, run_states: List[RunState]): method _default_log_interval_event (line 548) | def _default_log_interval_event(self, run_states: List[RunState]): method _default_save_ckpt_interval_event (line 567) | def _default_save_ckpt_interval_event(self): method _default_eval_interval_event (line 570) | def _default_eval_interval_event(self): method _default_run_step_event (line 573) | def _default_run_step_event(self, run_state: List[RunState]): method _build_net (line 576) | def _build_net(self): method _add_loss (line 579) | def _add_loss(self): method _add_label (line 582) | def _add_label(self): method _add_metrics (line 585) | def _add_metrics(self): method _calculate_metrics (line 590) | def _calculate_metrics(self, run_states: List[RunState]): method load_checkpoint (line 596) | def load_checkpoint(self): method load_parameters (line 606) | def load_parameters(self, dirname): method save_inference_model (line 614) | def save_inference_model(self, dirname: str, model_filename: str = Non... method finetune_and_eval (line 624) | def finetune_and_eval(self) -> List[RunState]: method finetune (line 627) | def finetune(self, do_eval: bool = False) -> List[RunState]: method eval (line 668) | def eval(self, phase: str = 'dev', load_best_model: bool = False) -> L... method _create_predictor (line 690) | def _create_predictor(self) -> core.PaddlePredictor: method _run_with_predictor (line 709) | def _run_with_predictor(self) -> List[RunState]: method predict (line 753) | def predict( method _postprocessing (line 796) | def _postprocessing(self, run_states: List[RunState]) -> List: method _run (line 810) | def _run(self, do_eval: bool = False) -> List[RunState]: method __repr__ (line 875) | def __repr__(self) -> str: FILE: paddlehub/compat/task/batch.py function pad_batch_data (line 22) | def pad_batch_data(insts: List, FILE: paddlehub/compat/task/checkpoint.py function load_checkpoint (line 27) | def load_checkpoint(checkpoint_dir: str, exe: paddle.static.Executor, FILE: paddlehub/compat/task/config.py class RunConfig (line 20) | class RunConfig(object): method __init__ (line 23) | def __init__(self, method __repr__ (line 49) | def __repr__(self): FILE: paddlehub/compat/task/hook.py class TaskHooks (line 21) | class TaskHooks(object): method __init__ (line 24) | def __init__(self): method add (line 54) | def add(self, hook_type: str, name: str = None, func: Callable = None): method delete (line 81) | def delete(self, hook_type: str, name: str): method modify (line 94) | def modify(self, hook_type: str, name: str, func: Callable): method exist (line 110) | def exist(self, hook_type: str, name: str) -> bool: method info (line 125) | def info(self, show_default: bool = False) -> str: method __getitem__ (line 154) | def __getitem__(self, hook_type: str) -> OrderedDict: method __repr__ (line 157) | def __repr__(self) -> str: FILE: paddlehub/compat/task/metrics.py function _get_ngrams (line 21) | def _get_ngrams(segment: str, max_order: int): function compute_bleu (line 42) | def compute_bleu(reference_corpus: List, translation_corpus: List, max_o... FILE: paddlehub/compat/task/reader.py class InputExample (line 26) | class InputExample(object): method __init__ (line 33) | def __init__(self, guid: int, text_a: str, text_b: str = None, label: ... method __str__ (line 49) | def __str__(self): class BaseReader (line 56) | class BaseReader(object): method __init__ (line 57) | def __init__(self, dataset: Generic, random_seed: int = None): method get_train_examples (line 72) | def get_train_examples(self) -> List: method get_dev_examples (line 75) | def get_dev_examples(self) -> List: method get_test_examples (line 78) | def get_test_examples(self) -> List: method data_generator (line 81) | def data_generator(self) -> Generic: class BaseNLPReader (line 85) | class BaseNLPReader(BaseReader): method __init__ (line 86) | def __init__(self, method _truncate_seq_pair (line 111) | def _truncate_seq_pair(self, tokens_a: List, tokens_b: List, max_lengt... method _convert_example_to_record (line 127) | def _convert_example_to_record(self, method _pad_batch_records (line 206) | def _pad_batch_records(self, batch_records: List, phase: str): method _prepare_batch_data (line 209) | def _prepare_batch_data(self, examples: List, batch_size: int, phase: ... method data_generator (line 230) | def data_generator(self, class ClassifyReader (line 287) | class ClassifyReader(BaseNLPReader): method _pad_batch_records (line 288) | def _pad_batch_records(self, batch_records: List, phase: str = None) -... FILE: paddlehub/compat/task/task_utils.py class RunState (line 22) | class RunState(object): method __init__ (line 29) | def __init__(self, length: int): method __add__ (line 37) | def __add__(self, other): method update (line 44) | def update(self): class RunEnv (line 50) | class RunEnv(object): method __init__ (line 53) | def __init__(self): method __setattr__ (line 67) | def __setattr__(self, key: str, value: Any): method __getattr__ (line 70) | def __getattr__(self, key: str) -> Any: FILE: paddlehub/compat/task/text_generation_task.py class AttentionDecoderCell (line 32) | class AttentionDecoderCell(RNNCellBase): method __init__ (line 34) | def __init__(self, num_layers, input_size, hidden_size, dropout_prob=0... method attention (line 45) | def attention(self, query, enc_output, mask=None): method forward (line 64) | def forward(self, step_input, states, enc_output, enc_padding_mask=None): class TextGenerationTask (line 84) | class TextGenerationTask(BaseTask): method __init__ (line 106) | def __init__( method _add_label (line 145) | def _add_label(self): method _build_net (line 149) | def _build_net(self): method _postprocessing (line 215) | def _postprocessing(self, run_states): method _add_metrics (line 229) | def _add_metrics(self): method _add_loss (line 233) | def _add_loss(self): method fetch_list (line 245) | def fetch_list(self): method _calculate_metrics (line 252) | def _calculate_metrics(self, run_states): FILE: paddlehub/compat/task/tokenization.py function convert_to_unicode (line 24) | def convert_to_unicode(text: Union[str, bytes]) -> str: function load_vocab (line 34) | def load_vocab(vocab_file: str) -> List: function convert_by_vocab (line 51) | def convert_by_vocab(vocab: collections.OrderedDict, items: List[str]) -... function convert_tokens_to_ids (line 60) | def convert_tokens_to_ids(vocab: collections.OrderedDict, tokens: List[s... function convert_ids_to_tokens (line 64) | def convert_ids_to_tokens(inv_vocab, ids): function whitespace_tokenize (line 68) | def whitespace_tokenize(text: str) -> List: class FullTokenizer (line 78) | class FullTokenizer(object): method __init__ (line 81) | def __init__(self, vocab_file: str, do_lower_case: bool = True, use_se... method tokenize (line 89) | def tokenize(self, text: str) -> List: method convert_tokens_to_ids (line 97) | def convert_tokens_to_ids(self, tokens: List) -> List: method convert_ids_to_tokens (line 100) | def convert_ids_to_tokens(self, ids: List) -> List: class WSSPTokenizer (line 104) | class WSSPTokenizer(object): method __init__ (line 105) | def __init__(self, vocab_file: str, sp_model_dir: str, word_dict: str,... method cut (line 117) | def cut(self, chars: List) -> List: method tokenize (line 134) | def tokenize(self, text: Union[str, bytes], unk_token: str = '[UNK]') ... method convert_tokens_to_ids (line 152) | def convert_tokens_to_ids(self, tokens: List) -> List: method convert_ids_to_tokens (line 155) | def convert_ids_to_tokens(self, ids: List) -> List: class BasicTokenizer (line 159) | class BasicTokenizer(object): method __init__ (line 162) | def __init__(self, do_lower_case: bool = True): method tokenize (line 169) | def tokenize(self, text: Union[str, bytes]) -> List: method _run_strip_accents (line 193) | def _run_strip_accents(self, text: str) -> str: method _run_split_on_punc (line 204) | def _run_split_on_punc(self, text: str) -> List: method _tokenize_chinese_chars (line 224) | def _tokenize_chinese_chars(self, text: str) -> str: method _is_chinese_char (line 237) | def _is_chinese_char(self, cp: int) -> bool: method _clean_text (line 258) | def _clean_text(self, text: str) -> str: class WordpieceTokenizer (line 272) | class WordpieceTokenizer(object): method __init__ (line 275) | def __init__(self, method tokenize (line 285) | def tokenize(self, text: Union[str, bytes]) -> List: function _is_whitespace (line 337) | def _is_whitespace(char: str) -> bool: function _is_control (line 349) | def _is_control(char: str) -> bool: function _is_punctuation (line 361) | def _is_punctuation(char: str) -> bool: FILE: paddlehub/compat/task/transformer_emb_task.py class TransformerEmbeddingTask (line 26) | class TransformerEmbeddingTask(BaseTask): method __init__ (line 27) | def __init__(self, method _build_net (line 39) | def _build_net(self) -> List[paddle.static.Variable]: method _postprocessing (line 44) | def _postprocessing(self, run_states: List[RunState]) -> List[List[np.... method feed_list (line 55) | def feed_list(self) -> List[str]: method fetch_list (line 60) | def fetch_list(self) -> List[str]: FILE: paddlehub/compat/type.py class DataType (line 17) | class DataType(object): FILE: paddlehub/config.py function md5 (line 27) | def md5(text: str): class HubConfig (line 33) | class HubConfig: method __init__ (line 40) | def __init__(self): method _initialize (line 55) | def _initialize(self): method reset (line 63) | def reset(self): method log_level (line 69) | def log_level(self): method log_level (line 77) | def log_level(self, level: str): method log_enable (line 86) | def log_enable(self): method log_enable (line 91) | def log_enable(self, enable: bool): method server (line 96) | def server(self): method server (line 101) | def server(self, url: str): method flush (line 105) | def flush(self): method __str__ (line 112) | def __str__(self): class CacheConfig (line 117) | class CacheConfig(object): method __init__ (line 118) | def __init__(self): method _initialize (line 132) | def _initialize(self): method hub_name (line 139) | def hub_name(self): method hub_name (line 143) | def hub_name(self, url: str): method flush (line 147) | def flush(self): method __str__ (line 154) | def __str__(self): function _load_old_config (line 159) | def _load_old_config(config: HubConfig): FILE: paddlehub/datasets/base_audio_dataset.py class InputExample (line 26) | class InputExample(object): method __init__ (line 31) | def __init__(self, guid: int, source: Union[list, str], label: Optiona... class BaseAudioDataset (line 37) | class BaseAudioDataset(object): method __init__ (line 42) | def __init__(self, base_path: str, data_file: str, mode: Optional[str]... method _read_file (line 46) | def _read_file(self, input_file: str): class AudioClassificationDataset (line 50) | class AudioClassificationDataset(BaseAudioDataset, paddle.io.Dataset): method __init__ (line 56) | def __init__(self, method _read_file (line 72) | def _read_file(self, input_file: str) -> List[InputExample]: method _convert_examples_to_records (line 89) | def _convert_examples_to_records(self, examples: List[InputExample]) -... method __getitem__ (line 120) | def __getitem__(self, idx): method __len__ (line 127) | def __len__(self): FILE: paddlehub/datasets/base_nlp_dataset.py class InputExample (line 32) | class InputExample(object): method __init__ (line 37) | def __init__(self, guid: int, text_a: str, text_b: Optional[str] = Non... method __str__ (line 62) | def __str__(self): class BaseNLPDataset (line 69) | class BaseNLPDataset(object): method __init__ (line 75) | def __init__(self, method _load_label_data (line 116) | def _load_label_data(self): method _download_and_uncompress_dataset (line 126) | def _download_and_uncompress_dataset(self, destination: str, url: str): method _read_file (line 140) | def _read_file(self, input_file: str, is_file_with_header: bool = False): method get_labels (line 150) | def get_labels(self): class TextClassificationDataset (line 157) | class TextClassificationDataset(BaseNLPDataset, paddle.io.Dataset): method __init__ (line 162) | def __init__(self, method _read_file (line 202) | def _read_file(self, input_file, is_file_with_header: bool = False) ->... method _convert_examples_to_records (line 226) | def _convert_examples_to_records(self, examples: List[InputExample]) -... method __getitem__ (line 272) | def __getitem__(self, idx): method __len__ (line 296) | def __len__(self): class SeqLabelingDataset (line 300) | class SeqLabelingDataset(BaseNLPDataset, paddle.io.Dataset): method __init__ (line 328) | def __init__(self, method _read_file (line 356) | def _read_file(self, input_file, is_file_with_header: bool = False) ->... method _convert_examples_to_records (line 372) | def _convert_examples_to_records(self, examples: List[InputExample]) -... method __getitem__ (line 445) | def __getitem__(self, idx): method __len__ (line 470) | def __len__(self): class TextMatchingDataset (line 474) | class TextMatchingDataset(BaseNLPDataset, paddle.io.Dataset): method __init__ (line 479) | def __init__(self, method _read_file (line 519) | def _read_file(self, input_file, is_file_with_header: bool = False) ->... method _convert_examples_to_records (line 543) | def _convert_examples_to_records(self, examples: List[InputExample]) -... method __getitem__ (line 573) | def __getitem__(self, idx): method __len__ (line 591) | def __len__(self): FILE: paddlehub/datasets/base_seg_dataset.py class SegDataset (line 23) | class SegDataset(paddle.io.Dataset): method __init__ (line 45) | def __init__(self, method __getitem__ (line 111) | def __getitem__(self, idx: int) -> Tuple[np.ndarray]: method __len__ (line 126) | def __len__(self) -> int: FILE: paddlehub/datasets/canvas.py class Canvas (line 28) | class Canvas(paddle.io.Dataset): method __init__ (line 41) | def __init__(self, transform: Callable, mode: str = 'train'): method __getitem__ (line 53) | def __getitem__(self, idx: int) -> np.ndarray: method __len__ (line 58) | def __len__(self): FILE: paddlehub/datasets/chnsenticorp.py class ChnSentiCorp (line 25) | class ChnSentiCorp(TextClassificationDataset): method __init__ (line 33) | def __init__(self, tokenizer: Union[BertTokenizer, CustomTokenizer], m... FILE: paddlehub/datasets/esc50.py class ESC50 (line 23) | class ESC50(AudioClassificationDataset): method __init__ (line 85) | def __init__(self, mode: str = 'train', feat_type: str = 'mel'): FILE: paddlehub/datasets/flowers.py class Flowers (line 26) | class Flowers(paddle.io.Dataset): method __init__ (line 27) | def __init__(self, transforms: Callable, mode: str = 'train'): method __getitem__ (line 43) | def __getitem__(self, idx) -> Tuple[np.ndarray, int]: method __len__ (line 49) | def __len__(self): FILE: paddlehub/datasets/lcqmc.py class LCQMC (line 26) | class LCQMC(TextMatchingDataset): method __init__ (line 29) | def __init__( FILE: paddlehub/datasets/minicoco.py class MiniCOCO (line 28) | class MiniCOCO(paddle.io.Dataset): method __init__ (line 41) | def __init__(self, transform: Callable, mode: str = 'train'): method __getitem__ (line 54) | def __getitem__(self, idx: int) -> np.ndarray: method __len__ (line 65) | def __len__(self): FILE: paddlehub/datasets/msra_ner.py class MSRA_NER (line 27) | class MSRA_NER(SeqLabelingDataset): method __init__ (line 36) | def __init__( FILE: paddlehub/datasets/opticdiscseg.py class OpticDiscSeg (line 29) | class OpticDiscSeg(SegDataset): method __init__ (line 40) | def __init__(self, transforms: Callable = None, mode: str = 'train'): FILE: paddlehub/datasets/pascalvoc.py class DetectCatagory (line 26) | class DetectCatagory: method __init__ (line 39) | def __init__(self, attrbox: Callable, data_dir: str): method __call__ (line 43) | def __call__(self): class ParseImages (line 55) | class ParseImages: method __init__ (line 67) | def __init__(self, attrbox: Callable, data_dir: str, category_to_id_ma... method __call__ (line 73) | def __call__(self): class GTAnotations (line 88) | class GTAnotations: method __init__ (line 100) | def __init__(self, attrbox: Callable, category_to_id_map: dict): method box_to_center_relative (line 104) | def box_to_center_relative(self, box: list, img_height: int, img_width... method __call__ (line 125) | def __call__(self, img: dict): class DetectionData (line 149) | class DetectionData(paddle.io.Dataset): method __init__ (line 161) | def __init__(self, transform: Callable, size: int = 416, mode: str = '... method __getitem__ (line 187) | def __getitem__(self, idx: int): method __len__ (line 193) | def __len__(self): FILE: paddlehub/env.py function _get_user_home (line 36) | def _get_user_home(): function _get_hub_home (line 40) | def _get_hub_home(): function _get_sub_home (line 53) | def _get_sub_home(directory): FILE: paddlehub/finetune/trainer.py class Trainer (line 31) | class Trainer(object): method __init__ (line 55) | def __init__(self, method _load_checkpoint (line 91) | def _load_checkpoint(self): method load_model (line 123) | def load_model(self, load_dir: str): method _save_checkpoint (line 135) | def _save_checkpoint(self): method save_model (line 141) | def save_model(self, save_dir: str): method _save_metrics (line 148) | def _save_metrics(self): method _load_metrics (line 152) | def _load_metrics(self): method train (line 160) | def train(self, method evaluate (line 283) | def evaluate(self, method training_step (line 345) | def training_step(self, batch: List[paddle.Tensor], batch_idx: int): method validation_step (line 374) | def validation_step(self, batch: Any, batch_idx: int): method optimizer_step (line 388) | def optimizer_step(self, epoch_idx: int, batch_idx: int, optimizer: pa... method learning_rate_step (line 402) | def learning_rate_step(self, epoch_idx: int, batch_idx: int, learning_... method optimizer_zero_grad (line 406) | def optimizer_zero_grad(self, epoch_idx: int, batch_idx: int, optimize... method _compare_metrics (line 418) | def _compare_metrics(self, old_metric: dict, new_metric: dict): FILE: paddlehub/module/audio_module.py class AudioClassifierModule (line 25) | class AudioClassifierModule(RunModule): method _batchify (line 33) | def _batchify(self, data: List[List[float]], sample_rate: int, feat_ty... method training_step (line 53) | def training_step(self, batch: List[paddle.Tensor], batch_idx: int): method validation_step (line 62) | def validation_step(self, batch: List[paddle.Tensor], batch_idx: int): method predict (line 70) | def predict(self, FILE: paddlehub/module/cv_module.py class ImageServing (line 37) | class ImageServing(object): method serving_method (line 39) | def serving_method(self, images: List[str], **kwargs) -> List[dict]: class ImageClassifierModule (line 46) | class ImageClassifierModule(RunModule, ImageServing): method training_step (line 47) | def training_step(self, batch: int, batch_idx: int) -> dict: method validation_step (line 60) | def validation_step(self, batch: int, batch_idx: int) -> dict: method predict (line 82) | def predict(self, images: List[np.ndarray], batch_size: int = 1, top_k... method serving_method (line 125) | def serving_method(self, images: list, top_k: int, **kwargs): method run_cmd (line 140) | def run_cmd(self, argvs: list): method add_module_config_arg (line 159) | def add_module_config_arg(self): method add_module_input_arg (line 166) | def add_module_input_arg(self): class ImageColorizeModule (line 173) | class ImageColorizeModule(RunModule, ImageServing): method training_step (line 174) | def training_step(self, batch: int, batch_idx: int) -> dict: method validation_step (line 187) | def validation_step(self, batch: int, batch_idx: int) -> dict: method predict (line 213) | def predict(self, images: list, visualization: bool = True, batch_size... method serving_method (line 278) | def serving_method(self, images: list, **kwargs): method run_cmd (line 294) | def run_cmd(self, argvs: list): method add_module_config_arg (line 313) | def add_module_config_arg(self): method add_module_input_arg (line 323) | def add_module_input_arg(self): class Yolov3Module (line 330) | class Yolov3Module(RunModule, ImageServing): method training_step (line 331) | def training_step(self, batch: int, batch_idx: int) -> dict: method validation_step (line 345) | def validation_step(self, batch: int, batch_idx: int) -> dict: method predict (line 382) | def predict(self, imgpath: str, filelist: str, visualization: bool = T... class StyleTransferModule (line 455) | class StyleTransferModule(RunModule, ImageServing): method training_step (line 456) | def training_step(self, batch: int, batch_idx: int) -> dict: method validation_step (line 469) | def validation_step(self, batch: int, batch_idx: int) -> dict: method predict (line 507) | def predict(self, method serving_method (line 561) | def serving_method(self, images: list, **kwargs): method run_cmd (line 573) | def run_cmd(self, argvs: list): method add_module_config_arg (line 596) | def add_module_config_arg(self): method add_module_input_arg (line 607) | def add_module_input_arg(self): class ImageSegmentationModule (line 615) | class ImageSegmentationModule(ImageServing, RunModule): method training_step (line 616) | def training_step(self, batch: List[paddle.Tensor], batch_idx: int) ->... method predict (line 644) | def predict(self, method serving_method (line 706) | def serving_method(self, images: List[str], **kwargs): FILE: paddlehub/module/manager.py class HubModuleNotFoundError (line 31) | class HubModuleNotFoundError(Exception): method __init__ (line 32) | def __init__(self, name: str, info: dict = None, version: str = None, ... method __str__ (line 38) | def __str__(self): class EnvironmentMismatchError (line 67) | class EnvironmentMismatchError(Exception): method __init__ (line 68) | def __init__(self, name: str, info: dict, version: str = None): method __str__ (line 73) | def __str__(self): class LocalModuleManager (line 113) | class LocalModuleManager(object): method __new__ (line 124) | def __new__(cls, home: str = MODULE_HOME): method __init__ (line 131) | def __init__(self, home: str = None): method _get_normalized_path (line 141) | def _get_normalized_path(self, name: str) -> str: method _get_normalized_name (line 144) | def _get_normalized_name(self, name: str) -> str: method install (line 149) | def install(self, method uninstall (line 200) | def uninstall(self, name: str) -> bool: method search (line 214) | def search(self, name: str, source: str = None, branch: str = None) ->... method list (line 239) | def list(self) -> List[HubModule]: method _install_from_url (line 251) | def _install_from_url(self, url: str) -> HubModule: method _install_from_name (line 260) | def _install_from_name(self, name: str, version: str = None, ignore_en... method _install_from_source (line 302) | def _install_from_source(self, name: str, version: str, source: str, u... method _install_from_directory (line 340) | def _install_from_directory(self, directory: str) -> HubModule: method _install_from_archive (line 370) | def _install_from_archive(self, archive: str) -> HubModule: method _install_module_requirements (line 382) | def _install_module_requirements(self, directory: str): FILE: paddlehub/module/module.py class InvalidHubModule (line 39) | class InvalidHubModule(Exception): method __init__ (line 40) | def __init__(self, directory: str): method __str__ (line 43) | def __str__(self): function runnable (line 51) | def runnable(func: Callable) -> Callable: function serving (line 62) | def serving(func: Callable) -> Callable: class RunModule (line 73) | class RunModule(object): method __init__ (line 76) | def __init__(self, *args, **kwargs): method _get_func_name (line 79) | def _get_func_name(self, current_cls: Generic, module_func_dict: dict)... method __getattribute__ (line 94) | def __getattribute__(self, attr): method get_py_requirements (line 110) | def get_py_requirements(cls) -> List[str]: method _run_func_name (line 121) | def _run_func_name(self): method _run_func (line 125) | def _run_func(self): method is_runnable (line 129) | def is_runnable(self) -> bool: method serving_func_name (line 137) | def serving_func_name(self): method _pretrained_model_path (line 141) | def _pretrained_model_path(self): method sub_modules (line 155) | def sub_modules(self, recursive: bool = True): method save_inference_model (line 177) | def save_inference_model(self, method export_onnx_model (line 275) | def export_onnx_model(self, class Module (line 356) | class Module(object): method __new__ (line 379) | def __new__(cls, method load (line 411) | def load(cls, directory: str) -> Generic: method load_module_info (line 452) | def load_module_info(cls, directory: str) -> EasyDict: method init_with_name (line 479) | def init_with_name(cls, method init_with_directory (line 519) | def init_with_directory(cls, directory: str, **kwargs) -> Union[RunMod... function moduleinfo (line 540) | def moduleinfo(name: str, FILE: paddlehub/module/nlp_module.py function fn_args_to_dict (line 45) | def fn_args_to_dict(func, *args, **kwargs): class InitTrackerMeta (line 63) | class InitTrackerMeta(type(nn.Layer)): method __init__ (line 75) | def __init__(cls, name, bases, attrs): method init_and_track_conf (line 85) | def init_and_track_conf(init_func, help_func=None): function register_base_model (line 113) | def register_base_model(cls): class PretrainedModel (line 128) | class PretrainedModel(nn.Layer): method _wrap_init (line 157) | def _wrap_init(self, original_init, *args, **kwargs): method base_model (line 166) | def base_model(self): method model_name_list (line 170) | def model_name_list(self): method get_input_embeddings (line 173) | def get_input_embeddings(self): method get_output_embeddings (line 180) | def get_output_embeddings(self): method from_pretrained (line 184) | def from_pretrained(cls, pretrained_model_name_or_path, *args, **kwargs): method save_pretrained (line 325) | def save_pretrained(self, save_directory): class TextServing (line 352) | class TextServing(object): method predict_method (line 358) | def predict_method(self, data: List[List[str]], max_seq_len: int = 128... class TransformerModule (line 396) | class TransformerModule(RunModule, TextServing): method input_spec (line 407) | def input_spec(self): method _convert_text_to_input (line 413) | def _convert_text_to_input(self, tokenizer, texts: List[str], max_seq_... method _batchify (line 451) | def _batchify(self, data: List[List[str]], max_seq_len: int, batch_siz... method training_step (line 491) | def training_step(self, batch: List[paddle.Tensor], batch_idx: int): method validation_step (line 512) | def validation_step(self, batch: List[paddle.Tensor], batch_idx: int): method get_embedding (line 532) | def get_embedding(self, data: List[List[str]], use_gpu=False): method predict (line 546) | def predict(self, class EmbeddingServing (line 629) | class EmbeddingServing(object): method calc_similarity (line 635) | def calc_similarity(self, data: List[List[str]]): class EmbeddingModule (line 657) | class EmbeddingModule(RunModule, EmbeddingServing): method _download_vocab (line 663) | def _download_vocab(self): method get_vocab_path (line 670) | def get_vocab_path(self): method get_tokenizer (line 679) | def get_tokenizer(self, *args, **kwargs): FILE: paddlehub/server/__init__.py function server_check (line 22) | def server_check() -> bool: FILE: paddlehub/server/git_source.py class GitSource (line 29) | class GitSource(object): method __init__ (line 38) | def __init__(self, url: str, path: str = None): method checkout (line 60) | def checkout(self, branch: str): method update (line 69) | def update(self): method load_hub_modules (line 79) | def load_hub_modules(self): method search_module (line 110) | def search_module(self, name: str, version: str = None) -> List[dict]: method search_resource (line 120) | def search_resource(self, type: str, name: str, version: str = None) -... method get_module_compat_info (line 142) | def get_module_compat_info(self, name: str) -> dict: method check (line 147) | def check(cls, url: str) -> bool: FILE: paddlehub/server/server.py class HubServer (line 34) | class HubServer(object): method __init__ (line 37) | def __init__(self): method _generate_source (line 41) | def _generate_source(self, url: str, source_type: str = 'git'): method _get_source_key (line 50) | def _get_source_key(self, url: str): method add_source (line 53) | def add_source(self, url: str, source_type: str = 'git', key: str = ''): method remove_source (line 59) | def remove_source(self, url: str = None, key: str = None): method get_source (line 63) | def get_source(self, url: str): method get_source_by_key (line 70) | def get_source_by_key(self, key: str): method search_module (line 74) | def search_module(self, method search_resource (line 90) | def search_resource(self, method get_module_compat_info (line 118) | def get_module_compat_info(self, name: str, source: str = None) -> dict: function uri_path (line 128) | def uri_path(server_url, api): function hub_request (line 140) | def hub_request(api, params, extra=None, timeout=8): class CacheUpdater (line 149) | class CacheUpdater(threading.Thread): method __init__ (line 150) | def __init__(self, command="update_cache", module=None, version=None, ... method update_resource_list_file (line 157) | def update_resource_list_file(self, command="update_cache", module=Non... method run (line 182) | def run(self): FILE: paddlehub/server/server_source.py class ServerConnectionError (line 26) | class ServerConnectionError(Exception): method __init__ (line 28) | def __init__(self, url: str): method __str__ (line 31) | def __str__(self): class ServerSource (line 36) | class ServerSource(object): method __init__ (line 45) | def __init__(self, url: str, timeout: int = 10): method search_module (line 49) | def search_module(self, name: str, version: str = None) -> List[dict]: method search_resource (line 59) | def search_resource(self, type: str, name: str, version: str = None) -... method get_module_compat_info (line 110) | def get_module_compat_info(self, name: str) -> dict: method request (line 126) | def request(self, path: str, params: dict) -> dict: method is_connected (line 135) | def is_connected(self): method check (line 139) | def check(cls, url: str) -> bool: FILE: paddlehub/serving/app_compat.py function package_result (line 40) | def package_result(status: str, msg: str, data: dict): function create_gradio_app (line 69) | def create_gradio_app(module_info: dict): function predict_v2 (line 117) | def predict_v2(module_info: dict, input: dict): function create_app (line 154) | def create_app(init_flag: bool = False, configs: dict = None): function config_with_file (line 265) | def config_with_file(configs: dict): function run (line 288) | def run(configs: dict = None, port: int = 8866): FILE: paddlehub/serving/client.py class InferenceClient (line 19) | class InferenceClient(object): method __init__ (line 20) | def __init__(self, frontend_addr): method send_req (line 26) | def send_req(self, message): class InferenceClientProxy (line 33) | class InferenceClientProxy(object): method get_client (line 37) | def get_client(pid, frontend_addr): FILE: paddlehub/serving/device.py class InferenceDevice (line 28) | class InferenceDevice(object): method __init__ (line 34) | def __init__(self): method listen (line 40) | def listen(self, frontend_addr: str, backend_addr: str): function start_workers (line 62) | def start_workers(modules_info: dict, gpus: list, backend_addr: str): class InferenceServer (line 85) | class InferenceServer(object): method __init__ (line 94) | def __init__(self, modules_info: dict, gpus: list): method listen (line 98) | def listen(self, port: int): FILE: paddlehub/serving/http_server.py class StandaloneApplication (line 31) | class StandaloneApplication(object): method __init__ (line 32) | def __init__(self): method load_config (line 35) | def load_config(self): method load (line 38) | def load(self): method __init__ (line 49) | def __init__(self, app, options=None): method load_config (line 54) | def load_config(self): method load (line 62) | def load(self): class StandaloneApplication (line 43) | class StandaloneApplication(gunicorn.app.base.BaseApplication): method __init__ (line 32) | def __init__(self): method load_config (line 35) | def load_config(self): method load (line 38) | def load(self): method __init__ (line 49) | def __init__(self, app, options=None): method load_config (line 54) | def load_config(self): method load (line 62) | def load(self): function package_result (line 66) | def package_result(status: str, msg: str, data: dict): function create_app (line 95) | def create_app(client_port: int = 5559, modules_name: list = []): function run (line 164) | def run(port: int = 8866, client_port: int = 5559, names: list = [], wor... function run_http_server (line 189) | def run_http_server(port: int = 8866, client_port: int = 5559, names: li... function run_all (line 213) | def run_all(modules_info: dict, gpus: list, frontend_port: int, backend_... FILE: paddlehub/serving/model_service/base_model_service.py class BaseModuleInfo (line 19) | class BaseModuleInfo(object): method __init__ (line 20) | def __init__(self): method set_modules_info (line 24) | def set_modules_info(self, modules_info): method get_module_info (line 30) | def get_module_info(self, module_name): method add_module (line 33) | def add_module(self, module_name, module_info): method get_module (line 37) | def get_module(self, module_name): method modules_info (line 41) | def modules_info(self): class CVModuleInfo (line 45) | class CVModuleInfo(BaseModuleInfo): method __init__ (line 46) | def __init__(self): method cv_modules (line 80) | def cv_modules(self): method add_module (line 83) | def add_module(self, module_name, module_info): class NLPModuleInfo (line 89) | class NLPModuleInfo(BaseModuleInfo): method __init__ (line 90) | def __init__(self): method nlp_modules (line 94) | def nlp_modules(self): method add_module (line 97) | def add_module(self, module_name, module_info): class V2ModuleInfo (line 103) | class V2ModuleInfo(BaseModuleInfo): method __init__ (line 104) | def __init__(self): method modules (line 108) | def modules(self): method add_module (line 111) | def add_module(self, module_name, module_info): class BaseModelService (line 116) | class BaseModelService(object): method _initialize (line 117) | def _initialize(self): method _pre_processing (line 121) | def _pre_processing(self, data): method _inference (line 125) | def _inference(self, data): method _post_processing (line 129) | def _post_processing(self, data): FILE: paddlehub/serving/worker.py function run_worker (line 24) | def run_worker(modules_info: dict, gpu_index: int, addr: str): FILE: paddlehub/text/bert_tokenizer.py class BasicTokenizer (line 28) | class BasicTokenizer(object): method __init__ (line 31) | def __init__(self, do_lower_case: bool = True, never_split: List[str] ... method tokenize (line 48) | def tokenize(self, text: str, never_split: List[str] = None): method _run_strip_accents (line 76) | def _run_strip_accents(self, text: str): method _run_split_on_punc (line 87) | def _run_split_on_punc(self, text: str, never_split: List[str] = None): method _tokenize_chinese_chars (line 109) | def _tokenize_chinese_chars(self, text: str): method _clean_text (line 121) | def _clean_text(self, text: str): method encode (line 134) | def encode(self): method decode (line 138) | def decode(self): class WordpieceTokenizer (line 143) | class WordpieceTokenizer(object): method __init__ (line 146) | def __init__(self, vocab: List[str], unk_token: str, max_input_chars_p... method tokenize (line 151) | def tokenize(self, text): method encode (line 198) | def encode(self): method decode (line 202) | def decode(self): class BertTokenizer (line 207) | class BertTokenizer(object): method __init__ (line 242) | def __init__( method vocab_size (line 282) | def vocab_size(self): method get_vocab (line 285) | def get_vocab(self): method _convert_token_to_id (line 288) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 292) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 296) | def convert_tokens_to_string(self, tokens): method convert_tokens_to_ids (line 301) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 316) | def convert_ids_to_tokens(self, ids: Union[int, List[int]], method tokenize (line 333) | def tokenize(self, text: str): method build_inputs_with_special_tokens (line 350) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], method num_special_tokens_to_add (line 372) | def num_special_tokens_to_add(self, pair=False): method get_special_tokens_mask (line 388) | def get_special_tokens_mask(self, method create_segment_ids_from_sequences (line 416) | def create_segment_ids_from_sequences(self, token_ids_0: List[int], method clean_up_tokenization (line 439) | def clean_up_tokenization(self, out_string: str) -> str: method truncate_sequences (line 447) | def truncate_sequences( method encode (line 506) | def encode(self, method decode (line 652) | def decode(self, class ErnieTinyTokenizer (line 693) | class ErnieTinyTokenizer(BertTokenizer): method __init__ (line 694) | def __init__( method cut (line 734) | def cut(self, chars: List[str]): method tokenize (line 751) | def tokenize(self, text: str): FILE: paddlehub/text/tokenizer.py class CustomTokenizer (line 27) | class CustomTokenizer(object): method __init__ (line 33) | def __init__(self, method vocab_size (line 69) | def vocab_size(self): method get_vocab (line 72) | def get_vocab(self): method _convert_token_to_id (line 75) | def _convert_token_to_id(self, token: str): method _convert_id_to_token (line 79) | def _convert_id_to_token(self, index: int): method convert_tokens_to_string (line 83) | def convert_tokens_to_string(self, tokens: List[str]): method convert_ids_to_tokens (line 91) | def convert_ids_to_tokens(self, ids: Union[int, List[int]], skip_pad_t... method convert_tokens_to_ids (line 108) | def convert_tokens_to_ids(self, tokens: List[str]): method tokenize (line 125) | def tokenize(self, text: str): method encode (line 141) | def encode(self, method truncate_sequences (line 230) | def truncate_sequences(self, method decode (line 287) | def decode(self, method clean_up_tokenization (line 321) | def clean_up_tokenization(self, out_string: str) -> str: FILE: paddlehub/text/utils.py function load_vocab (line 20) | def load_vocab(vocab_file: str): function whitespace_tokenize (line 31) | def whitespace_tokenize(text: str): function is_whitespace (line 40) | def is_whitespace(char: str): function is_control (line 52) | def is_control(char: str): function is_punctuation (line 64) | def is_punctuation(char: str): function is_chinese_char (line 79) | def is_chinese_char(char: str): FILE: paddlehub/utils/download.py function download_data (line 25) | def download_data(url): class Downloader (line 45) | class Downloader: method download_file_and_uncompress (line 46) | def download_file_and_uncompress(self, url: str, save_path: str, print... FILE: paddlehub/utils/io.py function redirect_istream (line 24) | def redirect_istream(stream: IO): function redirect_ostream (line 33) | def redirect_ostream(stream: IO): function redirect_estream (line 42) | def redirect_estream(stream: IO): function discard_oe (line 51) | def discard_oe(): function typein (line 62) | def typein(chars: str = 'y'): FILE: paddlehub/utils/log.py class Logger (line 66) | class Logger(object): method __init__ (line 74) | def __init__(self, name: str = None): method disable (line 97) | def disable(self): method enable (line 100) | def enable(self): method is_enable (line 104) | def is_enable(self) -> bool: method __call__ (line 107) | def __call__(self, log_level: str, msg: str): method use_terminator (line 114) | def use_terminator(self, terminator: str): method processing (line 121) | def processing(self, msg: str, interval: float = 0.1): class ProgressBar (line 148) | class ProgressBar(object): method __init__ (line 170) | def __init__(self, title: str, flush_interval: float = 0.1): method __enter__ (line 176) | def __enter__(self): method __exit__ (line 180) | def __exit__(self, exit_exception, exit_value, exit_traceback): method update (line 187) | def update(self, progress: float): class FormattedText (line 206) | class FormattedText(object): method __init__ (line 225) | def __init__(self, text: str, width: int = None, align: str = '<', col... method __repr__ (line 231) | def __repr__(self) -> str: class TableCell (line 239) | class TableCell(object): method __init__ (line 242) | def __init__(self, content: str = '', width: int = 0, align: str = '<'... method width (line 253) | def width(self) -> int: method width (line 257) | def width(self, value: int): method height (line 263) | def height(self) -> int: method height (line 267) | def height(self, value: int): method __len__ (line 273) | def __len__(self) -> int: method __getitem__ (line 276) | def __getitem__(self, idx: int) -> str: method __repr__ (line 279) | def __repr__(self) -> str: class TableRow (line 283) | class TableRow(object): method __init__ (line 286) | def __init__(self): method append (line 289) | def append(self, cell: TableCell): method width (line 293) | def width(self) -> int: method height (line 300) | def height(self) -> int: method __len__ (line 306) | def __len__(self) -> int: method __repr__ (line 309) | def __repr__(self) -> str: method __getitem__ (line 321) | def __getitem__(self, idx: int) -> TableCell: class TableColumn (line 325) | class TableColumn(object): method __init__ (line 328) | def __init__(self): method append (line 331) | def append(self, cell: TableCell): method width (line 335) | def width(self) -> int: method height (line 342) | def height(self) -> int: method __len__ (line 348) | def __len__(self) -> int: method __getitem__ (line 351) | def __getitem__(self, idx: int) -> TableCell: class Table (line 355) | class Table(object): method __init__ (line 392) | def __init__(self, colors: List[str] = [], aligns: List[str] = [], wid... method append (line 399) | def append(self, *contents, colors: List[str] = [], aligns: List[str] ... method _adjust (line 444) | def _adjust(self): method width (line 461) | def width(self) -> int: method height (line 468) | def height(self) -> int: method __repr__ (line 474) | def __repr__(self) -> str: function get_file_logger (line 483) | def get_file_logger(filename): FILE: paddlehub/utils/paddlex.py class ResourceNotFoundError (line 23) | class ResourceNotFoundError(Exception): method __init__ (line 24) | def __init__(self, name: str, version: str = None): method __str__ (line 28) | def __str__(self): function download (line 36) | def download(name: str, save_path: str, version: str = None): FILE: paddlehub/utils/parser.py class CSVFileParser (line 24) | class CSVFileParser(object): method parse (line 25) | def parse(self, csv_file: str) -> dict: class YAMLFileParser (line 45) | class YAMLFileParser(object): method parse (line 46) | def parse(self, yaml_file: str) -> dict: class TextFileParser (line 52) | class TextFileParser(object): method parse (line 53) | def parse(self, txt_file: str, use_strip: bool = True) -> List: FILE: paddlehub/utils/platform.py function get_platform (line 20) | def get_platform() -> str: function is_windows (line 24) | def is_windows() -> bool: function get_platform_info (line 28) | def get_platform_info() -> dict: FILE: paddlehub/utils/pypi.py function get_installed_packages (line 25) | def get_installed_packages() -> dict: function check (line 31) | def check(package: str, version: str = '') -> bool: function install (line 44) | def install(package: str, version: str = '', upgrade: bool = False, ostr... function install_from_file (line 64) | def install_from_file(file: str, ostream: IO = sys.stdout, estream: IO =... function uninstall (line 76) | def uninstall(package: str, ostream: IO = sys.stdout, estream: IO = sys.... FILE: paddlehub/utils/utils.py class Version (line 41) | class Version(packaging.version.Version): method match (line 44) | def match(self, condition: str) -> bool: method __lt__ (line 81) | def __lt__(self, other): method __le__ (line 86) | def __le__(self, other): method __gt__ (line 91) | def __gt__(self, other): method __ge__ (line 96) | def __ge__(self, other): method __eq__ (line 101) | def __eq__(self, other): class Timer (line 107) | class Timer(object): method __init__ (line 110) | def __init__(self, total_step: int): method start (line 116) | def start(self): method stop (line 120) | def stop(self): method count (line 124) | def count(self) -> int: method timing (line 130) | def timing(self) -> float: method is_running (line 138) | def is_running(self) -> bool: method eta (line 142) | def eta(self) -> str: function seconds_to_hms (line 150) | def seconds_to_hms(seconds: int) -> str: function cv2_to_base64 (line 159) | def cv2_to_base64(image: np.ndarray) -> str: function base64_to_cv2 (line 164) | def base64_to_cv2(b64str: str) -> np.ndarray: function generate_tempfile (line 173) | def generate_tempfile(directory: str = None, **kwargs): function generate_tempdir (line 181) | def generate_tempdir(directory: str = None, **kwargs): function download (line 188) | def download(url: str, path: str = None) -> str: function download_with_progress (line 204) | def download_with_progress(url: str, path: str = None) -> Generator[str,... function load_py_module (line 234) | def load_py_module(python_path: str, py_module_name: str) -> types.Modul... function get_platform_default_encoding (line 256) | def get_platform_default_encoding() -> str: function sys_stdin_encoding (line 263) | def sys_stdin_encoding() -> str: function sys_stdout_encoding (line 274) | def sys_stdout_encoding() -> str: function md5 (line 285) | def md5(text: str): function record (line 291) | def record(msg: str) -> str: function record_exception (line 303) | def record_exception(msg: str) -> str: function get_record_file (line 310) | def get_record_file() -> str: function is_port_occupied (line 314) | def is_port_occupied(ip: str, port: int) -> bool: function mkdir (line 327) | def mkdir(path: str): function reseg_token_label (line 333) | def reseg_token_label(tokenizer, tokens: List[str], labels: List[str] = ... function pad_sequence (line 371) | def pad_sequence(ids: List[int], max_seq_len: int, pad_token_id: int): function trunc_sequence (line 381) | def trunc_sequence(ids: List[int], max_seq_len: int): function extract_melspectrogram (line 391) | def extract_melspectrogram(y, function convert_version (line 429) | def convert_version(version: str) -> List: FILE: paddlehub/utils/xarfile.py class XarInfo (line 24) | class XarInfo(object): method __init__ (line 27) | def __init__(self, _xarinfo, arctype='tar'): method name (line 32) | def name(self) -> str: method size (line 38) | def size(self) -> int: class XarFile (line 44) | class XarFile(object): method __init__ (line 63) | def __init__(self, name: str, mode: str, arctype: str = 'tar', **kwargs): method __del__ (line 100) | def __del__(self): method __enter__ (line 103) | def __enter__(self): method __exit__ (line 106) | def __exit__(self, exit_exception, exit_value, exit_traceback): method add (line 113) | def add(self, name: str, arcname: str = None, recursive: bool = True, ... method extract (line 136) | def extract(self, name: str, path: str): method extractall (line 140) | def extractall(self, path: str): method getnames (line 144) | def getnames(self) -> List[str]: method getxarinfo (line 150) | def getxarinfo(self, name: str) -> List[XarInfo]: function open (line 157) | def open(name: str, mode: str = 'w', **kwargs) -> XarFile: function archive (line 165) | def archive(filename: str, recursive: bool = True, exclude: Callable = N... function unarchive (line 192) | def unarchive(name: str, path: str): function unarchive_with_progress (line 210) | def unarchive_with_progress(name: str, path: str) -> Generator[str, int,... function is_xarfile (line 236) | def is_xarfile(file: str) -> bool: FILE: paddlehub/vision/detect_transforms.py class RandomDistort (line 27) | class RandomDistort: method __init__ (line 41) | def __init__(self, lower: float = 0.5, upper: float = 1.5): method random_brightness (line 45) | def random_brightness(self, img: PIL.Image): method random_contrast (line 49) | def random_contrast(self, img: PIL.Image): method random_color (line 53) | def random_color(self, img: PIL.Image): method __call__ (line 57) | def __call__(self, img: np.ndarray, data: dict): class RandomExpand (line 69) | class RandomExpand: method __init__ (line 85) | def __init__(self, max_ratio: float = 4., fill: list = None, keep_rati... method __call__ (line 92) | def __call__(self, img: np.ndarray, data: dict): class RandomCrop (line 128) | class RandomCrop: method __init__ (line 145) | def __init__(self, scales: list = [0.3, 1.0], max_ratio: float = 2.0, ... method __call__ (line 152) | def __call__(self, img: np.ndarray, data: dict): class RandomFlip (line 201) | class RandomFlip: method __init__ (line 212) | def __init__(self, thresh: float = 0.5): method __call__ (line 215) | def __call__(self, img, data): class Compose (line 224) | class Compose: method __init__ (line 236) | def __init__(self, transforms: list): method __call__ (line 244) | def __call__(self, data: dict): class Resize (line 266) | class Resize: method __init__ (line 279) | def __init__(self, target_size: int = 512, interp: str = 'RANDOM'): method __call__ (line 300) | def __call__(self, img, data=None): class Normalize (line 313) | class Normalize: method __init__ (line 326) | def __init__(self, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]): method __call__ (line 335) | def __call__(self, im, data=None): class ShuffleBox (line 347) | class ShuffleBox: method __call__ (line 350) | def __call__(self, img, data): FILE: paddlehub/vision/functional.py function normalize (line 23) | def normalize(im: np.ndarray, mean: float, std: float) -> np.ndarray: function permute (line 38) | def permute(im: np.ndarray) -> np.ndarray: function resize (line 49) | def resize(im: np.ndarray, target_size: Union[List[int], int], interpola... function resize_long (line 70) | def resize_long(im: np.ndarray, long_size: int, interpolation: int = cv2... function horizontal_flip (line 88) | def horizontal_flip(im: np.ndarray) -> np.ndarray: function vertical_flip (line 102) | def vertical_flip(im: np.ndarray) -> np.ndarray: function brightness (line 116) | def brightness(im: np.ndarray, brightness_lower: float, brightness_upper... function contrast (line 130) | def contrast(im: np.ndarray, contrast_lower: float, contrast_upper: floa... function saturation (line 144) | def saturation(im: np.ndarray, saturation_lower: float, saturation_upper... function hue (line 158) | def hue(im: np.ndarray, hue_lower: float, hue_upper: float) -> np.ndarray: function rotate (line 174) | def rotate(im: np.ndarray, rotate_lower: float, rotate_upper: float) -> ... FILE: paddlehub/vision/segmentation_transforms.py class Compose (line 26) | class Compose: method __init__ (line 40) | def __init__(self, transforms: Callable, to_rgb: bool = True): method __call__ (line 49) | def __call__(self, im: Union[np.ndarray, str], label: Union[np.ndarray... class ColorMap (line 76) | class ColorMap: method __init__ (line 79) | def __init__(self, num_classes: int = 256): method __call__ (line 82) | def __call__(self) -> np.ndarray: class SegmentVisual (line 98) | class SegmentVisual: method __init__ (line 104) | def __init__(self, weight: float = 0.6): method __call__ (line 108) | def __call__(self, image: str, result: np.ndarray, save_dir: str) -> n... class Padding (line 129) | class Padding: method __init__ (line 142) | def __init__(self, method __call__ (line 156) | def __call__(self, im: np.ndarray, label: np.ndarray = None) -> Tuple: class Normalize (line 189) | class Normalize: method __init__ (line 199) | def __init__(self, method __call__ (line 210) | def __call__(self, im: np.ndarray, label: np.ndarray = None) -> Tuple: class Resize (line 229) | class Resize: method __init__ (line 254) | def __init__(self, target_size: Union[List[int], Tuple[int]] = (512, 5... method __call__ (line 267) | def __call__(self, im: np.ndarray, label: np.ndarray = None) -> Tuple: FILE: paddlehub/vision/transforms.py class Compose (line 25) | class Compose: method __init__ (line 35) | def __init__(self, transforms: Callable, to_rgb: bool = False, channel... method __call__ (line 45) | def __call__(self, im: Union[np.ndarray, str]): class Permute (line 62) | class Permute: method __init__ (line 67) | def __init__(self): method __call__ (line 70) | def __call__(self, im): class RandomHorizontalFlip (line 75) | class RandomHorizontalFlip: method __init__ (line 83) | def __init__(self, prob: float = 0.5): method __call__ (line 86) | def __call__(self, im: np.ndarray): class RandomVerticalFlip (line 92) | class RandomVerticalFlip: method __init__ (line 100) | def __init__(self, prob: float = 0.5): method __call__ (line 103) | def __call__(self, im: np.ndarray): class Resize (line 109) | class Resize: method __init__ (line 126) | def __init__(self, target_size: Union[List[int], int], interpolation: ... method __call__ (line 140) | def __call__(self, im: np.ndarray): class ResizeByLong (line 149) | class ResizeByLong: method __init__ (line 157) | def __init__(self, long_size: Union[List[int], int]): method __call__ (line 160) | def __call__(self, im): class ResizeRangeScaling (line 165) | class ResizeRangeScaling: method __init__ (line 174) | def __init__(self, min_value: int = 400, max_value: int = 600): method __call__ (line 181) | def __call__(self, im: np.ndarray): class ResizeStepScaling (line 190) | class ResizeStepScaling: method __init__ (line 201) | def __init__(self, min_scale_factor: float = 0.75, max_scale_factor: f... method __call__ (line 209) | def __call__(self, im: np.ndarray): class Normalize (line 228) | class Normalize: method __init__ (line 238) | def __init__(self, mean: list = [0.5, 0.5, 0.5], std: list = [0.5, 0.5... method __call__ (line 248) | def __call__(self, im): class Padding (line 259) | class Padding: method __init__ (line 268) | def __init__(self, target_size: Union[List[int], Tuple[int], int], im_... method __call__ (line 279) | def __call__(self, im: np.ndarray): class RandomPaddingCrop (line 299) | class RandomPaddingCrop: method __init__ (line 308) | def __init__(self, crop_size, im_padding_value=[127.5, 127.5, 127.5]): method __call__ (line 319) | def __call__(self, im): class RandomBlur (line 348) | class RandomBlur: method __init__ (line 356) | def __init__(self, prob: float = 0.1): method __call__ (line 359) | def __call__(self, im: np.ndarray): class RandomRotation (line 378) | class RandomRotation: method __init__ (line 388) | def __init__(self, max_rotation: float = 15, im_padding_value: list = ... method __call__ (line 392) | def __call__(self, im): class RandomDistort (line 419) | class RandomDistort: method __init__ (line 435) | def __init__(self, method __call__ (line 453) | def __call__(self, im: np.ndarray): class RGB2LAB (line 501) | class RGB2LAB: method rgb2xyz (line 506) | def rgb2xyz(self, rgb: np.ndarray) -> np.ndarray: method xyz2lab (line 526) | def xyz2lab(self, xyz: np.ndarray) -> np.ndarray: method rgb2lab (line 546) | def rgb2lab(self, rgb: np.ndarray) -> np.ndarray: method __call__ (line 562) | def __call__(self, img: np.ndarray) -> np.ndarray: class LAB2RGB (line 569) | class LAB2RGB: method __init__ (line 574) | def __init__(self, mode: str = 'RGB2LAB'): method xyz2rgb (line 577) | def xyz2rgb(self, xyz: np.ndarray) -> np.ndarray: method lab2xyz (line 598) | def lab2xyz(self, lab: np.ndarray) -> np.ndarray: method lab2rgb (line 621) | def lab2rgb(self, lab_rs: np.ndarray) -> np.ndarray: method __call__ (line 637) | def __call__(self, img: np.ndarray) -> np.ndarray: class CenterCrop (line 641) | class CenterCrop: method __init__ (line 652) | def __init__(self, crop_size: int): method __call__ (line 655) | def __call__(self, img: np.ndarray): FILE: paddlehub/vision/utils.py function is_image_file (line 26) | def is_image_file(filename: str) -> bool: function get_img_file (line 32) | def get_img_file(dir_name: str) -> List[str]: function box_crop (line 45) | def box_crop(boxes: np.ndarray, labels: np.ndarray, scores: np.ndarray, ... function box_iou_xywh (line 74) | def box_iou_xywh(box1: np.ndarray, box2: np.ndarray) -> float: function draw_boxes_on_image (line 101) | def draw_boxes_on_image(image_path: str, function get_label_infos (line 155) | def get_label_infos(file_list: str) -> str: function subtract_imagenet_mean_batch (line 166) | def subtract_imagenet_mean_batch(batch: paddle.Tensor) -> paddle.Tensor: function gram_matrix (line 176) | def gram_matrix(data: paddle.Tensor) -> paddle.Tensor: function npmax (line 185) | def npmax(array: np.ndarray) -> Tuple[int]: function visualize (line 194) | def visualize(image: Union[np.ndarray, str], result: np.ndarray, weight:... function get_pseudo_color_map (line 224) | def get_pseudo_color_map(pred: np.ndarray) -> PIL.Image.Image: function get_color_map_list (line 232) | def get_color_map_list(num_classes: int) -> List[int]: function get_reverse_list (line 259) | def get_reverse_list(ori_shape: List[int], transforms: List[Callable]) -... function reverse_transform (line 284) | def reverse_transform(pred: paddle.Tensor, ori_shape: List[int], transfo... class ConfusionMatrix (line 299) | class ConfusionMatrix(object): method __init__ (line 309) | def __init__(self, num_classes: int, streaming: bool = False): method calculate (line 314) | def calculate(self, pred, label, ignore=None): method zero_matrix (line 329) | def zero_matrix(self): method mean_iou (line 333) | def mean_iou(self) -> float: method accuracy (line 362) | def accuracy(self) -> float: method kappa (line 388) | def kappa(self) -> float: FILE: tests/test_module.py class TestHubModule (line 7) | class TestHubModule(unittest.TestCase): method test_lac (line 8) | def test_lac(self): method test_senta (line 20) | def test_senta(self): method test_simnet (line 34) | def test_simnet(self): method test_ssd (line 48) | def test_ssd(self):