Closed offchan42 closed 4 years ago
I am experiencing the same exact issue. My boss has labeled some images and wants me to label the rest. Now I cannot open the files as they are jpg. I guess I must downgrade to get this to work for now
Experiencing the same problem ...
Experiencing the same problem on mac, it does not want to load .jpg or .heic
Can you guys give me the output of below command?
ipython
In [1]: from qtpy import QtGui
In [2]: QtGui.QImageReader.supportedImageFormats()
Out[2]:
[PyQt5.QtCore.QByteArray(b'bmp'),
PyQt5.QtCore.QByteArray(b'cur'),
PyQt5.QtCore.QByteArray(b'gif'),
PyQt5.QtCore.QByteArray(b'heic'),
PyQt5.QtCore.QByteArray(b'heif'),
PyQt5.QtCore.QByteArray(b'icns'),
PyQt5.QtCore.QByteArray(b'ico'),
PyQt5.QtCore.QByteArray(b'jp2'),
PyQt5.QtCore.QByteArray(b'jpeg'),
PyQt5.QtCore.QByteArray(b'jpg'),
PyQt5.QtCore.QByteArray(b'pbm'),
PyQt5.QtCore.QByteArray(b'pgm'),
PyQt5.QtCore.QByteArray(b'png'),
PyQt5.QtCore.QByteArray(b'ppm'),
PyQt5.QtCore.QByteArray(b'svg'),
PyQt5.QtCore.QByteArray(b'svgz'),
PyQt5.QtCore.QByteArray(b'tga'),
PyQt5.QtCore.QByteArray(b'tif'),
PyQt5.QtCore.QByteArray(b'tiff'),
PyQt5.QtCore.QByteArray(b'wbmp'),
PyQt5.QtCore.QByteArray(b'webp'),
PyQt5.QtCore.QByteArray(b'xbm'),
PyQt5.QtCore.QByteArray(b'xpm')]
on my mac, it gives jpeg as well.
@wkentaro Here it is. Though the labelme version is 4.2.9
Here it goes, labelme -V 4.5.0
[ERROR ] label_file:load_image_file:39 - Failed opening image file: /Users/sakibkurtic/Desktop/Horizontal_Traffic_Sign_Train_Data/0420.jpg
This is detailed error I got.
@wkentaro Here it is. Though the labelme version is 4.2.9
So this issue is probably related to your PyQt5 version or something not labelme version. Please check the PyQt5 version to see when jpeg will be listed.
Here it goes, labelme -V 4.5.0
[ERROR ] label_file:load_image_file:39 - Failed opening image file: /Users/sakibkurtic/Desktop/Horizontal_Traffic_Sign_Train_Data/0420.jpg
This is detailed error I got.
There's jpeg, but still you can't open it?
Here it goes, labelme -V 4.5.0
[ERROR ] label_file:load_image_file:39 - Failed opening image file: /Users/sakibkurtic/Desktop/Horizontal_Traffic_Sign_Train_Data/0420.jpg
This is detailed error I got.There's jpeg, but still you can't open it?
Here is the image folder with images. I am able to load images with labelme version 3.5, but any later does not work.
@sakibk "does not work" means there's no jpeg listed in the OpenFile dialog? as in here? https://github.com/wkentaro/labelme/issues/675#issue-630578377
Here it goes, labelme -V 4.5.0 [ERROR ] label_file:load_image_file:39 - Failed opening image file: /Users/sakibkurtic/Desktop/Horizontal_Traffic_Sign_Train_Data/0420.jpg
If you're talking about this, this seems a different issue, so can you open another issue?
@wkentaro Here it is. Though the labelme version is 4.2.9
So this issue is probably related to your PyQt5 version or something not labelme version. Please check the PyQt5 version to see when jpeg will be listed.
Following is the version of qtpy
when labelme is 4.2.9
I also tried to install labelme 4.5.3, I still see the same qtpy version: 1.9.0
I have also reproduced this problem in another person's PC. So this problem is related to the labelme version.
Note that I don't see jpg
in the list from Qtpy but I see jpg
in the list of file extension in labelme 4.2.9. So the list of extensions that you saw from qtpy above does not match the list from labelme.
I'm suspecting that you are probably not using qtpy in labelme 4.2.9 then later you use it. That's a clue from me.
If the list from Qtpy should match with the list from labelme, then we have found the bug.
Can you check the version of PyQt5 instead of qtpy? qtpy is just a wrapper.
I'm suspecting that you are probably not using qtpy in labelme 4.2.9 then later you use it. That's a clue from me. If the list from Qtpy should match with the list from labelme, then we have found the bug.
Actually, both 4.2.9 and 4.5.3 use qtpy. And the logic in app.openFile
was not changed.
https://github.com/wkentaro/labelme/blob/0ad853b729ac619692f52d147890a7d51c817b72/labelme/app.py#L1656-L1677
Can you try 4.2.10 as well to see when it happens? Or something below to find where the error happens
git clone https://github.com/wkentaro/labelme
cd labelme
git checkout v4.2.10
pip install -e .
labelme examples/semantic_segmentation # check if jpeg is read
git checkout HEAD~1 # previous version
labelme examples/semantic_segmentation # check if jpeg is read
git checkout HEAD~1 # previous version
labelme examples/semantic_segmentation # check if jpeg is read
...
Can you check the version of PyQt5 instead of qtpy? qtpy is just a wrapper.
Here it is:
>>> from PyQt5.Qt import PYQT_VERSION_STR
>>> PYQT_VERSION_STR
'5.9.2'
I am not sure if that's the right way to check the version. I just found it from a thread in Quora.
Anyway, the PyQt5 version is the same when I uninstall labelme 4.2.9 and install 4.5.3
Here's the extension list from 4.2.10. it looks fine
Anyway, the PyQt5 version is the same when I uninstall labelme 4.2.9 and install 4.5.3
I see. What is the output of QImageReader.supportedImageFormats()
in 4.2.10?
Anyway, the PyQt5 version is the same when I uninstall labelme 4.2.9 and install 4.5.3
I see. What is the output of
QImageReader.supportedImageFormats()
in 4.2.10?
Exact same as 4.2.9
So there's no jpeg .. strange. I'm not sure why jpeg could be listed in openFile with it.
Can you check the difference between 4.3.0 and 4.2.10? Because that's where the problem happens. 4.3.0 does not have jpg.
Here is some more info:
Can you check the difference between 4.3.0 and 4.2.10? Because that's where the problem happens. 4.3.0 does not have jpg.
I almost know which code change made this happen, but I'm not sure why this could happen. Anyway, can you check this PR? #697
Can you check the difference between 4.3.0 and 4.2.10? Because that's where the problem happens. 4.3.0 does not have jpg.
I almost know which code change made this happen, but I'm not sure why this could happen. Anyway, can you check this PR? #697
Yep. That PR shows all the long extension list. It seems to work. I have also checked the previous commit of that PR. It doesn't show the jpg. So it's confirmed 100% that commit is the relevant code.
In labelme V5.5.0,i meet the same question which does not have jpg in the openlist.please help me to analyze the reason.
Describe the bug In version 4.2.9, it still reads the jpg images. But after I upgraded to >=4.3, it stops reading the jpg images. You can see clearly this issue by trying to open an image and in the list of image types, you won't find the jpg in there.
To Reproduce Steps to reproduce the behavior:
pip install labelme==4.3
or any latest versionExpected behavior The jpg images must be seen.
Screenshots This is an example of version 4.2.9 (which have jpg type in the list)
This is version 4.5.1 (does not have jpg in the list)
Desktop (please complete the following information):
Additional context Maybe this is an intended feature because it cannot be a mistake that some guys decided to remove jpg and other extensions from the list. But then why do this? It causes a backward compatibility issue.