jhc13 / taggui

Tag manager and captioner for image datasets
GNU General Public License v3.0
777 stars 37 forks source link

Some image warnings in console #170

Closed geroldmeisinger closed 5 months ago

geroldmeisinger commented 6 months ago

I get a lot of these warnings:

qt.gui.icc: fromIccProfile: failed minimal tag size sanity
qt.gui.icc: fromIccProfile: invalid tag offset alignment
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: profile 'ICC Profile': 1000000h: invalid rendering intent
jhc13 commented 6 months ago

You can just ignore them. Most of them seem to be caused by small problems with the images.

geroldmeisinger commented 5 months ago

You can just ignore them. Most of them seem to be caused by small problems with the images.

shouldn't we suppress them instead?

jhc13 commented 5 months ago

I thought I had suppressed all unnecessary warnings for users, but apparently some still remained. I have suppressed warnings for Transformers. I didn't encounter any other warnings.

geroldmeisinger commented 5 months ago

you need examples?

jhc13 commented 5 months ago

Sure.

geroldmeisinger commented 5 months ago

000093482

Failed to get Exif tags

more when im home again

geroldmeisinger commented 5 months ago

000004851

qt.gui.icc: fromIccProfile: failed minimal tag size sanity

jhc13 commented 5 months ago

qt.gui.icc: fromIccProfile: failed minimal tag size sanity

I can't get that image to show any warnings for me. Do you know at what point the warning is triggered?

geroldmeisinger commented 5 months ago

the first image i can reproduce, the second i cannot, hm. i keep you updated if i get the warnings again

jhc13 commented 5 months ago

The "Failed to get Exif tags" warning is actually intentionally printed by the program, so it's a different issue whether to remove that warning or not.

geroldmeisinger commented 5 months ago

000020003

WARNING:exifread:Possibly corrupted field OffsetTime in EXIF IFD WARNING:exifread:Possibly corrupted field OffsetTimeOriginal in EXIF IFD WARNING:exifread:Possibly corrupted field OffsetTimeDigitized in EXIF IFD

000026982

WARNING:exifread:WEBP file does not have exif data.

geroldmeisinger commented 5 months ago

The "Failed to get Exif tags" warning is actually intentionally printed by the program, so it's a different issue whether to remove that warning or not.

I think it's just important to have the image correctly rotated according to exif data. And maybe in future version we may want to feed exif data into the captioning process.

jhc13 commented 5 months ago

I think it's just important to have the image correctly rotated according to exif data.

There's not much we can do if the Exif data is corrupted.

jhc13 commented 5 months ago

WARNING:exifread:Possibly corrupted field OffsetTime in EXIF IFD WARNING:exifread:Possibly corrupted field OffsetTimeOriginal in EXIF IFD WARNING:exifread:Possibly corrupted field OffsetTimeDigitized in EXIF IFD WARNING:exifread:WEBP file does not have exif data.

Are you running the latest version of the code? I do not get these warnings unless I set TAGGUI_ENVIRONMENT=development:

https://github.com/jhc13/taggui/blob/ab605561a5d73ce228c35818c48dcd2ff9a394a1/taggui/run_gui.py#L30-L37

geroldmeisinger commented 5 months ago

no, d7fff3527dfd282dd7e8d83b35707d210c771918

jhc13 commented 5 months ago

Alright, all these warnings should be suppressed in the latest version.

geroldmeisinger commented 5 months ago
WARNING:exifread:PNG file does not have exif data.
WARNING:exifread:PNG file does not have exif data.
WARNING:exifread:PNG file does not have exif data.
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.

:)