object_relation_transformer icon indicating copy to clipboard operation
object_relation_transformer copied to clipboard

Error when processing my image folder

Open KyriaAnnwyn opened this issue 2 years ago • 2 comments

Eval scripts provides evaluation on user patch of images: # For evaluation on a folder of images: parser.add_argument('--image_folder', type=str, default='', help='If this is nonempty then will predict on the images in this folder path') parser.add_argument('--image_root', type=str, default='', help='In case the image paths have to be preprended with a root path to an image folder')

I put some images into images folder and run the csript:

python3 eval.py --dump_images 1 --num_images 10 --model log_relation_transformer_bu_rl/model-best.pth --infos_path log_relation_transformer_bu_rl/infos_relation_transformer_bu-best.pkl --image_folder images --language_eval 0

When doing so i get the error:

Traceback (most recent call last): File "eval.py", line 175, in loss, split_predictions, lang_stats = eval_utils.eval_split(model, crit, loader, File "/home/docet/Projects/Pic2Text/object_relation_transformer-master/eval_utils.py", line 134, in eval_split boxes_data= data['boxes'][np.arange(loader.batch_size) * loader.seq_per_img] KeyError: 'boxes'

How can i solve it?

KyriaAnnwyn avatar Mar 31 '22 14:03 KyriaAnnwyn