SYMBOL INDEX (552 symbols across 64 files) FILE: scripts/image_swap.py function main (line 33) | def main( function find_images_from_path (line 76) | def find_images_from_path(path): FILE: scripts/metadata_swap.py function main (line 53) | def main( function format_swaps (line 194) | def format_swaps(succeeds): FILE: scripts/profile_simswap.py function main (line 31) | def main( function find_images_from_path (line 65) | def find_images_from_path(path): FILE: scripts/video_swap.py function main (line 31) | def main( FILE: src/dot/__main__.py function run (line 16) | def run( function main (line 183) | def main( FILE: src/dot/commons/cam/cam.py function is_new_frame_better (line 15) | def is_new_frame_better(log, source, driving, predictor): function load_stylegan_avatar (line 44) | def load_stylegan_avatar(IMG_SIZE=256): function load_images (line 58) | def load_images(log, opt_avatars, IMG_SIZE=256): function draw_rect (line 78) | def draw_rect(img, rw=0.6, rh=0.8, color=(255, 0, 0), thickness=2): function kp_to_pixels (line 87) | def kp_to_pixels(arr): function draw_face_landmarks (line 92) | def draw_face_landmarks(LANDMARK_SLICE_ARRAY, img, face_kp, color=(20, 8... function print_help (line 100) | def print_help(avatar_names): function draw_fps (line 119) | def draw_fps( function draw_landmark_text (line 210) | def draw_landmark_text(frame, thk=2, fontsz=0.5, color=(0, 0, 255), IMG_... function draw_calib_text (line 220) | def draw_calib_text(frame, thk=2, fontsz=0.5, color=(0, 0, 255), IMG_SIZ... function select_camera (line 233) | def select_camera(log, config): FILE: src/dot/commons/cam/camera_selector.py function query_cameras (line 12) | def query_cameras(n_cams): function make_grid (line 40) | def make_grid(images, cell_size=(320, 240), cols=2): function mouse_callback (line 57) | def mouse_callback(event, x, y, flags, userdata): function select_camera (line 68) | def select_camera(cam_frames, window="Camera selector"): FILE: src/dot/commons/camera_utils.py function fetch_camera (line 17) | def fetch_camera(target: int) -> VideoCaptureAsync: function camera_pipeline (line 35) | def camera_pipeline( FILE: src/dot/commons/model_option.py class ModelOption (line 20) | class ModelOption(ABC): method __init__ (line 21) | def __init__( method generate_from_image (line 58) | def generate_from_image( method generate_from_camera (line 166) | def generate_from_camera( method generate_from_video (line 196) | def generate_from_video( method post_process_image (line 229) | def post_process_image(self, image, **kwargs): method change_option (line 238) | def change_option(self, image, **kwargs): method process_image (line 242) | def process_image(self, image, **kwargs): method create_model (line 246) | def create_model(self, source, target, limit=None, swap_case_idx=0, **... FILE: src/dot/commons/pose/head_pose.py function pose_estimation (line 23) | def pose_estimation( FILE: src/dot/commons/utils.py function log (line 18) | def log(*args, **kwargs): function info (line 23) | def info(*args, file=sys.stdout, **kwargs): function find_images_from_path (line 27) | def find_images_from_path(path): function find_files_from_path (line 47) | def find_files_from_path(path: str, ext: List, filter: str = None): function expand_bbox (line 70) | def expand_bbox( function rand_idx_tuple (line 93) | def rand_idx_tuple(source_len, target_len): function generate_random_file_idx (line 100) | def generate_random_file_idx(length): class Tee (line 104) | class Tee(object): method __init__ (line 105) | def __init__(self, filename, mode="w", terminal=sys.stderr): method __del__ (line 109) | def __del__(self): method write (line 112) | def write(self, *args, **kwargs): method __call__ (line 116) | def __call__(self, *args, **kwargs): method flush (line 119) | def flush(self): class Logger (line 123) | class Logger: method __init__ (line 124) | def __init__(self, filename, verbose=True): method __call__ (line 128) | def __call__(self, *args, important=False, **kwargs): class Once (line 135) | class Once: method __init__ (line 138) | def __init__(self, what, who=log, per=1e12): class TicToc (line 151) | class TicToc: method __init__ (line 152) | def __init__(self): method tic (line 156) | def tic(self): method toc (line 159) | def toc(self, total=False): method tocp (line 166) | def tocp(self, str): class AccumDict (line 172) | class AccumDict: method __init__ (line 173) | def __init__(self, num_f=3): method add (line 177) | def add(self, k, v): method __dict__ (line 180) | def __dict__(self): method __getitem__ (line 183) | def __getitem__(self, key): method __str__ (line 186) | def __str__(self): method __repr__ (line 199) | def __repr__(self): function clamp (line 203) | def clamp(value, min_value, max_value): function crop (line 207) | def crop(img, p=0.7, offset_x=0, offset_y=0): function pad_img (line 226) | def pad_img(img, target_size, default_pad=0): function resize (line 238) | def resize(img, size, version="cv"): function determine_path (line 242) | def determine_path(): FILE: src/dot/commons/video/video_utils.py function _crop_and_pose (line 25) | def _crop_and_pose( function video_pipeline (line 75) | def video_pipeline( FILE: src/dot/commons/video/videocaptureasync.py class VideoCaptureAsync (line 12) | class VideoCaptureAsync: method __init__ (line 13) | def __init__(self, src=0, width=640, height=480): method set (line 26) | def set(self, var1, var2): method isOpened (line 29) | def isOpened(self): method start (line 32) | def start(self): method update (line 55) | def update(self): method read (line 64) | def read(self): method stop (line 72) | def stop(self): method __exit__ (line 76) | def __exit__(self, exec_type, exc_value, traceback): FILE: src/dot/dot.py class DOT (line 18) | class DOT: method __init__ (line 33) | def __init__( method build_option (line 61) | def build_option( method generate (line 104) | def generate( method simswap (line 151) | def simswap( method faceswap_cv2 (line 179) | def faceswap_cv2( method fomm (line 200) | def fomm( FILE: src/dot/faceswap_cv2/generic.py function bilinear_interpolate (line 8) | def bilinear_interpolate(img, coords): function grid_coordinates (line 33) | def grid_coordinates(points): function process_warp (line 49) | def process_warp(src_img, result_img, tri_affines, dst_points, delaunay): function triangular_affine_matrices (line 70) | def triangular_affine_matrices(vertices, src_points, dst_points): function warp_image_3d (line 87) | def warp_image_3d(src_img, src_points, dst_points, dst_shape, dtype=np.u... function transformation_from_points (line 101) | def transformation_from_points(points1, points2): function warp_image_2d (line 126) | def warp_image_2d(im, M, dshape): function mask_from_points (line 140) | def mask_from_points(size, points, erode_flag=1): function correct_colours (line 152) | def correct_colours(im1, im2, landmarks1): function apply_mask (line 181) | def apply_mask(img, mask): FILE: src/dot/faceswap_cv2/option.py class FaceswapCVOption (line 12) | class FaceswapCVOption(ModelOption): method __init__ (line 13) | def __init__( method create_model (line 31) | def create_model(self, model_path, **kwargs) -> None: # type: ignore method change_option (line 39) | def change_option(self, image, **kwargs): method process_image (line 45) | def process_image( FILE: src/dot/faceswap_cv2/swap.py class Swap (line 23) | class Swap: method __init__ (line 24) | def __init__( method apply_face_swap (line 54) | def apply_face_swap(self, source_image, target_image, save_path=None, ... method _face_and_landmark_detection (line 144) | def _face_and_landmark_detection(self, image): method _process_face (line 162) | def _process_face(self, image, r=10): method _perform_base_blending (line 185) | def _perform_base_blending(mask, trg_face, warped_src_face): method from_config (line 202) | def from_config(cls, config: Dict[str, Any]) -> "Swap": FILE: src/dot/fomm/face_alignment.py class LandmarksType (line 12) | class LandmarksType(IntEnum): class NetworkSize (line 26) | class NetworkSize(IntEnum): class FaceAlignment (line 53) | class FaceAlignment: method __init__ (line 54) | def __init__( method get_landmarks (line 121) | def get_landmarks( method get_landmarks_from_image (line 144) | def get_landmarks_from_image( method get_landmarks_from_batch (line 244) | def get_landmarks_from_batch( method get_landmarks_from_directory (line 315) | def get_landmarks_from_directory( FILE: src/dot/fomm/modules/dense_motion.py class DenseMotionNetwork (line 10) | class DenseMotionNetwork(nn.Module): method __init__ (line 17) | def __init__( method create_heatmap_representations (line 55) | def create_heatmap_representations(self, source_image, kp_driving, kp_... method create_sparse_motions (line 77) | def create_sparse_motions(self, source_image, kp_driving, kp_source): method create_deformed_source_image (line 105) | def create_deformed_source_image(self, source_image, sparse_motions): method forward (line 121) | def forward(self, source_image, kp_driving, kp_source): FILE: src/dot/fomm/modules/generator_optim.py class OcclusionAwareGenerator (line 11) | class OcclusionAwareGenerator(nn.Module): method __init__ (line 18) | def __init__( method deform_input (line 86) | def deform_input(self, inp, deformation): method encode_source (line 95) | def encode_source(self, source_image): method forward (line 103) | def forward(self, source_image, kp_driving, kp_source, optim_ret=True): FILE: src/dot/fomm/modules/keypoint_detector.py class KPDetector (line 10) | class KPDetector(nn.Module): method __init__ (line 16) | def __init__( method gaussian2kp (line 66) | def gaussian2kp(self, heatmap): method forward (line 80) | def forward(self, x): FILE: src/dot/fomm/modules/util.py function kp2gaussian (line 10) | def kp2gaussian(kp, spatial_size, kp_variance): function make_coordinate_grid (line 34) | def make_coordinate_grid(spatial_size, type): class ResBlock2d (line 53) | class ResBlock2d(nn.Module): method __init__ (line 58) | def __init__(self, in_features, kernel_size, padding): method forward (line 77) | def forward(self, x): class UpBlock2d (line 88) | class UpBlock2d(nn.Module): method __init__ (line 93) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 107) | def forward(self, x): class DownBlock2d (line 115) | class DownBlock2d(nn.Module): method __init__ (line 120) | def __init__(self, in_features, out_features, kernel_size=3, padding=1... method forward (line 134) | def forward(self, x): class SameBlock2d (line 142) | class SameBlock2d(nn.Module): method __init__ (line 147) | def __init__(self, in_features, out_features, groups=1, kernel_size=3,... method forward (line 160) | def forward(self, x): class Encoder (line 167) | class Encoder(nn.Module): method __init__ (line 172) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 191) | def forward(self, x): class Decoder (line 198) | class Decoder(nn.Module): method __init__ (line 203) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 221) | def forward(self, x): class Hourglass (line 230) | class Hourglass(nn.Module): method __init__ (line 235) | def __init__(self, block_expansion, in_features, num_blocks=3, max_fea... method forward (line 244) | def forward(self, x): class AntiAliasInterpolation2d (line 248) | class AntiAliasInterpolation2d(nn.Module): method __init__ (line 254) | def __init__(self, channels, scale): method forward (line 284) | def forward(self, input): FILE: src/dot/fomm/option.py function determine_path (line 21) | def determine_path(): class FOMMOption (line 38) | class FOMMOption(ModelOption): method __init__ (line 39) | def __init__( method create_model (line 81) | def create_model(self, model_path, **kwargs) -> None: # type: ignore method change_option (line 95) | def change_option(self, image, **kwargs): method handle_keyboard_input (line 106) | def handle_keyboard_input(self): method process_image (line 161) | def process_image(self, image, use_gpu=True, **kwargs) -> np.array: FILE: src/dot/fomm/predictor_local.py function normalize_kp (line 13) | def normalize_kp( function to_tensor (line 47) | def to_tensor(a): class PredictorLocal (line 51) | class PredictorLocal: method __init__ (line 52) | def __init__( method load_checkpoints (line 83) | def load_checkpoints(self): method reset_frames (line 108) | def reset_frames(self): method set_source_image (line 111) | def set_source_image(self, source_image): method predict (line 126) | def predict(self, driving_frame): method get_frame_kp (line 156) | def get_frame_kp(self, image): method normalize_alignment_kp (line 166) | def normalize_alignment_kp(kp): method get_start_frame (line 173) | def get_start_frame(self): method get_start_frame_kp (line 176) | def get_start_frame_kp(self): FILE: src/dot/fomm/sync_batchnorm/batchnorm.py function _sum_ft (line 23) | def _sum_ft(tensor): function _unsqueeze_ft (line 28) | def _unsqueeze_ft(tensor): class _SynchronizedBatchNorm (line 38) | class _SynchronizedBatchNorm(_BatchNorm): method __init__ (line 39) | def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True): method forward (line 51) | def forward(self, input): method __data_parallel_replicate__ (line 97) | def __data_parallel_replicate__(self, ctx, copy_id): method _data_parallel_master (line 107) | def _data_parallel_master(self, intermediates): method _compute_mean_std (line 131) | def _compute_mean_std(self, sum_, ssum, size): class SynchronizedBatchNorm2d (line 154) | class SynchronizedBatchNorm2d(_SynchronizedBatchNorm): method _check_input_dim (line 213) | def _check_input_dim(self, input): FILE: src/dot/fomm/sync_batchnorm/comm.py class FutureResult (line 19) | class FutureResult(object): method __init__ (line 25) | def __init__(self): method put (line 30) | def put(self, result): method get (line 36) | def get(self): class SlavePipe (line 52) | class SlavePipe(_SlavePipeBase): method run_slave (line 57) | def run_slave(self, msg): class SyncMaster (line 64) | class SyncMaster(object): method __init__ (line 80) | def __init__(self, master_callback): method __getstate__ (line 91) | def __getstate__(self): method __setstate__ (line 94) | def __setstate__(self, state): method register_slave (line 97) | def register_slave(self, identifier): method run_master (line 117) | def run_master(self, master_msg): method nr_slaves (line 154) | def nr_slaves(self): FILE: src/dot/gpen/__init_paths.py function add_path (line 11) | def add_path(path): FILE: src/dot/gpen/align_faces.py function _umeyama (line 25) | def _umeyama(src, dst, estimate_scale=True, scale=1.0): class FaceWarpException (line 96) | class FaceWarpException(Exception): method __str__ (line 97) | def __str__(self): function get_reference_facial_points (line 101) | def get_reference_facial_points( function get_affine_transform_matrix (line 185) | def get_affine_transform_matrix(src_pts, dst_pts): function warp_and_crop_face (line 202) | def warp_and_crop_face( FILE: src/dot/gpen/face_enhancement.py class FaceEnhancement (line 18) | class FaceEnhancement(object): method __init__ (line 19) | def __init__( method process (line 54) | def process(self, img, use_gpu=True): FILE: src/dot/gpen/face_model/face_gan.py class FaceGAN (line 16) | class FaceGAN(object): method __init__ (line 17) | def __init__( method load_model (line 40) | def load_model(self, channel_multiplier=2, narrow=1, use_gpu=True): method process (line 55) | def process(self, img, use_gpu=True): method img2tensor (line 66) | def img2tensor(self, img, use_gpu=True): method tensor2img (line 76) | def tensor2img(self, img_t, pmax=255.0, imtype=np.uint8): FILE: src/dot/gpen/face_model/model.py class PixelNorm (line 20) | class PixelNorm(nn.Module): method __init__ (line 21) | def __init__(self): method forward (line 24) | def forward(self, input): function make_kernel (line 28) | def make_kernel(k): class Upsample (line 39) | class Upsample(nn.Module): method __init__ (line 40) | def __init__(self, kernel, factor=2): method forward (line 54) | def forward(self, input): class Downsample (line 60) | class Downsample(nn.Module): method __init__ (line 61) | def __init__(self, kernel, factor=2): method forward (line 75) | def forward(self, input): class Blur (line 81) | class Blur(nn.Module): method __init__ (line 82) | def __init__(self, kernel, pad, upsample_factor=1): method forward (line 94) | def forward(self, input): class EqualConv2d (line 100) | class EqualConv2d(nn.Module): method __init__ (line 101) | def __init__( method forward (line 120) | def forward(self, input): method __repr__ (line 131) | def __repr__(self): class EqualLinear (line 138) | class EqualLinear(nn.Module): method __init__ (line 139) | def __init__( method forward (line 157) | def forward(self, input): method __repr__ (line 169) | def __repr__(self): class ScaledLeakyReLU (line 175) | class ScaledLeakyReLU(nn.Module): method __init__ (line 176) | def __init__(self, negative_slope=0.2): method forward (line 181) | def forward(self, input): class ModulatedConv2d (line 187) | class ModulatedConv2d(nn.Module): method __init__ (line 188) | def __init__( method __repr__ (line 236) | def __repr__(self): method forward (line 242) | def forward(self, input, style): class NoiseInjection (line 286) | class NoiseInjection(nn.Module): method __init__ (line 287) | def __init__(self, isconcat=True): method forward (line 293) | def forward(self, image, noise=None): class ConstantInput (line 304) | class ConstantInput(nn.Module): method __init__ (line 305) | def __init__(self, channel, size=4): method forward (line 310) | def forward(self, input): class StyledConv (line 317) | class StyledConv(nn.Module): method __init__ (line 318) | def __init__( method forward (line 345) | def forward(self, input, style, noise=None): class ToRGB (line 353) | class ToRGB(nn.Module): method __init__ (line 354) | def __init__(self, in_channel, style_dim, upsample=True, blur_kernel=[... method forward (line 363) | def forward(self, input, style, skip=None): class Generator (line 375) | class Generator(nn.Module): method __init__ (line 376) | def __init__( method make_noise (line 470) | def make_noise(self): method mean_latent (line 481) | def mean_latent(self, n_latent): method get_latent (line 489) | def get_latent(self, input): method forward (line 492) | def forward( class ConvLayer (line 567) | class ConvLayer(nn.Sequential): method __init__ (line 568) | def __init__( class ResBlock (line 616) | class ResBlock(nn.Module): method __init__ (line 617) | def __init__(self, in_channel, out_channel, blur_kernel=[1, 3, 3, 1]): method forward (line 627) | def forward(self, input): class FullGenerator (line 637) | class FullGenerator(nn.Module): method __init__ (line 638) | def __init__( method forward (line 688) | def forward( class Discriminator (line 720) | class Discriminator(nn.Module): method __init__ (line 721) | def __init__(self, size, channel_multiplier=2, blur_kernel=[1, 3, 3, 1... method forward (line 760) | def forward(self, input): FILE: src/dot/gpen/face_model/op/fused_act.py class FusedLeakyReLUFunctionBackward (line 43) | class FusedLeakyReLUFunctionBackward(Function): method forward (line 45) | def forward(ctx, grad_output, out, negative_slope, scale): method backward (line 66) | def backward(ctx, gradgrad_input, gradgrad_bias): class FusedLeakyReLUFunction (line 75) | class FusedLeakyReLUFunction(Function): method forward (line 77) | def forward(ctx, input, bias, negative_slope, scale): method backward (line 87) | def backward(ctx, grad_output): class FusedLeakyReLU (line 97) | class FusedLeakyReLU(nn.Module): method __init__ (line 98) | def __init__(self, channel, negative_slope=0.2, scale=2**0.5): method forward (line 105) | def forward(self, input): function fused_leaky_relu (line 109) | def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2**0.5): FILE: src/dot/gpen/face_model/op/fused_act_v2.py class FusedLeakyReLU_v2 (line 12) | class FusedLeakyReLU_v2(nn.Module): method __init__ (line 13) | def __init__(self, channel, negative_slope=0.2, scale=2**0.5): method forward (line 20) | def forward(self, input): function fused_leaky_relu_v2 (line 24) | def fused_leaky_relu_v2(input, bias, negative_slope=0.2, scale=2**0.5): FILE: src/dot/gpen/face_model/op/fused_bias_act.cpp function fused_bias_act (line 13) | torch::Tensor fused_bias_act(const torch::Tensor& input, const torch::Te... function PYBIND11_MODULE (line 21) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: src/dot/gpen/face_model/op/upfirdn2d.cpp function upfirdn2d (line 14) | torch::Tensor upfirdn2d(const torch::Tensor& input, const torch::Tensor&... function PYBIND11_MODULE (line 23) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: src/dot/gpen/face_model/op/upfirdn2d.py class UpFirDn2dBackward (line 22) | class UpFirDn2dBackward(Function): method forward (line 24) | def forward( method backward (line 66) | def backward(ctx, gradgrad_input): class UpFirDn2d (line 90) | class UpFirDn2d(Function): method forward (line 92) | def forward(ctx, input, kernel, up, down, pad): method backward (line 128) | def backward(ctx, grad_output): function upfirdn2d (line 146) | def upfirdn2d(input, kernel, up=1, down=1, pad=(0, 0)): function upfirdn2d_native (line 154) | def upfirdn2d_native( FILE: src/dot/gpen/face_model/op/upfirdn2d_v2.py function upfirdn2d_v2 (line 11) | def upfirdn2d_v2(input, kernel, up=1, down=1, pad=(0, 0)): function upfirdn2d_native (line 19) | def upfirdn2d_native( FILE: src/dot/gpen/retinaface/data/data_augment.py function _crop (line 11) | def _crop(image, boxes, labels, landm, img_dim): function _distort (line 83) | def _distort(image): function _expand (line 143) | def _expand(image, boxes, fill, p): function _mirror (line 167) | def _mirror(image, boxes, landms): function _pad_to_square (line 189) | def _pad_to_square(image, rgb_mean, pad_image_flag): function _resize_subtract_mean (line 200) | def _resize_subtract_mean(image, insize, rgb_mean): class preproc (line 215) | class preproc(object): method __init__ (line 216) | def __init__(self, img_dim, rgb_means): method __call__ (line 220) | def __call__(self, image, targets): FILE: src/dot/gpen/retinaface/data/wider_face.py class WiderFaceDetection (line 9) | class WiderFaceDetection(data.Dataset): method __init__ (line 10) | def __init__(self, txt_path, preproc=None): method __len__ (line 37) | def __len__(self): method __getitem__ (line 40) | def __getitem__(self, index): function detection_collate (line 80) | def detection_collate(batch): FILE: src/dot/gpen/retinaface/facemodels/net.py function conv_bn (line 8) | def conv_bn(inp, oup, stride=1, leaky=0): function conv_bn_no_relu (line 16) | def conv_bn_no_relu(inp, oup, stride): function conv_bn1X1 (line 23) | def conv_bn1X1(inp, oup, stride, leaky=0): function conv_dw (line 31) | def conv_dw(inp, oup, stride, leaky=0.1): class SSH (line 42) | class SSH(nn.Module): method __init__ (line 43) | def __init__(self, in_channel, out_channel): method forward (line 59) | def forward(self, input): class FPN (line 73) | class FPN(nn.Module): method __init__ (line 74) | def __init__(self, in_channels_list, out_channels): method forward (line 92) | def forward(self, input): class MobileNetV1 (line 115) | class MobileNetV1(nn.Module): method __init__ (line 116) | def __init__(self): method forward (line 141) | def forward(self, x): FILE: src/dot/gpen/retinaface/facemodels/retinaface.py class ClassHead (line 13) | class ClassHead(nn.Module): method __init__ (line 14) | def __init__(self, inchannels=512, num_anchors=3): method forward (line 21) | def forward(self, x): class BboxHead (line 28) | class BboxHead(nn.Module): method __init__ (line 29) | def __init__(self, inchannels=512, num_anchors=3): method forward (line 35) | def forward(self, x): class LandmarkHead (line 42) | class LandmarkHead(nn.Module): method __init__ (line 43) | def __init__(self, inchannels=512, num_anchors=3): method forward (line 49) | def forward(self, x): class RetinaFace (line 56) | class RetinaFace(nn.Module): method __init__ (line 57) | def __init__(self, cfg=None, phase="train"): method _make_class_head (line 104) | def _make_class_head(self, fpn_num=3, inchannels=64, anchor_num=2): method _make_bbox_head (line 110) | def _make_bbox_head(self, fpn_num=3, inchannels=64, anchor_num=2): method _make_landmark_head (line 116) | def _make_landmark_head(self, fpn_num=3, inchannels=64, anchor_num=2): method forward (line 122) | def forward(self, inputs): FILE: src/dot/gpen/retinaface/layers/functions/prior_box.py class PriorBox (line 9) | class PriorBox(object): method __init__ (line 10) | def __init__(self, cfg, image_size=None, phase="train"): method forward (line 22) | def forward(self): FILE: src/dot/gpen/retinaface/layers/modules/multibox_loss.py class MultiBoxLoss (line 13) | class MultiBoxLoss(nn.Module): method __init__ (line 36) | def __init__( method forward (line 58) | def forward(self, predictions, priors, targets): FILE: src/dot/gpen/retinaface/retinaface_detection.py class RetinaFaceDetection (line 20) | class RetinaFaceDetection(object): method __init__ (line 21) | def __init__(self, base_dir, network="RetinaFace-R50", use_gpu=True): method check_keys (line 38) | def check_keys(self, pretrained_state_dict): method remove_prefix (line 45) | def remove_prefix(self, state_dict, prefix): method load_model (line 54) | def load_model(self, load_to_cpu=False): method detect (line 74) | def detect( FILE: src/dot/gpen/retinaface/utils/box_utils.py function point_form (line 7) | def point_form(boxes): function center_size (line 24) | def center_size(boxes): function intersect (line 37) | def intersect(box_a, box_b): function jaccard (line 62) | def jaccard(box_a, box_b): function matrix_iou (line 89) | def matrix_iou(a, b): function matrix_iof (line 102) | def matrix_iof(a, b): function match (line 114) | def match( function encode (line 173) | def encode(matched, priors, variances): function encode_landm (line 197) | def encode_landm(matched, priors, variances): function decode (line 226) | def decode(loc, priors, variances): function decode_landm (line 251) | def decode_landm(pre, priors, variances): function log_sum_exp (line 276) | def log_sum_exp(x): function nms (line 290) | def nms(boxes, scores, overlap=0.5, top_k=200): FILE: src/dot/gpen/retinaface/utils/nms/py_cpu_nms.py function py_cpu_nms (line 13) | def py_cpu_nms(dets, thresh): FILE: src/dot/gpen/retinaface/utils/timer.py class Timer (line 13) | class Timer(object): method __init__ (line 16) | def __init__(self): method tic (line 23) | def tic(self): method toc (line 28) | def toc(self, average=True): method clear (line 38) | def clear(self): FILE: src/dot/simswap/fs_model.py function determine_path (line 11) | def determine_path(): class fsModel (line 33) | class fsModel(BaseModel): method name (line 34) | def name(self): method initialize (line 37) | def initialize( method forward (line 91) | def forward(self, img_id, img_att, latent_id, latent_att, for_G=False): function create_model (line 97) | def create_model( FILE: src/dot/simswap/mediapipe/face_mesh.py class FaceMesh (line 16) | class FaceMesh: method __init__ (line 33) | def __init__( method _get_centroid (line 48) | def _get_centroid(self, landmarks: List[NormalizedLandmark]) -> Tuple[... method get_face_landmarks (line 62) | def get_face_landmarks(self, image: np.ndarray) -> Optional[np.array]: method get (line 155) | def get( FILE: src/dot/simswap/mediapipe/utils/face_align_ffhqandnewarc.py function estimate_norm (line 81) | def estimate_norm(lmk, image_size=112, mode="ffhq"): function norm_crop (line 106) | def norm_crop(img, landmark, image_size=112, mode="ffhq"): function square_crop (line 123) | def square_crop(im, S): function transform (line 138) | def transform(data, center, output_size, scale, rotation): function trans_points2d (line 153) | def trans_points2d(pts, M): function trans_points3d (line 164) | def trans_points3d(pts, M): function trans_points (line 177) | def trans_points(pts, M): FILE: src/dot/simswap/mediapipe/utils/mediapipe_landmarks.py class MediaPipeLandmarks (line 4) | class MediaPipeLandmarks: FILE: src/dot/simswap/models/arcface_models.py class SEBlock (line 11) | class SEBlock(nn.Module): method __init__ (line 12) | def __init__(self, channel, reduction=16): method forward (line 22) | def forward(self, x): class IRBlock (line 29) | class IRBlock(nn.Module): method __init__ (line 32) | def __init__(self, inplanes, planes, stride=1, downsample=None, use_se... method forward (line 46) | def forward(self, x): class ResNet (line 67) | class ResNet(nn.Module): method __init__ (line 68) | def __init__(self, block, layers, use_se=True): method _make_layer (line 95) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 119) | def forward(self, x): class ArcMarginModel (line 140) | class ArcMarginModel(nn.Module): method __init__ (line 141) | def __init__(self, args): method forward (line 157) | def forward(self, input, label): FILE: src/dot/simswap/models/base_model.py class BaseModel (line 9) | class BaseModel(torch.nn.Module): method name (line 10) | def name(self): method initialize (line 13) | def initialize(self, opt_gpu_ids, opt_checkpoints_dir, opt_name, opt_v... method set_input (line 19) | def set_input(self, input): method forward (line 22) | def forward(self): method test (line 26) | def test(self): method get_image_paths (line 29) | def get_image_paths(self): method optimize_parameters (line 32) | def optimize_parameters(self): method get_current_visuals (line 35) | def get_current_visuals(self): method get_current_errors (line 38) | def get_current_errors(self): method save (line 41) | def save(self, label): method save_network (line 45) | def save_network(self, network, network_label, epoch_label, gpu_ids): method load_network (line 53) | def load_network(self, network, network_label, epoch_label, save_dir=""): method update_learning_rate (line 106) | def update_learning_rate(self): FILE: src/dot/simswap/models/fs_networks.py class InstanceNorm (line 13) | class InstanceNorm(nn.Module): method __init__ (line 14) | def __init__(self, epsilon=1e-8): method forward (line 22) | def forward(self, x): class ApplyStyle (line 29) | class ApplyStyle(nn.Module): method __init__ (line 34) | def __init__(self, latent_size, channels): method forward (line 38) | def forward(self, x, latent): class ResnetBlock_Adain (line 46) | class ResnetBlock_Adain(nn.Module): method __init__ (line 47) | def __init__(self, dim, latent_size, padding_type, activation=nn.ReLU(... method forward (line 80) | def forward(self, x, dlatents_in_slice): class Generator_Adain_Upsample (line 90) | class Generator_Adain_Upsample(nn.Module): method __init__ (line 91) | def __init__( method forward (line 181) | def forward(self, input, dlatents): FILE: src/dot/simswap/models/fs_networks_512.py class InstanceNorm (line 19) | class InstanceNorm(nn.Module): method __init__ (line 20) | def __init__(self, epsilon=1e-8): method forward (line 28) | def forward(self, x): class ApplyStyle (line 35) | class ApplyStyle(nn.Module): method __init__ (line 40) | def __init__(self, latent_size, channels): method forward (line 44) | def forward(self, x, latent): class ResnetBlock_Adain (line 52) | class ResnetBlock_Adain(nn.Module): method __init__ (line 53) | def __init__(self, dim, latent_size, padding_type, activation=nn.ReLU(... method forward (line 85) | def forward(self, x, dlatents_in_slice): class Generator_Adain_Upsample (line 95) | class Generator_Adain_Upsample(nn.Module): method __init__ (line 96) | def __init__( method forward (line 195) | def forward(self, input, dlatents): FILE: src/dot/simswap/models/models.py class SEBlock (line 13) | class SEBlock(nn.Module): method __init__ (line 14) | def __init__(self, channel, reduction=16): method forward (line 24) | def forward(self, x): class IRBlock (line 32) | class IRBlock(nn.Module): method __init__ (line 35) | def __init__(self, inplanes, planes, stride=1, downsample=None, use_se... method forward (line 49) | def forward(self, x): class ResNet (line 70) | class ResNet(nn.Module): method __init__ (line 71) | def __init__(self, block, layers, use_se=True): method _make_layer (line 98) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 122) | def forward(self, x): class ArcMarginModel (line 142) | class ArcMarginModel(nn.Module): method __init__ (line 143) | def __init__(self, args): method forward (line 159) | def forward(self, input, label): FILE: src/dot/simswap/option.py class SimswapOption (line 19) | class SimswapOption(ModelOption): method __init__ (line 22) | def __init__( method create_model (line 38) | def create_model( # type: ignore method change_option (line 119) | def change_option(self, image: np.array, **kwargs) -> None: method process_image (line 157) | def process_image(self, image: np.array, **kwargs) -> np.array: FILE: src/dot/simswap/parsing_model/model.py class ConvBNReLU (line 12) | class ConvBNReLU(nn.Module): method __init__ (line 13) | def __init__(self, in_chan, out_chan, ks=3, stride=1, padding=1, *args... method forward (line 26) | def forward(self, x): method init_weight (line 31) | def init_weight(self): class BiSeNetOutput (line 39) | class BiSeNetOutput(nn.Module): method __init__ (line 40) | def __init__(self, in_chan, mid_chan, n_classes, *args, **kwargs): method forward (line 46) | def forward(self, x): method init_weight (line 51) | def init_weight(self): method get_params (line 58) | def get_params(self): class AttentionRefinementModule (line 70) | class AttentionRefinementModule(nn.Module): method __init__ (line 71) | def __init__(self, in_chan, out_chan, *args, **kwargs): method forward (line 79) | def forward(self, x): method init_weight (line 88) | def init_weight(self): class ContextPath (line 96) | class ContextPath(nn.Module): method __init__ (line 97) | def __init__(self, *args, **kwargs): method forward (line 108) | def forward(self, x): method init_weight (line 131) | def init_weight(self): method get_params (line 138) | def get_params(self): class FeatureFusionModule (line 150) | class FeatureFusionModule(nn.Module): method __init__ (line 151) | def __init__(self, in_chan, out_chan, *args, **kwargs): method forward (line 164) | def forward(self, fsp, fcp): method init_weight (line 176) | def init_weight(self): method get_params (line 183) | def get_params(self): class BiSeNet (line 195) | class BiSeNet(nn.Module): method __init__ (line 196) | def __init__(self, n_classes, *args, **kwargs): method forward (line 206) | def forward(self, x): method init_weight (line 227) | def init_weight(self): method get_params (line 234) | def get_params(self): FILE: src/dot/simswap/parsing_model/resnet.py function conv3x3 (line 11) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 18) | class BasicBlock(nn.Module): method __init__ (line 19) | def __init__(self, in_chan, out_chan, stride=1): method forward (line 33) | def forward(self, x): function create_layer_basic (line 48) | def create_layer_basic(in_chan, out_chan, bnum, stride=1): class Resnet18 (line 55) | class Resnet18(nn.Module): method __init__ (line 56) | def __init__(self): method forward (line 67) | def forward(self, x): method init_weight (line 78) | def init_weight(self): method get_params (line 87) | def get_params(self): FILE: src/dot/simswap/util/norm.py class SpecificNorm (line 8) | class SpecificNorm(nn.Module): method __init__ (line 9) | def __init__(self, epsilon=1e-8, use_gpu=True): method forward (line 39) | def forward(self, x, use_gpu=True): FILE: src/dot/simswap/util/reverse2original.py function isin (line 12) | def isin(ar1, ar2): function encode_segmentation_rgb (line 16) | def encode_segmentation_rgb(segmentation, device, no_neck=True): class SoftErosion (line 49) | class SoftErosion(nn.Module): method __init__ (line 50) | def __init__(self, kernel_size=15, threshold=0.6, iterations=1): method forward (line 69) | def forward(self, x): function postprocess (line 87) | def postprocess(swapped_face, target, target_mask, smooth_mask, device): function reverse2wholeimage (line 103) | def reverse2wholeimage( FILE: src/dot/simswap/util/util.py function tensor2im (line 18) | def tensor2im(image_tensor, imtype=np.uint8, normalize=True): function tensor2label (line 36) | def tensor2label(label_tensor, n_label, imtype=np.uint8): function save_image (line 47) | def save_image(image_numpy, image_path): function mkdirs (line 52) | def mkdirs(paths): function mkdir (line 60) | def mkdir(path): function uint82bin (line 70) | def uint82bin(n, count=8): function labelcolormap (line 75) | def labelcolormap(N): function _totensor (line 134) | def _totensor(array): function load_parsing_model (line 140) | def load_parsing_model(path, use_mask, use_gpu): function crop_align (line 157) | def crop_align( class Colorize (line 192) | class Colorize(object): method __init__ (line 193) | def __init__(self, n=35): method __call__ (line 197) | def __call__(self, gray_image): FILE: src/dot/ui/ui.py class ToolTip (line 23) | class ToolTip(object): method __init__ (line 24) | def __init__(self, widget): method showtip (line 30) | def showtip(self, text): method hidetip (line 52) | def hidetip(self): class ToplevelUsageWindow (line 59) | class ToplevelUsageWindow(customtkinter.CTkToplevel): method __init__ (line 64) | def __init__(self, *args, **kwargs): class ToplevelAboutWindow (line 98) | class ToplevelAboutWindow(customtkinter.CTkToplevel): method __init__ (line 103) | def __init__(self, *args, **kwargs): class TabView (line 131) | class TabView: method __init__ (line 136) | def __init__(self, tab_view, target_tip_text, use_image=False, use_vid... method setup_ui (line 155) | def setup_ui(self): method modify_entry (line 640) | def modify_entry(self, entry_element: customtkinter.CTkEntry, text: str): method upload_action_config_file (line 652) | def upload_action_config_file( method CreateToolTip (line 706) | def CreateToolTip(self, widget, text): method start_button_event (line 718) | def start_button_event(self, error_label): method upload_folder_action (line 776) | def upload_folder_action(self, entry_element: customtkinter.CTkOptionM... method upload_file_action (line 787) | def upload_file_action(self, entry_element: customtkinter.CTkOptionMenu): method optionmenu_callback (line 798) | def optionmenu_callback(self, choice: str): class App (line 844) | class App(customtkinter.CTk): method __init__ (line 849) | def __init__(self): method usage_window (line 898) | def usage_window(self): method about_window (line 912) | def about_window(self): function main (line 928) | def main(): FILE: tests/pipeline_test.py function fake_generate (line 13) | def fake_generate(self, option, source, target, show_fps=False, **kwargs): class TestDotOptions (line 18) | class TestDotOptions(unittest.TestCase): method setUp (line 19) | def setUp(self): method test_option_creation (line 28) | def test_option_creation(self):