This commit is contained in:
James Betker 2021-01-23 13:45:17 -07:00
parent d919ae7148
commit 557cdec116
8 changed files with 13 additions and 13 deletions

View File

@ -3,5 +3,5 @@
<component name="JavaScriptSettings"> <component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" /> <option name="languageLevel" value="ES6" />
</component> </component>
<component name="ProjectRootManager" version="2" project-jdk-name="torch-cu11" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (torch_nightly)" project-jdk-type="Python SDK" />
</project> </project>

View File

@ -9,7 +9,7 @@
<excludeFolder url="file://$MODULE_DIR$/results" /> <excludeFolder url="file://$MODULE_DIR$/results" />
<excludeFolder url="file://$MODULE_DIR$/tb_logger" /> <excludeFolder url="file://$MODULE_DIR$/tb_logger" />
</content> </content>
<orderEntry type="jdk" jdkName="torch-cu11" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.8 (torch_nightly)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="PyDocumentationSettings"> <component name="PyDocumentationSettings">

View File

@ -113,7 +113,7 @@ if __name__ == "__main__":
torch.backends.cudnn.benchmark = True torch.backends.cudnn.benchmark = True
want_just_images = True want_just_images = True
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-opt', type=str, help='Path to options YMAL file.', default='../options/use_video_upsample.yml') parser.add_argument('-opt', type=str, help='Path to options YAML file.', default='../options/use_video_upsample.yml')
opt = option.parse(parser.parse_args().opt, is_train=False) opt = option.parse(parser.parse_args().opt, is_train=False)
opt = option.dict_to_nonedict(opt) opt = option.dict_to_nonedict(opt)

View File

@ -3,8 +3,8 @@ import torch
from models.spinenet_arch import SpineNet from models.spinenet_arch import SpineNet
if __name__ == '__main__': if __name__ == '__main__':
pretrained_path = '../../../experiments/resnet_byol_diffframe_115k.pth' pretrained_path = '../../../experiments/uresnet_pixpro4_imgset.pth'
output_path = '../../experiments/resnet_byol_diffframe_115k_.pth' output_path = '../../../experiments/uresnet_pixpro4_imgset.pth'
wrap_key = 'online_encoder.net.' wrap_key = 'online_encoder.net.'
sd = torch.load(pretrained_path) sd = torch.load(pretrained_path)

View File

@ -13,17 +13,17 @@ import torch
def main(): def main():
split_img = False split_img = False
opt = {} opt = {}
opt['n_thread'] = 7 opt['n_thread'] = 3
opt['compression_level'] = 90 # JPEG compression quality rating. opt['compression_level'] = 95 # JPEG compression quality rating.
# CV_IMWRITE_PNG_COMPRESSION from 0 to 9. A higher value means a smaller size and longer # CV_IMWRITE_PNG_COMPRESSION from 0 to 9. A higher value means a smaller size and longer
# compression time. If read raw images during training, use 0 for faster IO speed. # compression time. If read raw images during training, use 0 for faster IO speed.
opt['dest'] = 'file' opt['dest'] = 'file'
opt['input_folder'] = ['F:\\4k6k\\datasets\\ns_images\\imagesets\\pn_coven\\working'] opt['input_folder'] = ['F:\\4k6k\\datasets\\ns_images\\imagesets\\pn_coven\\working']
opt['save_folder'] = 'F:\\4k6k\\datasets\\ns_images\\256_unsupervised' opt['save_folder'] = 'F:\\4k6k\\datasets\\ns_images\\imagesets\\pn_coven\\cropped'
opt['imgsize'] = 256 opt['imgsize'] = 1024
opt['bottom_crop'] = 0.1 opt['bottom_crop'] = .1
opt['keep_folder'] = False opt['keep_folder'] = True
save_folder = opt['save_folder'] save_folder = opt['save_folder']
if not osp.exists(save_folder): if not osp.exists(save_folder):

View File

@ -48,7 +48,7 @@ if __name__ == "__main__":
torch.backends.cudnn.benchmark = True torch.backends.cudnn.benchmark = True
want_metrics = False want_metrics = False
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-opt', type=str, help='Path to options YAML file.', default='../options/test_faces_styled_sr.yml') parser.add_argument('-opt', type=str, help='Path to options YAML file.', default='../options/test_mi1.yml')
opt = option.parse(parser.parse_args().opt, is_train=False) opt = option.parse(parser.parse_args().opt, is_train=False)
opt = option.dict_to_nonedict(opt) opt = option.dict_to_nonedict(opt)
utils.util.loaded_options = opt utils.util.loaded_options = opt

View File

@ -295,7 +295,7 @@ class Trainer:
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../options/train_imgset_vqvae_stage1.yml') parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../options/train_imgset_tiled_nvqvae_stage1.yml')
parser.add_argument('--launcher', choices=['none', 'pytorch'], default='none', help='job launcher') parser.add_argument('--launcher', choices=['none', 'pytorch'], default='none', help='job launcher')
parser.add_argument('--local_rank', type=int, default=0) parser.add_argument('--local_rank', type=int, default=0)
args = parser.parse_args() args = parser.parse_args()