SYMBOL INDEX (6571 symbols across 680 files) FILE: annotator/anime_face_segment/__init__.py class UNet (line 29) | class UNet(nn.Module): method __init__ (line 30) | def __init__(self): method forward (line 102) | def forward(self, x): class AnimeFaceSegment (line 129) | class AnimeFaceSegment: method __init__ (line 133) | def __init__(self): method load_model (line 137) | def load_model(self): method unload_model (line 153) | def unload_model(self): method __call__ (line 157) | def __call__(self, input_image): FILE: annotator/binary/__init__.py function apply_binary (line 4) | def apply_binary(img, bin_threshold): FILE: annotator/canny/__init__.py function apply_canny (line 4) | def apply_canny(img, low_threshold, high_threshold): FILE: annotator/clipvision/__init__.py class ClipVisionDetector (line 94) | class ClipVisionDetector: method __init__ (line 95) | def __init__(self, config, low_vram: bool): method unload_model (line 127) | def unload_model(self): method __call__ (line 131) | def __call__(self, input_image: np.ndarray): FILE: annotator/color/__init__.py function cv2_resize_shortest_edge (line 3) | def cv2_resize_shortest_edge(image, size): function apply_color (line 14) | def apply_color(img, res=512): FILE: annotator/densepose/__init__.py function apply_densepose (line 22) | def apply_densepose(input_image, cmap="viridis"): function unload_model (line 54) | def unload_model(): FILE: annotator/densepose/densepose.py class BoxMode (line 17) | class BoxMode(IntEnum): method convert (line 48) | def convert(box: _RawBoxType, from_mode: "BoxMode", to_mode: "BoxMode"... class MatrixVisualizer (line 133) | class MatrixVisualizer: method __init__ (line 138) | def __init__( method visualize (line 154) | def visualize(self, image_bgr, mask, matrix, bbox_xywh): method _resize (line 181) | def _resize(self, mask, matrix, w, h): method _check_image (line 188) | def _check_image(self, image_rgb): method _check_mask_matrix (line 193) | def _check_mask_matrix(self, mask, matrix): class DensePoseResultsVisualizer (line 198) | class DensePoseResultsVisualizer: method visualize (line 199) | def visualize( method create_visualization_context (line 214) | def create_visualization_context(self, image_bgr: Image): method visualize_iuv_arr (line 217) | def visualize_iuv_arr(self, context, iuv_arr: np.ndarray, bbox_xywh) -... method context_to_image_bgr (line 220) | def context_to_image_bgr(self, context): method get_image_bgr_from_context (line 223) | def get_image_bgr_from_context(self, context): class DensePoseMaskedColormapResultsVisualizer (line 226) | class DensePoseMaskedColormapResultsVisualizer(DensePoseResultsVisualizer): method __init__ (line 227) | def __init__( method context_to_image_bgr (line 243) | def context_to_image_bgr(self, context): method visualize_iuv_arr (line 246) | def visualize_iuv_arr(self, context, iuv_arr: np.ndarray, bbox_xywh) -... function _extract_i_from_iuvarr (line 255) | def _extract_i_from_iuvarr(iuv_arr): function _extract_u_from_iuvarr (line 259) | def _extract_u_from_iuvarr(iuv_arr): function _extract_v_from_iuvarr (line 263) | def _extract_v_from_iuvarr(iuv_arr): function make_int_box (line 266) | def make_int_box(box: torch.Tensor) -> IntTupleBox: function densepose_chart_predictor_output_to_result_with_confidences (line 271) | def densepose_chart_predictor_output_to_result_with_confidences( function resample_fine_and_coarse_segm_tensors_to_bbox (line 287) | def resample_fine_and_coarse_segm_tensors_to_bbox( function resample_uv_tensors_to_bbox (line 319) | def resample_uv_tensors_to_bbox( FILE: annotator/depth_anything.py class DepthAnythingDetector (line 31) | class DepthAnythingDetector: method __init__ (line 36) | def __init__(self, device: torch.device): method __call__ (line 57) | def __call__(self, image: np.ndarray, colored: bool = True) -> np.ndar... method unload_model (line 78) | def unload_model(self): FILE: annotator/depth_anything_v2.py class DepthAnythingV2Detector (line 30) | class DepthAnythingV2Detector: method __init__ (line 35) | def __init__(self, device: torch.device): method __call__ (line 55) | def __call__(self, image: np.ndarray, colored: bool = True) -> np.ndar... method unload_model (line 77) | def unload_model(self): FILE: annotator/hed/__init__.py class DoubleConvBlock (line 20) | class DoubleConvBlock(torch.nn.Module): method __init__ (line 21) | def __init__(self, input_channel, output_channel, layer_number): method __call__ (line 29) | def __call__(self, x, down_sampling=False): class ControlNetHED_Apache2 (line 39) | class ControlNetHED_Apache2(torch.nn.Module): method __init__ (line 40) | def __init__(self): method __call__ (line 49) | def __call__(self, x): function apply_hed (line 65) | def apply_hed(input_image, is_safe=False): function unload_hed_model (line 95) | def unload_hed_model(): FILE: annotator/keypose/__init__.py function preprocessing (line 15) | def preprocessing(image, device): function imshow_keypoints (line 38) | def imshow_keypoints(img, function find_download_model (line 143) | def find_download_model(checkpoint, remote_path): function apply_keypose (line 155) | def apply_keypose(input_image): function unload_hed_model (line 209) | def unload_hed_model(): FILE: annotator/lama/__init__.py class LamaInpainting (line 15) | class LamaInpainting: method __init__ (line 18) | def __init__(self): method load_model (line 22) | def load_model(self): method unload_model (line 37) | def unload_model(self): method __call__ (line 41) | def __call__(self, input_image): FILE: annotator/lama/saicinpainting/training/data/masks.py class DrawMethod (line 16) | class DrawMethod(Enum): function make_random_irregular_mask (line 22) | def make_random_irregular_mask(shape, max_angle=4, max_len=60, max_width... class RandomIrregularMaskGenerator (line 51) | class RandomIrregularMaskGenerator: method __init__ (line 52) | def __init__(self, max_angle=4, max_len=60, max_width=20, min_times=0,... method __call__ (line 62) | def __call__(self, img, iter_i=None, raw_image=None): function make_random_rectangle_mask (line 72) | def make_random_rectangle_mask(shape, margin=10, bbox_min_size=30, bbox_... class RandomRectangleMaskGenerator (line 86) | class RandomRectangleMaskGenerator: method __init__ (line 87) | def __init__(self, margin=10, bbox_min_size=30, bbox_max_size=100, min... method __call__ (line 95) | def __call__(self, img, iter_i=None, raw_image=None): class RandomSegmentationMaskGenerator (line 104) | class RandomSegmentationMaskGenerator: method __init__ (line 105) | def __init__(self, **kwargs): method __call__ (line 109) | def __call__(self, img, iter_i=None, raw_image=None): function make_random_superres_mask (line 118) | def make_random_superres_mask(shape, min_step=2, max_step=4, min_width=1... class RandomSuperresMaskGenerator (line 136) | class RandomSuperresMaskGenerator: method __init__ (line 137) | def __init__(self, **kwargs): method __call__ (line 140) | def __call__(self, img, iter_i=None): class DumbAreaMaskGenerator (line 144) | class DumbAreaMaskGenerator: method __init__ (line 149) | def __init__(self, is_training): method _random_vector (line 154) | def _random_vector(self, dimension): method __call__ (line 167) | def __call__(self, img, iter_i=None, raw_image=None): class OutpaintingMaskGenerator (line 176) | class OutpaintingMaskGenerator: method __init__ (line 177) | def __init__(self, min_padding_percent:float=0.04, max_padding_percent... method apply_padding (line 195) | def apply_padding(self, mask, coord): method get_padding (line 200) | def get_padding(self, size): method _img2rs (line 206) | def _img2rs(img): method __call__ (line 212) | def __call__(self, img, iter_i=None, raw_image=None): class MixedMaskGenerator (line 252) | class MixedMaskGenerator: method __init__ (line 253) | def __init__(self, irregular_proba=1/3, irregular_kwargs=None, method __call__ (line 309) | def __call__(self, img, iter_i=None, raw_image=None): function get_mask_generator (line 318) | def get_mask_generator(kind, kwargs): FILE: annotator/lama/saicinpainting/training/losses/adversarial.py class BaseAdversarialLoss (line 8) | class BaseAdversarialLoss: method pre_generator_step (line 9) | def pre_generator_step(self, real_batch: torch.Tensor, fake_batch: tor... method pre_discriminator_step (line 20) | def pre_discriminator_step(self, real_batch: torch.Tensor, fake_batch:... method generator_loss (line 31) | def generator_loss(self, real_batch: torch.Tensor, fake_batch: torch.T... method discriminator_loss (line 46) | def discriminator_loss(self, real_batch: torch.Tensor, fake_batch: tor... method interpolate_mask (line 61) | def interpolate_mask(self, mask, shape): function make_r1_gp (line 71) | def make_r1_gp(discr_real_pred, real_batch): class NonSaturatingWithR1 (line 81) | class NonSaturatingWithR1(BaseAdversarialLoss): method __init__ (line 82) | def __init__(self, gp_coef=5, weight=1, mask_as_fake_target=False, all... method generator_loss (line 101) | def generator_loss(self, real_batch: torch.Tensor, fake_batch: torch.T... method pre_discriminator_step (line 117) | def pre_discriminator_step(self, real_batch: torch.Tensor, fake_batch:... method discriminator_loss (line 121) | def discriminator_loss(self, real_batch: torch.Tensor, fake_batch: tor... class BCELoss (line 145) | class BCELoss(BaseAdversarialLoss): method __init__ (line 146) | def __init__(self, weight): method generator_loss (line 150) | def generator_loss(self, discr_fake_pred: torch.Tensor) -> Tuple[torch... method pre_discriminator_step (line 155) | def pre_discriminator_step(self, real_batch: torch.Tensor, fake_batch:... method discriminator_loss (line 159) | def discriminator_loss(self, function make_discrim_loss (line 172) | def make_discrim_loss(kind, **kwargs): FILE: annotator/lama/saicinpainting/training/losses/distance_weighting.py function dummy_distance_weighter (line 9) | def dummy_distance_weighter(real_img, pred_img, mask): function get_gauss_kernel (line 13) | def get_gauss_kernel(kernel_size, width_factor=1): class BlurMask (line 22) | class BlurMask(nn.Module): method __init__ (line 23) | def __init__(self, kernel_size=5, width_factor=1): method forward (line 28) | def forward(self, real_img, pred_img, mask): class EmulatedEDTMask (line 34) | class EmulatedEDTMask(nn.Module): method __init__ (line 35) | def __init__(self, dilate_kernel_size=5, blur_kernel_size=5, width_fac... method forward (line 43) | def forward(self, real_img, pred_img, mask): class PropagatePerceptualSim (line 51) | class PropagatePerceptualSim(nn.Module): method __init__ (line 52) | def __init__(self, level=2, max_iters=10, temperature=500, erode_mask_... method forward (line 82) | def forward(self, real_img, pred_img, mask): function make_mask_distance_weighter (line 117) | def make_mask_distance_weighter(kind='none', **kwargs): FILE: annotator/lama/saicinpainting/training/losses/feature_matching.py function masked_l2_loss (line 7) | def masked_l2_loss(pred, target, mask, weight_known, weight_missing): function masked_l1_loss (line 13) | def masked_l1_loss(pred, target, mask, weight_known, weight_missing): function feature_matching_loss (line 19) | def feature_matching_loss(fake_features: List[torch.Tensor], target_feat... FILE: annotator/lama/saicinpainting/training/losses/perceptual.py class PerceptualLoss (line 14) | class PerceptualLoss(nn.Module): method __init__ (line 15) | def __init__(self, normalize_inputs=True): method do_normalize_inputs (line 38) | def do_normalize_inputs(self, x): method partial_losses (line 41) | def partial_losses(self, input, target, mask=None): method forward (line 72) | def forward(self, input, target, mask=None): method get_global_features (line 76) | def get_global_features(self, input): class ResNetPL (line 88) | class ResNetPL(nn.Module): method __init__ (line 89) | def __init__(self, weight=1, method forward (line 103) | def forward(self, pred, target): FILE: annotator/lama/saicinpainting/training/losses/segmentation.py class CrossEntropy2d (line 10) | class CrossEntropy2d(nn.Module): method __init__ (line 11) | def __init__(self, reduction="mean", ignore_label=255, weights=None, *... method forward (line 24) | def forward(self, predict, target): FILE: annotator/lama/saicinpainting/training/losses/style_loss.py class PerceptualLoss (line 6) | class PerceptualLoss(nn.Module): method __init__ (line 13) | def __init__(self, weights=[1.0, 1.0, 1.0, 1.0, 1.0]): method __call__ (line 19) | def __call__(self, x, y): class VGG19 (line 34) | class VGG19(torch.nn.Module): method __init__ (line 35) | def __init__(self): method forward (line 111) | def forward(self, x): FILE: annotator/lama/saicinpainting/training/modules/__init__.py function make_generator (line 7) | def make_generator(config, kind, **kwargs): function make_discriminator (line 22) | def make_discriminator(kind, **kwargs): FILE: annotator/lama/saicinpainting/training/modules/base.py class BaseDiscriminator (line 11) | class BaseDiscriminator(nn.Module): method forward (line 13) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, List[torch.T... function get_conv_block_ctor (line 21) | def get_conv_block_ctor(kind='default'): function get_norm_layer (line 33) | def get_norm_layer(kind='bn'): function get_activation (line 43) | def get_activation(kind='tanh'): class SimpleMultiStepGenerator (line 53) | class SimpleMultiStepGenerator(nn.Module): method __init__ (line 54) | def __init__(self, steps: List[nn.Module]): method forward (line 58) | def forward(self, x): function deconv_factory (line 67) | def deconv_factory(kind, ngf, mult, norm_layer, activation, max_features): FILE: annotator/lama/saicinpainting/training/modules/depthwise_sep_conv.py class DepthWiseSeperableConv (line 4) | class DepthWiseSeperableConv(nn.Module): method __init__ (line 5) | def __init__(self, in_dim, out_dim, *args, **kwargs): method forward (line 14) | def forward(self, x): FILE: annotator/lama/saicinpainting/training/modules/fake_fakes.py class FakeFakesGenerator (line 6) | class FakeFakesGenerator: method __init__ (line 7) | def __init__(self, aug_proba=0.5, img_aug_degree=30, img_aug_translate... method __call__ (line 20) | def __call__(self, input_images, masks): method _make_blend_target (line 26) | def _make_blend_target(self, input_images): method _fill_masks_with_gradient (line 34) | def _fill_masks_with_gradient(self, masks): FILE: annotator/lama/saicinpainting/training/modules/ffc.py class FFCSE_block (line 16) | class FFCSE_block(nn.Module): method __init__ (line 18) | def __init__(self, channels, ratio_g): method forward (line 34) | def forward(self, x): class FourierUnit (line 49) | class FourierUnit(nn.Module): method __init__ (line 51) | def __init__(self, in_channels, out_channels, groups=1, spatial_scale_... method forward (line 76) | def forward(self, x): class SeparableFourierUnit (line 116) | class SeparableFourierUnit(nn.Module): method __init__ (line 118) | def __init__(self, in_channels, out_channels, groups=1, kernel_size=3): method process_branch (line 140) | def process_branch(self, x, conv, bn): method forward (line 160) | def forward(self, x): class SpectralTransform (line 167) | class SpectralTransform(nn.Module): method __init__ (line 169) | def __init__(self, in_channels, out_channels, stride=1, groups=1, enab... method forward (line 194) | def forward(self, x): class FFC (line 218) | class FFC(nn.Module): method __init__ (line 220) | def __init__(self, in_channels, out_channels, kernel_size, method forward (line 257) | def forward(self, x): class FFC_BN_ACT (line 280) | class FFC_BN_ACT(nn.Module): method __init__ (line 282) | def __init__(self, in_channels, out_channels, method forward (line 303) | def forward(self, x): class FFCResnetBlock (line 310) | class FFCResnetBlock(nn.Module): method __init__ (line 311) | def __init__(self, dim, padding_type, norm_layer, activation_layer=nn.... method forward (line 329) | def forward(self, x): class ConcatTupleLayer (line 347) | class ConcatTupleLayer(nn.Module): method forward (line 348) | def forward(self, x): class FFCResNetGenerator (line 357) | class FFCResNetGenerator(nn.Module): method __init__ (line 358) | def __init__(self, input_nc, output_nc, ngf=64, n_downsampling=3, n_bl... method forward (line 418) | def forward(self, input): class FFCNLayerDiscriminator (line 422) | class FFCNLayerDiscriminator(BaseDiscriminator): method __init__ (line 423) | def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNo... method get_all_activations (line 468) | def get_all_activations(self, x): method forward (line 475) | def forward(self, x): FILE: annotator/lama/saicinpainting/training/modules/multidilated_conv.py class MultidilatedConv (line 6) | class MultidilatedConv(nn.Module): method __init__ (line 7) | def __init__(self, in_dim, out_dim, kernel_size, dilation_num=3, comb_... method forward (line 73) | def forward(self, x): FILE: annotator/lama/saicinpainting/training/modules/multiscale.py class ResNetHead (line 11) | class ResNetHead(nn.Module): method __init__ (line 12) | def __init__(self, input_nc, ngf=64, n_downsampling=3, n_blocks=9, nor... method forward (line 40) | def forward(self, input): class ResNetTail (line 44) | class ResNetTail(nn.Module): method __init__ (line 45) | def __init__(self, output_nc, ngf=64, n_downsampling=3, n_blocks=9, no... method forward (line 86) | def forward(self, input, return_last_act=False): class MultiscaleResNet (line 95) | class MultiscaleResNet(nn.Module): method __init__ (line 96) | def __init__(self, input_nc, output_nc, ngf=64, n_downsampling=2, n_bl... method num_scales (line 120) | def num_scales(self): method forward (line 123) | def forward(self, ms_inputs: List[torch.Tensor], smallest_scales_num: ... class MultiscaleDiscriminatorSimple (line 173) | class MultiscaleDiscriminatorSimple(nn.Module): method __init__ (line 174) | def __init__(self, ms_impl): method num_scales (line 179) | def num_scales(self): method forward (line 182) | def forward(self, ms_inputs: List[torch.Tensor], smallest_scales_num: ... class SingleToMultiScaleInputMixin (line 199) | class SingleToMultiScaleInputMixin: method forward (line 200) | def forward(self, x: torch.Tensor) -> List: class GeneratorMultiToSingleOutputMixin (line 208) | class GeneratorMultiToSingleOutputMixin: method forward (line 209) | def forward(self, x): class DiscriminatorMultiToSingleOutputMixin (line 213) | class DiscriminatorMultiToSingleOutputMixin: method forward (line 214) | def forward(self, x): class DiscriminatorMultiToSingleOutputStackedMixin (line 219) | class DiscriminatorMultiToSingleOutputStackedMixin: method __init__ (line 220) | def __init__(self, *args, return_feats_only_levels=None, **kwargs): method forward (line 224) | def forward(self, x): class MultiscaleDiscrSingleInput (line 239) | class MultiscaleDiscrSingleInput(SingleToMultiScaleInputMixin, Discrimin... class MultiscaleResNetSingle (line 243) | class MultiscaleResNetSingle(GeneratorMultiToSingleOutputMixin, SingleTo... FILE: annotator/lama/saicinpainting/training/modules/pix2pixhd.py class DotDict (line 15) | class DotDict(defaultdict): class Identity (line 22) | class Identity(nn.Module): method __init__ (line 23) | def __init__(self): method forward (line 26) | def forward(self, x): class ResnetBlock (line 30) | class ResnetBlock(nn.Module): method __init__ (line 31) | def __init__(self, dim, padding_type, norm_layer, activation=nn.ReLU(T... method build_conv_block (line 47) | def build_conv_block(self, dim, padding_type, norm_layer, activation, ... method forward (line 85) | def forward(self, x): class ResnetBlock5x5 (line 92) | class ResnetBlock5x5(nn.Module): method __init__ (line 93) | def __init__(self, dim, padding_type, norm_layer, activation=nn.ReLU(T... method build_conv_block (line 109) | def build_conv_block(self, dim, padding_type, norm_layer, activation, ... method forward (line 147) | def forward(self, x): class MultidilatedResnetBlock (line 155) | class MultidilatedResnetBlock(nn.Module): method __init__ (line 156) | def __init__(self, dim, padding_type, conv_layer, norm_layer, activati... method build_conv_block (line 160) | def build_conv_block(self, dim, padding_type, conv_layer, norm_layer, ... method forward (line 173) | def forward(self, x): class MultiDilatedGlobalGenerator (line 178) | class MultiDilatedGlobalGenerator(nn.Module): method __init__ (line 179) | def __init__(self, input_nc, output_nc, ngf=64, n_downsampling=3, method forward (line 236) | def forward(self, input): class ConfigGlobalGenerator (line 239) | class ConfigGlobalGenerator(nn.Module): method __init__ (line 240) | def __init__(self, input_nc, output_nc, ngf=64, n_downsampling=3, method forward (line 325) | def forward(self, input): function make_dil_blocks (line 329) | def make_dil_blocks(dilated_blocks_n, dilation_block_kind, dilated_block... class GlobalGenerator (line 341) | class GlobalGenerator(nn.Module): method __init__ (line 342) | def __init__(self, input_nc, output_nc, ngf=64, n_downsampling=3, n_bl... method forward (line 435) | def forward(self, input): class GlobalGeneratorGated (line 439) | class GlobalGeneratorGated(GlobalGenerator): method __init__ (line 440) | def __init__(self, *args, **kwargs): class GlobalGeneratorFromSuperChannels (line 450) | class GlobalGeneratorFromSuperChannels(nn.Module): method __init__ (line 451) | def __init__(self, input_nc, output_nc, n_downsampling, n_blocks, supe... method convert_super_channels (line 517) | def convert_super_channels(self, super_channels): method forward (line 560) | def forward(self, input): class NLayerDiscriminator (line 565) | class NLayerDiscriminator(BaseDiscriminator): method __init__ (line 566) | def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNo... method get_all_activations (line 604) | def get_all_activations(self, x): method forward (line 611) | def forward(self, x): class MultidilatedNLayerDiscriminator (line 616) | class MultidilatedNLayerDiscriminator(BaseDiscriminator): method __init__ (line 617) | def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNo... method get_all_activations (line 655) | def get_all_activations(self, x): method forward (line 662) | def forward(self, x): class NLayerDiscriminatorAsGen (line 667) | class NLayerDiscriminatorAsGen(NLayerDiscriminator): method forward (line 668) | def forward(self, x): FILE: annotator/lama/saicinpainting/training/modules/spatial_transform.py class LearnableSpatialTransformWrapper (line 7) | class LearnableSpatialTransformWrapper(nn.Module): method __init__ (line 8) | def __init__(self, impl, pad_coef=0.5, angle_init_range=80, train_angl... method forward (line 16) | def forward(self, x): method transform (line 26) | def transform(self, x): method inverse_transform (line 33) | def inverse_transform(self, y_padded_rotated, orig_x): FILE: annotator/lama/saicinpainting/training/modules/squeeze_excitation.py class SELayer (line 4) | class SELayer(nn.Module): method __init__ (line 5) | def __init__(self, channel, reduction=16): method forward (line 15) | def forward(self, x): FILE: annotator/lama/saicinpainting/training/trainers/__init__.py function get_training_model_class (line 6) | def get_training_model_class(kind): function make_training_model (line 13) | def make_training_model(config): function load_checkpoint (line 25) | def load_checkpoint(train_config, path, map_location='cuda', strict=True): FILE: annotator/lama/saicinpainting/training/trainers/base.py function make_optimizer (line 24) | def make_optimizer(parameters, kind='adamw', **kwargs): function update_running_average (line 34) | def update_running_average(result: nn.Module, new_iterate_model: nn.Modu... function make_multiscale_noise (line 43) | def make_multiscale_noise(base_tensor, scales=6, scale_mode='bilinear'): class BaseInpaintingTrainingModule (line 57) | class BaseInpaintingTrainingModule(ptl.LightningModule): method __init__ (line 58) | def __init__(self, config, use_ddp, *args, predict_only=False, visual... method configure_optimizers (line 119) | def configure_optimizers(self): method train_dataloader (line 126) | def train_dataloader(self): method val_dataloader (line 135) | def val_dataloader(self): method training_step (line 149) | def training_step(self, batch, batch_idx, optimizer_idx=None): method validation_step (line 153) | def validation_step(self, batch, batch_idx, dataloader_idx): method training_step_end (line 165) | def training_step_end(self, batch_parts_outputs): method validation_epoch_end (line 182) | def validation_epoch_end(self, outputs): method _do_step (line 226) | def _do_step(self, batch, batch_idx, mode='train', optimizer_idx=None,... method get_current_generator (line 269) | def get_current_generator(self, no_average=False): method forward (line 274) | def forward(self, batch: Dict[str, torch.Tensor]) -> Dict[str, torch.T... method generator_loss (line 278) | def generator_loss(self, batch) -> Tuple[torch.Tensor, Dict[str, torch... method discriminator_loss (line 281) | def discriminator_loss(self, batch) -> Tuple[torch.Tensor, Dict[str, t... method store_discr_outputs (line 284) | def store_discr_outputs(self, batch): method get_ddp_rank (line 292) | def get_ddp_rank(self): FILE: annotator/lama/saicinpainting/training/trainers/default.py function make_constant_area_crop_batch (line 17) | def make_constant_area_crop_batch(batch, **kwargs): class DefaultInpaintingTrainingModule (line 26) | class DefaultInpaintingTrainingModule(BaseInpaintingTrainingModule): method __init__ (line 27) | def __init__(self, *args, concat_mask=True, rescale_scheduler_kwargs=N... method forward (line 47) | def forward(self, batch): method generator_loss (line 88) | def generator_loss(self, batch): method discriminator_loss (line 140) | def discriminator_loss(self, batch): FILE: annotator/lama/saicinpainting/training/visualizers/__init__.py function make_visualizer (line 7) | def make_visualizer(kind, **kwargs): FILE: annotator/lama/saicinpainting/training/visualizers/base.py class BaseVisualizer (line 14) | class BaseVisualizer: method __call__ (line 16) | def __call__(self, epoch_i, batch_i, batch, suffix='', rank=None): function visualize_mask_and_images (line 23) | def visualize_mask_and_images(images_dict: Dict[str, np.ndarray], keys: ... function visualize_mask_and_images_batch (line 61) | def visualize_mask_and_images_batch(batch: Dict[str, torch.Tensor], keys... FILE: annotator/lama/saicinpainting/training/visualizers/colors.py function generate_colors (line 11) | def generate_colors(nlabels, type='bright', first_color_black=False, las... FILE: annotator/lama/saicinpainting/training/visualizers/directory.py class DirectoryVisualizer (line 10) | class DirectoryVisualizer(BaseVisualizer): method __init__ (line 13) | def __init__(self, outdir, key_order=DEFAULT_KEY_ORDER, max_items_in_b... method __call__ (line 22) | def __call__(self, epoch_i, batch_i, batch, suffix='', rank=None): FILE: annotator/lama/saicinpainting/training/visualizers/noop.py class NoopVisualizer (line 4) | class NoopVisualizer(BaseVisualizer): method __init__ (line 5) | def __init__(self, *args, **kwargs): method __call__ (line 8) | def __call__(self, epoch_i, batch_i, batch, suffix='', rank=None): FILE: annotator/lama/saicinpainting/utils.py function check_and_warn_input_range (line 17) | def check_and_warn_input_range(tensor, min_value, max_value, name): function sum_dict_with_prefix (line 24) | def sum_dict_with_prefix(target, cur_dict, prefix, default=0): function average_dicts (line 30) | def average_dicts(dict_list): function add_prefix_to_keys (line 41) | def add_prefix_to_keys(dct, prefix): function set_requires_grad (line 45) | def set_requires_grad(module, value): function flatten_dict (line 50) | def flatten_dict(dct): class LinearRamp (line 63) | class LinearRamp: method __init__ (line 64) | def __init__(self, start_value=0, end_value=1, start_iter=-1, end_iter... method __call__ (line 70) | def __call__(self, i): class LadderRamp (line 79) | class LadderRamp: method __init__ (line 80) | def __init__(self, start_iters, values): method __call__ (line 85) | def __call__(self, i): function get_ramp (line 90) | def get_ramp(kind='ladder', **kwargs): function print_traceback_handler (line 98) | def print_traceback_handler(sig, frame): function register_debug_signal_handlers (line 104) | def register_debug_signal_handlers(sig=None, handler=print_traceback_han... function handle_deterministic_config (line 109) | def handle_deterministic_config(config): function get_shape (line 118) | def get_shape(t): function get_has_ddp_rank (line 131) | def get_has_ddp_rank(): function handle_ddp_subprocess (line 140) | def handle_ddp_subprocess(): function handle_ddp_parent_process (line 165) | def handle_ddp_parent_process(): FILE: annotator/leres/__init__.py function unload_leres_model (line 27) | def unload_leres_model(): function apply_leres (line 35) | def apply_leres(input_image, thr_a, thr_b, boost=False): FILE: annotator/leres/leres/Resnet.py function conv3x3 (line 17) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 23) | class BasicBlock(nn.Module): method __init__ (line 26) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 36) | def forward(self, x): class Bottleneck (line 55) | class Bottleneck(nn.Module): method __init__ (line 58) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 71) | def forward(self, x): class ResNet (line 94) | class ResNet(nn.Module): method __init__ (line 96) | def __init__(self, block, layers, num_classes=1000): method _make_layer (line 118) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 135) | def forward(self, x): function resnet18 (line 155) | def resnet18(pretrained=True, **kwargs): function resnet34 (line 164) | def resnet34(pretrained=True, **kwargs): function resnet50 (line 173) | def resnet50(pretrained=True, **kwargs): function resnet101 (line 183) | def resnet101(pretrained=True, **kwargs): function resnet152 (line 193) | def resnet152(pretrained=True, **kwargs): FILE: annotator/leres/leres/Resnext_torch.py function conv3x3 (line 19) | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): function conv1x1 (line 25) | def conv1x1(in_planes, out_planes, stride=1): class BasicBlock (line 30) | class BasicBlock(nn.Module): method __init__ (line 33) | def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1, method forward (line 51) | def forward(self, x): class Bottleneck (line 70) | class Bottleneck(nn.Module): method __init__ (line 79) | def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1, method forward (line 96) | def forward(self, x): class ResNet (line 119) | class ResNet(nn.Module): method __init__ (line 121) | def __init__(self, block, layers, num_classes=1000, zero_init_residual... method _make_layer (line 172) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method _forward_impl (line 196) | def _forward_impl(self, x): method forward (line 222) | def forward(self, x): function resnext101_32x8d (line 227) | def resnext101_32x8d(pretrained=True, **kwargs): FILE: annotator/leres/leres/depthmap.py function scale_torch (line 17) | def scale_torch(img): function estimateleres (line 34) | def estimateleres(img, model, w, h): function generatemask (line 50) | def generatemask(size): function resizewithpool (line 61) | def resizewithpool(img, size): function rgb2gray (line 68) | def rgb2gray(rgb): function calculateprocessingres (line 72) | def calculateprocessingres(img, basesize, confidence=0.1, scale_threshol... function doubleestimate (line 130) | def doubleestimate(img, size1, size2, pix2pixsize, model, net_type, pix2... function singleestimate (line 154) | def singleestimate(img, msize, model, net_type): function applyGridpatch (line 160) | def applyGridpatch(blsize, stride, img, box): function generatepatchs (line 176) | def generatepatchs(img, base_size): function getGF_fromintegral (line 208) | def getGF_fromintegral(integralimage, rect): function adaptiveselection (line 218) | def adaptiveselection(integral_grad, patch_bound_list, gf): function impatch (line 268) | def impatch(image, rect): class ImageandPatchs (line 277) | class ImageandPatchs: method __init__ (line 278) | def __init__(self, root_dir, name, patchsinfo, rgb_image, scale=1): method __len__ (line 292) | def __len__(self): method set_base_estimate (line 295) | def set_base_estimate(self, est): method set_updated_estimate (line 300) | def set_updated_estimate(self, est): method __getitem__ (line 305) | def __getitem__(self, index): method print_options (line 325) | def print_options(self, opt): method parse (line 352) | def parse(self): function estimateboost (line 378) | def estimateboost(img, model, model_type, pix2pixmodel, max_res=512): FILE: annotator/leres/leres/multi_depth_model_woauxi.py class RelDepthModel (line 7) | class RelDepthModel(nn.Module): method __init__ (line 8) | def __init__(self, backbone='resnet50'): method inference (line 16) | def inference(self, rgb): class DepthModel (line 24) | class DepthModel(nn.Module): method __init__ (line 25) | def __init__(self, encoder): method forward (line 31) | def forward(self, x): FILE: annotator/leres/leres/net_tools.py function get_func (line 7) | def get_func(func_name): function load_ckpt (line 27) | def load_ckpt(args, depth_model, shift_model, focal_model): function strip_prefix_if_present (line 47) | def strip_prefix_if_present(state_dict, prefix): FILE: annotator/leres/leres/network_auxi.py function resnet50_stride32 (line 8) | def resnet50_stride32(): function resnext101_stride32x8d (line 11) | def resnext101_stride32x8d(): class Decoder (line 15) | class Decoder(nn.Module): method __init__ (line 16) | def __init__(self): method _init_params (line 34) | def _init_params(self): method forward (line 52) | def forward(self, features): class DepthNet (line 64) | class DepthNet(nn.Module): method __init__ (line 72) | def __init__(self, method forward (line 95) | def forward(self, x): class FTB (line 100) | class FTB(nn.Module): method __init__ (line 101) | def __init__(self, inchannels, midchannels=512): method forward (line 119) | def forward(self, x): method init_params (line 126) | def init_params(self): class ATA (line 147) | class ATA(nn.Module): method __init__ (line 148) | def __init__(self, inchannels, reduction=8): method forward (line 158) | def forward(self, low_x, high_x): method init_params (line 168) | def init_params(self): class FFM (line 191) | class FFM(nn.Module): method __init__ (line 192) | def __init__(self, inchannels, midchannels, outchannels, upfactor=2): method forward (line 207) | def forward(self, low_x, high_x): method init_params (line 215) | def init_params(self): class AO (line 238) | class AO(nn.Module): method __init__ (line 240) | def __init__(self, inchannels, outchannels, upfactor=2): method forward (line 257) | def forward(self, x): method init_params (line 261) | def init_params(self): class ResidualConv (line 288) | class ResidualConv(nn.Module): method __init__ (line 289) | def __init__(self, inchannels): method forward (line 306) | def forward(self, x): method init_params (line 310) | def init_params(self): class FeatureFusion (line 333) | class FeatureFusion(nn.Module): method __init__ (line 334) | def __init__(self, inchannels, outchannels): method forward (line 344) | def forward(self, lowfeat, highfeat): method init_params (line 347) | def init_params(self): class SenceUnderstand (line 370) | class SenceUnderstand(nn.Module): method __init__ (line 371) | def __init__(self, channels): method forward (line 384) | def forward(self, x): method initial_params (line 395) | def initial_params(self, dev=0.01): FILE: annotator/leres/pix2pix/models/__init__.py function find_model_using_name (line 25) | def find_model_using_name(model_name): function get_option_setter (line 48) | def get_option_setter(model_name): function create_model (line 54) | def create_model(opt): FILE: annotator/leres/pix2pix/models/base_model.py class BaseModel (line 9) | class BaseModel(ABC): method __init__ (line 19) | def __init__(self, opt): method modify_commandline_options (line 48) | def modify_commandline_options(parser, is_train): method set_input (line 61) | def set_input(self, input): method forward (line 70) | def forward(self): method optimize_parameters (line 75) | def optimize_parameters(self): method setup (line 79) | def setup(self, opt): method eval (line 92) | def eval(self): method test (line 99) | def test(self): method compute_visuals (line 109) | def compute_visuals(self): method get_image_paths (line 113) | def get_image_paths(self): method update_learning_rate (line 117) | def update_learning_rate(self): method get_current_visuals (line 129) | def get_current_visuals(self): method get_current_losses (line 137) | def get_current_losses(self): method save_networks (line 145) | def save_networks(self, epoch): method unload_network (line 163) | def unload_network(self, name): method __patch_instance_norm_state_dict (line 173) | def __patch_instance_norm_state_dict(self, state_dict, module, keys, i... method load_networks (line 187) | def load_networks(self, epoch): method print_networks (line 212) | def print_networks(self, verbose): method set_requires_grad (line 230) | def set_requires_grad(self, nets, requires_grad=False): FILE: annotator/leres/pix2pix/models/base_model_hg.py class BaseModelHG (line 4) | class BaseModelHG(): method name (line 5) | def name(self): method initialize (line 8) | def initialize(self, opt): method set_input (line 15) | def set_input(self, input): method forward (line 18) | def forward(self): method test (line 22) | def test(self): method get_image_paths (line 25) | def get_image_paths(self): method optimize_parameters (line 28) | def optimize_parameters(self): method get_current_visuals (line 31) | def get_current_visuals(self): method get_current_errors (line 34) | def get_current_errors(self): method save (line 37) | def save(self, label): method save_network (line 41) | def save_network(self, network, network_label, epoch_label, gpu_ids): method load_network (line 49) | def load_network(self, network, network_label, epoch_label): method update_learning_rate (line 57) | def update_learning_rate(): FILE: annotator/leres/pix2pix/models/networks.py class Identity (line 13) | class Identity(nn.Module): method forward (line 14) | def forward(self, x): function get_norm_layer (line 18) | def get_norm_layer(norm_type='instance'): function get_scheduler (line 38) | def get_scheduler(optimizer, opt): function init_weights (line 67) | def init_weights(net, init_type='normal', init_gain=0.02): function init_net (line 101) | def init_net(net, init_type='normal', init_gain=0.02, gpu_ids=[]): function define_G (line 119) | def define_G(input_nc, output_nc, ngf, netG, norm='batch', use_dropout=F... function define_D (line 170) | def define_D(input_nc, ndf, netD, n_layers_D=3, norm='batch', init_type=... class GANLoss (line 217) | class GANLoss(nn.Module): method __init__ (line 224) | def __init__(self, gan_mode, target_real_label=1.0, target_fake_label=... method get_target_tensor (line 248) | def get_target_tensor(self, prediction, target_is_real): method __call__ (line 265) | def __call__(self, prediction, target_is_real): function cal_gradient_penalty (line 286) | def cal_gradient_penalty(netD, real_data, fake_data, device, type='mixed... class ResnetGenerator (line 323) | class ResnetGenerator(nn.Module): method __init__ (line 329) | def __init__(self, input_nc, output_nc, ngf=64, norm_layer=nn.BatchNor... method forward (line 379) | def forward(self, input): class ResnetBlock (line 384) | class ResnetBlock(nn.Module): method __init__ (line 387) | def __init__(self, dim, padding_type, norm_layer, use_dropout, use_bias): method build_conv_block (line 398) | def build_conv_block(self, dim, padding_type, norm_layer, use_dropout,... method forward (line 438) | def forward(self, x): class UnetGenerator (line 444) | class UnetGenerator(nn.Module): method __init__ (line 447) | def __init__(self, input_nc, output_nc, num_downs, ngf=64, norm_layer=... method forward (line 471) | def forward(self, input): class UnetSkipConnectionBlock (line 476) | class UnetSkipConnectionBlock(nn.Module): method __init__ (line 482) | def __init__(self, outer_nc, inner_nc, input_nc=None, method forward (line 539) | def forward(self, x): class NLayerDiscriminator (line 546) | class NLayerDiscriminator(nn.Module): method __init__ (line 549) | def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNo... method forward (line 589) | def forward(self, input): class PixelDiscriminator (line 594) | class PixelDiscriminator(nn.Module): method __init__ (line 597) | def __init__(self, input_nc, ndf=64, norm_layer=nn.BatchNorm2d): method forward (line 621) | def forward(self, input): FILE: annotator/leres/pix2pix/models/pix2pix4depth_model.py class Pix2Pix4DepthModel (line 6) | class Pix2Pix4DepthModel(BaseModel): method modify_commandline_options (line 17) | def modify_commandline_options(parser, is_train=True): method __init__ (line 38) | def __init__(self, opt): method set_input_train (line 80) | def set_input_train(self, input): method set_input (line 96) | def set_input(self, outer, inner): method normalize (line 109) | def normalize(self, input): method forward (line 114) | def forward(self): method backward_D (line 118) | def backward_D(self): method backward_G (line 132) | def backward_G(self): method optimize_parameters (line 144) | def optimize_parameters(self): FILE: annotator/leres/pix2pix/options/base_options.py class BaseOptions (line 9) | class BaseOptions(): method __init__ (line 16) | def __init__(self): method initialize (line 20) | def initialize(self, parser): method gather_options (line 79) | def gather_options(self): method print_options (line 108) | def print_options(self, opt): method parse (line 133) | def parse(self): FILE: annotator/leres/pix2pix/options/test_options.py class TestOptions (line 4) | class TestOptions(BaseOptions): method initialize (line 10) | def initialize(self, parser): FILE: annotator/leres/pix2pix/util/get_data.py class GetData (line 11) | class GetData(object): method __init__ (line 27) | def __init__(self, technique='cyclegan', verbose=True): method _print (line 35) | def _print(self, text): method _get_options (line 40) | def _get_options(r): method _present_options (line 46) | def _present_options(self): method _download_data (line 56) | def _download_data(self, dataset_url, save_path): method get (line 79) | def get(self, save_path, dataset=None): FILE: annotator/leres/pix2pix/util/guidedfilter.py class GuidedFilter (line 3) | class GuidedFilter(): method __init__ (line 4) | def __init__(self, source, reference, r=64, eps= 0.05**2): method boxfilter (line 12) | def boxfilter(self,img, r): method guidedfilter (line 28) | def guidedfilter(self,I, p, r, eps): FILE: annotator/leres/pix2pix/util/html.py class HTML (line 6) | class HTML: method __init__ (line 14) | def __init__(self, web_dir, title, refresh=0): method get_image_dir (line 35) | def get_image_dir(self): method add_header (line 39) | def add_header(self, text): method add_images (line 48) | def add_images(self, ims, txts, links, width=400): method save (line 68) | def save(self): FILE: annotator/leres/pix2pix/util/image_pool.py class ImagePool (line 5) | class ImagePool(): method __init__ (line 12) | def __init__(self, pool_size): method query (line 23) | def query(self, images): FILE: annotator/leres/pix2pix/util/util.py function tensor2im (line 9) | def tensor2im(input_image, imtype=np.uint16): function diagnose_network (line 28) | def diagnose_network(net, name='network'): function save_image (line 47) | def save_image(image_numpy, image_path, aspect_ratio=1.0): function print_numpy (line 69) | def print_numpy(x, val=True, shp=False): function mkdirs (line 85) | def mkdirs(paths): function mkdir (line 98) | def mkdir(path): FILE: annotator/leres/pix2pix/util/visualizer.py function save_images (line 17) | def save_images(webpage, visuals, image_path, aspect_ratio=1.0, width=256): class Visualizer (line 47) | class Visualizer(): method __init__ (line 53) | def __init__(self, opt): method reset (line 82) | def reset(self): method create_visdom_connections (line 86) | def create_visdom_connections(self): method display_current_results (line 93) | def display_current_results(self, visuals, epoch, save_result): method print_current_losses (line 150) | def print_current_losses(self, epoch, iters, losses, t_comp, t_data): FILE: annotator/lineart/__init__.py class ResidualBlock (line 15) | class ResidualBlock(nn.Module): method __init__ (line 16) | def __init__(self, in_features): method forward (line 30) | def forward(self, x): class Generator (line 34) | class Generator(nn.Module): method __init__ (line 35) | def __init__(self, input_nc, output_nc, n_residual_blocks=9, sigmoid=T... method forward (line 82) | def forward(self, x, cond=None): class LineartDetector (line 92) | class LineartDetector: method __init__ (line 97) | def __init__(self, model_name): method load_model (line 102) | def load_model(self, name): method unload_model (line 113) | def unload_model(self): method __call__ (line 117) | def __call__(self, input_image): FILE: annotator/lineart_anime/__init__.py class UnetGenerator (line 13) | class UnetGenerator(nn.Module): method __init__ (line 16) | def __init__(self, input_nc, output_nc, num_downs, ngf=64, norm_layer=... method forward (line 39) | def forward(self, input): class UnetSkipConnectionBlock (line 44) | class UnetSkipConnectionBlock(nn.Module): method __init__ (line 50) | def __init__(self, outer_nc, inner_nc, input_nc=None, method forward (line 106) | def forward(self, x): class LineartAnimeDetector (line 113) | class LineartAnimeDetector: method __init__ (line 116) | def __init__(self): method load_model (line 120) | def load_model(self): method unload_model (line 137) | def unload_model(self): method __call__ (line 141) | def __call__(self, input_image): FILE: annotator/manga_line/__init__.py class _bn_relu_conv (line 16) | class _bn_relu_conv(nn.Module): method __init__ (line 17) | def __init__(self, in_filters, nb_filters, fw, fh, subsample=1): method forward (line 25) | def forward(self, x): class _u_bn_relu_conv (line 40) | class _u_bn_relu_conv(nn.Module): method __init__ (line 41) | def __init__(self, in_filters, nb_filters, fw, fh, subsample=1): method forward (line 50) | def forward(self, x): class _shortcut (line 55) | class _shortcut(nn.Module): method __init__ (line 56) | def __init__(self, in_filters, nb_filters, subsample=1): method forward (line 66) | def forward(self, x, y): class _u_shortcut (line 76) | class _u_shortcut(nn.Module): method __init__ (line 77) | def __init__(self, in_filters, nb_filters, subsample): method forward (line 88) | def forward(self, x, y): class basic_block (line 95) | class basic_block(nn.Module): method __init__ (line 96) | def __init__(self, in_filters, nb_filters, init_subsample=1): method forward (line 102) | def forward(self, x): class _u_basic_block (line 107) | class _u_basic_block(nn.Module): method __init__ (line 108) | def __init__(self, in_filters, nb_filters, init_subsample=1): method forward (line 114) | def forward(self, x): class _residual_block (line 119) | class _residual_block(nn.Module): method __init__ (line 120) | def __init__(self, in_filters, nb_filters, repetitions, is_first_layer... method forward (line 135) | def forward(self, x): class _upsampling_residual_block (line 139) | class _upsampling_residual_block(nn.Module): method __init__ (line 140) | def __init__(self, in_filters, nb_filters, repetitions): method forward (line 153) | def forward(self, x): class res_skip (line 157) | class res_skip(nn.Module): method __init__ (line 159) | def __init__(self): method forward (line 182) | def forward(self, x): class MangaLineExtration (line 207) | class MangaLineExtration: method __init__ (line 210) | def __init__(self): method load_model (line 214) | def load_model(self): method unload_model (line 231) | def unload_model(self): method __call__ (line 235) | def __call__(self, input_image): FILE: annotator/mediapipe_face/__init__.py function apply_mediapipe_face (line 4) | def apply_mediapipe_face(image, max_faces: int = 1, min_confidence: floa... FILE: annotator/mediapipe_face/mediapipe_face_common.py function draw_pupils (line 51) | def draw_pupils(image, landmark_list, drawing_spec, halfwidth: int = 2): function reverse_channels (line 80) | def reverse_channels(image): function generate_annotation (line 87) | def generate_annotation( FILE: annotator/midas/__init__.py function unload_midas_model (line 11) | def unload_midas_model(): function apply_midas (line 16) | def apply_midas(input_image, a=np.pi * 2.0, bg_th=0.1): FILE: annotator/midas/api.py function disabled_train (line 35) | def disabled_train(self, mode=True): function load_midas_transform (line 41) | def load_midas_transform(model_type): function load_model (line 86) | def load_model(model_type): class MiDaSInference (line 157) | class MiDaSInference(nn.Module): method __init__ (line 170) | def __init__(self, model_type): method forward (line 177) | def forward(self, x): FILE: annotator/midas/midas/base_model.py class BaseModel (line 4) | class BaseModel(torch.nn.Module): method load (line 5) | def load(self, path): FILE: annotator/midas/midas/blocks.py function _make_encoder (line 11) | def _make_encoder(backbone, features, use_pretrained, groups=1, expand=F... function _make_scratch (line 49) | def _make_scratch(in_shape, out_shape, groups=1, expand=False): function _make_pretrained_efficientnet_lite3 (line 78) | def _make_pretrained_efficientnet_lite3(use_pretrained, exportable=False): function _make_efficientnet_backbone (line 88) | def _make_efficientnet_backbone(effnet): function _make_resnet_backbone (line 101) | def _make_resnet_backbone(resnet): function _make_pretrained_resnext101_wsl (line 114) | def _make_pretrained_resnext101_wsl(use_pretrained): class Interpolate (line 120) | class Interpolate(nn.Module): method __init__ (line 124) | def __init__(self, scale_factor, mode, align_corners=False): method forward (line 138) | def forward(self, x): class ResidualConvUnit (line 155) | class ResidualConvUnit(nn.Module): method __init__ (line 159) | def __init__(self, features): method forward (line 177) | def forward(self, x): class FeatureFusionBlock (line 194) | class FeatureFusionBlock(nn.Module): method __init__ (line 198) | def __init__(self, features): method forward (line 209) | def forward(self, *xs): class ResidualConvUnit_custom (line 231) | class ResidualConvUnit_custom(nn.Module): method __init__ (line 235) | def __init__(self, features, activation, bn): method forward (line 263) | def forward(self, x): class FeatureFusionBlock_custom (line 291) | class FeatureFusionBlock_custom(nn.Module): method __init__ (line 295) | def __init__(self, features, activation, deconv=False, bn=False, expan... method forward (line 320) | def forward(self, *xs): FILE: annotator/midas/midas/dpt_depth.py function _make_fusion_block (line 15) | def _make_fusion_block(features, use_bn): class DPT (line 26) | class DPT(BaseModel): method __init__ (line 27) | def __init__( method forward (line 67) | def forward(self, x): class DPTDepthModel (line 88) | class DPTDepthModel(DPT): method __init__ (line 89) | def __init__(self, path=None, non_negative=True, **kwargs): method forward (line 107) | def forward(self, x): FILE: annotator/midas/midas/midas_net.py class MidasNet (line 12) | class MidasNet(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=256, non_negative=True): method forward (line 49) | def forward(self, x): FILE: annotator/midas/midas/midas_net_custom.py class MidasNet_small (line 12) | class MidasNet_small(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=64, backbone="efficientnet_lite... method forward (line 73) | def forward(self, x): function fuse_model (line 109) | def fuse_model(m): FILE: annotator/midas/midas/transforms.py function apply_min_size (line 6) | def apply_min_size(sample, size, image_interpolation_method=cv2.INTER_AR... class Resize (line 48) | class Resize(object): method __init__ (line 52) | def __init__( method constrain_to_multiple_of (line 94) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 105) | def get_size(self, width, height): method __call__ (line 162) | def __call__(self, sample): class NormalizeImage (line 197) | class NormalizeImage(object): method __init__ (line 201) | def __init__(self, mean, std): method __call__ (line 205) | def __call__(self, sample): class PrepareForNet (line 211) | class PrepareForNet(object): method __init__ (line 215) | def __init__(self): method __call__ (line 218) | def __call__(self, sample): FILE: annotator/midas/midas/vit.py class Slice (line 9) | class Slice(nn.Module): method __init__ (line 10) | def __init__(self, start_index=1): method forward (line 14) | def forward(self, x): class AddReadout (line 18) | class AddReadout(nn.Module): method __init__ (line 19) | def __init__(self, start_index=1): method forward (line 23) | def forward(self, x): class ProjectReadout (line 31) | class ProjectReadout(nn.Module): method __init__ (line 32) | def __init__(self, in_features, start_index=1): method forward (line 38) | def forward(self, x): class Transpose (line 45) | class Transpose(nn.Module): method __init__ (line 46) | def __init__(self, dim0, dim1): method forward (line 51) | def forward(self, x): function forward_vit (line 56) | def forward_vit(pretrained, x): function _resize_pos_embed (line 100) | def _resize_pos_embed(self, posemb, gs_h, gs_w): function forward_flex (line 117) | def forward_flex(self, x): function get_activation (line 159) | def get_activation(name): function get_readout_oper (line 166) | def get_readout_oper(vit_features, features, use_readout, start_index=1): function _make_vit_b16_backbone (line 183) | def _make_vit_b16_backbone( function _make_pretrained_vitl16_384 (line 297) | def _make_pretrained_vitl16_384(pretrained, use_readout="ignore", hooks=... function _make_pretrained_vitb16_384 (line 310) | def _make_pretrained_vitb16_384(pretrained, use_readout="ignore", hooks=... function _make_pretrained_deitb16_384 (line 319) | def _make_pretrained_deitb16_384(pretrained, use_readout="ignore", hooks... function _make_pretrained_deitb16_distil_384 (line 328) | def _make_pretrained_deitb16_distil_384(pretrained, use_readout="ignore"... function _make_vit_b_rn50_backbone (line 343) | def _make_vit_b_rn50_backbone( function _make_pretrained_vitb_rn50_384 (line 478) | def _make_pretrained_vitb_rn50_384( FILE: annotator/midas/utils.py function read_pfm (line 9) | def read_pfm(path): function write_pfm (line 58) | def write_pfm(path, image, scale=1): function read_image (line 97) | def read_image(path): function resize_image (line 116) | def resize_image(img): function resize_depth (line 146) | def resize_depth(depth, width, height): function write_depth (line 165) | def write_depth(path, depth, bits=1): FILE: annotator/mlsd/__init__.py function unload_mlsd_model (line 18) | def unload_mlsd_model(): function apply_mlsd (line 23) | def apply_mlsd(input_image, thr_v, thr_d): FILE: annotator/mlsd/models/mbv2_mlsd_large.py class BlockTypeA (line 9) | class BlockTypeA(nn.Module): method __init__ (line 10) | def __init__(self, in_c1, in_c2, out_c1, out_c2, upscale = True): method forward (line 24) | def forward(self, a, b): class BlockTypeB (line 32) | class BlockTypeB(nn.Module): method __init__ (line 33) | def __init__(self, in_c, out_c): method forward (line 46) | def forward(self, x): class BlockTypeC (line 51) | class BlockTypeC(nn.Module): method __init__ (line 52) | def __init__(self, in_c, out_c): method forward (line 66) | def forward(self, x): function _make_divisible (line 72) | def _make_divisible(v, divisor, min_value=None): class ConvBNReLU (line 92) | class ConvBNReLU(nn.Sequential): method __init__ (line 93) | def __init__(self, in_planes, out_planes, kernel_size=3, stride=1, gro... method forward (line 112) | def forward(self, x): class InvertedResidual (line 124) | class InvertedResidual(nn.Module): method __init__ (line 125) | def __init__(self, inp, oup, stride, expand_ratio): method forward (line 146) | def forward(self, x): class MobileNetV2 (line 153) | class MobileNetV2(nn.Module): method __init__ (line 154) | def __init__(self, pretrained=True): method _forward_impl (line 218) | def _forward_impl(self, x): method forward (line 233) | def forward(self, x): method _load_pretrained_model (line 236) | def _load_pretrained_model(self): class MobileV2_MLSD_Large (line 247) | class MobileV2_MLSD_Large(nn.Module): method __init__ (line 248) | def __init__(self): method forward (line 275) | def forward(self, x): FILE: annotator/mlsd/models/mbv2_mlsd_tiny.py class BlockTypeA (line 9) | class BlockTypeA(nn.Module): method __init__ (line 10) | def __init__(self, in_c1, in_c2, out_c1, out_c2, upscale = True): method forward (line 24) | def forward(self, a, b): class BlockTypeB (line 31) | class BlockTypeB(nn.Module): method __init__ (line 32) | def __init__(self, in_c, out_c): method forward (line 45) | def forward(self, x): class BlockTypeC (line 50) | class BlockTypeC(nn.Module): method __init__ (line 51) | def __init__(self, in_c, out_c): method forward (line 65) | def forward(self, x): function _make_divisible (line 71) | def _make_divisible(v, divisor, min_value=None): class ConvBNReLU (line 91) | class ConvBNReLU(nn.Sequential): method __init__ (line 92) | def __init__(self, in_planes, out_planes, kernel_size=3, stride=1, gro... method forward (line 111) | def forward(self, x): class InvertedResidual (line 123) | class InvertedResidual(nn.Module): method __init__ (line 124) | def __init__(self, inp, oup, stride, expand_ratio): method forward (line 145) | def forward(self, x): class MobileNetV2 (line 152) | class MobileNetV2(nn.Module): method __init__ (line 153) | def __init__(self, pretrained=True): method _forward_impl (line 218) | def _forward_impl(self, x): method forward (line 233) | def forward(self, x): method _load_pretrained_model (line 236) | def _load_pretrained_model(self): class MobileV2_MLSD_Tiny (line 247) | class MobileV2_MLSD_Tiny(nn.Module): method __init__ (line 248) | def __init__(self): method forward (line 263) | def forward(self, x): FILE: annotator/mlsd/utils.py function deccode_output_score_and_ptss (line 20) | def deccode_output_score_and_ptss(tpMap, topk_n = 200, ksize = 5): function pred_lines (line 48) | def pred_lines(image, model, function pred_squares (line 90) | def pred_squares(image, FILE: annotator/mmpkg/mmcv/arraymisc/quantization.py function quantize (line 5) | def quantize(arr, min_val, max_val, levels, dtype=np.int64): function dequantize (line 32) | def dequantize(arr, min_val, max_val, levels, dtype=np.float64): FILE: annotator/mmpkg/mmcv/cnn/alexnet.py class AlexNet (line 7) | class AlexNet(nn.Module): method __init__ (line 14) | def __init__(self, num_classes=-1): method init_weights (line 43) | def init_weights(self, pretrained=None): method forward (line 54) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/activation.py class Clamp (line 18) | class Clamp(nn.Module): method __init__ (line 31) | def __init__(self, min=-1., max=1.): method forward (line 36) | def forward(self, x): class GELU (line 48) | class GELU(nn.Module): method forward (line 70) | def forward(self, input): function build_activation_layer (line 81) | def build_activation_layer(cfg): FILE: annotator/mmpkg/mmcv/cnn/bricks/context_block.py function last_zero_init (line 9) | def last_zero_init(m): class ContextBlock (line 17) | class ContextBlock(nn.Module): method __init__ (line 36) | def __init__(self, method reset_parameters (line 75) | def reset_parameters(self): method spatial_pool (line 85) | def spatial_pool(self, x): method forward (line 111) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/conv.py function build_conv_layer (line 12) | def build_conv_layer(cfg, *args, **kwargs): FILE: annotator/mmpkg/mmcv/cnn/bricks/conv2d_adaptive_padding.py class Conv2dAdaptivePadding (line 11) | class Conv2dAdaptivePadding(nn.Conv2d): method __init__ (line 33) | def __init__(self, method forward (line 45) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/conv_module.py class ConvModule (line 16) | class ConvModule(nn.Module): method __init__ (line 70) | def __init__(self, method norm (line 169) | def norm(self): method init_weights (line 175) | def init_weights(self): method forward (line 196) | def forward(self, x, activate=True, norm=True): FILE: annotator/mmpkg/mmcv/cnn/bricks/conv_ws.py function conv_ws_2d (line 9) | def conv_ws_2d(input, class ConvWS2d (line 26) | class ConvWS2d(nn.Conv2d): method __init__ (line 28) | def __init__(self, method forward (line 49) | def forward(self, x): class ConvAWS2d (line 55) | class ConvAWS2d(nn.Conv2d): method __init__ (line 78) | def __init__(self, method _get_weight (line 101) | def _get_weight(self, weight): method forward (line 109) | def forward(self, x): method _load_from_state_dict (line 114) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... FILE: annotator/mmpkg/mmcv/cnn/bricks/depthwise_separable_conv_module.py class DepthwiseSeparableConvModule (line 7) | class DepthwiseSeparableConvModule(nn.Module): method __init__ (line 48) | def __init__(self, method forward (line 93) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/drop.py function drop_path (line 9) | def drop_path(x, drop_prob=0., training=False): class DropPath (line 28) | class DropPath(nn.Module): method __init__ (line 39) | def __init__(self, drop_prob=0.1): method forward (line 43) | def forward(self, x): class Dropout (line 48) | class Dropout(nn.Dropout): method __init__ (line 59) | def __init__(self, drop_prob=0.5, inplace=False): function build_dropout (line 63) | def build_dropout(cfg, default_args=None): FILE: annotator/mmpkg/mmcv/cnn/bricks/generalized_attention.py class GeneralizedAttention (line 14) | class GeneralizedAttention(nn.Module): method __init__ (line 47) | def __init__(self, method get_position_embedding (line 166) | def get_position_embedding(self, method forward (line 216) | def forward(self, x_input): method init_weights (line 403) | def init_weights(self): FILE: annotator/mmpkg/mmcv/cnn/bricks/hsigmoid.py class HSigmoid (line 8) | class HSigmoid(nn.Module): method __init__ (line 23) | def __init__(self, bias=1.0, divisor=2.0, min_value=0.0, max_value=1.0): method forward (line 31) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/hswish.py class HSwish (line 8) | class HSwish(nn.Module): method __init__ (line 24) | def __init__(self, inplace=False): method forward (line 28) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/non_local.py class _NonLocalNd (line 12) | class _NonLocalNd(nn.Module, metaclass=ABCMeta): method __init__ (line 35) | def __init__(self, method init_weights (line 99) | def init_weights(self, std=0.01, zeros_init=True): method gaussian (line 116) | def gaussian(self, theta_x, phi_x): method embedded_gaussian (line 124) | def embedded_gaussian(self, theta_x, phi_x): method dot_product (line 135) | def dot_product(self, theta_x, phi_x): method concatenation (line 143) | def concatenation(self, theta_x, phi_x): method forward (line 160) | def forward(self, x): class NonLocal1d (line 214) | class NonLocal1d(_NonLocalNd): method __init__ (line 226) | def __init__(self, class NonLocal2d (line 246) | class NonLocal2d(_NonLocalNd): method __init__ (line 260) | def __init__(self, class NonLocal3d (line 279) | class NonLocal3d(_NonLocalNd): method __init__ (line 291) | def __init__(self, FILE: annotator/mmpkg/mmcv/cnn/bricks/norm.py function infer_abbr (line 23) | def infer_abbr(class_type): function build_norm_layer (line 72) | def build_norm_layer(cfg, num_features, postfix=''): function is_norm (line 122) | def is_norm(layer, exclude=None): FILE: annotator/mmpkg/mmcv/cnn/bricks/padding.py function build_padding_layer (line 11) | def build_padding_layer(cfg, *args, **kwargs): FILE: annotator/mmpkg/mmcv/cnn/bricks/plugin.py function infer_abbr (line 12) | def infer_abbr(class_type): function build_plugin_layer (line 55) | def build_plugin_layer(cfg, postfix='', **kwargs): FILE: annotator/mmpkg/mmcv/cnn/bricks/scale.py class Scale (line 6) | class Scale(nn.Module): method __init__ (line 16) | def __init__(self, scale=1.0): method forward (line 20) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/swish.py class Swish (line 9) | class Swish(nn.Module): method __init__ (line 21) | def __init__(self): method forward (line 24) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/bricks/transformer.py function build_positional_encoding (line 33) | def build_positional_encoding(cfg, default_args=None): function build_attention (line 38) | def build_attention(cfg, default_args=None): function build_feedforward_network (line 43) | def build_feedforward_network(cfg, default_args=None): function build_transformer_layer (line 48) | def build_transformer_layer(cfg, default_args=None): function build_transformer_layer_sequence (line 53) | def build_transformer_layer_sequence(cfg, default_args=None): class MultiheadAttention (line 59) | class MultiheadAttention(BaseModule): method __init__ (line 81) | def __init__(self, method forward (line 112) | def forward(self, class FFN (line 206) | class FFN(BaseModule): method __init__ (line 234) | def __init__(self, method forward (line 269) | def forward(self, x, identity=None): class BaseTransformerLayer (line 283) | class BaseTransformerLayer(BaseModule): method __init__ (line 319) | def __init__(self, method forward (line 412) | def forward(self, class TransformerLayerSequence (line 514) | class TransformerLayerSequence(BaseModule): method __init__ (line 533) | def __init__(self, transformerlayers=None, num_layers=None, init_cfg=N... method forward (line 549) | def forward(self, FILE: annotator/mmpkg/mmcv/cnn/bricks/upsample.py class PixelShufflePack (line 13) | class PixelShufflePack(nn.Module): method __init__ (line 27) | def __init__(self, in_channels, out_channels, scale_factor, method init_weights (line 41) | def init_weights(self): method forward (line 44) | def forward(self, x): function build_upsample_layer (line 50) | def build_upsample_layer(cfg, *args, **kwargs): FILE: annotator/mmpkg/mmcv/cnn/bricks/wrappers.py function obsolete_torch_version (line 24) | def obsolete_torch_version(torch_version, version_threshold): class NewEmptyTensorOp (line 28) | class NewEmptyTensorOp(torch.autograd.Function): method forward (line 31) | def forward(ctx, x, new_shape): method backward (line 36) | def backward(ctx, grad): class Conv2d (line 42) | class Conv2d(nn.Conv2d): method forward (line 44) | def forward(self, x): class Conv3d (line 63) | class Conv3d(nn.Conv3d): method forward (line 65) | def forward(self, x): class ConvTranspose2d (line 86) | class ConvTranspose2d(nn.ConvTranspose2d): method forward (line 88) | def forward(self, x): class ConvTranspose3d (line 109) | class ConvTranspose3d(nn.ConvTranspose3d): method forward (line 111) | def forward(self, x): class MaxPool2d (line 129) | class MaxPool2d(nn.MaxPool2d): method forward (line 131) | def forward(self, x): class MaxPool3d (line 147) | class MaxPool3d(nn.MaxPool3d): method forward (line 149) | def forward(self, x): class Linear (line 166) | class Linear(torch.nn.Linear): method forward (line 168) | def forward(self, x): FILE: annotator/mmpkg/mmcv/cnn/builder.py function build_model_from_cfg (line 6) | def build_model_from_cfg(cfg, registry, default_args=None): FILE: annotator/mmpkg/mmcv/cnn/resnet.py function conv3x3 (line 10) | def conv3x3(in_planes, out_planes, stride=1, dilation=1): class BasicBlock (line 22) | class BasicBlock(nn.Module): method __init__ (line 25) | def __init__(self, method forward (line 45) | def forward(self, x): class Bottleneck (line 64) | class Bottleneck(nn.Module): method __init__ (line 67) | def __init__(self, method forward (line 110) | def forward(self, x): function make_res_layer (line 143) | def make_res_layer(block, class ResNet (line 181) | class ResNet(nn.Module): method __init__ (line 210) | def __init__(self, method init_weights (line 265) | def init_weights(self, pretrained=None): method forward (line 279) | def forward(self, x): method train (line 295) | def train(self, mode=True): FILE: annotator/mmpkg/mmcv/cnn/utils/flops_counter.py function get_model_complexity_info (line 36) | def get_model_complexity_info(model, function flops_to_string (line 118) | def flops_to_string(flops, units='GFLOPs', precision=2): function params_to_string (line 161) | def params_to_string(num_params, units=None, precision=2): function print_model_with_flops (line 198) | def print_model_with_flops(model, function get_model_parameters_number (line 307) | def get_model_parameters_number(model): function add_flops_counting_methods (line 320) | def add_flops_counting_methods(net_main_module): function compute_average_flops_cost (line 337) | def compute_average_flops_cost(self): function start_flops_count (line 355) | def start_flops_count(self): function stop_flops_count (line 378) | def stop_flops_count(self): function reset_flops_count (line 389) | def reset_flops_count(self): function empty_flops_counter_hook (line 400) | def empty_flops_counter_hook(module, input, output): function upsample_flops_counter_hook (line 404) | def upsample_flops_counter_hook(module, input, output): function relu_flops_counter_hook (line 413) | def relu_flops_counter_hook(module, input, output): function linear_flops_counter_hook (line 418) | def linear_flops_counter_hook(module, input, output): function pool_flops_counter_hook (line 425) | def pool_flops_counter_hook(module, input, output): function norm_flops_counter_hook (line 430) | def norm_flops_counter_hook(module, input, output): function deconv_flops_counter_hook (line 440) | def deconv_flops_counter_hook(conv_module, input, output): function conv_flops_counter_hook (line 467) | def conv_flops_counter_hook(conv_module, input, output): function batch_counter_hook (line 498) | def batch_counter_hook(module, input, output): function add_batch_counter_variables_or_reset (line 511) | def add_batch_counter_variables_or_reset(module): function add_batch_counter_hook_function (line 516) | def add_batch_counter_hook_function(module): function remove_batch_counter_hook_function (line 524) | def remove_batch_counter_hook_function(module): function add_flops_counter_variable_or_reset (line 530) | def add_flops_counter_variable_or_reset(module): function is_supported_instance (line 540) | def is_supported_instance(module): function remove_flops_counter_hook_function (line 546) | def remove_flops_counter_hook_function(module): function get_modules_mapping (line 553) | def get_modules_mapping(): FILE: annotator/mmpkg/mmcv/cnn/utils/fuse_conv_bn.py function _fuse_conv_bn (line 6) | def _fuse_conv_bn(conv, bn): function fuse_conv_bn (line 27) | def fuse_conv_bn(module): FILE: annotator/mmpkg/mmcv/cnn/utils/sync_bn.py class _BatchNormXd (line 6) | class _BatchNormXd(torch.nn.modules.batchnorm._BatchNorm): method _check_input_dim (line 17) | def _check_input_dim(self, input): function revert_sync_batchnorm (line 21) | def revert_sync_batchnorm(module): FILE: annotator/mmpkg/mmcv/cnn/utils/weight_init.py function update_init_info (line 16) | def update_init_info(module, init_info): function constant_init (line 48) | def constant_init(module, val, bias=0): function xavier_init (line 55) | def xavier_init(module, gain=1, bias=0, distribution='normal'): function normal_init (line 66) | def normal_init(module, mean=0, std=1, bias=0): function trunc_normal_init (line 73) | def trunc_normal_init(module: nn.Module, function uniform_init (line 85) | def uniform_init(module, a=0, b=1, bias=0): function kaiming_init (line 92) | def kaiming_init(module, function caffe2_xavier_init (line 110) | def caffe2_xavier_init(module, bias=0): function bias_init_with_prob (line 122) | def bias_init_with_prob(prior_prob): function _get_bases_name (line 128) | def _get_bases_name(m): class BaseInit (line 132) | class BaseInit(object): method __init__ (line 134) | def __init__(self, *, bias=0, bias_prob=None, layer=None): method _get_init_info (line 157) | def _get_init_info(self): class ConstantInit (line 163) | class ConstantInit(BaseInit): method __init__ (line 175) | def __init__(self, val, **kwargs): method __call__ (line 179) | def __call__(self, module): method _get_init_info (line 194) | def _get_init_info(self): class XavierInit (line 200) | class XavierInit(BaseInit): method __init__ (line 217) | def __init__(self, gain=1, distribution='normal', **kwargs): method __call__ (line 222) | def __call__(self, module): method _get_init_info (line 237) | def _get_init_info(self): class NormalInit (line 244) | class NormalInit(BaseInit): method __init__ (line 260) | def __init__(self, mean=0, std=1, **kwargs): method __call__ (line 265) | def __call__(self, module): method _get_init_info (line 280) | def _get_init_info(self): class TruncNormalInit (line 287) | class TruncNormalInit(BaseInit): method __init__ (line 306) | def __init__(self, method __call__ (line 318) | def __call__(self, module: nn.Module) -> None: method _get_init_info (line 335) | def _get_init_info(self): class UniformInit (line 342) | class UniformInit(BaseInit): method __init__ (line 358) | def __init__(self, a=0, b=1, **kwargs): method __call__ (line 363) | def __call__(self, module): method _get_init_info (line 378) | def _get_init_info(self): class KaimingInit (line 385) | class KaimingInit(BaseInit): method __init__ (line 411) | def __init__(self, method __call__ (line 423) | def __call__(self, module): method _get_init_info (line 440) | def _get_init_info(self): class Caffe2XavierInit (line 448) | class Caffe2XavierInit(KaimingInit): method __init__ (line 451) | def __init__(self, **kwargs): method __call__ (line 459) | def __call__(self, module): class PretrainedInit (line 464) | class PretrainedInit(object): method __init__ (line 478) | def __init__(self, checkpoint, prefix=None, map_location=None): method __call__ (line 483) | def __call__(self, module): method _get_init_info (line 506) | def _get_init_info(self): function _initialize (line 511) | def _initialize(module, cfg, wholemodule=False): function _initialize_override (line 520) | def _initialize_override(module, override, cfg): function initialize (line 550) | def initialize(module, init_cfg): function _no_grad_trunc_normal_ (line 622) | def _no_grad_trunc_normal_(tensor: Tensor, mean: float, std: float, a: f... function trunc_normal_ (line 662) | def trunc_normal_(tensor: Tensor, FILE: annotator/mmpkg/mmcv/cnn/vgg.py function conv3x3 (line 9) | def conv3x3(in_planes, out_planes, dilation=1): function make_vgg_layer (line 19) | def make_vgg_layer(inplanes, class VGG (line 37) | class VGG(nn.Module): method __init__ (line 61) | def __init__(self, method init_weights (line 125) | def init_weights(self, pretrained=None): method forward (line 141) | def forward(self, x): method train (line 159) | def train(self, mode=True): FILE: annotator/mmpkg/mmcv/engine/test.py function single_gpu_test (line 15) | def single_gpu_test(model, data_loader): function multi_gpu_test (line 44) | def multi_gpu_test(model, data_loader, tmpdir=None, gpu_collect=False): function collect_results_cpu (line 91) | def collect_results_cpu(result_part, size, tmpdir=None): function collect_results_gpu (line 155) | def collect_results_gpu(result_part, size): FILE: annotator/mmpkg/mmcv/fileio/file_client.py class BaseStorageBackend (line 19) | class BaseStorageBackend(metaclass=ABCMeta): method name (line 31) | def name(self): method allow_symlink (line 35) | def allow_symlink(self): method get (line 39) | def get(self, filepath): method get_text (line 43) | def get_text(self, filepath): class CephBackend (line 47) | class CephBackend(BaseStorageBackend): method __init__ (line 60) | def __init__(self, path_mapping=None): method get (line 72) | def get(self, filepath): method get_text (line 81) | def get_text(self, filepath, encoding=None): class PetrelBackend (line 85) | class PetrelBackend(BaseStorageBackend): method __init__ (line 108) | def __init__(self, method _map_path (line 121) | def _map_path(self, filepath: Union[str, Path]) -> str: method _format_path (line 134) | def _format_path(self, filepath: str) -> str: method get (line 147) | def get(self, filepath: Union[str, Path]) -> memoryview: method get_text (line 164) | def get_text(self, method put (line 179) | def put(self, obj: bytes, filepath: Union[str, Path]) -> None: method put_text (line 190) | def put_text(self, method remove (line 204) | def remove(self, filepath: Union[str, Path]) -> None: method exists (line 220) | def exists(self, filepath: Union[str, Path]) -> bool: method isdir (line 240) | def isdir(self, filepath: Union[str, Path]) -> bool: method isfile (line 261) | def isfile(self, filepath: Union[str, Path]) -> bool: method join_path (line 281) | def join_path(self, filepath: Union[str, Path], method get_local_path (line 300) | def get_local_path(self, filepath: Union[str, Path]) -> Iterable[str]: method list_dir_or_file (line 331) | def list_dir_or_file(self, class MemcachedBackend (line 413) | class MemcachedBackend(BaseStorageBackend): method __init__ (line 423) | def __init__(self, server_list_cfg, client_cfg, sys_path=None): method get (line 440) | def get(self, filepath): method get_text (line 447) | def get_text(self, filepath, encoding=None): class LmdbBackend (line 451) | class LmdbBackend(BaseStorageBackend): method __init__ (line 469) | def __init__(self, method get (line 488) | def get(self, filepath): method get_text (line 499) | def get_text(self, filepath, encoding=None): class HardDiskBackend (line 503) | class HardDiskBackend(BaseStorageBackend): method get (line 508) | def get(self, filepath: Union[str, Path]) -> bytes: method get_text (line 521) | def get_text(self, method put (line 538) | def put(self, obj: bytes, filepath: Union[str, Path]) -> None: method put_text (line 553) | def put_text(self, method remove (line 573) | def remove(self, filepath: Union[str, Path]) -> None: method exists (line 581) | def exists(self, filepath: Union[str, Path]) -> bool: method isdir (line 592) | def isdir(self, filepath: Union[str, Path]) -> bool: method isfile (line 605) | def isfile(self, filepath: Union[str, Path]) -> bool: method join_path (line 617) | def join_path(self, filepath: Union[str, Path], method get_local_path (line 633) | def get_local_path( method list_dir_or_file (line 638) | def list_dir_or_file(self, class HTTPBackend (line 691) | class HTTPBackend(BaseStorageBackend): method get (line 694) | def get(self, filepath): method get_text (line 698) | def get_text(self, filepath, encoding='utf-8'): method get_local_path (line 703) | def get_local_path(self, filepath: str) -> Iterable[str]: class FileClient (line 729) | class FileClient: method __new__ (line 787) | def __new__(cls, backend=None, prefix=None, **kwargs): method name (line 823) | def name(self): method allow_symlink (line 827) | def allow_symlink(self): method parse_uri_prefix (line 831) | def parse_uri_prefix(uri: Union[str, Path]) -> Optional[str]: method infer_client (line 858) | def infer_client(cls, method _register_backend (line 886) | def _register_backend(cls, name, backend, force=False, prefixes=None): method register_backend (line 922) | def register_backend(cls, name, backend=None, force=False, prefixes=No... method get (line 976) | def get(self, filepath: Union[str, Path]) -> Union[bytes, memoryview]: method get_text (line 994) | def get_text(self, filepath: Union[str, Path], encoding='utf-8') -> str: method put (line 1007) | def put(self, obj: bytes, filepath: Union[str, Path]) -> None: method put_text (line 1020) | def put_text(self, obj: str, filepath: Union[str, Path]) -> None: method remove (line 1035) | def remove(self, filepath: Union[str, Path]) -> None: method exists (line 1043) | def exists(self, filepath: Union[str, Path]) -> bool: method isdir (line 1054) | def isdir(self, filepath: Union[str, Path]) -> bool: method isfile (line 1067) | def isfile(self, filepath: Union[str, Path]) -> bool: method join_path (line 1079) | def join_path(self, filepath: Union[str, Path], method get_local_path (line 1095) | def get_local_path(self, filepath: Union[str, Path]) -> Iterable[str]: method list_dir_or_file (line 1123) | def list_dir_or_file(self, FILE: annotator/mmpkg/mmcv/fileio/handlers/base.py class BaseFileHandler (line 5) | class BaseFileHandler(metaclass=ABCMeta): method load_from_fileobj (line 13) | def load_from_fileobj(self, file, **kwargs): method dump_to_fileobj (line 17) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_str (line 21) | def dump_to_str(self, obj, **kwargs): method load_from_path (line 24) | def load_from_path(self, filepath, mode='r', **kwargs): method dump_to_path (line 28) | def dump_to_path(self, obj, filepath, mode='w', **kwargs): FILE: annotator/mmpkg/mmcv/fileio/handlers/json_handler.py function set_default (line 9) | def set_default(obj): class JsonHandler (line 25) | class JsonHandler(BaseFileHandler): method load_from_fileobj (line 27) | def load_from_fileobj(self, file): method dump_to_fileobj (line 30) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_str (line 34) | def dump_to_str(self, obj, **kwargs): FILE: annotator/mmpkg/mmcv/fileio/handlers/pickle_handler.py class PickleHandler (line 7) | class PickleHandler(BaseFileHandler): method load_from_fileobj (line 11) | def load_from_fileobj(self, file, **kwargs): method load_from_path (line 14) | def load_from_path(self, filepath, **kwargs): method dump_to_str (line 18) | def dump_to_str(self, obj, **kwargs): method dump_to_fileobj (line 22) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_path (line 26) | def dump_to_path(self, obj, filepath, **kwargs): FILE: annotator/mmpkg/mmcv/fileio/handlers/yaml_handler.py class YamlHandler (line 12) | class YamlHandler(BaseFileHandler): method load_from_fileobj (line 14) | def load_from_fileobj(self, file, **kwargs): method dump_to_fileobj (line 18) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_str (line 22) | def dump_to_str(self, obj, **kwargs): FILE: annotator/mmpkg/mmcv/fileio/io.py function load (line 18) | def load(file, file_format=None, file_client_args=None, **kwargs): function dump (line 69) | def dump(obj, file=None, file_format=None, file_client_args=None, **kwar... function _register_handler (line 126) | def _register_handler(handler, file_formats): function register_handler (line 145) | def register_handler(file_formats, **kwargs): FILE: annotator/mmpkg/mmcv/fileio/parse.py function list_from_file (line 8) | def list_from_file(filename, function dict_from_file (line 55) | def dict_from_file(filename, FILE: annotator/mmpkg/mmcv/image/colorspace.py function imconvert (line 6) | def imconvert(img, src, dst): function bgr2gray (line 22) | def bgr2gray(img, keepdim=False): function rgb2gray (line 39) | def rgb2gray(img, keepdim=False): function gray2bgr (line 56) | def gray2bgr(img): function gray2rgb (line 70) | def gray2rgb(img): function _convert_input_type_range (line 84) | def _convert_input_type_range(img): function _convert_output_type_range (line 112) | def _convert_output_type_range(img, dst_type): function rgb2ycbcr (line 143) | def rgb2ycbcr(img, y_only=False): function bgr2ycbcr (line 177) | def bgr2ycbcr(img, y_only=False): function ycbcr2rgb (line 211) | def ycbcr2rgb(img): function ycbcr2bgr (line 243) | def ycbcr2bgr(img): function convert_color_factory (line 275) | def convert_color_factory(src, dst): FILE: annotator/mmpkg/mmcv/image/geometric.py function _scale_size (line 16) | def _scale_size(size, scale): function imresize (line 51) | def imresize(img, function imresize_to_multiple (line 98) | def imresize_to_multiple(img, function imresize_like (line 162) | def imresize_like(img, function rescale_size (line 184) | def rescale_size(old_size, scale, return_scale=False): function imrescale (line 221) | def imrescale(img, function imflip (line 252) | def imflip(img, direction='horizontal'): function imflip_ (line 272) | def imflip_(img, direction='horizontal'): function imrotate (line 292) | def imrotate(img, function bbox_clip (line 342) | def bbox_clip(bboxes, img_shape): function bbox_scaling (line 360) | def bbox_scaling(bboxes, scale, clip_shape=None): function imcrop (line 386) | def imcrop(img, bboxes, scale=1.0, pad_fill=None): function impad (line 440) | def impad(img, function impad_to_multiple (line 522) | def impad_to_multiple(img, divisor, pad_val=0): function cutout (line 538) | def cutout(img, shape, pad_val=0): function _get_shear_matrix (line 593) | def _get_shear_matrix(magnitude, direction='horizontal'): function imshear (line 611) | def imshear(img, function _get_translate_matrix (line 662) | def _get_translate_matrix(offset, direction='horizontal'): function imtranslate (line 680) | def imtranslate(img, FILE: annotator/mmpkg/mmcv/image/io.py function use_backend (line 43) | def use_backend(backend): function _jpegflag (line 69) | def _jpegflag(flag='color', channel_order='bgr'): function _pillow2array (line 85) | def _pillow2array(img, flag='color', channel_order='bgr'): function imread (line 140) | def imread(img_or_path, flag='color', channel_order='bgr', backend=None): function imfrombytes (line 203) | def imfrombytes(content, flag='color', channel_order='bgr', backend=None): function imwrite (line 242) | def imwrite(img, file_path, params=None, auto_mkdir=True): FILE: annotator/mmpkg/mmcv/image/misc.py function tensor2imgs (line 12) | def tensor2imgs(tensor, mean=(0, 0, 0), std=(1, 1, 1), to_rgb=True): FILE: annotator/mmpkg/mmcv/image/photometric.py function imnormalize (line 9) | def imnormalize(img, mean, std, to_rgb=True): function imnormalize_ (line 25) | def imnormalize_(img, mean, std, to_rgb=True): function imdenormalize (line 48) | def imdenormalize(img, mean, std, to_bgr=True): function iminvert (line 59) | def iminvert(img): function solarize (line 71) | def solarize(img, thr=128): function posterize (line 85) | def posterize(img, bits): function adjust_color (line 100) | def adjust_color(img, alpha=1, beta=None, gamma=0): function imequalize (line 131) | def imequalize(img): function adjust_brightness (line 176) | def adjust_brightness(img, factor=1.): function adjust_contrast (line 208) | def adjust_contrast(img, factor=1.): function auto_contrast (line 238) | def auto_contrast(img, cutoff=0): function adjust_sharpness (line 294) | def adjust_sharpness(img, factor=1., kernel=None): function adjust_lighting (line 338) | def adjust_lighting(img, eigval, eigvec, alphastd=0.1, to_rgb=True): function lut_transform (line 381) | def lut_transform(img, lut_table): function clahe (line 405) | def clahe(img, clip_limit=40.0, tile_grid_size=(8, 8)): FILE: annotator/mmpkg/mmcv/ops/assign_score_withk.py class AssignScoreWithK (line 9) | class AssignScoreWithK(Function): method forward (line 29) | def forward(ctx, method backward (line 81) | def backward(ctx, grad_out): FILE: annotator/mmpkg/mmcv/ops/ball_query.py class BallQuery (line 10) | class BallQuery(Function): method forward (line 14) | def forward(ctx, min_radius: float, max_radius: float, sample_num: int, method backward (line 51) | def backward(ctx, a=None): FILE: annotator/mmpkg/mmcv/ops/bbox.py function bbox_overlaps (line 7) | def bbox_overlaps(bboxes1, bboxes2, mode='iou', aligned=False, offset=0): FILE: annotator/mmpkg/mmcv/ops/border_align.py class BorderAlignFunction (line 16) | class BorderAlignFunction(Function): method symbolic (line 19) | def symbolic(g, input, boxes, pool_size): method forward (line 24) | def forward(ctx, input, boxes, pool_size): method backward (line 48) | def backward(ctx, grad_output): class BorderAlign (line 65) | class BorderAlign(nn.Module): method __init__ (line 88) | def __init__(self, pool_size): method forward (line 92) | def forward(self, input, boxes): method __repr__ (line 106) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/box_iou_rotated.py function box_iou_rotated (line 7) | def box_iou_rotated(bboxes1, bboxes2, mode='iou', aligned=False): FILE: annotator/mmpkg/mmcv/ops/carafe.py class CARAFENaiveFunction (line 17) | class CARAFENaiveFunction(Function): method symbolic (line 20) | def symbolic(g, features, masks, kernel_size, group_size, scale_factor): method forward (line 30) | def forward(ctx, features, masks, kernel_size, group_size, scale_factor): method backward (line 58) | def backward(ctx, grad_output): class CARAFENaive (line 84) | class CARAFENaive(Module): method __init__ (line 86) | def __init__(self, kernel_size, group_size, scale_factor): method forward (line 95) | def forward(self, features, masks): class CARAFEFunction (line 100) | class CARAFEFunction(Function): method symbolic (line 103) | def symbolic(g, features, masks, kernel_size, group_size, scale_factor): method forward (line 113) | def forward(ctx, features, masks, kernel_size, group_size, scale_factor): method backward (line 147) | def backward(ctx, grad_output): class CARAFE (line 180) | class CARAFE(Module): method __init__ (line 194) | def __init__(self, kernel_size, group_size, scale_factor): method forward (line 203) | def forward(self, features, masks): class CARAFEPack (line 209) | class CARAFEPack(nn.Module): method __init__ (line 230) | def __init__(self, method init_weights (line 258) | def init_weights(self): method kernel_normalizer (line 264) | def kernel_normalizer(self, mask): method feature_reassemble (line 277) | def feature_reassemble(self, x, mask): method forward (line 281) | def forward(self, x): FILE: annotator/mmpkg/mmcv/ops/cc_attention.py function NEG_INF_DIAG (line 9) | def NEG_INF_DIAG(n, device): class CrissCrossAttention (line 19) | class CrissCrossAttention(nn.Module): method __init__ (line 44) | def __init__(self, in_channels): method forward (line 52) | def forward(self, x): method __repr__ (line 80) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/contour_expand.py function contour_expand (line 10) | def contour_expand(kernel_mask, internal_kernel_label, min_kernel_area, FILE: annotator/mmpkg/mmcv/ops/corner_pool.py class TopPoolFunction (line 17) | class TopPoolFunction(Function): method symbolic (line 20) | def symbolic(g, input): method forward (line 26) | def forward(ctx, input): method backward (line 32) | def backward(ctx, grad_output): class BottomPoolFunction (line 38) | class BottomPoolFunction(Function): method symbolic (line 41) | def symbolic(g, input): method forward (line 47) | def forward(ctx, input): method backward (line 53) | def backward(ctx, grad_output): class LeftPoolFunction (line 59) | class LeftPoolFunction(Function): method symbolic (line 62) | def symbolic(g, input): method forward (line 68) | def forward(ctx, input): method backward (line 74) | def backward(ctx, grad_output): class RightPoolFunction (line 80) | class RightPoolFunction(Function): method symbolic (line 83) | def symbolic(g, input): method forward (line 89) | def forward(ctx, input): method backward (line 95) | def backward(ctx, grad_output): class CornerPool (line 101) | class CornerPool(nn.Module): method __init__ (line 136) | def __init__(self, mode): method forward (line 142) | def forward(self, x): FILE: annotator/mmpkg/mmcv/ops/correlation.py class CorrelationFunction (line 14) | class CorrelationFunction(Function): method forward (line 17) | def forward(ctx, method backward (line 63) | def backward(ctx, grad_output): method _output_size (line 96) | def _output_size(ctx, input1): class Correlation (line 114) | class Correlation(nn.Module): method __init__ (line 167) | def __init__(self, method forward (line 182) | def forward(self, input1: Tensor, input2: Tensor) -> Tensor: method __repr__ (line 188) | def __repr__(self) -> str: FILE: annotator/mmpkg/mmcv/ops/deform_conv.py class DeformConv2dFunction (line 22) | class DeformConv2dFunction(Function): method symbolic (line 25) | def symbolic(g, method forward (line 50) | def forward(ctx, method backward (line 114) | def backward(ctx, grad_output): method _output_size (line 173) | def _output_size(ctx, input, weight): class DeformConv2d (line 192) | class DeformConv2d(nn.Module): method __init__ (line 228) | def __init__(self, method reset_parameters (line 269) | def reset_parameters(self): method forward (line 276) | def forward(self, x: Tensor, offset: Tensor) -> Tensor: method __repr__ (line 315) | def __repr__(self): class DeformConv2dPack (line 331) | class DeformConv2dPack(DeformConv2d): method __init__ (line 358) | def __init__(self, *args, **kwargs): method init_offset (line 370) | def init_offset(self): method forward (line 374) | def forward(self, x): method _load_from_state_dict (line 380) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... FILE: annotator/mmpkg/mmcv/ops/deform_roi_pool.py class DeformRoIPoolFunction (line 13) | class DeformRoIPoolFunction(Function): method symbolic (line 16) | def symbolic(g, input, rois, offset, output_size, spatial_scale, method forward (line 30) | def forward(ctx, method backward (line 67) | def backward(ctx, grad_output): class DeformRoIPool (line 92) | class DeformRoIPool(nn.Module): method __init__ (line 94) | def __init__(self, method forward (line 105) | def forward(self, input, rois, offset=None): class DeformRoIPoolPack (line 111) | class DeformRoIPoolPack(DeformRoIPool): method __init__ (line 113) | def __init__(self, method forward (line 138) | def forward(self, input, rois): class ModulatedDeformRoIPoolPack (line 152) | class ModulatedDeformRoIPoolPack(DeformRoIPool): method __init__ (line 154) | def __init__(self, method forward (line 190) | def forward(self, input, rois): FILE: annotator/mmpkg/mmcv/ops/deprecated_wrappers.py class Conv2d_deprecated (line 9) | class Conv2d_deprecated(Conv2d): method __init__ (line 11) | def __init__(self, *args, **kwargs): class ConvTranspose2d_deprecated (line 18) | class ConvTranspose2d_deprecated(ConvTranspose2d): method __init__ (line 20) | def __init__(self, *args, **kwargs): class MaxPool2d_deprecated (line 28) | class MaxPool2d_deprecated(MaxPool2d): method __init__ (line 30) | def __init__(self, *args, **kwargs): class Linear_deprecated (line 37) | class Linear_deprecated(Linear): method __init__ (line 39) | def __init__(self, *args, **kwargs): FILE: annotator/mmpkg/mmcv/ops/focal_loss.py class SigmoidFocalLossFunction (line 15) | class SigmoidFocalLossFunction(Function): method symbolic (line 18) | def symbolic(g, input, target, gamma, alpha, weight, reduction): method forward (line 29) | def forward(ctx, method backward (line 66) | def backward(ctx, grad_output): class SigmoidFocalLoss (line 88) | class SigmoidFocalLoss(nn.Module): method __init__ (line 90) | def __init__(self, gamma, alpha, weight=None, reduction='mean'): method forward (line 97) | def forward(self, input, target): method __repr__ (line 101) | def __repr__(self): class SoftmaxFocalLossFunction (line 109) | class SoftmaxFocalLossFunction(Function): method symbolic (line 112) | def symbolic(g, input, target, gamma, alpha, weight, reduction): method forward (line 123) | def forward(ctx, method backward (line 171) | def backward(ctx, grad_output): class SoftmaxFocalLoss (line 194) | class SoftmaxFocalLoss(nn.Module): method __init__ (line 196) | def __init__(self, gamma, alpha, weight=None, reduction='mean'): method forward (line 203) | def forward(self, input, target): method __repr__ (line 207) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/furthest_point_sample.py class FurthestPointSampling (line 12) | class FurthestPointSampling(Function): method forward (line 17) | def forward(ctx, points_xyz: torch.Tensor, method backward (line 46) | def backward(xyz, a=None): class FurthestPointSamplingWithDist (line 50) | class FurthestPointSamplingWithDist(Function): method forward (line 55) | def forward(ctx, points_dist: torch.Tensor, method backward (line 78) | def backward(xyz, a=None): FILE: annotator/mmpkg/mmcv/ops/fused_bias_leakyrelu.py class FusedBiasLeakyReLUFunctionBackward (line 108) | class FusedBiasLeakyReLUFunctionBackward(Function): method forward (line 116) | def forward(ctx, grad_output, out, negative_slope, scale): method backward (line 142) | def backward(ctx, gradgrad_input, gradgrad_bias): class FusedBiasLeakyReLUFunction (line 160) | class FusedBiasLeakyReLUFunction(Function): method forward (line 163) | def forward(ctx, input, bias, negative_slope, scale): method backward (line 181) | def backward(ctx, grad_output): class FusedBiasLeakyReLU (line 190) | class FusedBiasLeakyReLU(nn.Module): method __init__ (line 213) | def __init__(self, num_channels, negative_slope=0.2, scale=2**0.5): method forward (line 220) | def forward(self, input): function fused_bias_leakyrelu (line 225) | def fused_bias_leakyrelu(input, bias, negative_slope=0.2, scale=2**0.5): function bias_leakyrelu_ref (line 257) | def bias_leakyrelu_ref(x, bias, negative_slope=0.2, scale=2**0.5): FILE: annotator/mmpkg/mmcv/ops/gather_points.py class GatherPoints (line 10) | class GatherPoints(Function): method forward (line 14) | def forward(ctx, features: torch.Tensor, method backward (line 40) | def backward(ctx, grad_out): FILE: annotator/mmpkg/mmcv/ops/group_points.py class QueryAndGroup (line 16) | class QueryAndGroup(nn.Module): method __init__ (line 39) | def __init__(self, method forward (line 67) | def forward(self, points_xyz, center_xyz, features=None): class GroupAll (line 134) | class GroupAll(nn.Module): method __init__ (line 141) | def __init__(self, use_xyz: bool = True): method forward (line 145) | def forward(self, class GroupingOperation (line 173) | class GroupingOperation(Function): method forward (line 177) | def forward(ctx, features: torch.Tensor, method backward (line 202) | def backward(ctx, FILE: annotator/mmpkg/mmcv/ops/info.py function get_compiler_version (line 10) | def get_compiler_version(): function get_compiling_cuda_version (line 13) | def get_compiling_cuda_version(): function get_compiler_version (line 20) | def get_compiler_version(): function get_compiling_cuda_version (line 23) | def get_compiling_cuda_version(): function get_onnxruntime_op_path (line 27) | def get_onnxruntime_op_path(): FILE: annotator/mmpkg/mmcv/ops/iou3d.py function boxes_iou_bev (line 12) | def boxes_iou_bev(boxes_a, boxes_b): function nms_bev (line 31) | def nms_bev(boxes, scores, thresh, pre_max_size=None, post_max_size=None): function nms_normal_bev (line 65) | def nms_normal_bev(boxes, scores, thresh): FILE: annotator/mmpkg/mmcv/ops/knn.py class KNN (line 9) | class KNN(Function): method forward (line 18) | def forward(ctx, method backward (line 73) | def backward(ctx, a=None): FILE: annotator/mmpkg/mmcv/ops/masked_conv.py class MaskedConv2dFunction (line 16) | class MaskedConv2dFunction(Function): method symbolic (line 19) | def symbolic(g, features, mask, weight, bias, padding, stride): method forward (line 30) | def forward(ctx, features, mask, weight, bias, padding=0, stride=1): method backward (line 79) | def backward(ctx, grad_output): class MaskedConv2d (line 86) | class MaskedConv2d(nn.Conv2d): method __init__ (line 93) | def __init__(self, method forward (line 106) | def forward(self, input, mask=None): FILE: annotator/mmpkg/mmcv/ops/merge_cells.py class BaseMergeCell (line 11) | class BaseMergeCell(nn.Module): method __init__ (line 43) | def __init__(self, method _build_input_conv (line 78) | def _build_input_conv(self, channel, conv_cfg, norm_cfg): method _binary_op (line 89) | def _binary_op(self, x1, x2): method _resize (line 92) | def _resize(self, x, size): method forward (line 103) | def forward(self, x1, x2, out_size=None): class SumCell (line 121) | class SumCell(BaseMergeCell): method __init__ (line 123) | def __init__(self, in_channels, out_channels, **kwargs): method _binary_op (line 126) | def _binary_op(self, x1, x2): class ConcatCell (line 130) | class ConcatCell(BaseMergeCell): method __init__ (line 132) | def __init__(self, in_channels, out_channels, **kwargs): method _binary_op (line 136) | def _binary_op(self, x1, x2): class GlobalPoolingCell (line 141) | class GlobalPoolingCell(BaseMergeCell): method __init__ (line 143) | def __init__(self, in_channels=None, out_channels=None, **kwargs): method _binary_op (line 147) | def _binary_op(self, x1, x2): FILE: annotator/mmpkg/mmcv/ops/modulated_deform_conv.py class ModulatedDeformConv2dFunction (line 19) | class ModulatedDeformConv2dFunction(Function): method symbolic (line 22) | def symbolic(g, input, offset, mask, weight, bias, stride, padding, method forward (line 37) | def forward(ctx, method backward (line 97) | def backward(ctx, grad_output): method _output_size (line 137) | def _output_size(ctx, input, weight): class ModulatedDeformConv2d (line 156) | class ModulatedDeformConv2d(nn.Module): method __init__ (line 160) | def __init__(self, method init_weights (line 192) | def init_weights(self): method forward (line 201) | def forward(self, x, offset, mask): class ModulatedDeformConv2dPack (line 209) | class ModulatedDeformConv2dPack(ModulatedDeformConv2d): method __init__ (line 228) | def __init__(self, *args, **kwargs): method init_weights (line 240) | def init_weights(self): method forward (line 246) | def forward(self, x): method _load_from_state_dict (line 256) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... FILE: annotator/mmpkg/mmcv/ops/multi_scale_deform_attn.py class MultiScaleDeformableAttnFunction (line 20) | class MultiScaleDeformableAttnFunction(Function): method forward (line 23) | def forward(ctx, value, value_spatial_shapes, value_level_start_index, method backward (line 61) | def backward(ctx, grad_output): function multi_scale_deformable_attn_pytorch (line 94) | def multi_scale_deformable_attn_pytorch(value, value_spatial_shapes, class MultiScaleDeformableAttention (line 155) | class MultiScaleDeformableAttention(BaseModule): method __init__ (line 182) | def __init__(self, method init_weights (line 230) | def init_weights(self): method forward (line 252) | def forward(self, FILE: annotator/mmpkg/mmcv/ops/nms.py class NMSop (line 14) | class NMSop(torch.autograd.Function): method forward (line 17) | def forward(ctx, bboxes, scores, iou_threshold, offset, score_threshold, method symbolic (line 36) | def symbolic(g, bboxes, scores, iou_threshold, offset, score_threshold, class SoftNMSop (line 82) | class SoftNMSop(torch.autograd.Function): method forward (line 85) | def forward(ctx, boxes, scores, iou_threshold, sigma, min_score, method, method symbolic (line 100) | def symbolic(g, boxes, scores, iou_threshold, sigma, min_score, method, function nms (line 118) | def nms(boxes, scores, iou_threshold, offset=0, score_threshold=0, max_n... function soft_nms (line 181) | def soft_nms(boxes, function batched_nms (line 260) | def batched_nms(boxes, scores, idxs, nms_cfg, class_agnostic=False): function nms_match (line 339) | def nms_match(dets, iou_threshold): function nms_rotated (line 376) | def nms_rotated(dets, scores, iou_threshold, labels=None): FILE: annotator/mmpkg/mmcv/ops/pixel_group.py function pixel_group (line 10) | def pixel_group(score, mask, embedding, kernel_label, kernel_contour, FILE: annotator/mmpkg/mmcv/ops/point_sample.py function bilinear_grid_sample (line 12) | def bilinear_grid_sample(im, grid, align_corners=False): function is_in_onnx_export_without_custom_ops (line 87) | def is_in_onnx_export_without_custom_ops(): function normalize (line 94) | def normalize(grid): function denormalize (line 105) | def denormalize(grid): function generate_grid (line 116) | def generate_grid(num_grid, size, device): function rel_roi_point_to_abs_img_point (line 137) | def rel_roi_point_to_abs_img_point(rois, rel_roi_points): function get_shape_from_feature_map (line 168) | def get_shape_from_feature_map(x): function abs_img_point_to_rel_img_point (line 186) | def abs_img_point_to_rel_img_point(abs_img_points, img, spatial_scale=1.): function rel_roi_point_to_rel_img_point (line 216) | def rel_roi_point_to_rel_img_point(rois, function point_sample (line 242) | def point_sample(input, points, align_corners=False, **kwargs): class SimpleRoIAlign (line 276) | class SimpleRoIAlign(nn.Module): method __init__ (line 278) | def __init__(self, output_size, spatial_scale, aligned=True): method forward (line 296) | def forward(self, features, rois): method __repr__ (line 332) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/points_in_boxes.py function points_in_boxes_part (line 11) | def points_in_boxes_part(points, boxes): function points_in_boxes_cpu (line 58) | def points_in_boxes_cpu(points, boxes): function points_in_boxes_all (line 95) | def points_in_boxes_all(points, boxes): FILE: annotator/mmpkg/mmcv/ops/points_sampler.py function calc_square_dist (line 11) | def calc_square_dist(point_feat_a, point_feat_b, norm=True): function get_sampler_cls (line 37) | def get_sampler_cls(sampler_type): class PointsSampler (line 60) | class PointsSampler(nn.Module): method __init__ (line 74) | def __init__(self, method forward (line 92) | def forward(self, points_xyz, features): class DFPSSampler (line 133) | class DFPSSampler(nn.Module): method __init__ (line 136) | def __init__(self): method forward (line 139) | def forward(self, points, features, npoint): class FFPSSampler (line 145) | class FFPSSampler(nn.Module): method __init__ (line 148) | def __init__(self): method forward (line 151) | def forward(self, points, features, npoint): class FSSampler (line 162) | class FSSampler(nn.Module): method __init__ (line 165) | def __init__(self): method forward (line 168) | def forward(self, points, features, npoint): FILE: annotator/mmpkg/mmcv/ops/psa_mask.py class PSAMaskFunction (line 12) | class PSAMaskFunction(Function): method symbolic (line 15) | def symbolic(g, input, psa_type, mask_size): method forward (line 23) | def forward(ctx, input, psa_type, mask_size): method backward (line 48) | def backward(ctx, grad_output): class PSAMask (line 72) | class PSAMask(nn.Module): method __init__ (line 74) | def __init__(self, psa_type, mask_size=None): method forward (line 85) | def forward(self, input): method __repr__ (line 88) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/roi_align.py class RoIAlignFunction (line 14) | class RoIAlignFunction(Function): method symbolic (line 17) | def symbolic(g, input, rois, output_size, spatial_scale, sampling_ratio, method forward (line 64) | def forward(ctx, method backward (line 110) | def backward(ctx, grad_output): class RoIAlign (line 133) | class RoIAlign(nn.Module): method __init__ (line 176) | def __init__(self, method forward (line 192) | def forward(self, input, rois): method __repr__ (line 215) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/roi_align_rotated.py class RoIAlignRotatedFunction (line 11) | class RoIAlignRotatedFunction(Function): method symbolic (line 14) | def symbolic(g, features, rois, out_size, spatial_scale, sample_num, method forward (line 39) | def forward(ctx, method backward (line 82) | def backward(ctx, grad_output): class RoIAlignRotated (line 116) | class RoIAlignRotated(nn.Module): method __init__ (line 159) | def __init__(self, method forward (line 173) | def forward(self, features, rois): FILE: annotator/mmpkg/mmcv/ops/roi_pool.py class RoIPoolFunction (line 14) | class RoIPoolFunction(Function): method symbolic (line 17) | def symbolic(g, input, rois, output_size, spatial_scale): method forward (line 26) | def forward(ctx, input, rois, output_size, spatial_scale=1.0): method backward (line 52) | def backward(ctx, grad_output): class RoIPool (line 71) | class RoIPool(nn.Module): method __init__ (line 73) | def __init__(self, output_size, spatial_scale=1.0): method forward (line 79) | def forward(self, input, rois): method __repr__ (line 82) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/roiaware_pool3d.py class RoIAwarePool3d (line 13) | class RoIAwarePool3d(nn.Module): method __init__ (line 28) | def __init__(self, out_size, max_pts_per_voxel=128, mode='max'): method forward (line 37) | def forward(self, rois, pts, pts_feature): class RoIAwarePool3dFunction (line 54) | class RoIAwarePool3dFunction(Function): method forward (line 57) | def forward(ctx, rois, pts, pts_feature, out_size, max_pts_per_voxel, method backward (line 105) | def backward(ctx, grad_out): FILE: annotator/mmpkg/mmcv/ops/roipoint_pool3d.py class RoIPointPool3d (line 9) | class RoIPointPool3d(nn.Module): method __init__ (line 20) | def __init__(self, num_sampled_points=512): method forward (line 24) | def forward(self, points, point_features, boxes3d): class RoIPointPool3dFunction (line 41) | class RoIPointPool3dFunction(Function): method forward (line 44) | def forward(ctx, points, point_features, boxes3d, num_sampled_points=5... method backward (line 76) | def backward(ctx, grad_out): FILE: annotator/mmpkg/mmcv/ops/saconv.py class SAConv2d (line 12) | class SAConv2d(ConvAWS2d): method __init__ (line 37) | def __init__(self, method init_weights (line 81) | def init_weights(self): method forward (line 90) | def forward(self, x): FILE: annotator/mmpkg/mmcv/ops/scatter_points.py class _DynamicScatter (line 13) | class _DynamicScatter(Function): method forward (line 16) | def forward(ctx, feats, coors, reduce_type='max'): method backward (line 44) | def backward(ctx, grad_voxel_feats, grad_voxel_coors=None): class DynamicScatter (line 59) | class DynamicScatter(nn.Module): method __init__ (line 75) | def __init__(self, voxel_size, point_cloud_range, average_points: bool): method forward_single (line 82) | def forward_single(self, points, coors): method forward (line 98) | def forward(self, points, coors): method __repr__ (line 129) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/sync_bn.py class SyncBatchNormFunction (line 19) | class SyncBatchNormFunction(Function): method symbolic (line 22) | def symbolic(g, input, running_mean, running_var, weight, bias, momentum, method forward (line 38) | def forward(self, input, running_mean, running_var, weight, bias, mome... method backward (line 129) | def backward(self, grad_output): class SyncBatchNorm (line 159) | class SyncBatchNorm(Module): method __init__ (line 193) | def __init__(self, method reset_running_stats (line 230) | def reset_running_stats(self): method reset_parameters (line 236) | def reset_parameters(self): method forward (line 242) | def forward(self, input): method __repr__ (line 270) | def __repr__(self): FILE: annotator/mmpkg/mmcv/ops/three_interpolate.py class ThreeInterpolate (line 12) | class ThreeInterpolate(Function): method forward (line 20) | def forward(ctx, features: torch.Tensor, indices: torch.Tensor, method backward (line 47) | def backward( FILE: annotator/mmpkg/mmcv/ops/three_nn.py class ThreeNN (line 11) | class ThreeNN(Function): method forward (line 19) | def forward(ctx, target: torch.Tensor, method backward (line 47) | def backward(ctx, a=None, b=None): FILE: annotator/mmpkg/mmcv/ops/tin_shift.py class TINShiftFunction (line 17) | class TINShiftFunction(Function): method forward (line 20) | def forward(ctx, input, shift): method backward (line 35) | def backward(ctx, grad_output): class TINShift (line 48) | class TINShift(nn.Module): method forward (line 58) | def forward(self, input, shift): FILE: annotator/mmpkg/mmcv/ops/upfirdn2d.py class UpFirDn2dBackward (line 108) | class UpFirDn2dBackward(Function): method forward (line 111) | def forward(ctx, grad_output, kernel, grad_kernel, up, down, pad, g_pad, method backward (line 152) | def backward(ctx, gradgrad_input): class UpFirDn2d (line 177) | class UpFirDn2d(Function): method forward (line 180) | def forward(ctx, input, kernel, up, down, pad): method backward (line 225) | def backward(ctx, grad_output): function upfirdn2d (line 243) | def upfirdn2d(input, kernel, up=1, down=1, pad=(0, 0)): function upfirdn2d_native (line 290) | def upfirdn2d_native(input, kernel, up_x, up_y, down_x, down_y, pad_x0, ... FILE: annotator/mmpkg/mmcv/ops/voxelize.py class _Voxelization (line 13) | class _Voxelization(Function): method forward (line 16) | def forward(ctx, class Voxelization (line 71) | class Voxelization(nn.Module): method __init__ (line 89) | def __init__(self, method forward (line 116) | def forward(self, input): method __repr__ (line 125) | def __repr__(self): FILE: annotator/mmpkg/mmcv/parallel/_functions.py function scatter (line 6) | def scatter(input, devices, streams=None): function synchronize_stream (line 34) | def synchronize_stream(output, devices, streams): function get_input_device (line 51) | def get_input_device(input): class Scatter (line 64) | class Scatter: method forward (line 67) | def forward(target_gpus, input): FILE: annotator/mmpkg/mmcv/parallel/collate.py function collate (line 11) | def collate(batch, samples_per_gpu=1): FILE: annotator/mmpkg/mmcv/parallel/data_container.py function assert_tensor_type (line 7) | def assert_tensor_type(func): class DataContainer (line 20) | class DataContainer: method __init__ (line 37) | def __init__(self, method __repr__ (line 50) | def __repr__(self): method __len__ (line 53) | def __len__(self): method data (line 57) | def data(self): method datatype (line 61) | def datatype(self): method cpu_only (line 68) | def cpu_only(self): method stack (line 72) | def stack(self): method padding_value (line 76) | def padding_value(self): method pad_dims (line 80) | def pad_dims(self): method size (line 84) | def size(self, *args, **kwargs): method dim (line 88) | def dim(self): FILE: annotator/mmpkg/mmcv/parallel/data_parallel.py class MMDataParallel (line 9) | class MMDataParallel(DataParallel): method __init__ (line 26) | def __init__(self, *args, dim=0, **kwargs): method forward (line 30) | def forward(self, *inputs, **kwargs): method scatter (line 44) | def scatter(self, inputs, kwargs, device_ids): method train_step (line 47) | def train_step(self, *inputs, **kwargs): method val_step (line 69) | def val_step(self, *inputs, **kwargs): FILE: annotator/mmpkg/mmcv/parallel/distributed.py class MMDistributedDataParallel (line 11) | class MMDistributedDataParallel(DistributedDataParallel): method to_kwargs (line 21) | def to_kwargs(self, inputs, kwargs, device_id): method scatter (line 26) | def scatter(self, inputs, kwargs, device_ids): method train_step (line 29) | def train_step(self, *inputs, **kwargs): method val_step (line 72) | def val_step(self, *inputs, **kwargs): FILE: annotator/mmpkg/mmcv/parallel/distributed_deprecated.py class MMDistributedDataParallel (line 14) | class MMDistributedDataParallel(nn.Module): method __init__ (line 16) | def __init__(self, method _dist_broadcast_coalesced (line 29) | def _dist_broadcast_coalesced(self, tensors, buffer_size): method _sync_params (line 37) | def _sync_params(self): method scatter (line 52) | def scatter(self, inputs, kwargs, device_ids): method forward (line 55) | def forward(self, *inputs, **kwargs): method train_step (line 60) | def train_step(self, *inputs, **kwargs): method val_step (line 66) | def val_step(self, *inputs, **kwargs): FILE: annotator/mmpkg/mmcv/parallel/scatter_gather.py function scatter (line 9) | def scatter(inputs, target_gpus, dim=0): function scatter_kwargs (line 49) | def scatter_kwargs(inputs, kwargs, target_gpus, dim=0): FILE: annotator/mmpkg/mmcv/parallel/utils.py function is_module_wrapper (line 5) | def is_module_wrapper(module): FILE: annotator/mmpkg/mmcv/runner/base_module.py class BaseModule (line 14) | class BaseModule(nn.Module, metaclass=ABCMeta): method __init__ (line 33) | def __init__(self, init_cfg=None): method is_init (line 53) | def is_init(self): method init_weights (line 56) | def init_weights(self): method _dump_init_info (line 137) | def _dump_init_info(self, logger_name): method __repr__ (line 166) | def __repr__(self): class Sequential (line 173) | class Sequential(BaseModule, nn.Sequential): method __init__ (line 180) | def __init__(self, *args, init_cfg=None): class ModuleList (line 185) | class ModuleList(BaseModule, nn.ModuleList): method __init__ (line 193) | def __init__(self, modules=None, init_cfg=None): FILE: annotator/mmpkg/mmcv/runner/base_runner.py class BaseRunner (line 21) | class BaseRunner(metaclass=ABCMeta): method __init__ (line 51) | def __init__(self, method model_name (line 139) | def model_name(self): method rank (line 144) | def rank(self): method world_size (line 149) | def world_size(self): method hooks (line 155) | def hooks(self): method epoch (line 160) | def epoch(self): method iter (line 165) | def iter(self): method inner_iter (line 170) | def inner_iter(self): method max_epochs (line 175) | def max_epochs(self): method max_iters (line 180) | def max_iters(self): method train (line 185) | def train(self): method val (line 189) | def val(self): method run (line 193) | def run(self, data_loaders, workflow, **kwargs): method save_checkpoint (line 197) | def save_checkpoint(self, method current_lr (line 205) | def current_lr(self): method current_momentum (line 224) | def current_momentum(self): method register_hook (line 255) | def register_hook(self, hook, priority='NORMAL'): method register_hook_from_cfg (line 283) | def register_hook_from_cfg(self, hook_cfg): method call_hook (line 299) | def call_hook(self, fn_name): method get_hook_info (line 309) | def get_hook_info(self): method load_checkpoint (line 332) | def load_checkpoint(self, method resume (line 345) | def resume(self, method register_lr_hook (line 399) | def register_lr_hook(self, lr_config): method register_momentum_hook (line 420) | def register_momentum_hook(self, momentum_config): method register_optimizer_hook (line 441) | def register_optimizer_hook(self, optimizer_config): method register_checkpoint_hook (line 451) | def register_checkpoint_hook(self, checkpoint_config): method register_logger_hooks (line 461) | def register_logger_hooks(self, log_config): method register_timer_hook (line 470) | def register_timer_hook(self, timer_config): method register_custom_hooks (line 480) | def register_custom_hooks(self, custom_config): method register_profiler_hook (line 493) | def register_profiler_hook(self, profiler_config): method register_training_hooks (line 503) | def register_training_hooks(self, FILE: annotator/mmpkg/mmcv/runner/builder.py function build_runner_constructor (line 10) | def build_runner_constructor(cfg): function build_runner (line 14) | def build_runner(cfg, default_args=None): FILE: annotator/mmpkg/mmcv/runner/checkpoint.py function _get_mmcv_home (line 30) | def _get_mmcv_home(): function load_state_dict (line 41) | def load_state_dict(module, state_dict, strict=False, logger=None): function get_torchvision_models (line 109) | def get_torchvision_models(): function get_external_models (line 121) | def get_external_models(): function get_mmcls_models (line 135) | def get_mmcls_models(): function get_deprecated_model_names (line 142) | def get_deprecated_model_names(): function _process_mmcls_checkpoint (line 151) | def _process_mmcls_checkpoint(checkpoint): class CheckpointLoader (line 162) | class CheckpointLoader: method _register_scheme (line 168) | def _register_scheme(cls, prefixes, loader, force=False): method register_scheme (line 185) | def register_scheme(cls, prefixes, loader=None, force=False): method _get_checkpoint_loader (line 211) | def _get_checkpoint_loader(cls, path): method load_checkpoint (line 227) | def load_checkpoint(cls, filename, map_location=None, logger=None): function load_from_local (line 249) | def load_from_local(filename, map_location): function load_from_http (line 267) | def load_from_http(filename, map_location=None, model_dir=None): function load_from_pavi (line 295) | def load_from_pavi(filename, map_location=None): function load_from_ceph (line 327) | def load_from_ceph(filename, map_location=None, backend='petrel'): function load_from_torchvision (line 368) | def load_from_torchvision(filename, map_location=None): function load_from_openmmlab (line 391) | def load_from_openmmlab(filename, map_location=None): function load_from_mmcls (line 431) | def load_from_mmcls(filename, map_location=None): function _load_checkpoint (line 450) | def _load_checkpoint(filename, map_location=None, logger=None): function _load_checkpoint_with_prefix (line 470) | def _load_checkpoint_with_prefix(prefix, filename, map_location=None): function load_checkpoint (line 503) | def load_checkpoint(model, function weights_to_cpu (line 553) | def weights_to_cpu(state_dict): function _save_to_state_dict (line 570) | def _save_to_state_dict(module, destination, prefix, keep_vars): function get_state_dict (line 590) | def get_state_dict(module, destination=None, prefix='', keep_vars=False): function save_checkpoint (line 634) | def save_checkpoint(model, FILE: annotator/mmpkg/mmcv/runner/default_constructor.py class DefaultRunnerConstructor (line 5) | class DefaultRunnerConstructor: method __init__ (line 36) | def __init__(self, runner_cfg, default_args=None): method __call__ (line 43) | def __call__(self): FILE: annotator/mmpkg/mmcv/runner/dist_utils.py function init_dist (line 14) | def init_dist(launcher, backend='nccl', **kwargs): function _init_dist_pytorch (line 27) | def _init_dist_pytorch(backend, **kwargs): function _init_dist_mpi (line 35) | def _init_dist_mpi(backend, **kwargs): function _init_dist_slurm (line 43) | def _init_dist_slurm(backend, port=None): function get_dist_info (line 78) | def get_dist_info(): function master_only (line 88) | def master_only(func): function allreduce_params (line 99) | def allreduce_params(params, coalesce=True, bucket_size_mb=-1): function allreduce_grads (line 121) | def allreduce_grads(params, coalesce=True, bucket_size_mb=-1): function _allreduce_coalesced (line 145) | def _allreduce_coalesced(tensors, world_size, bucket_size_mb=-1): FILE: annotator/mmpkg/mmcv/runner/epoch_based_runner.py class EpochBasedRunner (line 18) | class EpochBasedRunner(BaseRunner): method run_iter (line 24) | def run_iter(self, data_batch, train_mode, **kwargs): method train (line 40) | def train(self, data_loader, **kwargs): method val (line 58) | def val(self, data_loader, **kwargs): method run (line 72) | def run(self, data_loaders, workflow, max_epochs=None, **kwargs): method save_checkpoint (line 132) | def save_checkpoint(self, class Runner (line 181) | class Runner(EpochBasedRunner): method __init__ (line 184) | def __init__(self, *args, **kwargs): FILE: annotator/mmpkg/mmcv/runner/fp16_utils.py function cast_tensor_type (line 24) | def cast_tensor_type(inputs, src_type, dst_type): function auto_fp16 (line 55) | def auto_fp16(apply_to=None, out_fp32=False): function force_fp32 (line 141) | def force_fp32(apply_to=None, out_fp16=False): function allreduce_grads (line 227) | def allreduce_grads(params, coalesce=True, bucket_size_mb=-1): function wrap_fp16_model (line 234) | def wrap_fp16_model(model): function patch_norm_fp32 (line 263) | def patch_norm_fp32(module): function patch_forward_method (line 283) | def patch_forward_method(func, src_type, dst_type, convert_output=True): class LossScaler (line 306) | class LossScaler: method __init__ (line 335) | def __init__(self, method has_overflow (line 349) | def has_overflow(self, params): method _has_inf_or_nan (line 358) | def _has_inf_or_nan(x): method update_scale (line 372) | def update_scale(self, overflow): method state_dict (line 385) | def state_dict(self): method load_state_dict (line 395) | def load_state_dict(self, state_dict): method loss_scale (line 409) | def loss_scale(self): FILE: annotator/mmpkg/mmcv/runner/hooks/checkpoint.py class CheckpointHook (line 11) | class CheckpointHook(Hook): method __init__ (line 51) | def __init__(self, method before_run (line 71) | def before_run(self, runner): method after_train_epoch (line 102) | def after_train_epoch(self, runner): method _save_checkpoint (line 119) | def _save_checkpoint(self, runner): method after_train_iter (line 153) | def after_train_iter(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/closure.py class ClosureHook (line 6) | class ClosureHook(Hook): method __init__ (line 8) | def __init__(self, fn_name, fn): FILE: annotator/mmpkg/mmcv/runner/hooks/ema.py class EMAHook (line 7) | class EMAHook(Hook): method __init__ (line 29) | def __init__(self, method before_run (line 41) | def before_run(self, runner): method after_train_iter (line 60) | def after_train_iter(self, runner): method after_train_epoch (line 73) | def after_train_epoch(self, runner): method before_train_epoch (line 78) | def before_train_epoch(self, runner): method _swap_ema_parameters (line 83) | def _swap_ema_parameters(self): FILE: annotator/mmpkg/mmcv/runner/hooks/evaluation.py class EvalHook (line 16) | class EvalHook(Hook): method __init__ (line 85) | def __init__(self, method _init_rule (line 153) | def _init_rule(self, rule, key_indicator): method before_run (line 202) | def before_run(self, runner): method before_train_iter (line 228) | def before_train_iter(self, runner): method before_train_epoch (line 236) | def before_train_epoch(self, runner): method after_train_iter (line 244) | def after_train_iter(self, runner): method after_train_epoch (line 264) | def after_train_epoch(self, runner): method _do_evaluate (line 269) | def _do_evaluate(self, runner): method _should_evaluate (line 279) | def _should_evaluate(self, runner): method _save_ckpt (line 314) | def _save_ckpt(self, runner, key_score): method evaluate (line 354) | def evaluate(self, runner, results): class DistEvalHook (line 387) | class DistEvalHook(EvalHook): method __init__ (line 439) | def __init__(self, method _do_evaluate (line 478) | def _do_evaluate(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/hook.py class Hook (line 7) | class Hook: method before_run (line 13) | def before_run(self, runner): method after_run (line 16) | def after_run(self, runner): method before_epoch (line 19) | def before_epoch(self, runner): method after_epoch (line 22) | def after_epoch(self, runner): method before_iter (line 25) | def before_iter(self, runner): method after_iter (line 28) | def after_iter(self, runner): method before_train_epoch (line 31) | def before_train_epoch(self, runner): method before_val_epoch (line 34) | def before_val_epoch(self, runner): method after_train_epoch (line 37) | def after_train_epoch(self, runner): method after_val_epoch (line 40) | def after_val_epoch(self, runner): method before_train_iter (line 43) | def before_train_iter(self, runner): method before_val_iter (line 46) | def before_val_iter(self, runner): method after_train_iter (line 49) | def after_train_iter(self, runner): method after_val_iter (line 52) | def after_val_iter(self, runner): method every_n_epochs (line 55) | def every_n_epochs(self, runner, n): method every_n_inner_iters (line 58) | def every_n_inner_iters(self, runner, n): method every_n_iters (line 61) | def every_n_iters(self, runner, n): method end_of_epoch (line 64) | def end_of_epoch(self, runner): method is_last_epoch (line 67) | def is_last_epoch(self, runner): method is_last_iter (line 70) | def is_last_iter(self, runner): method get_triggered_stages (line 73) | def get_triggered_stages(self): FILE: annotator/mmpkg/mmcv/runner/hooks/iter_timer.py class IterTimerHook (line 8) | class IterTimerHook(Hook): method before_epoch (line 10) | def before_epoch(self, runner): method before_iter (line 13) | def before_iter(self, runner): method after_iter (line 16) | def after_iter(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/base.py class LoggerHook (line 11) | class LoggerHook(Hook): method __init__ (line 24) | def __init__(self, method log (line 35) | def log(self, runner): method is_scalar (line 39) | def is_scalar(val, include_np=True, include_torch=True): method get_mode (line 59) | def get_mode(self, runner): method get_epoch (line 72) | def get_epoch(self, runner): method get_iter (line 84) | def get_iter(self, runner, inner_iter=False): method get_lr_tags (line 92) | def get_lr_tags(self, runner): method get_momentum_tags (line 102) | def get_momentum_tags(self, runner): method get_loggable_tags (line 112) | def get_loggable_tags(self, method before_run (line 133) | def before_run(self, runner): method before_epoch (line 139) | def before_epoch(self, runner): method after_train_iter (line 142) | def after_train_iter(self, runner): method after_train_epoch (line 156) | def after_train_epoch(self, runner): method after_val_epoch (line 162) | def after_val_epoch(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/dvclive.py class DvcliveLoggerHook (line 8) | class DvcliveLoggerHook(LoggerHook): method __init__ (line 29) | def __init__(self, method import_dvclive (line 41) | def import_dvclive(self): method before_run (line 50) | def before_run(self, runner): method log (line 54) | def log(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/mlflow.py class MlflowLoggerHook (line 8) | class MlflowLoggerHook(LoggerHook): method __init__ (line 10) | def __init__(self, method import_mlflow (line 51) | def import_mlflow(self): method before_run (line 62) | def before_run(self, runner): method log (line 70) | def log(self, runner): method after_run (line 76) | def after_run(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/neptune.py class NeptuneLoggerHook (line 8) | class NeptuneLoggerHook(LoggerHook): method __init__ (line 38) | def __init__(self, method import_neptune (line 52) | def import_neptune(self): method before_run (line 62) | def before_run(self, runner): method log (line 69) | def log(self, runner): method after_run (line 81) | def after_run(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/pavi.py class PaviLoggerHook (line 17) | class PaviLoggerHook(LoggerHook): method __init__ (line 19) | def __init__(self, method before_run (line 36) | def before_run(self, runner): method get_step (line 74) | def get_step(self, runner): method log (line 82) | def log(self, runner): method after_run (line 89) | def after_run(self, runner): method before_epoch (line 107) | def before_epoch(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/tensorboard.py class TensorboardLoggerHook (line 11) | class TensorboardLoggerHook(LoggerHook): method __init__ (line 13) | def __init__(self, method before_run (line 24) | def before_run(self, runner): method log (line 47) | def log(self, runner): method after_run (line 56) | def after_run(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/text.py class TextLoggerHook (line 18) | class TextLoggerHook(LoggerHook): method __init__ (line 55) | def __init__(self, method before_run (line 89) | def before_run(self, runner): method _get_max_memory (line 109) | def _get_max_memory(self, runner): method _log_info (line 119) | def _log_info(self, log_dict, runner): method _dump_log (line 185) | def _dump_log(self, log_dict, runner): method _round_float (line 196) | def _round_float(self, items): method log (line 204) | def log(self, runner): method after_run (line 238) | def after_run(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/logger/wandb.py class WandbLoggerHook (line 8) | class WandbLoggerHook(LoggerHook): method __init__ (line 10) | def __init__(self, method import_wandb (line 25) | def import_wandb(self): method before_run (line 34) | def before_run(self, runner): method log (line 44) | def log(self, runner): method after_run (line 55) | def after_run(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/lr_updater.py class LrUpdaterHook (line 9) | class LrUpdaterHook(Hook): method __init__ (line 25) | def __init__(self, method _set_lr (line 58) | def _set_lr(self, runner, lr_groups): method get_lr (line 68) | def get_lr(self, runner, base_lr): method get_regular_lr (line 71) | def get_regular_lr(self, runner): method get_warmup_lr (line 85) | def get_warmup_lr(self, cur_iters): method before_run (line 107) | def before_run(self, runner): method before_train_epoch (line 126) | def before_train_epoch(self, runner): method before_train_iter (line 137) | def before_train_iter(self, runner): class FixedLrUpdaterHook (line 157) | class FixedLrUpdaterHook(LrUpdaterHook): method __init__ (line 159) | def __init__(self, **kwargs): method get_lr (line 162) | def get_lr(self, runner, base_lr): class StepLrUpdaterHook (line 167) | class StepLrUpdaterHook(LrUpdaterHook): method __init__ (line 180) | def __init__(self, step, gamma=0.1, min_lr=None, **kwargs): method get_lr (line 193) | def get_lr(self, runner, base_lr): class ExpLrUpdaterHook (line 214) | class ExpLrUpdaterHook(LrUpdaterHook): method __init__ (line 216) | def __init__(self, gamma, **kwargs): method get_lr (line 220) | def get_lr(self, runner, base_lr): class PolyLrUpdaterHook (line 226) | class PolyLrUpdaterHook(LrUpdaterHook): method __init__ (line 228) | def __init__(self, power=1., min_lr=0., **kwargs): method get_lr (line 233) | def get_lr(self, runner, base_lr): class InvLrUpdaterHook (line 245) | class InvLrUpdaterHook(LrUpdaterHook): method __init__ (line 247) | def __init__(self, gamma, power=1., **kwargs): method get_lr (line 252) | def get_lr(self, runner, base_lr): class CosineAnnealingLrUpdaterHook (line 258) | class CosineAnnealingLrUpdaterHook(LrUpdaterHook): method __init__ (line 260) | def __init__(self, min_lr=None, min_lr_ratio=None, **kwargs): method get_lr (line 266) | def get_lr(self, runner, base_lr): class FlatCosineAnnealingLrUpdaterHook (line 282) | class FlatCosineAnnealingLrUpdaterHook(LrUpdaterHook): method __init__ (line 298) | def __init__(self, method get_lr (line 314) | def get_lr(self, runner, base_lr): class CosineRestartLrUpdaterHook (line 336) | class CosineRestartLrUpdaterHook(LrUpdaterHook): method __init__ (line 349) | def __init__(self, method get_lr (line 368) | def get_lr(self, runner, base_lr): function get_position_from_periods (line 388) | def get_position_from_periods(iteration, cumulative_periods): class CyclicLrUpdaterHook (line 412) | class CyclicLrUpdaterHook(LrUpdaterHook): method __init__ (line 434) | def __init__(self, method before_run (line 472) | def before_run(self, runner): method get_lr (line 485) | def get_lr(self, runner, base_lr): class OneCycleLrUpdaterHook (line 498) | class OneCycleLrUpdaterHook(LrUpdaterHook): method __init__ (line 532) | def __init__(self, method before_run (line 575) | def before_run(self, runner): method get_lr (line 614) | def get_lr(self, runner, base_lr): function annealing_cos (line 627) | def annealing_cos(start, end, factor, weight=1): function annealing_linear (line 645) | def annealing_linear(start, end, factor): function format_param (line 659) | def format_param(name, optim, param): FILE: annotator/mmpkg/mmcv/runner/hooks/memory.py class EmptyCacheHook (line 8) | class EmptyCacheHook(Hook): method __init__ (line 10) | def __init__(self, before_epoch=False, after_epoch=True, after_iter=Fa... method after_iter (line 15) | def after_iter(self, runner): method before_epoch (line 19) | def before_epoch(self, runner): method after_epoch (line 23) | def after_epoch(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/momentum_updater.py class MomentumUpdaterHook (line 7) | class MomentumUpdaterHook(Hook): method __init__ (line 9) | def __init__(self, method _set_momentum (line 35) | def _set_momentum(self, runner, momentum_groups): method get_momentum (line 52) | def get_momentum(self, runner, base_momentum): method get_regular_momentum (line 55) | def get_regular_momentum(self, runner): method get_warmup_momentum (line 71) | def get_warmup_momentum(self, cur_iters): method before_run (line 101) | def before_run(self, runner): method before_train_epoch (line 128) | def before_train_epoch(self, runner): method before_train_iter (line 134) | def before_train_iter(self, runner): class StepMomentumUpdaterHook (line 154) | class StepMomentumUpdaterHook(MomentumUpdaterHook): method __init__ (line 168) | def __init__(self, step, gamma=0.5, min_momentum=None, **kwargs): method get_momentum (line 181) | def get_momentum(self, runner, base_momentum): class CosineAnnealingMomentumUpdaterHook (line 202) | class CosineAnnealingMomentumUpdaterHook(MomentumUpdaterHook): method __init__ (line 204) | def __init__(self, min_momentum=None, min_momentum_ratio=None, **kwargs): method get_momentum (line 210) | def get_momentum(self, runner, base_momentum): class CyclicMomentumUpdaterHook (line 226) | class CyclicMomentumUpdaterHook(MomentumUpdaterHook): method __init__ (line 244) | def __init__(self, method before_run (line 273) | def before_run(self, runner): method get_momentum (line 286) | def get_momentum(self, runner, base_momentum): class OneCycleMomentumUpdaterHook (line 299) | class OneCycleMomentumUpdaterHook(MomentumUpdaterHook): method __init__ (line 333) | def __init__(self, method before_run (line 371) | def before_run(self, runner): method _set_momentum (line 448) | def _set_momentum(self, runner, momentum_groups): method get_momentum (line 465) | def get_momentum(self, runner, param_group): method get_regular_momentum (line 479) | def get_regular_momentum(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/optimizer.py class OptimizerHook (line 22) | class OptimizerHook(Hook): method __init__ (line 24) | def __init__(self, grad_clip=None): method clip_grads (line 27) | def clip_grads(self, params): method after_train_iter (line 33) | def after_train_iter(self, runner): class GradientCumulativeOptimizerHook (line 46) | class GradientCumulativeOptimizerHook(OptimizerHook): method __init__ (line 64) | def __init__(self, cumulative_iters=1, **kwargs): method has_batch_norm (line 76) | def has_batch_norm(self, module): method _init (line 84) | def _init(self, runner): method after_train_iter (line 105) | def after_train_iter(self, runner): class Fp16OptimizerHook (line 134) | class Fp16OptimizerHook(OptimizerHook): method __init__ (line 162) | def __init__(self, method before_run (line 184) | def before_run(self, runner): method copy_grads_to_fp32 (line 193) | def copy_grads_to_fp32(self, fp16_net, fp32_weights): method copy_params_to_fp16 (line 203) | def copy_params_to_fp16(self, fp16_net, fp32_weights): method after_train_iter (line 209) | def after_train_iter(self, runner): method __init__ (line 318) | def __init__(self, method before_run (line 339) | def before_run(self, runner): method copy_grads_to_fp32 (line 367) | def copy_grads_to_fp32(self, fp16_net, fp32_weights): method copy_params_to_fp16 (line 377) | def copy_params_to_fp16(self, fp16_net, fp32_weights): method after_train_iter (line 383) | def after_train_iter(self, runner): class GradientCumulativeFp16OptimizerHook (line 242) | class GradientCumulativeFp16OptimizerHook(GradientCumulativeOptimizerHook, method __init__ (line 251) | def __init__(self, *args, **kwargs): method after_train_iter (line 255) | def after_train_iter(self, runner): method __init__ (line 444) | def __init__(self, *args, **kwargs): method after_train_iter (line 448) | def after_train_iter(self, runner): class Fp16OptimizerHook (line 297) | class Fp16OptimizerHook(OptimizerHook): method __init__ (line 162) | def __init__(self, method before_run (line 184) | def before_run(self, runner): method copy_grads_to_fp32 (line 193) | def copy_grads_to_fp32(self, fp16_net, fp32_weights): method copy_params_to_fp16 (line 203) | def copy_params_to_fp16(self, fp16_net, fp32_weights): method after_train_iter (line 209) | def after_train_iter(self, runner): method __init__ (line 318) | def __init__(self, method before_run (line 339) | def before_run(self, runner): method copy_grads_to_fp32 (line 367) | def copy_grads_to_fp32(self, fp16_net, fp32_weights): method copy_params_to_fp16 (line 377) | def copy_params_to_fp16(self, fp16_net, fp32_weights): method after_train_iter (line 383) | def after_train_iter(self, runner): class GradientCumulativeFp16OptimizerHook (line 439) | class GradientCumulativeFp16OptimizerHook(GradientCumulativeOptimizerHook, method __init__ (line 251) | def __init__(self, *args, **kwargs): method after_train_iter (line 255) | def after_train_iter(self, runner): method __init__ (line 444) | def __init__(self, *args, **kwargs): method after_train_iter (line 448) | def after_train_iter(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/profiler.py class ProfilerHook (line 12) | class ProfilerHook(Hook): method __init__ (line 55) | def __init__(self, method before_run (line 107) | def before_run(self, runner): method after_train_epoch (line 166) | def after_train_epoch(self, runner): method after_train_iter (line 174) | def after_train_iter(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/sampler_seed.py class DistSamplerSeedHook (line 6) | class DistSamplerSeedHook(Hook): method before_epoch (line 14) | def before_epoch(self, runner): FILE: annotator/mmpkg/mmcv/runner/hooks/sync_buffer.py class SyncBuffersHook (line 7) | class SyncBuffersHook(Hook): method __init__ (line 16) | def __init__(self, distributed=True): method after_epoch (line 19) | def after_epoch(self, runner): FILE: annotator/mmpkg/mmcv/runner/iter_based_runner.py class IterLoader (line 19) | class IterLoader: method __init__ (line 21) | def __init__(self, dataloader): method epoch (line 27) | def epoch(self): method __next__ (line 30) | def __next__(self): method __len__ (line 43) | def __len__(self): class IterBasedRunner (line 48) | class IterBasedRunner(BaseRunner): method train (line 54) | def train(self, data_loader, **kwargs): method val (line 72) | def val(self, data_loader, **kwargs): method run (line 87) | def run(self, data_loaders, workflow, max_iters=None, **kwargs): method resume (line 140) | def resume(self, method save_checkpoint (line 179) | def save_checkpoint(self, method register_training_hooks (line 224) | def register_training_hooks(self, FILE: annotator/mmpkg/mmcv/runner/log_buffer.py class LogBuffer (line 7) | class LogBuffer: method __init__ (line 9) | def __init__(self): method clear (line 15) | def clear(self): method clear_output (line 20) | def clear_output(self): method update (line 24) | def update(self, vars, count=1): method average (line 33) | def average(self, n=0): FILE: annotator/mmpkg/mmcv/runner/optimizer/builder.py function register_torch_optimizers (line 13) | def register_torch_optimizers(): function build_optimizer_constructor (line 29) | def build_optimizer_constructor(cfg): function build_optimizer (line 33) | def build_optimizer(model, cfg): FILE: annotator/mmpkg/mmcv/runner/optimizer/default_constructor.py class DefaultOptimizerConstructor (line 13) | class DefaultOptimizerConstructor: method __init__ (line 95) | def __init__(self, optimizer_cfg, paramwise_cfg=None): method _validate_cfg (line 105) | def _validate_cfg(self): method _is_in (line 128) | def _is_in(self, param_group, param_group_list): method add_params (line 137) | def add_params(self, params, module, prefix='', is_dcn_module=None): method __call__ (line 234) | def __call__(self, model): FILE: annotator/mmpkg/mmcv/runner/priority.py class Priority (line 5) | class Priority(Enum): function get_priority (line 42) | def get_priority(priority): FILE: annotator/mmpkg/mmcv/runner/utils.py function get_host_info (line 16) | def get_host_info(): function get_time_str (line 31) | def get_time_str(): function obj_from_dict (line 35) | def obj_from_dict(info, parent=None, default_args=None): function set_random_seed (line 70) | def set_random_seed(seed, deterministic=False, use_rank_shift=False): FILE: annotator/mmpkg/mmcv/utils/config.py class ConfigDict (line 33) | class ConfigDict(Dict): method __missing__ (line 35) | def __missing__(self, name): method __getattr__ (line 38) | def __getattr__(self, name): function add_args (line 51) | def add_args(parser, cfg, prefix=''): class Config (line 70) | class Config: method _validate_py_syntax (line 96) | def _validate_py_syntax(filename): method _substitute_predefined_vars (line 107) | def _substitute_predefined_vars(filename, temp_config_name): method _pre_substitute_base_vars (line 128) | def _pre_substitute_base_vars(filename, temp_config_name): method _substitute_base_vars (line 147) | def _substitute_base_vars(cfg, base_var_dict, base_cfg): method _file2dict (line 179) | def _file2dict(filename, use_predefined_variables=True): method _merge_a_into_b (line 274) | def _merge_a_into_b(a, b, allow_list_keys=False): method fromfile (line 328) | def fromfile(filename, method fromstring (line 338) | def fromstring(cfg_str, file_format): method auto_argparser (line 366) | def auto_argparser(description=None): method __init__ (line 377) | def __init__(self, cfg_dict=None, cfg_text=None, filename=None): method filename (line 399) | def filename(self): method text (line 403) | def text(self): method pretty_text (line 407) | def pretty_text(self): method __repr__ (line 500) | def __repr__(self): method __len__ (line 503) | def __len__(self): method __getattr__ (line 506) | def __getattr__(self, name): method __getitem__ (line 509) | def __getitem__(self, name): method __setattr__ (line 512) | def __setattr__(self, name, value): method __setitem__ (line 517) | def __setitem__(self, name, value): method __iter__ (line 522) | def __iter__(self): method __getstate__ (line 525) | def __getstate__(self): method __setstate__ (line 528) | def __setstate__(self, state): method dump (line 534) | def dump(self, file=None): method merge_from_dict (line 550) | def merge_from_dict(self, options, allow_list_keys=True): class DictAction (line 597) | class DictAction(Action): method _parse_int_float_bool (line 607) | def _parse_int_float_bool(val): method _parse_iterable (line 621) | def _parse_iterable(val): method __call__ (line 683) | def __call__(self, parser, namespace, values, option_string=None): FILE: annotator/mmpkg/mmcv/utils/env.py function collect_env (line 16) | def collect_env(): FILE: annotator/mmpkg/mmcv/utils/ext_loader.py function load_ext (line 12) | def load_ext(name, funcs): function get_fake_func (line 41) | def get_fake_func(name, e): function load_ext (line 49) | def load_ext(name, funcs): function check_ops_exist (line 69) | def check_ops_exist(): FILE: annotator/mmpkg/mmcv/utils/logging.py function get_logger (line 9) | def get_logger(name, log_file=None, log_level=logging.INFO, file_mode='w'): function print_log (line 85) | def print_log(msg, logger=None, level=logging.INFO): FILE: annotator/mmpkg/mmcv/utils/misc.py function _ntuple (line 14) | def _ntuple(n): function is_str (line 31) | def is_str(x): function import_modules_from_strings (line 39) | def import_modules_from_strings(imports, allow_failed_imports=False): function iter_cast (line 87) | def iter_cast(inputs, dst_type, return_type=None): function list_cast (line 112) | def list_cast(inputs, dst_type): function tuple_cast (line 120) | def tuple_cast(inputs, dst_type): function is_seq_of (line 128) | def is_seq_of(seq, expected_type, seq_type=None): function is_list_of (line 152) | def is_list_of(seq, expected_type): function is_tuple_of (line 160) | def is_tuple_of(seq, expected_type): function slice_list (line 168) | def slice_list(in_list, lens): function concat_list (line 194) | def concat_list(in_list): function check_prerequisites (line 206) | def check_prerequisites( function _check_py_package (line 244) | def _check_py_package(package): function _check_executable (line 253) | def _check_executable(cmd): function requires_package (line 260) | def requires_package(prerequisites): function requires_executable (line 276) | def requires_executable(prerequisites): function deprecated_api_warning (line 288) | def deprecated_api_warning(name_dict, cls_name=None): function is_method_overridden (line 348) | def is_method_overridden(method, base_class, derived_class): function has_method (line 367) | def has_method(obj: object, method: str) -> bool: FILE: annotator/mmpkg/mmcv/utils/parrots_jit.py function jit (line 12) | def jit(func=None, function skip_no_elena (line 36) | def skip_no_elena(func): FILE: annotator/mmpkg/mmcv/utils/parrots_wrapper.py function is_rocm_pytorch (line 9) | def is_rocm_pytorch() -> bool: function _get_cuda_home (line 21) | def _get_cuda_home(): function get_build_config (line 33) | def get_build_config(): function _get_conv (line 41) | def _get_conv(): function _get_dataloader (line 49) | def _get_dataloader(): function _get_extension (line 58) | def _get_extension(): function _get_pool (line 69) | def _get_pool(): function _get_norm (line 81) | def _get_norm(): class SyncBatchNorm (line 99) | class SyncBatchNorm(SyncBatchNorm_): method _check_input_dim (line 101) | def _check_input_dim(self, input): FILE: annotator/mmpkg/mmcv/utils/path.py function is_filepath (line 9) | def is_filepath(x): function fopen (line 13) | def fopen(filepath, *args, **kwargs): function check_file_exist (line 21) | def check_file_exist(filename, msg_tmpl='file "{}" does not exist'): function mkdir_or_exist (line 26) | def mkdir_or_exist(dir_name, mode=0o777): function symlink (line 33) | def symlink(src, dst, overwrite=True, **kwargs): function scandir (line 39) | def scandir(dir_path, suffix=None, recursive=False, case_sensitive=True): function find_vcs_root (line 83) | def find_vcs_root(path, markers=('.git', )): FILE: annotator/mmpkg/mmcv/utils/progressbar.py class ProgressBar (line 10) | class ProgressBar: method __init__ (line 13) | def __init__(self, task_num=0, bar_width=50, start=True, file=sys.stdo... method terminal_width (line 22) | def terminal_width(self): method start (line 26) | def start(self): method update (line 35) | def update(self, num_tasks=1): function track_progress (line 64) | def track_progress(func, tasks, bar_width=50, file=sys.stdout, **kwargs): function init_pool (line 98) | def init_pool(process_num, initializer=None, initargs=None): function track_parallel_progress (line 109) | def track_parallel_progress(func, function track_iter_progress (line 179) | def track_iter_progress(tasks, bar_width=50, file=sys.stdout): FILE: annotator/mmpkg/mmcv/utils/registry.py function build_from_cfg (line 9) | def build_from_cfg(cfg, registry, default_args=None): class Registry (line 58) | class Registry: method __init__ (line 88) | def __init__(self, name, build_func=None, parent=None, scope=None): method __len__ (line 112) | def __len__(self): method __contains__ (line 115) | def __contains__(self, key): method __repr__ (line 118) | def __repr__(self): method infer_scope (line 125) | def infer_scope(): method split_scope_key (line 149) | def split_scope_key(key): method name (line 171) | def name(self): method scope (line 175) | def scope(self): method module_dict (line 179) | def module_dict(self): method children (line 183) | def children(self): method get (line 186) | def get(self, key): method build (line 211) | def build(self, *args, **kwargs): method _add_children (line 214) | def _add_children(self, registry): method _register_module (line 235) | def _register_module(self, module_class, module_name=None, force=False): method deprecated_register_module (line 250) | def deprecated_register_module(self, cls=None, force=False): method register_module (line 260) | def register_module(self, name=None, force=False, module=None): FILE: annotator/mmpkg/mmcv/utils/testing.py function check_python_script (line 10) | def check_python_script(cmd): function _any (line 25) | def _any(judge_result): function assert_dict_contains_subset (line 42) | def assert_dict_contains_subset(dict_obj: Dict[Any, Any], function assert_attrs_equal (line 61) | def assert_attrs_equal(obj: Any, expected_attrs: Dict[str, Any]) -> bool: function assert_dict_has_keys (line 77) | def assert_dict_has_keys(obj: Dict[str, Any], function assert_keys_equal (line 92) | def assert_keys_equal(result_keys: List[str], target_keys: List[str]) ->... function assert_is_norm_layer (line 105) | def assert_is_norm_layer(module) -> bool: function assert_params_all_zeros (line 120) | def assert_params_all_zeros(module) -> bool: FILE: annotator/mmpkg/mmcv/utils/timer.py class TimerError (line 5) | class TimerError(Exception): method __init__ (line 7) | def __init__(self, message): class Timer (line 12) | class Timer: method __init__ (line 38) | def __init__(self, start=True, print_tmpl=None): method is_running (line 45) | def is_running(self): method __enter__ (line 49) | def __enter__(self): method __exit__ (line 53) | def __exit__(self, type, value, traceback): method start (line 57) | def start(self): method since_start (line 64) | def since_start(self): method since_last_check (line 74) | def since_last_check(self): function check_time (line 92) | def check_time(timer_id): FILE: annotator/mmpkg/mmcv/utils/trace.py function is_jit_tracing (line 8) | def is_jit_tracing() -> bool: FILE: annotator/mmpkg/mmcv/utils/version_utils.py function digit_version (line 9) | def digit_version(version_str: str, length: int = 4): function _minimal_ext_cmd (line 50) | def _minimal_ext_cmd(cmd): function get_git_hash (line 66) | def get_git_hash(fallback='unknown', digits=None): FILE: annotator/mmpkg/mmcv/version.py function parse_version_info (line 5) | def parse_version_info(version_str: str, length: int = 4) -> tuple: FILE: annotator/mmpkg/mmcv/video/io.py class Cache (line 14) | class Cache: method __init__ (line 16) | def __init__(self, capacity): method capacity (line 23) | def capacity(self): method size (line 27) | def size(self): method put (line 30) | def put(self, key, val): method get (line 37) | def get(self, key, default=None): class VideoReader (line 42) | class VideoReader: method __init__ (line 64) | def __init__(self, filename, cache_capacity=10): method vcap (line 80) | def vcap(self): method opened (line 85) | def opened(self): method width (line 90) | def width(self): method height (line 95) | def height(self): method resolution (line 100) | def resolution(self): method fps (line 105) | def fps(self): method frame_cnt (line 110) | def frame_cnt(self): method fourcc (line 115) | def fourcc(self): method position (line 120) | def position(self): method _get_real_position (line 124) | def _get_real_position(self): method _set_real_position (line 127) | def _set_real_position(self, frame_id): method read (line 134) | def read(self): method get_frame (line 160) | def get_frame(self, frame_id): method current_frame (line 187) | def current_frame(self): method cvt2frames (line 198) | def cvt2frames(self, method __len__ (line 240) | def __len__(self): method __getitem__ (line 243) | def __getitem__(self, index): method __iter__ (line 256) | def __iter__(self): method __next__ (line 260) | def __next__(self): method __enter__ (line 269) | def __enter__(self): method __exit__ (line 272) | def __exit__(self, exc_type, exc_value, traceback): function frames2video (line 276) | def frames2video(frame_dir, FILE: annotator/mmpkg/mmcv/video/optflow.py function flowread (line 12) | def flowread(flow_or_path, quantize=False, concat_axis=0, *args, **kwargs): function flowwrite (line 61) | def flowwrite(flow, filename, quantize=False, concat_axis=0, *args, **kw... function quantize_flow (line 91) | def quantize_flow(flow, max_val=0.02, norm=True): function dequantize_flow (line 119) | def dequantize_flow(dx, dy, max_val=0.02, denorm=True): function flow_warp (line 143) | def flow_warp(img, flow, filling_value=0, interpolate_mode='nearest'): function flow_from_bytes (line 204) | def flow_from_bytes(content): function sparse_flow_from_bytes (line 234) | def sparse_flow_from_bytes(content): FILE: annotator/mmpkg/mmcv/video/processing.py function convert_video (line 11) | def convert_video(in_file, function resize_video (line 55) | def resize_video(in_file, function cut_video (line 93) | def cut_video(in_file, function concat_video (line 128) | def concat_video(video_list, FILE: annotator/mmpkg/mmcv/visualization/color.py class Color (line 9) | class Color(Enum): function color_val (line 24) | def color_val(color): FILE: annotator/mmpkg/mmcv/visualization/image.py function imshow (line 9) | def imshow(img, win_name='', wait_time=0): function imshow_bboxes (line 30) | def imshow_bboxes(img, function imshow_det_bboxes (line 84) | def imshow_det_bboxes(img, FILE: annotator/mmpkg/mmcv/visualization/optflow.py function flowshow (line 11) | def flowshow(flow, win_name='', wait_time=0): function flow2rgb (line 24) | def flow2rgb(flow, color_wheel=None, unknown_thr=1e6): function make_color_wheel (line 76) | def make_color_wheel(bins=None): FILE: annotator/mmpkg/mmseg/apis/inference.py function init_segmentor (line 12) | def init_segmentor(config, checkpoint=None, device=devices.get_device_fo... class LoadImage (line 43) | class LoadImage: method __call__ (line 46) | def __call__(self, results): function inference_segmentor (line 70) | def inference_segmentor(model, img): function show_result_pyplot (line 103) | def show_result_pyplot(model, FILE: annotator/mmpkg/mmseg/apis/test.py function np2tmp (line 14) | def np2tmp(array, temp_file_name=None): function single_gpu_test (line 34) | def single_gpu_test(model, function multi_gpu_test (line 106) | def multi_gpu_test(model, function collect_results_cpu (line 164) | def collect_results_cpu(result_part, size, tmpdir=None): function collect_results_gpu (line 207) | def collect_results_gpu(result_part, size): FILE: annotator/mmpkg/mmseg/apis/train.py function set_random_seed (line 14) | def set_random_seed(seed, deterministic=False): function train_segmentor (line 33) | def train_segmentor(model, FILE: annotator/mmpkg/mmseg/core/evaluation/class_names.py function cityscapes_classes (line 4) | def cityscapes_classes(): function ade_classes (line 14) | def ade_classes(): function voc_classes (line 44) | def voc_classes(): function cityscapes_palette (line 54) | def cityscapes_palette(): function ade_palette (line 63) | def ade_palette(): function voc_palette (line 105) | def voc_palette(): function get_classes (line 121) | def get_classes(dataset): function get_palette (line 138) | def get_palette(dataset): FILE: annotator/mmpkg/mmseg/core/evaluation/eval_hooks.py class EvalHook (line 7) | class EvalHook(_EvalHook): method __init__ (line 22) | def __init__(self, *args, by_epoch=False, efficient_test=False, **kwar... method after_train_iter (line 26) | def after_train_iter(self, runner): method after_train_epoch (line 42) | def after_train_epoch(self, runner): class DistEvalHook (line 55) | class DistEvalHook(_DistEvalHook): method __init__ (line 70) | def __init__(self, *args, by_epoch=False, efficient_test=False, **kwar... method after_train_iter (line 74) | def after_train_iter(self, runner): method after_train_epoch (line 93) | def after_train_epoch(self, runner): FILE: annotator/mmpkg/mmseg/core/evaluation/metrics.py function f_score (line 8) | def f_score(precision, recall, beta=1): function intersect_and_union (line 25) | def intersect_and_union(pred_label, function total_intersect_and_union (line 88) | def total_intersect_and_union(results, function mean_iou (line 133) | def mean_iou(results, function mean_dice (line 172) | def mean_dice(results, function mean_fscore (line 212) | def mean_fscore(results, function eval_metrics (line 257) | def eval_metrics(results, FILE: annotator/mmpkg/mmseg/core/seg/builder.py function build_pixel_sampler (line 6) | def build_pixel_sampler(cfg, **default_args): FILE: annotator/mmpkg/mmseg/core/seg/sampler/base_pixel_sampler.py class BasePixelSampler (line 4) | class BasePixelSampler(metaclass=ABCMeta): method __init__ (line 7) | def __init__(self, **kwargs): method sample (line 11) | def sample(self, seg_logit, seg_label): FILE: annotator/mmpkg/mmseg/core/seg/sampler/ohem_pixel_sampler.py class OHEMPixelSampler (line 9) | class OHEMPixelSampler(BasePixelSampler): method __init__ (line 23) | def __init__(self, context, thresh=None, min_kept=100000): method sample (line 30) | def sample(self, seg_logit, seg_label): FILE: annotator/mmpkg/mmseg/core/utils/misc.py function add_prefix (line 1) | def add_prefix(inputs, prefix): FILE: annotator/mmpkg/mmseg/datasets/ade.py class ADE20KDataset (line 6) | class ADE20KDataset(CustomDataset): method __init__ (line 79) | def __init__(self, **kwargs): FILE: annotator/mmpkg/mmseg/datasets/builder.py function _concat_dataset (line 25) | def _concat_dataset(cfg, default_args=None): function build_dataset (line 61) | def build_dataset(cfg, default_args=None): function build_dataloader (line 78) | def build_dataloader(dataset, function worker_init_fn (line 155) | def worker_init_fn(worker_id, num_workers, rank, seed): FILE: annotator/mmpkg/mmseg/datasets/chase_db1.py class ChaseDB1Dataset (line 8) | class ChaseDB1Dataset(CustomDataset): method __init__ (line 21) | def __init__(self, **kwargs): FILE: annotator/mmpkg/mmseg/datasets/cityscapes.py class CityscapesDataset (line 14) | class CityscapesDataset(CustomDataset): method __init__ (line 32) | def __init__(self, **kwargs): method _convert_to_label_id (line 39) | def _convert_to_label_id(result): method results2img (line 50) | def results2img(self, results, imgfile_prefix, to_label_id): method format_results (line 91) | def format_results(self, results, imgfile_prefix=None, to_label_id=True): method evaluate (line 124) | def evaluate(self, method _evaluate_cityscapes (line 164) | def _evaluate_cityscapes(self, results, logger, imgfile_prefix): FILE: annotator/mmpkg/mmseg/datasets/custom.py class CustomDataset (line 18) | class CustomDataset(Dataset): method __init__ (line 74) | def __init__(self, method __len__ (line 115) | def __len__(self): method load_annotations (line 119) | def load_annotations(self, img_dir, img_suffix, ann_dir, seg_map_suffix, method get_ann_info (line 157) | def get_ann_info(self, idx): method pre_pipeline (line 169) | def pre_pipeline(self, results): method __getitem__ (line 177) | def __getitem__(self, idx): method prepare_train_img (line 193) | def prepare_train_img(self, idx): method prepare_test_img (line 210) | def prepare_test_img(self, idx): method format_results (line 226) | def format_results(self, results, **kwargs): method get_gt_seg_maps (line 229) | def get_gt_seg_maps(self, efficient_test=False): method get_classes_and_palette (line 242) | def get_classes_and_palette(self, classes=None, palette=None): method get_palette_for_custom_classes (line 286) | def get_palette_for_custom_classes(self, class_names, palette=None): method evaluate (line 305) | def evaluate(self, FILE: annotator/mmpkg/mmseg/datasets/dataset_wrappers.py class ConcatDataset (line 7) | class ConcatDataset(_ConcatDataset): method __init__ (line 17) | def __init__(self, datasets): class RepeatDataset (line 24) | class RepeatDataset(object): method __init__ (line 37) | def __init__(self, dataset, times): method __getitem__ (line 44) | def __getitem__(self, idx): method __len__ (line 48) | def __len__(self): FILE: annotator/mmpkg/mmseg/datasets/drive.py class DRIVEDataset (line 8) | class DRIVEDataset(CustomDataset): method __init__ (line 21) | def __init__(self, **kwargs): FILE: annotator/mmpkg/mmseg/datasets/hrf.py class HRFDataset (line 8) | class HRFDataset(CustomDataset): method __init__ (line 21) | def __init__(self, **kwargs): FILE: annotator/mmpkg/mmseg/datasets/pascal_context.py class PascalContextDataset (line 8) | class PascalContextDataset(CustomDataset): method __init__ (line 47) | def __init__(self, split, **kwargs): class PascalContextDataset59 (line 58) | class PascalContextDataset59(CustomDataset): method __init__ (line 96) | def __init__(self, split, **kwargs): FILE: annotator/mmpkg/mmseg/datasets/pipelines/compose.py class Compose (line 9) | class Compose(object): method __init__ (line 17) | def __init__(self, transforms): method __call__ (line 29) | def __call__(self, data): method __repr__ (line 45) | def __repr__(self): FILE: annotator/mmpkg/mmseg/datasets/pipelines/formating.py function to_tensor (line 11) | def to_tensor(data): class ToTensor (line 37) | class ToTensor(object): method __init__ (line 44) | def __init__(self, keys): method __call__ (line 47) | def __call__(self, results): method __repr__ (line 62) | def __repr__(self): class ImageToTensor (line 67) | class ImageToTensor(object): method __init__ (line 78) | def __init__(self, keys): method __call__ (line 81) | def __call__(self, results): method __repr__ (line 100) | def __repr__(self): class Transpose (line 105) | class Transpose(object): method __init__ (line 113) | def __init__(self, keys, order): method __call__ (line 117) | def __call__(self, results): method __repr__ (line 133) | def __repr__(self): class ToDataContainer (line 139) | class ToDataContainer(object): method __init__ (line 150) | def __init__(self, method __call__ (line 155) | def __call__(self, results): method __repr__ (line 173) | def __repr__(self): class DefaultFormatBundle (line 178) | class DefaultFormatBundle(object): method __call__ (line 189) | def __call__(self, results): method __repr__ (line 214) | def __repr__(self): class Collect (line 219) | class Collect(object): method __init__ (line 256) | def __init__(self, method __call__ (line 264) | def __call__(self, results): method __repr__ (line 286) | def __repr__(self): FILE: annotator/mmpkg/mmseg/datasets/pipelines/loading.py class LoadImageFromFile (line 10) | class LoadImageFromFile(object): method __init__ (line 31) | def __init__(self, method __call__ (line 42) | def __call__(self, results): method __repr__ (line 81) | def __repr__(self): class LoadAnnotations (line 90) | class LoadAnnotations(object): method __init__ (line 104) | def __init__(self, method __call__ (line 113) | def __call__(self, results): method __repr__ (line 149) | def __repr__(self): FILE: annotator/mmpkg/mmseg/datasets/pipelines/test_time_aug.py class MultiScaleFlipAug (line 10) | class MultiScaleFlipAug(object): method __init__ (line 53) | def __init__(self, method __call__ (line 93) | def __call__(self, results): method __repr__ (line 128) | def __repr__(self): FILE: annotator/mmpkg/mmseg/datasets/pipelines/transforms.py class Resize (line 10) | class Resize(object): method __init__ (line 41) | def __init__(self, method random_select (line 68) | def random_select(img_scales): method random_sample (line 86) | def random_sample(img_scales): method random_sample_ratio (line 113) | def random_sample_ratio(img_scale, ratio_range): method _random_scale (line 139) | def _random_scale(self, results): method _resize_img (line 177) | def _resize_img(self, results): method _resize_seg (line 199) | def _resize_seg(self, results): method __call__ (line 210) | def __call__(self, results): method __repr__ (line 228) | def __repr__(self): class RandomFlip (line 238) | class RandomFlip(object): method __init__ (line 252) | def __init__(self, prob=None, direction='horizontal'): method __call__ (line 259) | def __call__(self, results): method __repr__ (line 288) | def __repr__(self): class Pad (line 293) | class Pad(object): method __init__ (line 308) | def __init__(self, method _pad_img (line 321) | def _pad_img(self, results): method _pad_seg (line 334) | def _pad_seg(self, results): method __call__ (line 342) | def __call__(self, results): method __repr__ (line 356) | def __repr__(self): class Normalize (line 364) | class Normalize(object): method __init__ (line 376) | def __init__(self, mean, std, to_rgb=True): method __call__ (line 381) | def __call__(self, results): method __repr__ (line 398) | def __repr__(self): class Rerange (line 406) | class Rerange(object): method __init__ (line 416) | def __init__(self, min_value=0, max_value=255): method __call__ (line 423) | def __call__(self, results): method __repr__ (line 445) | def __repr__(self): class CLAHE (line 452) | class CLAHE(object): method __init__ (line 465) | def __init__(self, clip_limit=40.0, tile_grid_size=(8, 8)): method __call__ (line 472) | def __call__(self, results): method __repr__ (line 489) | def __repr__(self): class RandomCrop (line 497) | class RandomCrop(object): method __init__ (line 506) | def __init__(self, crop_size, cat_max_ratio=1., ignore_index=255): method get_crop_bbox (line 512) | def get_crop_bbox(self, img): method crop (line 523) | def crop(self, img, crop_bbox): method __call__ (line 529) | def __call__(self, results): method __repr__ (line 565) | def __repr__(self): class RandomRotate (line 570) | class RandomRotate(object): method __init__ (line 588) | def __init__(self, method __call__ (line 609) | def __call__(self, results): method __repr__ (line 641) | def __repr__(self): class RGB2Gray (line 653) | class RGB2Gray(object): method __init__ (line 668) | def __init__(self, out_channels=None, weights=(0.299, 0.587, 0.114)): method __call__ (line 676) | def __call__(self, results): method __repr__ (line 700) | def __repr__(self): class AdjustGamma (line 708) | class AdjustGamma(object): method __init__ (line 716) | def __init__(self, gamma=1.0): method __call__ (line 724) | def __call__(self, results): method __repr__ (line 739) | def __repr__(self): class SegRescale (line 744) | class SegRescale(object): method __init__ (line 751) | def __init__(self, scale_factor=1): method __call__ (line 754) | def __call__(self, results): method __repr__ (line 769) | def __repr__(self): class PhotoMetricDistortion (line 774) | class PhotoMetricDistortion(object): method __init__ (line 794) | def __init__(self, method convert (line 804) | def convert(self, img, alpha=1, beta=0): method brightness (line 810) | def brightness(self, img): method contrast (line 819) | def contrast(self, img): method saturation (line 827) | def saturation(self, img): method hue (line 838) | def hue(self, img): method __call__ (line 848) | def __call__(self, results): method __repr__ (line 881) | def __repr__(self): FILE: annotator/mmpkg/mmseg/datasets/stare.py class STAREDataset (line 8) | class STAREDataset(CustomDataset): method __init__ (line 21) | def __init__(self, **kwargs): FILE: annotator/mmpkg/mmseg/datasets/voc.py class PascalVOCDataset (line 8) | class PascalVOCDataset(CustomDataset): method __init__ (line 26) | def __init__(self, split, **kwargs): FILE: annotator/mmpkg/mmseg/models/backbones/cgnet.py class GlobalContextExtractor (line 13) | class GlobalContextExtractor(nn.Module): method __init__ (line 26) | def __init__(self, channel, reduction=16, with_cp=False): method forward (line 37) | def forward(self, x): class ContextGuidedBlock (line 53) | class ContextGuidedBlock(nn.Module): method __init__ (line 78) | def __init__(self, method forward (line 142) | def forward(self, x): class InputInjection (line 170) | class InputInjection(nn.Module): method __init__ (line 173) | def __init__(self, num_downsampling): method forward (line 179) | def forward(self, x): class CGNet (line 186) | class CGNet(nn.Module): method __init__ (line 215) | def __init__(self, method forward (line 309) | def forward(self, x): method init_weights (line 338) | def init_weights(self, pretrained=None): method train (line 359) | def train(self, mode=True): FILE: annotator/mmpkg/mmseg/models/backbones/fast_scnn.py class LearningToDownsample (line 13) | class LearningToDownsample(nn.Module): method __init__ (line 29) | def __init__(self, method forward (line 66) | def forward(self, x): class GlobalFeatureExtractor (line 73) | class GlobalFeatureExtractor(nn.Module): method __init__ (line 106) | def __init__(self, method _make_layer (line 148) | def _make_layer(self, method forward (line 172) | def forward(self, x): class FeatureFusionModule (line 181) | class FeatureFusionModule(nn.Module): method __init__ (line 199) | def __init__(self, method forward (line 235) | def forward(self, higher_res_feature, lower_res_feature): class FastSCNN (line 250) | class FastSCNN(nn.Module): method __init__ (line 296) | def __init__(self, method init_weights (line 360) | def init_weights(self, pretrained=None): method forward (line 367) | def forward(self, x): FILE: annotator/mmpkg/mmseg/models/backbones/hrnet.py class HRModule (line 13) | class HRModule(nn.Module): method __init__ (line 20) | def __init__(self, method _check_branches (line 46) | def _check_branches(self, num_branches, num_blocks, in_channels, method _make_one_branch (line 64) | def _make_one_branch(self, method _make_branches (line 109) | def _make_branches(self, num_branches, block, num_blocks, num_channels): method _make_fuse_layers (line 119) | def _make_fuse_layers(self): method forward (line 185) | def forward(self, x): class HRNet (line 212) | class HRNet(nn.Module): method __init__ (line 273) | def __init__(self, method norm1 (line 362) | def norm1(self): method norm2 (line 367) | def norm2(self): method _make_transition_layer (line 371) | def _make_transition_layer(self, num_channels_pre_layer, method _make_layer (line 418) | def _make_layer(self, block, inplanes, planes, blocks, stride=1): method _make_stage (line 454) | def _make_stage(self, layer_config, in_channels, multiscale_output=True): method init_weights (line 484) | def init_weights(self, pretrained=None): method forward (line 510) | def forward(self, x): method train (line 547) | def train(self, mode=True): FILE: annotator/mmpkg/mmseg/models/backbones/mobilenet_v2.py class MobileNetV2 (line 13) | class MobileNetV2(nn.Module): method __init__ (line 45) | def __init__(self, method make_layer (line 107) | def make_layer(self, out_channels, num_blocks, stride, dilation, method init_weights (line 136) | def init_weights(self, pretrained=None): method forward (line 149) | def forward(self, x): method _freeze_stages (line 164) | def _freeze_stages(self): method train (line 174) | def train(self, mode=True): FILE: annotator/mmpkg/mmseg/models/backbones/mobilenet_v3.py class MobileNetV3 (line 15) | class MobileNetV3(nn.Module): method __init__ (line 70) | def __init__(self, method _make_layer (line 104) | def _make_layer(self): method init_weights (line 220) | def init_weights(self, pretrained=None): method forward (line 233) | def forward(self, x): method _freeze_stages (line 242) | def _freeze_stages(self): method train (line 249) | def train(self, mode=True): FILE: annotator/mmpkg/mmseg/models/backbones/resnest.py class RSoftmax (line 15) | class RSoftmax(nn.Module): method __init__ (line 23) | def __init__(self, radix, groups): method forward (line 28) | def forward(self, x): class SplitAttentionConv2d (line 39) | class SplitAttentionConv2d(nn.Module): method __init__ (line 58) | def __init__(self, method norm0 (line 108) | def norm0(self): method norm1 (line 113) | def norm1(self): method forward (line 117) | def forward(self, x): class Bottleneck (line 146) | class Bottleneck(_Bottleneck): method __init__ (line 165) | def __init__(self, method forward (line 226) | def forward(self, x): class ResNeSt (line 270) | class ResNeSt(ResNetV1d): method __init__ (line 291) | def __init__(self, method make_res_layer (line 305) | def make_res_layer(self, **kwargs): FILE: annotator/mmpkg/mmseg/models/backbones/resnet.py class BasicBlock (line 13) | class BasicBlock(nn.Module): method __init__ (line 18) | def __init__(self, method norm1 (line 58) | def norm1(self): method norm2 (line 63) | def norm2(self): method forward (line 67) | def forward(self, x): class Bottleneck (line 97) | class Bottleneck(nn.Module): method __init__ (line 106) | def __init__(self, method make_block_plugins (line 219) | def make_block_plugins(self, in_channels, plugins): method forward_plugin (line 242) | def forward_plugin(self, x, plugin_names): method norm1 (line 250) | def norm1(self): method norm2 (line 255) | def norm2(self): method norm3 (line 260) | def norm3(self): method forward (line 264) | def forward(self, x): class ResNet (line 308) | class ResNet(nn.Module): method __init__ (line 373) | def __init__(self, method make_stage_plugins (line 470) | def make_stage_plugins(self, plugins, stage_idx): method make_res_layer (line 523) | def make_res_layer(self, **kwargs): method norm1 (line 528) | def norm1(self): method _make_stem_layer (line 532) | def _make_stem_layer(self, in_channels, stem_channels): method _freeze_stages (line 581) | def _freeze_stages(self): method init_weights (line 600) | def init_weights(self, pretrained=None): method forward (line 632) | def forward(self, x): method train (line 649) | def train(self, mode=True): class ResNetV1c (line 662) | class ResNetV1c(ResNet): method __init__ (line 672) | def __init__(self, **kwargs): class ResNetV1d (line 678) | class ResNetV1d(ResNet): method __init__ (line 686) | def __init__(self, **kwargs): FILE: annotator/mmpkg/mmseg/models/backbones/resnext.py class Bottleneck (line 11) | class Bottleneck(_Bottleneck): method __init__ (line 18) | def __init__(self, class ResNeXt (line 87) | class ResNeXt(ResNet): method __init__ (line 134) | def __init__(self, groups=1, base_width=4, **kwargs): method make_res_layer (line 139) | def make_res_layer(self, **kwargs): FILE: annotator/mmpkg/mmseg/models/backbones/unet.py class BasicConvBlock (line 13) | class BasicConvBlock(nn.Module): method __init__ (line 43) | def __init__(self, method forward (line 76) | def forward(self, x): class DeconvModule (line 87) | class DeconvModule(nn.Module): method __init__ (line 105) | def __init__(self, method forward (line 137) | def forward(self, x): class InterpConv (line 148) | class InterpConv(nn.Module): method __init__ (line 179) | def __init__(self, method forward (line 211) | def forward(self, x): class UNet (line 222) | class UNet(nn.Module): method __init__ (line 277) | def __init__(self, method forward (line 376) | def forward(self, x): method train (line 389) | def train(self, mode=True): method _check_input_divisible (line 399) | def _check_input_divisible(self, x): method init_weights (line 412) | def init_weights(self, pretrained=None): FILE: annotator/mmpkg/mmseg/models/backbones/vit.py class Mlp (line 20) | class Mlp(nn.Module): method __init__ (line 36) | def __init__(self, method forward (line 50) | def forward(self, x): class Attention (line 59) | class Attention(nn.Module): method __init__ (line 72) | def __init__(self, method forward (line 89) | def forward(self, x): class Block (line 105) | class Block(nn.Module): method __init__ (line 128) | def __init__(self, method forward (line 156) | def forward(self, x): class PatchEmbed (line 171) | class PatchEmbed(nn.Module): method __init__ (line 183) | def __init__(self, method forward (line 201) | def forward(self, x): class VisionTransformer (line 206) | class VisionTransformer(nn.Module): method __init__ (line 246) | def __init__(self, method init_weights (line 314) | def init_weights(self, pretrained=None): method _pos_embeding (line 359) | def _pos_embeding(self, img, patched_img, pos_embed): method resize_pos_embed (line 392) | def resize_pos_embed(pos_embed, input_shpae, pos_shape, patch_size, mo... method forward (line 421) | def forward(self, inputs): method train (line 454) | def train(self, mode=True): FILE: annotator/mmpkg/mmseg/models/builder.py function build_backbone (line 15) | def build_backbone(cfg): function build_neck (line 20) | def build_neck(cfg): function build_head (line 25) | def build_head(cfg): function build_loss (line 30) | def build_loss(cfg): function build_segmentor (line 35) | def build_segmentor(cfg, train_cfg=None, test_cfg=None): FILE: annotator/mmpkg/mmseg/models/decode_heads/ann_head.py class PPMConcat (line 10) | class PPMConcat(nn.ModuleList): method __init__ (line 18) | def __init__(self, pool_scales=(1, 3, 6, 8)): method forward (line 22) | def forward(self, feats): class SelfAttentionBlock (line 32) | class SelfAttentionBlock(_SelfAttentionBlock): method __init__ (line 52) | def __init__(self, low_in_channels, high_in_channels, channels, class AFNB (line 79) | class AFNB(nn.Module): method __init__ (line 99) | def __init__(self, low_in_channels, high_in_channels, channels, method forward (line 125) | def forward(self, low_feats, high_feats): class APNB (line 133) | class APNB(nn.Module): method __init__ (line 150) | def __init__(self, in_channels, channels, out_channels, query_scales, method forward (line 175) | def forward(self, feats): class ANNHead (line 184) | class ANNHead(BaseDecodeHead): method __init__ (line 198) | def __init__(self, method forward (line 236) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/apc_head.py class ACM (line 11) | class ACM(nn.Module): method __init__ (line 25) | def __init__(self, pool_scale, fusion, in_channels, channels, conv_cfg, method forward (line 78) | def forward(self, x): class APCHead (line 110) | class APCHead(BaseDecodeHead): method __init__ (line 124) | def __init__(self, pool_scales=(1, 2, 3, 6), fusion=True, **kwargs): method forward (line 149) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/aspp_head.py class ASPPModule (line 10) | class ASPPModule(nn.ModuleList): method __init__ (line 22) | def __init__(self, dilations, in_channels, channels, conv_cfg, norm_cfg, method forward (line 43) | def forward(self, x): class ASPPHead (line 53) | class ASPPHead(BaseDecodeHead): method __init__ (line 64) | def __init__(self, dilations=(1, 6, 12, 18), **kwargs): method forward (line 93) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/cascade_decode_head.py class BaseCascadeDecodeHead (line 6) | class BaseCascadeDecodeHead(BaseDecodeHead, metaclass=ABCMeta): method __init__ (line 10) | def __init__(self, *args, **kwargs): method forward (line 14) | def forward(self, inputs, prev_output): method forward_train (line 18) | def forward_train(self, inputs, prev_output, img_metas, gt_semantic_seg, method forward_test (line 41) | def forward_test(self, inputs, prev_output, img_metas, test_cfg): FILE: annotator/mmpkg/mmseg/models/decode_heads/cc_head.py class CCHead (line 16) | class CCHead(FCNHead): method __init__ (line 27) | def __init__(self, recurrence=2, **kwargs): method forward (line 35) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/da_head.py class PAM (line 12) | class PAM(_SelfAttentionBlock): method __init__ (line 20) | def __init__(self, in_channels, channels): method forward (line 41) | def forward(self, x): class CAM (line 49) | class CAM(nn.Module): method __init__ (line 52) | def __init__(self): method forward (line 56) | def forward(self, x): class DAHead (line 75) | class DAHead(BaseDecodeHead): method __init__ (line 85) | def __init__(self, pam_channels, **kwargs): method pam_cls_seg (line 128) | def pam_cls_seg(self, feat): method cam_cls_seg (line 135) | def cam_cls_seg(self, feat): method forward (line 142) | def forward(self, inputs): method forward_test (line 160) | def forward_test(self, inputs, img_metas, test_cfg): method losses (line 164) | def losses(self, seg_logit, seg_label): FILE: annotator/mmpkg/mmseg/models/decode_heads/decode_head.py class BaseDecodeHead (line 14) | class BaseDecodeHead(nn.Module, metaclass=ABCMeta): method __init__ (line 46) | def __init__(self, method extra_repr (line 88) | def extra_repr(self): method _init_inputs (line 95) | def _init_inputs(self, in_channels, in_index, input_transform): method init_weights (line 133) | def init_weights(self): method _transform_inputs (line 137) | def _transform_inputs(self, inputs): method forward (line 166) | def forward(self, inputs): method forward_train (line 170) | def forward_train(self, inputs, img_metas, gt_semantic_seg, train_cfg): method forward_test (line 190) | def forward_test(self, inputs, img_metas, test_cfg): method cls_seg (line 207) | def cls_seg(self, feat): method losses (line 215) | def losses(self, seg_logit, seg_label): FILE: annotator/mmpkg/mmseg/models/decode_heads/dm_head.py class DCM (line 10) | class DCM(nn.Module): method __init__ (line 24) | def __init__(self, filter_size, fusion, in_channels, channels, conv_cfg, method forward (line 60) | def forward(self, x): class DMHead (line 92) | class DMHead(BaseDecodeHead): method __init__ (line 106) | def __init__(self, filter_sizes=(1, 3, 5, 7), fusion=False, **kwargs): method forward (line 131) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/dnl_head.py class DisentangledNonLocal2d (line 9) | class DisentangledNonLocal2d(NonLocal2d): method __init__ (line 16) | def __init__(self, *arg, temperature, **kwargs): method embedded_gaussian (line 21) | def embedded_gaussian(self, theta_x, phi_x): method forward (line 33) | def forward(self, x): class DNLHead (line 87) | class DNLHead(FCNHead): method __init__ (line 102) | def __init__(self, method forward (line 122) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/ema_head.py function reduce_mean (line 13) | def reduce_mean(tensor): class EMAModule (line 22) | class EMAModule(nn.Module): method __init__ (line 31) | def __init__(self, channels, num_bases, num_stages, momentum): method forward (line 44) | def forward(self, feats): class EMAHead (line 79) | class EMAHead(BaseDecodeHead): method __init__ (line 94) | def __init__(self, method forward (line 154) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/enc_head.py class EncModule (line 11) | class EncModule(nn.Module): method __init__ (line 22) | def __init__(self, in_channels, num_codes, conv_cfg, norm_cfg, act_cfg): method forward (line 50) | def forward(self, x): class EncHead (line 62) | class EncHead(BaseDecodeHead): method __init__ (line 78) | def __init__(self, method forward (line 129) | def forward(self, inputs): method forward_test (line 151) | def forward_test(self, inputs, img_metas, test_cfg): method _convert_to_onehot_labels (line 159) | def _convert_to_onehot_labels(seg_label, num_classes): method losses (line 178) | def losses(self, seg_logit, seg_label): FILE: annotator/mmpkg/mmseg/models/decode_heads/fcn_head.py class FCNHead (line 10) | class FCNHead(BaseDecodeHead): method __init__ (line 23) | def __init__(self, method forward (line 74) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/fpn_head.py class FPNHead (line 11) | class FPNHead(BaseDecodeHead): method __init__ (line 23) | def __init__(self, feature_strides, **kwargs): method forward (line 54) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/gc_head.py class GCHead (line 9) | class GCHead(FCNHead): method __init__ (line 23) | def __init__(self, method forward (line 38) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/lraspp_head.py class LRASPPHead (line 12) | class LRASPPHead(BaseDecodeHead): method __init__ (line 23) | def __init__(self, branch_channels=(32, 64), **kwargs): method forward (line 68) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/nl_head.py class NLHead (line 9) | class NLHead(FCNHead): method __init__ (line 23) | def __init__(self, method forward (line 40) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/ocr_head.py class SpatialGatherModule (line 12) | class SpatialGatherModule(nn.Module): method __init__ (line 19) | def __init__(self, scale): method forward (line 23) | def forward(self, feats, probs): class ObjectAttentionBlock (line 39) | class ObjectAttentionBlock(_SelfAttentionBlock): method __init__ (line 42) | def __init__(self, in_channels, channels, scale, conv_cfg, norm_cfg, method forward (line 73) | def forward(self, query_feats, key_feats): class OCRHead (line 85) | class OCRHead(BaseCascadeDecodeHead): method __init__ (line 97) | def __init__(self, ocr_channels, scale=1, **kwargs): method forward (line 119) | def forward(self, inputs, prev_output): FILE: annotator/mmpkg/mmseg/models/decode_heads/point_head.py function calculate_uncertainty (line 19) | def calculate_uncertainty(seg_logits): class PointHead (line 40) | class PointHead(BaseCascadeDecodeHead): method __init__ (line 65) | def __init__(self, method init_weights (line 109) | def init_weights(self): method cls_seg (line 113) | def cls_seg(self, feat): method forward (line 120) | def forward(self, fine_grained_point_feats, coarse_point_feats): method _get_fine_grained_point_feats (line 128) | def _get_fine_grained_point_feats(self, x, points): method _get_coarse_point_feats (line 152) | def _get_coarse_point_feats(self, prev_output, points): method forward_train (line 170) | def forward_train(self, inputs, prev_output, img_metas, gt_semantic_seg, method forward_test (line 208) | def forward_test(self, inputs, prev_output, img_metas, test_cfg): method losses (line 253) | def losses(self, point_logits, point_label): method get_points_train (line 261) | def get_points_train(self, seg_logits, uncertainty_func, cfg): method get_points_test (line 315) | def get_points_test(self, seg_logits, uncertainty_func, cfg): FILE: annotator/mmpkg/mmseg/models/decode_heads/psa_head.py class PSAHead (line 20) | class PSAHead(BaseDecodeHead): method __init__ (line 38) | def __init__(self, method forward (line 116) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/psp_head.py class PPM (line 10) | class PPM(nn.ModuleList): method __init__ (line 24) | def __init__(self, pool_scales, in_channels, channels, conv_cfg, norm_... method forward (line 46) | def forward(self, x): class PSPHead (line 61) | class PSPHead(BaseDecodeHead): method __init__ (line 72) | def __init__(self, pool_scales=(1, 2, 3, 6), **kwargs): method forward (line 93) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/sep_aspp_head.py class DepthwiseSeparableASPPModule (line 10) | class DepthwiseSeparableASPPModule(ASPPModule): method __init__ (line 14) | def __init__(self, **kwargs): class DepthwiseSeparableASPPHead (line 29) | class DepthwiseSeparableASPPHead(ASPPHead): method __init__ (line 42) | def __init__(self, c1_in_channels, c1_channels, **kwargs): method forward (line 78) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/decode_heads/sep_fcn_head.py class DepthwiseSeparableFCNHead (line 8) | class DepthwiseSeparableFCNHead(FCNHead): method __init__ (line 29) | def __init__(self, **kwargs): FILE: annotator/mmpkg/mmseg/models/decode_heads/uper_head.py class UPerHead (line 12) | class UPerHead(BaseDecodeHead): method __init__ (line 23) | def __init__(self, pool_scales=(1, 2, 3, 6), **kwargs): method psp_forward (line 76) | def psp_forward(self, inputs): method forward (line 86) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/losses/accuracy.py function accuracy (line 4) | def accuracy(pred, target, topk=1, thresh=None): class Accuracy (line 52) | class Accuracy(nn.Module): method __init__ (line 55) | def __init__(self, topk=(1, ), thresh=None): method forward (line 68) | def forward(self, pred, target): FILE: annotator/mmpkg/mmseg/models/losses/cross_entropy_loss.py function cross_entropy (line 9) | def cross_entropy(pred, function _expand_onehot_labels (line 35) | def _expand_onehot_labels(labels, label_weights, target_shape, ignore_in... function binary_cross_entropy (line 57) | def binary_cross_entropy(pred, function mask_cross_entropy (line 100) | def mask_cross_entropy(pred, class CrossEntropyLoss (line 139) | class CrossEntropyLoss(nn.Module): method __init__ (line 154) | def __init__(self, method forward (line 175) | def forward(self, FILE: annotator/mmpkg/mmseg/models/losses/dice_loss.py function dice_loss (line 12) | def dice_loss(pred, function binary_dice_loss (line 37) | def binary_dice_loss(pred, target, valid_mask, smooth=1, exponent=2, **k... class DiceLoss (line 50) | class DiceLoss(nn.Module): method __init__ (line 72) | def __init__(self, method forward (line 88) | def forward(self, FILE: annotator/mmpkg/mmseg/models/losses/lovasz_loss.py function lovasz_grad (line 14) | def lovasz_grad(gt_sorted): function flatten_binary_logits (line 29) | def flatten_binary_logits(logits, labels, ignore_index=None): function flatten_probs (line 42) | def flatten_probs(probs, labels, ignore_index=None): function lovasz_hinge_flat (line 59) | def lovasz_hinge_flat(logits, labels): function lovasz_hinge (line 83) | def lovasz_hinge(logits, function lovasz_softmax_flat (line 128) | def lovasz_softmax_flat(probs, labels, classes='present', class_weight=N... function lovasz_softmax (line 171) | def lovasz_softmax(probs, class LovaszLoss (line 225) | class LovaszLoss(nn.Module): method __init__ (line 248) | def __init__(self, method forward (line 274) | def forward(self, FILE: annotator/mmpkg/mmseg/models/losses/utils.py function get_class_weight (line 8) | def get_class_weight(class_weight): function reduce_loss (line 26) | def reduce_loss(loss, reduction): function weight_reduce_loss (line 46) | def weight_reduce_loss(loss, weight=None, reduction='mean', avg_factor=N... function weighted_loss (line 78) | def weighted_loss(loss_func): FILE: annotator/mmpkg/mmseg/models/necks/fpn.py class FPN (line 9) | class FPN(nn.Module): method __init__ (line 63) | def __init__(self, method init_weights (line 157) | def init_weights(self): method forward (line 162) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/necks/multilevel_neck.py class MultiLevelNeck (line 9) | class MultiLevelNeck(nn.Module): method __init__ (line 22) | def __init__(self, method forward (line 55) | def forward(self, inputs): FILE: annotator/mmpkg/mmseg/models/segmentors/base.py class BaseSegmentor (line 14) | class BaseSegmentor(nn.Module): method __init__ (line 19) | def __init__(self): method with_neck (line 24) | def with_neck(self): method with_auxiliary_head (line 29) | def with_auxiliary_head(self): method with_decode_head (line 35) | def with_decode_head(self): method extract_feat (line 40) | def extract_feat(self, imgs): method encode_decode (line 45) | def encode_decode(self, img, img_metas): method forward_train (line 51) | def forward_train(self, imgs, img_metas, **kwargs): method simple_test (line 56) | def simple_test(self, img, img_meta, **kwargs): method aug_test (line 61) | def aug_test(self, imgs, img_metas, **kwargs): method init_weights (line 65) | def init_weights(self, pretrained=None): method forward_test (line 76) | def forward_test(self, imgs, img_metas, **kwargs): method forward (line 111) | def forward(self, img, img_metas, return_loss=True, **kwargs): method train_step (line 126) | def train_step(self, data_batch, optimizer, **kwargs): method val_step (line 162) | def val_step(self, data_batch, **kwargs): method _parse_losses (line 173) | def _parse_losses(losses): method show_result (line 208) | def show_result(self, FILE: annotator/mmpkg/mmseg/models/segmentors/cascade_encoder_decoder.py class CascadeEncoderDecoder (line 11) | class CascadeEncoderDecoder(EncoderDecoder): method __init__ (line 19) | def __init__(self, method _init_decode_head (line 38) | def _init_decode_head(self, decode_head): method init_weights (line 48) | def init_weights(self, pretrained=None): method encode_decode (line 65) | def encode_decode(self, img, img_metas): method _decode_head_forward_train (line 80) | def _decode_head_forward_train(self, x, img_metas, gt_semantic_seg): FILE: annotator/mmpkg/mmseg/models/segmentors/encoder_decoder.py class EncoderDecoder (line 13) | class EncoderDecoder(BaseSegmentor): method __init__ (line 21) | def __init__(self, method _init_decode_head (line 43) | def _init_decode_head(self, decode_head): method _init_auxiliary_head (line 49) | def _init_auxiliary_head(self, auxiliary_head): method init_weights (line 59) | def init_weights(self, pretrained=None): method extract_feat (line 77) | def extract_feat(self, img): method encode_decode (line 84) | def encode_decode(self, img, img_metas): method _decode_head_forward_train (line 96) | def _decode_head_forward_train(self, x, img_metas, gt_semantic_seg): method _decode_head_forward_test (line 107) | def _decode_head_forward_test(self, x, img_metas): method _auxiliary_head_forward_train (line 113) | def _auxiliary_head_forward_train(self, x, img_metas, gt_semantic_seg): method forward_dummy (line 130) | def forward_dummy(self, img): method forward_train (line 136) | def forward_train(self, img, img_metas, gt_semantic_seg): method slide_inference (line 169) | def slide_inference(self, img, img_meta, rescale): method whole_inference (line 214) | def whole_inference(self, img, img_meta, rescale): method inference (line 233) | def inference(self, img, img_meta, rescale): method simple_test (line 268) | def simple_test(self, img, img_meta, rescale=True): method aug_test (line 281) | def aug_test(self, imgs, img_metas, rescale=True): FILE: annotator/mmpkg/mmseg/models/utils/drop.py class DropPath (line 8) | class DropPath(nn.Module): method __init__ (line 17) | def __init__(self, drop_prob=0.): method forward (line 22) | def forward(self, x): FILE: annotator/mmpkg/mmseg/models/utils/inverted_residual.py class InvertedResidual (line 8) | class InvertedResidual(nn.Module): method __init__ (line 31) | def __init__(self, method forward (line 81) | def forward(self, x): class InvertedResidualV3 (line 97) | class InvertedResidualV3(nn.Module): method __init__ (line 124) | def __init__(self, method forward (line 183) | def forward(self, x): FILE: annotator/mmpkg/mmseg/models/utils/make_divisible.py function make_divisible (line 1) | def make_divisible(value, divisor, min_value=None, min_ratio=0.9): FILE: annotator/mmpkg/mmseg/models/utils/res_layer.py class ResLayer (line 5) | class ResLayer(nn.Sequential): method __init__ (line 26) | def __init__(self, FILE: annotator/mmpkg/mmseg/models/utils/se_layer.py class SELayer (line 8) | class SELayer(nn.Module): method __init__ (line 26) | def __init__(self, method forward (line 53) | def forward(self, x): FILE: annotator/mmpkg/mmseg/models/utils/self_attention_block.py class SelfAttentionBlock (line 7) | class SelfAttentionBlock(nn.Module): method __init__ (line 32) | def __init__(self, key_in_channels, query_in_channels, channels, method init_weights (line 93) | def init_weights(self): method build_project (line 99) | def build_project(self, in_channels, channels, num_convs, use_conv_mod... method forward (line 131) | def forward(self, query_feats, key_feats): FILE: annotator/mmpkg/mmseg/models/utils/up_conv_block.py class UpConvBlock (line 6) | class UpConvBlock(nn.Module): method __init__ (line 44) | def __init__(self, method forward (line 94) | def forward(self, skip, x): FILE: annotator/mmpkg/mmseg/models/utils/weight_init.py function _no_grad_trunc_normal_ (line 10) | def _no_grad_trunc_normal_(tensor, mean, std, a, b): function trunc_normal_ (line 48) | def trunc_normal_(tensor, mean=0., std=1., a=-2., b=2.): FILE: annotator/mmpkg/mmseg/ops/encoding.py class Encoding (line 6) | class Encoding(nn.Module): method __init__ (line 17) | def __init__(self, channels, num_codes): method scaled_l2 (line 33) | def scaled_l2(x, codewords, scale): method aggregate (line 46) | def aggregate(assignment_weights, x, codewords): method forward (line 57) | def forward(self, x): method __repr__ (line 70) | def __repr__(self): FILE: annotator/mmpkg/mmseg/ops/wrappers.py function resize (line 7) | def resize(input, class Upsample (line 29) | class Upsample(nn.Module): method __init__ (line 31) | def __init__(self, method forward (line 45) | def forward(self, x): FILE: annotator/mmpkg/mmseg/utils/collect_env.py function collect_env (line 7) | def collect_env(): FILE: annotator/mmpkg/mmseg/utils/logger.py function get_root_logger (line 6) | def get_root_logger(log_file=None, log_level=logging.INFO): FILE: annotator/mobile_sam/__init__.py class SamDetector_Aux (line 15) | class SamDetector_Aux(SamDetector): method __init__ (line 19) | def __init__(self, mask_generator: SamAutomaticMaskGenerator, sam): method from_pretrained (line 25) | def from_pretrained(cls): method __call__ (line 46) | def __call__(self, input_image: Union[np.ndarray, Image.Image]=None, d... FILE: annotator/normalbae/__init__.py function load_checkpoint (line 14) | def load_checkpoint(fpath, model): class NormalBaeDetector (line 29) | class NormalBaeDetector: method __init__ (line 32) | def __init__(self): method load_model (line 36) | def load_model(self): method unload_model (line 54) | def unload_model(self): method __call__ (line 58) | def __call__(self, input_image): FILE: annotator/normalbae/models/NNET.py class NNET (line 9) | class NNET(nn.Module): method __init__ (line 10) | def __init__(self, args): method get_1x_lr_params (line 15) | def get_1x_lr_params(self): # lr/10 learning rate method get_10x_lr_params (line 18) | def get_10x_lr_params(self): # lr learning rate method forward (line 21) | def forward(self, img, **kwargs): FILE: annotator/normalbae/models/baseline.py class NNET (line 9) | class NNET(nn.Module): method __init__ (line 10) | def __init__(self, args=None): method forward (line 15) | def forward(self, x, **kwargs): method get_1x_lr_params (line 25) | def get_1x_lr_params(self): # lr/10 learning rate method get_10x_lr_params (line 28) | def get_10x_lr_params(self): # lr learning rate class Encoder (line 35) | class Encoder(nn.Module): method __init__ (line 36) | def __init__(self): method forward (line 48) | def forward(self, x): class Decoder (line 60) | class Decoder(nn.Module): method __init__ (line 61) | def __init__(self, num_classes=4): method forward (line 70) | def forward(self, features): FILE: annotator/normalbae/models/submodules/decoder.py class Decoder (line 7) | class Decoder(nn.Module): method __init__ (line 8) | def __init__(self, args): method forward (line 59) | def forward(self, features, gt_norm_mask=None, mode='test'): FILE: annotator/normalbae/models/submodules/efficientnet_repo/caffe2_benchmark.py function main (line 26) | def main(): FILE: annotator/normalbae/models/submodules/efficientnet_repo/caffe2_validate.py function main (line 46) | def main(): function accuracy_np (line 130) | def accuracy_np(output, target): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/activations/__init__.py function add_override_act_fn (line 65) | def add_override_act_fn(name, fn): function update_override_act_fn (line 70) | def update_override_act_fn(overrides): function clear_override_act_fn (line 76) | def clear_override_act_fn(): function add_override_act_layer (line 81) | def add_override_act_layer(name, fn): function update_override_act_layer (line 85) | def update_override_act_layer(overrides): function clear_override_act_layer (line 91) | def clear_override_act_layer(): function get_act_fn (line 96) | def get_act_fn(name='relu'): function get_act_layer (line 118) | def get_act_layer(name='relu'): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/activations/activations.py function swish (line 12) | def swish(x, inplace: bool = False): class Swish (line 21) | class Swish(nn.Module): method __init__ (line 22) | def __init__(self, inplace: bool = False): method forward (line 26) | def forward(self, x): function mish (line 30) | def mish(x, inplace: bool = False): class Mish (line 36) | class Mish(nn.Module): method __init__ (line 37) | def __init__(self, inplace: bool = False): method forward (line 41) | def forward(self, x): function sigmoid (line 45) | def sigmoid(x, inplace: bool = False): class Sigmoid (line 50) | class Sigmoid(nn.Module): method __init__ (line 51) | def __init__(self, inplace: bool = False): method forward (line 55) | def forward(self, x): function tanh (line 59) | def tanh(x, inplace: bool = False): class Tanh (line 64) | class Tanh(nn.Module): method __init__ (line 65) | def __init__(self, inplace: bool = False): method forward (line 69) | def forward(self, x): function hard_swish (line 73) | def hard_swish(x, inplace: bool = False): class HardSwish (line 78) | class HardSwish(nn.Module): method __init__ (line 79) | def __init__(self, inplace: bool = False): method forward (line 83) | def forward(self, x): function hard_sigmoid (line 87) | def hard_sigmoid(x, inplace: bool = False): class HardSigmoid (line 94) | class HardSigmoid(nn.Module): method __init__ (line 95) | def __init__(self, inplace: bool = False): method forward (line 99) | def forward(self, x): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/activations/activations_jit.py function swish_jit (line 22) | def swish_jit(x, inplace: bool = False): function mish_jit (line 32) | def mish_jit(x, _inplace: bool = False): class SwishJit (line 38) | class SwishJit(nn.Module): method __init__ (line 39) | def __init__(self, inplace: bool = False): method forward (line 42) | def forward(self, x): class MishJit (line 46) | class MishJit(nn.Module): method __init__ (line 47) | def __init__(self, inplace: bool = False): method forward (line 50) | def forward(self, x): function hard_sigmoid_jit (line 55) | def hard_sigmoid_jit(x, inplace: bool = False): class HardSigmoidJit (line 60) | class HardSigmoidJit(nn.Module): method __init__ (line 61) | def __init__(self, inplace: bool = False): method forward (line 64) | def forward(self, x): function hard_swish_jit (line 69) | def hard_swish_jit(x, inplace: bool = False): class HardSwishJit (line 74) | class HardSwishJit(nn.Module): method __init__ (line 75) | def __init__(self, inplace: bool = False): method forward (line 78) | def forward(self, x): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/activations/activations_me.py function swish_jit_fwd (line 22) | def swish_jit_fwd(x): function swish_jit_bwd (line 27) | def swish_jit_bwd(x, grad_output): class SwishJitAutoFn (line 32) | class SwishJitAutoFn(torch.autograd.Function): method forward (line 44) | def forward(ctx, x): method backward (line 49) | def backward(ctx, grad_output): function swish_me (line 54) | def swish_me(x, inplace=False): class SwishMe (line 58) | class SwishMe(nn.Module): method __init__ (line 59) | def __init__(self, inplace: bool = False): method forward (line 62) | def forward(self, x): function mish_jit_fwd (line 67) | def mish_jit_fwd(x): function mish_jit_bwd (line 72) | def mish_jit_bwd(x, grad_output): class MishJitAutoFn (line 78) | class MishJitAutoFn(torch.autograd.Function): method forward (line 83) | def forward(ctx, x): method backward (line 88) | def backward(ctx, grad_output): function mish_me (line 93) | def mish_me(x, inplace=False): class MishMe (line 97) | class MishMe(nn.Module): method __init__ (line 98) | def __init__(self, inplace: bool = False): method forward (line 101) | def forward(self, x): function hard_sigmoid_jit_fwd (line 106) | def hard_sigmoid_jit_fwd(x, inplace: bool = False): function hard_sigmoid_jit_bwd (line 111) | def hard_sigmoid_jit_bwd(x, grad_output): class HardSigmoidJitAutoFn (line 116) | class HardSigmoidJitAutoFn(torch.autograd.Function): method forward (line 118) | def forward(ctx, x): method backward (line 123) | def backward(ctx, grad_output): function hard_sigmoid_me (line 128) | def hard_sigmoid_me(x, inplace: bool = False): class HardSigmoidMe (line 132) | class HardSigmoidMe(nn.Module): method __init__ (line 133) | def __init__(self, inplace: bool = False): method forward (line 136) | def forward(self, x): function hard_swish_jit_fwd (line 141) | def hard_swish_jit_fwd(x): function hard_swish_jit_bwd (line 146) | def hard_swish_jit_bwd(x, grad_output): class HardSwishJitAutoFn (line 152) | class HardSwishJitAutoFn(torch.autograd.Function): method forward (line 155) | def forward(ctx, x): method backward (line 160) | def backward(ctx, grad_output): function hard_swish_me (line 165) | def hard_swish_me(x, inplace=False): class HardSwishMe (line 169) | class HardSwishMe(nn.Module): method __init__ (line 170) | def __init__(self, inplace: bool = False): method forward (line 173) | def forward(self, x): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/config.py function is_no_jit (line 25) | def is_no_jit(): class set_no_jit (line 29) | class set_no_jit: method __init__ (line 30) | def __init__(self, mode: bool) -> None: method __enter__ (line 35) | def __enter__(self) -> None: method __exit__ (line 38) | def __exit__(self, *args: Any) -> bool: function is_exportable (line 44) | def is_exportable(): class set_exportable (line 48) | class set_exportable: method __init__ (line 49) | def __init__(self, mode: bool) -> None: method __enter__ (line 54) | def __enter__(self) -> None: method __exit__ (line 57) | def __exit__(self, *args: Any) -> bool: function is_scriptable (line 63) | def is_scriptable(): class set_scriptable (line 67) | class set_scriptable: method __init__ (line 68) | def __init__(self, mode: bool) -> None: method __enter__ (line 73) | def __enter__(self) -> None: method __exit__ (line 76) | def __exit__(self, *args: Any) -> bool: class set_layer_config (line 82) | class set_layer_config: method __init__ (line 86) | def __init__( method __enter__ (line 106) | def __enter__(self) -> None: method __exit__ (line 109) | def __exit__(self, *args: Any) -> bool: function layer_config_kwargs (line 118) | def layer_config_kwargs(kwargs): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/conv2d_layers.py function _ntuple (line 23) | def _ntuple(n): function _is_static_pad (line 37) | def _is_static_pad(kernel_size, stride=1, dilation=1, **_): function _get_padding (line 41) | def _get_padding(kernel_size, stride=1, dilation=1, **_): function _calc_same_pad (line 46) | def _calc_same_pad(i: int, k: int, s: int, d: int): function _same_pad_arg (line 50) | def _same_pad_arg(input_size, kernel_size, stride, dilation): function _split_channels (line 58) | def _split_channels(num_chan, num_groups): function conv2d_same (line 64) | def conv2d_same( class Conv2dSame (line 75) | class Conv2dSame(nn.Conv2d): method __init__ (line 80) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, method forward (line 85) | def forward(self, x): class Conv2dSameExport (line 89) | class Conv2dSameExport(nn.Conv2d): method __init__ (line 96) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, method forward (line 103) | def forward(self, x): function get_padding_value (line 116) | def get_padding_value(padding, kernel_size, **kwargs): function create_conv2d_pad (line 139) | def create_conv2d_pad(in_chs, out_chs, kernel_size, **kwargs): class MixedConv2d (line 153) | class MixedConv2d(nn.ModuleDict): method __init__ (line 159) | def __init__(self, in_channels, out_channels, kernel_size=3, method forward (line 179) | def forward(self, x): function get_condconv_initializer (line 186) | def get_condconv_initializer(initializer, num_experts, expert_shape): class CondConv2d (line 199) | class CondConv2d(nn.Module): method __init__ (line 208) | def __init__(self, in_channels, out_channels, kernel_size=3, method reset_parameters (line 238) | def reset_parameters(self): method forward (line 249) | def forward(self, x, routing_weights): function select_conv2d (line 290) | def select_conv2d(in_chs, out_chs, kernel_size, **kwargs): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/efficientnet_builder.py function get_bn_args_tf (line 30) | def get_bn_args_tf(): function resolve_bn_args (line 34) | def resolve_bn_args(kwargs): function resolve_se_args (line 52) | def resolve_se_args(kwargs, in_chs, act_layer=None): function resolve_act_layer (line 67) | def resolve_act_layer(kwargs, default='relu'): function make_divisible (line 74) | def make_divisible(v: int, divisor: int = 8, min_value: int = None): function round_channels (line 82) | def round_channels(channels, multiplier=1.0, divisor=8, channel_min=None): function drop_connect (line 90) | def drop_connect(inputs, training: bool = False, drop_connect_rate: floa... class SqueezeExcite (line 103) | class SqueezeExcite(nn.Module): method __init__ (line 105) | def __init__(self, in_chs, se_ratio=0.25, reduced_base_chs=None, act_l... method forward (line 113) | def forward(self, x): class ConvBnAct (line 122) | class ConvBnAct(nn.Module): method __init__ (line 123) | def __init__(self, in_chs, out_chs, kernel_size, method forward (line 132) | def forward(self, x): class DepthwiseSeparableConv (line 139) | class DepthwiseSeparableConv(nn.Module): method __init__ (line 144) | def __init__(self, in_chs, out_chs, dw_kernel_size=3, method forward (line 170) | def forward(self, x): class InvertedResidual (line 190) | class InvertedResidual(nn.Module): method __init__ (line 193) | def __init__(self, in_chs, out_chs, dw_kernel_size=3, method forward (line 227) | def forward(self, x): class CondConvResidual (line 254) | class CondConvResidual(InvertedResidual): method __init__ (line 257) | def __init__(self, in_chs, out_chs, dw_kernel_size=3, method forward (line 275) | def forward(self, x): class EdgeResidual (line 306) | class EdgeResidual(nn.Module): method __init__ (line 309) | def __init__(self, in_chs, out_chs, exp_kernel_size=3, exp_ratio=1.0, ... method forward (line 334) | def forward(self, x): class EfficientNetBuilder (line 357) | class EfficientNetBuilder: method __init__ (line 367) | def __init__(self, channel_multiplier=1.0, channel_divisor=8, channel_... method _round_channels (line 385) | def _round_channels(self, chs): method _make_block (line 388) | def _make_block(self, ba): method _make_stack (line 423) | def _make_stack(self, stack_args): method __call__ (line 435) | def __call__(self, in_chs, block_args): function _parse_ksize (line 456) | def _parse_ksize(ss): function _decode_block_str (line 463) | def _decode_block_str(block_str): function _scale_stage_depth (line 582) | def _scale_stage_depth(stack_args, repeats, depth_multiplier=1.0, depth_... function decode_arch_def (line 620) | def decode_arch_def(arch_def, depth_multiplier=1.0, depth_trunc='ceil', ... function initialize_weight_goog (line 640) | def initialize_weight_goog(m, n='', fix_group_fanout=True): function initialize_weight_default (line 672) | def initialize_weight_default(m, n=''): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/gen_efficientnet.py class GenEfficientNet (line 215) | class GenEfficientNet(nn.Module): method __init__ (line 226) | def __init__(self, block_args, num_classes=1000, in_chans=3, num_featu... method features (line 259) | def features(self, x): method as_sequential (line 269) | def as_sequential(self): method forward (line 277) | def forward(self, x): function _create_model (line 286) | def _create_model(model_kwargs, variant, pretrained=False): function _gen_mnasnet_a1 (line 296) | def _gen_mnasnet_a1(variant, channel_multiplier=1.0, pretrained=False, *... function _gen_mnasnet_b1 (line 334) | def _gen_mnasnet_b1(variant, channel_multiplier=1.0, pretrained=False, *... function _gen_mnasnet_small (line 372) | def _gen_mnasnet_small(variant, channel_multiplier=1.0, pretrained=False... function _gen_mobilenet_v2 (line 403) | def _gen_mobilenet_v2( function _gen_fbnetc (line 433) | def _gen_fbnetc(variant, channel_multiplier=1.0, pretrained=False, **kwa... function _gen_spnasnet (line 465) | def _gen_spnasnet(variant, channel_multiplier=1.0, pretrained=False, **k... function _gen_efficientnet (line 502) | def _gen_efficientnet(variant, channel_multiplier=1.0, depth_multiplier=... function _gen_efficientnet_edge (line 548) | def _gen_efficientnet_edge(variant, channel_multiplier=1.0, depth_multip... function _gen_efficientnet_condconv (line 573) | def _gen_efficientnet_condconv( function _gen_efficientnet_lite (line 599) | def _gen_efficientnet_lite(variant, channel_multiplier=1.0, depth_multip... function _gen_mixnet_s (line 641) | def _gen_mixnet_s(variant, channel_multiplier=1.0, pretrained=False, **k... function _gen_mixnet_m (line 676) | def _gen_mixnet_m(variant, channel_multiplier=1.0, depth_multiplier=1.0,... function mnasnet_050 (line 711) | def mnasnet_050(pretrained=False, **kwargs): function mnasnet_075 (line 717) | def mnasnet_075(pretrained=False, **kwargs): function mnasnet_100 (line 723) | def mnasnet_100(pretrained=False, **kwargs): function mnasnet_b1 (line 729) | def mnasnet_b1(pretrained=False, **kwargs): function mnasnet_140 (line 734) | def mnasnet_140(pretrained=False, **kwargs): function semnasnet_050 (line 740) | def semnasnet_050(pretrained=False, **kwargs): function semnasnet_075 (line 746) | def semnasnet_075(pretrained=False, **kwargs): function semnasnet_100 (line 752) | def semnasnet_100(pretrained=False, **kwargs): function mnasnet_a1 (line 758) | def mnasnet_a1(pretrained=False, **kwargs): function semnasnet_140 (line 763) | def semnasnet_140(pretrained=False, **kwargs): function mnasnet_small (line 769) | def mnasnet_small(pretrained=False, **kwargs): function mobilenetv2_100 (line 775) | def mobilenetv2_100(pretrained=False, **kwargs): function mobilenetv2_140 (line 781) | def mobilenetv2_140(pretrained=False, **kwargs): function mobilenetv2_110d (line 787) | def mobilenetv2_110d(pretrained=False, **kwargs): function mobilenetv2_120d (line 794) | def mobilenetv2_120d(pretrained=False, **kwargs): function fbnetc_100 (line 801) | def fbnetc_100(pretrained=False, **kwargs): function spnasnet_100 (line 810) | def spnasnet_100(pretrained=False, **kwargs): function efficientnet_b0 (line 816) | def efficientnet_b0(pretrained=False, **kwargs): function efficientnet_b1 (line 824) | def efficientnet_b1(pretrained=False, **kwargs): function efficientnet_b2 (line 832) | def efficientnet_b2(pretrained=False, **kwargs): function efficientnet_b3 (line 840) | def efficientnet_b3(pretrained=False, **kwargs): function efficientnet_b4 (line 848) | def efficientnet_b4(pretrained=False, **kwargs): function efficientnet_b5 (line 856) | def efficientnet_b5(pretrained=False, **kwargs): function efficientnet_b6 (line 864) | def efficientnet_b6(pretrained=False, **kwargs): function efficientnet_b7 (line 872) | def efficientnet_b7(pretrained=False, **kwargs): function efficientnet_b8 (line 880) | def efficientnet_b8(pretrained=False, **kwargs): function efficientnet_l2 (line 888) | def efficientnet_l2(pretrained=False, **kwargs): function efficientnet_es (line 896) | def efficientnet_es(pretrained=False, **kwargs): function efficientnet_em (line 903) | def efficientnet_em(pretrained=False, **kwargs): function efficientnet_el (line 910) | def efficientnet_el(pretrained=False, **kwargs): function efficientnet_cc_b0_4e (line 917) | def efficientnet_cc_b0_4e(pretrained=False, **kwargs): function efficientnet_cc_b0_8e (line 925) | def efficientnet_cc_b0_8e(pretrained=False, **kwargs): function efficientnet_cc_b1_8e (line 934) | def efficientnet_cc_b1_8e(pretrained=False, **kwargs): function efficientnet_lite0 (line 943) | def efficientnet_lite0(pretrained=False, **kwargs): function efficientnet_lite1 (line 950) | def efficientnet_lite1(pretrained=False, **kwargs): function efficientnet_lite2 (line 957) | def efficientnet_lite2(pretrained=False, **kwargs): function efficientnet_lite3 (line 964) | def efficientnet_lite3(pretrained=False, **kwargs): function efficientnet_lite4 (line 971) | def efficientnet_lite4(pretrained=False, **kwargs): function tf_efficientnet_b0 (line 978) | def tf_efficientnet_b0(pretrained=False, **kwargs): function tf_efficientnet_b1 (line 987) | def tf_efficientnet_b1(pretrained=False, **kwargs): function tf_efficientnet_b2 (line 996) | def tf_efficientnet_b2(pretrained=False, **kwargs): function tf_efficientnet_b3 (line 1005) | def tf_efficientnet_b3(pretrained=False, **kwargs): function tf_efficientnet_b4 (line 1014) | def tf_efficientnet_b4(pretrained=False, **kwargs): function tf_efficientnet_b5 (line 1023) | def tf_efficientnet_b5(pretrained=False, **kwargs): function tf_efficientnet_b6 (line 1032) | def tf_efficientnet_b6(pretrained=False, **kwargs): function tf_efficientnet_b7 (line 1041) | def tf_efficientnet_b7(pretrained=False, **kwargs): function tf_efficientnet_b8 (line 1050) | def tf_efficientnet_b8(pretrained=False, **kwargs): function tf_efficientnet_b0_ap (line 1059) | def tf_efficientnet_b0_ap(pretrained=False, **kwargs): function tf_efficientnet_b1_ap (line 1070) | def tf_efficientnet_b1_ap(pretrained=False, **kwargs): function tf_efficientnet_b2_ap (line 1081) | def tf_efficientnet_b2_ap(pretrained=False, **kwargs): function tf_efficientnet_b3_ap (line 1092) | def tf_efficientnet_b3_ap(pretrained=False, **kwargs): function tf_efficientnet_b4_ap (line 1103) | def tf_efficientnet_b4_ap(pretrained=False, **kwargs): function tf_efficientnet_b5_ap (line 1114) | def tf_efficientnet_b5_ap(pretrained=False, **kwargs): function tf_efficientnet_b6_ap (line 1125) | def tf_efficientnet_b6_ap(pretrained=False, **kwargs): function tf_efficientnet_b7_ap (line 1137) | def tf_efficientnet_b7_ap(pretrained=False, **kwargs): function tf_efficientnet_b8_ap (line 1149) | def tf_efficientnet_b8_ap(pretrained=False, **kwargs): function tf_efficientnet_b0_ns (line 1161) | def tf_efficientnet_b0_ns(pretrained=False, **kwargs): function tf_efficientnet_b1_ns (line 1172) | def tf_efficientnet_b1_ns(pretrained=False, **kwargs): function tf_efficientnet_b2_ns (line 1183) | def tf_efficientnet_b2_ns(pretrained=False, **kwargs): function tf_efficientnet_b3_ns (line 1194) | def tf_efficientnet_b3_ns(pretrained=False, **kwargs): function tf_efficientnet_b4_ns (line 1205) | def tf_efficientnet_b4_ns(pretrained=False, **kwargs): function tf_efficientnet_b5_ns (line 1216) | def tf_efficientnet_b5_ns(pretrained=False, **kwargs): function tf_efficientnet_b6_ns (line 1227) | def tf_efficientnet_b6_ns(pretrained=False, **kwargs): function tf_efficientnet_b7_ns (line 1239) | def tf_efficientnet_b7_ns(pretrained=False, **kwargs): function tf_efficientnet_l2_ns_475 (line 1251) | def tf_efficientnet_l2_ns_475(pretrained=False, **kwargs): function tf_efficientnet_l2_ns (line 1263) | def tf_efficientnet_l2_ns(pretrained=False, **kwargs): function tf_efficientnet_es (line 1275) | def tf_efficientnet_es(pretrained=False, **kwargs): function tf_efficientnet_em (line 1284) | def tf_efficientnet_em(pretrained=False, **kwargs): function tf_efficientnet_el (line 1293) | def tf_efficientnet_el(pretrained=False, **kwargs): function tf_efficientnet_cc_b0_4e (line 1302) | def tf_efficientnet_cc_b0_4e(pretrained=False, **kwargs): function tf_efficientnet_cc_b0_8e (line 1311) | def tf_efficientnet_cc_b0_8e(pretrained=False, **kwargs): function tf_efficientnet_cc_b1_8e (line 1321) | def tf_efficientnet_cc_b1_8e(pretrained=False, **kwargs): function tf_efficientnet_lite0 (line 1331) | def tf_efficientnet_lite0(pretrained=False, **kwargs): function tf_efficientnet_lite1 (line 1340) | def tf_efficientnet_lite1(pretrained=False, **kwargs): function tf_efficientnet_lite2 (line 1349) | def tf_efficientnet_lite2(pretrained=False, **kwargs): function tf_efficientnet_lite3 (line 1358) | def tf_efficientnet_lite3(pretrained=False, **kwargs): function tf_efficientnet_lite4 (line 1367) | def tf_efficientnet_lite4(pretrained=False, **kwargs): function mixnet_s (line 1376) | def mixnet_s(pretrained=False, **kwargs): function mixnet_m (line 1385) | def mixnet_m(pretrained=False, **kwargs): function mixnet_l (line 1394) | def mixnet_l(pretrained=False, **kwargs): function mixnet_xl (line 1403) | def mixnet_xl(pretrained=False, **kwargs): function mixnet_xxl (line 1413) | def mixnet_xxl(pretrained=False, **kwargs): function tf_mixnet_s (line 1423) | def tf_mixnet_s(pretrained=False, **kwargs): function tf_mixnet_m (line 1433) | def tf_mixnet_m(pretrained=False, **kwargs): function tf_mixnet_l (line 1443) | def tf_mixnet_l(pretrained=False, **kwargs): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/helpers.py function load_checkpoint (line 13) | def load_checkpoint(model, checkpoint_path): function load_pretrained (line 34) | def load_pretrained(model, url, filter_fn=None, strict=True): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/mobilenetv3.py class MobileNetV3 (line 48) | class MobileNetV3(nn.Module): method __init__ (line 57) | def __init__(self, block_args, num_classes=1000, in_chans=3, stem_size... method as_sequential (line 86) | def as_sequential(self): method features (line 94) | def features(self, x): method forward (line 104) | def forward(self, x): function _create_model (line 112) | def _create_model(model_kwargs, variant, pretrained=False): function _gen_mobilenet_v3_rw (line 122) | def _gen_mobilenet_v3_rw(variant, channel_multiplier=1.0, pretrained=Fal... function _gen_mobilenet_v3 (line 171) | def _gen_mobilenet_v3(variant, channel_multiplier=1.0, pretrained=False,... function mobilenetv3_rw (line 268) | def mobilenetv3_rw(pretrained=False, **kwargs): function mobilenetv3_large_075 (line 280) | def mobilenetv3_large_075(pretrained=False, **kwargs): function mobilenetv3_large_100 (line 287) | def mobilenetv3_large_100(pretrained=False, **kwargs): function mobilenetv3_large_minimal_100 (line 294) | def mobilenetv3_large_minimal_100(pretrained=False, **kwargs): function mobilenetv3_small_075 (line 301) | def mobilenetv3_small_075(pretrained=False, **kwargs): function mobilenetv3_small_100 (line 307) | def mobilenetv3_small_100(pretrained=False, **kwargs): function mobilenetv3_small_minimal_100 (line 313) | def mobilenetv3_small_minimal_100(pretrained=False, **kwargs): function tf_mobilenetv3_large_075 (line 319) | def tf_mobilenetv3_large_075(pretrained=False, **kwargs): function tf_mobilenetv3_large_100 (line 327) | def tf_mobilenetv3_large_100(pretrained=False, **kwargs): function tf_mobilenetv3_large_minimal_100 (line 335) | def tf_mobilenetv3_large_minimal_100(pretrained=False, **kwargs): function tf_mobilenetv3_small_075 (line 343) | def tf_mobilenetv3_small_075(pretrained=False, **kwargs): function tf_mobilenetv3_small_100 (line 351) | def tf_mobilenetv3_small_100(pretrained=False, **kwargs): function tf_mobilenetv3_small_minimal_100 (line 359) | def tf_mobilenetv3_small_minimal_100(pretrained=False, **kwargs): FILE: annotator/normalbae/models/submodules/efficientnet_repo/geffnet/model_factory.py function create_model (line 8) | def create_model( FILE: annotator/normalbae/models/submodules/efficientnet_repo/onnx_export.py function main (line 55) | def main(): FILE: annotator/normalbae/models/submodules/efficientnet_repo/onnx_optimize.py function traverse_graph (line 23) | def traverse_graph(graph, prefix=''): function main (line 41) | def main(): FILE: annotator/normalbae/models/submodules/efficientnet_repo/onnx_to_caffe.py function main (line 14) | def main(): FILE: annotator/normalbae/models/submodules/efficientnet_repo/onnx_validate.py function main (line 45) | def main(): function accuracy_np (line 104) | def accuracy_np(output, target): FILE: annotator/normalbae/models/submodules/efficientnet_repo/utils.py class AverageMeter (line 4) | class AverageMeter: method __init__ (line 6) | def __init__(self): method reset (line 9) | def reset(self): method update (line 15) | def update(self, val, n=1): function accuracy (line 22) | def accuracy(output, target, topk=(1,)): function get_outdir (line 38) | def get_outdir(path, *paths, inc=False): FILE: annotator/normalbae/models/submodules/efficientnet_repo/validate.py function main (line 66) | def main(): FILE: annotator/normalbae/models/submodules/encoder.py class Encoder (line 7) | class Encoder(nn.Module): method __init__ (line 8) | def __init__(self): method forward (line 24) | def forward(self, x): FILE: annotator/normalbae/models/submodules/submodules.py class UpSampleBN (line 10) | class UpSampleBN(nn.Module): method __init__ (line 11) | def __init__(self, skip_input, output_features): method forward (line 21) | def forward(self, x, concat_with): class UpSampleGN (line 28) | class UpSampleGN(nn.Module): method __init__ (line 29) | def __init__(self, skip_input, output_features): method forward (line 39) | def forward(self, x, concat_with): class Conv2d (line 46) | class Conv2d(nn.Conv2d): method __init__ (line 47) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, method forward (line 52) | def forward(self, x): function norm_normalize (line 64) | def norm_normalize(norm_out): function sample_points (line 75) | def sample_points(init_normal, gt_norm_mask, sampling_ratio, beta): FILE: annotator/normaldsine/__init__.py class NormalDsineDetector (line 15) | class NormalDsineDetector: method __init__ (line 18) | def __init__(self): method load_model (line 22) | def load_model(self): method unload_model (line 35) | def unload_model(self): method __call__ (line 39) | def __call__(self, input_image, new_fov=60.0, iterations=5, resulotion... FILE: annotator/oneformer/__init__.py class OneformerDetector (line 7) | class OneformerDetector: method __init__ (line 20) | def __init__(self, config): method load_model (line 26) | def load_model(self): method unload_model (line 36) | def unload_model(self): method __call__ (line 40) | def __call__(self, img): FILE: annotator/oneformer/api.py function make_detectron2_model (line 21) | def make_detectron2_model(config_path, ckpt_path): function semantic_run (line 35) | def semantic_run(img, predictor, metadata): FILE: annotator/oneformer/detectron2/checkpoint/c2_model_loading.py function convert_basic_c2_names (line 10) | def convert_basic_c2_names(original_keys): function convert_c2_detectron_names (line 66) | def convert_c2_detectron_names(weights): function align_and_update_state_dicts (line 209) | def align_and_update_state_dicts(model_state_dict, ckpt_state_dict, c2_c... function _group_keys_by_module (line 337) | def _group_keys_by_module(keys: List[str], original_names: Dict[str, str]): function _longest_common_prefix (line 377) | def _longest_common_prefix(names: List[str]) -> str: function _longest_common_prefix_str (line 388) | def _longest_common_prefix_str(names: List[str]) -> str: function _group_str (line 400) | def _group_str(names: List[str]) -> str: FILE: annotator/oneformer/detectron2/checkpoint/catalog.py class ModelCatalog (line 7) | class ModelCatalog(object): method get (line 58) | def get(name): method _get_c2_imagenet_pretrained (line 66) | def _get_c2_imagenet_pretrained(name): method _get_c2_detectron_baseline (line 74) | def _get_c2_detectron_baseline(name): class ModelCatalogHandler (line 95) | class ModelCatalogHandler(PathHandler): method _get_supported_prefixes (line 102) | def _get_supported_prefixes(self): method _get_local_path (line 105) | def _get_local_path(self, path, **kwargs): method _open (line 111) | def _open(self, path, mode="r", **kwargs): FILE: annotator/oneformer/detectron2/checkpoint/detection_checkpoint.py class DetectionCheckpointer (line 16) | class DetectionCheckpointer(Checkpointer): method __init__ (line 23) | def __init__(self, model, save_dir="", *, save_to_disk=None, **checkpo... method load (line 34) | def load(self, path, *args, **kwargs): method _load_file (line 72) | def _load_file(self, filename): method _torch_load (line 115) | def _torch_load(self, f): method _load_model (line 118) | def _load_model(self, checkpoint): FILE: annotator/oneformer/detectron2/config/compat.py function upgrade_config (line 33) | def upgrade_config(cfg: CN, to_version: Optional[int] = None) -> CN: function downgrade_config (line 55) | def downgrade_config(cfg: CN, to_version: int) -> CN: function guess_version (line 82) | def guess_version(cfg: CN, filename: str) -> int: function _rename (line 116) | def _rename(cfg: CN, old: str, new: str) -> None: class _RenameConverter (line 146) | class _RenameConverter: method upgrade (line 154) | def upgrade(cls, cfg: CN) -> None: method downgrade (line 159) | def downgrade(cls, cfg: CN) -> None: class ConverterV1 (line 164) | class ConverterV1(_RenameConverter): class ConverterV2 (line 168) | class ConverterV2(_RenameConverter): method upgrade (line 204) | def upgrade(cls, cfg: CN) -> None: method downgrade (line 222) | def downgrade(cls, cfg: CN) -> None: FILE: annotator/oneformer/detectron2/config/config.py class CfgNode (line 12) | class CfgNode(_CfgNode): method _open_cfg (line 33) | def _open_cfg(cls, filename): method merge_from_file (line 37) | def merge_from_file(self, cfg_filename: str, allow_unsafe: bool = True... method dump (line 87) | def dump(self, *args, **kwargs): function get_cfg (line 99) | def get_cfg() -> CfgNode: function set_global_cfg (line 111) | def set_global_cfg(cfg: CfgNode) -> None: function configurable (line 130) | def configurable(init_func=None, *, from_config=None): function _get_args_from_config (line 218) | def _get_args_from_config(from_config_func, *args, **kwargs): function _called_with_cfg (line 251) | def _called_with_cfg(*args, **kwargs): FILE: annotator/oneformer/detectron2/config/instantiate.py function dump_dataclass (line 13) | def dump_dataclass(obj: Any): function instantiate (line 37) | def instantiate(cfg): FILE: annotator/oneformer/detectron2/config/lazy.py class LazyCall (line 24) | class LazyCall: method __init__ (line 41) | def __init__(self, target): method __call__ (line 48) | def __call__(self, **kwargs): function _visit_dict_config (line 60) | def _visit_dict_config(cfg, func): function _validate_py_syntax (line 73) | def _validate_py_syntax(filename): function _cast_to_config (line 83) | def _cast_to_config(obj): function _random_package_name (line 96) | def _random_package_name(filename): function _patch_import (line 102) | def _patch_import(): class LazyConfig (line 173) | class LazyConfig: method load_rel (line 180) | def load_rel(filename: str, keys: Union[None, str, Tuple[str, ...]] = ... method load (line 196) | def load(filename: str, keys: Union[None, str, Tuple[str, ...]] = None): method save (line 251) | def save(cfg, filename: str): method apply_overrides (line 317) | def apply_overrides(cfg, overrides: List[str]): FILE: annotator/oneformer/detectron2/data/benchmark.py class _EmptyMapDataset (line 19) | class _EmptyMapDataset(torch.utils.data.Dataset): method __init__ (line 24) | def __init__(self, dataset): method __len__ (line 27) | def __len__(self): method __getitem__ (line 30) | def __getitem__(self, idx): function iter_benchmark (line 35) | def iter_benchmark( class DataLoaderBenchmark (line 65) | class DataLoaderBenchmark: method __init__ (line 71) | def __init__( method _benchmark (line 100) | def _benchmark(self, iterator, num_iter, warmup, msg=None): method _log_time (line 106) | def _log_time(self, msg, avg, all_times, distributed=False): method benchmark_dataset (line 126) | def benchmark_dataset(self, num_iter, warmup=5): method benchmark_mapper (line 138) | def benchmark_mapper(self, num_iter, warmup=5): method benchmark_workers (line 151) | def benchmark_workers(self, num_iter, warmup=10): method benchmark_IPC (line 175) | def benchmark_IPC(self, num_iter, warmup=10): method benchmark_distributed (line 195) | def benchmark_distributed(self, num_iter, warmup=10): FILE: annotator/oneformer/detectron2/data/build.py function filter_images_with_only_crowd_annotations (line 45) | def filter_images_with_only_crowd_annotations(dataset_dicts): function filter_images_with_few_keypoints (line 76) | def filter_images_with_few_keypoints(dataset_dicts, min_keypoints_per_im... function load_proposals_into_dataset (line 110) | def load_proposals_into_dataset(dataset_dicts, proposal_file): function print_instances_class_histogram (line 164) | def print_instances_class_histogram(dataset_dicts, class_names): function get_detection_dataset_dicts (line 216) | def get_detection_dataset_dicts( function build_batch_data_loader (line 282) | def build_batch_data_loader( function _train_loader_from_config (line 342) | def _train_loader_from_config(cfg, mapper=None, *, dataset=None, sampler... function build_detection_train_loader (line 390) | def build_detection_train_loader( function _test_loader_from_config (line 453) | def _test_loader_from_config(cfg, dataset_name, mapper=None): function build_detection_test_loader (line 483) | def build_detection_test_loader( function trivial_batch_collator (line 547) | def trivial_batch_collator(batch): function worker_init_reset_seed (line 554) | def worker_init_reset_seed(worker_id): FILE: annotator/oneformer/detectron2/data/catalog.py class _DatasetCatalog (line 13) | class _DatasetCatalog(UserDict): method register (line 29) | def register(self, name, func): method get (line 40) | def get(self, name): method list (line 60) | def list(self) -> List[str]: method remove (line 69) | def remove(self, name): method __str__ (line 75) | def __str__(self): class Metadata (line 91) | class Metadata(types.SimpleNamespace): method __getattr__ (line 115) | def __getattr__(self, key): method __setattr__ (line 136) | def __setattr__(self, key, val): method as_dict (line 155) | def as_dict(self): method set (line 162) | def set(self, **kwargs): method get (line 170) | def get(self, key, default=None): class _MetadataCatalog (line 181) | class _MetadataCatalog(UserDict): method get (line 194) | def get(self, name): method list (line 209) | def list(self): method remove (line 218) | def remove(self, name): method __str__ (line 224) | def __str__(self): FILE: annotator/oneformer/detectron2/data/common.py function _shard_iterator_dataloader_worker (line 21) | def _shard_iterator_dataloader_worker(iterable): class _MapIterableDataset (line 31) | class _MapIterableDataset(data.IterableDataset): method __init__ (line 41) | def __init__(self, dataset, map_func): method __len__ (line 45) | def __len__(self): method __iter__ (line 48) | def __iter__(self): class MapDataset (line 54) | class MapDataset(data.Dataset): method __init__ (line 59) | def __init__(self, dataset, map_func): method __new__ (line 77) | def __new__(cls, dataset, map_func): method __getnewargs__ (line 84) | def __getnewargs__(self): method __len__ (line 87) | def __len__(self): method __getitem__ (line 90) | def __getitem__(self, idx): class _TorchSerializedList (line 114) | class _TorchSerializedList(object): method __init__ (line 129) | def __init__(self, lst: list): method __len__ (line 147) | def __len__(self): method __getitem__ (line 150) | def __getitem__(self, idx): function set_default_dataset_from_list_serialize_method (line 163) | def set_default_dataset_from_list_serialize_method(new): class DatasetFromList (line 175) | class DatasetFromList(data.Dataset): method __init__ (line 180) | def __init__( method __len__ (line 211) | def __len__(self): method __getitem__ (line 214) | def __getitem__(self, idx): class ToIterableDataset (line 221) | class ToIterableDataset(data.IterableDataset): method __init__ (line 227) | def __init__(self, dataset: data.Dataset, sampler: Sampler, shard_samp... method __iter__ (line 247) | def __iter__(self): method __len__ (line 260) | def __len__(self): class AspectRatioGroupedDataset (line 264) | class AspectRatioGroupedDataset(data.IterableDataset): method __init__ (line 277) | def __init__(self, dataset, batch_size): method __iter__ (line 290) | def __iter__(self): FILE: annotator/oneformer/detectron2/data/dataset_mapper.py class DatasetMapper (line 20) | class DatasetMapper: method __init__ (line 38) | def __init__( method from_config (line 86) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 115) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 144) | def __call__(self, dataset_dict): FILE: annotator/oneformer/detectron2/data/datasets/builtin.py function register_all_coco (line 101) | def register_all_coco(root): function register_all_lvis (line 165) | def register_all_lvis(root): function register_all_cityscapes (line 184) | def register_all_cityscapes(root): function register_all_pascal_voc (line 215) | def register_all_pascal_voc(root): function register_all_ade20k (line 231) | def register_all_ade20k(root): FILE: annotator/oneformer/detectron2/data/datasets/builtin_meta.py function _get_coco_instances_meta (line 235) | def _get_coco_instances_meta(): function _get_coco_panoptic_separated_meta (line 250) | def _get_coco_panoptic_separated_meta(): function _get_builtin_metadata (line 283) | def _get_builtin_metadata(dataset_name): FILE: annotator/oneformer/detectron2/data/datasets/cityscapes.py function _get_cityscapes_files (line 27) | def _get_cityscapes_files(image_dir, gt_dir): function load_cityscapes_instances (line 53) | def load_cityscapes_instances(image_dir, gt_dir, from_json=True, to_poly... function load_cityscapes_semantic (line 95) | def load_cityscapes_semantic(image_dir, gt_dir): function _cityscapes_files_to_dict (line 128) | def _cityscapes_files_to_dict(files, from_json, to_polygons): FILE: annotator/oneformer/detectron2/data/datasets/cityscapes_panoptic.py function get_cityscapes_panoptic_files (line 18) | def get_cityscapes_panoptic_files(image_dir, gt_dir, json_info): function load_cityscapes_panoptic (line 51) | def load_cityscapes_panoptic(image_dir, gt_dir, gt_json, meta): function register_all_cityscapes_panoptic (line 127) | def register_all_cityscapes_panoptic(root): FILE: annotator/oneformer/detectron2/data/datasets/coco.py function load_coco_json (line 30) | def load_coco_json(json_file, image_root, dataset_name=None, extra_annot... function load_sem_seg (line 230) | def load_sem_seg(gt_root, image_root, gt_ext="png", image_ext="jpg"): function convert_to_coco_dict (line 306) | def convert_to_coco_dict(dataset_name): function convert_to_coco_json (line 445) | def convert_to_coco_json(dataset_name, output_file, allow_cached=True): function register_coco_instances (line 479) | def register_coco_instances(name, metadata, json_file, image_root): FILE: annotator/oneformer/detectron2/data/datasets/coco_panoptic.py function load_coco_panoptic_json (line 14) | def load_coco_panoptic_json(json_file, image_dir, gt_dir, meta): function register_coco_panoptic (line 66) | def register_coco_panoptic( function register_coco_panoptic_separated (line 102) | def register_coco_panoptic_separated( function merge_to_panoptic (line 168) | def merge_to_panoptic(detection_dicts, sem_seg_dicts): FILE: annotator/oneformer/detectron2/data/datasets/lvis.py function register_lvis_instances (line 25) | def register_lvis_instances(name, metadata, json_file, image_root): function load_lvis_json (line 41) | def load_lvis_json(json_file, image_root, dataset_name=None, extra_annot... function get_lvis_instances_meta (line 168) | def get_lvis_instances_meta(dataset_name): function _get_lvis_instances_meta_v0_5 (line 187) | def _get_lvis_instances_meta_v0_5(): function _get_lvis_instances_meta_v1 (line 200) | def _get_lvis_instances_meta_v1(): FILE: annotator/oneformer/detectron2/data/datasets/pascal_voc.py function load_voc_instances (line 25) | def load_voc_instances(dirname: str, split: str, class_names: Union[List... function register_pascal_voc (line 78) | def register_pascal_voc(name, dirname, split, year, class_names=CLASS_NA... FILE: annotator/oneformer/detectron2/data/detection_utils.py class SizeMismatchError (line 46) | class SizeMismatchError(ValueError): function convert_PIL_to_numpy (line 60) | def convert_PIL_to_numpy(image, format): function convert_image_to_rgb (line 93) | def convert_image_to_rgb(image, format): function _apply_exif_orientation (line 119) | def _apply_exif_orientation(image): function read_image (line 166) | def read_image(file_name, format=None): function check_image_size (line 188) | def check_image_size(dataset_dict, image): function transform_proposals (line 214) | def transform_proposals(dataset_dict, image_shape, transforms, *, propos... function get_bbox (line 257) | def get_bbox(annotation): function transform_instance_annotations (line 270) | def transform_instance_annotations( function transform_keypoint_annotations (line 334) | def transform_keypoint_annotations(keypoints, transforms, image_size, ke... function annotations_to_instances (line 382) | def annotations_to_instances(annos, image_size, mask_format="polygon"): function annotations_to_instances_rotated (line 457) | def annotations_to_instances_rotated(annos, image_size): function filter_empty_instances (line 486) | def filter_empty_instances( function create_keypoint_hflip_indices (line 522) | def create_keypoint_hflip_indices(dataset_names: Union[str, List[str]]) ... function get_fed_loss_cls_weights (line 547) | def get_fed_loss_cls_weights(dataset_names: Union[str, List[str]], freq_... function gen_crop_transform_with_instance (line 570) | def gen_crop_transform_with_instance(crop_size, image_size, instance): function check_metadata_consistency (line 600) | def check_metadata_consistency(key, dataset_names): function build_augmentation (line 629) | def build_augmentation(cfg, is_train): FILE: annotator/oneformer/detectron2/data/samplers/distributed_sampler.py class TrainingSampler (line 15) | class TrainingSampler(Sampler): method __init__ (line 36) | def __init__(self, size: int, shuffle: bool = True, seed: Optional[int... method __iter__ (line 58) | def __iter__(self): method _infinite_indices (line 62) | def _infinite_indices(self): class RandomSubsetTrainingSampler (line 72) | class RandomSubsetTrainingSampler(TrainingSampler): method __init__ (line 79) | def __init__( method _infinite_indices (line 117) | def _infinite_indices(self): class RepeatFactorTrainingSampler (line 129) | class RepeatFactorTrainingSampler(Sampler): method __init__ (line 135) | def __init__(self, repeat_factors, *, shuffle=True, seed=None): method repeat_factors_from_category_frequency (line 158) | def repeat_factors_from_category_frequency(dataset_dicts, repeat_thresh): method _get_epoch_indices (line 204) | def _get_epoch_indices(self, generator): method __iter__ (line 227) | def __iter__(self): method _infinite_indices (line 231) | def _infinite_indices(self): class InferenceSampler (line 245) | class InferenceSampler(Sampler): method __init__ (line 253) | def __init__(self, size: int): method _get_local_indices (line 265) | def _get_local_indices(total_size, world_size, rank): method __iter__ (line 274) | def __iter__(self): method __len__ (line 277) | def __len__(self): FILE: annotator/oneformer/detectron2/data/samplers/grouped_batch_sampler.py class GroupedBatchSampler (line 6) | class GroupedBatchSampler(BatchSampler): method __init__ (line 14) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 37) | def __iter__(self): method __len__ (line 46) | def __len__(self): FILE: annotator/oneformer/detectron2/data/transforms/augmentation.py function _check_img_dtype (line 27) | def _check_img_dtype(img): function _get_aug_input_args (line 39) | def _get_aug_input_args(aug, aug_input) -> List[Any]: class Augmentation (line 80) | class Augmentation: method _init (line 109) | def _init(self, params=None): method get_transform (line 115) | def get_transform(self, *args) -> Transform: method __call__ (line 151) | def __call__(self, aug_input) -> Transform: method _rand_range (line 176) | def _rand_range(self, low=1.0, high=None, size=None): method __repr__ (line 186) | def __repr__(self): class _TransformToAug (line 219) | class _TransformToAug(Augmentation): method __init__ (line 220) | def __init__(self, tfm: Transform): method get_transform (line 223) | def get_transform(self, *args): method __repr__ (line 226) | def __repr__(self): function _transform_to_aug (line 232) | def _transform_to_aug(tfm_or_aug): class AugmentationList (line 244) | class AugmentationList(Augmentation): method __init__ (line 256) | def __init__(self, augs): method __call__ (line 264) | def __call__(self, aug_input) -> TransformList: method __repr__ (line 271) | def __repr__(self): class AugInput (line 278) | class AugInput: method __init__ (line 310) | def __init__( method transform (line 331) | def transform(self, tfm: Transform) -> None: method apply_augmentations (line 344) | def apply_augmentations( function apply_augmentations (line 353) | def apply_augmentations(augmentations: List[Union[Transform, Augmentatio... FILE: annotator/oneformer/detectron2/data/transforms/augmentation_impl.py class RandomApply (line 48) | class RandomApply(Augmentation): method __init__ (line 53) | def __init__(self, tfm_or_aug, prob=0.5): method get_transform (line 67) | def get_transform(self, *args): method __call__ (line 74) | def __call__(self, aug_input): class RandomFlip (line 82) | class RandomFlip(Augmentation): method __init__ (line 87) | def __init__(self, prob=0.5, *, horizontal=True, vertical=False): method get_transform (line 102) | def get_transform(self, image): class Resize (line 114) | class Resize(Augmentation): method __init__ (line 117) | def __init__(self, shape, interp=Image.BILINEAR): method get_transform (line 128) | def get_transform(self, image): class ResizeShortestEdge (line 134) | class ResizeShortestEdge(Augmentation): method __init__ (line 143) | def __init__( method get_transform (line 168) | def get_transform(self, image): method get_output_shape (line 181) | def get_output_shape( class ResizeScale (line 203) | class ResizeScale(Augmentation): method __init__ (line 212) | def __init__( method _get_resize (line 231) | def _get_resize(self, image: np.ndarray, scale: float) -> Transform: method get_transform (line 248) | def get_transform(self, image: np.ndarray) -> Transform: class RandomRotation (line 253) | class RandomRotation(Augmentation): method __init__ (line 259) | def __init__(self, angle, expand=True, center=None, sample_style="rang... method get_transform (line 283) | def get_transform(self, image): class FixedSizeCrop (line 307) | class FixedSizeCrop(Augmentation): method __init__ (line 315) | def __init__( method _get_crop (line 332) | def _get_crop(self, image: np.ndarray) -> Transform: method _get_pad (line 346) | def _get_pad(self, image: np.ndarray) -> Transform: method get_transform (line 366) | def get_transform(self, image: np.ndarray) -> TransformList: class RandomCrop (line 373) | class RandomCrop(Augmentation): method __init__ (line 378) | def __init__(self, crop_type: str, crop_size): method get_transform (line 400) | def get_transform(self, image): method get_crop_size (line 408) | def get_crop_size(self, image_size): class RandomCrop_CategoryAreaConstraint (line 435) | class RandomCrop_CategoryAreaConstraint(Augmentation): method __init__ (line 443) | def __init__( method get_transform (line 462) | def get_transform(self, image, sem_seg): class RandomExtent (line 481) | class RandomExtent(Augmentation): method __init__ (line 490) | def __init__(self, scale_range, shift_range): method get_transform (line 503) | def get_transform(self, image): class RandomContrast (line 526) | class RandomContrast(Augmentation): method __init__ (line 538) | def __init__(self, intensity_min, intensity_max): method get_transform (line 547) | def get_transform(self, image): class RandomBrightness (line 552) | class RandomBrightness(Augmentation): method __init__ (line 564) | def __init__(self, intensity_min, intensity_max): method get_transform (line 573) | def get_transform(self, image): class RandomSaturation (line 578) | class RandomSaturation(Augmentation): method __init__ (line 591) | def __init__(self, intensity_min, intensity_max): method get_transform (line 600) | def get_transform(self, image): class RandomLighting (line 607) | class RandomLighting(Augmentation): method __init__ (line 616) | def __init__(self, scale): method get_transform (line 628) | def get_transform(self, image): class RandomResize (line 636) | class RandomResize(Augmentation): method __init__ (line 639) | def __init__(self, shape_list, interp=Image.BILINEAR): method get_transform (line 648) | def get_transform(self, image): class MinIoURandomCrop (line 654) | class MinIoURandomCrop(Augmentation): method __init__ (line 668) | def __init__( method get_transform (line 681) | def get_transform(self, image, boxes): FILE: annotator/oneformer/detectron2/data/transforms/transform.py class ExtentTransform (line 36) | class ExtentTransform(Transform): method __init__ (line 46) | def __init__(self, src_rect, output_size, interp=Image.LINEAR, fill=0): method apply_image (line 57) | def apply_image(self, img, interp=None): method apply_coords (line 75) | def apply_coords(self, coords): method apply_segmentation (line 89) | def apply_segmentation(self, segmentation): class ResizeTransform (line 94) | class ResizeTransform(Transform): method __init__ (line 99) | def __init__(self, h, w, new_h, new_w, interp=None): method apply_image (line 112) | def apply_image(self, img, interp=None): method apply_coords (line 149) | def apply_coords(self, coords): method apply_segmentation (line 154) | def apply_segmentation(self, segmentation): method inverse (line 158) | def inverse(self): class RotationTransform (line 162) | class RotationTransform(Transform): method __init__ (line 168) | def __init__(self, h, w, angle, expand=True, center=None, interp=None): method apply_image (line 200) | def apply_image(self, img, interp=None): method apply_coords (line 210) | def apply_coords(self, coords): method apply_segmentation (line 219) | def apply_segmentation(self, segmentation): method create_rotation_matrix (line 223) | def create_rotation_matrix(self, offset=0): method inverse (line 235) | def inverse(self): class ColorTransform (line 250) | class ColorTransform(Transform): method __init__ (line 258) | def __init__(self, op): method apply_image (line 269) | def apply_image(self, img): method apply_coords (line 272) | def apply_coords(self, coords): method inverse (line 275) | def inverse(self): method apply_segmentation (line 278) | def apply_segmentation(self, segmentation): class PILColorTransform (line 282) | class PILColorTransform(ColorTransform): method __init__ (line 289) | def __init__(self, op): method apply_image (line 302) | def apply_image(self, img): function HFlip_rotated_box (line 307) | def HFlip_rotated_box(transform, rotated_boxes): function Resize_rotated_box (line 323) | def Resize_rotated_box(transform, rotated_boxes): FILE: annotator/oneformer/detectron2/engine/defaults.py function create_ddp_model (line 60) | def create_ddp_model(model, *, fp16_compression=False, **kwargs): function default_argument_parser (line 82) | def default_argument_parser(epilog=None): function _try_get_key (line 146) | def _try_get_key(cfg, *keys, default=None): function _highlight (line 160) | def _highlight(code, filename): function default_setup (line 174) | def default_setup(cfg, args): function default_writers (line 230) | def default_writers(output_dir: str, max_iter: Optional[int] = None): class DefaultPredictor (line 252) | class DefaultPredictor: method __init__ (line 280) | def __init__(self, cfg): method __call__ (line 297) | def __call__(self, original_image): class DefaultTrainer (line 321) | class DefaultTrainer(TrainerBase): method __init__ (line 364) | def __init__(self, cfg): method resume_or_load (line 398) | def resume_or_load(self, resume=True): method build_hooks (line 418) | def build_hooks(self): method build_writers (line 466) | def build_writers(self): method train (line 477) | def train(self): method run_step (line 492) | def run_step(self): method state_dict (line 496) | def state_dict(self): method load_state_dict (line 501) | def load_state_dict(self, state_dict): method build_model (line 506) | def build_model(cls, cfg): method build_optimizer (line 520) | def build_optimizer(cls, cfg, model): method build_lr_scheduler (line 531) | def build_lr_scheduler(cls, cfg, optimizer): method build_train_loader (line 539) | def build_train_loader(cls, cfg): method build_test_loader (line 550) | def build_test_loader(cls, cfg, dataset_name): method build_evaluator (line 561) | def build_evaluator(cls, cfg, dataset_name): method test (line 577) | def test(cls, cfg, model, evaluators=None): method auto_scale_workers (line 633) | def auto_scale_workers(cfg, num_workers: int): FILE: annotator/oneformer/detectron2/engine/hooks.py class CallbackHook (line 50) | class CallbackHook(HookBase): method __init__ (line 55) | def __init__(self, *, before_train=None, after_train=None, before_step... method before_train (line 64) | def before_train(self): method after_train (line 68) | def after_train(self): method before_step (line 76) | def before_step(self): method after_step (line 80) | def after_step(self): class IterationTimer (line 85) | class IterationTimer(HookBase): method __init__ (line 97) | def __init__(self, warmup_iter=3): method before_train (line 108) | def before_train(self): method after_train (line 113) | def after_train(self): method before_step (line 139) | def before_step(self): method after_step (line 143) | def after_step(self): class PeriodicWriter (line 157) | class PeriodicWriter(HookBase): method __init__ (line 165) | def __init__(self, writers, period=20): method after_step (line 176) | def after_step(self): method after_train (line 183) | def after_train(self): class PeriodicCheckpointer (line 191) | class PeriodicCheckpointer(_PeriodicCheckpointer, HookBase): method before_train (line 202) | def before_train(self): method after_step (line 205) | def after_step(self): class BestCheckpointer (line 210) | class BestCheckpointer(HookBase): method __init__ (line 218) | def __init__( method _update_best (line 251) | def _update_best(self, val, iteration): method _best_checking (line 258) | def _best_checking(self): method after_step (line 291) | def after_step(self): method after_train (line 301) | def after_train(self): class LRScheduler (line 307) | class LRScheduler(HookBase): method __init__ (line 313) | def __init__(self, optimizer=None, scheduler=None): method before_train (line 326) | def before_train(self): method get_best_param_group_id (line 338) | def get_best_param_group_id(optimizer): method after_step (line 356) | def after_step(self): method scheduler (line 362) | def scheduler(self): method state_dict (line 365) | def state_dict(self): method load_state_dict (line 370) | def load_state_dict(self, state_dict): class TorchProfiler (line 377) | class TorchProfiler(HookBase): method __init__ (line 395) | def __init__(self, enable_predicate, output_dir, *, activities=None, s... method before_step (line 410) | def before_step(self): method after_step (line 435) | def after_step(self): class AutogradProfiler (line 457) | class AutogradProfiler(TorchProfiler): method __init__ (line 480) | def __init__(self, enable_predicate, output_dir, *, use_cuda=True): method before_step (line 494) | def before_step(self): class EvalHook (line 502) | class EvalHook(HookBase): method __init__ (line 509) | def __init__(self, eval_period, eval_function, eval_after_train=True): method _do_eval (line 528) | def _do_eval(self): method after_step (line 551) | def after_step(self): method after_train (line 558) | def after_train(self): class PreciseBN (line 567) | class PreciseBN(HookBase): method __init__ (line 577) | def __init__(self, period, model, data_loader, num_iter): method after_step (line 606) | def after_step(self): method update_stats (line 612) | def update_stats(self): class TorchMemoryStats (line 639) | class TorchMemoryStats(HookBase): method __init__ (line 644) | def __init__(self, period=20, max_runs=10): method after_step (line 656) | def after_step(self): FILE: annotator/oneformer/detectron2/engine/launch.py function _find_free_port (line 15) | def _find_free_port(): function launch (line 27) | def launch( function _distributed_worker (line 87) | def _distributed_worker( FILE: annotator/oneformer/detectron2/engine/train_loop.py class HookBase (line 19) | class HookBase: method before_train (line 56) | def before_train(self): method after_train (line 62) | def after_train(self): method before_step (line 68) | def before_step(self): method after_backward (line 74) | def after_backward(self): method after_step (line 80) | def after_step(self): method state_dict (line 86) | def state_dict(self): class TrainerBase (line 94) | class TrainerBase: method __init__ (line 113) | def __init__(self) -> None: method register_hooks (line 121) | def register_hooks(self, hooks: List[Optional[HookBase]]) -> None: method train (line 139) | def train(self, start_iter: int, max_iter: int): method before_train (line 167) | def before_train(self): method after_train (line 171) | def after_train(self): method before_step (line 176) | def before_step(self): method after_backward (line 184) | def after_backward(self): method after_step (line 188) | def after_step(self): method run_step (line 192) | def run_step(self): method state_dict (line 195) | def state_dict(self): method load_state_dict (line 210) | def load_state_dict(self, state_dict): class SimpleTrainer (line 226) | class SimpleTrainer(TrainerBase): method __init__ (line 245) | def __init__(self, model, data_loader, optimizer, gather_metric_period... method run_step (line 272) | def run_step(self): method _data_loader_iter (line 313) | def _data_loader_iter(self): method reset_data_loader (line 319) | def reset_data_loader(self, data_loader_builder): method _write_metrics (line 329) | def _write_metrics( method write_metrics (line 339) | def write_metrics( method state_dict (line 381) | def state_dict(self): method load_state_dict (line 386) | def load_state_dict(self, state_dict): class AMPTrainer (line 391) | class AMPTrainer(SimpleTrainer): method __init__ (line 397) | def __init__( method run_step (line 428) | def run_step(self): method state_dict (line 462) | def state_dict(self): method load_state_dict (line 467) | def load_state_dict(self, state_dict): FILE: annotator/oneformer/detectron2/evaluation/cityscapes_evaluation.py class CityscapesEvaluator (line 18) | class CityscapesEvaluator(DatasetEvaluator): method __init__ (line 23) | def __init__(self, dataset_name): method reset (line 34) | def reset(self): class CityscapesInstanceEvaluator (line 50) | class CityscapesInstanceEvaluator(CityscapesEvaluator): method process (line 60) | def process(self, inputs, outputs): method evaluate (line 91) | def evaluate(self): class CityscapesSemSegEvaluator (line 132) | class CityscapesSemSegEvaluator(CityscapesEvaluator): method process (line 142) | def process(self, inputs, outputs): method evaluate (line 158) | def evaluate(self): FILE: annotator/oneformer/detectron2/evaluation/coco_evaluation.py class COCOEvaluator (line 34) | class COCOEvaluator(DatasetEvaluator): method __init__ (line 47) | def __init__( method reset (line 154) | def reset(self): method process (line 157) | def process(self, inputs, outputs): method evaluate (line 177) | def evaluate(self, img_ids=None): method _tasks_from_predictions (line 210) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 222) | def _eval_predictions(self, predictions, img_ids=None): method _eval_box_proposals (line 284) | def _eval_box_proposals(self, predictions): method _derive_coco_results (line 323) | def _derive_coco_results(self, coco_eval, iou_type, class_names=None): function instances_to_coco_json (line 392) | def instances_to_coco_json(instances, img_id): function _evaluate_box_proposals (line 456) | def _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=No... function _evaluate_predictions_on_coco (line 567) | def _evaluate_predictions_on_coco( class COCOevalMaxDets (line 634) | class COCOevalMaxDets(COCOeval): method summarize (line 640) | def summarize(self): method __str__ (line 721) | def __str__(self): FILE: annotator/oneformer/detectron2/evaluation/evaluator.py class DatasetEvaluator (line 15) | class DatasetEvaluator: method reset (line 26) | def reset(self): method process (line 33) | def process(self, inputs, outputs): method evaluate (line 50) | def evaluate(self): class DatasetEvaluators (line 66) | class DatasetEvaluators(DatasetEvaluator): method __init__ (line 74) | def __init__(self, evaluators): method reset (line 82) | def reset(self): method process (line 86) | def process(self, inputs, outputs): method evaluate (line 90) | def evaluate(self): function inference_on_dataset (line 103) | def inference_on_dataset( function inference_context (line 213) | def inference_context(model): FILE: annotator/oneformer/detectron2/evaluation/fast_eval_api.py class COCOeval_opt (line 13) | class COCOeval_opt(COCOeval): method evaluate (line 19) | def evaluate(self): method accumulate (line 98) | def accumulate(self): FILE: annotator/oneformer/detectron2/evaluation/lvis_evaluation.py class LVISEvaluator (line 22) | class LVISEvaluator(DatasetEvaluator): method __init__ (line 28) | def __init__( method reset (line 77) | def reset(self): method process (line 80) | def process(self, inputs, outputs): method evaluate (line 99) | def evaluate(self): method _tasks_from_predictions (line 128) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 134) | def _eval_predictions(self, predictions): method _eval_box_proposals (line 180) | def _eval_box_proposals(self, predictions): function _evaluate_box_proposals (line 222) | def _evaluate_box_proposals(dataset_predictions, lvis_api, thresholds=No... function _evaluate_predictions_on_lvis (line 331) | def _evaluate_predictions_on_lvis( FILE: annotator/oneformer/detectron2/evaluation/panoptic_evaluation.py class COCOPanopticEvaluator (line 24) | class COCOPanopticEvaluator(DatasetEvaluator): method __init__ (line 32) | def __init__(self, dataset_name: str, output_dir: Optional[str] = None): method reset (line 50) | def reset(self): method _convert_category_id (line 53) | def _convert_category_id(self, segment_info): method process (line 68) | def process(self, inputs, outputs): method evaluate (line 114) | def evaluate(self): function _print_panoptic_results (line 168) | def _print_panoptic_results(pq_res): FILE: annotator/oneformer/detectron2/evaluation/pascal_voc_evaluation.py class PascalVOCDetectionEvaluator (line 20) | class PascalVOCDetectionEvaluator(DatasetEvaluator): method __init__ (line 31) | def __init__(self, dataset_name): method reset (line 51) | def reset(self): method process (line 54) | def process(self, inputs, outputs): method evaluate (line 70) | def evaluate(self): function parse_rec (line 132) | def parse_rec(filename): function voc_ap (line 155) | def voc_ap(rec, prec, use_07_metric=False): function voc_eval (line 187) | def voc_eval(detpath, annopath, imagesetfile, classname, ovthresh=0.5, u... FILE: annotator/oneformer/detectron2/evaluation/rotated_coco_evaluation.py class RotatedCOCOeval (line 15) | class RotatedCOCOeval(COCOeval): method is_rotated (line 17) | def is_rotated(box_list): method boxlist_to_tensor (line 34) | def boxlist_to_tensor(boxlist, output_box_dim): method compute_iou_dt_gt (line 57) | def compute_iou_dt_gt(self, dt, gt, is_crowd): method computeIoU (line 68) | def computeIoU(self, imgId, catId): class RotatedCOCOEvaluator (line 97) | class RotatedCOCOEvaluator(COCOEvaluator): method process (line 104) | def process(self, inputs, outputs): method instances_to_json (line 124) | def instances_to_json(self, instances, img_id): method _eval_predictions (line 148) | def _eval_predictions(self, predictions, img_ids=None): # img_ids: un... method _evaluate_predictions_on_coco (line 192) | def _evaluate_predictions_on_coco(self, coco_gt, coco_results): FILE: annotator/oneformer/detectron2/evaluation/sem_seg_evaluation.py function load_image_into_numpy_array (line 27) | def load_image_into_numpy_array( class SemSegEvaluator (line 37) | class SemSegEvaluator(DatasetEvaluator): method __init__ (line 42) | def __init__( method reset (line 113) | def reset(self): method process (line 120) | def process(self, inputs, outputs): method evaluate (line 154) | def evaluate(self): method encode_json_sem_seg (line 232) | def encode_json_sem_seg(self, sem_seg, input_file_name): method _mask_to_boundary (line 254) | def _mask_to_boundary(self, mask: np.ndarray, dilation_ratio=0.02): FILE: annotator/oneformer/detectron2/evaluation/testing.py function print_csv_format (line 9) | def print_csv_format(results): function verify_results (line 31) | def verify_results(cfg, results): function flatten_results_dict (line 68) | def flatten_results_dict(results): FILE: annotator/oneformer/detectron2/export/__init__.py function add_export_config (line 23) | def add_export_config(cfg): FILE: annotator/oneformer/detectron2/export/api.py class Caffe2Tracer (line 22) | class Caffe2Tracer: method __init__ (line 45) | def __init__(self, cfg: CfgNode, model: nn.Module, inputs): method export_caffe2 (line 65) | def export_caffe2(self): method export_onnx (line 81) | def export_onnx(self): method export_torchscript (line 96) | def export_torchscript(self): class Caffe2Model (line 110) | class Caffe2Model(nn.Module): method __init__ (line 126) | def __init__(self, predict_net, init_net): method predict_net (line 136) | def predict_net(self): method init_net (line 143) | def init_net(self): method save_protobuf (line 149) | def save_protobuf(self, output_dir): method save_graph (line 175) | def save_graph(self, output_file, inputs=None): method load_protobuf (line 198) | def load_protobuf(dir): method __call__ (line 218) | def __call__(self, inputs): FILE: annotator/oneformer/detectron2/export/c10.py class Caffe2Boxes (line 23) | class Caffe2Boxes(Boxes): method __init__ (line 30) | def __init__(self, tensor): class InstancesList (line 39) | class InstancesList(object): method __init__ (line 49) | def __init__(self, im_info, indices, extra_fields=None): method get_fields (line 59) | def get_fields(self): method has (line 73) | def has(self, name): method set (line 76) | def set(self, name, value): method __getattr__ (line 92) | def __getattr__(self, name): method __len__ (line 97) | def __len__(self): method flatten (line 100) | def flatten(self): method to_d2_instances_list (line 110) | def to_d2_instances_list(instances_list): class Caffe2Compatible (line 150) | class Caffe2Compatible(object): method _get_tensor_mode (line 155) | def _get_tensor_mode(self): method _set_tensor_mode (line 158) | def _set_tensor_mode(self, v): class Caffe2RPN (line 167) | class Caffe2RPN(Caffe2Compatible, rpn.RPN): method from_config (line 169) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method _generate_proposals (line 176) | def _generate_proposals( method forward (line 259) | def forward(self, images, features, gt_instances=None): method c2_postprocess (line 271) | def c2_postprocess(im_info, rpn_rois, rpn_roi_probs, tensor_mode): class Caffe2ROIPooler (line 287) | class Caffe2ROIPooler(Caffe2Compatible, poolers.ROIPooler): method c2_preprocess (line 289) | def c2_preprocess(box_lists): method forward (line 299) | def forward(self, x, box_lists): class Caffe2FastRCNNOutputsInference (line 379) | class Caffe2FastRCNNOutputsInference: method __init__ (line 380) | def __init__(self, tensor_mode): method __call__ (line 383) | def __call__(self, box_predictor, predictions, proposals): class Caffe2MaskRCNNInference (line 525) | class Caffe2MaskRCNNInference: method __call__ (line 526) | def __call__(self, pred_mask_logits, pred_instances): class Caffe2KeypointRCNNInference (line 537) | class Caffe2KeypointRCNNInference: method __init__ (line 538) | def __init__(self, use_heatmap_max_keypoint): method __call__ (line 541) | def __call__(self, pred_keypoint_logits, pred_instances): FILE: annotator/oneformer/detectron2/export/caffe2_export.py function export_onnx_model (line 34) | def export_onnx_model(model, inputs): function _op_stats (line 70) | def _op_stats(net_def): function _assign_device_option (line 79) | def _assign_device_option( function export_caffe2_detection_model (line 125) | def export_caffe2_detection_model(model: torch.nn.Module, tensor_inputs:... function run_and_save_graph (line 171) | def run_and_save_graph(predict_net, init_net, tensor_inputs, graph_save_... FILE: annotator/oneformer/detectron2/export/caffe2_inference.py class ProtobufModel (line 17) | class ProtobufModel(torch.nn.Module): method __init__ (line 26) | def __init__(self, predict_net, init_net): method _infer_output_devices (line 48) | def _infer_output_devices(self, inputs): method forward (line 71) | def forward(self, inputs): class ProtobufDetectionModel (line 125) | class ProtobufDetectionModel(torch.nn.Module): method __init__ (line 131) | def __init__(self, predict_net, init_net, *, convert_outputs=None): method _convert_inputs (line 151) | def _convert_inputs(self, batched_inputs): method forward (line 157) | def forward(self, batched_inputs): FILE: annotator/oneformer/detectron2/export/caffe2_modeling.py function assemble_rcnn_outputs_by_name (line 27) | def assemble_rcnn_outputs_by_name(image_sizes, tensor_outputs, force_mas... function _cast_to_f32 (line 95) | def _cast_to_f32(f64): function set_caffe2_compatible_tensor_mode (line 99) | def set_caffe2_compatible_tensor_mode(model, enable=True): function convert_batched_inputs_to_c2_format (line 107) | def convert_batched_inputs_to_c2_format(batched_inputs, size_divisibilit... class Caffe2MetaArch (line 135) | class Caffe2MetaArch(Caffe2Compatible, torch.nn.Module): method __init__ (line 142) | def __init__(self, cfg, torch_model): method get_caffe2_inputs (line 154) | def get_caffe2_inputs(self, batched_inputs): method encode_additional_info (line 178) | def encode_additional_info(self, predict_net, init_net): method forward (line 184) | def forward(self, inputs): method _caffe2_preprocess_image (line 199) | def _caffe2_preprocess_image(self, inputs): method get_outputs_converter (line 217) | def get_outputs_converter(predict_net, init_net): class Caffe2GeneralizedRCNN (line 245) | class Caffe2GeneralizedRCNN(Caffe2MetaArch): method __init__ (line 246) | def __init__(self, cfg, torch_model): method encode_additional_info (line 259) | def encode_additional_info(self, predict_net, init_net): method forward (line 268) | def forward(self, inputs): method get_outputs_converter (line 279) | def get_outputs_converter(predict_net, init_net): class Caffe2RetinaNet (line 289) | class Caffe2RetinaNet(Caffe2MetaArch): method __init__ (line 290) | def __init__(self, cfg, torch_model): method forward (line 295) | def forward(self, inputs): method encode_additional_info (line 316) | def encode_additional_info(self, predict_net, init_net): method _encode_anchor_generator_cfg (line 349) | def _encode_anchor_generator_cfg(self, predict_net): method get_outputs_converter (line 359) | def get_outputs_converter(predict_net, init_net): FILE: annotator/oneformer/detectron2/export/caffe2_patch.py class GenericMixin (line 22) | class GenericMixin(object): class Caffe2CompatibleConverter (line 26) | class Caffe2CompatibleConverter(object): method __init__ (line 32) | def __init__(self, replaceCls): method create_from (line 35) | def create_from(self, module): function patch (line 57) | def patch(model, target, updater, *args, **kwargs): function patch_generalized_rcnn (line 70) | def patch_generalized_rcnn(model): function mock_fastrcnn_outputs_inference (line 79) | def mock_fastrcnn_outputs_inference( function mock_mask_rcnn_inference (line 94) | def mock_mask_rcnn_inference(tensor_mode, patched_module, check=True): function mock_keypoint_rcnn_inference (line 104) | def mock_keypoint_rcnn_inference(tensor_mode, patched_module, use_heatma... class ROIHeadsPatcher (line 114) | class ROIHeadsPatcher: method __init__ (line 115) | def __init__(self, heads, use_heatmap_max_keypoint): method mock_roi_heads (line 120) | def mock_roi_heads(self, tensor_mode=True): FILE: annotator/oneformer/detectron2/export/flatten.py class Schema (line 15) | class Schema: method flatten (line 37) | def flatten(cls, obj): method __call__ (line 40) | def __call__(self, values): method _concat (line 44) | def _concat(values): method _split (line 54) | def _split(values, sizes): class ListSchema (line 68) | class ListSchema(Schema): method __call__ (line 72) | def __call__(self, values): method flatten (line 82) | def flatten(cls, obj): class TupleSchema (line 89) | class TupleSchema(ListSchema): method __call__ (line 90) | def __call__(self, values): class IdentitySchema (line 95) | class IdentitySchema(Schema): method __call__ (line 96) | def __call__(self, values): method flatten (line 100) | def flatten(cls, obj): class DictSchema (line 105) | class DictSchema(ListSchema): method __call__ (line 108) | def __call__(self, values): method flatten (line 113) | def flatten(cls, obj): class InstancesSchema (line 124) | class InstancesSchema(DictSchema): method __call__ (line 125) | def __call__(self, values): method flatten (line 131) | def flatten(cls, obj): class TensorWrapSchema (line 140) | class TensorWrapSchema(Schema): method __call__ (line 148) | def __call__(self, values): method flatten (line 152) | def flatten(cls, obj): function flatten_to_tuple (line 158) | def flatten_to_tuple(obj): class TracingAdapter (line 186) | class TracingAdapter(nn.Module): method __init__ (line 225) | def __init__( method forward (line 279) | def forward(self, *args: torch.Tensor): method _create_wrapper (line 319) | def _create_wrapper(self, traced_model): FILE: annotator/oneformer/detectron2/export/shared.py function to_device (line 24) | def to_device(t, device_str): function BilinearInterpolation (line 47) | def BilinearInterpolation(tensor_in, up_scale): function onnx_compatibale_interpolate (line 81) | def onnx_compatibale_interpolate( function mock_torch_nn_functional_interpolate (line 114) | def mock_torch_nn_functional_interpolate(): class ScopedWS (line 134) | class ScopedWS(object): method __init__ (line 135) | def __init__(self, ws_name, is_reset, is_cleanup=False): method __enter__ (line 141) | def __enter__(self): method __exit__ (line 150) | def __exit__(self, *args): function fetch_any_blob (line 157) | def fetch_any_blob(name): function get_pb_arg (line 172) | def get_pb_arg(pb, arg_name): function get_pb_arg_valf (line 179) | def get_pb_arg_valf(pb, arg_name, default_val): function get_pb_arg_floats (line 184) | def get_pb_arg_floats(pb, arg_name, default_val): function get_pb_arg_ints (line 189) | def get_pb_arg_ints(pb, arg_name, default_val): function get_pb_arg_vali (line 194) | def get_pb_arg_vali(pb, arg_name, default_val): function get_pb_arg_vals (line 199) | def get_pb_arg_vals(pb, arg_name, default_val): function get_pb_arg_valstrings (line 204) | def get_pb_arg_valstrings(pb, arg_name, default_val): function check_set_pb_arg (line 209) | def check_set_pb_arg(pb, arg_name, arg_attr, arg_value, allow_override=F... function _create_const_fill_op_from_numpy (line 227) | def _create_const_fill_op_from_numpy(name, tensor, device_option=None): function _create_const_fill_op_from_c2_int8_tensor (line 248) | def _create_const_fill_op_from_c2_int8_tensor(name, int8_tensor): function create_const_fill_op (line 270) | def create_const_fill_op( function construct_init_net_from_params (line 295) | def construct_init_net_from_params( function get_producer_map (line 319) | def get_producer_map(ssa): function get_consumer_map (line 332) | def get_consumer_map(ssa): function get_params_from_init_net (line 345) | def get_params_from_init_net( function _updater_raise (line 374) | def _updater_raise(op, input_types, output_types): function _generic_status_identifier (line 381) | def _generic_status_identifier( function infer_device_type (line 453) | def infer_device_type( function _modify_blob_names (line 496) | def _modify_blob_names(ops, blob_rename_f): function _rename_blob (line 512) | def _rename_blob(name, blob_sizes, blob_ranges): function save_graph (line 528) | def save_graph(net, file_name, graph_name="net", op_only=True, blob_size... function save_graph_base (line 533) | def save_graph_base(net, file_name, graph_name="net", op_only=True, blob... function group_norm_replace_aten_with_caffe2 (line 568) | def group_norm_replace_aten_with_caffe2(predict_net: caffe2_pb2.NetDef): function alias (line 597) | def alias(x, name, is_backward=False): function fuse_alias_placeholder (line 604) | def fuse_alias_placeholder(predict_net, init_net): class IllegalGraphTransformError (line 632) | class IllegalGraphTransformError(ValueError): function _rename_versioned_blob_in_proto (line 636) | def _rename_versioned_blob_in_proto( function rename_op_input (line 667) | def rename_op_input( function rename_op_output (line 734) | def rename_op_output(predict_net: caffe2_pb2.NetDef, op_id: int, output_... function get_sub_graph_external_input_output (line 755) | def get_sub_graph_external_input_output( class DiGraph (line 787) | class DiGraph: method __init__ (line 790) | def __init__(self): method add_edge (line 794) | def add_edge(self, u, v): method get_all_paths (line 800) | def get_all_paths(self, s, d): method from_ssa (line 821) | def from_ssa(ssa): function _get_dependency_chain (line 830) | def _get_dependency_chain(ssa, versioned_target, versioned_source): function identify_reshape_sub_graph (line 860) | def identify_reshape_sub_graph(predict_net: caffe2_pb2.NetDef) -> List[L... function remove_reshape_for_fc (line 887) | def remove_reshape_for_fc(predict_net, params): function fuse_copy_between_cpu_and_gpu (line 957) | def fuse_copy_between_cpu_and_gpu(predict_net: caffe2_pb2.NetDef): function remove_dead_end_ops (line 1015) | def remove_dead_end_ops(net_def: caffe2_pb2.NetDef): FILE: annotator/oneformer/detectron2/export/torchscript.py function scripting_with_instances (line 13) | def scripting_with_instances(model, fields): function dump_torchscript_IR (line 63) | def dump_torchscript_IR(model, dir): FILE: annotator/oneformer/detectron2/export/torchscript_patch.py function _clear_jit_cache (line 20) | def _clear_jit_cache(): function _add_instances_conversion_methods (line 28) | def _add_instances_conversion_methods(newInstances): function patch_instances (line 51) | def patch_instances(fields): function _gen_instance_class (line 90) | def _gen_instance_class(fields): function _gen_instance_module (line 290) | def _gen_instance_module(fields): function _import (line 309) | def _import(path): function patch_builtin_len (line 316) | def patch_builtin_len(modules=()): function patch_nonscriptable_classes (line 342) | def patch_nonscriptable_classes(): function freeze_training_mode (line 392) | def freeze_training_mode(model): FILE: annotator/oneformer/detectron2/layers/aspp.py class ASPP (line 14) | class ASPP(nn.Module): method __init__ (line 19) | def __init__( method forward (line 129) | def forward(self, x): FILE: annotator/oneformer/detectron2/layers/batch_norm.py class FrozenBatchNorm2d (line 13) | class FrozenBatchNorm2d(nn.Module): method __init__ (line 35) | def __init__(self, num_features, eps=1e-5): method forward (line 44) | def forward(self, x): method _load_from_state_dict (line 67) | def _load_from_state_dict( method __repr__ (line 84) | def __repr__(self): method convert_frozen_batchnorm (line 88) | def convert_frozen_batchnorm(cls, module): function get_norm (line 121) | def get_norm(norm, out_channels): class NaiveSyncBatchNorm (line 152) | class NaiveSyncBatchNorm(BatchNorm2d): method __init__ (line 180) | def __init__(self, *args, stats_mode="", **kwargs): method forward (line 185) | def forward(self, input): class CycleBatchNormList (line 233) | class CycleBatchNormList(nn.ModuleList): method __init__ (line 249) | def __init__(self, length: int, bn_class=nn.BatchNorm2d, **kwargs): method forward (line 265) | def forward(self, x): method extra_repr (line 276) | def extra_repr(self): class LayerNorm (line 280) | class LayerNorm(nn.Module): method __init__ (line 288) | def __init__(self, normalized_shape, eps=1e-6): method forward (line 295) | def forward(self, x): FILE: annotator/oneformer/detectron2/layers/blocks.py class CNNBlockBase (line 16) | class CNNBlockBase(nn.Module): method __init__ (line 29) | def __init__(self, in_channels, out_channels, stride): method freeze (line 43) | def freeze(self): class DepthwiseSeparableConv2d (line 58) | class DepthwiseSeparableConv2d(nn.Module): method __init__ (line 66) | def __init__( method forward (line 110) | def forward(self, x): FILE: annotator/oneformer/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated.h function namespace (line 5) | namespace detectron2 { FILE: annotator/oneformer/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.cpp type detectron2 (line 12) | namespace detectron2 { type PreCalc (line 16) | struct PreCalc { function pre_calc_for_bilinear_interpolate (line 28) | void pre_calc_for_bilinear_interpolate( function bilinear_interpolate_gradient (line 132) | void bilinear_interpolate_gradient( function add (line 195) | inline void add(T* address, const T& val) { function ROIAlignRotatedForward (line 202) | void ROIAlignRotatedForward( function ROIAlignRotatedBackward (line 313) | void ROIAlignRotatedBackward( function ROIAlignRotated_forward_cpu (line 418) | at::Tensor ROIAlignRotated_forward_cpu( function ROIAlignRotated_backward_cpu (line 466) | at::Tensor ROIAlignRotated_backward_cpu( FILE: annotator/oneformer/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated.h function namespace (line 5) | namespace detectron2 { FILE: annotator/oneformer/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.cpp type detectron2 (line 5) | namespace detectron2 { function box_iou_rotated_cpu_kernel (line 8) | void box_iou_rotated_cpu_kernel( function box_iou_rotated_cpu (line 23) | at::Tensor box_iou_rotated_cpu( FILE: annotator/oneformer/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h function namespace (line 17) | namespace detectron2 { FILE: annotator/oneformer/detectron2/layers/csrc/cocoeval/cocoeval.cpp type detectron2 (line 10) | namespace detectron2 { type COCOeval (line 12) | namespace COCOeval { function SortInstancesByDetectionScore (line 18) | void SortInstancesByDetectionScore( function SortInstancesByIgnore (line 34) | void SortInstancesByIgnore( function MatchDetectionsToGroundTruth (line 61) | void MatchDetectionsToGroundTruth( function EvaluateImages (line 142) | std::vector EvaluateImages( function list_to_vec (line 203) | std::vector list_to_vec(const py::list& l) { function BuildSortedDetectionList (line 223) | int BuildSortedDetectionList( function ComputePrecisionRecallCurve (line 284) | void ComputePrecisionRecallCurve( function Accumulate (line 372) | py::dict Accumulate( FILE: annotator/oneformer/detectron2/layers/csrc/cocoeval/cocoeval.h function namespace (line 12) | namespace detectron2 { FILE: annotator/oneformer/detectron2/layers/csrc/deformable/deform_conv.h function namespace (line 5) | namespace detectron2 { FILE: annotator/oneformer/detectron2/layers/csrc/nms_rotated/nms_rotated.h function namespace (line 5) | namespace detectron2 { FILE: annotator/oneformer/detectron2/layers/csrc/nms_rotated/nms_rotated_cpu.cpp type detectron2 (line 5) | namespace detectron2 { function nms_rotated_cpu_kernel (line 8) | at::Tensor nms_rotated_cpu_kernel( function nms_rotated_cpu (line 62) | at::Tensor nms_rotated_cpu( FILE: annotator/oneformer/detectron2/layers/csrc/vision.cpp type detectron2 (line 10) | namespace detectron2 { function get_cuda_version (line 16) | std::string get_cuda_version() { function has_cuda (line 41) | bool has_cuda() { function get_compiler_version (line 51) | std::string get_compiler_version() { function PYBIND11_MODULE (line 77) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { function TORCH_LIBRARY (line 111) | TORCH_LIBRARY(detectron2, m) { FILE: annotator/oneformer/detectron2/layers/deform_conv.py class _DeformConv (line 16) | class _DeformConv(Function): method forward (line 18) | def forward( method backward (line 85) | def backward(ctx, grad_output): method _output_size (line 146) | def _output_size(input, weight, padding, dilation, stride): method _cal_im2col_step (line 165) | def _cal_im2col_step(input_size, default_size): class _ModulatedDeformConv (line 187) | class _ModulatedDeformConv(Function): method forward (line 189) | def forward( method backward (line 246) | def backward(ctx, grad_output): method _infer_shape (line 298) | def _infer_shape(ctx, input, weight): class DeformConv (line 316) | class DeformConv(nn.Module): method __init__ (line 317) | def __init__( method forward (line 369) | def forward(self, x, offset): method extra_repr (line 400) | def extra_repr(self): class ModulatedDeformConv (line 413) | class ModulatedDeformConv(nn.Module): method __init__ (line 414) | def __init__( method forward (line 463) | def forward(self, x, offset, mask): method extra_repr (line 492) | def extra_repr(self): FILE: annotator/oneformer/detectron2/layers/losses.py function diou_loss (line 5) | def diou_loss( function ciou_loss (line 66) | def ciou_loss( FILE: annotator/oneformer/detectron2/layers/mask_ops.py function _do_paste_mask (line 17) | def _do_paste_mask(masks, boxes, img_h: int, img_w: int, skip_empty: boo... function paste_masks_in_image (line 74) | def paste_masks_in_image( function paste_mask_in_image_old (line 155) | def paste_mask_in_image_old(mask, box, img_h, img_w, threshold): function pad_masks (line 219) | def pad_masks(masks, padding): function scale_boxes (line 237) | def scale_boxes(boxes, scale): function _paste_masks_tensor_shape (line 264) | def _paste_masks_tensor_shape( FILE: annotator/oneformer/detectron2/layers/nms.py function batched_nms (line 9) | def batched_nms( function nms_rotated (line 25) | def nms_rotated(boxes: torch.Tensor, scores: torch.Tensor, iou_threshold... function batched_nms_rotated (line 94) | def batched_nms_rotated( FILE: annotator/oneformer/detectron2/layers/roi_align.py class ROIAlign (line 7) | class ROIAlign(nn.Module): method __init__ (line 8) | def __init__(self, output_size, spatial_scale, sampling_ratio, aligned... method forward (line 49) | def forward(self, input, rois): method __repr__ (line 67) | def __repr__(self): FILE: annotator/oneformer/detectron2/layers/roi_align_rotated.py class _ROIAlignRotated (line 9) | class _ROIAlignRotated(Function): method forward (line 11) | def forward(ctx, input, roi, output_size, spatial_scale, sampling_ratio): method backward (line 24) | def backward(ctx, grad_output): class ROIAlignRotated (line 48) | class ROIAlignRotated(nn.Module): method __init__ (line 49) | def __init__(self, output_size, spatial_scale, sampling_ratio): method forward (line 69) | def forward(self, input, rois): method __repr__ (line 94) | def __repr__(self): FILE: annotator/oneformer/detectron2/layers/rotated_boxes.py function pairwise_iou_rotated (line 6) | def pairwise_iou_rotated(boxes1, boxes2): FILE: annotator/oneformer/detectron2/layers/shape_spec.py class ShapeSpec (line 8) | class ShapeSpec: FILE: annotator/oneformer/detectron2/layers/wrappers.py function shapes_to_tensor (line 19) | def shapes_to_tensor(x: List[int], device: Optional[torch.device] = None... function check_if_dynamo_compiling (line 41) | def check_if_dynamo_compiling(): function cat (line 50) | def cat(tensors: List[torch.Tensor], dim: int = 0): function empty_input_loss_func_wrapper (line 60) | def empty_input_loss_func_wrapper(loss_func): class _NewEmptyTensorOp (line 75) | class _NewEmptyTensorOp(torch.autograd.Function): method forward (line 77) | def forward(ctx, x, new_shape): method backward (line 82) | def backward(ctx, grad): class Conv2d (line 87) | class Conv2d(torch.nn.Conv2d): method __init__ (line 92) | def __init__(self, *args, **kwargs): method forward (line 109) | def forward(self, x): function nonzero_tuple (line 143) | def nonzero_tuple(x): function move_device_like (line 157) | def move_device_like(src: torch.Tensor, dst: torch.Tensor) -> torch.Tensor: FILE: annotator/oneformer/detectron2/model_zoo/model_zoo.py class _ModelZooUrls (line 12) | class _ModelZooUrls(object): method query (line 99) | def query(config_path: str) -> Optional[str]: function get_checkpoint_url (line 111) | def get_checkpoint_url(config_path): function get_config_file (line 128) | def get_config_file(config_path): function get_config (line 147) | def get_config(config_path, trained: bool = False): function get (line 180) | def get(config_path, trained: bool = False, device: Optional[str] = None): FILE: annotator/oneformer/detectron2/modeling/anchor_generator.py class BufferList (line 21) | class BufferList(nn.Module): method __init__ (line 26) | def __init__(self, buffers): method __len__ (line 32) | def __len__(self): method __iter__ (line 35) | def __iter__(self): function _create_grid_offsets (line 39) | def _create_grid_offsets( function _broadcast_params (line 58) | def _broadcast_params(params, num_features, name): class DefaultAnchorGenerator (line 86) | class DefaultAnchorGenerator(nn.Module): method __init__ (line 98) | def __init__(self, *, sizes, aspect_ratios, strides, offset=0.5): method from_config (line 128) | def from_config(cls, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 136) | def _calculate_anchors(self, sizes, aspect_ratios): method num_cell_anchors (line 144) | def num_cell_anchors(self): method num_anchors (line 152) | def num_anchors(self): method _grid_anchors (line 165) | def _grid_anchors(self, grid_sizes: List[List[int]]): method generate_cell_anchors (line 181) | def generate_cell_anchors(self, sizes=(32, 64, 128, 256, 512), aspect_... method forward (line 218) | def forward(self, features: List[torch.Tensor]): class RotatedAnchorGenerator (line 235) | class RotatedAnchorGenerator(nn.Module): method __init__ (line 247) | def __init__(self, *, sizes, aspect_ratios, strides, angles, offset=0.5): method from_config (line 280) | def from_config(cls, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 289) | def _calculate_anchors(self, sizes, aspect_ratios, angles): method num_cell_anchors (line 297) | def num_cell_anchors(self): method num_anchors (line 304) | def num_anchors(self): method _grid_anchors (line 318) | def _grid_anchors(self, grid_sizes): method generate_cell_anchors (line 329) | def generate_cell_anchors( method forward (line 365) | def forward(self, features): function build_anchor_generator (line 381) | def build_anchor_generator(cfg, input_shape): FILE: annotator/oneformer/detectron2/modeling/backbone/backbone.py class Backbone (line 11) | class Backbone(nn.Module, metaclass=ABCMeta): method __init__ (line 16) | def __init__(self): method forward (line 23) | def forward(self): method size_divisibility (line 33) | def size_divisibility(self) -> int: method padding_constraints (line 44) | def padding_constraints(self) -> Dict[str, int]: method output_shape (line 63) | def output_shape(self): FILE: annotator/oneformer/detectron2/modeling/backbone/build.py function build_backbone (line 20) | def build_backbone(cfg, input_shape=None): FILE: annotator/oneformer/detectron2/modeling/backbone/fpn.py class FPN (line 17) | class FPN(Backbone): method __init__ (line 25) | def __init__( method size_divisibility (line 119) | def size_divisibility(self): method padding_constraints (line 123) | def padding_constraints(self): method forward (line 126) | def forward(self, x): method output_shape (line 169) | def output_shape(self): function _assert_strides_are_log2_contiguous (line 178) | def _assert_strides_are_log2_contiguous(strides): class LastLevelMaxPool (line 188) | class LastLevelMaxPool(nn.Module): method __init__ (line 194) | def __init__(self): method forward (line 199) | def forward(self, x): class LastLevelP6P7 (line 203) | class LastLevelP6P7(nn.Module): method __init__ (line 209) | def __init__(self, in_channels, out_channels, in_feature="res5"): method forward (line 218) | def forward(self, c5): function build_resnet_fpn_backbone (line 225) | def build_resnet_fpn_backbone(cfg, input_shape: ShapeSpec): function build_retinanet_resnet_fpn_backbone (line 248) | def build_retinanet_resnet_fpn_backbone(cfg, input_shape: ShapeSpec): FILE: annotator/oneformer/detectron2/modeling/backbone/mvit.py function attention_pool (line 21) | def attention_pool(x, pool, norm=None): class MultiScaleAttention (line 33) | class MultiScaleAttention(nn.Module): method __init__ (line 36) | def __init__( method forward (line 128) | def forward(self, x): class MultiScaleBlock (line 177) | class MultiScaleBlock(nn.Module): method __init__ (line 180) | def __init__( method forward (line 256) | def forward(self, x): class MViT (line 271) | class MViT(Backbone): method __init__ (line 276) | def __init__( method _init_weights (line 422) | def _init_weights(self, m): method forward (line 431) | def forward(self, x): FILE: annotator/oneformer/detectron2/modeling/backbone/regnet.py function conv2d (line 28) | def conv2d(w_in, w_out, k, *, stride=1, groups=1, bias=False): function gap2d (line 35) | def gap2d(): function pool2d (line 40) | def pool2d(k, *, stride=1): function init_weights (line 46) | def init_weights(m): class ResStem (line 60) | class ResStem(CNNBlockBase): method __init__ (line 63) | def __init__(self, w_in, w_out, norm, activation_class): method forward (line 70) | def forward(self, x): class SimpleStem (line 76) | class SimpleStem(CNNBlockBase): method __init__ (line 79) | def __init__(self, w_in, w_out, norm, activation_class): method forward (line 85) | def forward(self, x): class SE (line 91) | class SE(nn.Module): method __init__ (line 94) | def __init__(self, w_in, w_se, activation_class): method forward (line 104) | def forward(self, x): class VanillaBlock (line 108) | class VanillaBlock(CNNBlockBase): method __init__ (line 111) | def __init__(self, w_in, w_out, stride, norm, activation_class, _params): method forward (line 120) | def forward(self, x): class BasicTransform (line 126) | class BasicTransform(nn.Module): method __init__ (line 129) | def __init__(self, w_in, w_out, stride, norm, activation_class, _params): method forward (line 138) | def forward(self, x): class ResBasicBlock (line 144) | class ResBasicBlock(CNNBlockBase): method __init__ (line 147) | def __init__(self, w_in, w_out, stride, norm, activation_class, params): method forward (line 156) | def forward(self, x): class BottleneckTransform (line 161) | class BottleneckTransform(nn.Module): method __init__ (line 164) | def __init__(self, w_in, w_out, stride, norm, activation_class, params): method forward (line 180) | def forward(self, x): class ResBottleneckBlock (line 186) | class ResBottleneckBlock(CNNBlockBase): method __init__ (line 189) | def __init__(self, w_in, w_out, stride, norm, activation_class, params): method forward (line 198) | def forward(self, x): class AnyStage (line 203) | class AnyStage(nn.Module): method __init__ (line 206) | def __init__(self, w_in, w_out, stride, d, block_class, norm, activati... method forward (line 213) | def forward(self, x): class AnyNet (line 219) | class AnyNet(Backbone): method __init__ (line 222) | def __init__( method forward (line 305) | def forward(self, x): method output_shape (line 324) | def output_shape(self): method freeze (line 332) | def freeze(self, freeze_at=0): function adjust_block_compatibility (line 356) | def adjust_block_compatibility(ws, bs, gs): function generate_regnet_parameters (line 369) | def generate_regnet_parameters(w_a, w_0, w_m, d, q=8): class RegNet (line 387) | class RegNet(AnyNet): method __init__ (line 390) | def __init__( FILE: annotator/oneformer/detectron2/modeling/backbone/resnet.py class BasicBlock (line 32) | class BasicBlock(CNNBlockBase): method __init__ (line 38) | def __init__(self, in_channels, out_channels, *, stride=1, norm="BN"): method forward (line 85) | def forward(self, x): class BottleneckBlock (line 100) | class BottleneckBlock(CNNBlockBase): method __init__ (line 107) | def __init__( method forward (line 194) | def forward(self, x): class DeformBottleneckBlock (line 213) | class DeformBottleneckBlock(CNNBlockBase): method __init__ (line 219) | def __init__( method forward (line 303) | def forward(self, x): class BasicStem (line 330) | class BasicStem(CNNBlockBase): method __init__ (line 336) | def __init__(self, in_channels=3, out_channels=64, norm="BN"): method forward (line 355) | def forward(self, x): class ResNet (line 362) | class ResNet(Backbone): method __init__ (line 367) | def __init__(self, stem, stages, num_classes=None, out_features=None, ... method forward (line 435) | def forward(self, x): method output_shape (line 460) | def output_shape(self): method freeze (line 468) | def freeze(self, freeze_at=0): method make_stage (line 493) | def make_stage(block_class, num_blocks, *, in_channels, out_channels, ... method make_default_stages (line 548) | def make_default_stages(depth, block_class=None, **kwargs): function make_stage (line 606) | def make_stage(*args, **kwargs): function build_resnet_backbone (line 614) | def build_resnet_backbone(cfg, input_shape): FILE: annotator/oneformer/detectron2/modeling/backbone/swin.py class Mlp (line 26) | class Mlp(nn.Module): method __init__ (line 29) | def __init__( method forward (line 40) | def forward(self, x): function window_partition (line 49) | def window_partition(x, window_size): function window_reverse (line 63) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 79) | class WindowAttention(nn.Module): method __init__ (line 93) | def __init__( method forward (line 137) | def forward(self, x, mask=None): class SwinTransformerBlock (line 180) | class SwinTransformerBlock(nn.Module): method __init__ (line 197) | def __init__( method forward (line 246) | def forward(self, x, mask_matrix): class PatchMerging (line 309) | class PatchMerging(nn.Module): method __init__ (line 316) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 322) | def forward(self, x, H, W): class BasicLayer (line 351) | class BasicLayer(nn.Module): method __init__ (line 370) | def __init__( method forward (line 418) | def forward(self, x, H, W): class PatchEmbed (line 468) | class PatchEmbed(nn.Module): method __init__ (line 477) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 491) | def forward(self, x): class SwinTransformer (line 510) | class SwinTransformer(Backbone): method __init__ (line 538) | def __init__( method _freeze_stages (line 638) | def _freeze_stages(self): method _init_weights (line 655) | def _init_weights(self, m): method size_divisibility (line 665) | def size_divisibility(self): method forward (line 668) | def forward(self, x): FILE: annotator/oneformer/detectron2/modeling/backbone/utils.py function window_partition (line 16) | def window_partition(x, window_size): function window_unpartition (line 40) | def window_unpartition(windows, window_size, pad_hw, hw): function get_rel_pos (line 63) | def get_rel_pos(q_size, k_size, rel_pos): function add_decomposed_rel_pos (line 96) | def add_decomposed_rel_pos(attn, q, rel_pos_h, rel_pos_w, q_size, k_size): function get_abs_pos (line 128) | def get_abs_pos(abs_pos, has_cls_token, hw): class PatchEmbed (line 160) | class PatchEmbed(nn.Module): method __init__ (line 165) | def __init__( method forward (line 182) | def forward(self, x): FILE: annotator/oneformer/detectron2/modeling/backbone/vit.py class Attention (line 25) | class Attention(nn.Module): method __init__ (line 28) | def __init__( method forward (line 65) | def forward(self, x): class ResBottleneckBlock (line 84) | class ResBottleneckBlock(CNNBlockBase): method __init__ (line 90) | def __init__( method forward (line 136) | def forward(self, x): class Block (line 145) | class Block(nn.Module): method __init__ (line 148) | def __init__( method forward (line 210) | def forward(self, x): class ViT (line 232) | class ViT(Backbone): method __init__ (line 239) | def __init__( method _init_weights (line 340) | def _init_weights(self, m): method forward (line 349) | def forward(self, x): class SimpleFeaturePyramid (line 363) | class SimpleFeaturePyramid(Backbone): method __init__ (line 369) | def __init__( method padding_constraints (line 471) | def padding_constraints(self): method forward (line 477) | def forward(self, x): function get_vit_lr_decay_rate (line 506) | def get_vit_lr_decay_rate(name, lr_decay_rate=1.0, num_layers=12): FILE: annotator/oneformer/detectron2/modeling/box_regression.py class Box2BoxTransform (line 21) | class Box2BoxTransform(object): method __init__ (line 28) | def __init__( method get_deltas (line 43) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 78) | def apply_deltas(self, deltas, boxes): class Box2BoxTransformRotated (line 120) | class Box2BoxTransformRotated(object): method __init__ (line 129) | def __init__( method get_deltas (line 145) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 183) | def apply_deltas(self, deltas, boxes): class Box2BoxTransformLinear (line 230) | class Box2BoxTransformLinear(object): method __init__ (line 236) | def __init__(self, normalize_by_size=True): method get_deltas (line 243) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 275) | def apply_deltas(self, deltas, boxes): function _dense_box_regression_loss (line 310) | def _dense_box_regression_loss( FILE: annotator/oneformer/detectron2/modeling/matcher.py class Matcher (line 9) | class Matcher(object): method __init__ (line 25) | def __init__( method __call__ (line 62) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 106) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): FILE: annotator/oneformer/detectron2/modeling/meta_arch/build.py function build_model (line 16) | def build_model(cfg): FILE: annotator/oneformer/detectron2/modeling/meta_arch/dense_detector.py function permute_to_N_HWA_K (line 15) | def permute_to_N_HWA_K(tensor, K: int): class DenseDetector (line 27) | class DenseDetector(nn.Module): method __init__ (line 33) | def __init__( method device (line 69) | def device(self): method _move_to_current_device (line 72) | def _move_to_current_device(self, x): method forward (line 75) | def forward(self, batched_inputs: List[Dict[str, Tensor]]): method forward_training (line 120) | def forward_training(self, images, features, predictions, gt_instances): method preprocess_image (line 123) | def preprocess_image(self, batched_inputs: List[Dict[str, Tensor]]): method _transpose_dense_predictions (line 136) | def _transpose_dense_predictions( method _ema_update (line 160) | def _ema_update(self, name: str, value: float, initial_value: float, m... method _decode_per_level_predictions (line 186) | def _decode_per_level_predictions( method _decode_multi_level_predictions (line 235) | def _decode_multi_level_predictions( method visualize_training (line 261) | def visualize_training(self, batched_inputs, results): FILE: annotator/oneformer/detectron2/modeling/meta_arch/fcos.py class FCOS (line 25) | class FCOS(DenseDetector): method __init__ (line 30) | def __init__( method forward_training (line 86) | def forward_training(self, images, features, predictions, gt_instances): method _match_anchors (line 98) | def _match_anchors(self, gt_boxes: Boxes, anchors: List[Boxes]): method label_anchors (line 154) | def label_anchors(self, anchors: List[Boxes], gt_instances: List[Insta... method losses (line 193) | def losses( method compute_ctrness_targets (line 240) | def compute_ctrness_targets(self, anchors: List[Boxes], gt_boxes: List... method forward_inference (line 253) | def forward_inference( method inference_single_image (line 279) | def inference_single_image( class FCOSHead (line 303) | class FCOSHead(RetinaNetHead): method __init__ (line 309) | def __init__(self, *, input_shape: List[ShapeSpec], conv_dims: List[in... method forward (line 318) | def forward(self, features): FILE: annotator/oneformer/detectron2/modeling/meta_arch/panoptic_fpn.py class PanopticFPN (line 21) | class PanopticFPN(GeneralizedRCNN): method __init__ (line 27) | def __init__( method from_config (line 57) | def from_config(cls, cfg): method forward (line 90) | def forward(self, batched_inputs): method inference (line 140) | def inference(self, batched_inputs: List[Dict[str, torch.Tensor]], do_... function combine_semantic_and_instance_outputs (line 184) | def combine_semantic_and_instance_outputs( FILE: annotator/oneformer/detectron2/modeling/meta_arch/rcnn.py class GeneralizedRCNN (line 25) | class GeneralizedRCNN(nn.Module): method __init__ (line 34) | def __init__( method from_config (line 72) | def from_config(cls, cfg): method device (line 85) | def device(self): method _move_to_current_device (line 88) | def _move_to_current_device(self, x): method visualize_training (line 91) | def visualize_training(self, batched_inputs, proposals): method forward (line 126) | def forward(self, batched_inputs: List[Dict[str, torch.Tensor]]): method inference (line 178) | def inference( method preprocess_image (line 223) | def preprocess_image(self, batched_inputs: List[Dict[str, torch.Tensor... method _postprocess (line 237) | def _postprocess(instances, batched_inputs: List[Dict[str, torch.Tenso... class ProposalNetwork (line 254) | class ProposalNetwork(nn.Module): method __init__ (line 260) | def __init__( method from_config (line 282) | def from_config(cls, cfg): method device (line 292) | def device(self): method _move_to_current_device (line 295) | def _move_to_current_device(self, x): method forward (line 298) | def forward(self, batched_inputs): FILE: annotator/oneformer/detectron2/modeling/meta_arch/retinanet.py class RetinaNet (line 29) | class RetinaNet(DenseDetector): method __init__ (line 35) | def __init__( method from_config (line 116) | def from_config(cls, cfg): method forward_training (line 151) | def forward_training(self, images, features, predictions, gt_instances): method losses (line 160) | def losses(self, anchors, pred_logits, gt_labels, pred_anchor_deltas, ... method label_anchors (line 213) | def label_anchors(self, anchors, gt_instances): method forward_inference (line 257) | def forward_inference( method inference_single_image (line 275) | def inference_single_image( class RetinaNetHead (line 311) | class RetinaNetHead(nn.Module): method __init__ (line 318) | def __init__( method from_config (line 401) | def from_config(cls, cfg, input_shape: List[ShapeSpec]): method forward (line 417) | def forward(self, features: List[Tensor]): FILE: annotator/oneformer/detectron2/modeling/meta_arch/semantic_seg.py class SemanticSegmentor (line 34) | class SemanticSegmentor(nn.Module): method __init__ (line 40) | def __init__( method from_config (line 62) | def from_config(cls, cfg): method device (line 73) | def device(self): method forward (line 76) | def forward(self, batched_inputs): function build_sem_seg_head (line 134) | def build_sem_seg_head(cfg, input_shape): class SemSegFPNHead (line 143) | class SemSegFPNHead(nn.Module): method __init__ (line 153) | def __init__( method from_config (line 218) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method forward (line 231) | def forward(self, features, targets=None): method layers (line 246) | def layers(self, features): method losses (line 255) | def losses(self, predictions, targets): FILE: annotator/oneformer/detectron2/modeling/mmdet_wrapper.py function _to_container (line 21) | def _to_container(cfg): class MMDetBackbone (line 33) | class MMDetBackbone(Backbone): method __init__ (line 43) | def __init__( method forward (line 100) | def forward(self, x) -> Dict[str, Tensor]: method output_shape (line 114) | def output_shape(self) -> Dict[str, ShapeSpec]: class MMDetDetector (line 118) | class MMDetDetector(nn.Module): method __init__ (line 125) | def __init__( method forward (line 157) | def forward(self, batched_inputs: List[Dict[str, torch.Tensor]]): method device (line 224) | def device(self): function _convert_mmdet_result (line 230) | def _convert_mmdet_result(result, shape: Tuple[int, int]) -> Instances: function _parse_losses (line 258) | def _parse_losses(losses: Dict[str, Tensor]) -> Dict[str, Tensor]: FILE: annotator/oneformer/detectron2/modeling/poolers.py function assign_boxes_to_levels (line 23) | def assign_boxes_to_levels( function _convert_boxes_to_pooler_format (line 64) | def _convert_boxes_to_pooler_format(boxes: torch.Tensor, sizes: torch.Te... function convert_boxes_to_pooler_format (line 72) | def convert_boxes_to_pooler_format(box_lists: List[Boxes]): function _create_zeros (line 102) | def _create_zeros( class ROIPooler (line 114) | class ROIPooler(nn.Module): method __init__ (line 120) | def __init__( method forward (line 206) | def forward(self, x: List[torch.Tensor], box_lists: List[Boxes]): FILE: annotator/oneformer/detectron2/modeling/postprocessing.py function detector_postprocess (line 9) | def detector_postprocess( function sem_seg_postprocess (line 77) | def sem_seg_postprocess(result, img_size, output_height, output_width): FILE: annotator/oneformer/detectron2/modeling/proposal_generator/build.py function build_proposal_generator (line 15) | def build_proposal_generator(cfg, input_shape): FILE: annotator/oneformer/detectron2/modeling/proposal_generator/proposal_utils.py function _is_tracing (line 13) | def _is_tracing(): function find_top_rpn_proposals (line 22) | def find_top_rpn_proposals( function add_ground_truth_to_proposals (line 138) | def add_ground_truth_to_proposals( function add_ground_truth_to_proposals_single_image (line 167) | def add_ground_truth_to_proposals_single_image( FILE: annotator/oneformer/detectron2/modeling/proposal_generator/rpn.py function build_rpn_head (line 58) | def build_rpn_head(cfg, input_shape): class StandardRPNHead (line 67) | class StandardRPNHead(nn.Module): method __init__ (line 76) | def __init__( method _get_rpn_conv (line 126) | def _get_rpn_conv(self, in_channels, out_channels): method from_config (line 137) | def from_config(cls, cfg, input_shape): method forward (line 158) | def forward(self, features: List[torch.Tensor]): class RPN (line 181) | class RPN(nn.Module): method __init__ (line 187) | def __init__( method from_config (line 259) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method _subsample_labels (line 287) | def _subsample_labels(self, label): method label_and_sample_anchors (line 307) | def label_and_sample_anchors( method losses (line 366) | def losses( method forward (line 431) | def forward( method predict_proposals (line 482) | def predict_proposals( method _decode_proposals (line 514) | def _decode_proposals(self, anchors: List[Boxes], pred_anchor_deltas: ... FILE: annotator/oneformer/detectron2/modeling/proposal_generator/rrpn.py function find_top_rrpn_proposals (line 20) | def find_top_rrpn_proposals( class RRPN (line 131) | class RRPN(RPN): method __init__ (line 137) | def __init__(self, *args, **kwargs): method from_config (line 145) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method label_and_sample_anchors (line 151) | def label_and_sample_anchors(self, anchors: List[RotatedBoxes], gt_ins... method predict_proposals (line 198) | def predict_proposals(self, anchors, pred_objectness_logits, pred_anch... FILE: annotator/oneformer/detectron2/modeling/roi_heads/box_head.py class FastRCNNConvFCHead (line 26) | class FastRCNNConvFCHead(nn.Sequential): method __init__ (line 33) | def __init__( method from_config (line 82) | def from_config(cls, cfg, input_shape): method forward (line 94) | def forward(self, x): method output_shape (line 101) | def output_shape(self): function build_box_head (line 113) | def build_box_head(cfg, input_shape): FILE: annotator/oneformer/detectron2/modeling/roi_heads/cascade_rcnn.py class _ScaleGradient (line 20) | class _ScaleGradient(Function): method forward (line 22) | def forward(ctx, input, scale): method backward (line 27) | def backward(ctx, grad_output): class CascadeROIHeads (line 32) | class CascadeROIHeads(StandardROIHeads): method __init__ (line 38) | def __init__( method from_config (line 81) | def from_config(cls, cfg, input_shape): method _init_box_head (line 87) | def _init_box_head(cls, cfg, input_shape): method forward (line 137) | def forward(self, images, features, proposals, targets=None): method _forward_box (line 153) | def _forward_box(self, features, proposals, targets=None): method _match_and_label_boxes (line 209) | def _match_and_label_boxes(self, proposals, stage, targets): method _run_stage (line 258) | def _run_stage(self, features, proposals, stage): method _create_proposals_from_boxes (line 278) | def _create_proposals_from_boxes(self, boxes, image_sizes): FILE: annotator/oneformer/detectron2/modeling/roi_heads/fast_rcnn.py function fast_rcnn_inference (line 46) | def fast_rcnn_inference( function _log_classification_stats (line 88) | def _log_classification_stats(pred_logits, gt_classes, prefix="fast_rcnn"): function fast_rcnn_inference_single_image (line 118) | def fast_rcnn_inference_single_image( class FastRCNNOutputLayers (line 174) | class FastRCNNOutputLayers(nn.Module): method __init__ (line 183) | def __init__( method from_config (line 268) | def from_config(cls, cfg, input_shape): method forward (line 288) | def forward(self, x): method losses (line 307) | def losses(self, predictions, proposals): method get_fed_loss_classes (line 356) | def get_fed_loss_classes(self, gt_classes, num_fed_loss_classes, num_c... method sigmoid_cross_entropy_loss (line 386) | def sigmoid_cross_entropy_loss(self, pred_class_logits, gt_classes): method box_reg_loss (line 424) | def box_reg_loss(self, proposal_boxes, gt_boxes, pred_deltas, gt_class... method inference (line 465) | def inference(self, predictions: Tuple[torch.Tensor, torch.Tensor], pr... method predict_boxes_for_gt_classes (line 488) | def predict_boxes_for_gt_classes(self, predictions, proposals): method predict_boxes (line 523) | def predict_boxes( method predict_probs (line 549) | def predict_probs( FILE: annotator/oneformer/detectron2/modeling/roi_heads/keypoint_head.py function build_keypoint_head (line 32) | def build_keypoint_head(cfg, input_shape): function keypoint_rcnn_loss (line 40) | def keypoint_rcnn_loss(pred_keypoint_logits, instances, normalizer): function keypoint_rcnn_inference (line 99) | def keypoint_rcnn_inference(pred_keypoint_logits: torch.Tensor, pred_ins... class BaseKeypointRCNNHead (line 135) | class BaseKeypointRCNNHead(nn.Module): method __init__ (line 142) | def __init__(self, *, num_keypoints, loss_weight=1.0, loss_normalizer=... method from_config (line 161) | def from_config(cls, cfg, input_shape): method forward (line 179) | def forward(self, x, instances: List[Instances]): method layers (line 207) | def layers(self, x): class KRCNNConvDeconvUpsampleHead (line 218) | class KRCNNConvDeconvUpsampleHead(BaseKeypointRCNNHead, nn.Sequential): method __init__ (line 226) | def __init__(self, input_shape, *, num_keypoints, conv_dims, **kwargs): method from_config (line 262) | def from_config(cls, cfg, input_shape): method layers (line 268) | def layers(self, x): FILE: annotator/oneformer/detectron2/modeling/roi_heads/mask_head.py function mask_rcnn_loss (line 33) | def mask_rcnn_loss(pred_mask_logits: torch.Tensor, instances: List[Insta... function mask_rcnn_inference (line 115) | def mask_rcnn_inference(pred_mask_logits: torch.Tensor, pred_instances: ... class BaseMaskRCNNHead (line 161) | class BaseMaskRCNNHead(nn.Module): method __init__ (line 167) | def __init__(self, *, loss_weight: float = 1.0, vis_period: int = 0): method from_config (line 180) | def from_config(cls, cfg, input_shape): method forward (line 183) | def forward(self, x, instances: List[Instances]): method layers (line 204) | def layers(self, x): class MaskRCNNConvUpsampleHead (line 215) | class MaskRCNNConvUpsampleHead(BaseMaskRCNNHead, nn.Sequential): method __init__ (line 222) | def __init__(self, input_shape: ShapeSpec, *, num_classes, conv_dims, ... method from_config (line 272) | def from_config(cls, cfg, input_shape): method layers (line 287) | def layers(self, x): function build_mask_head (line 293) | def build_mask_head(cfg, input_shape): FILE: annotator/oneformer/detectron2/modeling/roi_heads/roi_heads.py function build_roi_heads (line 38) | def build_roi_heads(cfg, input_shape): function select_foreground_proposals (line 46) | def select_foreground_proposals( function select_proposals_with_visible_keypoints (line 78) | def select_proposals_with_visible_keypoints(proposals: List[Instances]) ... class ROIHeads (line 123) | class ROIHeads(torch.nn.Module): method __init__ (line 139) | def __init__( method from_config (line 167) | def from_config(cls, cfg): method _sample_proposals (line 181) | def _sample_proposals( method label_and_sample_proposals (line 220) | def label_and_sample_proposals( method forward (line 304) | def forward( class Res5ROIHeads (line 342) | class Res5ROIHeads(ROIHeads): method __init__ (line 351) | def __init__( method from_config (line 387) | def from_config(cls, cfg, input_shape): method _build_res5_block (line 429) | def _build_res5_block(cls, cfg): method _shared_roi_transform (line 455) | def _shared_roi_transform(self, features: List[torch.Tensor], boxes: L... method forward (line 459) | def forward( method forward_with_given_boxes (line 502) | def forward_with_given_boxes( class StandardROIHeads (line 530) | class StandardROIHeads(ROIHeads): method __init__ (line 543) | def __init__( method from_config (line 601) | def from_config(cls, cfg, input_shape): method _init_box_head (line 618) | def _init_box_head(cls, cfg, input_shape): method _init_mask_head (line 655) | def _init_mask_head(cls, cfg, input_shape): method _init_keypoint_head (line 689) | def _init_keypoint_head(cls, cfg, input_shape): method forward (line 722) | def forward( method forward_with_given_boxes (line 753) | def forward_with_given_boxes( method _forward_box (line 780) | def _forward_box(self, features: Dict[str, torch.Tensor], proposals: L... method _forward_mask (line 818) | def _forward_mask(self, features: Dict[str, torch.Tensor], instances: ... method _forward_keypoint (line 848) | def _forward_keypoint(self, features: Dict[str, torch.Tensor], instanc... FILE: annotator/oneformer/detectron2/modeling/roi_heads/rotated_fast_rcnn.py function fast_rcnn_inference_rotated (line 46) | def fast_rcnn_inference_rotated( function fast_rcnn_inference_single_image_rotated (line 84) | def fast_rcnn_inference_single_image_rotated( class RotatedFastRCNNOutputLayers (line 135) | class RotatedFastRCNNOutputLayers(FastRCNNOutputLayers): method from_config (line 141) | def from_config(cls, cfg, input_shape): method inference (line 148) | def inference(self, predictions, proposals): class RROIHeads (line 169) | class RROIHeads(StandardROIHeads): method __init__ (line 176) | def __init__(self, **kwargs): method _init_box_head (line 187) | def _init_box_head(cls, cfg, input_shape): method label_and_sample_proposals (line 218) | def label_and_sample_proposals(self, proposals, targets): FILE: annotator/oneformer/detectron2/modeling/sampling.py function subsample_labels (line 9) | def subsample_labels( FILE: annotator/oneformer/detectron2/modeling/test_time_augmentation.py class DatasetMapperTTA (line 29) | class DatasetMapperTTA: method __init__ (line 39) | def __init__(self, min_sizes: List[int], max_size: int, flip: bool): method from_config (line 51) | def from_config(cls, cfg): method __call__ (line 58) | def __call__(self, dataset_dict): class GeneralizedRCNNWithTTA (line 101) | class GeneralizedRCNNWithTTA(nn.Module): method __init__ (line 107) | def __init__(self, cfg, model, tta_mapper=None, batch_size=3): method _turn_off_roi_heads (line 137) | def _turn_off_roi_heads(self, attrs): method _batch_inference (line 162) | def _batch_inference(self, batched_inputs, detected_instances=None): method __call__ (line 188) | def __call__(self, batched_inputs): method _inference_one_image (line 206) | def _inference_one_image(self, input): method _get_augmented_inputs (line 239) | def _get_augmented_inputs(self, input): method _get_augmented_boxes (line 244) | def _get_augmented_boxes(self, augmented_inputs, tfms): method _merge_detections (line 262) | def _merge_detections(self, all_boxes, all_scores, all_classes, shape_... method _rescale_detected_boxes (line 282) | def _rescale_detected_boxes(self, augmented_inputs, merged_instances, ... method _reduce_pred_masks (line 298) | def _reduce_pred_masks(self, outputs, tfms): FILE: annotator/oneformer/detectron2/projects/__init__.py class _D2ProjectsFinder (line 19) | class _D2ProjectsFinder(importlib.abc.MetaPathFinder): method find_spec (line 20) | def find_spec(self, name, path, target=None): FILE: annotator/oneformer/detectron2/projects/deeplab/build_solver.py function build_lr_scheduler (line 11) | def build_lr_scheduler(cfg: CfgNode, optimizer: torch.optim.Optimizer) -... FILE: annotator/oneformer/detectron2/projects/deeplab/config.py function add_deeplab_config (line 5) | def add_deeplab_config(cfg): FILE: annotator/oneformer/detectron2/projects/deeplab/loss.py class DeepLabCE (line 6) | class DeepLabCE(nn.Module): method __init__ (line 20) | def __init__(self, ignore_label=-1, top_k_percent_pixels=1.0, weight=N... method forward (line 28) | def forward(self, logits, labels, weights=None): FILE: annotator/oneformer/detectron2/projects/deeplab/lr_scheduler.py class WarmupPolyLR (line 17) | class WarmupPolyLR(LRScheduler): method __init__ (line 25) | def __init__( method get_lr (line 44) | def get_lr(self) -> List[float]: method _compute_values (line 60) | def _compute_values(self) -> List[float]: FILE: annotator/oneformer/detectron2/projects/deeplab/resnet.py class DeepLabStem (line 15) | class DeepLabStem(CNNBlockBase): method __init__ (line 20) | def __init__(self, in_channels=3, out_channels=128, norm="BN"): method forward (line 59) | def forward(self, x): function build_resnet_deeplab_backbone (line 71) | def build_resnet_deeplab_backbone(cfg, input_shape): FILE: annotator/oneformer/detectron2/projects/deeplab/semantic_seg.py class DeepLabV3PlusHead (line 16) | class DeepLabV3PlusHead(nn.Module): method __init__ (line 22) | def __init__( method from_config (line 191) | def from_config(cls, cfg, input_shape): method forward (line 219) | def forward(self, features, targets=None): method layers (line 237) | def layers(self, features): method losses (line 254) | def losses(self, predictions, targets): class DeepLabV3Head (line 264) | class DeepLabV3Head(nn.Module): method __init__ (line 269) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method forward (line 325) | def forward(self, features, targets=None): method losses (line 342) | def losses(self, predictions, targets): FILE: annotator/oneformer/detectron2/solver/build.py class GradientClipType (line 24) | class GradientClipType(Enum): function _create_gradient_clipper (line 29) | def _create_gradient_clipper(cfg: CfgNode) -> _GradientClipper: function _generate_optimizer_class_with_gradient_clipping (line 49) | def _generate_optimizer_class_with_gradient_clipping( function maybe_add_gradient_clipping (line 83) | def maybe_add_gradient_clipping( function build_optimizer (line 119) | def build_optimizer(cfg: CfgNode, model: torch.nn.Module) -> torch.optim... function get_default_optimizer_params (line 142) | def get_default_optimizer_params( function _expand_param_groups (line 238) | def _expand_param_groups(params: List[Dict[str, Any]]) -> List[Dict[str,... function reduce_param_groups (line 250) | def reduce_param_groups(params: List[Dict[str, Any]]) -> List[Dict[str, ... function build_lr_scheduler (line 270) | def build_lr_scheduler(cfg: CfgNode, optimizer: torch.optim.Optimizer) -... FILE: annotator/oneformer/detectron2/solver/lr_scheduler.py class WarmupParamScheduler (line 22) | class WarmupParamScheduler(CompositeParamScheduler): method __init__ (line 27) | def __init__( class LRMultiplier (line 60) | class LRMultiplier(LRScheduler): method __init__ (line 94) | def __init__( method state_dict (line 118) | def state_dict(self): method get_lr (line 122) | def get_lr(self) -> List[float]: class WarmupMultiStepLR (line 140) | class WarmupMultiStepLR(LRScheduler): method __init__ (line 141) | def __init__( method get_lr (line 165) | def get_lr(self) -> List[float]: method _compute_values (line 174) | def _compute_values(self) -> List[float]: class WarmupCosineLR (line 179) | class WarmupCosineLR(LRScheduler): method __init__ (line 180) | def __init__( method get_lr (line 198) | def get_lr(self) -> List[float]: method _compute_values (line 215) | def _compute_values(self) -> List[float]: function _get_warmup_factor_at_iter (line 220) | def _get_warmup_factor_at_iter( FILE: annotator/oneformer/detectron2/structures/boxes.py class BoxMode (line 13) | class BoxMode(IntEnum): method convert (line 44) | def convert(box: _RawBoxType, from_mode: "BoxMode", to_mode: "BoxMode"... class Boxes (line 130) | class Boxes: method __init__ (line 142) | def __init__(self, tensor: torch.Tensor): method clone (line 159) | def clone(self) -> "Boxes": method to (line 168) | def to(self, device: torch.device): method area (line 172) | def area(self) -> torch.Tensor: method clip (line 183) | def clip(self, box_size: Tuple[int, int]) -> None: method nonempty (line 199) | def nonempty(self, threshold: float = 0.0) -> torch.Tensor: method __getitem__ (line 215) | def __getitem__(self, item) -> "Boxes": method __len__ (line 239) | def __len__(self) -> int: method __repr__ (line 242) | def __repr__(self) -> str: method inside_box (line 245) | def inside_box(self, box_size: Tuple[int, int], boundary_threshold: in... method get_centers (line 264) | def get_centers(self) -> torch.Tensor: method scale (line 271) | def scale(self, scale_x: float, scale_y: float) -> None: method cat (line 279) | def cat(cls, boxes_list: List["Boxes"]) -> "Boxes": method device (line 299) | def device(self) -> device: method __iter__ (line 305) | def __iter__(self): function pairwise_intersection (line 312) | def pairwise_intersection(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_iou (line 336) | def pairwise_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_ioa (line 361) | def pairwise_ioa(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_point_box_distance (line 381) | def pairwise_point_box_distance(points: torch.Tensor, boxes: Boxes): function matched_pairwise_iou (line 400) | def matched_pairwise_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: FILE: annotator/oneformer/detectron2/structures/image_list.py class ImageList (line 11) | class ImageList(object): method __init__ (line 23) | def __init__(self, tensor: torch.Tensor, image_sizes: List[Tuple[int, ... method __len__ (line 33) | def __len__(self) -> int: method __getitem__ (line 36) | def __getitem__(self, idx) -> torch.Tensor: method to (line 50) | def to(self, *args: Any, **kwargs: Any) -> "ImageList": method device (line 55) | def device(self) -> device: method from_tensors (line 59) | def from_tensors( FILE: annotator/oneformer/detectron2/structures/instances.py class Instances (line 8) | class Instances: method __init__ (line 39) | def __init__(self, image_size: Tuple[int, int], **kwargs: Any): method image_size (line 51) | def image_size(self) -> Tuple[int, int]: method __setattr__ (line 58) | def __setattr__(self, name: str, val: Any) -> None: method __getattr__ (line 64) | def __getattr__(self, name: str) -> Any: method set (line 69) | def set(self, name: str, value: Any) -> None: method has (line 83) | def has(self, name: str) -> bool: method remove (line 90) | def remove(self, name: str) -> None: method get (line 96) | def get(self, name: str) -> Any: method get_fields (line 102) | def get_fields(self) -> Dict[str, Any]: method to (line 112) | def to(self, *args: Any, **kwargs: Any) -> "Instances": method __getitem__ (line 124) | def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "I... method __len__ (line 144) | def __len__(self) -> int: method __iter__ (line 150) | def __iter__(self): method cat (line 154) | def cat(instance_lists: List["Instances"]) -> "Instances": method __str__ (line 186) | def __str__(self) -> str: FILE: annotator/oneformer/detectron2/structures/keypoints.py class Keypoints (line 8) | class Keypoints: method __init__ (line 21) | def __init__(self, keypoints: Union[torch.Tensor, np.ndarray, List[Lis... method __len__ (line 33) | def __len__(self) -> int: method to (line 36) | def to(self, *args: Any, **kwargs: Any) -> "Keypoints": method device (line 40) | def device(self) -> torch.device: method to_heatmap (line 43) | def to_heatmap(self, boxes: torch.Tensor, heatmap_size: int) -> torch.... method __getitem__ (line 60) | def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "K... method __repr__ (line 78) | def __repr__(self) -> str: method cat (line 84) | def cat(keypoints_list: List["Keypoints"]) -> "Keypoints": function _keypoints_to_heatmap (line 105) | def _keypoints_to_heatmap( function heatmaps_to_keypoints (line 165) | def heatmaps_to_keypoints(maps: torch.Tensor, rois: torch.Tensor) -> tor... FILE: annotator/oneformer/detectron2/structures/masks.py function polygon_area (line 16) | def polygon_area(x, y): function polygons_to_bitmask (line 22) | def polygons_to_bitmask(polygons: List[np.ndarray], height: int, width: ... function rasterize_polygons_within_box (line 39) | def rasterize_polygons_within_box( class BitMasks (line 88) | class BitMasks: method __init__ (line 97) | def __init__(self, tensor: Union[torch.Tensor, np.ndarray]): method to (line 111) | def to(self, *args: Any, **kwargs: Any) -> "BitMasks": method device (line 115) | def device(self) -> torch.device: method __getitem__ (line 119) | def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "B... method __iter__ (line 143) | def __iter__(self) -> torch.Tensor: method __repr__ (line 147) | def __repr__(self) -> str: method __len__ (line 152) | def __len__(self) -> int: method nonempty (line 155) | def nonempty(self) -> torch.Tensor: method from_polygon_masks (line 166) | def from_polygon_masks( method from_roi_masks (line 183) | def from_roi_masks(roi_masks: "ROIMasks", height: int, width: int) -> ... method crop_and_resize (line 191) | def crop_and_resize(self, boxes: torch.Tensor, mask_size: int) -> torc... method get_bounding_boxes (line 224) | def get_bounding_boxes(self) -> Boxes: method cat (line 243) | def cat(bitmasks_list: List["BitMasks"]) -> "BitMasks": class PolygonMasks (line 261) | class PolygonMasks: method __init__ (line 269) | def __init__(self, polygons: List[List[Union[torch.Tensor, np.ndarray]... method to (line 313) | def to(self, *args: Any, **kwargs: Any) -> "PolygonMasks": method device (line 317) | def device(self) -> torch.device: method get_bounding_boxes (line 320) | def get_bounding_boxes(self) -> Boxes: method nonempty (line 337) | def nonempty(self) -> torch.Tensor: method __getitem__ (line 348) | def __getitem__(self, item: Union[int, slice, List[int], torch.BoolTen... method __iter__ (line 378) | def __iter__(self) -> Iterator[List[np.ndarray]]: method __repr__ (line 386) | def __repr__(self) -> str: method __len__ (line 391) | def __len__(self) -> int: method crop_and_resize (line 394) | def crop_and_resize(self, boxes: torch.Tensor, mask_size: int) -> torc... method area (line 426) | def area(self): method cat (line 446) | def cat(polymasks_list: List["PolygonMasks"]) -> "PolygonMasks": class ROIMasks (line 466) | class ROIMasks: method __init__ (line 473) | def __init__(self, tensor: torch.Tensor): method to (line 482) | def to(self, device: torch.device) -> "ROIMasks": method device (line 486) | def device(self) -> device: method __len__ (line 489) | def __len__(self): method __getitem__ (line 492) | def __getitem__(self, item) -> "ROIMasks": method __repr__ (line 514) | def __repr__(self) -> str: method to_bitmasks (line 520) | def to_bitmasks(self, boxes: torch.Tensor, height, width, threshold=0.5): FILE: annotator/oneformer/detectron2/structures/rotated_boxes.py class RotatedBoxes (line 11) | class RotatedBoxes(Boxes): method __init__ (line 20) | def __init__(self, tensor: torch.Tensor): method clone (line 223) | def clone(self) -> "RotatedBoxes": method to (line 232) | def to(self, device: torch.device): method area (line 236) | def area(self) -> torch.Tensor: method normalize_angles (line 248) | def normalize_angles(self) -> None: method clip (line 255) | def clip(self, box_size: Tuple[int, int], clip_angle_threshold: float ... method nonempty (line 305) | def nonempty(self, threshold: float = 0.0) -> torch.Tensor: method __getitem__ (line 320) | def __getitem__(self, item) -> "RotatedBoxes": method __len__ (line 343) | def __len__(self) -> int: method __repr__ (line 346) | def __repr__(self) -> str: method inside_box (line 349) | def inside_box(self, box_size: Tuple[int, int], boundary_threshold: in... method get_centers (line 386) | def get_centers(self) -> torch.Tensor: method scale (line 393) | def scale(self, scale_x: float, scale_y: float) -> None: method cat (line 459) | def cat(cls, boxes_list: List["RotatedBoxes"]) -> "RotatedBoxes": method device (line 479) | def device(self) -> torch.device: method __iter__ (line 483) | def __iter__(self): function pairwise_iou (line 490) | def pairwise_iou(boxes1: RotatedBoxes, boxes2: RotatedBoxes) -> None: FILE: annotator/oneformer/detectron2/tracking/base_tracker.py class BaseTracker (line 15) | class BaseTracker(object): method __init__ (line 21) | def __init__(self, **kwargs): method from_config (line 29) | def from_config(cls, cfg: CfgNode_): method update (line 32) | def update(self, predictions: Instances) -> Instances: function build_tracker_head (line 53) | def build_tracker_head(cfg: CfgNode_) -> BaseTracker: FILE: annotator/oneformer/detectron2/tracking/bbox_iou_tracker.py class BBoxIOUTracker (line 17) | class BBoxIOUTracker(BaseTracker): method __init__ (line 23) | def __init__( method from_config (line 60) | def from_config(cls, cfg: CfgNode_): method update (line 89) | def update(self, instances: Instances) -> Instances: method _create_prediction_pairs (line 124) | def _create_prediction_pairs(self, instances: Instances, iou_all: np.n... method _initialize_extra_fields (line 151) | def _initialize_extra_fields(self, instances: Instances) -> Instances: method _reset_fields (line 174) | def _reset_fields(self): method _assign_new_id (line 182) | def _assign_new_id(self, instances: Instances) -> Instances: method _merge_untracked_instances (line 199) | def _merge_untracked_instances(self, instances: Instances) -> Instances: FILE: annotator/oneformer/detectron2/tracking/hungarian_tracker.py class BaseHungarianTracker (line 16) | class BaseHungarianTracker(BaseTracker): method __init__ (line 22) | def __init__( method from_config (line 54) | def from_config(cls, cfg: CfgNode_) -> Dict: method build_cost_matrix (line 57) | def build_cost_matrix(self, instances: Instances, prev_instances: Inst... method update (line 60) | def update(self, instances: Instances) -> Instances: method _initialize_extra_fields (line 74) | def _initialize_extra_fields(self, instances: Instances) -> Instances: method _process_matched_idx (line 97) | def _process_matched_idx( method _process_unmatched_idx (line 109) | def _process_unmatched_idx(self, instances: Instances, matched_idx: np... method _process_unmatched_prev_idx (line 118) | def _process_unmatched_prev_idx( FILE: annotator/oneformer/detectron2/tracking/iou_weighted_hungarian_bbox_iou_tracker.py class IOUWeightedHungarianBBoxIOUTracker (line 15) | class IOUWeightedHungarianBBoxIOUTracker(VanillaHungarianBBoxIOUTracker): method __init__ (line 22) | def __init__( method from_config (line 60) | def from_config(cls, cfg: CfgNode_): method assign_cost_matrix_values (line 89) | def assign_cost_matrix_values(self, cost_matrix: np.ndarray, bbox_pair... FILE: annotator/oneformer/detectron2/tracking/utils.py function create_prediction_pairs (line 8) | def create_prediction_pairs( FILE: annotator/oneformer/detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py class VanillaHungarianBBoxIOUTracker (line 18) | class VanillaHungarianBBoxIOUTracker(BaseHungarianTracker): method __init__ (line 24) | def __init__( method from_config (line 62) | def from_config(cls, cfg: CfgNode_): method build_cost_matrix (line 91) | def build_cost_matrix(self, instances: Instances, prev_instances: Inst... method assign_cost_matrix_values (line 116) | def assign_cost_matrix_values(self, cost_matrix: np.ndarray, bbox_pair... FILE: annotator/oneformer/detectron2/utils/analysis.py class FlopCountAnalysis (line 55) | class FlopCountAnalysis(fvcore.nn.FlopCountAnalysis): method __init__ (line 60) | def __init__(self, model, inputs): function flop_count_operators (line 71) | def flop_count_operators(model: nn.Module, inputs: list) -> typing.Defau... function activation_count_operators (line 103) | def activation_count_operators( function _wrapper_count_operators (line 128) | def _wrapper_count_operators( function find_unused_parameters (line 158) | def find_unused_parameters(model: nn.Module, inputs: Any) -> List[str]: FILE: annotator/oneformer/detectron2/utils/collect_env.py function collect_torch_env (line 17) | def collect_torch_env(): function get_env_module (line 29) | def get_env_module(): function detect_compute_compatibility (line 34) | def detect_compute_compatibility(CUDA_HOME, so_file): function collect_env_info (line 55) | def collect_env_info(): function test_nccl_ops (line 207) | def test_nccl_ops(): function _test_nccl_worker (line 218) | def _test_nccl_worker(rank, num_gpu, dist_url): FILE: annotator/oneformer/detectron2/utils/colormap.py function colormap (line 96) | def colormap(rgb=False, maximum=255): function random_color (line 112) | def random_color(rgb=False, maximum=255): function random_colors (line 128) | def random_colors(N, rgb=False, maximum=255): FILE: annotator/oneformer/detectron2/utils/comm.py function get_world_size (line 21) | def get_world_size() -> int: function get_rank (line 29) | def get_rank() -> int: function create_local_process_group (line 38) | def create_local_process_group(num_workers_per_machine: int) -> None: function get_local_process_group (line 64) | def get_local_process_group(): function get_local_rank (line 75) | def get_local_rank() -> int: function get_local_size (line 88) | def get_local_size() -> int: function is_main_process (line 102) | def is_main_process() -> bool: function synchronize (line 106) | def synchronize(): function _get_global_gloo_group (line 127) | def _get_global_gloo_group(): function all_gather (line 138) | def all_gather(data, group=None): function gather (line 163) | def gather(data, dst=0, group=None): function shared_random_seed (line 195) | def shared_random_seed(): function reduce_dict (line 209) | def reduce_dict(input_dict, average=True): FILE: annotator/oneformer/detectron2/utils/develop.py function create_dummy_class (line 8) | def create_dummy_class(klass, dependency, message=""): function create_dummy_func (line 37) | def create_dummy_func(func, dependency, message=""): FILE: annotator/oneformer/detectron2/utils/env.py function seed_all_rng (line 27) | def seed_all_rng(seed=None): function _import_file (line 49) | def _import_file(module_name, file_path, make_importable=False): function _configure_libraries (line 58) | def _configure_libraries(): function setup_environment (line 97) | def setup_environment(): function setup_custom_environment (line 119) | def setup_custom_environment(custom_module): function fixup_module_metadata (line 135) | def fixup_module_metadata(module_name, namespace, keys=None): FILE: annotator/oneformer/detectron2/utils/events.py function get_event_storage (line 26) | def get_event_storage(): class EventWriter (line 38) | class EventWriter: method write (line 43) | def write(self): method close (line 46) | def close(self): class JSONWriter (line 50) | class JSONWriter(EventWriter): method __init__ (line 94) | def __init__(self, json_file, window_size=20): method write (line 105) | def write(self): method close (line 127) | def close(self): class TensorboardXWriter (line 131) | class TensorboardXWriter(EventWriter): method __init__ (line 136) | def __init__(self, log_dir: str, window_size: int = 20, **kwargs): method write (line 150) | def write(self): method close (line 176) | def close(self): class CommonMetricPrinter (line 181) | class CommonMetricPrinter(EventWriter): method __init__ (line 191) | def __init__(self, max_iter: Optional[int] = None, window_size: int = ... method _get_eta (line 203) | def _get_eta(self, storage) -> Optional[str]: method write (line 223) | def write(self): class EventStorage (line 303) | class EventStorage: method __init__ (line 310) | def __init__(self, start_iter=0): method put_image (line 323) | def put_image(self, img_name, img_tensor): method put_scalar (line 338) | def put_scalar(self, name, value, smoothing_hint=True): method put_scalars (line 365) | def put_scalars(self, *, smoothing_hint=True, **kwargs): method put_histogram (line 376) | def put_histogram(self, hist_name, hist_tensor, bins=1000): method history (line 406) | def history(self, name): method histories (line 416) | def histories(self): method latest (line 423) | def latest(self): method latest_with_smoothing_hint (line 431) | def latest_with_smoothing_hint(self, window_size=20): method count_samples (line 454) | def count_samples(self, name, window_size=20): method smoothing_hints (line 467) | def smoothing_hints(self): method step (line 475) | def step(self): method iter (line 485) | def iter(self): method iter (line 494) | def iter(self, val): method iteration (line 498) | def iteration(self): method __enter__ (line 502) | def __enter__(self): method __exit__ (line 506) | def __exit__(self, exc_type, exc_val, exc_tb): method name_scope (line 511) | def name_scope(self, name): method clear_images (line 522) | def clear_images(self): method clear_histograms (line 529) | def clear_histograms(self): FILE: annotator/oneformer/detectron2/utils/file_io.py class Detectron2Handler (line 16) | class Detectron2Handler(PathHandler): method _get_supported_prefixes (line 24) | def _get_supported_prefixes(self): method _get_local_path (line 27) | def _get_local_path(self, path, **kwargs): method _open (line 31) | def _open(self, path, mode="r", **kwargs): FILE: annotator/oneformer/detectron2/utils/logger.py class _ColorfulFormatter (line 18) | class _ColorfulFormatter(logging.Formatter): method __init__ (line 19) | def __init__(self, *args, **kwargs): method formatMessage (line 26) | def formatMessage(self, record): function setup_logger (line 39) | def setup_logger( function _cached_log_stream (line 105) | def _cached_log_stream(filename): function _find_caller (line 119) | def _find_caller(): function log_first_n (line 140) | def log_first_n(lvl, msg, n=1, *, name=None, key="caller"): function log_every_n (line 175) | def log_every_n(lvl, msg, n=1, *, name=None): function log_every_n_seconds (line 191) | def log_every_n_seconds(lvl, msg, n=1, *, name=None): function create_small_table (line 209) | def create_small_table(small_dict): function _log_api_usage (line 232) | def _log_api_usage(identifier: str): FILE: annotator/oneformer/detectron2/utils/memory.py function _ignore_torch_cuda_oom (line 12) | def _ignore_torch_cuda_oom(): function retry_if_cuda_oom (line 26) | def retry_if_cuda_oom(func): FILE: annotator/oneformer/detectron2/utils/registry.py function _convert_target_to_string (line 15) | def _convert_target_to_string(t: Any) -> str: function locate (line 40) | def locate(name: str) -> Any: FILE: annotator/oneformer/detectron2/utils/serialize.py class PicklableWrapper (line 5) | class PicklableWrapper(object): method __init__ (line 15) | def __init__(self, obj): method __call__ (line 25) | def __call__(self, *args, **kwargs): method __getattr__ (line 28) | def __getattr__(self, attr): FILE: annotator/oneformer/detectron2/utils/testing.py function get_model_no_weights (line 29) | def get_model_no_weights(config_path): function random_boxes (line 42) | def random_boxes(num_boxes, max_coord=100, device="cpu"): function get_sample_coco_image (line 56) | def get_sample_coco_image(tensor=True): function convert_scripted_instances (line 80) | def convert_scripted_instances(instances): function assert_instances_allclose (line 95) | def assert_instances_allclose(input, other, *, rtol=1e-5, msg="", size_a... function reload_script_model (line 142) | def reload_script_model(module): function reload_lazy_config (line 153) | def reload_lazy_config(cfg): function min_torch_version (line 165) | def min_torch_version(min_version: str) -> bool: function has_dynamic_axes (line 179) | def has_dynamic_axes(onnx_model): function register_custom_op_onnx_export (line 194) | def register_custom_op_onnx_export( function unregister_custom_op_onnx_export (line 208) | def unregister_custom_op_onnx_export(opname: str, opset_version: int, mi... function skipIfUnsupportedMinOpsetVersion (line 278) | def skipIfUnsupportedMinOpsetVersion(min_opset_version, current_opset_ve... function skipIfUnsupportedMinTorchVersion (line 301) | def skipIfUnsupportedMinTorchVersion(min_version): function _pytorch1111_symbolic_opset9_to (line 310) | def _pytorch1111_symbolic_opset9_to(g, self, *args): function _pytorch1111_symbolic_opset9_repeat_interleave (line 384) | def _pytorch1111_symbolic_opset9_repeat_interleave(g, self, repeats, dim... FILE: annotator/oneformer/detectron2/utils/tracing.py function is_fx_tracing_legacy (line 22) | def is_fx_tracing_legacy() -> bool: function is_fx_tracing (line 31) | def is_fx_tracing() -> bool: function assert_fx_safe (line 45) | def assert_fx_safe(condition: bool, message: str) -> torch.Tensor: FILE: annotator/oneformer/detectron2/utils/video_visualizer.py class _DetectedInstance (line 17) | class _DetectedInstance: method __init__ (line 33) | def __init__(self, label, bbox, mask_rle, color, ttl): class VideoVisualizer (line 41) | class VideoVisualizer: method __init__ (line 42) | def __init__(self, metadata, instance_mode=ColorMode.IMAGE): method draw_instance_predictions (line 59) | def draw_instance_predictions(self, frame, predictions): method draw_sem_seg (line 143) | def draw_sem_seg(self, frame, sem_seg, area_threshold=None): method draw_panoptic_seg_predictions (line 155) | def draw_panoptic_seg_predictions( method _assign_colors (line 211) | def _assign_colors(self, instances): method _assign_colors_by_id (line 268) | def _assign_colors_by_id(self, instances: Instances) -> List: FILE: annotator/oneformer/detectron2/utils/visualizer.py class ColorMode (line 37) | class ColorMode(Enum): class GenericMask (line 59) | class GenericMask: method __init__ (line 67) | def __init__(self, mask_or_polygons, height, width): method mask (line 99) | def mask(self): method polygons (line 105) | def polygons(self): method has_holes (line 111) | def has_holes(self): method mask_to_polygons (line 119) | def mask_to_polygons(self, mask): method polygons_to_mask (line 138) | def polygons_to_mask(self, polygons): method area (line 143) | def area(self): method bbox (line 146) | def bbox(self): class _PanopticPrediction (line 155) | class _PanopticPrediction: method __init__ (line 160) | def __init__(self, panoptic_seg, segments_info, metadata=None): method non_empty_mask (line 196) | def non_empty_mask(self): method semantic_masks (line 212) | def semantic_masks(self): method instance_masks (line 220) | def instance_masks(self): function _create_text_labels (line 230) | def _create_text_labels(classes, scores, class_names, is_crowd=None): class VisImage (line 257) | class VisImage: method __init__ (line 258) | def __init__(self, img, scale=1.0): method _setup_figure (line 269) | def _setup_figure(self, img): method reset_image (line 294) | def reset_image(self, img): method save (line 302) | def save(self, filepath): method get_image (line 310) | def get_image(self): class Visualizer (line 331) | class Visualizer: method __init__ (line 357) | def __init__(self, img_rgb, metadata=None, scale=1.0, instance_mode=Co... method draw_instance_predictions (line 383) | def draw_instance_predictions(self, predictions): method draw_sem_seg (line 436) | def draw_sem_seg(self, sem_seg, area_threshold=None, alpha=0.8): method draw_panoptic_seg (line 472) | def draw_panoptic_seg(self, panoptic_seg, segments_info, area_threshol... method draw_dataset_dict (line 538) | def draw_dataset_dict(self, dic): method overlay_instances (line 607) | def overlay_instances( method overlay_rotated_instances (line 749) | def overlay_rotated_instances(self, boxes=None, labels=None, assigned_... method draw_and_connect_keypoints (line 787) | def draw_and_connect_keypoints(self, keypoints): method draw_text (line 850) | def draw_text( method draw_box (line 897) | def draw_box(self, box_coord, alpha=0.5, edge_color="g", line_style="-"): method draw_rotated_box_with_label (line 931) | def draw_rotated_box_with_label( method draw_circle (line 986) | def draw_circle(self, circle_coord, color, radius=3): method draw_line (line 1004) | def draw_line(self, x_data, y_data, color, linestyle="-", linewidth=No... method draw_binary_mask (line 1035) | def draw_binary_mask( method draw_soft_mask (line 1086) | def draw_soft_mask(self, soft_mask, color=None, *, text=None, alpha=0.5): method draw_polygon (line 1114) | def draw_polygon(self, segment, color, edge_color=None, alpha=0.5): method _jitter (line 1150) | def _jitter(self, color): method _create_grayscale_image (line 1169) | def _create_grayscale_image(self, mask=None): method _change_color_brightness (line 1180) | def _change_color_brightness(self, color, brightness_factor): method _convert_boxes (line 1205) | def _convert_boxes(self, boxes): method _convert_masks (line 1214) | def _convert_masks(self, masks_or_polygons): method _draw_text_in_mask (line 1237) | def _draw_text_in_mask(self, binary_mask, text, color): method _convert_keypoints (line 1255) | def _convert_keypoints(self, keypoints): method get_output (line 1261) | def get_output(self): FILE: annotator/oneformer/oneformer/config.py function add_common_config (line 8) | def add_common_config(cfg): function add_oneformer_config (line 99) | def add_oneformer_config(cfg): function add_swin_config (line 150) | def add_swin_config(cfg): function add_dinat_config (line 177) | def add_dinat_config(cfg): function add_convnext_config (line 199) | def add_convnext_config(cfg): function add_beit_adapter_config (line 214) | def add_beit_adapter_config(cfg): FILE: annotator/oneformer/oneformer/data/build.py function _test_loader_from_config (line 26) | def _test_loader_from_config(cfg, dataset_name, mapper=None): function build_detection_test_loader (line 56) | def build_detection_test_loader( FILE: annotator/oneformer/oneformer/data/dataset_mappers/coco_unified_new_baseline_dataset_mapper.py function build_transform_gen (line 23) | def build_transform_gen(cfg, is_train): class COCOUnifiedNewBaselineDatasetMapper (line 56) | class COCOUnifiedNewBaselineDatasetMapper: method __init__ (line 72) | def __init__( method from_config (line 117) | def from_config(cls, cfg, is_train=True): method _get_semantic_dict (line 136) | def _get_semantic_dict(self, pan_seg_gt, image_shape, segments_info, n... method _get_instance_dict (line 184) | def _get_instance_dict(self, pan_seg_gt, image_shape, segments_info, n... method _get_panoptic_dict (line 227) | def _get_panoptic_dict(self, pan_seg_gt, image_shape, segments_info, n... method __call__ (line 273) | def __call__(self, dataset_dict): FILE: annotator/oneformer/oneformer/data/dataset_mappers/dataset_mapper.py class DatasetMapper (line 21) | class DatasetMapper: method __init__ (line 39) | def __init__( method from_config (line 93) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 124) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 153) | def __call__(self, dataset_dict): FILE: annotator/oneformer/oneformer/data/dataset_mappers/oneformer_unified_dataset_mapper.py class OneFormerUnifiedDatasetMapper (line 26) | class OneFormerUnifiedDatasetMapper: method __init__ (line 40) | def __init__( method from_config (line 88) | def from_config(cls, cfg, is_train=True): method _get_semantic_dict (line 131) | def _get_semantic_dict(self, pan_seg_gt, image_shape, segments_info, n... method _get_instance_dict (line 180) | def _get_instance_dict(self, pan_seg_gt, image_shape, segments_info, n... method _get_panoptic_dict (line 224) | def _get_panoptic_dict(self, pan_seg_gt, image_shape, segments_info, n... method __call__ (line 271) | def __call__(self, dataset_dict): FILE: annotator/oneformer/oneformer/data/datasets/register_ade20k_instance.py function _get_ade_instances_meta (line 31) | def _get_ade_instances_meta(): function register_all_ade20k_instance (line 44) | def register_all_ade20k_instance(root): FILE: annotator/oneformer/oneformer/data/datasets/register_ade20k_panoptic.py function load_ade20k_panoptic_json (line 221) | def load_ade20k_panoptic_json(json_file, image_dir, gt_dir, semseg_dir, ... function register_ade20k_panoptic (line 275) | def register_ade20k_panoptic( function get_metadata (line 330) | def get_metadata(): function register_all_ade20k_panoptic (line 374) | def register_all_ade20k_panoptic(root): FILE: annotator/oneformer/oneformer/data/datasets/register_cityscapes_panoptic.py function get_cityscapes_panoptic_files (line 22) | def get_cityscapes_panoptic_files(image_dir, gt_dir, json_info): function load_cityscapes_panoptic (line 54) | def load_cityscapes_panoptic(image_dir, gt_dir, gt_json, meta): function register_all_cityscapes_panoptic (line 133) | def register_all_cityscapes_panoptic(root): FILE: annotator/oneformer/oneformer/data/datasets/register_coco_panoptic2instance.py function register_panoptic2instances_coco (line 32) | def register_panoptic2instances_coco(root): FILE: annotator/oneformer/oneformer/data/datasets/register_coco_panoptic_annos_semseg.py function load_coco_instance_json (line 43) | def load_coco_instance_json(json_file, image_root, dataset_name=None): function get_metadata (line 209) | def get_metadata(): function load_coco_panoptic_json (line 253) | def load_coco_panoptic_json(json_file, instances_json, instances_name, i... function register_coco_panoptic_annos_sem_seg (line 310) | def register_coco_panoptic_annos_sem_seg( function register_all_coco_panoptic_annos_sem_seg (line 341) | def register_all_coco_panoptic_annos_sem_seg(root): FILE: annotator/oneformer/oneformer/data/tokenizer.py function default_bpe (line 38) | def default_bpe(): function bytes_to_unicode (line 42) | def bytes_to_unicode(): function get_pairs (line 62) | def get_pairs(word): function basic_clean (line 75) | def basic_clean(text): function whitespace_clean (line 81) | def whitespace_clean(text): class Tokenize (line 86) | class Tokenize: method __init__ (line 88) | def __init__(self, tokenizer, max_seq_len=77, truncate=True): method __call__ (line 93) | def __call__(self, texts): class SimpleTokenizer (line 119) | class SimpleTokenizer(object): method __init__ (line 121) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 140) | def bpe(self, token): method encode (line 181) | def encode(self, text): method decode (line 189) | def decode(self, tokens): FILE: annotator/oneformer/oneformer/demo/colormap.py function gen_color (line 99) | def gen_color(): function colormap (line 111) | def colormap(rgb=False, maximum=255): function random_color (line 126) | def random_color(rgb=False, maximum=255): function random_colors (line 141) | def random_colors(N, rgb=False, maximum=255): FILE: annotator/oneformer/oneformer/demo/defaults.py class DefaultPredictor (line 15) | class DefaultPredictor: method __init__ (line 38) | def __init__(self, cfg): method __call__ (line 55) | def __call__(self, original_image, task): FILE: annotator/oneformer/oneformer/demo/predictor.py class VisualizationDemo (line 17) | class VisualizationDemo(object): method __init__ (line 18) | def __init__(self, cfg, instance_mode=ColorMode.IMAGE, parallel=False): method run_on_image (line 43) | def run_on_image(self, image, task, sem_gt, pan_gt, ins_gt, box_gt): class AsyncPredictor (line 102) | class AsyncPredictor: class _StopToken (line 109) | class _StopToken: class _PredictWorker (line 112) | class _PredictWorker(mp.Process): method __init__ (line 113) | def __init__(self, cfg, task_queue, result_queue): method run (line 119) | def run(self): method __init__ (line 130) | def __init__(self, cfg, num_gpus: int = 1): method put (line 157) | def put(self, image): method get (line 161) | def get(self): method __len__ (line 177) | def __len__(self): method __call__ (line 180) | def __call__(self, image): method shutdown (line 184) | def shutdown(self): method default_buffer_size (line 189) | def default_buffer_size(self): FILE: annotator/oneformer/oneformer/demo/visualizer.py function instance_color (line 36) | def instance_color(rgb=False, idx=1, maximum=255): class ColorMode (line 50) | class ColorMode(Enum): class GenericMask (line 72) | class GenericMask: method __init__ (line 80) | def __init__(self, mask_or_polygons, height, width): method mask (line 112) | def mask(self): method polygons (line 118) | def polygons(self): method has_holes (line 124) | def has_holes(self): method mask_to_polygons (line 132) | def mask_to_polygons(self, mask): method polygons_to_mask (line 151) | def polygons_to_mask(self, polygons): method area (line 156) | def area(self): method bbox (line 159) | def bbox(self): class _PanopticPrediction (line 168) | class _PanopticPrediction: method __init__ (line 173) | def __init__(self, panoptic_seg, segments_info, metadata=None): method non_empty_mask (line 209) | def non_empty_mask(self): method semantic_masks (line 225) | def semantic_masks(self): method instance_masks (line 233) | def instance_masks(self): function _create_text_labels (line 243) | def _create_text_labels(classes, scores, class_names, is_crowd=None): class VisImage (line 269) | class VisImage: method __init__ (line 270) | def __init__(self, img, scale=1.0): method _setup_figure (line 281) | def _setup_figure(self, img): method reset_image (line 305) | def reset_image(self, img): method save (line 313) | def save(self, filepath): method get_image (line 321) | def get_image(self): class Visualizer (line 342) | class Visualizer: method __init__ (line 364) | def __init__(self, img_rgb, is_img=True, metadata=None, scale=1.0, ins... method get_image (line 393) | def get_image(self, img): method draw_box_predictions (line 397) | def draw_box_predictions( method draw_instance_predictions (line 484) | def draw_instance_predictions(self, predictions, alpha=0.8, is_text=Tr... method draw_sem_seg (line 536) | def draw_sem_seg(self, sem_seg, area_threshold=None, alpha=0.8, is_tex... method draw_panoptic_seg (line 571) | def draw_panoptic_seg(self, panoptic_seg, segments_info, area_threshol... method draw_dataset_dict (line 636) | def draw_dataset_dict(self, dic): method overlay_instances (line 703) | def overlay_instances( method overlay_rotated_instances (line 847) | def overlay_rotated_instances(self, boxes=None, labels=None, assigned_... method draw_and_connect_keypoints (line 885) | def draw_and_connect_keypoints(self, keypoints): method draw_text (line 946) | def draw_text( method draw_box (line 992) | def draw_box(self, box_coord, alpha=1.0, edge_color="g", line_style="-"): method draw_rotated_box_with_label (line 1025) | def draw_rotated_box_with_label( method draw_circle (line 1078) | def draw_circle(self, circle_coord, color, radius=3): method draw_line (line 1095) | def draw_line(self, x_data, y_data, color, linestyle="-", linewidth=No... method draw_binary_mask (line 1125) | def draw_binary_mask( method draw_soft_mask (line 1176) | def draw_soft_mask(self, soft_mask, color=None, *, text=None, alpha=0.5): method draw_polygon (line 1203) | def draw_polygon(self, segment, color, edge_color=None, alpha=0.5): method _jitter (line 1238) | def _jitter(self, color): method _create_grayscale_image (line 1255) | def _create_grayscale_image(self, mask=None): method _change_color_brightness (line 1266) | def _change_color_brightness(self, color, brightness_factor): method _convert_boxes (line 1289) | def _convert_boxes(self, boxes): method _convert_masks (line 1298) | def _convert_masks(self, masks_or_polygons): method _draw_text_in_mask (line 1320) | def _draw_text_in_mask(self, binary_mask, text, color): method _convert_keypoints (line 1338) | def _convert_keypoints(self, keypoints): method get_output (line 1344) | def get_output(self): FILE: annotator/oneformer/oneformer/evaluation/cityscapes_evaluation.py class CityscapesEvaluator (line 22) | class CityscapesEvaluator(DatasetEvaluator): method __init__ (line 27) | def __init__(self, dataset_name): method reset (line 38) | def reset(self): class CityscapesInstanceEvaluator (line 54) | class CityscapesInstanceEvaluator(CityscapesEvaluator): method process (line 64) | def process(self, inputs, outputs): method evaluate (line 95) | def evaluate(self): class CityscapesSemSegEvaluator (line 136) | class CityscapesSemSegEvaluator(CityscapesEvaluator): method process (line 146) | def process(self, inputs, outputs): method evaluate (line 162) | def evaluate(self): FILE: annotator/oneformer/oneformer/evaluation/coco_evaluator.py class COCOEvaluator (line 38) | class COCOEvaluator(DatasetEvaluator): method __init__ (line 51) | def __init__( method reset (line 158) | def reset(self): method process (line 161) | def process(self, inputs, outputs): method evaluate (line 179) | def evaluate(self, img_ids=None): method _tasks_from_predictions (line 210) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 221) | def _eval_predictions(self, predictions, img_ids=None): method _derive_coco_results (line 283) | def _derive_coco_results(self, coco_eval, iou_type, class_names=None): function instances_to_coco_json (line 351) | def instances_to_coco_json(instances, img_id): function _evaluate_predictions_on_coco (line 408) | def _evaluate_predictions_on_coco( class COCOevalMaxDets (line 475) | class COCOevalMaxDets(COCOeval): method summarize (line 481) | def summarize(self): method __str__ (line 562) | def __str__(self): FILE: annotator/oneformer/oneformer/evaluation/detection_coco_evaluator.py class DetectionCOCOEvaluator (line 38) | class DetectionCOCOEvaluator(DatasetEvaluator): method __init__ (line 51) | def __init__( method reset (line 158) | def reset(self): method process (line 161) | def process(self, inputs, outputs): method evaluate (line 181) | def evaluate(self, img_ids=None): method _tasks_from_predictions (line 214) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 224) | def _eval_predictions(self, predictions, img_ids=None): method _eval_box_proposals (line 286) | def _eval_box_proposals(self, predictions): method _derive_coco_results (line 325) | def _derive_coco_results(self, coco_eval, iou_type, class_names=None): function instances_to_coco_json (line 393) | def instances_to_coco_json(instances, img_id): function _evaluate_box_proposals (line 457) | def _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=No... function _evaluate_predictions_on_coco (line 568) | def _evaluate_predictions_on_coco( class COCOevalMaxDets (line 635) | class COCOevalMaxDets(COCOeval): method summarize (line 641) | def summarize(self): method __str__ (line 722) | def __str__(self): FILE: annotator/oneformer/oneformer/evaluation/evaluator.py class DatasetEvaluator (line 19) | class DatasetEvaluator: method reset (line 30) | def reset(self): method process (line 37) | def process(self, inputs, outputs): method evaluate (line 54) | def evaluate(self): class DatasetEvaluators (line 70) | class DatasetEvaluators(DatasetEvaluator): method __init__ (line 78) | def __init__(self, evaluators): method reset (line 86) | def reset(self): method process (line 90) | def process(self, inputs, outputs): method evaluate (line 94) | def evaluate(self): function inference_on_dataset (line 107) | def inference_on_dataset( function inference_context (line 217) | def inference_context(model): FILE: annotator/oneformer/oneformer/evaluation/instance_evaluation.py class InstanceSegEvaluator (line 33) | class InstanceSegEvaluator(COCOEvaluator): method _eval_predictions (line 46) | def _eval_predictions(self, predictions, img_ids=None): FILE: annotator/oneformer/oneformer/modeling/backbone/dinat.py class NeighborhoodAttention (line 14) | class NeighborhoodAttention(nn.Module): method __init__ (line 19) | def __init__( method forward (line 34) | def forward(self, x): method extra_repr (line 38) | def extra_repr(self) -> str: class ConvTokenizer (line 45) | class ConvTokenizer(nn.Module): method __init__ (line 46) | def __init__(self, in_chans=3, embed_dim=96, norm_layer=None): method forward (line 57) | def forward(self, x): class ConvDownsampler (line 64) | class ConvDownsampler(nn.Module): method __init__ (line 65) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 70) | def forward(self, x): class Mlp (line 76) | class Mlp(nn.Module): method __init__ (line 77) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 86) | def forward(self, x): class NATLayer (line 95) | class NATLayer(nn.Module): method __init__ (line 96) | def __init__(self, dim, num_heads, kernel_size=7, dilation=None, method forward (line 118) | def forward(self, x): class NATBlock (line 135) | class NATBlock(nn.Module): method __init__ (line 136) | def __init__(self, dim, depth, num_heads, kernel_size, dilations=None, method forward (line 159) | def forward(self, x): class DiNAT (line 167) | class DiNAT(nn.Module): method __init__ (line 168) | def __init__(self, method _freeze_stages (line 222) | def _freeze_stages(self): method train (line 235) | def train(self, mode=True): method forward_embeddings (line 239) | def forward_embeddings(self, x): method forward_tokens (line 243) | def forward_tokens(self, x): method forward (line 253) | def forward(self, x): class D2DiNAT (line 259) | class D2DiNAT(DiNAT, Backbone): method __init__ (line 260) | def __init__(self, cfg, input_shape): method forward (line 297) | def forward(self, x): method output_shape (line 314) | def output_shape(self): method size_divisibility (line 323) | def size_divisibility(self): FILE: annotator/oneformer/oneformer/modeling/backbone/swin.py class Mlp (line 22) | class Mlp(nn.Module): method __init__ (line 25) | def __init__( method forward (line 36) | def forward(self, x): function window_partition (line 45) | def window_partition(x, window_size): function window_reverse (line 59) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 75) | class WindowAttention(nn.Module): method __init__ (line 88) | def __init__( method forward (line 132) | def forward(self, x, mask=None): class SwinTransformerBlock (line 175) | class SwinTransformerBlock(nn.Module): method __init__ (line 192) | def __init__( method forward (line 236) | def forward(self, x, mask_matrix): class PatchMerging (line 299) | class PatchMerging(nn.Module): method __init__ (line 306) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 312) | def forward(self, x, H, W): class BasicLayer (line 341) | class BasicLayer(nn.Module): method __init__ (line 359) | def __init__( method forward (line 407) | def forward(self, x, H, W): class PatchEmbed (line 457) | class PatchEmbed(nn.Module): method __init__ (line 466) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 480) | def forward(self, x): class SwinTransformer (line 499) | class SwinTransformer(nn.Module): method __init__ (line 527) | def __init__( method _freeze_stages (line 619) | def _freeze_stages(self): method init_weights (line 636) | def init_weights(self, pretrained=None): method forward (line 652) | def forward(self, x): method train (line 681) | def train(self, mode=True): class D2SwinTransformer (line 688) | class D2SwinTransformer(SwinTransformer, Backbone): method __init__ (line 689) | def __init__(self, cfg, input_shape): method forward (line 744) | def forward(self, x): method output_shape (line 761) | def output_shape(self): method size_divisibility (line 770) | def size_divisibility(self): FILE: annotator/oneformer/oneformer/modeling/matcher.py function linear_sum_assignment_with_nan (line 19) | def linear_sum_assignment_with_nan(cost_matrix): function batch_dice_loss (line 38) | def batch_dice_loss(inputs: torch.Tensor, targets: torch.Tensor): function batch_sigmoid_ce_loss (line 61) | def batch_sigmoid_ce_loss(inputs: torch.Tensor, targets: torch.Tensor): class HungarianMatcher (line 93) | class HungarianMatcher(nn.Module): method __init__ (line 101) | def __init__(self, cost_class: float = 1, cost_mask: float = 1, method memory_efficient_forward (line 120) | def memory_efficient_forward(self, outputs, targets): method forward (line 181) | def forward(self, outputs, targets): method __repr__ (line 204) | def __repr__(self, _repr_indent=4): FILE: annotator/oneformer/oneformer/modeling/meta_arch/oneformer_head.py class OneFormerHead (line 21) | class OneFormerHead(nn.Module): method _load_from_state_dict (line 25) | def _load_from_state_dict( method __init__ (line 50) | def __init__( method from_config (line 90) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method forward (line 117) | def forward(self, features, tasks, mask=None): method layers (line 120) | def layers(self, features, tasks, mask=None): FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/fpn.py function build_pixel_decoder (line 21) | def build_pixel_decoder(cfg, input_shape): class BasePixelDecoder (line 38) | class BasePixelDecoder(nn.Module): method __init__ (line 40) | def __init__( method from_config (line 126) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method forward_features (line 136) | def forward_features(self, features): method forward (line 156) | def forward(self, features, targets=None): class TransformerEncoderOnly (line 162) | class TransformerEncoderOnly(nn.Module): method __init__ (line 163) | def __init__( method _reset_parameters (line 186) | def _reset_parameters(self): method forward (line 191) | def forward(self, src, mask, pos_embed): class TransformerEncoderPixelDecoder (line 205) | class TransformerEncoderPixelDecoder(BasePixelDecoder): method __init__ (line 207) | def __init__( method from_config (line 273) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method forward_features (line 284) | def forward_features(self, features): method forward (line 309) | def forward(self, features, targets=None): FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/msdeformattn.py class MSDeformAttnTransformerEncoderOnly (line 23) | class MSDeformAttnTransformerEncoderOnly(nn.Module): method __init__ (line 24) | def __init__(self, d_model=256, nhead=8, method _reset_parameters (line 43) | def _reset_parameters(self): method get_valid_ratio (line 52) | def get_valid_ratio(self, mask): method forward (line 61) | def forward(self, srcs, pos_embeds): class MSDeformAttnTransformerEncoderLayer (line 92) | class MSDeformAttnTransformerEncoderLayer(nn.Module): method __init__ (line 93) | def __init__(self, method with_pos_embed (line 113) | def with_pos_embed(tensor, pos): method forward_ffn (line 116) | def forward_ffn(self, src): method forward (line 122) | def forward(self, src, pos, reference_points, spatial_shapes, level_st... class MSDeformAttnTransformerEncoder (line 134) | class MSDeformAttnTransformerEncoder(nn.Module): method __init__ (line 135) | def __init__(self, encoder_layer, num_layers): method get_reference_points (line 141) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 155) | def forward(self, src, spatial_shapes, level_start_index, valid_ratios... class MSDeformAttnPixelDecoder (line 165) | class MSDeformAttnPixelDecoder(nn.Module): method __init__ (line 167) | def __init__( method from_config (line 295) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method forward_features (line 315) | def forward_features(self, features): FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/ops/functions/ms_deform_attn_func.py class MSDeformAttnFunction (line 37) | class MSDeformAttnFunction(Function): method forward (line 39) | def forward(ctx, value, value_spatial_shapes, value_level_start_index,... function ms_deform_attn_core_pytorch (line 57) | def ms_deform_attn_core_pytorch(value, value_spatial_shapes, sampling_lo... FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/ops/modules/ms_deform_attn.py function _is_power_of_2 (line 28) | def _is_power_of_2(n): class MSDeformAttn (line 34) | class MSDeformAttn(nn.Module): method __init__ (line 35) | def __init__(self, d_model=256, n_levels=4, n_heads=8, n_points=4): method _reset_parameters (line 66) | def _reset_parameters(self): method forward (line 82) | def forward(self, query, reference_points, input_flatten, input_spatia... FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/ops/setup.py function get_extensions (line 26) | def get_extensions(): FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/ops/src/cpu/ms_deform_attn_cpu.cpp function ms_deform_attn_cpu_forward (line 22) | at::Tensor function ms_deform_attn_cpu_backward (line 34) | std::vector FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/ops/src/ms_deform_attn.h function im2col_step (line 32) | int im2col_step) FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/ops/src/vision.cpp function PYBIND11_MODULE (line 18) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: annotator/oneformer/oneformer/modeling/pixel_decoder/ops/test.py function check_forward_equal_with_pytorch_double (line 35) | def check_forward_equal_with_pytorch_double(): function check_forward_equal_with_pytorch_float (line 51) | def check_forward_equal_with_pytorch_float(): function check_gradient_numerical (line 66) | def check_gradient_numerical(channels=4, grad_value=True, grad_sampling_... FILE: annotator/oneformer/oneformer/modeling/transformer_decoder/oneformer_transformer_decoder.py function build_transformer_decoder (line 28) | def build_transformer_decoder(cfg, in_channels, mask_classification=True): class SelfAttentionLayer (line 36) | class SelfAttentionLayer(nn.Module): method __init__ (line 38) | def __init__(self, d_model, nhead, dropout=0.0, method _reset_parameters (line 51) | def _reset_parameters(self): method with_pos_embed (line 56) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 59) | def forward_post(self, tgt, method forward_pre (line 71) | def forward_pre(self, tgt, method forward (line 83) | def forward(self, tgt, class CrossAttentionLayer (line 94) | class CrossAttentionLayer(nn.Module): method __init__ (line 96) | def __init__(self, d_model, nhead, dropout=0.0, method _reset_parameters (line 109) | def _reset_parameters(self): method with_pos_embed (line 114) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 117) | def forward_post(self, tgt, memory, method forward_pre (line 131) | def forward_pre(self, tgt, memory, method forward (line 145) | def forward(self, tgt, memory, class FFNLayer (line 157) | class FFNLayer(nn.Module): method __init__ (line 159) | def __init__(self, d_model, dim_feedforward=2048, dropout=0.0, method _reset_parameters (line 174) | def _reset_parameters(self): method with_pos_embed (line 179) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 182) | def forward_post(self, tgt): method forward_pre (line 188) | def forward_pre(self, tgt): method forward (line 194) | def forward(self, tgt): function _get_activation_fn (line 200) | def _get_activation_fn(activation): class MLP (line 211) | class MLP(nn.Module): method __init__ (line 214) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 220) | def forward(self, x): class ContrastiveMultiScaleMaskedTransformerDecoder (line 227) | class ContrastiveMultiScaleMaskedTransformerDecoder(nn.Module): method _load_from_state_dict (line 231) | def _load_from_state_dict( method __init__ (line 255) | def __init__( method from_config (line 375) | def from_config(cls, cfg, in_channels, mask_classification): method forward (line 405) | def forward(self, x, mask_features, tasks, mask = None): method forward_prediction_heads (line 495) | def forward_prediction_heads(self, output, mask_features, attn_mask_ta... method _set_aux_loss (line 516) | def _set_aux_loss(self, outputs_class, outputs_seg_masks): FILE: annotator/oneformer/oneformer/modeling/transformer_decoder/position_encoding.py class PositionEmbeddingSine (line 15) | class PositionEmbeddingSine(nn.Module): method __init__ (line 21) | def __init__(self, num_pos_feats=64, temperature=10000, normalize=Fals... method forward (line 32) | def forward(self, x, mask=None): method __repr__ (line 57) | def __repr__(self, _repr_indent=4): FILE: annotator/oneformer/oneformer/modeling/transformer_decoder/text_transformer.py class Attention (line 32) | class Attention(nn.Module): method __init__ (line 33) | def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, at... method forward (line 49) | def forward(self, q, k, v): class TransformerDecoderLayer (line 67) | class TransformerDecoderLayer(nn.Module): method __init__ (line 68) | def __init__( method forward (line 90) | def forward(self, x, mem): class ContextDecoder (line 99) | class ContextDecoder(nn.Module): method __init__ (line 100) | def __init__(self, method _init_weights (line 131) | def _init_weights(self, m): method forward (line 141) | def forward(self, text, visual): class QuickGELU (line 152) | class QuickGELU(nn.Module): method forward (line 154) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 158) | class ResidualAttentionBlock(nn.Module): method __init__ (line 160) | def __init__(self, d_model: int, n_head: int, attn_mask: torch.Tensor ... method attention (line 171) | def attention(self, x: torch.Tensor, key_padding_mask: torch.Tensor): method forward (line 175) | def forward(self, x: torch.Tensor, key_padding_mask=None): class Transformer (line 180) | class Transformer(nn.Module): method __init__ (line 182) | def __init__(self, width: int, layers: int, heads: int, attn_mask: tor... method forward (line 198) | def forward(self, x: torch.Tensor): class TextTransformer (line 207) | class TextTransformer(nn.Module): method __init__ (line 209) | def __init__( method build_attention_mask (line 237) | def build_attention_mask(self): method forward (line 245) | def forward(self, text): FILE: annotator/oneformer/oneformer/modeling/transformer_decoder/transformer.py class Transformer (line 22) | class Transformer(nn.Module): method __init__ (line 23) | def __init__( method _reset_parameters (line 59) | def _reset_parameters(self): method forward (line 64) | def forward(self, src, mask, query_embed, pos_embed, task_token=None): class TransformerEncoder (line 85) | class TransformerEncoder(nn.Module): method __init__ (line 86) | def __init__(self, encoder_layer, num_layers, norm=None): method forward (line 92) | def forward( class TransformerDecoder (line 112) | class TransformerDecoder(nn.Module): method __init__ (line 113) | def __init__(self, decoder_layer, num_layers, norm=None, return_interm... method forward (line 120) | def forward( class TransformerEncoderLayer (line 161) | class TransformerEncoderLayer(nn.Module): method __init__ (line 162) | def __init__( method with_pos_embed (line 186) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 189) | def forward_post( method forward_pre (line 207) | def forward_pre( method forward (line 225) | def forward( class TransformerDecoderLayer (line 237) | class TransformerDecoderLayer(nn.Module): method __init__ (line 238) | def __init__( method with_pos_embed (line 265) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 268) | def forward_post( method forward_pre (line 299) | def forward_pre( method forward (line 330) | def forward( function _get_clones (line 364) | def _get_clones(module, N): function _get_activation_fn (line 368) | def _get_activation_fn(activation): FILE: annotator/oneformer/oneformer/oneformer_model.py class OneFormer (line 27) | class OneFormer(nn.Module): method __init__ (line 33) | def __init__( method from_config (line 120) | def from_config(cls, cfg): method device (line 205) | def device(self): method encode_text (line 208) | def encode_text(self, text): method forward (line 231) | def forward(self, batched_inputs): method prepare_targets (line 340) | def prepare_targets(self, targets, images): method semantic_inference (line 356) | def semantic_inference(self, mask_cls, mask_pred): method panoptic_inference (line 362) | def panoptic_inference(self, mask_cls, mask_pred): method instance_inference (line 420) | def instance_inference(self, mask_cls, mask_pred): FILE: annotator/oneformer/oneformer/utils/box_ops.py function box_cxcywh_to_xyxy (line 9) | def box_cxcywh_to_xyxy(x): function box_xyxy_to_cxcywh (line 16) | def box_xyxy_to_cxcywh(x): function box_iou (line 24) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 41) | def generalized_box_iou(boxes1, boxes2): function box_iou_pairwise (line 67) | def box_iou_pairwise(boxes1, boxes2): function generalized_box_iou_pairwise (line 83) | def generalized_box_iou_pairwise(boxes1, boxes2): function masks_to_boxes (line 106) | def masks_to_boxes(masks): FILE: annotator/oneformer/oneformer/utils/events.py function setup_wandb (line 7) | def setup_wandb(cfg, args): class BaseRule (line 32) | class BaseRule(object): method __call__ (line 33) | def __call__(self, target): class IsIn (line 37) | class IsIn(BaseRule): method __init__ (line 38) | def __init__(self, keyword: str): method __call__ (line 41) | def __call__(self, target): class Prefix (line 45) | class Prefix(BaseRule): method __init__ (line 46) | def __init__(self, keyword: str): method __call__ (line 49) | def __call__(self, target): class WandbWriter (line 53) | class WandbWriter(EventWriter): method __init__ (line 58) | def __init__(self): method write (line 70) | def write(self): method close (line 119) | def close(self): FILE: annotator/oneformer/oneformer/utils/misc.py function inverse_sigmoid (line 18) | def inverse_sigmoid(x, eps=1e-3): function _no_grad_trunc_normal_ (line 24) | def _no_grad_trunc_normal_(tensor, mean, std, a, b): function trunc_normal_ (line 59) | def trunc_normal_(tensor, mean=0., std=1., a=-2., b=2.): function resize (line 79) | def resize(input, function _max_by_axis (line 102) | def _max_by_axis(the_list): class NestedTensor (line 111) | class NestedTensor(object): method __init__ (line 112) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 116) | def to(self, device): method decompose (line 127) | def decompose(self): method __repr__ (line 130) | def __repr__(self): function nested_tensor_from_tensor_list (line 134) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): function _onnx_nested_tensor_from_tensor_list (line 162) | def _onnx_nested_tensor_from_tensor_list(tensor_list: List[Tensor]) -> N... function is_dist_avail_and_initialized (line 192) | def is_dist_avail_and_initialized(): FILE: annotator/oneformer/oneformer/utils/pos_embed.py function get_2d_sincos_pos_embed (line 17) | def get_2d_sincos_pos_embed(embed_dim, grid_size, cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 35) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 46) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): function interpolate_pos_embed (line 72) | def interpolate_pos_embed(model, checkpoint_model, pos_embed_key): function interpolate_pos_embed_online (line 108) | def interpolate_pos_embed_online( FILE: annotator/oneformer/pycocotools/coco.py function _isArrayLike (line 63) | def _isArrayLike(obj): class COCO (line 67) | class COCO: method __init__ (line 68) | def __init__(self, annotation_file=None): method createIndex (line 88) | def createIndex(self): method info (line 119) | def info(self): method getAnnIds (line 127) | def getAnnIds(self, imgIds=[], catIds=[], areaRng=[], iscrowd=None): method getCatIds (line 155) | def getCatIds(self, catNms=[], supNms=[], catIds=[]): method getImgIds (line 177) | def getImgIds(self, imgIds=[], catIds=[]): method loadAnns (line 198) | def loadAnns(self, ids=[]): method loadCats (line 209) | def loadCats(self, ids=[]): method loadImgs (line 220) | def loadImgs(self, ids=[]): method showAnns (line 231) | def showAnns(self, anns, draw_bbox=False): method loadRes (line 307) | def loadRes(self, resFile): method download (line 369) | def download(self, tarDir = None, imgIds = [] ): method loadNumpyAnnotations (line 393) | def loadNumpyAnnotations(self, data): method annToRLE (line 416) | def annToRLE(self, ann): method annToMask (line 437) | def annToMask(self, ann): FILE: annotator/oneformer/pycocotools/cocoeval.py class COCOeval (line 10) | class COCOeval: method __init__ (line 60) | def __init__(self, cocoGt=None, cocoDt=None, iouType='segm'): method _prepare (line 84) | def _prepare(self): method evaluate (line 121) | def evaluate(self): method computeIoU (line 163) | def computeIoU(self, imgId, catId): method computeOks (line 192) | def computeOks(self, imgId, catId): method evaluateImg (line 235) | def evaluateImg(self, imgId, catId, aRng, maxDet): method accumulate (line 315) | def accumulate(self, p = None): method summarize (line 422) | def summarize(self): method __str__ (line 495) | def __str__(self): class Params (line 498) | class Params: method setDetParams (line 502) | def setDetParams(self): method setKpParams (line 513) | def setKpParams(self): method __init__ (line 525) | def __init__(self, iouType='segm'): FILE: annotator/oneformer/pycocotools/mask.py function encode (line 80) | def encode(bimask): function decode (line 88) | def decode(rleObjs): function area (line 95) | def area(rleObjs): function toBbox (line 102) | def toBbox(rleObjs): FILE: annotator/openpose/__init__.py function draw_poses (line 45) | def draw_poses( function decode_json_as_poses (line 78) | def decode_json_as_poses( function encode_poses_as_json (line 136) | def encode_poses_as_json( class OpenposeDetector (line 178) | class OpenposeDetector: method __init__ (line 188) | def __init__(self): method load_model (line 197) | def load_model(self): method load_dw_model (line 224) | def load_dw_model(self): method load_animalpose_model (line 239) | def load_animalpose_model(self): method unload_model (line 264) | def unload_model(self): method detect_hands (line 274) | def detect_hands( method detect_face (line 301) | def detect_face(self, body: BodyResult, oriImg) -> Union[FaceResult, N... method detect_poses (line 319) | def detect_poses( method detect_poses_dw (line 379) | def detect_poses_dw(self, oriImg) -> List[HumanPoseResult]: method detect_poses_animal (line 398) | def detect_poses_animal(self, oriImg) -> List[AnimalPoseResult]: method __call__ (line 415) | def __call__( FILE: annotator/openpose/animalpose.py function draw_animalposes (line 11) | def draw_animalposes(animals: List[List[Keypoint]], H: int, W: int) -> n... function draw_animalpose (line 18) | def draw_animalpose(canvas: np.ndarray, keypoints: List[Keypoint]) -> np... class AnimalPose (line 74) | class AnimalPose: method __init__ (line 75) | def __init__( method __call__ (line 98) | def __call__(self, oriImg) -> List[AnimalPoseResult]: FILE: annotator/openpose/body.py class Body (line 16) | class Body(object): method __init__ (line 17) | def __init__(self, model_path): method __call__ (line 23) | def __call__(self, oriImg): method format_body_result (line 212) | def format_body_result(candidate: np.ndarray, subset: np.ndarray) -> L... FILE: annotator/openpose/cv_ox_det.py function nms (line 4) | def nms(boxes, scores, nms_thr): function multiclass_nms (line 33) | def multiclass_nms(boxes, scores, nms_thr, score_thr): function demo_postprocess (line 56) | def demo_postprocess(outputs, img_size, p6=False): function preprocess (line 78) | def preprocess(img, input_size, swap=(2, 0, 1)): function inference_detector (line 96) | def inference_detector(session, oriImg, detect_classes=[0]): FILE: annotator/openpose/cv_ox_pose.py function preprocess (line 6) | def preprocess( function inference (line 51) | def inference(sess, img): function postprocess (line 86) | def postprocess(outputs: List[np.ndarray], function bbox_xyxy2cs (line 121) | def bbox_xyxy2cs(bbox: np.ndarray, function _fix_aspect_ratio (line 155) | def _fix_aspect_ratio(bbox_scale: np.ndarray, function _rotate_point (line 173) | def _rotate_point(pt: np.ndarray, angle_rad: float) -> np.ndarray: function _get_3rd_point (line 188) | def _get_3rd_point(a: np.ndarray, b: np.ndarray) -> np.ndarray: function get_warp_matrix (line 207) | def get_warp_matrix(center: np.ndarray, function top_down_affine (line 261) | def top_down_affine(input_size: dict, bbox_scale: dict, bbox_center: dict, function get_simcc_maximum (line 294) | def get_simcc_maximum(simcc_x: np.ndarray, function decode (line 339) | def decode(simcc_x: np.ndarray, simcc_y: np.ndarray, function inference_pose (line 359) | def inference_pose(session, out_bbox, oriImg, model_input_size: Tuple[in... FILE: annotator/openpose/face.py class FaceNet (line 12) | class FaceNet(Module): method __init__ (line 14) | def __init__(self): method forward (line 191) | def forward(self, x): class Face (line 306) | class Face(object): method __init__ (line 317) | def __init__(self, face_model_path, method __call__ (line 331) | def __call__(self, face_img): method compute_peaks_from_heatmaps (line 347) | def compute_peaks_from_heatmaps(self, heatmaps): FILE: annotator/openpose/hand.py class Hand (line 15) | class Hand(object): method __init__ (line 16) | def __init__(self, model_path): method __call__ (line 25) | def __call__(self, oriImgRaw): FILE: annotator/openpose/model.py function make_layers (line 7) | def make_layers(block, no_relu_layers): class bodypose_model (line 24) | class bodypose_model(nn.Module): method __init__ (line 25) | def __init__(self): method forward (line 114) | def forward(self, x): class handpose_model (line 143) | class handpose_model(nn.Module): method __init__ (line 144) | def __init__(self): method forward (line 204) | def forward(self, x): FILE: annotator/openpose/types.py class Keypoint (line 4) | class Keypoint(NamedTuple): class BodyResult (line 11) | class BodyResult(NamedTuple): class HumanPoseResult (line 27) | class HumanPoseResult(NamedTuple): FILE: annotator/openpose/util.py function smart_resize (line 12) | def smart_resize(x, s): function smart_resize_k (line 26) | def smart_resize_k(x, fx, fy): function padRightDownCorner (line 40) | def padRightDownCorner(img, stride, padValue): function transfer (line 63) | def transfer(model, model_weights): function is_normalized (line 70) | def is_normalized(keypoints: List[Optional[Keypoint]]) -> bool: function draw_bodypose (line 81) | def draw_bodypose(canvas: np.ndarray, keypoints: List[Keypoint]) -> np.n... function draw_handpose (line 142) | def draw_handpose(canvas: np.ndarray, keypoints: Union[List[Keypoint], N... function draw_facepose (line 193) | def draw_facepose(canvas: np.ndarray, keypoints: Union[List[Keypoint], N... function handDetect (line 230) | def handDetect(body: BodyResult, oriImg) -> List[Tuple[int, int, int, bo... function faceDetect (line 324) | def faceDetect(body: BodyResult, oriImg) -> Union[Tuple[int, int, int], ... function npmax (line 406) | def npmax(array): FILE: annotator/openpose/wholebody.py class Wholebody (line 12) | class Wholebody: method __init__ (line 13) | def __init__(self, onnx_det: str, onnx_pose: str): method __call__ (line 28) | def __call__(self, oriImg) -> Optional[np.ndarray]: method format_result (line 58) | def format_result(keypoints_info: Optional[np.ndarray]) -> List[HumanP... FILE: annotator/pidinet/__init__.py function apply_pidinet (line 16) | def apply_pidinet(input_image, is_safe=False, apply_fliter=False): function unload_pid_model (line 48) | def unload_pid_model(): FILE: annotator/pidinet/model.py function createConvFunc (line 268) | def createConvFunc(op_type): class Conv2d (line 319) | class Conv2d(nn.Module): method __init__ (line 320) | def __init__(self, pdc, in_channels, out_channels, kernel_size, stride... method reset_parameters (line 341) | def reset_parameters(self): method forward (line 348) | def forward(self, input): class CSAM (line 352) | class CSAM(nn.Module): method __init__ (line 356) | def __init__(self, channels): method forward (line 366) | def forward(self, x): class CDCM (line 374) | class CDCM(nn.Module): method __init__ (line 378) | def __init__(self, in_channels, out_channels): method forward (line 389) | def forward(self, x): class MapReduce (line 399) | class MapReduce(nn.Module): method __init__ (line 403) | def __init__(self, channels): method forward (line 408) | def forward(self, x): class PDCBlock (line 412) | class PDCBlock(nn.Module): method __init__ (line 413) | def __init__(self, pdc, inplane, ouplane, stride=1): method forward (line 425) | def forward(self, x): class PDCBlock_converted (line 436) | class PDCBlock_converted(nn.Module): method __init__ (line 441) | def __init__(self, pdc, inplane, ouplane, stride=1): method forward (line 455) | def forward(self, x): class PiDiNet (line 466) | class PiDiNet(nn.Module): method __init__ (line 467) | def __init__(self, inplane, pdcs, dil=None, sa=False, convert=False): method get_weights (line 546) | def get_weights(self): method forward (line 560) | def forward(self, x): function config_model (line 619) | def config_model(model): function pidinet (line 634) | def pidinet(): FILE: annotator/shuffle/__init__.py class ContentShuffleDetector (line 6) | class ContentShuffleDetector: method __call__ (line 7) | def __call__(self, img, h=None, w=None, f=None): FILE: annotator/teed/Fmish.py function mish (line 11) | def mish(input): FILE: annotator/teed/Fsmish.py function smish (line 14) | def smish(input): FILE: annotator/teed/Xmish.py class Mish (line 15) | class Mish(nn.Module): method __init__ (line 30) | def __init__(self): method forward (line 36) | def forward(self, input): FILE: annotator/teed/Xsmish.py class Smish (line 18) | class Smish(nn.Module): method __init__ (line 33) | def __init__(self): method forward (line 39) | def forward(self, input): FILE: annotator/teed/__init__.py class TEEDDetector (line 16) | class TEEDDetector: method __init__ (line 21) | def __init__(self, mteed: bool = False): method load_teed_model (line 30) | def load_teed_model(self): method load_mteed_model (line 41) | def load_mteed_model(self): method unload_model (line 51) | def unload_model(self): method __call__ (line 55) | def __call__(self, image: np.ndarray, safe_steps: int = 2) -> np.ndarray: FILE: annotator/teed/ted.py function weight_init (line 15) | def weight_init(m): class CoFusion (line 28) | class CoFusion(nn.Module): method __init__ (line 31) | def __init__(self, in_ch, out_ch): method forward (line 40) | def forward(self, x): class CoFusion2 (line 47) | class CoFusion2(nn.Module): method __init__ (line 49) | def __init__(self, in_ch, out_ch): method forward (line 60) | def forward(self, x): class DoubleFusion (line 68) | class DoubleFusion(nn.Module): method __init__ (line 70) | def __init__(self, in_ch, out_ch): method forward (line 82) | def forward(self, x): class _DenseLayer (line 90) | class _DenseLayer(nn.Sequential): method __init__ (line 91) | def __init__(self, input_features, out_features): method forward (line 99) | def forward(self, x): class _DenseBlock (line 107) | class _DenseBlock(nn.Sequential): method __init__ (line 108) | def __init__(self, num_layers, input_features, out_features): class UpConvBlock (line 116) | class UpConvBlock(nn.Module): method __init__ (line 117) | def __init__(self, in_features, up_scale): method make_deconv_layers (line 126) | def make_deconv_layers(self, in_features, up_scale): method compute_out_features (line 140) | def compute_out_features(self, idx, up_scale): method forward (line 143) | def forward(self, x): class SingleConvBlock (line 147) | class SingleConvBlock(nn.Module): method __init__ (line 148) | def __init__(self, in_features, out_features, stride, use_ac=False): method forward (line 157) | def forward(self, x): class DoubleConvBlock (line 164) | class DoubleConvBlock(nn.Module): method __init__ (line 165) | def __init__(self, in_features, mid_features, method forward (line 179) | def forward(self, x): class TED (line 188) | class TED(nn.Module): method __init__ (line 193) | def __init__(self): method slice (line 216) | def slice(self, tensor, slice_shape): method resize_input (line 227) | def resize_input(self,tensor): method crop_bdcn (line 238) | def crop_bdcn(data1, h, w, crop_h, crop_w): method forward (line 246) | def forward(self, x, single_test=False): FILE: annotator/uniformer/__init__.py function unload_uniformer_model (line 17) | def unload_uniformer_model(): function apply_uniformer (line 22) | def apply_uniformer(img): FILE: annotator/uniformer/inference.py function init_segmentor (line 17) | def init_segmentor(config, checkpoint=None, device='cuda:0'): class LoadImage (line 48) | class LoadImage: method __call__ (line 51) | def __call__(self, results): function inference_segmentor (line 75) | def inference_segmentor(model, img): function show_result_pyplot (line 109) | def show_result_pyplot(model, FILE: annotator/uniformer/mmcv_custom/checkpoint.py function _get_mmcv_home (line 38) | def _get_mmcv_home(): function load_state_dict (line 49) | def load_state_dict(module, state_dict, strict=False, logger=None): function load_url_dist (line 117) | def load_url_dist(url, model_dir=None): function load_pavimodel_dist (line 131) | def load_pavimodel_dist(model_path, map_location=None): function load_fileclient_dist (line 159) | def load_fileclient_dist(filename, backend, map_location): function get_torchvision_models (line 180) | def get_torchvision_models(): function get_external_models (line 192) | def get_external_models(): function get_mmcls_models (line 206) | def get_mmcls_models(): function get_deprecated_model_names (line 213) | def get_deprecated_model_names(): function _process_mmcls_checkpoint (line 222) | def _process_mmcls_checkpoint(checkpoint): function _load_checkpoint (line 233) | def _load_checkpoint(filename, map_location=None): function load_checkpoint (line 294) | def load_checkpoint(model, function weights_to_cpu (line 367) | def weights_to_cpu(state_dict): function _save_to_state_dict (line 382) | def _save_to_state_dict(module, destination, prefix, keep_vars): function get_state_dict (line 402) | def get_state_dict(module, destination=None, prefix='', keep_vars=False): function save_checkpoint (line 446) | def save_checkpoint(model, filename, optimizer=None, meta=None): FILE: annotator/uniformer/uniformer.py class Mlp (line 28) | class Mlp(nn.Module): method __init__ (line 29) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 38) | def forward(self, x): class CMlp (line 47) | class CMlp(nn.Module): method __init__ (line 48) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 57) | def forward(self, x): class CBlock (line 66) | class CBlock(nn.Module): method __init__ (line 67) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 81) | def forward(self, x): class Attention (line 88) | class Attention(nn.Module): method __init__ (line 89) | def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, at... method forward (line 101) | def forward(self, x): class SABlock (line 116) | class SABlock(nn.Module): method __init__ (line 117) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 132) | def forward(self, x): function window_partition (line 142) | def window_partition(x, window_size): function window_reverse (line 156) | def window_reverse(windows, window_size, H, W): class SABlock_Windows (line 172) | class SABlock_Windows(nn.Module): method __init__ (line 173) | def __init__(self, dim, num_heads, window_size=14, mlp_ratio=4., qkv_b... method forward (line 189) | def forward(self, x): class PatchEmbed (line 222) | class PatchEmbed(nn.Module): method __init__ (line 225) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 236) | def forward(self, x): class UniFormer (line 247) | class UniFormer(nn.Module): method __init__ (line 252) | def __init__(self, layers=[3, 4, 8, 3], img_size=224, in_chans=3, num_... method init_weights (line 362) | def init_weights(self, pretrained): method _init_weights (line 367) | def _init_weights(self, m): method no_weight_decay (line 377) | def no_weight_decay(self): method get_classifier (line 380) | def get_classifier(self): method reset_classifier (line 383) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 387) | def forward_features(self, x): method forward (line 424) | def forward(self, x): FILE: annotator/util.py function load_model (line 6) | def load_model(filename: str, remote_url: str, model_dir: str) -> str: function HWC3 (line 21) | def HWC3(x): function make_noise_disk (line 40) | def make_noise_disk(H, W, C, F): function nms (line 51) | def nms(x, t, s): function min_max_norm (line 69) | def min_max_norm(x): function safe_step (line 75) | def safe_step(x, step=2): FILE: annotator/zoe/__init__.py class ZoeDetector (line 13) | class ZoeDetector: method __init__ (line 16) | def __init__(self): method load_model (line 20) | def load_model(self): method unload_model (line 32) | def unload_model(self): method __call__ (line 36) | def __call__(self, input_image): FILE: annotator/zoe/zoedepth/models/base_models/midas.py function denormalize (line 32) | def denormalize(x): function get_activation (line 45) | def get_activation(name, bank): class Resize (line 51) | class Resize(object): method __init__ (line 55) | def __init__( method constrain_to_multiple_of (line 101) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 114) | def get_size(self, width, height): method __call__ (line 172) | def __call__(self, x): class PrepForMidas (line 176) | class PrepForMidas(object): method __init__ (line 177) | def __init__(self, resize_mode="minimal", keep_aspect_ratio=True, img_... method __call__ (line 186) | def __call__(self, x): class MidasCore (line 190) | class MidasCore(nn.Module): method __init__ (line 191) | def __init__(self, midas, trainable=False, fetch_features=True, layer_... method set_trainable (line 224) | def set_trainable(self, trainable): method set_fetch_features (line 232) | def set_fetch_features(self, fetch_features): method freeze (line 241) | def freeze(self): method unfreeze (line 247) | def unfreeze(self): method freeze_bn (line 253) | def freeze_bn(self): method forward (line 259) | def forward(self, x, denorm=False, return_rel_depth=False): method get_rel_pos_params (line 279) | def get_rel_pos_params(self): method get_enc_params_except_rel_pos (line 284) | def get_enc_params_except_rel_pos(self): method freeze_encoder (line 289) | def freeze_encoder(self, freeze_rel_pos=False): method attach_hooks (line 298) | def attach_hooks(self, midas): method remove_hooks (line 322) | def remove_hooks(self): method __del__ (line 327) | def __del__(self): method set_output_channels (line 330) | def set_output_channels(self, model_type): method build (line 334) | def build(midas_model_type="DPT_BEiT_L_384", train_midas=False, use_pr... method build_from_config (line 352) | def build_from_config(config): method parse_img_size (line 356) | def parse_img_size(config): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/hubconf.py function DPT_BEiT_L_512 (line 9) | def DPT_BEiT_L_512(pretrained=True, **kwargs): function DPT_BEiT_L_384 (line 32) | def DPT_BEiT_L_384(pretrained=True, **kwargs): function DPT_BEiT_B_384 (line 55) | def DPT_BEiT_B_384(pretrained=True, **kwargs): function DPT_SwinV2_L_384 (line 78) | def DPT_SwinV2_L_384(pretrained=True, **kwargs): function DPT_SwinV2_B_384 (line 101) | def DPT_SwinV2_B_384(pretrained=True, **kwargs): function DPT_SwinV2_T_256 (line 124) | def DPT_SwinV2_T_256(pretrained=True, **kwargs): function DPT_Swin_L_384 (line 147) | def DPT_Swin_L_384(pretrained=True, **kwargs): function DPT_Next_ViT_L_384 (line 170) | def DPT_Next_ViT_L_384(pretrained=True, **kwargs): function DPT_LeViT_224 (line 193) | def DPT_LeViT_224(pretrained=True, **kwargs): function DPT_Large (line 218) | def DPT_Large(pretrained=True, **kwargs): function DPT_Hybrid (line 241) | def DPT_Hybrid(pretrained=True, **kwargs): function MiDaS (line 264) | def MiDaS(pretrained=True, **kwargs): function MiDaS_small (line 283) | def MiDaS_small(pretrained=True, **kwargs): function transforms (line 303) | def transforms(): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/beit.py function forward_beit (line 14) | def forward_beit(pretrained, x): function patch_embed_forward (line 18) | def patch_embed_forward(self, x): function _get_rel_pos_bias (line 29) | def _get_rel_pos_bias(self, window_size): function attention_forward (line 65) | def attention_forward(self, x, resolution, shared_rel_pos_bias: Optional... function block_forward (line 94) | def block_forward(self, x, resolution, shared_rel_pos_bias: Optional[tor... function beit_forward_features (line 110) | def beit_forward_features(self, x): function _make_beit_backbone (line 132) | def _make_beit_backbone( function _make_pretrained_beitl16_512 (line 159) | def _make_pretrained_beitl16_512(pretrained, use_readout="ignore", hooks... function _make_pretrained_beitl16_384 (line 176) | def _make_pretrained_beitl16_384(pretrained, use_readout="ignore", hooks... function _make_pretrained_beitb16_384 (line 189) | def _make_pretrained_beitb16_384(pretrained, use_readout="ignore", hooks... FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/levit.py function forward_levit (line 9) | def forward_levit(pretrained, x): function _make_levit_backbone (line 23) | def _make_levit_backbone( class ConvTransposeNorm (line 55) | class ConvTransposeNorm(nn.Sequential): method __init__ (line 62) | def __init__( method fuse (line 73) | def fuse(self): function stem_b4_transpose (line 86) | def stem_b4_transpose(in_chs, out_chs, activation): function _make_pretrained_levit_384 (line 99) | def _make_pretrained_levit_384(pretrained, hooks=None): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/next_vit.py function forward_next_vit (line 11) | def forward_next_vit(pretrained, x): function _make_next_vit_backbone (line 15) | def _make_next_vit_backbone( function _make_pretrained_next_vit_large_6m (line 32) | def _make_pretrained_next_vit_large_6m(hooks=None): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/swin.py function _make_pretrained_swinl12_384 (line 6) | def _make_pretrained_swinl12_384(pretrained, hooks=None): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/swin2.py function _make_pretrained_swin2l24_384 (line 6) | def _make_pretrained_swin2l24_384(pretrained, hooks=None): function _make_pretrained_swin2b24_384 (line 16) | def _make_pretrained_swin2b24_384(pretrained, hooks=None): function _make_pretrained_swin2t16_256 (line 26) | def _make_pretrained_swin2t16_256(pretrained, hooks=None): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/swin_common.py function forward_swin (line 9) | def forward_swin(pretrained, x): function _make_swin_backbone (line 13) | def _make_swin_backbone( FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/utils.py class Slice (line 6) | class Slice(nn.Module): method __init__ (line 7) | def __init__(self, start_index=1): method forward (line 11) | def forward(self, x): class AddReadout (line 15) | class AddReadout(nn.Module): method __init__ (line 16) | def __init__(self, start_index=1): method forward (line 20) | def forward(self, x): class ProjectReadout (line 28) | class ProjectReadout(nn.Module): method __init__ (line 29) | def __init__(self, in_features, start_index=1): method forward (line 35) | def forward(self, x): class Transpose (line 42) | class Transpose(nn.Module): method __init__ (line 43) | def __init__(self, dim0, dim1): method forward (line 48) | def forward(self, x): function get_activation (line 56) | def get_activation(name): function forward_default (line 63) | def forward_default(pretrained, x, function_name="forward_features"): function forward_adapted_unflatten (line 83) | def forward_adapted_unflatten(pretrained, x, function_name="forward_feat... function get_readout_oper (line 127) | def get_readout_oper(vit_features, features, use_readout, start_index=1): function make_backbone_default (line 144) | def make_backbone_default( FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/vit.py function forward_vit (line 12) | def forward_vit(pretrained, x): function _resize_pos_embed (line 16) | def _resize_pos_embed(self, posemb, gs_h, gs_w): function forward_flex (line 33) | def forward_flex(self, x): function _make_vit_b16_backbone (line 75) | def _make_vit_b16_backbone( function _make_pretrained_vitl16_384 (line 98) | def _make_pretrained_vitl16_384(pretrained, use_readout="ignore", hooks=... function _make_pretrained_vitb16_384 (line 111) | def _make_pretrained_vitb16_384(pretrained, use_readout="ignore", hooks=... function _make_vit_b_rn50_backbone (line 120) | def _make_vit_b_rn50_backbone( function _make_pretrained_vitb_rn50_384 (line 208) | def _make_pretrained_vitb_rn50_384( FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/base_model.py class BaseModel (line 4) | class BaseModel(torch.nn.Module): method load (line 5) | def load(self, path): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/blocks.py function _make_encoder (line 32) | def _make_encoder(backbone, features, use_pretrained, groups=1, expand=F... function _make_scratch (line 133) | def _make_scratch(in_shape, out_shape, groups=1, expand=False): function _make_pretrained_efficientnet_lite3 (line 166) | def _make_pretrained_efficientnet_lite3(use_pretrained, exportable=False): function _make_efficientnet_backbone (line 176) | def _make_efficientnet_backbone(effnet): function _make_resnet_backbone (line 189) | def _make_resnet_backbone(resnet): function _make_pretrained_resnext101_wsl (line 202) | def _make_pretrained_resnext101_wsl(use_pretrained): class Interpolate (line 208) | class Interpolate(nn.Module): method __init__ (line 212) | def __init__(self, scale_factor, mode, align_corners=False): method forward (line 226) | def forward(self, x): class ResidualConvUnit (line 243) | class ResidualConvUnit(nn.Module): method __init__ (line 247) | def __init__(self, features): method forward (line 265) | def forward(self, x): class FeatureFusionBlock (line 282) | class FeatureFusionBlock(nn.Module): method __init__ (line 286) | def __init__(self, features): method forward (line 297) | def forward(self, *xs): class ResidualConvUnit_custom (line 319) | class ResidualConvUnit_custom(nn.Module): method __init__ (line 323) | def __init__(self, features, activation, bn): method forward (line 351) | def forward(self, x): class FeatureFusionBlock_custom (line 379) | class FeatureFusionBlock_custom(nn.Module): method __init__ (line 383) | def __init__(self, features, activation, deconv=False, bn=False, expan... method forward (line 410) | def forward(self, *xs, size=None): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/dpt_depth.py function _make_fusion_block (line 18) | def _make_fusion_block(features, use_bn, size = None): class DPT (line 30) | class DPT(BaseModel): method __init__ (line 31) | def __init__( method forward (line 110) | def forward(self, x): class DPTDepthModel (line 142) | class DPTDepthModel(DPT): method __init__ (line 143) | def __init__(self, path=None, non_negative=True, **kwargs): method forward (line 165) | def forward(self, x): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/midas_net.py class MidasNet (line 12) | class MidasNet(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=256, non_negative=True): method forward (line 49) | def forward(self, x): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/midas_net_custom.py class MidasNet_small (line 12) | class MidasNet_small(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=64, backbone="efficientnet_lite... method forward (line 73) | def forward(self, x): function fuse_model (line 109) | def fuse_model(m): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/model_loader.py function load_model (line 29) | def load_model(device, model_path, model_type="dpt_large_384", optimize=... FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/midas/transforms.py function apply_min_size (line 6) | def apply_min_size(sample, size, image_interpolation_method=cv2.INTER_AR... class Resize (line 48) | class Resize(object): method __init__ (line 52) | def __init__( method constrain_to_multiple_of (line 94) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 105) | def get_size(self, width, height): method __call__ (line 162) | def __call__(self, sample): class NormalizeImage (line 197) | class NormalizeImage(object): method __init__ (line 201) | def __init__(self, mean, std): method __call__ (line 205) | def __call__(self, sample): class PrepareForNet (line 211) | class PrepareForNet(object): method __init__ (line 215) | def __init__(self): method __call__ (line 218) | def __call__(self, sample): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/ros/midas_cpp/scripts/listener.py class video_show (line 14) | class video_show: method __init__ (line 16) | def __init__(self): method callback (line 25) | def callback(self, data): function main (line 51) | def main(args): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/ros/midas_cpp/scripts/listener_original.py class video_show (line 14) | class video_show: method __init__ (line 16) | def __init__(self): method callback (line 25) | def callback(self, data): function main (line 51) | def main(args): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/ros/midas_cpp/scripts/talker.py function talker (line 14) | def talker(): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/ros/midas_cpp/src/main.cpp class Midas (line 35) | class Midas method ToTensor (line 45) | auto ToTensor(cv::Mat img, bool show_output = false, bool unsqueeze = ... method ToInput (line 64) | auto ToInput(at::Tensor tensor_image) method ToCvImage (line 70) | auto ToCvImage(at::Tensor tensor, int cv_type = CV_8UC3) method Midas (line 108) | Midas() method imageCb (line 170) | void imageCb(const sensor_msgs::ImageConstPtr& msg) function main (line 279) | int main(int argc, char** argv) FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/run.py function process (line 19) | def process(device, model, model_type, image, input_size, target_size, o... function create_side_by_side (line 79) | def create_side_by_side(image, depth, grayscale): function run (line 107) | def run(input_path, output_path, model_path, model_type="dpt_beit_large_... FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/tf/make_onnx_model.py function modify_file (line 18) | def modify_file(): function restore_file (line 32) | def restore_file(): class MidasNet_preprocessing (line 44) | class MidasNet_preprocessing(MidasNet): method forward (line 47) | def forward(self, x): function run (line 64) | def run(model_path): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/tf/run_onnx.py function run (line 17) | def run(input_path, output_path, model_path, model_type="large"): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/tf/run_pb.py function run (line 13) | def run(input_path, output_path, model_path, model_type="large"): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/tf/transforms.py function apply_min_size (line 6) | def apply_min_size(sample, size, image_interpolation_method=cv2.INTER_AR... class Resize (line 48) | class Resize(object): method __init__ (line 52) | def __init__( method constrain_to_multiple_of (line 94) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 105) | def get_size(self, width, height): method __call__ (line 162) | def __call__(self, sample): class NormalizeImage (line 197) | class NormalizeImage(object): method __init__ (line 201) | def __init__(self, mean, std): method __call__ (line 205) | def __call__(self, sample): class PrepareForNet (line 211) | class PrepareForNet(object): method __init__ (line 215) | def __init__(self): method __call__ (line 218) | def __call__(self, sample): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/tf/utils.py function write_pfm (line 6) | def write_pfm(path, image, scale=1): function read_image (line 43) | def read_image(path): function write_depth (line 59) | def write_depth(path, depth, bits=1): FILE: annotator/zoe/zoedepth/models/base_models/midas_repo/utils.py function read_pfm (line 10) | def read_pfm(path): function write_pfm (line 59) | def write_pfm(path, image, scale=1): function read_image (line 98) | def read_image(path): function resize_image (line 117) | def resize_image(img): function resize_depth (line 147) | def resize_depth(depth, width, height): function write_depth (line 166) | def write_depth(path, depth, grayscale, bits=1): FILE: annotator/zoe/zoedepth/models/builder.py function build_model (line 28) | def build_model(config) -> DepthModel: FILE: annotator/zoe/zoedepth/models/depth_model.py class DepthModel (line 35) | class DepthModel(nn.Module): method __init__ (line 36) | def __init__(self): method to (line 40) | def to(self, device) -> nn.Module: method forward (line 44) | def forward(self, x, *args, **kwargs): method _infer (line 47) | def _infer(self, x: torch.Tensor): method _infer_with_pad_aug (line 57) | def _infer_with_pad_aug(self, x: torch.Tensor, pad_input: bool=True, f... method infer_with_flip_aug (line 99) | def infer_with_flip_aug(self, x, pad_input: bool=True, **kwargs) -> to... method infer (line 115) | def infer(self, x, pad_input: bool=True, with_flip_aug: bool=True, **k... method infer_pil (line 131) | def infer_pil(self, pil_img, pad_input: bool=True, with_flip_aug: bool... FILE: annotator/zoe/zoedepth/models/layers/attractor.py function exp_attractor (line 30) | def exp_attractor(dx, alpha: float = 300, gamma: int = 2): function inv_attractor (line 45) | def inv_attractor(dx, alpha: float = 300, gamma: int = 2): class AttractorLayer (line 60) | class AttractorLayer(nn.Module): method __init__ (line 61) | def __init__(self, in_features, n_bins, n_attractors=16, mlp_dim=128, ... method forward (line 85) | def forward(self, x, b_prev, prev_b_embedding=None, interpolate=True, ... class AttractorLayerUnnormed (line 139) | class AttractorLayerUnnormed(nn.Module): method __init__ (line 140) | def __init__(self, in_features, n_bins, n_attractors=16, mlp_dim=128, ... method forward (line 164) | def forward(self, x, b_prev, prev_b_embedding=None, interpolate=True, ... FILE: annotator/zoe/zoedepth/models/layers/dist_layers.py function log_binom (line 29) | def log_binom(n, k, eps=1e-7): class LogBinomial (line 36) | class LogBinomial(nn.Module): method __init__ (line 37) | def __init__(self, n_classes=256, act=torch.softmax): method forward (line 51) | def forward(self, x, t=1., eps=1e-4): class ConditionalLogBinomial (line 72) | class ConditionalLogBinomial(nn.Module): method __init__ (line 73) | def __init__(self, in_features, condition_dim, n_classes=256, bottlene... method forward (line 100) | def forward(self, x, cond): FILE: annotator/zoe/zoedepth/models/layers/localbins_layers.py class SeedBinRegressor (line 29) | class SeedBinRegressor(nn.Module): method __init__ (line 30) | def __init__(self, in_features, n_bins=16, mlp_dim=256, min_depth=1e-3... method forward (line 52) | def forward(self, x): class SeedBinRegressorUnnormed (line 71) | class SeedBinRegressorUnnormed(nn.Module): method __init__ (line 72) | def __init__(self, in_features, n_bins=16, mlp_dim=256, min_depth=1e-3... method forward (line 91) | def forward(self, x): class Projector (line 99) | class Projector(nn.Module): method __init__ (line 100) | def __init__(self, in_features, out_features, mlp_dim=128): method forward (line 116) | def forward(self, x): class LinearSplitter (line 121) | class LinearSplitter(nn.Module): method __init__ (line 122) | def __init__(self, in_features, prev_nbins, split_factor=2, mlp_dim=12... method forward (line 137) | def forward(self, x, b_prev, prev_b_embedding=None, interpolate=True, ... FILE: annotator/zoe/zoedepth/models/layers/patch_transformer.py class PatchTransformerEncoder (line 29) | class PatchTransformerEncoder(nn.Module): method __init__ (line 30) | def __init__(self, in_channels, patch_size=10, embedding_dim=128, num_... method positional_encoding_1d (line 50) | def positional_encoding_1d(self, sequence_length, batch_size, embeddin... method forward (line 71) | def forward(self, x): FILE: annotator/zoe/zoedepth/models/model_io.py function load_state_dict (line 27) | def load_state_dict(model, state_dict): function load_wts (line 54) | def load_wts(model, checkpoint_path): function load_state_dict_from_url (line 59) | def load_state_dict_from_url(model, url, **kwargs): function load_state_from_resource (line 64) | def load_state_from_resource(model, resource: str): FILE: annotator/zoe/zoedepth/models/zoedepth/zoedepth_v1.py class ZoeDepth (line 38) | class ZoeDepth(DepthModel): method __init__ (line 39) | def __init__(self, core, n_bins=64, bin_centers_type="softplus", bin_... method forward (line 124) | def forward(self, x, return_final_centers=False, denorm=False, return_... method get_lr_params (line 204) | def get_lr_params(self, lr): method build (line 239) | def build(midas_model_type="DPT_BEiT_L_384", pretrained_resource=None,... method build_from_config (line 249) | def build_from_config(config): FILE: annotator/zoe/zoedepth/models/zoedepth_nk/zoedepth_nk_v1.py class ZoeDepthNK (line 40) | class ZoeDepthNK(DepthModel): method __init__ (line 41) | def __init__(self, core, bin_conf, bin_centers_type="softplus", bin_e... method forward (line 159) | def forward(self, x, return_final_centers=False, denorm=False, return_... method get_lr_params (line 245) | def get_lr_params(self, lr): method get_conf_parameters (line 285) | def get_conf_parameters(self, conf_name): method freeze_conf (line 297) | def freeze_conf(self, conf_name): method unfreeze_conf (line 304) | def unfreeze_conf(self, conf_name): method freeze_all_confs (line 311) | def freeze_all_confs(self): method build (line 322) | def build(midas_model_type="DPT_BEiT_L_384", pretrained_resource=None,... method build_from_config (line 332) | def build_from_config(config): FILE: annotator/zoe/zoedepth/utils/arg_utils.py function infer_type (line 3) | def infer_type(x): # hacky way to infer type from string args function parse_unknown (line 22) | def parse_unknown(unknown_args): FILE: annotator/zoe/zoedepth/utils/config.py function flatten (line 257) | def flatten(config, except_keys=('bin_conf')): function split_combined_args (line 271) | def split_combined_args(kwargs): function parse_list (line 295) | def parse_list(config, key, dtype=int): function get_model_config (line 306) | def get_model_config(model_name, model_version=None): function update_model_config (line 334) | def update_model_config(config, mode, model_name, model_version=None, st... function check_choices (line 344) | def check_choices(name, value, choices): function get_config (line 354) | def get_config(model_name, mode='train', dataset=None, **overwrite_kwargs): function change_dataset (line 435) | def change_dataset(config, new_dataset): FILE: annotator/zoe/zoedepth/utils/easydict/__init__.py class EasyDict (line 7) | class EasyDict(dict): method __init__ (line 120) | def __init__(self, d=None, **kwargs): method __setattr__ (line 134) | def __setattr__(self, name, value): method update (line 145) | def update(self, e=None, **f): method pop (line 151) | def pop(self, k, d=None): FILE: annotator/zoe/zoedepth/utils/geometry.py function get_intrinsics (line 27) | def get_intrinsics(H,W): function depth_to_points (line 39) | def depth_to_points(depth, R=None, t=None): function create_triangles (line 75) | def create_triangles(h, w, mask=None): FILE: annotator/zoe/zoedepth/utils/misc.py class RunningAverage (line 47) | class RunningAverage: method __init__ (line 48) | def __init__(self): method append (line 52) | def append(self, value): method get_value (line 56) | def get_value(self): function denormalize (line 60) | def denormalize(x): class RunningAverageDict (line 74) | class RunningAverageDict: method __init__ (line 76) | def __init__(self): method update (line 79) | def update(self, new_dict): method get_value (line 91) | def get_value(self): function colorize (line 97) | def colorize(value, vmin=None, vmax=None, cmap='gray_r', invalid_val=-99... function count_parameters (line 155) | def count_parameters(model, include_all=False): function compute_errors (line 159) | def compute_errors(gt, pred): function compute_metrics (line 202) | def compute_metrics(gt, pred, interpolate=True, garg_crop=False, eigen_c... function parallelize (line 251) | def parallelize(config, model, find_unused_parameters=True): class colors (line 291) | class colors: class fg (line 309) | class fg: class bg (line 326) | class bg: function printc (line 337) | def printc(text, color): function get_image_from_url (line 342) | def get_image_from_url(url): function url_to_torch (line 347) | def url_to_torch(url, size=(384, 384)): function pil_to_batched_tensor (line 355) | def pil_to_batched_tensor(img): function save_raw_16bit (line 358) | def save_raw_16bit(depth, fpath="raw.png"): FILE: example/advanced_weighting_example/api_advanced_weighting.py function generate (line 17) | def generate(url: str, payload: dict, file_suffix: str = ""): function read_image (line 27) | def read_image(img_path: str) -> str: FILE: example/chatgpt.py function readImage (line 61) | def readImage(path): function get_model (line 67) | def get_model(pattern='^control_canny.*'): function do_webui_request (line 74) | def do_webui_request(url=T2IAPI, **kwargs): function cut_dialogue_history (line 100) | def cut_dialogue_history(history_memory, keep_last_n_words=500): function get_new_image_name (line 114) | def get_new_image_name(org_img_name, func_name="update"): class MaskFormer (line 131) | class MaskFormer: method __init__ (line 132) | def __init__(self, device): method inference (line 137) | def inference(self, image_path, text): class T2I (line 206) | class T2I: method __init__ (line 207) | def __init__(self, device): method inference (line 214) | def inference(self, text): class ImageCaptioning (line 228) | class ImageCaptioning: method __init__ (line 229) | def __init__(self, device): method inference (line 235) | def inference(self, image_path): class image2canny (line 242) | class image2canny: method inference (line 243) | def inference(self, inputs): class canny2image (line 255) | class canny2image: method inference (line 256) | def inference(self, inputs): class image2line (line 271) | class image2line: method inference (line 272) | def inference(self, inputs): class line2image (line 285) | class line2image: method inference (line 286) | def inference(self, inputs): class image2hed (line 301) | class image2hed: method inference (line 302) | def inference(self, inputs): class hed2image (line 315) | class hed2image: method inference (line 316) | def inference(self, inputs): class image2scribble (line 330) | class image2scribble: method inference (line 331) | def inference(self, inputs): class scribble2image (line 344) | class scribble2image: method inference (line 345) | def inference(self, inputs): class image2pose (line 360) | class image2pose: method inference (line 361) | def inference(self, inputs): class pose2image (line 374) | class pose2image: method inference (line 375) | def inference(self, inputs): class image2seg (line 390) | class image2seg: method inference (line 391) | def inference(self, inputs): class seg2image (line 404) | class seg2image: method inference (line 405) | def inference(self, inputs): class image2depth (line 420) | class image2depth: method inference (line 421) | def inference(self, inputs): class depth2image (line 434) | class depth2image: method inference (line 435) | def inference(self, inputs): class image2normal (line 450) | class image2normal: method inference (line 451) | def inference(self, inputs): class normal2image (line 464) | class normal2image: method inference (line 465) | def inference(self, inputs): class BLIPVQA (line 480) | class BLIPVQA: method __init__ (line 481) | def __init__(self, device): method get_answer_from_question_and_image (line 487) | def get_answer_from_question_and_image(self, inputs): class ConversationBot (line 497) | class ConversationBot: method __init__ (line 498) | def __init__(self): method init_langchain (line 591) | def init_langchain(self, openai_api_key): method run_text (line 603) | def run_text(self, openai_api_key, text, state): method run_image (line 617) | def run_image(self, openai_api_key, image, state, txt): FILE: example/inpaint_example/api_inpaint.py function generate (line 17) | def generate(url: str, payload: dict): function read_image (line 27) | def read_image(img_path: str) -> str: FILE: example/txt2img_example/api_txt2img.py class ControlnetRequest (line 17) | class ControlnetRequest: method __init__ (line 18) | def __init__(self, prompt, path): method build_body (line 24) | def build_body(self): method send_request (line 55) | def send_request(self): method read_image (line 59) | def read_image(self): FILE: extract_controlnet_diff.py function get_node_name (line 20) | def get_node_name(name, parent_name): function remove_first_and_cond (line 29) | def remove_first_and_cond(sd): FILE: install.py function get_installed_version (line 16) | def get_installed_version(package: str) -> Optional[str]: function extract_base_package (line 23) | def extract_base_package(package_string: str) -> str: function install_requirements (line 28) | def install_requirements(req_file): function install_onnxruntime (line 73) | def install_onnxruntime(): function try_install_from_wheel (line 87) | def try_install_from_wheel(pkg_name: str, wheel_url: str, version: Optio... function try_install_insight_face (line 107) | def try_install_insight_face(): function try_remove_legacy_submodule (line 143) | def try_remove_legacy_submodule(): FILE: internal_controlnet/args.py function _unimplemented_func (line 23) | def _unimplemented_func(*args, **kwargs): function field_to_displaytext (line 27) | def field_to_displaytext(fieldname: str) -> str: function displaytext_to_field (line 31) | def displaytext_to_field(text: str) -> str: function serialize_value (line 35) | def serialize_value(value) -> str: function parse_value (line 41) | def parse_value(value: str) -> Union[str, float, int, bool]: class ControlNetUnit (line 53) | class ControlNetUnit(BaseModel): class Config (line 58) | class Config: method check_module (line 81) | def check_module(cls, value: str) -> str: method check_model (line 89) | def check_model(cls, value: str) -> str: method check_resize_mode (line 102) | def check_resize_mode(cls, value) -> ResizeMode: method bound_check_params (line 120) | def bound_check_params(cls, values: dict) -> dict: method guidance_check (line 155) | def guidance_check(cls, values: dict) -> dict: method parse_effective_region_mask (line 196) | def parse_effective_region_mask(cls, value) -> np.ndarray: method parse_ipadapter_input (line 219) | def parse_ipadapter_input(cls, value) -> Optional[List[Any]]: method accepts_multiple_inputs (line 240) | def accepts_multiple_inputs(self) -> bool: method is_animate_diff_batch (line 245) | def is_animate_diff_batch(self) -> bool: method uses_clip (line 249) | def uses_clip(self) -> bool: method is_inpaint (line 260) | def is_inpaint(self) -> bool: method is_ipadapter (line 264) | def is_ipadapter(self) -> bool: method get_actual_preprocessors (line 270) | def get_actual_preprocessors(self) -> List[Any]: method parse_image (line 282) | def parse_image(cls, image) -> np.ndarray: method combine_image_and_mask (line 304) | def combine_image_and_mask( method legacy_field_alias (line 319) | def legacy_field_alias(cls, values: dict) -> dict: method mask_alias (line 337) | def mask_alias(cls, values: dict) -> dict: method get_input_images_rgba (line 350) | def get_input_images_rgba(self) -> Optional[List[np.ndarray]]: method from_dict (line 421) | def from_dict(cls, values: dict) -> ControlNetUnit: method from_infotext_args (line 428) | def from_infotext_args(cls, *args) -> ControlNetUnit: method infotext_fields (line 435) | def infotext_fields() -> Tuple[str]: method serialize (line 455) | def serialize(self) -> str: method parse (line 470) | def parse(cls, text: str) -> ControlNetUnit: method __copy__ (line 480) | def __copy__(self) -> ControlNetUnit: FILE: internal_controlnet/external_code.py function get_api_version (line 26) | def get_api_version() -> int: function resize_mode_from_value (line 38) | def resize_mode_from_value(value: Union[str, int, ResizeMode]) -> Resize... function visualize_inpaint_mask (line 57) | def visualize_inpaint_mask(img): function pixel_perfect_resolution (line 67) | def pixel_perfect_resolution( function to_base64_nparray (line 118) | def to_base64_nparray(encoding: str) -> np.ndarray: function get_all_units_in_processing (line 126) | def get_all_units_in_processing( function get_all_units (line 136) | def get_all_units( function get_all_units_from (line 151) | def get_all_units_from(script_args: List[Any]) -> List[ControlNetUnit]: function get_single_unit_from (line 195) | def get_single_unit_from( function get_max_models_num (line 214) | def get_max_models_num(): function to_processing_unit (line 223) | def to_processing_unit(unit: Union[Dict, ControlNetUnit]) -> ControlNetU... function update_cn_script_in_processing (line 234) | def update_cn_script_in_processing( function update_cn_script (line 250) | def update_cn_script( function update_cn_script_in_place (line 294) | def update_cn_script_in_place( function get_models (line 335) | def get_models(update: bool = False) -> List[str]: function get_modules (line 350) | def get_modules(alias_names: bool = False) -> List[str]: function get_modules_detail (line 364) | def get_modules_detail(alias_names: bool = False) -> Dict[str, Any]: function find_cn_script (line 398) | def find_cn_script(script_runner: scripts.ScriptRunner) -> Optional[scri... function is_cn_script (line 411) | def is_cn_script(script: scripts.Script) -> bool: function decode_base64 (line 428) | def decode_base64(b: str) -> torch.Tensor: FILE: javascript/controlnet_unit.mjs function imgChangeObserved (line 8) | function imgChangeObserved(mutationsList) { function childIndex (line 41) | function childIndex(element) { class ControlNetUnit (line 51) | class ControlNetUnit { method constructor (line 52) | constructor(tab, accordion) { method getTabNavButton (line 80) | getTabNavButton() { method controlTypeSelectorIsDropdown (line 87) | controlTypeSelectorIsDropdown() { method getActiveControlType (line 91) | getActiveControlType() { method updateActiveState (line 104) | updateActiveState() { method updateActiveUnitCount (line 115) | updateActiveUnitCount() { method updateActiveControlType (line 146) | updateActiveControlType() { method attachEnabledButtonListener (line 164) | attachEnabledButtonListener() { method attachControlTypeRadioListener (line 171) | attachControlTypeRadioListener() { method attachTabNavChangeObserver (line 197) | attachTabNavChangeObserver() { method attachImageUploadListener (line 208) | attachImageUploadListener() { method attachImageStateChangeObserver (line 224) | attachImageStateChangeObserver() { method attachA1111SendInfoObserver (line 249) | attachA1111SendInfoObserver() { FILE: javascript/modal.mjs function initControlNetModals (line 1) | function initControlNetModals(container) { FILE: javascript/openpose_editor.mjs class OpenposeEditor (line 3) | class OpenposeEditor { method constructor (line 8) | constructor(unit) { method checkEditorAvailable (line 41) | async checkEditorAvailable() { method navigateIframe (line 56) | navigateIframe() { method trigger (line 91) | async trigger() { method updatePreviewPose (line 123) | updatePreviewPose(poseURL) { FILE: javascript/photopea.mjs function base64ArrayBuffer (line 19) | function base64ArrayBuffer(arrayBuffer) { function b64toBlob (line 73) | function b64toBlob(b64Data, contentType, sliceSize) { function createBlackImageBase64 (line 90) | function createBlackImageBase64(width, height) { function pasteImage (line 111) | function pasteImage(base64image) { function setLayerNames (line 116) | function setLayerNames(names) { function removeLayersWithNames (line 131) | function removeLayersWithNames(names) { function getAllLayerNames (line 142) | function getAllLayerNames() { function exportSelectedLayerOnly (line 154) | function exportSelectedLayerOnly(format, layerName) { function hasActiveDocument (line 210) | function hasActiveDocument() { constant MESSAGE_END_ACK (line 215) | const MESSAGE_END_ACK = "done"; constant MESSAGE_ERROR (line 216) | const MESSAGE_ERROR = "error"; constant PHOTOPEA_URL (line 217) | const PHOTOPEA_URL = "https://www.photopea.com/"; class PhotopeaContext (line 218) | class PhotopeaContext { method constructor (line 219) | constructor(photopeaIframe) { method navigateIframe (line 224) | navigateIframe() { method postMessageToPhotopea (line 250) | postMessageToPhotopea(message) { method invoke (line 289) | async invoke(func, ...args) { method fetchFromControlNet (line 304) | async fetchFromControlNet(tabs) { method sendToControlNet (line 330) | async sendToControlNet(tabs) { function firstTimeUserPrompt (line 379) | function firstTimeUserPrompt() { function loadPhotopea (line 392) | function loadPhotopea(accordion) { FILE: patch_version.py function get_current_version (line 5) | def get_current_version(filename): function increment_version (line 18) | def increment_version(version): function update_version_file (line 24) | def update_version_file(filename, new_version): function git_commit_and_tag (line 36) | def git_commit_and_tag(filename, new_version): FILE: preload.py function preload (line 1) | def preload(parser): FILE: scripts/adapter.py class TorchHijackForUnet (line 10) | class TorchHijackForUnet: method __getattr__ (line 16) | def __getattr__(self, item): method cat (line 25) | def cat(self, tensors, *args, **kwargs): function align (line 39) | def align(hint, size): class PlugableAdapter (line 47) | class PlugableAdapter(nn.Module): method __init__ (line 48) | def __init__(self, control_model) -> None: method reset (line 54) | def reset(self): method forward (line 58) | def forward(self, hint=None, x=None, *args, **kwargs): method aggressive_lowvram (line 72) | def aggressive_lowvram(self): method fullvram (line 76) | def fullvram(self): function conv_nd (line 81) | def conv_nd(dims, *args, **kwargs): function avg_pool_nd (line 93) | def avg_pool_nd(dims, *args, **kwargs): class Downsample (line 106) | class Downsample(nn.Module): method __init__ (line 115) | def __init__(self, channels, use_conv, dims=2, out_channels=None,paddi... method forward (line 130) | def forward(self, x): class ResnetBlock (line 135) | class ResnetBlock(nn.Module): method __init__ (line 136) | def __init__(self, in_c, out_c, down, ksize=3, sk=False, use_conv=True): method forward (line 156) | def forward(self, x): class Adapter (line 171) | class Adapter(nn.Module): method __init__ (line 172) | def __init__(self, channels=[320, 640, 1280, 1280], nums_rb=3, cin=64,... method forward (line 226) | def forward(self, x): class LayerNorm (line 243) | class LayerNorm(nn.LayerNorm): method forward (line 246) | def forward(self, x: torch.Tensor): class QuickGELU (line 252) | class QuickGELU(nn.Module): method forward (line 254) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 258) | class ResidualAttentionBlock(nn.Module): method __init__ (line 260) | def __init__(self, d_model: int, n_head: int, attn_mask: torch.Tensor ... method attention (line 271) | def attention(self, x: torch.Tensor): method forward (line 275) | def forward(self, x: torch.Tensor): class StyleAdapter (line 281) | class StyleAdapter(nn.Module): method __init__ (line 283) | def __init__(self, width=1024, context_dim=768, num_head=8, n_layes=3,... method forward (line 294) | def forward(self, x): class ResnetBlock_light (line 311) | class ResnetBlock_light(nn.Module): method __init__ (line 312) | def __init__(self, in_c): method forward (line 318) | def forward(self, x): class extractor (line 326) | class extractor(nn.Module): method __init__ (line 327) | def __init__(self, in_c, inter_c, out_c, nums_rb, down=False): method forward (line 339) | def forward(self, x): class Adapter_light (line 349) | class Adapter_light(nn.Module): method __init__ (line 350) | def __init__(self, channels=[320, 640, 1280, 1280], nums_rb=3, cin=64): method forward (line 363) | def forward(self, x): FILE: scripts/animate_diff/batch.py function add_animate_diff_batch_input (line 7) | def add_animate_diff_batch_input( FILE: scripts/api.py function encode_to_base64 (line 25) | def encode_to_base64(image): function encode_np_to_base64 (line 36) | def encode_np_to_base64(image): function encode_tensor_to_base64 (line 41) | def encode_tensor_to_base64(obj: torch.Tensor) -> str: function controlnet_api (line 49) | def controlnet_api(_: gr.Blocks, app: FastAPI): FILE: scripts/batch_hijack.py class BatchHijack (line 9) | class BatchHijack: method __init__ (line 10) | def __init__(self): method img2img_process_batch_hijack (line 21) | def img2img_process_batch_hijack(self, p, *args, **kwargs): method processing_process_images_hijack (line 43) | def processing_process_images_hijack(self, p, *args, **kwargs): method process_images_cn_batch (line 86) | def process_images_cn_batch(self, p, *args, **kwargs): method save_images (line 103) | def save_images(self, output_dir, init_image_path, output_images): method do_hijack (line 116) | def do_hijack(self): method undo_hijack (line 131) | def undo_hijack(self): method adjust_job_count (line 143) | def adjust_job_count(self, p): method on_process_batch (line 148) | def on_process_batch(self, p, batches, output_dir, *args): method on_postprocess_batch_each (line 161) | def on_postprocess_batch_each(self, p, *args): method on_postprocess_batch (line 167) | def on_postprocess_batch(self, p, *args): method dispatch_callbacks (line 177) | def dispatch_callbacks(self, callbacks, *args): function hijack_function (line 182) | def hijack_function(module, name, new_name, new_value): function unhijack_function (line 189) | def unhijack_function(module, name, new_name): function get_cn_batches (line 195) | def get_cn_batches(p: processing.StableDiffusionProcessing) -> Tuple[boo... FILE: scripts/cldm.py class PlugableControlModel (line 18) | class PlugableControlModel(nn.Module): method __init__ (line 19) | def __init__(self, config, state_dict=None): method reset (line 28) | def reset(self): method forward (line 31) | def forward(self, *args, **kwargs): method aggressive_lowvram (line 34) | def aggressive_lowvram(self): method fullvram (line 58) | def fullvram(self): class ControlNet (line 63) | class ControlNet(nn.Module): method __init__ (line 64) | def __init__( method union_controlnet_merge (line 314) | def union_controlnet_merge( method make_zero_conv (line 349) | def make_zero_conv(self, channels): method forward (line 352) | def forward(self, x, hint, timesteps, context, y=None, control_type: L... FILE: scripts/controlnet.py function clear_all_secondary_control_models (line 61) | def clear_all_secondary_control_models(m): function find_closest_lora_model_name (line 76) | def find_closest_lora_model_name(search: str): function swap_img2img_pipeline (line 92) | def swap_img2img_pipeline(p: processing.StableDiffusionProcessingImg2Img): function prepare_mask (line 105) | def prepare_mask( function set_numpy_seed (line 150) | def set_numpy_seed(p: processing.StableDiffusionProcessing) -> Optional[... function get_pytorch_control (line 179) | def get_pytorch_control(x: np.ndarray) -> torch.Tensor: function get_control (line 193) | def get_control( class Script (line 295) | class Script(scripts.Script, metaclass=( method __init__ (line 300) | def __init__(self) -> None: method title (line 319) | def title(self): method show (line 322) | def show(self, is_img2img): method uigroup (line 325) | def uigroup(self, tabname: str, is_img2img: bool, elem_id_tabname: str... method ui_batch_options (line 329) | def ui_batch_options(self, is_img2img: bool, elem_id_tabname: str): method ui (line 368) | def ui(self, is_img2img): method clear_control_model_cache (line 408) | def clear_control_model_cache(): method load_control_model (line 414) | def load_control_model(p, unet, model) -> ControlModel: method build_control_model (line 444) | def build_control_model(p, unet, model) -> ControlModel: method get_remote_call (line 471) | def get_remote_call(p, attribute, default=None, idx=0, strict=False, f... method parse_remote_call (line 487) | def parse_remote_call(p, unit: ControlNetUnit, idx): method detectmap_proc (line 511) | def detectmap_proc(detected_map, module, resize_mode, h, w): method get_enabled_units (line 623) | def get_enabled_units(p): method choose_input_image (line 663) | def choose_input_image( method try_crop_image_with_a1111_mask (line 749) | def try_crop_image_with_a1111_mask( method check_sd_version_compatible (line 804) | def check_sd_version_compatible(unit: ControlNetUnit) -> None: method get_target_dimensions (line 830) | def get_target_dimensions(p: StableDiffusionProcessing) -> Tuple[int, ... method controlnet_main_entry (line 853) | def controlnet_main_entry(self, p): method controlnet_hack (line 1207) | def controlnet_hack(self, p): method process_has_sdxl_refiner (line 1223) | def process_has_sdxl_refiner(p): method process (line 1226) | def process(self, p, *args, **kwargs): method before_process_batch (line 1231) | def before_process_batch(self, p, *args, **kwargs): method postprocess_batch (line 1241) | def postprocess_batch(self, p, *args, **kwargs): method postprocess (line 1248) | def postprocess(self, p, processed, *args): method batch_tab_process (line 1310) | def batch_tab_process(self, p, batches, *args, **kwargs): method batch_tab_process_each (line 1319) | def batch_tab_process_each(self, p, *args, **kwargs): method batch_tab_postprocess_each (line 1330) | def batch_tab_postprocess_each(self, p, processed, *args, **kwargs): method batch_tab_postprocess (line 1343) | def batch_tab_postprocess(self, p, *args, **kwargs): function on_ui_settings (line 1358) | def on_ui_settings(): FILE: scripts/controlnet_core/controlnet_union.py function attention_pytorch (line 19) | def attention_pytorch( class ControlAddEmbedding (line 39) | class ControlAddEmbedding(nn.Module): method __init__ (line 40) | def __init__( method forward (line 56) | def forward(self, control_type, dtype, device): class OptimizedAttention (line 67) | class OptimizedAttention(nn.Module): method __init__ (line 68) | def __init__(self, c, nhead, dropout=0.0, dtype=None, device=None, ope... method forward (line 76) | def forward(self, x): class QuickGELU (line 83) | class QuickGELU(nn.Module): method forward (line 84) | def forward(self, x: torch.Tensor): class ResBlockUnionControlnet (line 88) | class ResBlockUnionControlnet(nn.Module): method __init__ (line 89) | def __init__(self, dim, nhead, dtype=None, device=None, operations=None): method attention (line 112) | def attention(self, x: torch.Tensor): method forward (line 115) | def forward(self, x: torch.Tensor): FILE: scripts/controlnet_diffusers.py function convert_from_diffuser_state_dict (line 78) | def convert_from_diffuser_state_dict(unet_state_dict): FILE: scripts/controlnet_lllite.py class LLLiteModule (line 7) | class LLLiteModule(torch.nn.Module): method __init__ (line 8) | def __init__( method set_cond_image (line 68) | def set_cond_image(self, cond_image): method forward (line 72) | def forward(self, x, blk_shape): function clear_all_lllite (line 106) | def clear_all_lllite(): class PlugableControlLLLite (line 115) | class PlugableControlLLLite(torch.nn.Module): method __init__ (line 116) | def __init__(self, state_dict): method reset (line 156) | def reset(self): method hook (line 161) | def hook(self, model, cond, weight, start, end): method get_hacked_forward (line 199) | def get_hacked_forward(self, original_forward, model, blk): FILE: scripts/controlnet_lora.py class LinearWithLoRA (line 10) | class LinearWithLoRA(torch.nn.Module): method __init__ (line 11) | def __init__( method bind_lora (line 29) | def bind_lora(self, weight_module): method unbind_lora (line 32) | def unbind_lora(self): method get_original_weight (line 36) | def get_original_weight(self): method forward (line 41) | def forward(self, x): class Conv2dWithLoRA (line 59) | class Conv2dWithLoRA(torch.nn.Module): method __init__ (line 60) | def __init__( method bind_lora (line 91) | def bind_lora(self, weight_module): method unbind_lora (line 94) | def unbind_lora(self): method get_original_weight (line 98) | def get_original_weight(self): method forward (line 103) | def forward(self, x): function controlnet_lora_hijack (line 123) | def controlnet_lora_hijack(): function recursive_set (line 132) | def recursive_set(obj, key, value): function force_load_state_dict (line 142) | def force_load_state_dict(model, state_dict): function recursive_bind_lora (line 149) | def recursive_bind_lora(obj, key, value): function recursive_get (line 161) | def recursive_get(obj, key): function bind_control_lora (line 171) | def bind_control_lora(base_model, control_lora_model): function torch_dfs (line 180) | def torch_dfs(model: torch.nn.Module): function unbind_control_lora (line 187) | def unbind_control_lora(control_lora_model): FILE: scripts/controlnet_model_guess.py function state_dict_key_replace (line 100) | def state_dict_key_replace(state_dict, keys_to_replace): function state_dict_prefix_replace (line 108) | def state_dict_prefix_replace(state_dict, replace_prefix): class ControlModel (line 116) | class ControlModel(NamedTuple): function build_model_by_guess (line 121) | def build_model_by_guess(state_dict, unet, model_path: str) -> ControlMo... FILE: scripts/controlnet_sparsectrl.py class PlugableSparseCtrlModel (line 9) | class PlugableSparseCtrlModel(PlugableControlModel): method __init__ (line 10) | def __init__(self, config, state_dict=None): class CondEmbed (line 19) | class CondEmbed(nn.Module): method __init__ (line 20) | def __init__( method forward (line 41) | def forward(self, conditioning): class SparseCtrl (line 54) | class SparseCtrl(ControlNet): method __init__ (line 55) | def __init__(self, use_simplified_condition_embedding=True, conditioni... method load_state_dict (line 68) | def load_state_dict(self, state_dict, strict=False): method create_cond_mask (line 90) | def create_cond_mask(control_image_index: List[int], control_image_lat... method forward (line 98) | def forward(self, x, hint, timesteps, context, y=None, **kwargs): FILE: scripts/controlnet_ui/advanced_weight_control.py function get_bar_colors (line 19) | def get_bar_colors( function plot_weights (line 35) | def plot_weights( class AdvancedWeightControl (line 67) | class AdvancedWeightControl: method __init__ (line 68) | def __init__(self): method render (line 75) | def render(self): method register_callbacks (line 115) | def register_callbacks( FILE: scripts/controlnet_ui/controlnet_ui_group.py class A1111Context (line 34) | class A1111Context: method img2img_inpaint_tabs (line 61) | def img2img_inpaint_tabs(self) -> Tuple[gr.components.Component]: method img2img_non_inpaint_tabs (line 69) | def img2img_non_inpaint_tabs(self) -> List[gr.components.Component]: method ui_initialized (line 77) | def ui_initialized(self) -> bool: method set_component (line 97) | def set_component(self, component: gr.components.Component): function create_ui_unit (line 131) | def create_ui_unit( class ControlNetUiGroup (line 166) | class ControlNetUiGroup(object): method __init__ (line 194) | def __init__( method render (line 276) | def render(self, tabname: str, elem_id_tabname: str) -> None: method register_send_dimensions (line 717) | def register_send_dimensions(self): method register_webcam_toggle (line 752) | def register_webcam_toggle(self): method register_webcam_mirror_toggle (line 765) | def register_webcam_mirror_toggle(self): method register_refresh_all_models (line 774) | def register_refresh_all_models(self): method register_build_sliders (line 790) | def register_build_sliders(self): method register_union_control_type (line 854) | def register_union_control_type(self): method register_sd_version_changed (line 867) | def register_sd_version_changed(self): method register_run_annotator (line 895) | def register_run_annotator(self): method register_shift_preview (line 1006) | def register_shift_preview(self): method register_create_canvas (line 1034) | def register_create_canvas(self): method register_img2img_same_input (line 1060) | def register_img2img_same_input(self): method register_shift_crop_input_image (line 1083) | def register_shift_crop_input_image(self): method register_shift_hr_options (line 1119) | def register_shift_hr_options(self): method register_shift_upload_mask (line 1131) | def register_shift_upload_mask(self): method register_shift_pulid_mode (line 1145) | def register_shift_pulid_mode(self): method register_sync_batch_dir (line 1153) | def register_sync_batch_dir(self): method register_clear_preview (line 1185) | def register_clear_preview(self): method register_multi_images_upload (line 1218) | def register_multi_images_upload(self): method register_core_callbacks (line 1246) | def register_core_callbacks(self): method register_callbacks (line 1275) | def register_callbacks(self): method register_input_mode_sync (line 1292) | def register_input_mode_sync(ui_groups: List["ControlNetUiGroup"]): method reset (line 1338) | def reset(): method try_register_all_callbacks (line 1343) | def try_register_all_callbacks(): method on_after_component (line 1367) | def on_after_component(component, **_kwargs): FILE: scripts/controlnet_ui/modal.py class ModalInterface (line 5) | class ModalInterface(gr.Interface): method __init__ (line 8) | def __init__( method __call__ (line 22) | def __call__(self): method create_modal (line 25) | def create_modal(self, visible=True): FILE: scripts/controlnet_ui/openpose_editor.py function parse_data_url (line 13) | def parse_data_url(data_url: str): function encode_data_url (line 24) | def encode_data_url(json_string: str) -> str: class OpenposeEditor (line 29) | class OpenposeEditor(object): method __init__ (line 35) | def __init__(self) -> None: method render_edit (line 42) | def render_edit(self): method render_upload (line 66) | def render_upload(self): method register_callbacks (line 77) | def register_callbacks( method outputs (line 123) | def outputs(self) -> List[Any]: method update (line 129) | def update(self, json_string: str) -> List[Dict]: FILE: scripts/controlnet_ui/photopea.py class Photopea (line 121) | class Photopea(object): method __init__ (line 122) | def __init__(self) -> None: method render_editor (line 127) | def render_editor(self): method render_child_trigger (line 146) | def render_child_trigger(self): method attach_photopea_output (line 155) | def attach_photopea_output(self, generated_image: gr.Image): FILE: scripts/enums.py class UnetBlockType (line 7) | class UnetBlockType(Enum): class TransformerID (line 13) | class TransformerID(NamedTuple): class TransformerIDResult (line 24) | class TransformerIDResult(NamedTuple): method get (line 29) | def get(self, idx: int) -> TransformerID: method to_list (line 32) | def to_list(self) -> List[TransformerID]: class StableDiffusionVersion (line 39) | class StableDiffusionVersion(Enum): method detect_from_model_name (line 48) | def detect_from_model_name(model_name: str) -> "StableDiffusionVersion": method encoder_block_num (line 63) | def encoder_block_num(self) -> int: method controlnet_layer_num (line 73) | def controlnet_layer_num(self) -> int: method transformer_block_num (line 77) | def transformer_block_num(self) -> int: method transformer_ids (line 90) | def transformer_ids(self) -> List[TransformerID]: method is_compatible_with (line 149) | def is_compatible_with(self, other: "StableDiffusionVersion") -> bool: class ControlModelType (line 157) | class ControlModelType(Enum): method is_controlnet (line 180) | def is_controlnet(self) -> bool: method allow_context_sharing (line 190) | def allow_context_sharing(self) -> bool: method supports_effective_region_mask (line 203) | def supports_effective_region_mask(self) -> bool: class AutoMachine (line 215) | class AutoMachine(Enum): class HiResFixOption (line 225) | class HiResFixOption(Enum): class InputMode (line 231) | class InputMode(Enum): class PuLIDMode (line 242) | class PuLIDMode(Enum): class ControlMode (line 247) | class ControlMode(Enum): class BatchOption (line 257) | class BatchOption(Enum): class ResizeMode (line 262) | class ResizeMode(Enum): method int_value (line 271) | def int_value(self): class ControlNetUnionControlType (line 281) | class ControlNetUnionControlType(Enum): method all_tags (line 301) | def all_tags() -> List[str]: method from_str (line 318) | def from_str(s: str) -> ControlNetUnionControlType: method int_value (line 340) | def int_value(self) -> int: FILE: scripts/global_state.py function traverse_all_files (line 26) | def traverse_all_files(curr_path, model_list): function get_all_models (line 41) | def get_all_models(sort_by, filter_by, path): function update_cn_models (line 65) | def update_cn_models(): function get_sd_version (line 92) | def get_sd_version() -> StableDiffusionVersion: function select_control_type (line 114) | def select_control_type( FILE: scripts/hook.py function prompt_context_is_marked (line 41) | def prompt_context_is_marked(x): function mark_prompt_context (line 48) | def mark_prompt_context(x, positive): function unmark_prompt_context (line 81) | def unmark_prompt_context(x): class HackedImageRNG (line 115) | class HackedImageRNG: method __init__ (line 116) | def __init__(self, rng, noise_modifier, sd_model): method next (line 121) | def next(self): class TorchHijackForUnet (line 133) | class TorchHijackForUnet: method __getattr__ (line 139) | def __getattr__(self, item): method cat (line 148) | def cat(self, tensors, *args, **kwargs): class ControlParams (line 162) | class ControlParams: method __init__ (line 163) | def __init__( method hint_cond (line 207) | def hint_cond(self): method hint_cond (line 215) | def hint_cond(self, new_hint_cond): method disabled_by_hr_option (line 221) | def disabled_by_hr_option(self, is_in_high_res_fix: bool) -> bool: method apply_effective_region_mask (line 232) | def apply_effective_region_mask(self, out: torch.Tensor) -> torch.Tensor: function aligned_adding (line 245) | def aligned_adding(base, x, require_channel_alignment): function torch_dfs (line 269) | def torch_dfs(model: torch.nn.Module): class AbstractLowScaleModel (line 276) | class AbstractLowScaleModel(nn.Module): method __init__ (line 277) | def __init__(self): method register_schedule (line 281) | def register_schedule(self, beta_schedule="linear", timesteps=1000, method q_sample (line 308) | def q_sample(self, x_start, t, noise=None): function register_schedule (line 315) | def register_schedule(self): function predict_q_sample (line 338) | def predict_q_sample(ldm, x_start, t, noise=None): function predict_start_from_noise (line 344) | def predict_start_from_noise(ldm, x_t, t, noise): function predict_noise_from_start (line 348) | def predict_noise_from_start(ldm, x_t, t, x0): function blur (line 352) | def blur(x, k): class TorchCache (line 358) | class TorchCache: method __init__ (line 359) | def __init__(self): method hash (line 362) | def hash(self, key): method get (line 369) | def get(self, key): method set (line 373) | def set(self, key, value): class UnetHook (line 377) | class UnetHook(nn.Module): method __init__ (line 378) | def __init__(self, lowvram=False) -> None: method call_vae_using_process (line 394) | def call_vae_using_process(p, x, batch_size=None, mask=None): method guidance_schedule_handler (line 439) | def guidance_schedule_handler(self, x): method hook (line 449) | def hook(self, model, sd_ldm, control_params: List[ControlParams], pro... method restore (line 1067) | def restore(self): FILE: scripts/infotext.py class Infotext (line 11) | class Infotext(object): method __init__ (line 12) | def __init__(self) -> None: method unit_prefix (line 17) | def unit_prefix(unit_index: int) -> str: method register_unit (line 20) | def register_unit(self, unit_index: int, uigroup) -> None: method write_infotext (line 39) | def write_infotext(units: List[ControlNetUnit], p: StableDiffusionProc... method on_infotext_pasted (line 50) | def on_infotext_pasted(infotext: str, results: dict) -> None: FILE: scripts/ipadapter/image_proj_models.py class MLPProjModel (line 7) | class MLPProjModel(torch.nn.Module): method __init__ (line 8) | def __init__(self, cross_attention_dim=1024, clip_embeddings_dim=1024): method forward (line 18) | def forward(self, image_embeds): class MLPProjModelFaceId (line 23) | class MLPProjModelFaceId(torch.nn.Module): method __init__ (line 28) | def __init__(self, cross_attention_dim=768, id_embeddings_dim=512, num... method forward (line 41) | def forward(self, id_embeds): class FacePerceiverResampler (line 50) | class FacePerceiverResampler(torch.nn.Module): method __init__ (line 53) | def __init__( method forward (line 80) | def forward(self, latents, x): class ProjModelFaceIdPlus (line 89) | class ProjModelFaceIdPlus(torch.nn.Module): method __init__ (line 92) | def __init__( method forward (line 121) | def forward(self, id_embeds, clip_embeds, scale=1.0, shortcut=False): class ImageProjModel (line 131) | class ImageProjModel(torch.nn.Module): method __init__ (line 134) | def __init__( method forward (line 149) | def forward(self, image_embeds): function FeedForward (line 158) | def FeedForward(dim, mult=4): function reshape_tensor (line 168) | def reshape_tensor(x, heads): class PerceiverAttention (line 179) | class PerceiverAttention(nn.Module): method __init__ (line 180) | def __init__(self, *, dim, dim_head=64, heads=8): method forward (line 194) | def forward(self, x, latents): class Resampler (line 228) | class Resampler(nn.Module): method __init__ (line 229) | def __init__( method forward (line 260) | def forward(self, x): class PuLIDEncoder (line 274) | class PuLIDEncoder(nn.Module): method __init__ (line 275) | def __init__(self, width=1280, context_dim=2048, num_token=5): method forward (line 320) | def forward(self, x, y): FILE: scripts/ipadapter/ipadapter_model.py class ImageEmbed (line 19) | class ImageEmbed(NamedTuple): method eval (line 25) | def eval(self, cond_mark: torch.Tensor) -> torch.Tensor: method average_of (line 42) | def average_of(*args: List[Tuple[torch.Tensor, torch.Tensor]]) -> "Ima... class To_KV (line 51) | class To_KV(torch.nn.Module): method __init__ (line 52) | def __init__(self, state_dict): class IPAdapterModel (line 62) | class IPAdapterModel(torch.nn.Module): method __init__ (line 63) | def __init__( method init_proj_faceid (line 131) | def init_proj_faceid(self): method init_proj_instantid (line 147) | def init_proj_instantid(self, image_emb_dim=512, num_tokens=16): method _get_image_embeds (line 161) | def _get_image_embeds( method _get_image_embeds_faceid_plus (line 192) | def _get_image_embeds_faceid_plus( method _get_image_embeds_faceid (line 214) | def _get_image_embeds_faceid(self, insightface_output: torch.Tensor) -... method _get_image_embeds_instantid (line 224) | def _get_image_embeds_instantid( method _get_image_embeds_pulid (line 243) | def _get_image_embeds_pulid(self, pulid_proj_input) -> ImageEmbed: method load (line 272) | def load(state_dict: dict, model_name: str) -> IPAdapterModel: method get_image_emb (line 331) | def get_image_emb(self, preprocessor_output) -> ImageEmbed: FILE: scripts/ipadapter/plugable_ipadapter.py function get_block (line 11) | def get_block(model, flag): function attn_forward_hacked (line 19) | def attn_forward_hacked(self, x, context=None, **kwargs): function hack_blk (line 57) | def hack_blk(block, function, type): function set_model_attn2_replace (line 69) | def set_model_attn2_replace( function clear_all_ip_adapter (line 84) | def clear_all_ip_adapter(): class PlugableIPAdapter (line 94) | class PlugableIPAdapter(torch.nn.Module): method __init__ (line 95) | def __init__(self, ipadapter: IPAdapterModel): method reset (line 109) | def reset(self): method hook (line 113) | def hook( method weight_on_transformer (line 169) | def weight_on_transformer(self, transformer_index: int) -> float: method call_ip (line 176) | def call_ip(self, key: str, feat, device): method apply_effective_region_mask (line 184) | def apply_effective_region_mask(self, out: torch.Tensor) -> torch.Tensor: method attn_eval (line 208) | def attn_eval( method _attn_eval_ipadapter (line 240) | def _attn_eval_ipadapter( method patch_forward (line 274) | def patch_forward(self, number: int, transformer_index: int): FILE: scripts/ipadapter/presets.py class IPAdapterPreset (line 7) | class IPAdapterPreset(NamedTuple): method match_model (line 17) | def match_model(model_name: str) -> IPAdapterPreset: FILE: scripts/ipadapter/pulid_attn.py class PuLIDAttnSetting (line 8) | class PuLIDAttnSetting: method eval (line 13) | def eval( FILE: scripts/ipadapter/weight.py function calc_weights (line 6) | def calc_weights( function _calc_weight (line 25) | def _calc_weight( FILE: scripts/logging.py class ColoredFormatter (line 8) | class ColoredFormatter(logging.Formatter): method format (line 18) | def format(self, record): FILE: scripts/lvminthin.py function remove_pattern (line 51) | def remove_pattern(x, kernel): function thin_one_time (line 58) | def thin_one_time(x, kernels): function lvmin_thin (line 68) | def lvmin_thin(x, prunings=True): function nake_nms (line 79) | def nake_nms(x): FILE: scripts/movie2movie.py function get_all_frames (line 19) | def get_all_frames(video_path): function get_min_frame_num (line 33) | def get_min_frame_num(video_list): function pil2cv (line 47) | def pil2cv(image): function save_gif (line 58) | def save_gif(path, image_list, name, duration): class Script (line 71) | class Script(scripts.Script): method title (line 73) | def title(self): method show (line 76) | def show(self, is_img2img): method ui (line 79) | def ui(self, is_img2img): method run (line 104) | def run(self, p, *args): FILE: scripts/preprocessor/inpaint.py class PreprocessorInpaint (line 5) | class PreprocessorInpaint(Preprocessor): method __init__ (line 6) | def __init__(self): method __call__ (line 15) | def __call__( class PreprocessorInpaintOnly (line 30) | class PreprocessorInpaintOnly(Preprocessor): method __init__ (line 31) | def __init__(self): method __call__ (line 39) | def __call__( FILE: scripts/preprocessor/ip_adapter_auto.py class PreprocessorIPAdapterAuto (line 6) | class PreprocessorIPAdapterAuto(Preprocessor): method __init__ (line 7) | def __init__(self): method get_preprocessor_by_model (line 15) | def get_preprocessor_by_model(model): method __call__ (line 19) | def __call__(self, *args, **kwargs): FILE: scripts/preprocessor/lama_inpaint.py class PreprocessorLamaInpaint (line 8) | class PreprocessorLamaInpaint(Preprocessor): method __init__ (line 9) | def __init__(self): method __call__ (line 18) | def __call__( FILE: scripts/preprocessor/legacy/legacy_preprocessors.py class LegacyPreprocessor (line 36) | class LegacyPreprocessor(Preprocessor): method __init__ (line 37) | def __init__(self, name: str, legacy_dict): method unload (line 86) | def unload(self): method __call__ (line 93) | def __call__( FILE: scripts/preprocessor/legacy/processor.py function torch_handler (line 16) | def torch_handler(module: str, name: str): function pad64 (line 25) | def pad64(x): function safer_memory (line 29) | def safer_memory(x): function resize_image_with_pad (line 34) | def resize_image_with_pad(input_image, resolution, skip_hwc3=False): function canny (line 54) | def canny(img, res=512, thr_a=100, thr_b=200, **kwargs): function scribble_xdog (line 60) | def scribble_xdog(img, res=512, thr_a=32, **kwargs): function tile_resample (line 70) | def tile_resample(img, res=512, thr_a=1.0, **kwargs): function threshold (line 81) | def threshold(img, res=512, thr_a=127, **kwargs): function identity (line 88) | def identity(img, **kwargs): function invert (line 92) | def invert(img, res=512, **kwargs): function hed (line 99) | def hed(img, res=512, **kwargs): function hed_safe (line 109) | def hed_safe(img, res=512, **kwargs): function unload_hed (line 119) | def unload_hed(): function scribble_hed (line 126) | def scribble_hed(img, res=512, **kwargs): function mediapipe_face (line 140) | def mediapipe_face(img, res=512, thr_a: int = 10, thr_b: float = 0.5, **... function mlsd (line 155) | def mlsd(img, res=512, thr_a=0.1, thr_b=0.1, **kwargs): function unload_mlsd (line 166) | def unload_mlsd(): function depth_anything (line 176) | def depth_anything(img, res:int = 512, colored:bool = True, **kwargs): function unload_depth_anything (line 187) | def unload_depth_anything(): function depth_anything_v2 (line 195) | def depth_anything_v2(img, res:int = 512, colored:bool = True, **kwargs): function unload_depth_anything_v2 (line 206) | def unload_depth_anything_v2(): function midas (line 214) | def midas(img, res=512, a=np.pi * 2.0, **kwargs): function midas_normal (line 224) | def midas_normal(img, res=512, a=np.pi * 2.0, thr_a=0.4, **kwargs): # b... function unload_midas (line 235) | def unload_midas(): function leres (line 245) | def leres(img, res=512, a=np.pi * 2.0, thr_a=0, thr_b=0, boost=False, **... function unload_leres (line 255) | def unload_leres(): class OpenposeModel (line 262) | class OpenposeModel(object): method __init__ (line 263) | def __init__(self) -> None: method run_model (line 266) | def run_model( method unload (line 303) | def unload(self): function uniformer (line 313) | def uniformer(img, res=512, **kwargs): function unload_uniformer (line 323) | def unload_uniformer(): function pidinet (line 333) | def pidinet(img, res=512, **kwargs): function pidinet_ts (line 343) | def pidinet_ts(img, res=512, **kwargs): function pidinet_safe (line 353) | def pidinet_safe(img, res=512, **kwargs): function scribble_pidinet (line 363) | def scribble_pidinet(img, res=512, **kwargs): function unload_pidinet (line 374) | def unload_pidinet(): function clip (line 388) | def clip(img, res=512, config='clip_vitl', low_vram=False, **kwargs): function unload_clip (line 399) | def unload_clip(config='clip_vitl'): function color (line 409) | def color(img, res=512, **kwargs): function lineart_standard (line 419) | def lineart_standard(img, res=512, **kwargs): function lineart (line 433) | def lineart(img, res=512, **kwargs): function unload_lineart (line 445) | def unload_lineart(): function lineart_coarse (line 454) | def lineart_coarse(img, res=512, **kwargs): function unload_lineart_coarse (line 466) | def unload_lineart_coarse(): function lineart_anime (line 475) | def lineart_anime(img, res=512, **kwargs): function unload_lineart_anime (line 487) | def unload_lineart_anime(): function lineart_anime_denoise (line 496) | def lineart_anime_denoise(img, res=512, **kwargs): function unload_lineart_anime_denoise (line 508) | def unload_lineart_anime_denoise(): function zoe_depth (line 517) | def zoe_depth(img, res=512, **kwargs): function unload_zoe_depth (line 527) | def unload_zoe_depth(): function normal_bae (line 536) | def normal_bae(img, res=512, **kwargs): function unload_normal_bae (line 546) | def unload_normal_bae(): function oneformer_coco (line 555) | def oneformer_coco(img, res=512, **kwargs): function unload_oneformer_coco (line 565) | def unload_oneformer_coco(): function oneformer_ade20k (line 574) | def oneformer_ade20k(img, res=512, **kwargs): function unload_oneformer_ade20k (line 584) | def unload_oneformer_ade20k(): function recolor_luminance (line 590) | def recolor_luminance(img, res=512, thr_a=1.0, **kwargs): function recolor_intensity (line 599) | def recolor_intensity(img, res=512, thr_a=1.0, **kwargs): function blur_gaussian (line 608) | def blur_gaussian(img, res=512, thr_a=1.0, **kwargs): function anime_face_segment (line 618) | def anime_face_segment(img, res=512, **kwargs): function unload_anime_face_segment (line 629) | def unload_anime_face_segment(): function densepose (line 636) | def densepose(img, res=512, cmap="viridis", **kwargs): function unload_densepose (line 643) | def unload_densepose(): class InsightFaceModel (line 647) | class InsightFaceModel: method __init__ (line 648) | def __init__(self, face_analysis_model_name: str = "buffalo_l"): method pick_largest_face (line 654) | def pick_largest_face(faces): method install_antelopev2 (line 664) | def install_antelopev2(self): method load_model (line 684) | def load_model(self): method run_model (line 695) | def run_model(self, img: np.ndarray, **kwargs) -> Tuple[torch.Tensor, ... method run_model_instant_id (line 702) | def run_model_instant_id( class FaceIdPlusInput (line 761) | class FaceIdPlusInput: function face_id_plus (line 766) | def face_id_plus(img, low_vram=False, **kwargs): class HandRefinerModel (line 773) | class HandRefinerModel: method __init__ (line 774) | def __init__(self): method load_model (line 778) | def load_model(self): method unload (line 791) | def unload(self): method run_model (line 795) | def run_model(self, img, res=512, **kwargs): FILE: scripts/preprocessor/mobile_sam.py class PreprocessorMobileSam (line 4) | class PreprocessorMobileSam(Preprocessor): method __init__ (line 5) | def __init__(self): method __call__ (line 10) | def __call__( FILE: scripts/preprocessor/model_free_preprocessors.py class PreprocessorNone (line 11) | class PreprocessorNone(Preprocessor): method __init__ (line 12) | def __init__(self): method __call__ (line 17) | def __call__( class PreprocessorCanny (line 30) | class PreprocessorCanny(Preprocessor): method __init__ (line 31) | def __init__(self): method __call__ (line 51) | def __call__( class PreprocessorInvert (line 67) | class PreprocessorInvert(Preprocessor): method __init__ (line 68) | def __init__(self): method __call__ (line 80) | def __call__( class PreprocessorBlurGaussian (line 92) | class PreprocessorBlurGaussian(Preprocessor): method __init__ (line 93) | def __init__(self): method __call__ (line 100) | def __call__( class PreprocessorScribbleXdog (line 116) | class PreprocessorScribbleXdog(Preprocessor): method __init__ (line 117) | def __init__(self): method __call__ (line 127) | def __call__( class PreprocessorShuffle (line 146) | class PreprocessorShuffle(Preprocessor): method __init__ (line 147) | def __init__(self): method _cached_call (line 154) | def _cached_call(self, *args, **kwargs): method __call__ (line 158) | def __call__( FILE: scripts/preprocessor/normal_dsine.py class PreprocessorNormalDsine (line 4) | class PreprocessorNormalDsine(Preprocessor): method __init__ (line 5) | def __init__(self): method __call__ (line 24) | def __call__( FILE: scripts/preprocessor/pulid.py function to_gray (line 17) | def to_gray(img): class PreprocessorFaceXLib (line 23) | class PreprocessorFaceXLib(Preprocessor): method __init__ (line 24) | def __init__(self): method load_model (line 30) | def load_model(self): method unload (line 47) | def unload(self) -> bool: method __call__ (line 55) | def __call__( class PuLIDProjInput (line 100) | class PuLIDProjInput: class PreprocessorPuLID (line 106) | class PreprocessorPuLID(Preprocessor): method __init__ (line 109) | def __init__(self): method facexlib_detect (line 120) | def facexlib_detect(self, input_image: np.ndarray) -> torch.Tensor: method insightface_antelopev2_detect (line 124) | def insightface_antelopev2_detect(self, input_image: np.ndarray) -> to... method unload (line 130) | def unload(self) -> bool: method __call__ (line 138) | def __call__( FILE: scripts/preprocessor/teed.py class PreprocessorTEED (line 10) | class PreprocessorTEED(Preprocessor): method __init__ (line 11) | def __init__(self): method __call__ (line 23) | def __call__( function get_intensity_mask (line 40) | def get_intensity_mask(image_array, lower_bound, upper_bound): function combine_layers (line 47) | def combine_layers(base_layer, top_layer): class PreprocessorAnyline (line 54) | class PreprocessorAnyline(Preprocessor): method __init__ (line 55) | def __init__(self): method __call__ (line 76) | def __call__( FILE: scripts/supported_preprocessor.py class PreprocessorParameter (line 17) | class PreprocessorParameter: method gradio_update_kwargs (line 38) | def gradio_update_kwargs(self) -> dict: method api_json (line 49) | def api_json(self) -> dict: class Preprocessor (line 60) | class Preprocessor(ABC): method label (line 112) | def label(self) -> str: method add_supported_preprocessor (line 117) | def add_supported_preprocessor(cls, p: "Preprocessor"): method get_preprocessor (line 127) | def get_preprocessor(cls, name: str) -> Optional["Preprocessor"]: method get_sorted_preprocessors (line 131) | def get_sorted_preprocessors(cls) -> List["Preprocessor"]: method get_all_preprocessor_tags (line 140) | def get_all_preprocessor_tags(cls): method get_filtered_preprocessors (line 147) | def get_filtered_preprocessors(cls, tag: str) -> List["Preprocessor"]: method get_default_preprocessor (line 157) | def get_default_preprocessor(cls, tag: str) -> "Preprocessor": method tag_to_filters (line 163) | def tag_to_filters(cls, tag: str) -> Set[str]: method unload_unused (line 181) | def unload_unused(cls, active_processors: Set["Preprocessor"]): class Result (line 191) | class Result(NamedTuple): method cached_call (line 196) | def cached_call(self, input_image, *args, **kwargs) -> "Preprocessor.R... method _cached_call (line 208) | def _cached_call(self, *args, **kwargs): method __hash__ (line 213) | def __hash__(self): method __eq__ (line 216) | def __eq__(self, other): method __call__ (line 220) | def __call__( method unload (line 232) | def unload(self): FILE: scripts/utils.py function load_state_dict (line 18) | def load_state_dict(ckpt_path, location="cpu"): function get_state_dict (line 29) | def get_state_dict(d): function ndarray_lru_cache (line 33) | def ndarray_lru_cache(max_size: int = 128, typed: bool = False): function timer_decorator (line 89) | def timer_decorator(func): class TimeMeta (line 108) | class TimeMeta(type): method __new__ (line 112) | def __new__(cls, name, bases, attrs): function svg_preprocess (line 131) | def svg_preprocess(inputs: Dict, preprocess: Callable): function get_unique_axis0 (line 148) | def get_unique_axis0(data): function read_image (line 158) | def read_image(img_path: str) -> str: function read_image_dir (line 166) | def read_image_dir( function align_dim_latent (line 181) | def align_dim_latent(x: int) -> int: function pad64 (line 188) | def pad64(x): function safer_memory (line 192) | def safer_memory(x): function resize_image_with_pad (line 197) | def resize_image_with_pad(img: np.ndarray, resolution: int): function npimg2tensor (line 218) | def npimg2tensor(img: np.ndarray) -> torch.Tensor: function tensor2npimg (line 223) | def tensor2npimg(t: torch.Tensor) -> np.ndarray: function visualize_inpaint_mask (line 233) | def visualize_inpaint_mask(img): FILE: scripts/xyz_grid_support.py function debug_info (line 20) | def debug_info(func): function find_dict (line 28) | def find_dict(dict_list, keyword, search_key="name", stop=False): function flatten (line 36) | def flatten(lst): function is_all_included (line 46) | def is_all_included(target_list, check_list, allow_blank=False, stop=Fal... class ListParser (line 58) | class ListParser(): method __init__ (line 85) | def __init__(self, my_list, converter=None, allow_blank=True, exclude_... method compile_regex (line 100) | def compile_regex(self): method auto_normalize (line 127) | def auto_normalize(self): method has_list_notation (line 139) | def has_list_notation(self): method numeric_range_parser (line 142) | def numeric_range_parser(self, my_list=None, depth=0): method type_convert (line 169) | def type_convert(self, my_list=None): method fix_structure (line 182) | def fix_structure(self): method fill_to_longest (line 206) | def fill_to_longest(self, my_list=None, value=None, index=None): method sublist_exists (line 217) | def sublist_exists(self, my_list=None): method all_sublists (line 221) | def all_sublists(self, my_list=None): # Unused method method get_list (line 225) | def get_list(self): # Unused method method _search_bracket (line 234) | def _search_bracket(self, string, bracket="[", replace=None): method _numeric_range_to_list (line 251) | def _numeric_range_to_list(self, string): method _transpose (line 279) | def _transpose(self, my_list=None): function find_module (line 313) | def find_module(module_names): function add_axis_options (line 320) | def add_axis_options(xyz_grid): function run (line 442) | def run(): FILE: tests/annotator_tests/openpose_tests/body_test.py class TestFormatBodyResult (line 10) | class TestFormatBodyResult(unittest.TestCase): method setUp (line 11) | def setUp(self): method test_format_body_result (line 24) | def test_format_body_result(self): FILE: tests/annotator_tests/openpose_tests/detection_test.py class TestFaceDetect (line 11) | class TestFaceDetect(unittest.TestCase): method test_no_faces (line 12) | def test_no_faces(self): method test_single_face (line 20) | def test_single_face(self): class TestHandDetect (line 37) | class TestHandDetect(unittest.TestCase): method test_no_hands (line 38) | def test_no_hands(self): method test_single_left_hand (line 46) | def test_single_left_hand(self): method test_single_right_hand (line 65) | def test_single_right_hand(self): method test_multiple_hands (line 84) | def test_multiple_hands(self): FILE: tests/annotator_tests/openpose_tests/json_encode_test.py class TestEncodePosesAsJson (line 11) | class TestEncodePosesAsJson(unittest.TestCase): method test_empty_list (line 12) | def test_empty_list(self): method test_single_pose_no_keypoints (line 25) | def test_single_pose_no_keypoints(self): method test_single_pose_with_keypoints (line 45) | def test_single_pose_with_keypoints(self): FILE: tests/annotator_tests/openpose_tests/openpose_e2e_test_disabled.py class TestOpenposeDetector (line 20) | class TestOpenposeDetector(unittest.TestCase): method setUp (line 22) | def setUp(self) -> None: method tearDown (line 26) | def tearDown(self) -> None: method expect_same_image (line 29) | def expect_same_image(self, img1, img2, diff_img_path: str): method template (line 46) | def template(self, test_image: str, expected_image: str, detector_conf... method test_body (line 57) | def test_body(self): method test_hand (line 65) | def test_hand(self): method test_face (line 77) | def test_face(self): method test_all (line 89) | def test_all(self): method test_dw (line 101) | def test_dw(self): FILE: tests/cn_script/batch_hijack_test.py function create_unit (line 18) | def create_unit(**kwargs) -> ControlNetUnit: class TestBatchHijack (line 22) | class TestBatchHijack(unittest.TestCase): method setUp (line 24) | def setUp(self, on_script_unloaded_mock): method tearDown (line 30) | def tearDown(self): method test_do_hijack__registers_on_script_unloaded (line 33) | def test_do_hijack__registers_on_script_unloaded(self): method test_do_hijack__call_once__hijacks_once (line 36) | def test_do_hijack__call_once__hijacks_once(self): method test_do_hijack__multiple_times__hijacks_once (line 41) | def test_do_hijack__multiple_times__hijacks_once(self, process_images_... class TestGetControlNetBatchesWorks (line 48) | class TestGetControlNetBatchesWorks(unittest.TestCase): method setUp (line 49) | def setUp(self): method tearDown (line 57) | def tearDown(self): method assert_get_cn_batches_works (line 60) | def assert_get_cn_batches_works(self, batch_images_list): method test_get_cn_batches__empty (line 85) | def test_get_cn_batches__empty(self): method test_get_cn_batches__1_simple (line 90) | def test_get_cn_batches__1_simple(self): method test_get_cn_batches__2_simples (line 96) | def test_get_cn_batches__2_simples(self): method test_get_cn_batches__1_batch (line 106) | def test_get_cn_batches__1_batch(self): method test_get_cn_batches__2_batches (line 123) | def test_get_cn_batches__2_batches(self): method test_get_cn_batches__2_mixed (line 151) | def test_get_cn_batches__2_mixed(self): method test_get_cn_batches__3_mixed (line 173) | def test_get_cn_batches__3_mixed(self): class TestProcessImagesPatchWorks (line 207) | class TestProcessImagesPatchWorks(unittest.TestCase): method setUp (line 209) | def setUp(self, on_script_unloaded_mock): method tearDown (line 230) | def tearDown(self): method assert_process_images_hijack_called (line 236) | def assert_process_images_hijack_called(self, process_images_mock, bat... method test_process_images_no_units_forwards (line 255) | def test_process_images_no_units_forwards(self): method test_process_images__only_simple_units__forwards (line 258) | def test_process_images__only_simple_units__forwards(self): method test_process_images__1_batch_1_unit__runs_1_batch (line 265) | def test_process_images__1_batch_1_unit__runs_1_batch(self): method test_process_images__2_batches_1_unit__runs_2_batches (line 276) | def test_process_images__2_batches_1_unit__runs_2_batches(self): method test_process_images__8_batches_1_unit__runs_8_batches (line 288) | def test_process_images__8_batches_1_unit__runs_8_batches(self): method test_process_images__1_batch_2_units__runs_1_batch (line 298) | def test_process_images__1_batch_2_units__runs_1_batch(self): method test_process_images__2_batches_2_units__runs_2_batches (line 311) | def test_process_images__2_batches_2_units__runs_2_batches(self): method test_process_images__3_batches_2_mixed_units__runs_3_batches (line 330) | def test_process_images__3_batches_2_mixed_units__runs_3_batches(self): function get_dummy_image (line 348) | def get_dummy_image(name: Any = 0): FILE: tests/cn_script/cn_script_test.py class TestPrepareMask (line 16) | class TestPrepareMask(unittest.TestCase): method test_prepare_mask (line 17) | def test_prepare_mask(self): class TestSetNumpySeed (line 52) | class TestSetNumpySeed(unittest.TestCase): method test_seed_subseed_minus_one (line 53) | def test_seed_subseed_minus_one(self): method test_valid_seed_subseed (line 61) | def test_valid_seed_subseed(self): method test_invalid_seed_subseed (line 69) | def test_invalid_seed_subseed(self): method test_empty_all_seeds (line 76) | def test_empty_all_seeds(self): method test_random_state_change (line 83) | def test_random_state_change(self): class MockImg2ImgProcessing (line 101) | class MockImg2ImgProcessing(processing.StableDiffusionProcessing): method __init__ (line 105) | def __init__(self, init_images, resize_mode, *args, **kwargs): class TestScript (line 111) | class TestScript(unittest.TestCase): method test_choose_input_image (line 123) | def test_choose_input_image(self): FILE: tests/cn_script/utils_test.py class TestNumpyLruCache (line 10) | class TestNumpyLruCache(unittest.TestCase): method setUp (line 12) | def setUp(self): method add_one (line 17) | def add_one(self, arr): method test_same_array (line 20) | def test_same_array(self): method test_different_array_same_data (line 28) | def test_different_array_same_data(self): method test_cache_size (line 36) | def test_cache_size(self): method test_large_array (line 52) | def test_large_array(self): class TestUniqueFunctions (line 64) | class TestUniqueFunctions(unittest.TestCase): method test_get_unique_axis0 (line 65) | def test_get_unique_axis0(self): FILE: tests/conftest.py function pytest_configure (line 4) | def pytest_configure(config): FILE: tests/external_code_api/external_code_test.py class TestExternalCodeWorking (line 17) | class TestExternalCodeWorking(unittest.TestCase): method setUp (line 21) | def setUp(self): method tearDown (line 36) | def tearDown(self): method get_expected_args_to (line 39) | def get_expected_args_to(self): method assert_update_in_place_ok (line 43) | def assert_update_in_place_ok(self): method test_empty_resizes_min_args (line 47) | def test_empty_resizes_min_args(self): method test_empty_resizes_extra_args (line 51) | def test_empty_resizes_extra_args(self): class TestPixelPerfectResolution (line 57) | class TestPixelPerfectResolution(unittest.TestCase): method test_outer_fit (line 58) | def test_outer_fit(self): method test_inner_fit (line 66) | def test_inner_fit(self): FILE: tests/utils.py function readImage (line 30) | def readImage(path): function get_model (line 37) | def get_model(model_name: str, sd_version: StableDiffusionVersion = Stab... function get_modules (line 62) | def get_modules(): function detect (line 66) | def detect(json): FILE: tests/web_api/clip_mask_test.py function test_clip_mask_txt2img_control (line 11) | def test_clip_mask_txt2img_control(): function test_clip_mask_txt2img_experiment (line 26) | def test_clip_mask_txt2img_experiment(): function test_clip_mask_img2img (line 42) | def test_clip_mask_img2img(): FILE: tests/web_api/detect_test.py function get_modules (line 18) | def get_modules() -> List[str]: function detect_template (line 24) | def detect_template(payload, output_name: str, status: int = 200): function test_detect_all_modules (line 76) | def test_detect_all_modules(module: str): function test_inpaint_mask (line 86) | def test_inpaint_mask(module: str): function test_pulid (line 97) | def test_pulid(img_index: int): function test_unsupported_modules (line 107) | def test_unsupported_modules(module: str): function test_mask_error (line 116) | def test_mask_error(module: str): function test_detect_simple (line 124) | def test_detect_simple(): function test_detect_multiple_inputs (line 134) | def test_detect_multiple_inputs(): function test_detect_with_invalid_module (line 144) | def test_detect_with_invalid_module(): function test_detect_with_no_input_images (line 148) | def test_detect_with_no_input_images(): function test_detect_default_param (line 152) | def test_detect_default_param(): FILE: tests/web_api/effective_region_test.py function test_effective_region_ipadapter (line 14) | def test_effective_region_ipadapter(): function test_effective_region_depth (line 42) | def test_effective_region_depth(): FILE: tests/web_api/full_coverage/depth_test.py class TestDepthFullCoverage (line 33) | class TestDepthFullCoverage(unittest.TestCase): method setUp (line 34) | def setUp(self): method test_depth (line 41) | def test_depth(self): FILE: tests/web_api/full_coverage/inpaint_test.py class TestInpaintFullCoverage (line 12) | class TestInpaintFullCoverage(unittest.TestCase): method setUp (line 13) | def setUp(self): method test_inpaint (line 17) | def test_inpaint(self): method test_inpaint_no_mask (line 76) | def test_inpaint_no_mask(self): method test_inpaint_double_mask (line 104) | def test_inpaint_double_mask(self): method test_img2img_mask_on_unit (line 126) | def test_img2img_mask_on_unit(self): method test_outpaint_without_mask (line 146) | def test_outpaint_without_mask(self): method test_inpaint_crop (line 183) | def test_inpaint_crop(self): FILE: tests/web_api/full_coverage/ipadapter_test.py class AdapterSetting (line 16) | class AdapterSetting(NamedTuple): method lora_prompt (line 22) | def lora_prompt(self) -> str: class TestIPAdapterFullCoverage (line 76) | class TestIPAdapterFullCoverage(unittest.TestCase): method setUp (line 77) | def setUp(self): method test_adapter (line 96) | def test_adapter(self): method test_adapter_multi_inputs (line 123) | def test_adapter_multi_inputs(self): method test_adapter_real_multi_inputs (line 152) | def test_adapter_real_multi_inputs(self): class TestIPAdapterFaceIdFullCoverage (line 206) | class TestIPAdapterFaceIdFullCoverage(unittest.TestCase): method setUp (line 207) | def setUp(self): method test_face_id (line 221) | def test_face_id(self): method test_face_id_multi_inputs (line 248) | def test_face_id_multi_inputs(self): method test_face_id_real_multi_inputs (line 277) | def test_face_id_real_multi_inputs(self): FILE: tests/web_api/full_coverage/template.py function read_image (line 24) | def read_image(img_path: Path) -> str: function read_image_dir (line 31) | def read_image_dir(img_dir: Path, suffixes=('.png', '.jpg', '.jpeg', '.w... class StableDiffusionVersion (line 61) | class StableDiffusionVersion(Enum): class APITestTemplate (line 77) | class APITestTemplate: method __init__ (line 80) | def __init__( method exec (line 106) | def exec(self, result_only: bool = True) -> bool: function expect_same_image (line 152) | def expect_same_image(img1, img2, diff_img_path: str) -> bool: FILE: tests/web_api/generation_test.py function test_no_unit (line 15) | def test_no_unit(gen_type): function test_unrecognized_param (line 26) | def test_unrecognized_param(gen_type): function test_multiple_iter (line 40) | def test_multiple_iter(gen_type): function test_batch_size (line 51) | def test_batch_size(gen_type): function test_2_units (line 62) | def test_2_units(gen_type): function test_preprocessor (line 73) | def test_preprocessor(gen_type): function test_invalid_param (line 85) | def test_invalid_param(gen_type, param_name): function test_save_map (line 104) | def test_save_map(gen_type, save_map): function test_ip_adapter_face (line 114) | def test_ip_adapter_face(): function test_ip_adapter_fullface (line 127) | def test_ip_adapter_fullface(): function test_control_lora (line 140) | def test_control_lora(): function test_t2i_adapter (line 153) | def test_t2i_adapter(): function test_reference (line 166) | def test_reference(): function test_advanced_weighting (line 179) | def test_advanced_weighting(): function test_hr_option (line 189) | def test_hr_option(): function test_hr_option_default (line 202) | def test_hr_option_default(): function test_masked_controlnet_txt2img (line 214) | def test_masked_controlnet_txt2img(): function test_masked_controlnet_img2img (line 227) | def test_masked_controlnet_img2img(): function test_txt2img_inpaint (line 245) | def test_txt2img_inpaint(): function test_img2img_inpaint (line 260) | def test_img2img_inpaint(): function test_lama_outpaint (line 276) | def test_lama_outpaint(): function test_ip_adapter_auto (line 295) | def test_ip_adapter_auto(): function test_pulid (line 313) | def test_pulid(img_index: int): FILE: tests/web_api/ipadapter_advanced_weighting.py function test_ipadapter_advanced_weighting (line 10) | def test_ipadapter_advanced_weighting(): FILE: tests/web_api/ipadapter_clip_api.py function detect_template (line 13) | def detect_template(payload, status: int = 200): function test_ipadapter_clip_api (line 27) | def test_ipadapter_clip_api(): function test_ipadapter_clip_api_mask (line 48) | def test_ipadapter_clip_api_mask(): FILE: tests/web_api/modules_test.py function test_module_list (line 152) | def test_module_list(alias): function test_control_types (line 177) | def test_control_types(): FILE: tests/web_api/render_openpose_json.py function render (line 10) | def render(poses): class TestDetectEndpointWorking (line 24) | class TestDetectEndpointWorking(unittest.TestCase): method test_render_single (line 25) | def test_render_single(self): method test_render_multiple (line 30) | def test_render_multiple(self): method test_render_no_pose (line 35) | def test_render_no_pose(self): method test_render_invalid_pose (line 39) | def test_render_invalid_pose(self): method test_render_animals (line 44) | def test_render_animals(self): FILE: tests/web_api/template.py function disable_in_cq (line 18) | def disable_in_cq(func): function get_dest_dir (line 39) | def get_dest_dir(): function save_base64 (line 46) | def save_base64(base64img: str, dest: Path): function read_image (line 50) | def read_image(img_path: Path) -> str: function read_image_dir (line 57) | def read_image_dir( class StableDiffusionVersion (line 93) | class StableDiffusionVersion(Enum): class APITestTemplate (line 109) | class APITestTemplate: method __init__ (line 114) | def __init__( method exec (line 159) | def exec(self, *args, **kwargs) -> bool: method exec_cq (line 165) | def exec_cq( method exec_local (line 191) | def exec_local(self, result_only: bool = True, *args, **kwargs) -> bool: function expect_same_image (line 233) | def expect_same_image(img1, img2, diff_img_path: str) -> bool: function console_log_context (line 253) | def console_log_context(output_file="output.txt"): function get_model (line 277) | def get_model(model_name: str) -> str: FILE: unit_tests/args_test.py function set_cls_funcs (line 23) | def set_cls_funcs(): function test_module_invalid (line 50) | def test_module_invalid(set_cls_funcs): function test_module_valid (line 57) | def test_module_valid(set_cls_funcs): function test_model_invalid (line 61) | def test_model_invalid(set_cls_funcs): function test_model_valid (line 68) | def test_model_valid(set_cls_funcs): function test_valid_image_formats (line 116) | def test_valid_image_formats(set_cls_funcs, d): function test_invalid_image_formats (line 136) | def test_invalid_image_formats(set_cls_funcs, d): function test_mask_alias_conflict (line 145) | def test_mask_alias_conflict(): function test_resize_mode (line 156) | def test_resize_mode(): function test_weight (line 163) | def test_weight(): function test_start_end (line 172) | def test_start_end(): function test_effective_region_mask (line 185) | def test_effective_region_mask(): function test_ipadapter_input (line 194) | def test_ipadapter_input(): class MockSlider (line 204) | class MockSlider: class MockPreprocessor (line 211) | class MockPreprocessor: function test_preprocessor_sliders (line 217) | def test_preprocessor_sliders(): function test_preprocessor_sliders_disabled (line 224) | def test_preprocessor_sliders_disabled(): function test_infotext_parsing (line 231) | def test_infotext_parsing(): function test_alias (line 251) | def test_alias(): function test_copy (line 255) | def test_copy(): FILE: web_tests/main.py class GenType (line 33) | class GenType(Enum): method _find_by_xpath (line 37) | def _find_by_xpath(self, driver: webdriver.Chrome, xpath: str) -> "Web... method tab (line 40) | def tab(self, driver: webdriver.Chrome) -> "WebElement": method controlnet_panel (line 46) | def controlnet_panel(self, driver: webdriver.Chrome) -> "WebElement": method generate_button (line 51) | def generate_button(self, driver: webdriver.Chrome) -> "WebElement": method prompt_textarea (line 54) | def prompt_textarea(self, driver: webdriver.Chrome) -> "WebElement": class SeleniumTestCase (line 58) | class SeleniumTestCase(unittest.TestCase): method __init__ (line 59) | def __init__(self, methodName: str = "runTest") -> None: method setUp (line 64) | def setUp(self) -> None: method tearDown (line 72) | def tearDown(self) -> None: method select_gen_type (line 76) | def select_gen_type(self, gen_type: GenType): method set_prompt (line 80) | def set_prompt(self, prompt: str): method expand_controlnet_panel (line 85) | def expand_controlnet_panel(self): method enable_controlnet_unit (line 93) | def enable_controlnet_unit(self): method iterate_preprocessor_types (line 101) | def iterate_preprocessor_types(self, ignore_none: bool = True): method select_control_type (line 128) | def select_control_type(self, control_type: str): method set_seed (line 136) | def set_seed(self, seed: int): method set_subseed (line 143) | def set_subseed(self, seed: int): method upload_controlnet_input (line 162) | def upload_controlnet_input(self, img_path: str): method upload_img2img_input (line 169) | def upload_img2img_input(self, img_path: str): method generate_image (line 175) | def generate_image(self, name: str): method expect_same_image (line 218) | def expect_same_image(self, img1, img2, diff_img_path: str): class SeleniumTxt2ImgTest (line 253) | class SeleniumTxt2ImgTest(SeleniumTestCase): method setUp (line 254) | def setUp(self) -> None: method test_simple_control_types (line 260) | def test_simple_control_types(self): class SeleniumImg2ImgTest (line 270) | class SeleniumImg2ImgTest(SeleniumTestCase): method setUp (line 271) | def setUp(self) -> None: method test_simple_control_types (line 277) | def test_simple_control_types(self): class SeleniumInpaintTest (line 288) | class SeleniumInpaintTest(SeleniumTestCase): method setUp (line 289) | def setUp(self) -> None: method draw_inpaint_mask (line 292) | def draw_inpaint_mask(self, target_canvas): method draw_cn_mask (line 315) | def draw_cn_mask(self): method draw_a1111_mask (line 321) | def draw_a1111_mask(self): method test_txt2img_inpaint (line 325) | def test_txt2img_inpaint(self): method test_img2img_inpaint (line 339) | def test_img2img_inpaint(self): method _test_img2img_inpaint (line 344) | def _test_img2img_inpaint(self, use_cn_mask: bool, use_a1111_mask: bool):