Error with annotations when generating new version

Hi! For whatever reason, my annotations (done in xml) show up normally inside the Roboflow Dataset tab, but after I generate, they are all missing and the resulting JSON file has no objects. Is there a way to fix this?

1 Like

Hi @Leslaphine_Smith - I believe this issue was fixed. Can you try generating another version of the dataset and let me know if it the issue still occurs?

Hello @Mohamed , I have the same issue as Leslaphine. I tried re-generating another version but the problem still occurs. Any idea how to fix this ?

For information, I don’t know if it will help, but my annotations are also in xml format and were generated in CVAT.

Thanks in advance

@SachaDuyns when you regenerated the version, did you have Auto-Orient applied, by chance?

If not, can you generate another version with that applied, and let me know if the annotations are still shifted?

Hello @Mohamed, thank you for your answer. Yes I had Auto-Orient applied during the generation. But let me clarify : the annotations are not shifted, they are absent. The annotations are visible in the database but when I generate it, the annotations are completely removed. it gives empty .txt files.
Any idea how to fix it ?

@SachaDuyns did you label with bounding boxes, or with polygons?

Also:

  • What is the project type?
  • What format did you export in?

@Mohamed I labeled with bounding boxes in CVAT. The project type is “object detection” (my goal is to detect virus capsides on an image). I exported the annotation from CVAT into PASCAL VOC 1.1 format, and in roboflow I generated and exported the dataset into YOLO v5 PyTorch format. But I think that the problem does not come from the latter because the annotations disappear after the generation but before the export to YOLO v5.

Does that help ?

Hi, I am also having this issue. I imported images with annotations, and I can see them. I made a bunch of changes on Roboflow, but when I try and generate the dataset, it just returns the images without any annotations. The only thing i have done is resized the images and set to with black borders. When I export to YOLOv8 I get all the images, but the annotation files are just blank (they are there though)

I’m emailing you now to get the link to your project so I can test this, myself.

In my email, I’m going to ask for:

  1. The link to your project
  2. The annotation file you uploaded to Roboflow
  3. At minimum, a subset of the associated images from the exported CVAT images that correspond to the label files
  • NOTE: I’d like the images to the CVAT export only, rather than the ones exported from Roboflow

Hi @dave89 where did you import the labels from?

Can you follow the procedure below when I email you in a moment? But also include the name of the platform you exported from, and the annotation file format you exported in.

Hello, for those who might be interested, I found where the error came from (at least it solved the issue for me).
The problem came from the xml annotations files. In my files, there were no

<filename>image.jpg</filename>

subelement in my <annotation> object. Once I added these fields into my xml files, the annotations were visible after generation.

I think that the annotations are visible before generation because roboflow’s dataset tool just look for filenames occurrences (image_1.xml is associated with image_1.jpg) without looking inside the xml file. While during generation, I think that it looks inside them, and if there are no <filename>image_1.jpg</filename> subelement in the image_1.xml, it doesn’t know where to associate the xml file (it doesn’t know what is the image to associate with the annotation).

@dave89 , maybe it will help you.

Thanks for the heads up @SachaDuyns

This was also the issue for me. The new issue is that I imported a ton of data, and then made a whole bunch of changes. So now i have no way of exporting the XML to adjust with the file name and then re-upload. I would have to alter the original XML data and then re-adjust all my annotations. I am hopeful that the team can work on a solution for this. Either the ability to dump the XML data as is, or a quick fix to pull the filename from the actual file…? just a few ideas.

I have the same issue when i upload my images and their annotations (segmentation); I can see them on the images but when i generate the dataset for yolov8 instance segmentation (without any augmentations) there are many empty annotation files.

This is still a really frustrating issue, with how long I spent annotating and now I can’t get the annotations to download.
I uploaded images to roboflow, annotated them through roboflow, then when I generate and download as yolov8 I end up with many empty text files. I have tried over and over creating new versions and downloading. The annotations are still visible on under the “Dataset” and “Annotate” tabs but when I look at the “Versions” tab I see the images that give me problems are missing the annotations.

Hi @I77AGIC

Sorry to hear you’re having issues. Could you send the workspace and project that you are having issues with?

If I’m understanding correctly, you’re having issues with annotations being present in the Annotate menu, but when you generate a version of the dataset, they don’t show up?