CasiaFan / Dataset_to_VOC_converter

Scripts to convert datasets (Caltech pedestrian, MS COCO, HDA) to PASCAL VOC format
MIT License
194 stars 57 forks source link

Reversed augmentation sequence that leads to empty output when using "vbb2voc.py" #15

Open SunLoveSheep opened 5 years ago

SunLoveSheep commented 5 years ago

Dear @zlingkang ,

In your vbb2voc.py script, line 221, you call function "parse_anno_file(args.seq_dir, args.vbb_dir, frame_out, anno_out, person_type)" and pass first "args.seq_dir" then "args.vbb_dir". However, at function definition at line 151 "def parse_anno_file(vbb_inputdir, seq_inputdir, vbb_outputdir, seq_outputdir, person_types=None):", you define the first variable to be "vbb_inputdir" and second variable to be "seq_inputdir". This different calling sequence of vbb and seq variables will lead to empty output since as you suggest in the other issue, your folder structure is: --annotations ----set00 ------V000.vbb --set00 ----V000.seq Also, seems your code should require a folder structure like: --annotations ----set00 ------V000.vbb --sequences ----set00 ------V000.seq to perform correctly.

Moreover, you define augment parser like "parser.add_argument("seq_dir", help="Caltech dataset seq data root directory")" at line 209-212. However, as you shown in your calling example, if we want to call this script in command line like "python3 vbb2voc.py --seq_dir path/to/seq ...", we need to define augment parser like "parser.add_argument("--seq_dir", help="Caltech dataset seq data root directory")"

Hope this helps! Really appreciate your effort in providing this convenient script for transforming annotations between different formats!

Best, Yi