labelImg
labelImg copied to clipboard
Why doesn't labelImg recognize this label?
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:
- Flip the image, save under new name {imageName}_flipped.jpg
- Read PascalVOC label file
- Change <filename> and <path> so they also have _flipped at the end of the name
- Mirror label (changing xmin/xmax)
- 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:
-
Example flipped label file:
-
Files:
Above examples of label XML files are incomplete. Can you provide the full contents of the XML files?