Annotations misplaced

The annotations are getting misplaced after generating the version from dataset. It seems that the images are getting rotated automatically and the corresponding annotations are not(Auto orient has been disabled in pre processing step).Kindly resolve this bug as it affects model training.

2 Likes

Same issue i reported but to no avail …

Hi @ARUN_slcm @Supratim_Chatterjee - have you tried generating a version with Auto-Orient applied?

Does the same issue occur in that case?

@ARUN_slcm I’m seeing your other report as well: Training directory empty - #28 by ARUN_slcm

I’ll take a look into it to see if I can reproduce the issue and get a report filed for a fix if the bug persists.

1 Like

Same issue. The images are getting rotated automatically in a version, but labels are not, even without any preprocessing or augmentation step.

Yes @Mohamed even with auto orient the same problem occurs.

No not that issue
this one

@Mohamed were you able to reproduce the issue ?

The issue was resolved, I’ve been trying to track down the posts referencing it, and replying to them all - this one was from about two weeks ago. Apologies for missing this one:

@Mohamed Hi. I am facing the same issue with my annotations as well. The annotations get rotated but not my images even after trying auto-orient. help would be appreciated!

@ashley.noronha were your images all labeled within Roboflow? Or were they labeled elsewhere and then imported to the platform?

Additionally, what project type?

@Mohamed the images were labelled using CVAT. I am using it for object detection with BB

For the annotation files, what format did you export in?

If it was a COCO JSON format export, can you check to see if the width and height properties are “reversed” compared to the width and height dimensions of the original images you uploaded to Robofow? What is the COCO JSON Annotation Format?


If so, I believe that may be the issue.

If that turns out to not be the issue, please add Roboflow Support to the workspace so we can take a deeper look, and comment here when you’ve done so.

@Mohamed I do not think the height and widht are reversed. i just granted access to roboflow Support. Could you please take a look? Thank You

I’ll take a look at that today and get a response back to you once I run some tests, and learn what has occurred.

Additionally, I’ll email you now to receive a copy of the original files you uploaded, as this will be helpful for the debugging process.

@Mohamed Hi. i just emailed you the files :slight_smile:

@ashley.noronha @Mohamed Did you find a solution to that problem? In my case the issue is reproducible the following way:

  1. Create dataset on roboflow
  2. Annotate data on roboflow and create new dataset version → error already shows up but can’t be corrected since its only a version
  3. Export the data in coco format
  4. Upload to different project on Roboflow → Annotations are actually wrongly saved

Please advise since I am stuck here.

@Manthano can you try:

  1. delete all versions with the issue
  2. any future versions you generate, ensure Auto-Orient is added a preprocessing setting

Let me know if the issue persists after this. I just uploaded an affected image, and found that so long as I kept Auto-Orient as a setting, the images turned out fine, and were fine when re-importing.

This is why you want to use Auto-Orient:

Hey @Mohamed, the solution was actually to turn on auto-orient. Whats really strange to me is that Roboflow internally rotates the images without giving notice to the user. Nevertheless, that was the solution thanks for the help :slight_smile: Wish you a nice day.

Hi @Manthano - glad to hear that worked! And we actually abide by the information present within the image. Your photos or video were captured with the camera “rotated” vertically or horizontally compared to having the camera pointing “regularly.” What this does is embeds EXIF data in your images.

The Auto-Orient feature removed the EXIF data so your images and labels remain in the correct orientation no matter where you export to train, or choose to train, next.

I will add, the images being rotated on top of each other during generation is not intentional for situations where Auto-Orient is not present. I reported a bug on that, so our team will investigate further to ensure that is resolved.

In the meantime, Auto-Orient should continue to solve the issue.