Skip to content

Visualize caption predictions for my image file #6

@JoonseoKang

Description

@JoonseoKang

Hello, thank you for your work!

I want to get a caption for the image I have.
So I created a folder 'vis_image' put the image and ran the following code. (also created 'vis_image/val2014' and put images both directory)

python eval.py --dump_images 1 --num_images -1 --model log_relation_transformer_bu_rl_pretrain_beam5/model-best.pth --infos_path log_relation_transformer_bu_rl_pretrain_beam5/infos_relation_transformer_bu-best.pkl --image_root vis_image --input_json data/cocotalk.json --input_label_h5 data/cocotalk_label.h5 --input_fc_dir data/cocobu_fc --input_att_dir data/cocobu_att --input_box_dir data/cocobu_box --input_rel_box_dir data/cocobu_box_relative --beam_size 5 --batch_size 700

As a result, the code below was printed out.

DataLoader loading json file: data/cocotalk.json
vocab size is 9487
DataLoader loading h5 file: data/cocobu_fc data/cocobu_att data/cocobu_box data/cocotalk_label.h5
max sequence length in data is 16
read 123287 image features
assigned 113287 images to split train
assigned 5000 images to split val
assigned 5000 images to split test

cp "vis_image/val2014/COCO_val2014_000000369771.jpg" vis/imgs/369771.jpg
cp: 'vis_image/val2014/COCO_val2014_000000369771.jpg' cannot be described: No such file or directory
image 369771: two plastic containers of food on a table
...

And when I looked at the result with json file in vis and localhost:8000, I saw the caption for test 5000 images.
I just wanted to check the caption of 3 sample images I have.

Could you explain in more detail how i can get a caption for a image i have?

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