Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CHENGY12/DMML
/ functions
Functions
54 in github.com/CHENGY12/DMML
⨍
Functions
54
◇
Types & classes
10
↓ 4 callers
Function
euclidean_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 callers
Function
get_mask
Generate positive and negative masks for contrastive and triplet loss.
loss/common.py:45
↓ 4 callers
Method
id
file_path: unix style file path return: person id
data/duke.py:45
↓ 3 callers
Method
id
file_path: unix style file path return: person id
data/market1501.py:46
↓ 2 callers
Function
extract_feature
Extract query and gallery features.
eval.py:133
↓ 2 callers
Function
get_id
Get camera ids and class labels of images.
utils.py:25
↓ 2 callers
Function
list_pictures
(directory, ext='jpg|jpeg|bmp|png|ppm')
data/common.py:5
↓ 2 callers
Function
main
Configs
eval.py:21
↓ 1 callers
Method
_sample
(population, k)
data/sampler.py:43
↓ 1 callers
Function
adjust_lr_exp
Adjust learning rate exponentially from a given epoch to the end of training.
train.py:58
↓ 1 callers
Method
camera
file_path: unix style file path return: camera id
data/duke.py:53
↓ 1 callers
Method
camera
file_path: unix style file path return: camera id
data/market1501.py:54
↓ 1 callers
Function
compute_map
Compute mean average precision (mAP) and cumulative matching characteristic (CMC) scores.
utils.py:43
↓ 1 callers
Function
cosine_dist
(x, y)
loss/common.py:30
↓ 1 callers
Function
eval
(gid, dataset, dataset_root, which, exp_dir)
eval.py:16
↓ 1 callers
Function
evaluate
Evaluation
eval.py:173
↓ 1 callers
Function
flip_img
Do horizontal flipping for a given image.
utils.py:16
↓ 1 callers
Function
get_parser
()
config.py:6
↓ 1 callers
Function
init_seed
Set random seed for torch and numpy.
train.py:19
↓ 1 callers
Function
main
Configs
train.py:143
↓ 1 callers
Function
make_dataloader
Make train dataloader. Args: epoch: current epoch number, used in random erasing data augmentation.
data/__init__.py:13
↓ 1 callers
Function
make_loss
Construct loss function(s).
loss/__init__.py:9
↓ 1 callers
Function
make_model
Initialize ResNet-50 model.
train.py:33
↓ 1 callers
Function
train
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
Method
cameras
return: camera id list corresponding to dataset image paths
data/duke.py:75
Method
cameras
return: camera id list corresponding to dataset image paths
data/market1501.py:76
Function
float_or_string
Tries to convert the string to float, otherwise returns the string.
utils.py:6
Method
forward
(self, x)
model.py:23
Method
forward
(self, feature, label)
loss/npair.py:18
Method
forward
(self, feature, label)
loss/triplet.py:21
Method
forward
(self, feature, label)
loss/dmml.py:31
Method
forward
(self, feature, label)
loss/contrastive.py:20
Method
forward
(self, features, labels)
loss/lifted.py:16
Method
ids
return: person id list corresponding to dataset image paths
data/duke.py:61
Method
ids
return: person id list corresponding to dataset image paths
data/market1501.py:62
Method
unique_ids
return: unique person ids in ascending order
data/duke.py:68
Method
unique_ids
return: unique person ids in ascending order
data/market1501.py:69