MCPcopy Create free account

hub / github.com/CHENGY12/DMML / functions

Functions54 in github.com/CHENGY12/DMML

↓ 4 callersFunctioneuclidean_dist
Compute (Squared) Euclidean distance between two tensors. Args: x: input tensor with size N x D. y: input tensor with size M
loss/common.py:4
↓ 4 callersFunctionget_mask
Generate positive and negative masks for contrastive and triplet loss.
loss/common.py:45
↓ 4 callersMethodid
file_path: unix style file path return: person id
data/duke.py:45
↓ 3 callersMethodid
file_path: unix style file path return: person id
data/market1501.py:46
↓ 2 callersFunctionextract_feature
Extract query and gallery features.
eval.py:133
↓ 2 callersFunctionget_id
Get camera ids and class labels of images.
utils.py:25
↓ 2 callersFunctionlist_pictures
(directory, ext='jpg|jpeg|bmp|png|ppm')
data/common.py:5
↓ 2 callersFunctionmain
Configs
eval.py:21
↓ 1 callersMethod_sample
(population, k)
data/sampler.py:43
↓ 1 callersFunctionadjust_lr_exp
Adjust learning rate exponentially from a given epoch to the end of training.
train.py:58
↓ 1 callersMethodcamera
file_path: unix style file path return: camera id
data/duke.py:53
↓ 1 callersMethodcamera
file_path: unix style file path return: camera id
data/market1501.py:54
↓ 1 callersFunctioncompute_map
Compute mean average precision (mAP) and cumulative matching characteristic (CMC) scores.
utils.py:43
↓ 1 callersFunctioncosine_dist
(x, y)
loss/common.py:30
↓ 1 callersFunctioneval
(gid, dataset, dataset_root, which, exp_dir)
eval.py:16
↓ 1 callersFunctionevaluate
Evaluation
eval.py:173
↓ 1 callersFunctionflip_img
Do horizontal flipping for a given image.
utils.py:16
↓ 1 callersFunctionget_parser
()
config.py:6
↓ 1 callersFunctioninit_seed
Set random seed for torch and numpy.
train.py:19
↓ 1 callersFunctionmain
Configs
train.py:143
↓ 1 callersFunctionmake_dataloader
Make train dataloader. Args: epoch: current epoch number, used in random erasing data augmentation.
data/__init__.py:13
↓ 1 callersFunctionmake_loss
Construct loss function(s).
loss/__init__.py:9
↓ 1 callersFunctionmake_model
Initialize ResNet-50 model.
train.py:33
↓ 1 callersFunctiontrain
Training
train.py:72
Method__call__
(self, img)
data/random_erasing.py:25
Method__getitem__
(self, index)
data/duke.py:31
Method__getitem__
(self, index)
data/market1501.py:32
Method__init__
(self, num_classes=None, include_top=False, remove_downsample=False)
model.py:9
Method__init__
(self, dataset_root, transform, split='train')
data/duke.py:13
Method__init__
(self, dataset_root, transform, split='train')
data/market1501.py:13
Method__init__
(self, data_source, batch_k)
data/sampler.py:11
Method__init__
(self, probability=0.5, s_epoch=0.1, ratio=0.3, mean=[0.4914, 0.4822, 0.4465])
data/random_erasing.py:18
Method__init__
(self, reg_lambda=0.002, gid=None)
loss/npair.py:13
Method__init__
(self, margin)
loss/triplet.py:15
Method__init__
(self, num_support, distance_mode='hard_mining', margin=0.4, gid=None)
loss/dmml.py:18
Method__init__
(self, margin)
loss/contrastive.py:14
Method__init__
(self, margin=0.4, gid=None)
loss/lifted.py:11
Method__iter__
(self)
data/sampler.py:30
Method__len__
(self)
data/duke.py:41
Method__len__
(self)
data/market1501.py:42
Method__len__
(self)
data/sampler.py:39
Methodcameras
return: camera id list corresponding to dataset image paths
data/duke.py:75
Methodcameras
return: camera id list corresponding to dataset image paths
data/market1501.py:76
Functionfloat_or_string
Tries to convert the string to float, otherwise returns the string.
utils.py:6
Methodforward
(self, x)
model.py:23
Methodforward
(self, feature, label)
loss/npair.py:18
Methodforward
(self, feature, label)
loss/triplet.py:21
Methodforward
(self, feature, label)
loss/dmml.py:31
Methodforward
(self, feature, label)
loss/contrastive.py:20
Methodforward
(self, features, labels)
loss/lifted.py:16
Methodids
return: person id list corresponding to dataset image paths
data/duke.py:61
Methodids
return: person id list corresponding to dataset image paths
data/market1501.py:62
Methodunique_ids
return: unique person ids in ascending order
data/duke.py:68
Methodunique_ids
return: unique person ids in ascending order
data/market1501.py:69