MCPcopy Create free account

hub / github.com/YZY-stack/DF40 / functions

Functions1,098 in github.com/YZY-stack/DF40

Functioniresnet50
(pretrained=False, progress=True, **kwargs)
DeepfakeBench_DF40/training/networks/iresnet_iid.py:183
Functionis_checkpoint_epoch
Determine if a checkpoint should be saved on current epoch. Args: cfg (CfgNode): configs to save. cur_epoch (int): current nu
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:84
Functionis_checkpoint_iter
Determine if a checkpoint should be saved on current iter. Args: cfg (CfgNode): configs to save. cur_epoch (int): current num
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:107
Functionis_eval_epoch
Determine if the model should be evaluated at the current epoch. Args: cfg (CfgNode): configs. Details can be found in sl
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/misc.py:177
Functionis_master_proc
Determines if the current process is the master process.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/distributed.py:94
Methoditer_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:129
Methoditer_tic
(self)
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:328
Methoditer_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:465
Methoditer_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:595
Methoditer_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:724
Methoditer_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:135
Methoditer_toc
(self)
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:331
Methoditer_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:471
Methoditer_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:601
Methoditer_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:730
Functionlaunch_job
Run 'func' on one or more GPUs, specified in cfg Args: cfg (CfgNode): configs. Details can be found in slowfast/config/de
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/misc.py:259
Methodload_ckpt
(self, model_path)
DeepfakeBench_DF40/training/trainer/base_trainer.py:41
Methodload_ckpt
(self, model_path)
DeepfakeBench_DF40/training/trainer/trainer.py:120
Functionload_config
Given the arguemnts, load and initialize the configs. Args: args (argument): arguments includes `shard_id`, `num_shards`,
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/parser.py:67
Functionload_model_hook
(models, input_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_ddpm.py:613
Functionload_model_hook
(models, input_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_sdxl_lora.py:674
Functionload_model_hook
(models, input_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_pixart_lora.py:541
Functionload_test_checkpoint
Loading checkpoint logic for testing.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:442
Functionload_train_checkpoint
Loading checkpoint logic for training.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:480
Methodlog_epoch_stats
Log the stats of the current epoch. Args: cur_epoch (int): the number of current epoch.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:197
Methodlog_epoch_stats
Log the stats of the current epoch. Args: cur_epoch (int): the number of current epoch.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:528
Methodlog_epoch_stats
Log the stats of the current epoch. Args: cur_epoch (int): the number of current epoch.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:657
Methodlog_epoch_stats
Log the stats of the current epoch. Args: cur_epoch (int): the number of current epoch.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:785
Methodlog_iter_stats
Log the stats. Args: cur_epoch (int): the current epoch. cur_iter (int): the current iteration.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:83
Methodlog_iter_stats
Log the stats. Args: cur_iter (int): the current iteration of testing.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:312
Methodlog_iter_stats
log the stats of the current iteration. Args: cur_epoch (int): the number of current epoch. cur_iter (int): t
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:500
Methodlog_iter_stats
log the stats of the current iteration. Args: cur_epoch (int): the number of current epoch. cur_iter (int): t
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:626
Methodlog_iter_stats
log the stats of the current iteration. Args: cur_epoch (int): the number of current epoch. cur_iter (int): t
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:761
Functionlog_json_stats
Logs json stats. Args: stats (dict): a dictionary of statistical information to log.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/logging.py:81
Functionlog_model_info
Log info, includes number of parameters, gpu usage, gflops and activation count. The model info is computed when the model is in validati
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/misc.py:150
Functionlr_func_cosine
Retrieve the learning rate to specified values at specified epoch with the cosine learning rate schedule. Details can be found in: Ilya L
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/lr_policy.py:42
Functionlr_func_steps_with_relative_lrs
Retrieve the learning rate to specified values at specified epoch with the steps with relative learning rate schedule. Args: cfg
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/lr_policy.py:60
Functionmake_checkpoint_dir
Creates the checkpoint directory (if not present already). Args: path_to_job (string): the path to the folder of the current job.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:21
Functionmask_postprocess
(mask)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:291
Functionparse_args
Parse the following arguments for a default parser for PySlowFast users. Args: shard_id (int): shard id for the current machine. Star
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/parser.py:13
Functionplot_input
Plot the input tensor with the optional bounding box and save it to disk. Args: tensor (tensor): a tensor with shape of `NxCxHxW`.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/misc.py:201
Functionprint_pass
(*objects, sep=" ", end="\n", file=sys.stdout, flush=False)
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/logging.py:23
Functionrandom_blur_img
(img)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:341
Functionrandom_deform
(pt, tgt, scale=0.3)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:106
Functionrandom_sharpen_img
(img)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:320
Functionrandom_warp_img
(img, prob=0.5)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:365
Methodregister_module
(self, module_name=None)
DeepfakeBench_DF40/training/metrics/registry.py:5
Functionremove_eyes
(image, landmarks, opt='b')
DeepfakeBench_DF40/training/dataset/utils/attribution_mask.py:19
Functionremove_mouth
(image, landmarks)
DeepfakeBench_DF40/training/dataset/utils/attribution_mask.py:10
Functionremove_nose
(image, landmarks)
DeepfakeBench_DF40/training/dataset/utils/attribution_mask.py:38
Methodreorder_landmark
(self,landmark)
DeepfakeBench_DF40/training/dataset/sbi_api.py:290
Methodreset
Reset the deque.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:391
Methodreset
Reset the Meter.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:452
Methodreset
Reset the Meter.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:581
Methodreset
Reset the Meter.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:711
Functionresnet101
Constructs a ResNet-101 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:466
Functionresnet152
Constructs a ResNet-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:477
Functionresnet18
Constructs a ResNet-18 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:433
Functionresnet34
Constructs a ResNet-34 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:444
Functionresnet50
Constructs a ResNet-50 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:455
Functionresnet_face18
(use_se=True, **kwargs)
DeepfakeBench_DF40/training/networks/resnet.py:488
Functionresnet_face62
(use_se=True, **kwargs)
DeepfakeBench_DF40/training/networks/resnet.py:493
Functionrun
Runs a function from a child process. Args: local_rank (int): rank of the current process on the current machine. num_proc (i
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/multiprocessing.py:9
Functionsave_checkpoint
Save a checkpoint. Args: model (model): model to save the weight to the checkpoint. optimizer (optim): optimizer to save the
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:152
Functionsave_checkpoint_by_iter
Save a checkpoint. Args: model (model): model to save the weight to the checkpoint. optimizer (optim): optimizer to save the
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:120
Methodsave_ckpt
(self, dataset, epoch, iters, best=False)
DeepfakeBench_DF40/training/trainer/base_trainer.py:45
Methodsave_feat
(self, phase, fea, dataset_key)
DeepfakeBench_DF40/training/trainer/trainer.py:158
Functionsave_model_card
( args, repo_id: str, images=None, repo_folder=None, )
EFS_finetune_code/diffusion_based/train_scripts/train_ddpm.py:66
Functionsave_model_hook
(models, weights, output_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_ddpm.py:602
Functionsave_model_hook
(models, weights, output_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_sdxl_lora.py:646
Functionsave_model_hook
(models, weights, output_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_pixart_lora.py:529
Methodsave_swa_ckpt
(self)
DeepfakeBench_DF40/training/trainer/trainer.py:149
Functionseamless_clone
(source, target, mask)
DeepfakeBench_DF40/training/dataset/utils/color_transfer.py:153
Functionseamless_clone
(source, target, mask)
DeepfakeBench_DF40/training/detectors/utils/color_transfer.py:153
MethodsetEval
(self)
DeepfakeBench_DF40/training/trainer/base_trainer.py:37
MethodsetTrain
(self)
DeepfakeBench_DF40/training/trainer/base_trainer.py:33
Functionset_lr
Sets the optimizer lr to the specified value. Args: optimizer (optim): the optimizer using to optimize the current network. n
DeepfakeBench_DF40/training/detectors/utils/slowfast/models/optimizer.py:95
Functionsetup_logging
Sets up the logging for multiple processes. Only enable the logging for the master process, and suppress logging for the non-master processes
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/logging.py:34
Methodspeed_up
(self)
DeepfakeBench_DF40/training/trainer/base_trainer.py:29
Functionsynchronize
Helper function to synchronize (barrier) among all processes when using distributed training
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/distributed.py:126
Methodtargets_as_params
(self)
DeepfakeBench_DF40/training/dataset/albu.py:71
Functiontest_epoch
(model, test_data_loaders)
DeepfakeBench_DF40/training/logits_confidence_dist_draw.py:161
Functiontext_encoder_lora_state_dict
(text_encoder)
EFS_finetune_code/diffusion_based/train_scripts/train_pixart_lora.py:59
Functiontopk_accuracies
Computes the top-k accuracy for each k. Args: preds (array): array of predictions. Dimension is N. labels (array): array of l
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/metrics.py:57
Functiontopk_errors
Computes the top-k error for each k. Args: preds (array): array of predictions. Dimension is N. labels (array): array of labe
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/metrics.py:45
Methodtotal
(self)
DeepfakeBench_DF40/training/dataset/utils/DeepFakeMask.py:344
Methodtotal
(self)
DeepfakeBench_DF40/training/dataset/utils/SLADD.py:132
Methodtrain
(self, mode=True)
DeepfakeBench_DF40/training/loss/vgg_loss.py:134
Functionunfreeze_net
(model: nn.Module)
DeepfakeBench_DF40/training/detectors/utils/slowfast/models/unet_helper.py:108
Methodupdate
(self, label, output)
DeepfakeBench_DF40/training/metrics/base_metrics_class.py:73
Methodupdate_long_cycle
Before every epoch, check if long cycle shape should change. If it should, update cfg accordingly. Args: cfg
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/multigrid.py:63
Methodupdate_predictions
Update predictions and labels. Args: preds (tensor): model output predictions. labels (tensor): labels.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:750
Methodupdate_stats
Update the current stats. Args: preds (tensor): prediction embedding. ori_boxes (tensor): original boxes (x1,
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:151
Methodupdate_stats
Collect the predictions from the current batch and perform on-the-flight summation as ensemble. Args: preds (tens
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:277
Methodupdate_stats
Update the current stats. Args: top1_err (float): top1 error rate. top5_err (float): top5 error rate.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:477
Methodupdate_stats
Update the current stats. Args: top1_err (float): top1 error rate. top5_err (float): top5 error rate.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:607
Methodupdate_stats
Update the current stats. Args: top1_err (float): top1 error rate. top5_err (float): top5 error rate.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:736
Functionvideo_manipulate
Processes a single video file by detecting and cropping the largest face in each frame and saving the results. Args: movie_path (str
DeepfakeBench_DF40/preprocessing/preprocess.py:215
← previous1,001–1,098 of 1,098, ranked by callers