Skip to content

Error when processing my image folder #17

@KyriaAnnwyn

Description

@KyriaAnnwyn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions