Convert Custom Dataset of Images and XML files to YOLOv5 format .txt

Hi professionals,

I am new here at Roboflow and I am having a challenge uploading a custom dataset with its .xml files.

I reviewed the instructions on uploading the various format but I think I am missing something here.

After loading the data, the system somehow is seeing all of the image data BUT does not see the .xml files containing the annotations and labels.

AND it is now presenting me with the options to perform new annotations that have already been done externally from the Roboflow medium in .XML. The task is to alter the dataset containing both the coordinating file and .xml label to yolov5 .txt format.

Can someone guide me here, please? Somehow I am missing a step to move on forward.

Thank you in advance for acknowledging my digital presence, I really appreciate this… thanx once more!

Can you check which XML format your annotations are in? Computer Vision Annotation Formats

There are examples of each format on that page, and if your annotation files match in structure, then the system should match the annotations to the images.

Additionally, what source did you receive these files from?

hi @Mohamed,

That’s the thing, I am not sure about the version xml 1.0 or its representations below and this is what is challenging! The format I am using is not defined anywhere or rather as per my knowledge based on an extensive google search and asking peers, testing python scripts as examples.

Let me demonstrate this format and I hope you can guide me on how this can be done or where I can be redirected to obtain a solution.

  1. I visited all of the formats on that page and tried the most logical one’s xml to text for yolov5 that is, hence me requesting or rather ROBOFLOW’s assistance here as none seemed to work for obvious reasons.

The XML format I’m trying to convert to yolov5 text is presented as follows:

<?xml version="1.0" encoding="UTF-8"?>
    <action nr="1" class="3">
      <bbox x="91" y="41" width="405" height="392" framenr="37"/>
      <bbox x="93" y="41" width="405" height="392" framenr="38"/>
      <bbox x="94" y="41" width="405" height="392" framenr="39"/>
      <bbox x="95" y="41" width="405" height="392" framenr="40"/>
      <bbox x="96" y="41" width="405" height="392" framenr="41"/>
      <bbox x="97" y="41" width="405" height="392" framenr="42"/>
      <bbox x="98" y="41" width="405" height="392" framenr="43"/>
      <bbox x="98" y="41" width="405" height="392" framenr="44"/>
      <bbox x="98" y="41" width="405" height="392" framenr="45"/>
      <bbox x="98" y="41" width="405" height="392" framenr="46"/>
      <bbox x="98" y="41" width="405" height="392" framenr="47"/>
      <bbox x="98" y="41" width="405" height="392" framenr="48"/>
I have loads of files to convert here!!

2, Where did I get the data? From LIRIS human activity dataset
I intend to deploy this in ROBOFLOW for ease of functionality, access, and testing now and in the future. 

3. I am hoping that your system can provide the correct YOLOv5 text representation for this unknown XML format. I explored and investigated other formats but thus far I haven't seen any that resembles this. Can you guide me here as a professional, regarding the format name and process, please? I would really like to know this. If ROBOFLOW cannot handle this format, do you know of a tool that can? please assist here as this is a tad frustrating and tedious. 

Using other python conversion scripts but the manipulation is crazy to interchange the objects therein and swapped for the objects reflecting the XML format above. This lets me know that I am doing this the wrong way based on trying to discern the multiple errors present in the code debugging. 

I tried searching for conversion methods for the LIRIS dataset, but none of the examples presented themselves in the literature or google. Only there paper here ``` ```
and here ``````
and still, they did not indicate the tool used or the process, hence I am communicating with you!

WHY I am adamant about using this dataset? 
```The activity synchronizes with my research area and I would like to build on this by adding more data circumventing my research area, reflecting more activities that is not within the current LIRIS dataset```

```Please guide me and thank you in advance for your response, I am extremely grateful for such and for acknowledging my digital presence````