liuqk3 / PUT

Paper 'Transformer based Pluralistic Image Completion with Reduced Information Loss' in TPAMI 2024 and 'Reduce Information Loss in Transformers for Pluralistic Image Inpainting' in CVPR2022
MIT License
178 stars 15 forks source link

help i am not able to run the model , its giving out error model_name = model_name.split(os.path.sep)[-3] --> IndexError: list index out of range #10

Open abhinavisgood opened 2 years ago

abhinavisgood commented 2 years ago

here's the output to my code :: python inference.py --name OUTPUT/000044e_600524iter.pth --func inference_complet_sample_in_feature_for_evaluation --batch_size 1

I didn't know where to put the actual jpg image file , so i put in OUTPUT folder only , and also in the asset folder

Traceback (most recent call last): File "inference.py", line 859, in launch(inference_func_map[args.func], args.ngpus_per_node, args.num_node, args.node_rank, args.dist_url, args=(args,)) File "C:\Users\91809\Desktop\cut\create\image_synthesis\distributed\launch.py", line 52, in launch fn(local_rank, *args) File "inference.py", line 530, in inference_complet_sample_in_feature_for_evaluation info = get_model_and_dataset(args=args, model_name=args.name) File "inference.py", line 71, in get_model_and_dataset model_name = model_name.split(os.path.sep)[-3] IndexError: list index out of range

abhinavisgood commented 2 years ago

please reply

liuqk3 commented 2 years ago

Hi, @abhinavisgood ,

Sorry for the delayed reply and thanks for your interests!

The current inference.py only support the images and masks provided in the config file, which will be used to create a dataloader for data loading. You can modify the configures of 'validation_datasets' in the config file of your model (OUTPUT/000044e_600524iter.pth), then the inference script will load the given data. You can have a look at the following configuration for example ().

I will provide a much simpler script for inference when I am avaliable and it will not take longer.

Best wishes!

图片