Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JunlinHan/DCLGAN
/ functions
Functions
313 in github.com/JunlinHan/DCLGAN
⨍
Functions
313
◇
Types & classes
76
↓ 30 callers
Method
__init__
Initialize the GANLoss class. Parameters: gan_mode (str) - - the type of GAN objective. It currently supports vanilla, lsgan, an
models/networks.py:346
↓ 19 callers
Method
__init__
(self, kernel, pad, upsample_factor=1)
models/stylegan_networks.py:140
↓ 18 callers
Function
norm_layer
(x)
models/networks.py:127
↓ 17 callers
Method
backward
Calculate losses, gradients, and update network weights; called in every training iteration
models/template_model.py:87
↓ 10 callers
Method
save
save the current content to the HMTL file
util/html.py:68
↓ 10 callers
Method
set_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
↓ 6 callers
Function
get_transform
(opt, params=None, grayscale=False, method=Image.BICUBIC, convert=True)
data/base_dataset.py:82
↓ 6 callers
Function
init_net
Initialize a network: 1. register CPU/GPU device (with multi-GPU support); 2. initialize the network weights Parameters: net (network)
models/networks.py:198
↓ 6 callers
Function
make_dataset
(dir, max_dataset_size=float("inf"))
data/image_folder.py:24
↓ 6 callers
Method
parse
Parse our options, create checkpoints directory suffix, and set up gpu device.
options/base_options.py:141
↓ 6 callers
Method
query
Return an image from the pool. Parameters: images: the latest generated images from the generator Returns images from th
util/image_pool.py:23
↓ 4 callers
Method
create_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 callers
Function
get_file_paths
(folder)
datasets/make_dataset_aligned.py:6
↓ 3 callers
Method
add_header
Insert a header to the HTML file Parameters: text (str) -- the header text
util/html.py:39
↓ 3 callers
Method
add_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 callers
Function
cat_feature
(x, y)
models/networks.py:794
↓ 3 callers
Function
create_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 callers
Method
get
Download a dataset. Parameters: save_path (str) -- A directory to save the data to. dataset (str) -- (opt
util/get_data.py:79
↓ 3 callers
Function
make_kernel
(k)
models/stylegan_networks.py:86
↓ 3 callers
Method
save_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 callers
Method
set_input
Unpack input data from the dataloader and perform necessary pre-processing steps. Parameters: input (dict): include the data itsel
models/dcl_model.py:151
↓ 3 callers
Function
upfirdn2d
(input, kernel, up=1, down=1, pad=(0, 0))
models/stylegan_networks.py:74
↓ 2 callers
Function
__random_zoom
(img, target_width, crop_width, method=Image.BICUBIC, factor=None)
data/base_dataset.py:144
↓ 2 callers
Method
_print
(self, text)
util/get_data.py:35
↓ 2 callers
Function
align_images
(a_file_paths, b_file_paths, target_path)
datasets/make_dataset_aligned.py:20
↓ 2 callers
Method
backward_D_A
Calculate GAN loss for discriminator D_A
models/dcl_model.py:192
↓ 2 callers
Method
backward_D_A
Calculate GAN loss for discriminator D_A
models/simdcl_model.py:210
↓ 2 callers
Method
backward_D_B
Calculate GAN loss for discriminator D_B
models/dcl_model.py:197
↓ 2 callers
Method
backward_D_B
Calculate GAN loss for discriminator D_B
models/simdcl_model.py:215
↓ 2 callers
Method
backward_D_basic
Calculate GAN loss for the discriminator Parameters: netD (network) -- the discriminator D real (tensor array) --
models/dcl_model.py:171
↓ 2 callers
Method
backward_D_basic
Calculate GAN loss for the discriminator Parameters: netD (network) -- the discriminator D real (tensor array) --
models/simdcl_model.py:189
↓ 2 callers
Method
backward_D_basic
Calculate GAN loss for the discriminator Parameters: netD (network) -- the discriminator D real (tensor array)
models/cycle_gan_model.py:111
↓ 2 callers
Method
calculate_NCE_loss
(self, src, tgt)
models/cut_model.py:188
↓ 2 callers
Method
calculate_NCE_loss
(self, src, tgt)
models/fastcut_model.py:192
↓ 2 callers
Method
compute_D_loss
Calculate GAN loss for the discriminator
models/cut_model.py:149
↓ 2 callers
Method
compute_D_loss
Calculate GAN loss for the discriminator
models/fastcut_model.py:153
↓ 2 callers
Method
compute_G_loss
Calculate GAN and NCE loss for the generator
models/dcl_model.py:202
↓ 2 callers
Method
compute_G_loss
Calculate GAN and NCE loss for the generator
models/simdcl_model.py:220
↓ 2 callers
Method
compute_G_loss
Calculate GAN and NCE loss for the generator
models/cut_model.py:164
↓ 2 callers
Method
compute_G_loss
Calculate GAN and NCE loss for the generator
models/fastcut_model.py:168
↓ 2 callers
Method
compute_visuals
Calculate additional output images for visdom and HTML visualization
models/base_model.py:129
↓ 2 callers
Function
create_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 callers
Method
data_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/dcl_model.py:110
↓ 2 callers
Function
find_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 callers
Function
find_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 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/dcl_model.py:162
↓ 2 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/simdcl_model.py:180
↓ 2 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/cut_model.py:136
↓ 2 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/fastcut_model.py:140
↓ 2 callers
Function
fused_leaky_relu
(input, bias, negative_slope=0.2, scale=2 ** 0.5)
models/stylegan_networks.py:17
↓ 2 callers
Method
get_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 callers
Function
get_filter
(filt_size=3)
models/networks.py:15
↓ 2 callers
Function
get_norm_layer
Return a normalization layer Parameters: norm_type (str) -- the name of the normalization layer: batch | instance | none For BatchNo
models/networks.py:113
↓ 2 callers
Function
get_pad_layer
(pad_type)
models/networks.py:96
↓ 2 callers
Function
load_resized_img
(path)
datasets/prepare_cityscapes_dataset.py:18
↓ 2 callers
Function
mkdir
create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
util/util.py:133
↓ 2 callers
Method
parallelize
(self)
models/base_model.py:103
↓ 2 callers
Function
process_cityscapes
(gtFine_dir, leftImg8bit_dir, output_dir, phase)
datasets/prepare_cityscapes_dataset.py:30
↓ 2 callers
Method
setup
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 callers
Function
__crop
(img, pos, size)
data/base_dataset.py:192
↓ 1 callers
Function
__flip
(img, flip)
data/base_dataset.py:217
↓ 1 callers
Method
__init__
(self, opt)
models/patchnce.py:14
↓ 1 callers
Function
__make_power_2
(img, base, method=Image.BICUBIC)
data/base_dataset.py:134
↓ 1 callers
Function
__patch
(img, index, size)
data/base_dataset.py:201
↓ 1 callers
Function
__scale_shortside
(img, target_width, crop_width, method=Image.BICUBIC)
data/base_dataset.py:156
↓ 1 callers
Function
__scale_width
(img, target_width, crop_width, method=Image.BICUBIC)
data/base_dataset.py:183
↓ 1 callers
Function
__trim
(img, trim_width)
data/base_dataset.py:166
↓ 1 callers
Method
_download_data
(self, dataset_url, save_path)
util/get_data.py:56
↓ 1 callers
Method
_get_options
(r)
util/get_data.py:40
↓ 1 callers
Method
_get_similarity_function
(self)
models/patchnce.py:22
↓ 1 callers
Method
_present_options
(self)
util/get_data.py:46
↓ 1 callers
Method
backward_D_A
Calculate GAN loss for discriminator D_A
models/cycle_gan_model.py:131
↓ 1 callers
Method
backward_D_B
Calculate GAN loss for discriminator D_B
models/cycle_gan_model.py:136
↓ 1 callers
Method
backward_G
Calculate the loss for generators G_A and G_B
models/cycle_gan_model.py:141
↓ 1 callers
Method
build_conv_block
Construct a convolutional block. Parameters: dim (int) -- the number of channels in the conv layer. padding
models/networks.py:1165
↓ 1 callers
Method
calculate_NCE_loss1
(self, src, tgt)
models/dcl_model.py:235
↓ 1 callers
Method
calculate_NCE_loss2
(self, src, tgt)
models/dcl_model.py:247
↓ 1 callers
Method
calculate_Sim_loss_all
(self, src1, tgt1, src2, tgt2)
models/simdcl_model.py:245
↓ 1 callers
Function
check_matching_pair
(segmap_path, photo_path)
datasets/prepare_cityscapes_dataset.py:22
↓ 1 callers
Method
create_mlp
(self, x)
models/networks.py:532
↓ 1 callers
Method
create_mlp
(self, feats)
models/networks.py:578
↓ 1 callers
Method
decode
(self, content, style=None)
models/networks.py:630
↓ 1 callers
Function
detect_cat
(img_path, cat_cascade, output_dir, ratio=0.05, border_ratio=0.25)
datasets/detect_cat_face.py:25
↓ 1 callers
Method
display_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 callers
Method
eval
Make models eval mode during test time
models/base_model.py:112
↓ 1 callers
Function
find_launcher_using_name
(launcher_name)
experiments/__main__.py:5
↓ 1 callers
Function
find_launcher_using_name
(launcher_name)
experiments/__init__.py:5
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/cycle_gan_model.py:104
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/base_model.py:80
↓ 1 callers
Method
forward
(self, image)
models/networks.py:656
↓ 1 callers
Method
forward
Run forward pass. This will be called by both functions <optimize_parameters> and <test>.
models/template_model.py:83
↓ 1 callers
Method
forward
(self, input)
models/stylegan_networks.py:152
↓ 1 callers
Method
gather_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 callers
Method
get_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 callers
Function
get_file_paths
(folder)
datasets/detect_cat_face.py:7
↓ 1 callers
Method
get_image_dir
Return the directory that stores images
util/html.py:35
↓ 1 callers
Method
get_image_paths
Return image paths that are used to load current data
models/base_model.py:133
↓ 1 callers
Method
get_target_tensor
Create label tensors with the same size as the input. Parameters: prediction (tensor) - - tpyically the prediction from a discrim
models/networks.py:372
↓ 1 callers
Function
init_weights
Initialize network weights. Parameters: net (network) -- network to be initialized init_type (str) -- the name of an initializa
models/networks.py:163
↓ 1 callers
Method
initialize
Define the common options that are used in both training and test.
options/base_options.py:23
next →
1–100 of 313, ranked by callers