Skip to content

generate_json_mask.py not generating absolute path in output filelist and json file #36

@Akimoto-Cris

Description

@Akimoto-Cris

After executing the following script:

python generate_json_mask.py \
	--ann_path ~/datasets/COCO2017/annotations/person_keypoints_val2017.json \
	--json_path ~/datasets/COCO2017/results/json/val2017.json \
	--masklist_path ~/datasets/COCO2017/results/masklist/val2017.txt \
	--filelist_path ~/datasets/COCO2017/results/filelist/val2017.txt \
	--mask_dir ~/datasets/COCO2017/results/masks/mask_val

The generated filelist and filenames in json files should be absolute path, but i got these:

In filelist.txt

000000472209.jpg
000000019642.jpg
000000268909.jpg
000000547777.jpg
000000049429.jpg
000000375321.jpg
000000250249.jpg
000000545549.jpg
000000126073.jpg
000000374391.jpg

In xxx.json:

[{"filename": "000000391895.jpg", "info": [{"pos": [416.82, 172.525], "keypoints": [[
368, 61, 0], [401.5, 82.5, 1], [435, 81, 1], [446, 125, 1], [0, 0, 2], [368, 84, 1], 
[362, 125, 1], [360, 153, 1], [439, 166, 0], [461, 234, 1], [474, 287, 1], [397, 167,
 0], [369, 193, 1], [361, 246, 1], [0, 0, 2], [369, 52, 1], [0, 0, 2], [382, 48, 1]],
 "scale": 0.8172010869565218}]}, 
...

I failed to run train_pose.py, maybe caused by this problem.
I did prepared annotations for training set as well, using similar script.

Did I run the script in wrong directory?
Please tell me how to fix it, other than rewriting the python script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions