SYMBOL INDEX (220 symbols across 36 files) FILE: clustercontrast/datasets/__init__.py function names (line 20) | def names(): function create (line 24) | def create(name, root, *args, **kwargs): function get_dataset (line 47) | def get_dataset(name, root, *args, **kwargs): FILE: clustercontrast/datasets/dukemtmcreid.py function process_dir (line 7) | def process_dir(dir_path, relabel=False): class DukeMTMCreID (line 37) | class DukeMTMCreID(BaseImageDataset): method __init__ (line 55) | def __init__(self, root, verbose=True): method _check_before_run (line 76) | def _check_before_run(self): FILE: clustercontrast/datasets/market1501.py class Market1501 (line 8) | class Market1501(BaseImageDataset): method __init__ (line 21) | def __init__(self, root, verbose=True, **kwargs): method _check_before_run (line 46) | def _check_before_run(self): method _process_dir (line 57) | def _process_dir(self, dir_path, relabel=False): FILE: clustercontrast/datasets/msmt17.py function _process_dir (line 9) | def _process_dir(dir_path, relabel=False): class MSMT17 (line 34) | class MSMT17(BaseImageDataset): method __init__ (line 37) | def __init__(self, root, verbose=True, **kwargs): method _check_before_run (line 62) | def _check_before_run(self): FILE: clustercontrast/datasets/personx.py class PersonX (line 9) | class PersonX(BaseImageDataset): method __init__ (line 21) | def __init__(self, root, verbose=True, **kwargs): method _check_before_run (line 46) | def _check_before_run(self): method _process_dir (line 57) | def _process_dir(self, dir_path, relabel=False): FILE: clustercontrast/datasets/veri.py class VeRi (line 12) | class VeRi(BaseImageDataset): method __init__ (line 24) | def __init__(self, root, verbose=True, **kwargs): method check_before_run (line 49) | def check_before_run(self): method process_dir (line 60) | def process_dir(self, dir_path, relabel=False): FILE: clustercontrast/evaluation_metrics/classification.py function accuracy (line 7) | def accuracy(output, target, topk=(1,)): FILE: clustercontrast/evaluation_metrics/ranking.py function _unique_sample (line 10) | def _unique_sample(ids_dict, num): function cmc (line 18) | def cmc(distmat, query_ids=None, gallery_ids=None, function mean_ap (line 82) | def mean_ap(distmat, query_ids=None, gallery_ids=None, FILE: clustercontrast/evaluators.py function extract_cnn_feature (line 16) | def extract_cnn_feature(model, inputs): function extract_features (line 23) | def extract_features(model, data_loader, print_freq=50): function pairwise_distance (line 55) | def pairwise_distance(features, query=None, gallery=None): function evaluate_all (line 75) | def evaluate_all(query_features, gallery_features, distmat, query=None, ... class Evaluator (line 109) | class Evaluator(object): method __init__ (line 110) | def __init__(self, model): method evaluate (line 114) | def evaluate(self, data_loader, query, gallery, cmc_flag=False, rerank... FILE: clustercontrast/models/__init__.py function names (line 16) | def names(): function create (line 20) | def create(name, *args, **kwargs): FILE: clustercontrast/models/cm.py class CM (line 9) | class CM(autograd.Function): method forward (line 12) | def forward(ctx, inputs, targets, features, momentum): method backward (line 21) | def backward(ctx, grad_outputs): function cm (line 35) | def cm(inputs, indexes, features, momentum=0.5): class CM_Hard (line 39) | class CM_Hard(autograd.Function): method forward (line 42) | def forward(ctx, inputs, targets, features, momentum): method backward (line 51) | def backward(ctx, grad_outputs): function cm_hard (line 74) | def cm_hard(inputs, indexes, features, momentum=0.5): class ClusterMemory (line 78) | class ClusterMemory(nn.Module, ABC): method __init__ (line 79) | def __init__(self, num_features, num_samples, temp=0.05, momentum=0.2,... method forward (line 90) | def forward(self, inputs, targets): FILE: clustercontrast/models/dsbn.py class DSBN2d (line 6) | class DSBN2d(nn.Module): method __init__ (line 7) | def __init__(self, planes): method forward (line 13) | def forward(self, x): class DSBN1d (line 25) | class DSBN1d(nn.Module): method __init__ (line 26) | def __init__(self, planes): method forward (line 32) | def forward(self, x): function convert_dsbn (line 44) | def convert_dsbn(model): function convert_bn (line 60) | def convert_bn(model, use_target=True): FILE: clustercontrast/models/kmeans.py function label_generator_kmeans (line 14) | def label_generator_kmeans(features, num_classes=500, cuda=True): FILE: clustercontrast/models/pooling.py class GeneralizedMeanPoolingList (line 19) | class GeneralizedMeanPoolingList(nn.Module, ABC): method __init__ (line 34) | def __init__(self, output_size=1, eps=1e-6): method forward (line 39) | def forward(self, x_list): method __repr__ (line 47) | def __repr__(self): class GeneralizedMeanPooling (line 57) | class GeneralizedMeanPooling(nn.Module, ABC): method __init__ (line 72) | def __init__(self, norm, output_size=1, eps=1e-6): method forward (line 79) | def forward(self, x): method __repr__ (line 85) | def __repr__(self): class GeneralizedMeanPoolingP (line 97) | class GeneralizedMeanPoolingP(GeneralizedMeanPooling, ABC): method __init__ (line 101) | def __init__(self, norm=3, output_size=1, eps=1e-6): class GeneralizedMeanPoolingFpn (line 106) | class GeneralizedMeanPoolingFpn(nn.Module, ABC): method __init__ (line 121) | def __init__(self, norm, output_size=1, eps=1e-6): method forward (line 128) | def forward(self, x_lists): method __repr__ (line 138) | def __repr__(self): class GeneralizedMeanPoolingPFpn (line 150) | class GeneralizedMeanPoolingPFpn(GeneralizedMeanPoolingFpn, ABC): method __init__ (line 154) | def __init__(self, norm=3, output_size=1, eps=1e-6): class AdaptiveAvgMaxPool2d (line 159) | class AdaptiveAvgMaxPool2d(nn.Module, ABC): method __init__ (line 160) | def __init__(self): method forward (line 164) | def forward(self, x): class FastGlobalAvgPool2d (line 171) | class FastGlobalAvgPool2d(nn.Module, ABC): method __init__ (line 172) | def __init__(self, flatten=False): method forward (line 176) | def forward(self, x): function avg_pooling (line 188) | def avg_pooling(): function max_pooling (line 193) | def max_pooling(): class Flatten (line 197) | class Flatten(nn.Module): method forward (line 198) | def forward(self, input): function pooling_names (line 212) | def pooling_names(): function build_pooling_layer (line 216) | def build_pooling_layer(name): FILE: clustercontrast/models/resnet.py class ResNet (line 14) | class ResNet(nn.Module): method __init__ (line 23) | def __init__(self, depth, pretrained=True, cut_at_pooling=False, method forward (line 72) | def forward(self, x): method reset_params (line 106) | def reset_params(self): function resnet18 (line 124) | def resnet18(**kwargs): function resnet34 (line 128) | def resnet34(**kwargs): function resnet50 (line 132) | def resnet50(**kwargs): function resnet101 (line 136) | def resnet101(**kwargs): function resnet152 (line 140) | def resnet152(**kwargs): FILE: clustercontrast/models/resnet_ibn.py class ResNetIBN (line 16) | class ResNetIBN(nn.Module): method __init__ (line 22) | def __init__(self, depth, pretrained=True, cut_at_pooling=False, method forward (line 73) | def forward(self, x): method reset_params (line 106) | def reset_params(self): function resnet_ibn50a (line 124) | def resnet_ibn50a(**kwargs): function resnet_ibn101a (line 128) | def resnet_ibn101a(**kwargs): FILE: clustercontrast/models/resnet_ibn_a.py function conv3x3 (line 16) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 22) | class BasicBlock(nn.Module): method __init__ (line 25) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 35) | def forward(self, x): class IBN (line 54) | class IBN(nn.Module): method __init__ (line 55) | def __init__(self, planes): method forward (line 63) | def forward(self, x): class Bottleneck (line 70) | class Bottleneck(nn.Module): method __init__ (line 73) | def __init__(self, inplanes, planes, ibn=False, stride=1, downsample=N... method forward (line 89) | def forward(self, x): class ResNet (line 112) | class ResNet(nn.Module): method __init__ (line 114) | def __init__(self, block, layers, num_classes=1000): method _make_layer (line 141) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 161) | def forward(self, x): function resnet50_ibn_a (line 179) | def resnet50_ibn_a(pretrained=False, **kwargs): function resnet101_ibn_a (line 192) | def resnet101_ibn_a(pretrained=False, **kwargs): function remove_module_key (line 205) | def remove_module_key(state_dict): FILE: clustercontrast/trainers.py class ClusterContrastTrainer (line 6) | class ClusterContrastTrainer(object): method __init__ (line 7) | def __init__(self, encoder, memory=None): method train (line 12) | def train(self, epoch, data_loader, optimizer, print_freq=10, train_it... method _parse_data (line 56) | def _parse_data(self, inputs): method _forward (line 60) | def _forward(self, inputs): FILE: clustercontrast/utils/__init__.py function to_numpy (line 6) | def to_numpy(tensor): function to_torch (line 15) | def to_torch(ndarray): FILE: clustercontrast/utils/data/__init__.py class IterLoader (line 7) | class IterLoader: method __init__ (line 8) | def __init__(self, loader, length=None): method __len__ (line 13) | def __len__(self): method new_epoch (line 19) | def new_epoch(self): method next (line 22) | def next(self): FILE: clustercontrast/utils/data/base_dataset.py class BaseDataset (line 5) | class BaseDataset(object): method get_imagedata_info (line 10) | def get_imagedata_info(self, data): method print_dataset_statistics (line 22) | def print_dataset_statistics(self): method images_dir (line 26) | def images_dir(self): class BaseImageDataset (line 30) | class BaseImageDataset(BaseDataset): method print_dataset_statistics (line 35) | def print_dataset_statistics(self, train, query, gallery): FILE: clustercontrast/utils/data/preprocessor.py class Preprocessor (line 11) | class Preprocessor(Dataset): method __init__ (line 12) | def __init__(self, dataset, root=None, transform=None): method __len__ (line 18) | def __len__(self): method __getitem__ (line 21) | def __getitem__(self, indices): method _get_single_item (line 24) | def _get_single_item(self, index): FILE: clustercontrast/utils/data/sampler.py function No_index (line 14) | def No_index(a, b): class RandomIdentitySampler (line 19) | class RandomIdentitySampler(Sampler): method __init__ (line 20) | def __init__(self, data_source, num_instances): method __len__ (line 29) | def __len__(self): method __iter__ (line 32) | def __iter__(self): class RandomMultipleGallerySampler (line 46) | class RandomMultipleGallerySampler(Sampler): method __init__ (line 47) | def __init__(self, data_source, num_instances=4): method __len__ (line 65) | def __len__(self): method __iter__ (line 68) | def __iter__(self): class RandomMultipleGallerySamplerNoCam (line 109) | class RandomMultipleGallerySamplerNoCam(Sampler): method __init__ (line 110) | def __init__(self, data_source, num_instances=4): method __len__ (line 127) | def __len__(self): method __iter__ (line 130) | def __iter__(self): FILE: clustercontrast/utils/data/transforms.py class RectScale (line 9) | class RectScale(object): method __init__ (line 10) | def __init__(self, height, width, interpolation=Image.BILINEAR): method __call__ (line 15) | def __call__(self, img): class RandomSizedRectCrop (line 22) | class RandomSizedRectCrop(object): method __init__ (line 23) | def __init__(self, height, width, interpolation=Image.BILINEAR): method __call__ (line 28) | def __call__(self, img): class RandomErasing (line 52) | class RandomErasing(object): method __init__ (line 64) | def __init__(self, probability=0.5, sl=0.02, sh=0.4, r1=0.3, mean=(0.4... method __call__ (line 71) | def __call__(self, img): FILE: clustercontrast/utils/faiss_rerank.py function k_reciprocal_neigh (line 23) | def k_reciprocal_neigh(initial_rank, i, k1): function compute_jaccard_distance (line 30) | def compute_jaccard_distance(target_features, k1=20, k2=6, print_flag=Tr... FILE: clustercontrast/utils/faiss_utils.py function swig_ptr_from_FloatTensor (line 6) | def swig_ptr_from_FloatTensor(x): function swig_ptr_from_LongTensor (line 12) | def swig_ptr_from_LongTensor(x): function search_index_pytorch (line 19) | def search_index_pytorch(index, x, k, D=None, I=None): function search_raw_array_pytorch (line 44) | def search_raw_array_pytorch(res, xb, xq, k, D=None, I=None, function index_init_gpu (line 92) | def index_init_gpu(ngpus, feat_dim): function index_init_cpu (line 108) | def index_init_cpu(feat_dim): FILE: clustercontrast/utils/infomap_cluster.py function l2norm (line 12) | def l2norm(vec): function intdict2ndarray (line 22) | def intdict2ndarray(d, default_val=-1): function read_meta (line 29) | def read_meta(fn_meta, start_pos=0, verbose=True): class knn_faiss (line 51) | class knn_faiss(): method __init__ (line 57) | def __init__(self, feats, k, knn_method='faiss-cpu', verbose=True): method filter_by_th (line 80) | def filter_by_th(self, i): method get_knns (line 93) | def get_knns(self, th=None): function knns2ordered_nbrs (line 114) | def knns2ordered_nbrs(knns, sort=True): function get_links (line 129) | def get_links(single, links, nbrs, dists, min_sim): function cluster_by_infomap (line 147) | def cluster_by_infomap(nbrs, dists, min_sim, cluster_num=2): function get_dist_nbr (line 230) | def get_dist_nbr(features, k=80, knn_method='faiss-cpu'): FILE: clustercontrast/utils/infomap_utils.py class TextColors (line 4) | class TextColors: class Timer (line 15) | class Timer(): method __init__ (line 16) | def __init__(self, name='task', verbose=True): method __enter__ (line 20) | def __enter__(self): method __exit__ (line 24) | def __exit__(self, exc_type, exc_val, exc_tb): FILE: clustercontrast/utils/logging.py class Logger (line 8) | class Logger(object): method __init__ (line 9) | def __init__(self, fpath=None): method __del__ (line 16) | def __del__(self): method __enter__ (line 19) | def __enter__(self): method __exit__ (line 22) | def __exit__(self, *args): method write (line 25) | def write(self, msg): method flush (line 30) | def flush(self): method close (line 36) | def close(self): FILE: clustercontrast/utils/meters.py class AverageMeter (line 4) | class AverageMeter(object): method __init__ (line 7) | def __init__(self): method reset (line 13) | def reset(self): method update (line 19) | def update(self, val, n=1): FILE: clustercontrast/utils/osutils.py function mkdir_if_missing (line 6) | def mkdir_if_missing(dir_path): FILE: clustercontrast/utils/rerank.py function re_ranking (line 31) | def re_ranking(q_g_dist, q_q_dist, g_g_dist, k1=20, k2=6, lambda_value=0... FILE: clustercontrast/utils/serialization.py function read_json (line 12) | def read_json(fpath): function write_json (line 18) | def write_json(obj, fpath): function save_checkpoint (line 24) | def save_checkpoint(state, is_best, fpath='checkpoint.pth.tar'): function load_checkpoint (line 31) | def load_checkpoint(fpath): function copy_state_dict (line 41) | def copy_state_dict(state_dict, model, strip=None): FILE: examples/cluster_contrast_train_usl.py function get_data (line 36) | def get_data(name, data_dir): function get_train_loader (line 42) | def get_train_loader(args, dataset, height, width, batch_size, workers, function get_test_loader (line 75) | def get_test_loader(dataset, height, width, batch_size, workers, testset... function create_model (line 96) | def create_model(args): function main (line 105) | def main(): function main_worker (line 117) | def main_worker(args): FILE: examples/cluster_contrast_train_usl_infomap.py function str2bool (line 34) | def str2bool(v): function get_data (line 44) | def get_data(name, data_dir): function get_train_loader (line 50) | def get_train_loader(args, dataset, height, width, batch_size, workers, function get_test_loader (line 82) | def get_test_loader(dataset, height, width, batch_size, workers, testset... function create_model (line 104) | def create_model(args): function main (line 113) | def main(): function main_worker (line 125) | def main_worker(args): FILE: examples/test.py function get_data (line 23) | def get_data(name, data_dir, height, width, batch_size, workers): function main (line 45) | def main(): function main_worker (line 57) | def main_worker(args):