diff --git a/apgcc/__pycache__/config.cpython-38.pyc b/apgcc/__pycache__/config.cpython-38.pyc deleted file mode 100644 index 0531e01..0000000 Binary files a/apgcc/__pycache__/config.cpython-38.pyc and /dev/null differ diff --git a/apgcc/__pycache__/engine.cpython-38.pyc b/apgcc/__pycache__/engine.cpython-38.pyc deleted file mode 100644 index d6feeaa..0000000 Binary files a/apgcc/__pycache__/engine.cpython-38.pyc and /dev/null differ diff --git a/apgcc/datasets/__pycache__/__init__.cpython-38.pyc b/apgcc/datasets/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 307786d..0000000 Binary files a/apgcc/datasets/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/apgcc/datasets/__pycache__/build.cpython-38.pyc b/apgcc/datasets/__pycache__/build.cpython-38.pyc deleted file mode 100644 index 45c55cd..0000000 Binary files a/apgcc/datasets/__pycache__/build.cpython-38.pyc and /dev/null differ diff --git a/apgcc/datasets/__pycache__/dataset.cpython-38.pyc b/apgcc/datasets/__pycache__/dataset.cpython-38.pyc deleted file mode 100644 index d7d2976..0000000 Binary files a/apgcc/datasets/__pycache__/dataset.cpython-38.pyc and /dev/null differ diff --git a/apgcc/main.py b/apgcc/main.py index 463d2a6..40affdd 100644 --- a/apgcc/main.py +++ b/apgcc/main.py @@ -163,7 +163,7 @@ def test(cfg): n_parameters = sum(p.numel() for p in model.parameters() if p.requires_grad) logger.info('number of params:%d \n' % n_parameters) - pretrained_dict = torch.load(os.path.join(source_dir, 'best.pth'), map_location='cpu') + pretrained_dict = torch.load(cfg.TEST.WEIGHT, map_location='cpu') model_dict = model.state_dict() param_dict = {k: v for k, v in pretrained_dict.items() if k in model_dict.keys()} model_dict.update(param_dict) diff --git a/apgcc/models/__pycache__/APGCC.cpython-38.pyc b/apgcc/models/__pycache__/APGCC.cpython-38.pyc deleted file mode 100644 index 61208a3..0000000 Binary files a/apgcc/models/__pycache__/APGCC.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/Basic.cpython-38.pyc b/apgcc/models/__pycache__/Basic.cpython-38.pyc deleted file mode 100644 index abd2b1d..0000000 Binary files a/apgcc/models/__pycache__/Basic.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/Decoder.cpython-38.pyc b/apgcc/models/__pycache__/Decoder.cpython-38.pyc deleted file mode 100644 index a5b7592..0000000 Binary files a/apgcc/models/__pycache__/Decoder.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/Encoder.cpython-38.pyc b/apgcc/models/__pycache__/Encoder.cpython-38.pyc deleted file mode 100644 index 27f9cb6..0000000 Binary files a/apgcc/models/__pycache__/Encoder.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/IFA.cpython-38.pyc b/apgcc/models/__pycache__/IFA.cpython-38.pyc deleted file mode 100644 index 4e0d060..0000000 Binary files a/apgcc/models/__pycache__/IFA.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/IFI.cpython-38.pyc b/apgcc/models/__pycache__/IFI.cpython-38.pyc deleted file mode 100644 index 66f0e19..0000000 Binary files a/apgcc/models/__pycache__/IFI.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/IMPCC.cpython-38.pyc b/apgcc/models/__pycache__/IMPCC.cpython-38.pyc deleted file mode 100644 index 94bce76..0000000 Binary files a/apgcc/models/__pycache__/IMPCC.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/__init__.cpython-38.pyc b/apgcc/models/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index a02e60a..0000000 Binary files a/apgcc/models/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/matcher.cpython-38.pyc b/apgcc/models/__pycache__/matcher.cpython-38.pyc deleted file mode 100644 index 6b97ad5..0000000 Binary files a/apgcc/models/__pycache__/matcher.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/__pycache__/modules.cpython-38.pyc b/apgcc/models/__pycache__/modules.cpython-38.pyc deleted file mode 100644 index 29a4f6f..0000000 Binary files a/apgcc/models/__pycache__/modules.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/backbones/__pycache__/__init__.cpython-38.pyc b/apgcc/models/backbones/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 6ff5023..0000000 Binary files a/apgcc/models/backbones/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/backbones/__pycache__/resnet.cpython-38.pyc b/apgcc/models/backbones/__pycache__/resnet.cpython-38.pyc deleted file mode 100644 index 4dc54d3..0000000 Binary files a/apgcc/models/backbones/__pycache__/resnet.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/backbones/__pycache__/vgg.cpython-38.pyc b/apgcc/models/backbones/__pycache__/vgg.cpython-38.pyc deleted file mode 100644 index fb2ba07..0000000 Binary files a/apgcc/models/backbones/__pycache__/vgg.cpython-38.pyc and /dev/null differ diff --git a/apgcc/models/backbones/vgg.py b/apgcc/models/backbones/vgg.py index 74ae9d4..e48e5a7 100644 --- a/apgcc/models/backbones/vgg.py +++ b/apgcc/models/backbones/vgg.py @@ -94,8 +94,7 @@ def _vgg(arch, cfg, batch_norm, pretrained, progress, sync=False, **kwargs): kwargs['init_weights'] = False model = VGG(make_layers(cfgs[cfg], batch_norm=batch_norm, sync=sync), **kwargs) if pretrained: - state_dict = torch.load(model_paths[arch]) - model.load_state_dict(state_dict) + model.load_state_dict(torch.hub.load_state_dict_from_url(model_urls[arch])) return model def vgg11(pretrained=False, progress=True, **kwargs): diff --git a/apgcc/util/__pycache__/__init__.cpython-38.pyc b/apgcc/util/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index f628a16..0000000 Binary files a/apgcc/util/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/apgcc/util/__pycache__/logger.cpython-38.pyc b/apgcc/util/__pycache__/logger.cpython-38.pyc deleted file mode 100644 index fc2ccab..0000000 Binary files a/apgcc/util/__pycache__/logger.cpython-38.pyc and /dev/null differ diff --git a/apgcc/util/__pycache__/misc.cpython-38.pyc b/apgcc/util/__pycache__/misc.cpython-38.pyc deleted file mode 100644 index e970144..0000000 Binary files a/apgcc/util/__pycache__/misc.cpython-38.pyc and /dev/null differ diff --git a/apgcc/util/logger.py b/apgcc/util/logger.py index e526d17..2a77357 100644 --- a/apgcc/util/logger.py +++ b/apgcc/util/logger.py @@ -1,5 +1,8 @@ import os, sys import logging +import numpy as np +import torchvision.transforms as standard_transforms +import cv2 ################################################ ## Record Logger: