Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when processing my image folder #17

Open
KyriaAnnwyn opened this issue Mar 31, 2022 · 2 comments
Open

Error when processing my image folder #17

KyriaAnnwyn opened this issue Mar 31, 2022 · 2 comments

Comments

@KyriaAnnwyn
Copy link

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
Copy link
Author

I guess i have to prepair detection data for my new images in some special format? Could you please giude me on the preparation and data formats.

@mcleanm
Copy link

mcleanm commented Apr 13, 2022

I'm also getting this error -- I would appreciate knowing how to prepare/preprocess my images to avoid this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants