AIGC影视(诗与哲) 2021-12-14 13:28 采纳率: 0%
浏览 324

Bringing-Old-Photos-Back-to-Life项目运行报detection.py: error,test.py: error,关于unrecognized arguments

看到修复老照片的项目想试下看

win11系统,安装有anaconda,pycharm2021.2.3,解释器python3.9

执行
 python run.py --GPU 0 --with_scratch

运行结果及报错内容
PS D:\Program Files\Git\Bringing-Old-Photos-Back-to-Life> python run.py --GPU 0 --with_scratch
Running Stage 1: Overall restoration
usage: detection.py [-h] [--GPU GPU] [--test_path TEST_PATH] [--output_dir OUTPUT_DIR] [--input_size INPUT_SIZE]
detection.py: error: unrecognized arguments: Files\Git\Bringing-Old-Photos-Back-to-Life\test_images\old Files\Git\Bringing-Old-Photos-Back-to-Life\output\stage_1_restore_output\masks
usage: test.py [-h] [--name NAME] [--gpu_ids GPU_IDS] [--checkpoints_dir CHECKPOINTS_DIR] [--outputs_dir OUTPUTS_DIR] [--model MODEL] [--norm NORM] [--use_dropout] [--data_type {8,16,32}] [--verbose] [--batchSize BATCHSIZE]
               [--loadSize LOADSIZE] [--fineSize FINESIZE] [--label_nc LABEL_NC] [--input_nc INPUT_NC] [--output_nc OUTPUT_NC] [--dataroot DATAROOT] [--resize_or_crop RESIZE_OR_CROP] [--serial_batches] [--no_flip]
               [--nThreads NTHREADS] [--max_dataset_size MAX_DATASET_SIZE] [--display_winsize DISPLAY_WINSIZE] [--tf_log] [--netG NETG] [--ngf NGF] [--k_size K_SIZE] [--use_v2] [--mc MC] [--start_r START_R]
               [--n_downsample_global N_DOWNSAMPLE_GLOBAL] [--n_blocks_global N_BLOCKS_GLOBAL] [--n_blocks_local N_BLOCKS_LOCAL] [--n_local_enhancers N_LOCAL_ENHANCERS] [--niter_fix_global NITER_FIX_GLOBAL]
               [--load_pretrain LOAD_PRETRAIN] [--no_instance] [--instance_feat] [--label_feat] [--feat_num FEAT_NUM] [--load_features] [--n_downsample_E N_DOWNSAMPLE_E] [--nef NEF] [--n_clusters N_CLUSTERS] [--self_gen]
               [--mapping_n_block MAPPING_N_BLOCK] [--map_mc MAP_MC] [--kl KL] [--load_pretrainA LOAD_PRETRAINA] [--load_pretrainB LOAD_PRETRAINB] [--feat_gan] [--no_cgan] [--map_unet] [--map_densenet] [--fcn] [--is_image]
               [--label_unpair] [--mapping_unpair] [--unpair_w UNPAIR_W] [--pair_num PAIR_NUM] [--Gan_w GAN_W] [--feat_dim FEAT_DIM] [--abalation_vae_len ABALATION_VAE_LEN] [--gpu GPU] [--dataDir DATADIR] [--modelDir MODELDIR]
               [--logDir LOGDIR] [--data_dir DATA_DIR] [--use_skip_model] [--use_segmentation_model] [--spatio_size SPATIO_SIZE] [--test_random_crop] [--contain_scratch_L] [--mask_dilation MASK_DILATION]
               [--irregular_mask IRREGULAR_MASK] [--mapping_net_dilation MAPPING_NET_DILATION] [--VOC VOC] [--non_local NON_LOCAL] [--NL_fusion_method NL_FUSION_METHOD] [--NL_use_mask] [--correlation_renormalize] [--Smooth_L1]
               [--face_restore_setting FACE_RESTORE_SETTING] [--face_clean_url FACE_CLEAN_URL] [--syn_input_url SYN_INPUT_URL] [--syn_gt_url SYN_GT_URL] [--test_on_synthetic] [--use_SN] [--use_two_stage_mapping]
               [--L1_weight L1_WEIGHT] [--softmax_temperature SOFTMAX_TEMPERATURE] [--patch_similarity] [--use_self] [--use_own_dataset] [--test_hole_two_folders] [--no_hole] [--random_hole] [--NL_res] [--image_L1]
               [--hole_image_no_mask] [--down_sample_degradation] [--norm_G NORM_G] [--init_G INIT_G] [--use_new_G] [--use_new_D] [--only_voc] [--cosin_similarity] [--downsample_mode DOWNSAMPLE_MODE] [--mapping_exp MAPPING_EXP]
               [--inference_optimize] [--ntest NTEST] [--results_dir RESULTS_DIR] [--aspect_ratio ASPECT_RATIO] [--phase PHASE] [--which_epoch WHICH_EPOCH] [--how_many HOW_MANY] [--cluster_path CLUSTER_PATH] [--use_encoded_image]
               [--export_onnx EXPORT_ONNX] [--engine ENGINE] [--onnx ONNX] [--start_epoch START_EPOCH] [--test_dataset TEST_DATASET] [--no_degradation] [--no_load_VAE] [--use_v2_degradation]
               [--use_vae_which_epoch USE_VAE_WHICH_EPOCH] [--generate_pair] [--multi_scale_test MULTI_SCALE_TEST] [--multi_scale_threshold MULTI_SCALE_THRESHOLD] [--mask_need_scale] [--scale_num SCALE_NUM]
               [--save_feature_url SAVE_FEATURE_URL] [--test_input TEST_INPUT] [--test_mask TEST_MASK] [--test_gt TEST_GT] [--scale_input] [--save_feature_name SAVE_FEATURE_NAME] [--test_rgb_old_wo_scratch] [--test_mode TEST_MODE]
               [--Quality_restore] [--Scratch_and_Quality_restore] [--HR]
test.py: error: unrecognized arguments: Files\Git\Bringing-Old-Photos-Back-to-Life\output\stage_1_restore_output\masks\input Files\Git\Bringing-Old-Photos-Back-to-Life\output\stage_1_restore_output\masks\mask Files\Git\Bringing-Old-
Photos-Back-to-Life\output\stage_1_restore_output
Traceback (most recent call last):
  File "D:\Program Files\Git\Bringing-Old-Photos-Back-to-Life\run.py", line 102, in <module>
    for x in os.listdir(stage_1_results):
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'D:\\Program Files\\Git\\Bringing-Old-Photos-Back-to-Life\\output\\stage_1_restore_output\\restored_image'
试着搜索unrecognized arguments的相关问题,没找到
想要解决unrecognized arguments的问题。
  • 写回答

1条回答 默认 最新

  • CSDN专家-黄老师 2021-12-14 18:24
    关注

    你的代码提示FileNotFoundError,说明代码需要一些文件但找不到文件路径,应该是缺少了文件数据

    评论

报告相同问题?

问题事件

  • 创建了问题 12月14日

悬赏问题

  • ¥15 我pycharm运行jupyter时出现Jupyter server process exited with code 1,然后打开cmd显示如下
  • ¥15 可否使用carsim-simulink进行四轮独立转向汽车的联合仿真,实现四轮独立转向汽车原地旋转、斜向形式、横移等动作,如果可以的话在carsim中如何进行相应设置
  • ¥15 Caché 2016 在Java环境通过jdbc 执行sql报Parameter list mismatch错误,但是同样的sql使用连接工具可以查询出数据
  • ¥15 疾病的获得与年龄是否有关
  • ¥15 关于浏览器控制台js报错问题-swiper.js相关
  • ¥15 opencv.js内存,CPU飙升
  • ¥15 植物重测序snp数据Treemix分析出现问题!
  • ¥15 怎么让当前页面只能有一人在编辑
  • ¥15 python程序长时间运行卡死,付费求解决方案
  • ¥20 VM打开不了ubuntu虚拟机,如何解决?