SYMBOL INDEX (1199 symbols across 111 files) FILE: setup.py function readme (line 7) | def readme(): function numpy_include (line 13) | def numpy_include(): function get_requirements (line 30) | def get_requirements(filename='requirements.txt'): FILE: torchreid/data/data_augmentation/random_occlusion.py function main (line 17) | def main(): function load_occluders (line 39) | def load_occluders( function occlude_with_objects (line 98) | def occlude_with_objects(im, occluders, n=1, min_overlap=0.1, max_overla... function paste_over (line 118) | def paste_over(im_src, im_dst, center, is_mask=False): function resize_by_factor (line 160) | def resize_by_factor(im, factor): function list_filepaths (line 169) | def list_filepaths(dirpath): class RandomOcclusion (line 175) | class RandomOcclusion(DualTransform): method __init__ (line 176) | def __init__(self, method check_range (line 196) | def check_range(self, dimension): method apply (line 202) | def apply(self, image, occluders=(), centers=(), **params): method apply_to_mask (line 223) | def apply_to_mask(self, image, occluders=(), centers=(), **params): method get_params_dependent_on_targets (line 228) | def get_params_dependent_on_targets(self, params): method targets_as_params (line 250) | def targets_as_params(self): method get_transform_init_args_names (line 253) | def get_transform_init_args_names(self): FILE: torchreid/data/datamanager.py class DataManager (line 10) | class DataManager(object): method __init__ (line 26) | def __init__( method num_train_pids (line 77) | def num_train_pids(self): method num_train_cams (line 82) | def num_train_cams(self): method fetch_test_loaders (line 86) | def fetch_test_loaders(self, name): method preprocess_pil_img (line 97) | def preprocess_pil_img(self, img): class ImageDataManager (line 102) | class ImageDataManager(DataManager): method __init__ (line 158) | def __init__( class VideoDataManager (line 374) | class VideoDataManager(DataManager): method __init__ (line 431) | def __init__( FILE: torchreid/data/datasets/__init__.py function configure_dataset_class (line 63) | def configure_dataset_class(clazz, **ext_kwargs): function get_dataset_nickname (line 77) | def get_dataset_nickname(name): function get_image_dataset (line 81) | def get_image_dataset(name): function init_image_dataset (line 91) | def init_image_dataset(name, mode='train', **kwargs): function init_video_dataset (line 117) | def init_video_dataset(name, **kwargs): function register_image_dataset (line 128) | def register_image_dataset(name, dataset, nickname=None): function register_video_dataset (line 162) | def register_video_dataset(name, dataset): FILE: torchreid/data/datasets/dataset.py class Dataset (line 14) | class Dataset(object): method gallery_filter (line 35) | def gallery_filter(self, q_pid, q_camid, q_ann, g_pids, g_camids, g_an... method infer_masks_path (line 42) | def infer_masks_path(self, img_path): method __init__ (line 46) | def __init__( method transforms (line 87) | def transforms(self, mode): method data (line 99) | def data(self, mode): method __getitem__ (line 118) | def __getitem__(self, index): method __len__ (line 121) | def __len__(self): # kept for backward compatibility method len (line 124) | def len(self, mode): method __add__ (line 127) | def __add__(self, other): method __radd__ (line 172) | def __radd__(self, other): method parse_data (line 179) | def parse_data(self, data): method get_num_pids (line 193) | def get_num_pids(self, data): method get_num_cams (line 197) | def get_num_cams(self, data): method show_summary (line 201) | def show_summary(self): method combine_all (line 205) | def combine_all(self): method download_dataset (line 232) | def download_dataset(self, dataset_dir, dataset_url): method check_before_run (line 274) | def check_before_run(self, required_files): method __repr__ (line 287) | def __repr__(self): class ImageDataset (line 308) | class ImageDataset(Dataset): method __init__ (line 319) | def __init__(self, train, query, gallery, **kwargs): method __getitem__ (line 322) | def __getitem__(self, index): # kept for backward compatibility method getitem (line 325) | def getitem(self, index, mode): method show_summary (line 344) | def show_summary(self): class VideoDataset (line 371) | class VideoDataset(Dataset): method __init__ (line 382) | def __init__( method getitem (line 398) | def getitem(self, index, mode): method show_summary (line 452) | def show_summary(self): FILE: torchreid/data/datasets/image/cuhk01.py class CUHK01 (line 12) | class CUHK01(ImageDataset): method __init__ (line 29) | def __init__(self, root='', split_id=0, **kwargs): method extract_file (line 63) | def extract_file(self): method prepare_split (line 70) | def prepare_split(self): FILE: torchreid/data/datasets/image/cuhk02.py class CUHK02 (line 8) | class CUHK02(ImageDataset): method __init__ (line 29) | def __init__(self, root='', **kwargs): method get_data_list (line 40) | def get_data_list(self): FILE: torchreid/data/datasets/image/cuhk03.py class CUHK03 (line 9) | class CUHK03(ImageDataset): method __init__ (line 27) | def __init__( method preprocess_split (line 93) | def preprocess_split(self): FILE: torchreid/data/datasets/image/dukemtmcreid.py class DukeMTMCreID (line 10) | class DukeMTMCreID(ImageDataset): method get_masks_config (line 35) | def get_masks_config(masks_dir): method __init__ (line 41) | def __init__(self, root='', masks_dir=None, **kwargs): method process_dir (line 65) | def process_dir(self, dir_path, relabel=False): FILE: torchreid/data/datasets/image/grid.py class GRID (line 11) | class GRID(ImageDataset): method __init__ (line 27) | def __init__(self, root='', split_id=0, **kwargs): method prepare_split (line 71) | def prepare_split(self): FILE: torchreid/data/datasets/image/ilids.py class iLIDS (line 13) | class iLIDS(ImageDataset): method __init__ (line 27) | def __init__(self, root='', split_id=0, **kwargs): method prepare_split (line 52) | def prepare_split(self): method get_pid2label (line 109) | def get_pid2label(self, img_names): method parse_img_names (line 117) | def parse_img_names(self, img_names, pid2label=None): method process_split (line 130) | def process_split(self, split): FILE: torchreid/data/datasets/image/market1501.py class Market1501 (line 11) | class Market1501(ImageDataset): method get_masks_config (line 35) | def get_masks_config(masks_dir): method __init__ (line 41) | def __init__(self, root='', market1501_500k=False, masks_dir=None, **k... method process_dir (line 79) | def process_dir(self, dir_path, relabel=False): FILE: torchreid/data/datasets/image/msmt17.py class MSMT17 (line 25) | class MSMT17(ImageDataset): method get_masks_config (line 46) | def get_masks_config(masks_dir): method __init__ (line 52) | def __init__(self, root='', masks_dir=None, **kwargs): method process_dir (line 101) | def process_dir(self, dir_path, list_path): FILE: torchreid/data/datasets/image/occluded_dukemtmc.py class OccludedDuke (line 15) | class OccludedDuke(ImageDataset): method get_masks_config (line 27) | def get_masks_config(masks_dir): method __init__ (line 33) | def __init__(self, root='', masks_dir=None, **kwargs): method process_dir (line 56) | def process_dir(self, dir_path, relabel=False): FILE: torchreid/data/datasets/image/occluded_reid.py class OccludedReID (line 16) | class OccludedReID(ImageDataset): method get_masks_config (line 27) | def get_masks_config(masks_dir): method infer_masks_path (line 33) | def infer_masks_path(self, img_path): method __init__ (line 37) | def __init__(self, root='', masks_dir=None, **kwargs): method process_dir (line 60) | def process_dir(self, dir_path, relabel=False, is_query=True): FILE: torchreid/data/datasets/image/p_ETHZ.py class P_ETHZ (line 16) | class P_ETHZ(ImageDataset): method __init__ (line 19) | def __init__(self, root='', **kwargs): method process_dir (line 35) | def process_dir(self, dir_path, relabel=False, is_query=True): FILE: torchreid/data/datasets/image/p_dukemtmc_reid.py class PDukemtmcReid (line 16) | class PDukemtmcReid(ImageDataset): method get_masks_config (line 27) | def get_masks_config(masks_dir): method infer_masks_path (line 33) | def infer_masks_path(self, img_path): method __init__ (line 43) | def __init__(self, root='', masks_dir=None, **kwargs): method process_train_dir (line 66) | def process_train_dir(self, dir_path, relabel=True): method process_dir (line 100) | def process_dir(self, dir_path, relabel=False, is_query=True): FILE: torchreid/data/datasets/image/partial_ilids.py class Partial_iLIDS (line 15) | class Partial_iLIDS(ImageDataset): method __init__ (line 18) | def __init__(self, root='', **kwargs): method process_dir (line 42) | def process_dir(self, dir_path, is_query=True): FILE: torchreid/data/datasets/image/partial_reid.py class Partial_REID (line 16) | class Partial_REID(ImageDataset): method __init__ (line 19) | def __init__(self, root='', **kwargs): method process_dir (line 43) | def process_dir(self, dir_path, relabel=False, is_query=True): FILE: torchreid/data/datasets/image/prid.py class PRID (line 10) | class PRID(ImageDataset): method __init__ (line 28) | def __init__(self, root='', split_id=0, **kwargs): method prepare_split (line 58) | def prepare_split(self): method process_split (line 77) | def process_split(self, split): FILE: torchreid/data/datasets/image/sensereid.py class SenseReID (line 9) | class SenseReID(ImageDataset): method __init__ (line 27) | def __init__(self, root='', **kwargs): method process_dir (line 60) | def process_dir(self, dir_path): FILE: torchreid/data/datasets/image/viper.py class VIPeR (line 11) | class VIPeR(ImageDataset): method __init__ (line 27) | def __init__(self, root='', split_id=0, **kwargs): method prepare_split (line 61) | def prepare_split(self): FILE: torchreid/data/datasets/video/dukemtmcvidreid.py class DukeMTMCVidReID (line 11) | class DukeMTMCVidReID(VideoDataset): method __init__ (line 29) | def __init__(self, root='', min_seq_len=0, **kwargs): method process_dir (line 67) | def process_dir(self, dir_path, json_path, relabel): FILE: torchreid/data/datasets/video/ilidsvid.py class iLIDSVID (line 11) | class iLIDSVID(VideoDataset): method __init__ (line 27) | def __init__(self, root='', split_id=0, **kwargs): method prepare_split (line 65) | def prepare_split(self): method process_data (line 122) | def process_data(self, dirnames, cam1=True, cam2=True): FILE: torchreid/data/datasets/video/mars.py class Mars (line 9) | class Mars(VideoDataset): method __init__ (line 25) | def __init__(self, root='', **kwargs): method get_names (line 76) | def get_names(self, fpath): method process_data (line 84) | def process_data( method combine_all (line 129) | def combine_all(self): FILE: torchreid/data/datasets/video/prid2011.py class PRID2011 (line 10) | class PRID2011(VideoDataset): method __init__ (line 27) | def __init__(self, root='', split_id=0, **kwargs): method process_dir (line 59) | def process_dir(self, dirnames, cam1=True, cam2=True): FILE: torchreid/data/masks_transforms/__init__.py function compute_parts_num_and_names (line 55) | def compute_parts_num_and_names(cfg): FILE: torchreid/data/masks_transforms/coco_keypoints_transforms.py class CocoToSixBodyMasks (line 10) | class CocoToSixBodyMasks(MaskGroupingTransform): method __init__ (line 20) | def __init__(self): FILE: torchreid/data/masks_transforms/mask_transform.py class MaskTransform (line 7) | class MaskTransform(DualTransform): method __init__ (line 8) | def __init__(self): method apply (line 11) | def apply(self, img, **params): method apply_to_bbox (line 14) | def apply_to_bbox(self, bbox, **params): method apply_to_keypoint (line 17) | def apply_to_keypoint(self, keypoint, **params): class MaskGroupingTransform (line 21) | class MaskGroupingTransform(MaskTransform): method __init__ (line 23) | def __init__(self, parts_grouping, parts_map, combine_mode='max'): method apply_to_mask (line 31) | def apply_to_mask(self, masks, **params): class PermuteMasksDim (line 41) | class PermuteMasksDim(MaskTransform): method apply_to_mask (line 42) | def apply_to_mask(self, masks, **params): class ResizeMasks (line 46) | class ResizeMasks(MaskTransform): method __init__ (line 47) | def __init__(self, height, width, mask_scale): method apply_to_mask (line 51) | def apply_to_mask(self, masks, **params): class RemoveBackgroundMask (line 55) | class RemoveBackgroundMask(MaskTransform): method apply_to_mask (line 56) | def apply_to_mask(self, masks, **params): class AddBackgroundMask (line 60) | class AddBackgroundMask(MaskTransform): method __init__ (line 61) | def __init__(self, background_computation_strategy='sum', softmax_weig... method apply_to_mask (line 67) | def apply_to_mask(self, masks, **params): class IdentityMask (line 88) | class IdentityMask(MaskTransform): method apply_to_mask (line 91) | def apply_to_mask(self, masks, **params): FILE: torchreid/data/masks_transforms/pcb_transforms.py class PCBMasks (line 7) | class PCBMasks(MaskTransform): method apply_to_mask (line 8) | def apply_to_mask(self, masks, **params): class PCBMasks2 (line 21) | class PCBMasks2(PCBMasks): class PCBMasks3 (line 26) | class PCBMasks3(PCBMasks): class PCBMasks4 (line 31) | class PCBMasks4(PCBMasks): class PCBMasks5 (line 36) | class PCBMasks5(PCBMasks): class PCBMasks6 (line 41) | class PCBMasks6(PCBMasks): class PCBMasks7 (line 46) | class PCBMasks7(PCBMasks): class PCBMasks8 (line 51) | class PCBMasks8(PCBMasks): FILE: torchreid/data/masks_transforms/pifpaf_mask_transform.py class CombinePifPafIntoFullBodyMask (line 22) | class CombinePifPafIntoFullBodyMask(MaskGroupingTransform): method __init__ (line 27) | def __init__(self): class AddFullBodyMaskToBaseMasks (line 31) | class AddFullBodyMaskToBaseMasks(MaskGroupingTransform): method __init__ (line 38) | def __init__(self): class AddFullBodyMaskAndFullBoundingBoxToBaseMasks (line 42) | class AddFullBodyMaskAndFullBoundingBoxToBaseMasks(MaskGroupingTransform): method apply_to_mask (line 46) | def apply_to_mask(self, masks, **params): class CombinePifPafIntoMultiScaleBodyMasks (line 57) | class CombinePifPafIntoMultiScaleBodyMasks(MaskGroupingTransform): method __init__ (line 82) | def __init__(self): class CombinePifPafIntoOneBodyMasks (line 86) | class CombinePifPafIntoOneBodyMasks(MaskGroupingTransform): method __init__ (line 91) | def __init__(self): class CombinePifPafIntoTwoBodyMasks (line 95) | class CombinePifPafIntoTwoBodyMasks(MaskGroupingTransform): method __init__ (line 111) | def __init__(self): class CombinePifPafIntoThreeBodyMasks (line 115) | class CombinePifPafIntoThreeBodyMasks(MaskGroupingTransform): method __init__ (line 132) | def __init__(self): class CombinePifPafIntoFourBodyMasks (line 136) | class CombinePifPafIntoFourBodyMasks(MaskGroupingTransform): method __init__ (line 153) | def __init__(self): class CombinePifPafIntoFourBodyMasksNoOverlap (line 157) | class CombinePifPafIntoFourBodyMasksNoOverlap(MaskGroupingTransform): method __init__ (line 174) | def __init__(self): class CombinePifPafIntoFourVerticalParts (line 178) | class CombinePifPafIntoFourVerticalParts(MaskGroupingTransform): method __init__ (line 195) | def __init__(self): class CombinePifPafIntoFourVerticalPartsPif (line 199) | class CombinePifPafIntoFourVerticalPartsPif(MaskGroupingTransform): method __init__ (line 207) | def __init__(self): class CombinePifPafIntoFiveVerticalParts (line 211) | class CombinePifPafIntoFiveVerticalParts(MaskGroupingTransform): method __init__ (line 231) | def __init__(self): class CombinePifPafIntoFiveBodyMasks (line 235) | class CombinePifPafIntoFiveBodyMasks(MaskGroupingTransform): method __init__ (line 257) | def __init__(self): class CombinePifPafIntoSixVerticalParts (line 261) | class CombinePifPafIntoSixVerticalParts(MaskGroupingTransform): method __init__ (line 279) | def __init__(self): class CombinePifPafIntoSixBodyMasks (line 283) | class CombinePifPafIntoSixBodyMasks(MaskGroupingTransform): method __init__ (line 302) | def __init__(self): class CombinePifPafIntoSixBodyMasksSum (line 306) | class CombinePifPafIntoSixBodyMasksSum(MaskGroupingTransform): method __init__ (line 325) | def __init__(self): class CombinePifPafIntoSixBodyMasksSimilarToEight (line 329) | class CombinePifPafIntoSixBodyMasksSimilarToEight(MaskGroupingTransform): method __init__ (line 348) | def __init__(self): class CombinePifPafIntoEightBodyMasks (line 352) | class CombinePifPafIntoEightBodyMasks(MaskGroupingTransform): method __init__ (line 373) | def __init__(self): class CombinePifPafIntoEightVerticalBodyMasks (line 378) | class CombinePifPafIntoEightVerticalBodyMasks(MaskGroupingTransform): method __init__ (line 399) | def __init__(self): class CombinePifPafIntoTenMSBodyMasks (line 403) | class CombinePifPafIntoTenMSBodyMasks(MaskGroupingTransform): method __init__ (line 442) | def __init__(self): class CombinePifPafIntoSevenVerticalBodyMasks (line 446) | class CombinePifPafIntoSevenVerticalBodyMasks(MaskGroupingTransform): method __init__ (line 460) | def __init__(self): class CombinePifPafIntoSevenBodyMasksSimilarToEight (line 464) | class CombinePifPafIntoSevenBodyMasksSimilarToEight(MaskGroupingTransform): method __init__ (line 483) | def __init__(self): class CombinePifPafIntoElevenBodyMasks (line 488) | class CombinePifPafIntoElevenBodyMasks(MaskGroupingTransform): method __init__ (line 509) | def __init__(self): class CombinePifPafIntoFourteenBodyMasks (line 513) | class CombinePifPafIntoFourteenBodyMasks(MaskGroupingTransform): method __init__ (line 533) | def __init__(self): FILE: torchreid/data/sampler.py class RandomIdentitySampler (line 11) | class RandomIdentitySampler(Sampler): method __init__ (line 20) | def __init__(self, data_source, batch_size, num_instances): method __iter__ (line 45) | def __iter__(self): method __len__ (line 75) | def __len__(self): function build_train_sampler (line 79) | def build_train_sampler( FILE: torchreid/data/transforms.py class NpToTensor (line 15) | class NpToTensor(object): method __call__ (line 16) | def __call__(self, masks): method __repr__ (line 20) | def __repr__(self): function build_transforms (line 24) | def build_transforms( FILE: torchreid/engine/engine.py class Engine (line 19) | class Engine(object): method __init__ (line 31) | def __init__(self, config, datamanager, writer, engine_state, use_gpu=... method register_model (line 52) | def register_model(self, name='model', model=None, optim=None, sched=N... method get_model_names (line 72) | def get_model_names(self, names=None): method save_model (line 83) | def save_model(self, epoch, cmc, mAP, ssmd, save_dir, is_best=False): method set_model_mode (line 104) | def set_model_mode(self, mode='train', names=None): method get_current_lr (line 114) | def get_current_lr(self, names=None): method update_lr (line 119) | def update_lr(self, names=None): method run (line 127) | def run( method train (line 255) | def train(self, fixbase_epoch=0, open_layers=None): method forward_backward (line 279) | def forward_backward(self, data): method test (line 282) | def test( method _evaluate (line 389) | def _evaluate( method _feature_extraction (line 491) | def _feature_extraction(self, data_loader): method compute_loss (line 512) | def compute_loss(self, criterion, outputs, targets, **kwargs): method extract_features (line 519) | def extract_features(self, input): method parse_data_for_train (line 522) | def parse_data_for_train(self, data): method parse_data_for_eval (line 527) | def parse_data_for_eval(self, data): method two_stepped_transfer_learning (line 533) | def two_stepped_transfer_learning( method normalize (line 558) | def normalize(self, features): FILE: torchreid/engine/image/part_based_engine.py class ImagePartBasedEngine (line 22) | class ImagePartBasedEngine(Engine): method __init__ (line 25) | def __init__( method forward_backward (line 77) | def forward_backward(self, data): method combine_losses (line 107) | def combine_losses(self, visibility_scores_dict, embeddings_dict, id_c... method _feature_extraction (line 132) | def _feature_extraction(self, data_loader): method _evaluate (line 169) | def _evaluate( method compute_pixels_cls_accuracy (line 297) | def compute_pixels_cls_accuracy(self, target_masks, pixels_cls_scores): method display_individual_parts_ranking_performances (line 308) | def display_individual_parts_ranking_performances(self, body_parts_dis... method parse_data_for_train (line 341) | def parse_data_for_train(self, data): method parse_data_for_eval (line 358) | def parse_data_for_eval(self, data): method extract_test_embeddings (line 365) | def extract_test_embeddings(self, model_output): FILE: torchreid/engine/image/softmax.py class ImageSoftmaxEngine (line 9) | class ImageSoftmaxEngine(Engine): method __init__ (line 55) | def __init__( method forward_backward (line 78) | def forward_backward(self, data): FILE: torchreid/engine/image/triplet.py class ImageTripletEngine (line 9) | class ImageTripletEngine(Engine): method __init__ (line 61) | def __init__( method forward_backward (line 91) | def forward_backward(self, data): FILE: torchreid/engine/video/softmax.py class VideoSoftmaxEngine (line 7) | class VideoSoftmaxEngine(ImageSoftmaxEngine): method __init__ (line 59) | def __init__( method parse_data_for_train (line 83) | def parse_data_for_train(self, data): method extract_features (line 98) | def extract_features(self, input): FILE: torchreid/engine/video/triplet.py class VideoTripletEngine (line 7) | class VideoTripletEngine(ImageTripletEngine, VideoSoftmaxEngine): method __init__ (line 66) | def __init__( FILE: torchreid/hyperparameter/custom_hyperparameter_optimizer.py function build_datamanager (line 21) | def build_datamanager(cfg): function build_engine (line 28) | def build_engine(cfg, datamanager, model, optimizer, scheduler, writer): function reset_config (line 108) | def reset_config(cfg, args): function main (line 119) | def main(): FILE: torchreid/hyperparameter/hyperparameter_optimizer.py function job_complete_callback (line 8) | def job_complete_callback( FILE: torchreid/losses/GiLt_loss.py class GiLtLoss (line 11) | class GiLtLoss(nn.Module): method __init__ (line 27) | def __init__(self, method forward (line 45) | def forward(self, embeddings_dict, visibility_scores_dict, id_cls_scor... method compute_triplet_loss (line 95) | def compute_triplet_loss(self, embeddings, visibility_scores, pids): method compute_id_cls_loss (line 105) | def compute_id_cls_loss(self, id_cls_scores, visibility_scores, pids): FILE: torchreid/losses/__init__.py function init_part_based_triplet_loss (line 24) | def init_part_based_triplet_loss(name, **kwargs): function deep_supervision (line 35) | def deep_supervision(criterion, xs, y): FILE: torchreid/losses/body_part_attention_loss.py class BodyPartAttentionLoss (line 11) | class BodyPartAttentionLoss(nn.Module): method __init__ (line 17) | def __init__(self, loss_type='cl', label_smoothing=0.1, use_gpu=False): method forward (line 31) | def forward(self, pixels_cls_scores, targets): method compute_pixels_cls_loss (line 45) | def compute_pixels_cls_loss(self, pixels_cls_scores, targets): FILE: torchreid/losses/cross_entropy_loss.py class CrossEntropyLoss (line 6) | class CrossEntropyLoss(nn.Module): method __init__ (line 29) | def __init__(self, eps=0.1, label_smooth=True): method forward (line 34) | def forward(self, inputs, targets, weights=None): FILE: torchreid/losses/hard_mine_triplet_loss.py class TripletLoss (line 6) | class TripletLoss(nn.Module): method __init__ (line 18) | def __init__(self, margin=0.3): method forward (line 23) | def forward(self, inputs, targets): method compute_hard_mine_triplet_loss (line 36) | def compute_hard_mine_triplet_loss(self, dist, inputs, targets): method compute_dist_matrix (line 49) | def compute_dist_matrix(self, inputs): FILE: torchreid/losses/inter_parts_triplet_loss.py class InterPartsTripletLoss (line 6) | class InterPartsTripletLoss(PartAveragedTripletLoss): method __init__ (line 8) | def __init__(self, **kwargs): method forward (line 11) | def forward(self, body_parts_features, targets, n_iter=0, parts_visibi... method compute_mixed_body_parts_dist_matrices (line 16) | def compute_mixed_body_parts_dist_matrices(self, body_parts_features): method hard_mine_triplet_loss (line 21) | def hard_mine_triplet_loss(self, dist, targets): # TODO extract code f... FILE: torchreid/losses/part_averaged_triplet_loss.py class PartAveragedTripletLoss (line 10) | class PartAveragedTripletLoss(nn.Module): method __init__ (line 26) | def __init__(self, margin=0.3, epsilon=1e-16, writer=None): method forward (line 35) | def forward(self, part_based_embeddings, labels, parts_visibility=None): method _combine_part_based_dist_matrices (line 67) | def _combine_part_based_dist_matrices(self, part_based_pairwise_dist, ... method _part_based_pairwise_distance_matrix (line 77) | def _part_based_pairwise_distance_matrix(self, embeddings, squared=Fal... method _hard_mine_triplet_loss (line 95) | def _hard_mine_triplet_loss(self, batch_pairwise_dist, labels, margin): method hard_margin_triplet_loss (line 175) | def hard_margin_triplet_loss(self, margin, valid_hardest_dist, valid_t... method soft_margin_triplet_loss (line 182) | def soft_margin_triplet_loss(self, margin, valid_hardest_dist, valid_t... method _get_anchor_positive_mask (line 198) | def _get_anchor_positive_mask(labels): method _get_anchor_negative_mask (line 215) | def _get_anchor_negative_mask(labels): FILE: torchreid/losses/part_individual_triplet_loss.py class PartIndividualTripletLoss (line 7) | class PartIndividualTripletLoss(PartAveragedTripletLoss): method __init__ (line 20) | def __init__(self, **kwargs): method _combine_part_based_dist_matrices (line 23) | def _combine_part_based_dist_matrices(self, part_based_pairwise_dist, ... FILE: torchreid/losses/part_max_min_triplet_loss.py class PartMaxMinTripletLoss (line 9) | class PartMaxMinTripletLoss(PartAveragedTripletLoss): method __init__ (line 11) | def __init__(self, **kwargs): method _combine_part_based_dist_matrices (line 14) | def _combine_part_based_dist_matrices(self, part_based_pairwise_dist, ... FILE: torchreid/losses/part_max_triplet_loss.py class PartMaxTripletLoss (line 7) | class PartMaxTripletLoss(PartAveragedTripletLoss): method __init__ (line 9) | def __init__(self, **kwargs): method _combine_part_based_dist_matrices (line 12) | def _combine_part_based_dist_matrices(self, part_based_pairwise_dist, ... FILE: torchreid/losses/part_min_triplet_loss.py class PartMinTripletLoss (line 9) | class PartMinTripletLoss(PartAveragedTripletLoss): method __init__ (line 11) | def __init__(self, **kwargs): method _combine_part_based_dist_matrices (line 14) | def _combine_part_based_dist_matrices(self, part_based_pairwise_dist, ... FILE: torchreid/losses/part_random_max_min_triplet_loss.py class PartRandomMaxMinTripletLoss (line 9) | class PartRandomMaxMinTripletLoss(PartAveragedTripletLoss): method __init__ (line 11) | def __init__(self, **kwargs): method _combine_part_based_dist_matrices (line 14) | def _combine_part_based_dist_matrices(self, part_based_pairwise_dist, ... FILE: torchreid/metrics/accuracy.py function accuracy (line 4) | def accuracy(output, target, topk=(1, )): FILE: torchreid/metrics/distance.py function compute_distance_matrix (line 9) | def compute_distance_matrix(input1, input2, metric='euclidean'): function euclidean_squared_distance (line 52) | def euclidean_squared_distance(input1, input2): function cosine_distance (line 71) | def cosine_distance(input1, input2): function compute_distance_matrix_using_bp_features (line 87) | def compute_distance_matrix_using_bp_features(qf, gf, qf_parts_visibilit... function _compute_distance_matrix_using_bp_features (line 102) | def _compute_distance_matrix_using_bp_features(qf, gf, dist_combine_stra... function _compute_distance_matrix_using_bp_features_and_masks (line 131) | def _compute_distance_matrix_using_bp_features_and_masks(qf, gf, qf_part... function _compute_distance_matrix_using_bp_features_and_visibility_scores (line 181) | def _compute_distance_matrix_using_bp_features_and_visibility_scores(qf,... function _compute_body_parts_dist_matrices (line 222) | def _compute_body_parts_dist_matrices(qf, gf, metric='euclidean'): FILE: torchreid/metrics/rank.py function eval_cuhk03 (line 17) | def eval_cuhk03(distmat, q_pids, g_pids, q_camids, g_camids, max_rank): function eval_market1501 (line 97) | def eval_market1501(distmat, q_pids, g_pids, q_camids, g_camids, max_rank): function evaluate_py (line 162) | def evaluate_py( function evaluate_rank (line 173) | def evaluate_rank( FILE: torchreid/metrics/rank_cylib/setup.py function numpy_include (line 7) | def numpy_include(): FILE: torchreid/models/__init__.py function show_avai_models (line 92) | def show_avai_models(): function build_model (line 102) | def build_model( FILE: torchreid/models/bpbreid.py class BPBreID (line 15) | class BPBreID(nn.Module): method __init__ (line 18) | def __init__(self, num_classes, pretrained, loss, model_cfg, horizonta... method init_dim_reduce_layers (line 84) | def init_dim_reduce_layers(self, dim_reduce_mode, spatial_feature_size... method forward (line 116) | def forward(self, images, external_parts_masks=None): method parts_identity_classification (line 261) | def parts_identity_classification(self, D, N, parts_embeddings): class BeforePoolingDimReduceLayer (line 286) | class BeforePoolingDimReduceLayer(nn.Module): method __init__ (line 287) | def __init__(self, input_dim, output_dim): method forward (line 301) | def forward(self, x): method _init_params (line 304) | def _init_params(self): class AfterPoolingDimReduceLayer (line 324) | class AfterPoolingDimReduceLayer(nn.Module): method __init__ (line 325) | def __init__(self, input_dim, output_dim, dropout_p=None): method forward (line 342) | def forward(self, x): method _init_params (line 352) | def _init_params(self): class PixelToPartClassifier (line 376) | class PixelToPartClassifier(nn.Module): method __init__ (line 377) | def __init__(self, dim_reduce_output, parts_num): method forward (line 383) | def forward(self, x): method _init_params (line 387) | def _init_params(self): class BNClassifier (line 398) | class BNClassifier(nn.Module): method __init__ (line 400) | def __init__(self, in_dim, class_num): method forward (line 412) | def forward(self, x): method _init_params (line 417) | def _init_params(self): function init_part_attention_pooling_head (line 432) | def init_part_attention_pooling_head(normalization, pooling, dim_reduce_... class GlobalMaskWeightedPoolingHead (line 444) | class GlobalMaskWeightedPoolingHead(nn.Module): method __init__ (line 445) | def __init__(self, depth, normalization='identity'): method forward (line 458) | def forward(self, features, part_masks): method _init_params (line 470) | def _init_params(self): class GlobalMaxPoolingHead (line 481) | class GlobalMaxPoolingHead(GlobalMaskWeightedPoolingHead): class GlobalAveragePoolingHead (line 485) | class GlobalAveragePoolingHead(GlobalMaskWeightedPoolingHead): class GlobalWeightedAveragePoolingHead (line 489) | class GlobalWeightedAveragePoolingHead(GlobalMaskWeightedPoolingHead): method forward (line 490) | def forward(self, features, part_masks): function bpbreid (line 510) | def bpbreid(num_classes, loss='part_based', pretrained=True, config=None... function pcb (line 521) | def pcb(num_classes, loss='part_based', pretrained=True, config=None, **... function bot (line 535) | def bot(num_classes, loss='part_based', pretrained=True, config=None, **... FILE: torchreid/models/compact_bilinear_pooling.py function CountSketchFn_forward (line 7) | def CountSketchFn_forward(h, s, output_size, x, force_cpu_scatter_add=Fa... function CountSketchFn_backward (line 30) | def CountSketchFn_backward(h, s, x_size, grad_output): class CountSketchFn (line 41) | class CountSketchFn(Function): method forward (line 44) | def forward(ctx, h, s, output_size, x, force_cpu_scatter_add=False): method backward (line 53) | def backward(ctx, grad_output): class CountSketch (line 60) | class CountSketch(nn.Module): method __init__ (line 86) | def __init__(self, input_size, output_size, h=None, s=None): method forward (line 110) | def forward(self, x): function ComplexMultiply_forward (line 118) | def ComplexMultiply_forward(X_re, X_im, Y_re, Y_im): function ComplexMultiply_backward (line 124) | def ComplexMultiply_backward(X_re, X_im, Y_re, Y_im, grad_Z_re, grad_Z_im): class ComplexMultiply (line 132) | class ComplexMultiply(torch.autograd.Function): method forward (line 135) | def forward(ctx, X_re, X_im, Y_re, Y_im): method backward (line 140) | def backward(ctx, grad_Z_re, grad_Z_im): class CompactBilinearPoolingFn (line 145) | class CompactBilinearPoolingFn(Function): method forward (line 148) | def forward(ctx, h1, s1, h2, s2, output_size, x, y, force_cpu_scatter_... method backward (line 180) | def backward(ctx, grad_output): class CompactBilinearPooling (line 229) | class CompactBilinearPooling(nn.Module): method __init__ (line 260) | def __init__(self, input1_size, input2_size, output_size, h1=None, s1=... method forward (line 268) | def forward(self, x, y=None): FILE: torchreid/models/densenet.py class _DenseLayer (line 29) | class _DenseLayer(nn.Sequential): method __init__ (line 31) | def __init__(self, num_input_features, growth_rate, bn_size, drop_rate): method forward (line 60) | def forward(self, x): class _DenseBlock (line 69) | class _DenseBlock(nn.Sequential): method __init__ (line 71) | def __init__( class _Transition (line 83) | class _Transition(nn.Sequential): method __init__ (line 85) | def __init__(self, num_input_features, num_output_features): class DenseNet (line 102) | class DenseNet(nn.Module): method __init__ (line 116) | def __init__( method _construct_fc_layer (line 190) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 221) | def _init_params(self): method forward (line 240) | def forward(self, x): function init_pretrained_weights (line 262) | def init_pretrained_weights(model, model_url): function densenet121 (line 303) | def densenet121(num_classes, loss='softmax', pretrained=True, **kwargs): function densenet169 (line 319) | def densenet169(num_classes, loss='softmax', pretrained=True, **kwargs): function densenet201 (line 335) | def densenet201(num_classes, loss='softmax', pretrained=True, **kwargs): function densenet161 (line 351) | def densenet161(num_classes, loss='softmax', pretrained=True, **kwargs): function densenet121_fc512 (line 367) | def densenet121_fc512(num_classes, loss='softmax', pretrained=True, **kw... FILE: torchreid/models/hacnn.py class ConvBlock (line 9) | class ConvBlock(nn.Module): method __init__ (line 22) | def __init__(self, in_c, out_c, k, s=1, p=0): method forward (line 27) | def forward(self, x): class InceptionA (line 31) | class InceptionA(nn.Module): method __init__ (line 33) | def __init__(self, in_channels, out_channels): method forward (line 54) | def forward(self, x): class InceptionB (line 63) | class InceptionB(nn.Module): method __init__ (line 65) | def __init__(self, in_channels, out_channels): method forward (line 83) | def forward(self, x): class SpatialAttn (line 91) | class SpatialAttn(nn.Module): method __init__ (line 94) | def __init__(self): method forward (line 99) | def forward(self, x): class ChannelAttn (line 115) | class ChannelAttn(nn.Module): method __init__ (line 118) | def __init__(self, in_channels, reduction_rate=16): method forward (line 124) | def forward(self, x): class SoftAttn (line 133) | class SoftAttn(nn.Module): method __init__ (line 141) | def __init__(self, in_channels): method forward (line 147) | def forward(self, x): class HardAttn (line 155) | class HardAttn(nn.Module): method __init__ (line 158) | def __init__(self, in_channels): method init_params (line 163) | def init_params(self): method forward (line 171) | def forward(self, x): class HarmAttn (line 180) | class HarmAttn(nn.Module): method __init__ (line 183) | def __init__(self, in_channels): method forward (line 188) | def forward(self, x): class HACNN (line 194) | class HACNN(nn.Module): method __init__ (line 210) | def __init__( method init_scale_factors (line 271) | def init_scale_factors(self): method stn (line 287) | def stn(self, x, theta): method transform_theta (line 297) | def transform_theta(self, theta_i, region_idx): method forward (line 307) | def forward(self, x): FILE: torchreid/models/hrnet.py function get_hrnet_config (line 26) | def get_hrnet_config(): function conv3x3 (line 61) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 67) | class BasicBlock(nn.Module): method __init__ (line 70) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 80) | def forward(self, x): class Bottleneck (line 99) | class Bottleneck(nn.Module): method __init__ (line 102) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 117) | def forward(self, x): class HighResolutionModule (line 140) | class HighResolutionModule(nn.Module): method __init__ (line 141) | def __init__(self, num_branches, blocks, num_blocks, num_inchannels, method _check_branches (line 158) | def _check_branches(self, num_branches, blocks, num_blocks, method _make_one_branch (line 178) | def _make_one_branch(self, branch_index, block, num_blocks, num_channels, method _make_branches (line 202) | def _make_branches(self, num_branches, block, num_blocks, num_channels): method _make_fuse_layers (line 211) | def _make_fuse_layers(self): method get_num_inchannels (line 259) | def get_num_inchannels(self): method forward (line 262) | def forward(self, x): class ConvBlock (line 288) | class ConvBlock(nn.Module): method __init__ (line 289) | def __init__(self, in_c, out_c, k, s=1, p=0): method forward (line 295) | def forward(self, x): function weights_init_kaiming (line 299) | def weights_init_kaiming(m): class HighResolutionNet (line 314) | class HighResolutionNet(nn.Module): method __init__ (line 316) | def __init__(self, cfg, enable_dim_reduction, dim_reduction_channels, ... method _make_incre_channel_nin (line 382) | def _make_incre_channel_nin(self): method _make_head (line 400) | def _make_head(self, pre_stage_channels): method _make_transition_layer (line 449) | def _make_transition_layer( method _make_layer (line 485) | def _make_layer(self, block, inplanes, planes, blocks, stride=1): method _make_stage (line 502) | def _make_stage(self, layer_config, num_inchannels, method forward (line 532) | def forward(self, x): method random_init (line 578) | def random_init(self): method load_param (line 588) | def load_param(self, pretrained_path): function init_pretrained_weights (line 605) | def init_pretrained_weights(model, pretrain_path, model_key): function hrnet32 (line 611) | def hrnet32(num_classes, loss='part_based', pretrained=True, enable_dim_... FILE: torchreid/models/inceptionresnetv2.py class BasicConv2d (line 37) | class BasicConv2d(nn.Module): method __init__ (line 39) | def __init__(self, in_planes, out_planes, kernel_size, stride, padding... method forward (line 57) | def forward(self, x): class Mixed_5b (line 64) | class Mixed_5b(nn.Module): method __init__ (line 66) | def __init__(self): method forward (line 87) | def forward(self, x): class Block35 (line 96) | class Block35(nn.Module): method __init__ (line 98) | def __init__(self, scale=1.0): method forward (line 119) | def forward(self, x): class Mixed_6a (line 130) | class Mixed_6a(nn.Module): method __init__ (line 132) | def __init__(self): method forward (line 145) | def forward(self, x): class Block17 (line 153) | class Block17(nn.Module): method __init__ (line 155) | def __init__(self, scale=1.0): method forward (line 175) | def forward(self, x): class Mixed_7a (line 185) | class Mixed_7a(nn.Module): method __init__ (line 187) | def __init__(self): method forward (line 208) | def forward(self, x): class Block8 (line 217) | class Block8(nn.Module): method __init__ (line 219) | def __init__(self, scale=1.0, noReLU=False): method forward (line 241) | def forward(self, x): class InceptionResNetV2 (line 255) | class InceptionResNetV2(nn.Module): method __init__ (line 266) | def __init__(self, num_classes, loss='softmax', **kwargs): method load_imagenet_weights (line 309) | def load_imagenet_weights(self): method featuremaps (line 321) | def featuremaps(self, x): method forward (line 339) | def forward(self, x): function inceptionresnetv2 (line 357) | def inceptionresnetv2(num_classes, loss='softmax', pretrained=True, **kw... FILE: torchreid/models/inceptionv4.py class BasicConv2d (line 37) | class BasicConv2d(nn.Module): method __init__ (line 39) | def __init__(self, in_planes, out_planes, kernel_size, stride, padding... method forward (line 57) | def forward(self, x): class Mixed_3a (line 64) | class Mixed_3a(nn.Module): method __init__ (line 66) | def __init__(self): method forward (line 71) | def forward(self, x): class Mixed_4a (line 78) | class Mixed_4a(nn.Module): method __init__ (line 80) | def __init__(self): method forward (line 95) | def forward(self, x): class Mixed_5a (line 102) | class Mixed_5a(nn.Module): method __init__ (line 104) | def __init__(self): method forward (line 109) | def forward(self, x): class Inception_A (line 116) | class Inception_A(nn.Module): method __init__ (line 118) | def __init__(self): method forward (line 138) | def forward(self, x): class Reduction_A (line 147) | class Reduction_A(nn.Module): method __init__ (line 149) | def __init__(self): method forward (line 161) | def forward(self, x): class Inception_B (line 169) | class Inception_B(nn.Module): method __init__ (line 171) | def __init__(self): method forward (line 206) | def forward(self, x): class Reduction_B (line 215) | class Reduction_B(nn.Module): method __init__ (line 217) | def __init__(self): method forward (line 237) | def forward(self, x): class Inception_C (line 245) | class Inception_C(nn.Module): method __init__ (line 247) | def __init__(self): method forward (line 279) | def forward(self, x): class InceptionV4 (line 300) | class InceptionV4(nn.Module): method __init__ (line 311) | def __init__(self, num_classes, loss, **kwargs): method forward (line 342) | def forward(self, x): function init_pretrained_weights (line 360) | def init_pretrained_weights(model, model_url): function inceptionv4 (line 376) | def inceptionv4(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/mlfn.py class MLFNBlock (line 16) | class MLFNBlock(nn.Module): method __init__ (line 18) | def __init__( method forward (line 64) | def forward(self, x): class MLFN (line 98) | class MLFN(nn.Module): method __init__ (line 109) | def __init__( method init_params (line 196) | def init_params(self): method forward (line 212) | def forward(self, x): function init_pretrained_weights (line 244) | def init_pretrained_weights(model, model_url): function mlfn (line 260) | def mlfn(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/mobilenetv2.py class ConvBlock (line 18) | class ConvBlock(nn.Module): method __init__ (line 33) | def __init__(self, in_c, out_c, k, s=1, p=0, g=1): method forward (line 40) | def forward(self, x): class Bottleneck (line 44) | class Bottleneck(nn.Module): method __init__ (line 46) | def __init__(self, in_channels, out_channels, expansion_factor, stride... method forward (line 59) | def forward(self, x): class MobileNetV2 (line 69) | class MobileNetV2(nn.Module): method __init__ (line 81) | def __init__( method _make_layer (line 128) | def _make_layer(self, block, t, c, n, s): method _construct_fc_layer (line 140) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 171) | def _init_params(self): method featuremaps (line 190) | def featuremaps(self, x): method forward (line 202) | def forward(self, x): function init_pretrained_weights (line 223) | def init_pretrained_weights(model, model_url): function mobilenetv2_x1_0 (line 239) | def mobilenetv2_x1_0(num_classes, loss, pretrained=True, **kwargs): function mobilenetv2_x1_4 (line 258) | def mobilenetv2_x1_4(num_classes, loss, pretrained=True, **kwargs): FILE: torchreid/models/mudeep.py class ConvBlock (line 9) | class ConvBlock(nn.Module): method __init__ (line 22) | def __init__(self, in_c, out_c, k, s, p): method forward (line 27) | def forward(self, x): class ConvLayers (line 31) | class ConvLayers(nn.Module): method __init__ (line 34) | def __init__(self): method forward (line 40) | def forward(self, x): class MultiScaleA (line 47) | class MultiScaleA(nn.Module): method __init__ (line 50) | def __init__(self): method forward (line 67) | def forward(self, x): class Reduction (line 76) | class Reduction(nn.Module): method __init__ (line 79) | def __init__(self): method forward (line 89) | def forward(self, x): class MultiScaleB (line 97) | class MultiScaleB(nn.Module): method __init__ (line 100) | def __init__(self): method forward (line 120) | def forward(self, x): class Fusion (line 128) | class Fusion(nn.Module): method __init__ (line 131) | def __init__(self): method forward (line 142) | def forward(self, x1, x2, x3, x4): class MuDeep (line 151) | class MuDeep(nn.Module): method __init__ (line 162) | def __init__(self, num_classes, loss='softmax', **kwargs): method featuremaps (line 184) | def featuremaps(self, x): method forward (line 192) | def forward(self, x): FILE: torchreid/models/nasnet.py class MaxPoolPad (line 52) | class MaxPoolPad(nn.Module): method __init__ (line 54) | def __init__(self): method forward (line 59) | def forward(self, x): class AvgPoolPad (line 66) | class AvgPoolPad(nn.Module): method __init__ (line 68) | def __init__(self, stride=2, padding=1): method forward (line 75) | def forward(self, x): class SeparableConv2d (line 82) | class SeparableConv2d(nn.Module): method __init__ (line 84) | def __init__( method forward (line 107) | def forward(self, x): class BranchSeparables (line 113) | class BranchSeparables(nn.Module): method __init__ (line 115) | def __init__( method forward (line 142) | def forward(self, x): class BranchSeparablesStem (line 157) | class BranchSeparablesStem(nn.Module): method __init__ (line 159) | def __init__( method forward (line 184) | def forward(self, x): class BranchSeparablesReduction (line 194) | class BranchSeparablesReduction(BranchSeparables): method __init__ (line 196) | def __init__( method forward (line 211) | def forward(self, x): class CellStem0 (line 223) | class CellStem0(nn.Module): method __init__ (line 225) | def __init__(self, stem_filters, num_filters=42): method forward (line 272) | def forward(self, x): class CellStem1 (line 300) | class CellStem1(nn.Module): method __init__ (line 302) | def __init__(self, stem_filters, num_filters): method forward (line 419) | def forward(self, x_conv0, x_stem_0): class FirstCell (line 458) | class FirstCell(nn.Module): method __init__ (line 460) | def __init__( method forward (line 536) | def forward(self, x, x_prev): class NormalCell (line 577) | class NormalCell(nn.Module): method __init__ (line 579) | def __init__( method forward (line 643) | def forward(self, x, x_prev): class ReductionCell0 (line 674) | class ReductionCell0(nn.Module): method __init__ (line 676) | def __init__( method forward (line 737) | def forward(self, x, x_prev): class ReductionCell1 (line 766) | class ReductionCell1(nn.Module): method __init__ (line 768) | def __init__( method forward (line 862) | def forward(self, x, x_prev): class NASNetAMobile (line 891) | class NASNetAMobile(nn.Module): method __init__ (line 902) | def __init__( method _init_params (line 1041) | def _init_params(self): method features (line 1060) | def features(self, input): method forward (line 1094) | def forward(self, input): function init_pretrained_weights (line 1110) | def init_pretrained_weights(model, model_url): function nasnetamobile (line 1126) | def nasnetamobile(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/osnet.py class ConvLayer (line 28) | class ConvLayer(nn.Module): method __init__ (line 31) | def __init__( method forward (line 57) | def forward(self, x): class Conv1x1 (line 64) | class Conv1x1(nn.Module): method __init__ (line 67) | def __init__(self, in_channels, out_channels, stride=1, groups=1): method forward (line 81) | def forward(self, x): class Conv1x1Linear (line 88) | class Conv1x1Linear(nn.Module): method __init__ (line 91) | def __init__(self, in_channels, out_channels, stride=1): method forward (line 98) | def forward(self, x): class Conv3x3 (line 104) | class Conv3x3(nn.Module): method __init__ (line 107) | def __init__(self, in_channels, out_channels, stride=1, groups=1): method forward (line 121) | def forward(self, x): class LightConv3x3 (line 128) | class LightConv3x3(nn.Module): method __init__ (line 134) | def __init__(self, in_channels, out_channels): method forward (line 151) | def forward(self, x): class ChannelGate (line 162) | class ChannelGate(nn.Module): method __init__ (line 165) | def __init__( method forward (line 208) | def forward(self, x): class OSBlock (line 223) | class OSBlock(nn.Module): method __init__ (line 226) | def __init__( method forward (line 262) | def forward(self, x): class OSNet (line 282) | class OSNet(nn.Module): method __init__ (line 291) | def __init__( method _make_layer (line 344) | def _make_layer( method _construct_fc_layer (line 369) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 390) | def _init_params(self): method featuremaps (line 412) | def featuremaps(self, x): method forward (line 421) | def forward(self, x, return_featuremaps=False): function init_pretrained_weights (line 440) | def init_pretrained_weights(model, key=''): function osnet_x1_0 (line 521) | def osnet_x1_0(num_classes=1000, pretrained=True, loss='softmax', **kwar... function osnet_x0_75 (line 536) | def osnet_x0_75(num_classes=1000, pretrained=True, loss='softmax', **kwa... function osnet_x0_5 (line 551) | def osnet_x0_5(num_classes=1000, pretrained=True, loss='softmax', **kwar... function osnet_x0_25 (line 566) | def osnet_x0_25(num_classes=1000, pretrained=True, loss='softmax', **kwa... function osnet_ibn_x1_0 (line 581) | def osnet_ibn_x1_0( FILE: torchreid/models/osnet_ain.py class ConvLayer (line 18) | class ConvLayer(nn.Module): method __init__ (line 21) | def __init__( method forward (line 47) | def forward(self, x): class Conv1x1 (line 53) | class Conv1x1(nn.Module): method __init__ (line 56) | def __init__(self, in_channels, out_channels, stride=1, groups=1): method forward (line 70) | def forward(self, x): class Conv1x1Linear (line 76) | class Conv1x1Linear(nn.Module): method __init__ (line 79) | def __init__(self, in_channels, out_channels, stride=1, bn=True): method forward (line 88) | def forward(self, x): class Conv3x3 (line 95) | class Conv3x3(nn.Module): method __init__ (line 98) | def __init__(self, in_channels, out_channels, stride=1, groups=1): method forward (line 112) | def forward(self, x): class LightConv3x3 (line 118) | class LightConv3x3(nn.Module): method __init__ (line 124) | def __init__(self, in_channels, out_channels): method forward (line 141) | def forward(self, x): class LightConvStream (line 148) | class LightConvStream(nn.Module): method __init__ (line 151) | def __init__(self, in_channels, out_channels, depth): method forward (line 162) | def forward(self, x): class ChannelGate (line 169) | class ChannelGate(nn.Module): method __init__ (line 172) | def __init__( method forward (line 215) | def forward(self, x): class OSBlock (line 230) | class OSBlock(nn.Module): method __init__ (line 233) | def __init__(self, in_channels, out_channels, reduction=4, T=4, **kwar... method forward (line 249) | def forward(self, x): class OSBlockINin (line 263) | class OSBlockINin(nn.Module): method __init__ (line 266) | def __init__(self, in_channels, out_channels, reduction=4, T=4, **kwar... method forward (line 283) | def forward(self, x): class OSNet (line 301) | class OSNet(nn.Module): method __init__ (line 310) | def __init__( method _make_layer (line 359) | def _make_layer(self, blocks, layer, in_channels, out_channels): method _construct_fc_layer (line 366) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 387) | def _init_params(self): method featuremaps (line 413) | def featuremaps(self, x): method forward (line 424) | def forward(self, x, return_featuremaps=False): function init_pretrained_weights (line 443) | def init_pretrained_weights(model, key=''): function osnet_ain_x1_0 (line 524) | def osnet_ain_x1_0( FILE: torchreid/models/pcb.py function conv3x3 (line 17) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 29) | class BasicBlock(nn.Module): method __init__ (line 32) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 42) | def forward(self, x): class Bottleneck (line 61) | class Bottleneck(nn.Module): method __init__ (line 64) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 85) | def forward(self, x): class DimReduceLayer (line 108) | class DimReduceLayer(nn.Module): method __init__ (line 110) | def __init__(self, in_channels, out_channels, nonlinear): method forward (line 127) | def forward(self, x): class PCB (line 131) | class PCB(nn.Module): method __init__ (line 143) | def __init__( method _make_layer (line 188) | def _make_layer(self, block, planes, blocks, stride=1): method _init_params (line 210) | def _init_params(self): method featuremaps (line 229) | def featuremaps(self, x): method forward (line 240) | def forward(self, x): function init_pretrained_weights (line 267) | def init_pretrained_weights(model, model_url): function pcb_p6 (line 283) | def pcb_p6(num_classes, loss='softmax', pretrained=True, **kwargs): function pcb_p4 (line 300) | def pcb_p4(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/pvpm.py function conv3x3 (line 25) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 31) | class BasicBlock(nn.Module): method __init__ (line 34) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 44) | def forward(self, x): class Bottleneck (line 63) | class Bottleneck(nn.Module): method __init__ (line 66) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 79) | def forward(self, x): class DimReduceLayer (line 102) | class DimReduceLayer(nn.Module): method __init__ (line 104) | def __init__(self, in_channels, out_channels, nonlinear): method forward (line 117) | def forward(self, x): class PCB (line 121) | class PCB(nn.Module): method __init__ (line 133) | def __init__(self, num_classes, loss, block, layers, method _construct_em_layer (line 165) | def _construct_em_layer(self, fc_dims, input_dim, dropout_p=0.5): # TO... method _make_layer (line 190) | def _make_layer(self, block, planes, blocks, stride=1): method _init_params (line 207) | def _init_params(self): method featuremaps (line 224) | def featuremaps(self, x): method forward (line 235) | def forward(self, x): function init_pretrained_weights (line 268) | def init_pretrained_weights(model, model_url): function pcb_p6 (line 280) | def pcb_p6(num_classes, loss='softmax', pretrained=True, **kwargs): function pcb_p4 (line 297) | def pcb_p4(num_classes, loss='softmax', pretrained=True, **kwargs): class Conv1x1_att (line 314) | class Conv1x1_att(nn.Module): method __init__ (line 317) | def __init__(self, in_channels, out_channels, stride=1, groups=1): method forward (line 324) | def forward(self, x): class score_embedding (line 331) | class score_embedding(nn.Module): method __init__ (line 334) | def __init__(self, in_channels, out_channels): method forward (line 341) | def forward(self, x): class Pose_Subnet (line 350) | class Pose_Subnet(nn.Module): # TODO method __init__ (line 354) | def __init__(self, blocks, in_channels, channels, att_num=1, IN=False,... method _make_layer (line 371) | def _make_layer(self, block, layer, in_channels, out_channels, reduce_... method forward (line 386) | def forward(self, x): method _init_params (line 401) | def _init_params(self): class pose_guide_att_Resnet (line 422) | class pose_guide_att_Resnet(PCB): method __init__ (line 423) | def __init__(self, num_classes, loss, block, layers, last_stride=2, pa... method forward (line 435) | def forward(self, x, pose_map): function pose_resnet50_256_p4 (line 479) | def pose_resnet50_256_p4(num_classes, loss='softmax', pretrained=True, *... function pose_resnet50_256_p6 (line 495) | def pose_resnet50_256_p6(num_classes, loss='softmax', pretrained=True, *... function pose_resnet50_256_p6_pscore_reg (line 511) | def pose_resnet50_256_p6_pscore_reg(num_classes, loss='softmax', pretrai... function pose_resnet50_256_p4_pscore_reg (line 528) | def pose_resnet50_256_p4_pscore_reg(num_classes, loss='softmax', pretrai... FILE: torchreid/models/resnet.py function conv3x3 (line 31) | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): function conv1x1 (line 45) | def conv1x1(in_planes, out_planes, stride=1): class BasicBlock (line 52) | class BasicBlock(nn.Module): method __init__ (line 55) | def __init__( method forward (line 86) | def forward(self, x): class Bottleneck (line 105) | class Bottleneck(nn.Module): method __init__ (line 108) | def __init__( method forward (line 134) | def forward(self, x): class ResNet (line 157) | class ResNet(nn.Module): method __init__ (line 175) | def __init__( method _make_layer (line 257) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method _construct_fc_layer (line 292) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 323) | def _init_params(self): method featuremaps (line 342) | def featuremaps(self, x): method forward (line 354) | def forward(self, x): function init_pretrained_weights (line 379) | def init_pretrained_weights(model, model_url): function resnet18 (line 398) | def resnet18(num_classes, loss='softmax', pretrained=True, **kwargs): function resnet34 (line 414) | def resnet34(num_classes, loss='softmax', pretrained=True, **kwargs): function resnet50 (line 430) | def resnet50(num_classes, loss='softmax', pretrained=True, **kwargs): function resnet101 (line 445) | def resnet101(num_classes, loss='softmax', pretrained=True, **kwargs): function resnet152 (line 461) | def resnet152(num_classes, loss='softmax', pretrained=True, **kwargs): function resnext50_32x4d (line 480) | def resnext50_32x4d(num_classes, loss='softmax', pretrained=True, **kwar... function resnext101_32x8d (line 498) | def resnext101_32x8d(num_classes, loss='softmax', pretrained=True, **kwa... function resnet50_fc512 (line 521) | def resnet50_fc512(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/resnet_fastreid.py function get_norm (line 36) | def get_norm(norm, out_channels, **kwargs): class Non_local (line 60) | class Non_local(nn.Module): method __init__ (line 61) | def __init__(self, in_channels, bn_norm, reduc_ratio=2): method forward (line 84) | def forward(self, x): class IBN (line 108) | class IBN(nn.Module): method __init__ (line 109) | def __init__(self, planes, bn_norm, **kwargs): method forward (line 117) | def forward(self, x): class BatchNorm (line 125) | class BatchNorm(nn.BatchNorm2d): method __init__ (line 126) | def __init__(self, num_features, eps=1e-05, momentum=0.1, weight_freez... class SELayer (line 135) | class SELayer(nn.Module): method __init__ (line 136) | def __init__(self, channel, reduction=16): method forward (line 146) | def forward(self, x): class BasicBlock (line 153) | class BasicBlock(nn.Module): method __init__ (line 156) | def __init__(self, inplanes, planes, bn_norm, with_ibn=False, with_se=... method forward (line 174) | def forward(self, x): class Bottleneck (line 194) | class Bottleneck(nn.Module): method __init__ (line 197) | def __init__(self, inplanes, planes, bn_norm, with_ibn=False, with_se=... method forward (line 218) | def forward(self, x): class ResNet (line 242) | class ResNet(nn.Module): method __init__ (line 243) | def __init__(self, last_stride, bn_norm, with_ibn, with_se, with_nl, b... method _make_layer (line 265) | def _make_layer(self, block, planes, blocks, stride=1, bn_norm="BN", w... method _build_nonlocal (line 282) | def _build_nonlocal(self, layers, non_layers, bn_norm): method forward (line 296) | def forward(self, x): method random_init (line 347) | def random_init(self): function init_pretrained_weights (line 357) | def init_pretrained_weights(key): function fastreid_resnet (line 405) | def fastreid_resnet(pretrained=True, **kwargs): function fastreid_resnet_ibn (line 408) | def fastreid_resnet_ibn(pretrained=True, **kwargs): function fastreid_resnet_nl (line 411) | def fastreid_resnet_nl(pretrained=True, **kwargs): function fastreid_resnet_ibn_nl (line 414) | def fastreid_resnet_ibn_nl(pretrained=True, **kwargs): function build_resnet_backbone (line 417) | def build_resnet_backbone(pretrained=True, with_ibn=False, with_nl=False... FILE: torchreid/models/resnet_ibn_a.py function conv3x3 (line 19) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 31) | class BasicBlock(nn.Module): method __init__ (line 34) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 44) | def forward(self, x): class IBN (line 63) | class IBN(nn.Module): method __init__ (line 65) | def __init__(self, planes): method forward (line 73) | def forward(self, x): class Bottleneck (line 81) | class Bottleneck(nn.Module): method __init__ (line 84) | def __init__(self, inplanes, planes, ibn=False, stride=1, downsample=N... method forward (line 108) | def forward(self, x): class ResNet (line 131) | class ResNet(nn.Module): method __init__ (line 140) | def __init__( method _make_layer (line 183) | def _make_layer(self, block, planes, blocks, stride=1): method _construct_fc_layer (line 208) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method featuremaps (line 239) | def featuremaps(self, x): method forward (line 250) | def forward(self, x): function init_pretrained_weights (line 267) | def init_pretrained_weights(model, model_url): function resnet50_ibn_a (line 283) | def resnet50_ibn_a(num_classes, loss='softmax', pretrained=False, **kwar... FILE: torchreid/models/resnet_ibn_b.py function conv3x3 (line 18) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 30) | class BasicBlock(nn.Module): method __init__ (line 33) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 43) | def forward(self, x): class Bottleneck (line 62) | class Bottleneck(nn.Module): method __init__ (line 65) | def __init__(self, inplanes, planes, stride=1, downsample=None, IN=Fal... method forward (line 89) | def forward(self, x): class ResNet (line 114) | class ResNet(nn.Module): method __init__ (line 123) | def __init__( method _make_layer (line 170) | def _make_layer(self, block, planes, blocks, stride=1, IN=False): method _construct_fc_layer (line 193) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method featuremaps (line 224) | def featuremaps(self, x): method forward (line 235) | def forward(self, x): function init_pretrained_weights (line 252) | def init_pretrained_weights(model, model_url): function resnet50_ibn_b (line 268) | def resnet50_ibn_b(num_classes, loss='softmax', pretrained=False, **kwar... FILE: torchreid/models/resnetmid.py function conv3x3 (line 17) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 29) | class BasicBlock(nn.Module): method __init__ (line 32) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 42) | def forward(self, x): class Bottleneck (line 61) | class Bottleneck(nn.Module): method __init__ (line 64) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 85) | def forward(self, x): class ResNetMid (line 108) | class ResNetMid(nn.Module): method __init__ (line 119) | def __init__( method _make_layer (line 158) | def _make_layer(self, block, planes, blocks, stride=1): method _construct_fc_layer (line 180) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 211) | def _init_params(self): method featuremaps (line 230) | def featuremaps(self, x): method forward (line 243) | def forward(self, x): function init_pretrained_weights (line 268) | def init_pretrained_weights(model, model_url): function resnet50mid (line 295) | def resnet50mid(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/senet.py class SEModule (line 91) | class SEModule(nn.Module): method __init__ (line 93) | def __init__(self, channels, reduction): method forward (line 105) | def forward(self, x): class Bottleneck (line 115) | class Bottleneck(nn.Module): method forward (line 120) | def forward(self, x): class SEBottleneck (line 143) | class SEBottleneck(Bottleneck): method __init__ (line 149) | def __init__( class SEResNetBottleneck (line 175) | class SEResNetBottleneck(Bottleneck): method __init__ (line 183) | def __init__( class SEResNeXtBottleneck (line 208) | class SEResNeXtBottleneck(Bottleneck): method __init__ (line 212) | def __init__( class SENet (line 246) | class SENet(nn.Module): method __init__ (line 262) | def __init__( method _make_layer (line 416) | def _make_layer( method _construct_fc_layer (line 453) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method featuremaps (line 485) | def featuremaps(self, x): method forward (line 493) | def forward(self, x): function init_pretrained_weights (line 514) | def init_pretrained_weights(model, model_url): function senet154 (line 530) | def senet154(num_classes, loss='softmax', pretrained=True, **kwargs): function se_resnet50 (line 549) | def se_resnet50(num_classes, loss='softmax', pretrained=True, **kwargs): function se_resnet50_fc512 (line 572) | def se_resnet50_fc512(num_classes, loss='softmax', pretrained=True, **kw... function se_resnet101 (line 595) | def se_resnet101(num_classes, loss='softmax', pretrained=True, **kwargs): function se_resnet152 (line 618) | def se_resnet152(num_classes, loss='softmax', pretrained=True, **kwargs): function se_resnext50_32x4d (line 641) | def se_resnext50_32x4d(num_classes, loss='softmax', pretrained=True, **k... function se_resnext101_32x4d (line 665) | def se_resnext101_32x4d( FILE: torchreid/models/shufflenet.py class ChannelShuffle (line 16) | class ChannelShuffle(nn.Module): method __init__ (line 18) | def __init__(self, num_groups): method forward (line 22) | def forward(self, x): class Bottleneck (line 34) | class Bottleneck(nn.Module): method __init__ (line 36) | def __init__( method forward (line 78) | def forward(self, x): class ShuffleNet (line 101) | class ShuffleNet(nn.Module): method __init__ (line 112) | def __init__(self, num_classes, loss='softmax', num_groups=3, **kwargs): method forward (line 153) | def forward(self, x): function init_pretrained_weights (line 173) | def init_pretrained_weights(model, model_url): function shufflenet (line 189) | def shufflenet(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/shufflenetv2.py function channel_shuffle (line 24) | def channel_shuffle(x, groups): class InvertedResidual (line 39) | class InvertedResidual(nn.Module): method __init__ (line 41) | def __init__(self, inp, oup, stride): method depthwise_conv (line 101) | def depthwise_conv(i, o, kernel_size, stride=1, padding=0, bias=False): method forward (line 106) | def forward(self, x): class ShuffleNetV2 (line 118) | class ShuffleNetV2(nn.Module): method __init__ (line 131) | def __init__( method featuremaps (line 180) | def featuremaps(self, x): method forward (line 189) | def forward(self, x): function init_pretrained_weights (line 207) | def init_pretrained_weights(model, model_url): function shufflenet_v2_x0_5 (line 229) | def shufflenet_v2_x0_5(num_classes, loss='softmax', pretrained=True, **k... function shufflenet_v2_x1_0 (line 238) | def shufflenet_v2_x1_0(num_classes, loss='softmax', pretrained=True, **k... function shufflenet_v2_x1_5 (line 247) | def shufflenet_v2_x1_5(num_classes, loss='softmax', pretrained=True, **k... function shufflenet_v2_x2_0 (line 256) | def shufflenet_v2_x2_0(num_classes, loss='softmax', pretrained=True, **k... FILE: torchreid/models/squeezenet.py class Fire (line 19) | class Fire(nn.Module): method __init__ (line 21) | def __init__( method forward (line 37) | def forward(self, x): class SqueezeNet (line 47) | class SqueezeNet(nn.Module): method __init__ (line 60) | def __init__( method _construct_fc_layer (line 118) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 149) | def _init_params(self): method forward (line 168) | def forward(self, x): function init_pretrained_weights (line 189) | def init_pretrained_weights(model, model_url): function squeezenet1_0 (line 205) | def squeezenet1_0(num_classes, loss='softmax', pretrained=True, **kwargs): function squeezenet1_0_fc512 (line 214) | def squeezenet1_0_fc512( function squeezenet1_1 (line 230) | def squeezenet1_1(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/models/xception.py class SeparableConv2d (line 26) | class SeparableConv2d(nn.Module): method __init__ (line 28) | def __init__( method forward (line 54) | def forward(self, x): class Block (line 60) | class Block(nn.Module): method __init__ (line 62) | def __init__( method forward (line 132) | def forward(self, inp): class Xception (line 145) | class Xception(nn.Module): method __init__ (line 156) | def __init__( method _construct_fc_layer (line 221) | def _construct_fc_layer(self, fc_dims, input_dim, dropout_p=None): method _init_params (line 252) | def _init_params(self): method featuremaps (line 271) | def featuremaps(self, input): method forward (line 302) | def forward(self, x): function init_pretrained_weights (line 323) | def init_pretrained_weights(model, model_url): function xception (line 339) | def xception(num_classes, loss='softmax', pretrained=True, **kwargs): FILE: torchreid/optim/lr_scheduler.py function build_lr_scheduler (line 8) | def build_lr_scheduler( class WarmupMultiStepLR (line 88) | class WarmupMultiStepLR(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 90) | def __init__( method get_lr (line 118) | def get_lr(self): FILE: torchreid/optim/optimizer.py function build_optimizer (line 11) | def build_optimizer( FILE: torchreid/optim/radam.py class RAdam (line 19) | class RAdam(Optimizer): method __init__ (line 21) | def __init__( method __setstate__ (line 48) | def __setstate__(self, state): method step (line 51) | def step(self, closure=None): class PlainRAdam (line 134) | class PlainRAdam(Optimizer): method __init__ (line 136) | def __init__( method __setstate__ (line 163) | def __setstate__(self, state): method step (line 166) | def step(self, closure=None): class AdamW (line 233) | class AdamW(Optimizer): method __init__ (line 235) | def __init__( method __setstate__ (line 266) | def __setstate__(self, state): method step (line 269) | def step(self, closure=None): FILE: torchreid/scripts/default_config.py function get_default_config (line 11) | def get_default_config(): function imagedata_kwargs (line 254) | def imagedata_kwargs(cfg): function videodata_kwargs (line 284) | def videodata_kwargs(cfg): function optimizer_kwargs (line 308) | def optimizer_kwargs(cfg): function lr_scheduler_kwargs (line 325) | def lr_scheduler_kwargs(cfg): function engine_run_kwargs (line 334) | def engine_run_kwargs(cfg): function display_config_diff (line 353) | def display_config_diff(cfg, default_cfg_copy): FILE: torchreid/scripts/get_labels.py function build_config_maskrcnn (line 21) | def build_config_maskrcnn(model_config_name): function compare_arrays (line 29) | def compare_arrays(array1, array2): function get_image_paths (line 51) | def get_image_paths(source, path_format=False): function format_path (line 72) | def format_path(img_path, dataset_dir): function get_label_paths (line 91) | def get_label_paths(is_mask, img_paths, dataset_dir): function skip_existing (line 116) | def skip_existing(is_mask, imagery, dataset_dir): function save_files (line 136) | def save_files(files, files_path, verbose=True): class ImageDataset (line 152) | class ImageDataset(Dataset): method __init__ (line 163) | def __init__(self, imagery: List[Path]): method __getitem__ (line 166) | def __getitem__(self, index): method __len__ (line 169) | def __len__(self): class BatchPifPaf (line 173) | class BatchPifPaf: method __init__ (line 174) | def __init__(self, model_name: str = "shufflenetv2k16", batch_size: in... method __call__ (line 197) | def __call__(self, imagery: List[Path] or List[str], dataset_dir: List... method __get_pifpaf_conf (line 254) | def __get_pifpaf_conf(self, processed_image_batch: Instances): class BatchMask (line 282) | class BatchMask: method __init__ (line 283) | def __init__(self, cfg: CfgNode or str, batch_size: int = None, worker... method __collate (line 322) | def __collate(self, batch): method __call__ (line 348) | def __call__(self, imagery: List[Path] or List[str], dataset_dir: List... method __filter_pifpaf_with_mask (line 404) | def __filter_pifpaf_with_mask(self, batch, function main (line 487) | def main(): FILE: torchreid/scripts/main.py function build_datamanager (line 20) | def build_datamanager(cfg): function build_engine (line 27) | def build_engine(cfg, datamanager, model, optimizer, scheduler, writer, ... function reset_config (line 111) | def reset_config(cfg, args): function main (line 128) | def main(): function build_config (line 192) | def build_config(args=None, config_file=None, config=None): function build_torchreid_model_engine (line 226) | def build_torchreid_model_engine(cfg): FILE: torchreid/tools/compute_mean_std.py function main (line 19) | def main(): FILE: torchreid/tools/extract_part_based_features.py function extract_part_based_features (line 10) | def extract_part_based_features(extractor, image_list, batch_size=400): function extract_det_idx (line 44) | def extract_det_idx(img_path): function extract_reid_features (line 48) | def extract_reid_features(cfg, base_folder, out_path, model=None, model_... FILE: torchreid/tools/feature_extractor.py class FeatureExtractor (line 14) | class FeatureExtractor(object): method __init__ (line 60) | def __init__( method __call__ (line 125) | def __call__(self, input, external_parts_masks=None): FILE: torchreid/utils/avgmeter.py class AverageMeter (line 15) | class AverageMeter(object): method __init__ (line 25) | def __init__(self): method reset (line 28) | def reset(self): method update (line 34) | def update(self, val, n=1): class BatchMeter (line 41) | class BatchMeter(object): method __init__ (line 42) | def __init__(self, epoch_count, batch_count): method reset (line 47) | def reset(self): method update (line 51) | def update(self, epoch, batch, val): method total_for_epoch (line 55) | def total_for_epoch(self, epoch): method avg_for_epoch (line 58) | def avg_for_epoch(self, epoch): method batch_avg (line 61) | def batch_avg(self): method epoch_avg (line 64) | def epoch_avg(self): method total (line 67) | def total(self): class SingleMeter (line 71) | class SingleMeter(EngineStateListener): method __init__ (line 72) | def __init__(self, engine_state): method reset (line 78) | def reset(self): method update (line 82) | def update(self, val, total): method ratio (line 92) | def ratio(self): class EpochMeter (line 98) | class EpochMeter(EngineStateListener): method __init__ (line 100) | def __init__(self, engine_state): method update (line 113) | def update(self, val, total=1.): method epoch_completed (line 124) | def epoch_completed(self): method last_val (line 142) | def last_val(self): method epoch_ratio (line 145) | def epoch_ratio(self, epoch): method total_ratio (line 148) | def total_ratio(self): class EpochArrayMeter (line 152) | class EpochArrayMeter(EngineStateListener): method __init__ (line 154) | def __init__(self, engine_state, array_size): method update (line 167) | def update(self, val, total): method epoch_completed (line 183) | def epoch_completed(self): method epoch_ratio (line 200) | def epoch_ratio(self, epoch): method total_ratio (line 203) | def total_ratio(self): class TimeMeter (line 207) | class TimeMeter(AverageMeter): method __init__ (line 211) | def __init__(self, name): method _format_time (line 216) | def _format_time(self, time): method total_time (line 219) | def total_time(self): method average_time (line 222) | def average_time(self): method start (line 225) | def start(self): method stop (line 228) | def stop(self): method _current_time_ms (line 238) | def _current_time_ms(): class TorchTimeMeter (line 242) | class TorchTimeMeter(TimeMeter): method __init__ (line 246) | def __init__(self, name, plot=True): method start (line 253) | def start(self): method _start_cuda (line 259) | def _start_cuda(self): method stop (line 264) | def stop(self): method _stop_cuda (line 270) | def _stop_cuda(self): class EpochMetricsMeter (line 284) | class EpochMetricsMeter(object): method __init__ (line 299) | def __init__(self, engine_state, delimiter='\t'): method update (line 304) | def update(self, input_dict): method summary (line 320) | def summary(self, epoch): class LossEpochMetricsMeter (line 328) | class LossEpochMetricsMeter(object): method __init__ (line 329) | def __init__(self, engine_state, delimiter='\t'): method update (line 334) | def update(self, input_dict): method summary (line 353) | def summary(self, epoch): class MetricMeter (line 366) | class MetricMeter(object): method __init__ (line 381) | def __init__(self, delimiter='\t'): method update (line 385) | def update(self, input_dict): method __str__ (line 399) | def __str__(self): FILE: torchreid/utils/constants.py function get_test_embeddings_names (line 21) | def get_test_embeddings_names(parts_names, test_embeddings): FILE: torchreid/utils/distribution.py function plot_body_parts_pairs_distance_distribution (line 10) | def plot_body_parts_pairs_distance_distribution(body_part_pairwise_dist,... function plot_pairs_distance_distribution (line 28) | def plot_pairs_distance_distribution(distmat, q_pids, g_pids, tag): function compute_distance_distribution (line 35) | def compute_distance_distribution(ax, distmat, q_pids, g_pids, title): function compute_ssmd (line 47) | def compute_ssmd(neg_p, pos_p): function plot_distributions (line 57) | def plot_distributions(ax, neg_p, pos_p, pos_p_mean, pos_p_std, neg_p_me... FILE: torchreid/utils/engine_state.py class EngineStateListener (line 5) | class EngineStateListener: method batch_completed (line 6) | def batch_completed(self): method epoch_started (line 9) | def epoch_started(self): method epoch_completed (line 12) | def epoch_completed(self): method training_started (line 15) | def training_started(self): method training_completed (line 18) | def training_completed(self): method test_completed (line 21) | def test_completed(self): method run_completed (line 24) | def run_completed(self): class EngineState (line 28) | class EngineState(EngineStateListener): method current_engine_state (line 32) | def current_engine_state(cls): method __init__ (line 36) | def __init__(self, start_epoch, max_epoch): method add_listener (line 50) | def add_listener(self, listener, last=False): method batch_completed (line 57) | def batch_completed(self): method epoch_started (line 63) | def epoch_started(self): method epoch_completed (line 68) | def epoch_completed(self): method training_started (line 74) | def training_started(self): method training_completed (line 79) | def training_completed(self): method test_completed (line 84) | def test_completed(self): method run_completed (line 88) | def run_completed(self): method update_lr (line 92) | def update_lr(self, lr): FILE: torchreid/utils/imagetools.py function gkern (line 5) | def gkern(kernlen=21, std=None): function build_gaussian_heatmaps (line 14) | def build_gaussian_heatmaps(kp_xyc, w, h, gaussian=None): FILE: torchreid/utils/logging/deprecated_loggers.py class StdoutLogger (line 11) | class StdoutLogger(object): method __init__ (line 29) | def __init__(self, fpath=None): method __del__ (line 36) | def __del__(self): method __enter__ (line 39) | def __enter__(self): method __exit__ (line 42) | def __exit__(self, *args): method write (line 45) | def write(self, msg): method flush (line 50) | def flush(self): method close (line 56) | def close(self): class RankLogger (line 62) | class RankLogger(object): method __init__ (line 108) | def __init__(self, sources, targets): method write (line 126) | def write(self, name, epoch, rank1): method show_summary (line 137) | def show_summary(self): FILE: torchreid/utils/logging/logger.py class Logger (line 10) | class Logger: method current_logger (line 17) | def current_logger(cls): method __init__ (line 21) | def __init__(self, cfg): method add_model (line 55) | def add_model(self, model): method add_text (line 59) | def add_text(self, tag, value): method add_scalar (line 63) | def add_scalar(self, tag, scalar_value, step): method add_figure (line 69) | def add_figure(self, tag, figure, step): method add_image (line 84) | def add_image(self, group, name, image, step): method add_embeddings (line 96) | def add_embeddings(self, tag, embeddings, labels, imgs, step): method close (line 105) | def close(self): FILE: torchreid/utils/model_complexity.py function _ntuple (line 17) | def _ntuple(n): function hook_convNd (line 35) | def hook_convNd(m, x, y): function hook_maxpool1d (line 50) | def hook_maxpool1d(m, x, y): function hook_maxpool2d (line 56) | def hook_maxpool2d(m, x, y): function hook_maxpool3d (line 65) | def hook_maxpool3d(m, x, y): function hook_avgpool1d (line 73) | def hook_avgpool1d(m, x, y): function hook_avgpool2d (line 79) | def hook_avgpool2d(m, x, y): function hook_avgpool3d (line 87) | def hook_avgpool3d(m, x, y): function hook_adapmaxpool1d (line 95) | def hook_adapmaxpool1d(m, x, y): function hook_adapmaxpool2d (line 104) | def hook_adapmaxpool2d(m, x, y): function hook_adapmaxpool3d (line 114) | def hook_adapmaxpool3d(m, x, y): function hook_adapavgpool1d (line 124) | def hook_adapavgpool1d(m, x, y): function hook_adapavgpool2d (line 133) | def hook_adapavgpool2d(m, x, y): function hook_adapavgpool3d (line 143) | def hook_adapavgpool3d(m, x, y): function hook_relu (line 158) | def hook_relu(m, x, y): function hook_leakyrelu (line 164) | def hook_leakyrelu(m, x, y): function hook_batchnormNd (line 176) | def hook_batchnormNd(m, x, y): function hook_instancenormNd (line 184) | def hook_instancenormNd(m, x, y): function hook_groupnorm (line 188) | def hook_groupnorm(m, x, y): function hook_layernorm (line 192) | def hook_layernorm(m, x, y): function hook_linear (line 205) | def hook_linear(m, x, y): function _get_flops_counter (line 258) | def _get_flops_counter(only_conv_linear): function compute_model_complexity (line 264) | def compute_model_complexity( FILE: torchreid/utils/reidtools.py function visualize_ranked_results (line 19) | def visualize_ranked_results( FILE: torchreid/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: torchreid/utils/tensortools.py function replace_values (line 3) | def replace_values(input, mask, value): function masked_mean (line 12) | def masked_mean(input, mask): FILE: torchreid/utils/tools.py function mkdir_if_missing (line 23) | def mkdir_if_missing(dirname): function check_isfile (line 33) | def check_isfile(fpath): function read_json (line 48) | def read_json(fpath): function write_json (line 55) | def write_json(obj, fpath): function set_random_seed (line 62) | def set_random_seed(seed): function download_url (line 69) | def download_url(url, dst): function read_image (line 99) | def read_image(path): function read_masks (line 124) | def read_masks(masks_path): function collect_env_info (line 150) | def collect_env_info(): function perc (line 161) | def perc(val, decimals=2): function extract_test_embeddings (line 164) | def extract_test_embeddings(model_output, test_embeddings): FILE: torchreid/utils/torch_receptive_field/receptive_field.py function check_same (line 10) | def check_same(stride): function receptive_field (line 16) | def receptive_field(model, input_size, batch_size=-1, device="cuda"): function receptive_field_for_unit (line 154) | def receptive_field_for_unit(receptive_field_dict, layer, unit_position): FILE: torchreid/utils/torchtools.py function save_checkpoint (line 24) | def save_checkpoint( function load_checkpoint (line 65) | def load_checkpoint(fpath): function resume_from_checkpoint (line 101) | def resume_from_checkpoint(fpath, model, optimizer=None, scheduler=None): function adjust_learning_rate (line 140) | def adjust_learning_rate( function set_bn_to_eval (line 166) | def set_bn_to_eval(m): function open_all_layers (line 175) | def open_all_layers(model): function open_specified_layers (line 187) | def open_specified_layers(model, open_layers): function count_num_param (line 228) | def count_num_param(model): function load_pretrained_weights (line 260) | def load_pretrained_weights(model, weight_path): function collate (line 323) | def collate(batch): FILE: torchreid/utils/visualization/display_batch_triplets.py function show_triplet_grid (line 20) | def show_triplet_grid(triplets): function show_triplet (line 50) | def show_triplet(anc, pos, neg, pos_dist, neg_dist): function add_border (line 61) | def add_border(img, color): function show_instance (line 67) | def show_instance(ax, instance, dist, color): FILE: torchreid/utils/visualization/embeddings_projection.py function visualize_embeddings (line 9) | def visualize_embeddings(qf, gf, q_pids, g_pids, test_loader, dataset_na... function extract_samples (line 26) | def extract_samples(features, dataset, sample_size): FILE: torchreid/utils/visualization/feature_map_visualization.py function flatten (line 26) | def flatten(maps): function organize (line 31) | def organize(flattened, num_map, feat_dim, h, w): function feat_to_color (line 37) | def feat_to_color(maps): function normalize_01 (line 45) | def normalize_01(m): function mapwise_normalize (line 53) | def mapwise_normalize(map1, feats): function visualize_pca_multi (line 68) | def visualize_pca_multi(maps_all, feats, pids, tag): function display_feature_maps (line 128) | def display_feature_maps(embeddings_dict, spatial_features, body_part_ma... FILE: torchreid/utils/visualization/visualize_query_gallery_rankings.py function visualize_ranking_grid (line 34) | def visualize_ranking_grid(distmat, body_parts_distmat, test_loader, dat... function show_ranking_grid (line 104) | def show_ranking_grid(query_sample, gallery_topk_samples, mAP, rank1, da... function insert_background_line (line 166) | def insert_background_line(grid_img, match_color, row, height, padding_t... function display_sample_on_row (line 178) | def display_sample_on_row(grid_img, sample, row, img_shape, mask_filteri... function mask_overlay (line 255) | def mask_overlay(img, mask, clip=True, interpolation=cv2.INTER_NEAREST): function align_top_text (line 268) | def align_top_text(img, text, pos, fontScale=1.0, thickness=1, padding=4): function align_top_multi_text (line 276) | def align_top_multi_text(img, text, pos, fontScale=1.0, thickness=1, pad... function align_bottom_text (line 296) | def align_bottom_text(img, text, pos, fontScale=1.0, thickness=1, paddin... function align_right_text (line 304) | def align_right_text(img, text, pos, fontScale=1.0, thickness=1, padding... function align_left_multitext (line 312) | def align_left_multitext(img, text, pos, fontScale=1.0, thickness=1, pad... function centered_text (line 332) | def centered_text(img, text, pos, fontScale=1, thickness=1): function insert_img_into_grid (line 340) | def insert_img_into_grid(grid_img, img, row, col): function make_border (line 351) | def make_border(img, border_color, bw): FILE: torchreid/utils/writer.py class Writer (line 17) | class Writer(EngineStateListener): method current_writer (line 24) | def current_writer(cls): method __init__ (line 28) | def __init__(self, cfg): method init_engine_state (line 56) | def init_engine_state(self, engine_state, parts_num): method report_performance (line 75) | def report_performance(self, cmc, mAP, ssmd, pxl_acc_avg, name=""): method report_global_performance (line 84) | def report_global_performance(self, method intermediate_evaluate (line 97) | def intermediate_evaluate(self): method update_invalid_pairwise_distances_count (line 101) | def update_invalid_pairwise_distances_count(self, batch_pairwise_dist): method update_invalid_part_based_pairwise_distances_count (line 104) | def update_invalid_part_based_pairwise_distances_count(self, valid_bod... method used_parts_statistics (line 108) | def used_parts_statistics(self, M, body_part_id): method visualize_triplets (line 134) | def visualize_triplets(self, images, masks, mask, dist): method qg_pairwise_dist_statistics (line 172) | def qg_pairwise_dist_statistics(self, pairwise_dist, body_part_pairwis... method qg_body_part_distances_boxplot (line 188) | def qg_body_part_distances_boxplot(self, body_part_pairwise_dist): method qg_body_part_pairs_availability_barplot (line 202) | def qg_body_part_pairs_availability_barplot(self, body_part_pairwise_d... method qg_body_part_availability_barplot (line 233) | def qg_body_part_availability_barplot(self, qf_parts_visibility, gf_pa... method qg_distribution_of_body_part_availability_histogram (line 267) | def qg_distribution_of_body_part_availability_histogram(self, qf_parts... method visualize_embeddings (line 293) | def visualize_embeddings(self, qf, gf, q_pids, g_pids, test_loader, da... method visualize_rank (line 298) | def visualize_rank(self, test_loader, dataset_name, distmat, save_dir,... method training_started (line 320) | def training_started(self): method epoch_started (line 323) | def epoch_started(self): method epoch_completed (line 328) | def epoch_completed(self): method training_completed (line 358) | def training_completed(self): method test_completed (line 366) | def test_completed(self): method run_completed (line 373) | def run_completed(self): method display_used_body_parts (line 397) | def display_used_body_parts(self):