Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YZY-stack/DF40
/ functions
Functions
1,098 in github.com/YZY-stack/DF40
⨍
Functions
1,098
◇
Types & classes
200
Function
iresnet50
(pretrained=False, progress=True, **kwargs)
DeepfakeBench_DF40/training/networks/iresnet_iid.py:183
Function
is_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
Function
is_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
Function
is_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
Function
is_master_proc
Determines if the current process is the master process.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/distributed.py:94
Method
iter_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:129
Method
iter_tic
(self)
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:328
Method
iter_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:465
Method
iter_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:595
Method
iter_tic
Start to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:724
Method
iter_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:135
Method
iter_toc
(self)
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:331
Method
iter_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:471
Method
iter_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:601
Method
iter_toc
Stop to record time.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:730
Function
launch_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
Method
load_ckpt
(self, model_path)
DeepfakeBench_DF40/training/trainer/base_trainer.py:41
Method
load_ckpt
(self, model_path)
DeepfakeBench_DF40/training/trainer/trainer.py:120
Function
load_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
Function
load_model_hook
(models, input_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_ddpm.py:613
Function
load_model_hook
(models, input_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_sdxl_lora.py:674
Function
load_model_hook
(models, input_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_pixart_lora.py:541
Function
load_test_checkpoint
Loading checkpoint logic for testing.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:442
Function
load_train_checkpoint
Loading checkpoint logic for training.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/checkpoint.py:480
Method
log_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
Method
log_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
Method
log_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
Method
log_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
Method
log_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
Method
log_iter_stats
Log the stats. Args: cur_iter (int): the current iteration of testing.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:312
Method
log_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
Method
log_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
Method
log_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
Function
log_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
Function
log_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
Function
lr_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
Function
lr_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
Function
make_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
Function
mask_postprocess
(mask)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:291
Function
parse_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
Function
plot_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
Function
print_pass
(*objects, sep=" ", end="\n", file=sys.stdout, flush=False)
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/logging.py:23
Function
random_blur_img
(img)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:341
Function
random_deform
(pt, tgt, scale=0.3)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:106
Function
random_sharpen_img
(img)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:320
Function
random_warp_img
(img, prob=0.5)
DeepfakeBench_DF40/training/dataset/utils/face_blend.py:365
Method
register_module
(self, module_name=None)
DeepfakeBench_DF40/training/metrics/registry.py:5
Function
remove_eyes
(image, landmarks, opt='b')
DeepfakeBench_DF40/training/dataset/utils/attribution_mask.py:19
Function
remove_mouth
(image, landmarks)
DeepfakeBench_DF40/training/dataset/utils/attribution_mask.py:10
Function
remove_nose
(image, landmarks)
DeepfakeBench_DF40/training/dataset/utils/attribution_mask.py:38
Method
reorder_landmark
(self,landmark)
DeepfakeBench_DF40/training/dataset/sbi_api.py:290
Method
reset
Reset the deque.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:391
Method
reset
Reset the Meter.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:452
Method
reset
Reset the Meter.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:581
Method
reset
Reset the Meter.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:711
Function
resnet101
Constructs a ResNet-101 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:466
Function
resnet152
Constructs a ResNet-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:477
Function
resnet18
Constructs a ResNet-18 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:433
Function
resnet34
Constructs a ResNet-34 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:444
Function
resnet50
Constructs a ResNet-50 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
DeepfakeBench_DF40/training/networks/resnet.py:455
Function
resnet_face18
(use_se=True, **kwargs)
DeepfakeBench_DF40/training/networks/resnet.py:488
Function
resnet_face62
(use_se=True, **kwargs)
DeepfakeBench_DF40/training/networks/resnet.py:493
Function
run
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
Function
save_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
Function
save_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
Method
save_ckpt
(self, dataset, epoch, iters, best=False)
DeepfakeBench_DF40/training/trainer/base_trainer.py:45
Method
save_feat
(self, phase, fea, dataset_key)
DeepfakeBench_DF40/training/trainer/trainer.py:158
Function
save_model_card
( args, repo_id: str, images=None, repo_folder=None, )
EFS_finetune_code/diffusion_based/train_scripts/train_ddpm.py:66
Function
save_model_hook
(models, weights, output_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_ddpm.py:602
Function
save_model_hook
(models, weights, output_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_sdxl_lora.py:646
Function
save_model_hook
(models, weights, output_dir)
EFS_finetune_code/diffusion_based/train_scripts/train_pixart_lora.py:529
Method
save_swa_ckpt
(self)
DeepfakeBench_DF40/training/trainer/trainer.py:149
Function
seamless_clone
(source, target, mask)
DeepfakeBench_DF40/training/dataset/utils/color_transfer.py:153
Function
seamless_clone
(source, target, mask)
DeepfakeBench_DF40/training/detectors/utils/color_transfer.py:153
Method
setEval
(self)
DeepfakeBench_DF40/training/trainer/base_trainer.py:37
Method
setTrain
(self)
DeepfakeBench_DF40/training/trainer/base_trainer.py:33
Function
set_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
Function
setup_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
Method
speed_up
(self)
DeepfakeBench_DF40/training/trainer/base_trainer.py:29
Function
synchronize
Helper function to synchronize (barrier) among all processes when using distributed training
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/distributed.py:126
Method
targets_as_params
(self)
DeepfakeBench_DF40/training/dataset/albu.py:71
Function
test_epoch
(model, test_data_loaders)
DeepfakeBench_DF40/training/logits_confidence_dist_draw.py:161
Function
text_encoder_lora_state_dict
(text_encoder)
EFS_finetune_code/diffusion_based/train_scripts/train_pixart_lora.py:59
Function
topk_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
Function
topk_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
Method
total
(self)
DeepfakeBench_DF40/training/dataset/utils/DeepFakeMask.py:344
Method
total
(self)
DeepfakeBench_DF40/training/dataset/utils/SLADD.py:132
Method
train
(self, mode=True)
DeepfakeBench_DF40/training/loss/vgg_loss.py:134
Function
unfreeze_net
(model: nn.Module)
DeepfakeBench_DF40/training/detectors/utils/slowfast/models/unet_helper.py:108
Method
update
(self, label, output)
DeepfakeBench_DF40/training/metrics/base_metrics_class.py:73
Method
update_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
Method
update_predictions
Update predictions and labels. Args: preds (tensor): model output predictions. labels (tensor): labels.
DeepfakeBench_DF40/training/detectors/utils/slowfast/utils/meters.py:750
Method
update_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
Method
update_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
Method
update_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
Method
update_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
Method
update_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
Function
video_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
← previous
1,001–1,098 of 1,098, ranked by callers