MCPcopy Create free account

hub / github.com/WeilunWang/NEGCUT / functions

Functions264 in github.com/WeilunWang/NEGCUT

↓ 19 callersMethod__init__
(self, kernel, pad, upsample_factor=1)
models/stylegan_networks.py:140
↓ 13 callersFunctionnorm_layer
(x)
models/utils.py:198
↓ 10 callersMethodbackward
Calculate losses, gradients, and update network weights; called in every training iteration
models/template_model.py:87
↓ 10 callersMethodsave
save the current content to the HMTL file
util/html.py:68
↓ 7 callersFunctioninit_net
Initialize a network: 1. register CPU/GPU device (with multi-GPU support); 2. initialize the network weights Parameters: net (network)
models/utils.py:161
↓ 6 callersFunctionget_transform
(opt, params=None, grayscale=False, method=Image.BICUBIC, convert=True)
data/base_dataset.py:82
↓ 6 callersFunctionmake_dataset
(dir, max_dataset_size=float("inf"))
data/image_folder.py:24
↓ 6 callersMethodparse
Parse our options, create checkpoints directory suffix, and set up gpu device.
options/base_options.py:141
↓ 6 callersMethodset_requires_grad
Set requies_grad=Fasle for all the networks to avoid unnecessary computations Parameters: nets (network list) -- a list of netwo
models/base_model.py:244
↓ 4 callersMethod__init__
(self)
models/feature_extractor.py:38
↓ 4 callersMethodcalculate_NCE_loss
(self, src, tgt, use_neg=False)
models/negcut_model.py:248
↓ 4 callersMethodcreate_visdom_connections
If the program could not connect to Visdom server, this function will start a new server at port < self.port >
util/visualizer.py:99
↓ 4 callersFunctionget_file_paths
(folder)
datasets/make_dataset_aligned.py:6
↓ 3 callersMethodadd_header
Insert a header to the HTML file Parameters: text (str) -- the header text
util/html.py:39
↓ 3 callersMethodadd_images
add images to the HTML file Parameters: ims (str list) -- a list of image paths txts (str list) -- a list of image
util/html.py:48
↓ 3 callersFunctioncreate_dataset
Create a dataset given the option. This function wraps the class CustomDatasetDataLoader. This is the main interface between this package
data/__init__.py:47
↓ 3 callersFunctiondefine_F
(input_nc, netF, norm='batch', use_dropout=False, init_type='normal', init_gain=0.02, no_antiali
models/feature_extractor.py:8
↓ 3 callersMethodget
Download a dataset. Parameters: save_path (str) -- A directory to save the data to. dataset (str) -- (opt
util/get_data.py:79
↓ 3 callersFunctionmake_kernel
(k)
models/stylegan_networks.py:86
↓ 3 callersMethodsave_networks
Save all the networks to the disk. Parameters: epoch (int) -- current epoch; used in the file name '%s_net_%s.pth' % (epoch, name
models/base_model.py:164
↓ 3 callersMethodset_input
Unpack input data from the dataloader and perform necessary pre-processing steps. Parameters: input (dict): include the data itsel
models/cut_model.py:137
↓ 3 callersFunctionupfirdn2d
(input, kernel, up=1, down=1, pad=(0, 0))
models/stylegan_networks.py:74
↓ 2 callersMethod__init__
(self, power=2)
models/negative_generator.py:19
↓ 2 callersMethod__init__
Construct a 1x1 PatchGAN discriminator Parameters: input_nc (int) -- the number of channels in input images ndf
models/discriminator.py:126
↓ 2 callersMethod__init__
(self, channels, pad_type='repl', filt_size=4, stride=2)
models/utils.py:62
↓ 2 callersMethod__init__
Initialize the GANLoss class. Parameters: gan_mode (str) - - the type of GAN objective. It currently supports vanilla, lsgan, an
models/losses.py:121
↓ 2 callersMethod__init__
Construct a Unet generator Parameters: input_nc (int) -- the number of channels in input images output_nc (int) --
models/generator.py:166
↓ 2 callersFunction__random_zoom
(img, target_width, crop_width, method=Image.BICUBIC, factor=None)
data/base_dataset.py:144
↓ 2 callersMethod_print
(self, text)
util/get_data.py:35
↓ 2 callersFunctionalign_images
(a_file_paths, b_file_paths, target_path)
datasets/make_dataset_aligned.py:20
↓ 2 callersMethodcalculate_NCE_loss
(self, src, tgt)
models/cut_model.py:200
↓ 2 callersMethodcompute_D_loss
Calculate GAN loss for the discriminator
models/cut_model.py:161
↓ 2 callersMethodcompute_D_loss
Calculate GAN loss for the discriminator
models/negcut_model.py:181
↓ 2 callersMethodcompute_G_loss
Calculate GAN and NCE loss for the generator
models/cut_model.py:176
↓ 2 callersMethodcompute_G_loss
Calculate GAN and NCE loss for the generator
models/negcut_model.py:224
↓ 2 callersMethodcompute_visuals
Calculate additional output images for visdom and HTML visualization
models/base_model.py:129
↓ 2 callersFunctioncreate_model
Create a model given the option. This function warps the class CustomDatasetDataLoader. This is the main interface between this package and '
models/__init__.py:54
↓ 2 callersMethoddata_dependent_initialize
The feature network netF is defined in terms of the shape of the intermediate, extracted features of the encoder portion of netG. Bec
models/cut_model.py:96
↓ 2 callersFunctiondefine_D
Create a discriminator Parameters: input_nc (int) -- the number of channels in input images ndf (int) -- the num
models/discriminator.py:9
↓ 2 callersFunctiondefine_G
Create a generator Parameters: input_nc (int) -- the number of channels in input images output_nc (int) -- the number of chan
models/generator.py:9
↓ 2 callersFunctionfind_dataset_using_name
Import the module "data/[dataset_name]_dataset.py". In the file, the class called DatasetNameDataset() will be instantiated. It has to be a s
data/__init__.py:18
↓ 2 callersFunctionfind_model_using_name
Import the module "models/[model_name]_model.py". In the file, the class called DatasetNameModel() will be instantiated. It has to be a subcl
models/__init__.py:25
↓ 2 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/cut_model.py:148
↓ 2 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/negcut_model.py:168
↓ 2 callersFunctionfused_leaky_relu
(input, bias, negative_slope=0.2, scale=2 ** 0.5)
models/stylegan_networks.py:17
↓ 2 callersMethodget_current_visuals
Return visualization images. train.py will display these images with visdom, and save the images to a HTML
models/base_model.py:148
↓ 2 callersFunctionget_filter
(filt_size=3)
models/utils.py:13
↓ 2 callersFunctionget_norm_layer
Return a normalization layer Parameters: norm_type (str) -- the name of the normalization layer: batch | instance | none For BatchNo
models/utils.py:184
↓ 2 callersFunctionget_pad_layer
(pad_type)
models/utils.py:84
↓ 2 callersFunctionload_resized_img
(path)
datasets/prepare_cityscapes_dataset.py:18
↓ 2 callersFunctionmkdir
create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
util/util.py:133
↓ 2 callersMethodparallelize
(self)
models/base_model.py:103
↓ 2 callersFunctionprocess_cityscapes
(gtFine_dir, leftImg8bit_dir, output_dir, phase)
datasets/prepare_cityscapes_dataset.py:30
↓ 2 callersMethodsetup
Load and print networks; create schedulers Parameters: opt (Option class) -- stores all the experiment flags; needs to be a subcl
models/base_model.py:89
↓ 1 callersMethodR1_loss
(self, real_pred, real_img)
models/sinnegcut_model.py:70
↓ 1 callersMethodR1_loss
(self, real_pred, real_img)
models/sincut_model.py:76
↓ 1 callersFunction__crop
(img, pos, size)
data/base_dataset.py:192
↓ 1 callersFunction__flip
(img, flip)
data/base_dataset.py:217
↓ 1 callersFunction__make_power_2
(img, base, method=Image.BICUBIC)
data/base_dataset.py:134
↓ 1 callersFunction__patch
(img, index, size)
data/base_dataset.py:201
↓ 1 callersFunction__scale_shortside
(img, target_width, crop_width, method=Image.BICUBIC)
data/base_dataset.py:156
↓ 1 callersFunction__scale_width
(img, target_width, crop_width, method=Image.BICUBIC)
data/base_dataset.py:183
↓ 1 callersFunction__trim
(img, trim_width)
data/base_dataset.py:166
↓ 1 callersMethod_download_data
(self, dataset_url, save_path)
util/get_data.py:56
↓ 1 callersMethod_get_options
(r)
util/get_data.py:40
↓ 1 callersMethod_present_options
(self)
util/get_data.py:46
↓ 1 callersFunctionaccumulate
(model1, model2, decay=0.9)
models/negcut_model.py:12
↓ 1 callersMethodbuild_conv_block
Construct a convolutional block. Parameters: dim (int) -- the number of channels in the conv layer. padding
models/utils.py:227
↓ 1 callersFunctioncheck_matching_pair
(segmap_path, photo_path)
datasets/prepare_cityscapes_dataset.py:22
↓ 1 callersMethodcompute_N_loss
Calculate Adversarial loss for the negative samples
models/negcut_model.py:196
↓ 1 callersMethodcreate_layers
(self, feats)
models/negative_generator.py:67
↓ 1 callersMethodcreate_mlp
(self, x)
models/feature_extractor.py:73
↓ 1 callersMethodcreate_mlp
(self, feats)
models/feature_extractor.py:119
↓ 1 callersFunctiondefine_N
(nce_layers, netN, init_type='normal', init_gain=0.02, gpu_ids=[], opt=None)
models/negative_generator.py:6
↓ 1 callersFunctiondetect_cat
(img_path, cat_cascade, output_dir, ratio=0.05, border_ratio=0.25)
datasets/detect_cat_face.py:25
↓ 1 callersMethoddisplay_current_results
Display current results on visdom; save current results to an HTML file. Parameters: visuals (OrderedDict) - - dictionary of imag
util/visualizer.py:106
↓ 1 callersMethodeval
Make models eval mode during test time
models/base_model.py:112
↓ 1 callersMethodforward
Standard forward.
models/discriminator.py:150
↓ 1 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/base_model.py:80
↓ 1 callersMethodforward
Run forward pass. This will be called by both functions <optimize_parameters> and <test>.
models/template_model.py:83
↓ 1 callersMethodforward
(self, input)
models/stylegan_networks.py:152
↓ 1 callersMethodgather_options
Initialize our parser with basic options(only once). Add additional model-specific and dataset-specific options. These options are def
options/base_options.py:75
↓ 1 callersMethodget_current_losses
Return traning losses / errors. train.py will print out these errors on console, and save them to a file
models/base_model.py:156
↓ 1 callersFunctionget_file_paths
(folder)
datasets/detect_cat_face.py:7
↓ 1 callersMethodget_image_dir
Return the directory that stores images
util/html.py:35
↓ 1 callersMethodget_image_paths
Return image paths that are used to load current data
models/base_model.py:133
↓ 1 callersMethodget_target_tensor
Create label tensors with the same size as the input. Parameters: prediction (tensor) - - tpyically the prediction from a discrim
models/losses.py:145
↓ 1 callersFunctioninit_weights
Initialize network weights. Parameters: net (network) -- network to be initialized init_type (str) -- the name of an initializa
models/utils.py:126
↓ 1 callersMethodinitialize
Define the common options that are used in both training and test.
options/base_options.py:23
↓ 1 callersFunctionis_image_file
(filename)
data/image_folder.py:20
↓ 1 callersMethodload_data
(self)
data/__init__.py:86
↓ 1 callersMethodload_networks
Load all the networks from the disk. Parameters: epoch (int) -- current epoch; used in the file name '%s_net_%s.pth' % (epoch, na
models/base_model.py:196
↓ 1 callersMethodoptimize_parameters
(self)
models/cut_model.py:115
↓ 1 callersMethodplot_current_losses
display the current losses on visdom display: dictionary of error labels and values Parameters: epoch (int) -- current
util/visualizer.py:191
↓ 1 callersMethodprint_current_losses
print current losses on console; also save the losses to the disk Parameters: epoch (int) -- current epoch iters (int
util/visualizer.py:226
↓ 1 callersMethodprint_networks
Print the total number of parameters in the network and (if verbose) network architecture Parameters: verbose (bool) -- if verbos
models/base_model.py:226
↓ 1 callersMethodprint_options
Print and save options It will print both current options and default values(if different). It will save options into a text file / [
options/base_options.py:112
↓ 1 callersMethodreset
Reset the self.saved status
util/visualizer.py:95
↓ 1 callersFunctionsave_images
Save images to the disk. Parameters: webpage (the HTML class) -- the HTML webpage class that stores these imaegs (see html.py for more de
util/visualizer.py:15
↓ 1 callersMethodset_epoch
(self, epoch)
data/__init__.py:83
next →1–100 of 264, ranked by callers