HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.79k stars 6.31k forks source link

FileList disappear & the box boundary line disappear #87

Closed CT-Yang closed 7 years ago

CT-Yang commented 7 years ago

Dear Author:

I have used this tool for almost one month. It works well until 2 days ago.

I meet 2 questions as I mention below:

  1. The filelist disappear(it happened sometimes)

This function is important for me. Because when there are many images in this file, I can directly click the image I want to label instead of clicking "next image" so many times. And the most important reason is, when I move to another directory, the annotation box will remain the same with the last image I labeled. Only if I click the desired image in the filelist , I can reload the corresponding annotation box for the new desired image.That's why I need this function.

image

when the problem happen, it shows following messages:

Traceback (most recent call last):
  File "labelImg.py", line 1024, in openDir
    self.openNextImg()
  File "labelImg.py", line 1081, in openNextImg
    self.loadFile(filename)
  File "labelImg.py", line 875, in loadFile
    self.loadPascalXMLByFilename(xmlPath)
  File "labelImg.py", line 1224, in loadPascalXMLByFilename
    tVocParseReader = PascalVocReader(xmlPath)
  File "/labelImg/libs/pascal_voc_io.py", line 132, in __init__
    self.parseXML()
  File "/labelImg/libs/pascal_voc_io.py", line 161, in parseXML
    difficult = bool(int(object_iter.find('Difficult').text))
AttributeError: 'NoneType' object has no attribute 'text'
  1. The bounding box's boundary line disappear

It's also important because when there are so many object in the image, sometimes it's hard for me to recognize which object I still not label yet.

image

Hope you can fix these problems, thanks a lot!

CT-Yang commented 7 years ago

The problem 1 can be solved by downloading the Linux_v1.2.3.

And the problem 2 maybe have some problems in my computer.Because when I change to another computer and download the Linux_v1.2.3, it not only can open the old version xml files successfully, but also can see the bbox lines.

So I think problem 2 may not be a general problem for most of the users. But I still hope author can provide some clue to find out what will cause that. Tks.=)

tzutalin commented 7 years ago

Can you share your image and xml?

CT-Yang commented 7 years ago

Although downloading the Linux_v1.2.3 can solve problem1, but it will cause the problem like #84 I summary the way how I deal the current problem:

  1. According the problem in #84 ,we have no choice but to download the newest version (1.3.0).

  2. If the default annotation file set to the file which contains the old version xml file in the previous time, file list will disappear when we open labelImg in the next time. So if we meet this problem, we set the default annotation file to the file that doesn't contain the old version xml file, then close the program. And turn on again, the problem will be solved.

Hope this clue will help u(author) to fix such problem & update the newer version to deal these problem.

And I think the problem that the bbox line disappear have nothing to do with the image and xml file. In my previous computer,I had tried the images in the "tests" file, and still have this problem. If I misunderstand the reason for ur request, just ignore it.=)

CT-Yang commented 7 years ago

The reason that v1.3.0 can't read the old version xml file is just because the "diffucult" term in the xml file. In the new xml file is "Difficult" but in old xml file is "difficult". That's the reason. This is the updated version code:

labelImg_modified.zip

tzutalin commented 7 years ago

Thanks. I will check and merge it after I am done with my current work

tzutalin commented 7 years ago

Merge and fix it on https://github.com/tzutalin/labelImg/commit/a7e3a32385f7a458c667af17d20b650cfb9fa73f Thanks again