labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

Why doesn't labelImg recognize this label?

Open Regenhardt opened this issue 2 years ago • 1 comments

Hi,
I'm quite new to this, built a small program to horizontally mirror my labelled images and their labels, but it seems it doesn't find the labels after mirroring them? It's very very strange.
Basically, I labelled images using labelImg.
Then I wanted to mirror all of that to get more data.
So I wrote a little program, basically doing the following for each image:

  1. Flip the image, save under new name {imageName}_flipped.jpg
  2. Read PascalVOC label file
  3. Change <filename> and <path> so they also have _flipped at the end of the name
  4. Mirror label (changing xmin/xmax)
  5. Write mirrored label data to new label file, also appending _flipped to the name

But for some reason, labelImg now doesn't recognize the old labels when opened, although I didn't actually change the original files.
It does however recognize the mirrored labels on the mirrored images.

Any ideas?

  • OS: Windows

  • PyQt version: 5.15.6

  • Example original label file: grafik

  • Example flipped label file: grafik

  • Files: grafik

Regenhardt avatar May 18 '22 20:05 Regenhardt

Above examples of label XML files are incomplete. Can you provide the full contents of the XML files?

nine avatar Jun 09 '22 19:06 nine