casiafan / dataset_to_voc_converter Goto Github PK
View Code? Open in Web Editor NEWScripts to convert datasets (Caltech pedestrian, MS COCO, HDA) to PASCAL VOC format
License: MIT License
Scripts to convert datasets (Caltech pedestrian, MS COCO, HDA) to PASCAL VOC format
License: MIT License
After conversion, i checked the occlusion label, it shows only 0 and 1. How do we distinguish partial occlusion (occlusion range less than 35%) and heavy occlusion (above 35%) from the converted file? If I only want to consider reasonable detections, should I only pick bbox with occlusion of 0 from the xml file? And how about partial and heavy occluded cases?
I can't find the download link in the official website. Can you give me a copy of hda person datasets.
hello, I was trying to convert the vbb to voc using vbb2voc.py. my parameters as below:
python vbb2voc.py --seq_dir=/home/kli/data/pedestrian_data/set00/
--vbb_dir=/home/kli/data/pedestrian_data/annotations/set00/
--output_dir=/home/kli/data/pedestrian_data/voc/set00/
--person_type=person
but get the error vbb2voc.py: error: the following arguments are required: seq_dir, vbb_dir, output_dir, person_type
Is there any problem with the input format?
Running:
python anno_coco2voc.py --anno_file instances_train2014.json --type instance --output_dir ./anno_trainXML
I obtain only 80 folders containing the 80 'things' classes of COCO 2014.
In reality that dataset contain also other 91 'stuff' classes (in total coco2014 contain 172 classes).
So how can I see the other classes ?
Hi ,
I want to only have some category but when i use arg.type=keypoints i got error :
Traceback (most recent call last):
File "anno_coco2voc.py", line 154, in
main(args)
File "anno_coco2voc.py", line 145, in main
parse_keypoints(content, args.output_dir)
File "anno_coco2voc.py", line 115, in parse_keypoints
keypoints = dict(zip(range(1, len(content['categories'][0]['keypoints'])+1), content['categories'][0]['keypoints']))
KeyError: 'keypoints'
when convert coco annotation json file to VOC xml files,create many empty folder ,why?
In2017 the number of train Images are 118,237. but, the number of annotation xml which are in 80 categories are 117,266.
In2017 the number of val Images are 5,000. but, the number of annotation xml which are in 80 categories are 4872.
My Question is why some xml are missed ?
Is it related with 80 categories? msCOCO actually has 90 categories.
If it is true, why 10 categories are excluded from converting to make xml?
Thanks ahead!!
Hi , in the vbb2voc.py
:
Q1) why E.difficult(0)
are for all objects zero ? i want to have difficult of objects.
Q2) what are these ?lock, posv
Thank you for nice work,
but, I wanna convert COCO segmentation label to VOC format.
Is it also supported?
Hi,
If i want to have people and person , what do i do ?
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
你好,请问vbb2voc中第154行 parse_anno_file取消注释运行,为什么输出的是空文件夹呢。
想用YOLO训练行人数据集,但不太清楚annotations需要怎么转换成voc格式。
如果方便的话能否提供一些思路?
非常感谢~~~
I made the path for the same name with the code and downloaded instance_train2014.json already.
and run
"python anno_coco2voc.py --anno_file /startdt_data/COCO/dataset/annotations/instances_train2014.json \ --type instance \ --output_dir /startdt_data/COCO/dataset/instance_train_annotation"
But I got the following error messages.
File "anno_coco2voc.py", line 69
print "Formating instance xml file {} done!".format(name)
^
SyntaxError: invalid syntax
How to fix it?
Thank you for uploading "convert dataset to VOC annotation format"
Regards,
Could you please add a license to this repository, e.g. MIT. That will make it easier to use. Thanks!
I am trying to implement my model for the detection of disease (mmdetection) in medical imaging. How I can convert my database into VOC format? Is there any supporting .py file available in your project folder? That can convert my database into VOC format. If not, how I can do this? Can you please help me to sort out this issue?
My database consists of two main folders.
When i run anno_json_image_urls.py, the second column in the generated url.txt was the website such as 'http://images.cocodataset.org/val2017/000000052412.jpg', not 1 or -1
In my opinion, the second row in urls.txt should be 1 or -1, isn't it?
i try to converter caltech pedetrian dataset, but the rusult like this;
Generating annotation xml file of picture: set02_V003_719.jpg
Generating annotation xml file of picture: set02_V003_72.jpg
Generating annotation xml file of picture: set02_V003_720.jpg
Generating annotation xml file of picture: set07_V010_1.jpg
Generating annotation xml file of picture: set07_V010_10.jpg
Generating annotation xml file of picture: set07_V010_100.jpg
Generating annotation xml file of picture: set07_V010_1000.jpg
Generating annotation xml file of picture: set07_V010_1001.jpg
the image name is wrong when it contains zero in the end, please answer me.thank you
I am trying to convert dataset from coco to voc format using anno_coco2voc.py file but got this KeyError: 'coco_url'
billion@billion-Inspiron-3542:~/Dataset_to_VOC_converter$ python3 anno_coco2voc.py --anno_file /home/billion/Desktop/Siddhi/document_edge_detection_dataset/earlier_training/testing/test.json \
--type instance \ --output_dir /home/billion/Desktop/Siddhi/document_edge_detection_dataset/earlier_training/annotations
Traceback (most recent call last):
File "anno_coco2voc.py", line 154, in
main(args)
File "anno_coco2voc.py", line 143, in main
parse_instance(content, args.output_dir)
File "anno_coco2voc.py", line 60, in parse_instance
anno_tree = instance2xml_base(groups[0])
File "anno_coco2voc.py", line 16, in instance2xml_base
E.url(anno['coco_url'])
KeyError: 'coco_url'
Hi,
I think there is a mistake in the order of the arguments in the main
function of vbb2voc.py
file. In the main
function you call the parse_anno_file
function:
parse_anno_file(args.seq_dir, args.vbb_dir, frame_out, anno_out, person_type)
However, the arguments of this functions are:
def parse_anno_file(vbb_inputdir, seq_inputdir, vbb_outputdir, seq_outputdir, person_types=None):
I think there is a mistake in the sequence of these arguments. If you want I can open a pull request.
Thank you!
I have trouble with compiling anno_coco2voc.py using person_keypoints_train2017.json, cytoolz.groupby('file_name', merged_info_list).items() seems to remain empty all the time, therefore it failed to generate .xml files, can someone help me?
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.