Live data from Hacker News

Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

github.com

51–60 of 84 posts

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#51
post #21

It would be better to use this as an additional extension before the normal extension like other tools that embed additional metadata do. For example, Draw.io can embed original diagrams in .svg and .png files, and the pre-suffix is .drawio.png or .drawio.png .

Hmm that's a great idea as well, I'll look into it, thank you :)

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#52
using LSB to store structured metadata inside PNG is clever > survives format conversion, stays invisible to standard viewers, and doesn't break compression. but the space is tight. even at 1 bit per channel, that's just 3 bits per pixel on RGB.

given that, how are you handling tradeoffs between spatial fidelity (like masks or edges) versus scalar data (like complexity scores)? is there a priority system, or does it just truncate when it runs out?

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#53

Maybe I'm jaded, but I fail to see how a bespoke file format is a better solution than bundling a normal image and a JSON/XML document containing metadata that adheres to a defined specification. It feels like creating a custom format with backwards PNG compatibility and using steganography to cram metadata inside is an inefficient and over-engineered alternative to a .tar.gz with "image.png" and "metadata.json"

That's fair and how it's traditionally done but the entire idea of this was to have everything you need on the image itself and reduce the complexity and extra files, no risk of losing the JSON, mismatching versions, or needing extra packaging steps.

I'm working on redundancy and error correction to make it better!

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#54
post #28

I do like the idea of storing it steganographically, which also serves as a watermark. But it requires a ton of redundancy and error correction, perhaps enough to survive a few rounds of not-too-lossy reencoding. I dunno how much bandwidth is available before it damages the image.

I wonder how practical it'd be to stratanagraphically hide a QR code in an image and it be retained through rounds of JPEG compression. It could be represented with a single bit per pixel and would inherently have some resistance to corruption.

The real limitation would be bandwidth.

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#55

Reality check: Your extra data is a big JSON blob. Okay, fine. File formats dating back to Targa ( https://en.wikipedia.org/wiki/Truevision_TGA ) support arbitrary text blobs if you're weird enough. PNG itself has both EXIF data and a more general text chunk mechanism (both compressed and uncompressed, https://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.An... , section 4.2.3, you probably want iTXt chunks). exi…

Hi! Thanks for checking it out, means a lot :)

Yes, it is a big JSON blob atm, haha and t's definitely still a POC, but the idea is to avoid having a separate JSON file that adds to the complexity. While EXIF data works pretty well for most basic stuff, it's not enough for everything one might need for AI specific stuff, especially for things like attention maps and saliency regions.

I'm currently working on redundancy and error correction to deal with the resizing problem. Having a separate file format, even if it's a headache and adds another one to the list (well, another cute-sounding one at least), gives more customization options and makes it easier to associate the properties directly.

There's definitely a ton of work left to do, but I see a lot of potential in something like this (also, nice username)

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#56
Modifying the image in any way (cropping, resizing, etc) destroys the metadata. This is necessary in basically every application that interacts with any kind of model that uses images, either for token count reasons, file size reasons, model limits, etc. (Source: I work at a genai startup)

At inference time, you don't control the inputs, so this is moot. At training time, you've already got lots of other metadata that you need to store and preserve that almost certainly won't fit in steganographically encoded format, and you've often got to manipulate the image before feeding it into your training pipeline. Most pipelines don't simply take arbitrary images (nor do you want them: plenty of images need to be modified to, for instance, remove letterboxing).

The other consideration is that steganography is actively introducing artifacts to your assets. If you're training on these images, you'll quickly find that your image generation model, for instance, cannot generate pure black. If you're adding what's effectively visual noise to every image you train on, the model will generate images with noise.

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#57
Great idea and insight. If i understand, it will allow you to embed metadata such as bounding box coordinates and class names, something I have also been working on[0] -- embedding computer vision annotation data directly into an image's EXIF tags, rather than storing it in separate sidecar text files. The idea is simplifying the dataset's file structure. It could offer unexpected advantages — especially for smaller or proprietary datasets, or for fine-tuning tasks where managing separate annotation files adds unnecessary overhead.

[0] https://github.com/VoxleOne/XLabel

Edited for clarity

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#58
post #33

Earlier quoted context omitted.

>Are you asking this earnestly, or, is it meant to communicate something else? If so, what? :) If you're going to accuse some else of technical inconsistencies, maybe you should make sure your critiques are free of technical inconsistencies as well. You know, "people who live in glass houses shouldn't throw stones" and all that.

There's a false equivalence there, between being not-even-wrong and "you have a bunch of UNIX commands followed by a Windows batch file execution." Note we both agree on that, you seem to assume I claimed something else, like, cd doesn't exist on windows. Let's say I instead said "this doesn't work on Windows" I spent probably...8 hours? on Windows this week doing dev, and I'm about 70% sure all of those commands wil…

>There's a false equivalence there, between being not-even-wrong and "you have a bunch of UNIX commands followed by a Windows batch file execution."

>Note we both agree on that, you seem to assume I claimed something else, like, cd doesn't exist on windows.

No, you made a specific claim of "Your setup instructions use UNIX commands up until they require running a Windows batch file", when those "UNIX commands" were "pip" and "python". That statement is incorrect because those commands are readily available on windows.

Your remark about "you seem to assume I claimed something else, like, cd doesn't exist on windows" is absurd at best and verges on bad faith that I'm not even going to engage with it.

>I spent probably...8 hours? on Windows this week doing dev, and I'm about 70% sure all of those commands will work on Windows, with dev mode switched on, with WSL on, prereqs installed...

Which commands are those? The only non-native windows commands I see are git, pip, and python, the latter of which are both included in python. You're making it sound like you need to jump through a bunch of hoops to get those commands working, when really all you have to do is run the installers for git and python.

>Are you 100% sure those commands will work?

Again, my claim isn't that the project works 100%, or even that it's not AI generated, it's that your critique makes little sense either.

>(separately, you misunderstand the quote re: glass houses. It would apply if I had used AI to write not-even-wrong claims and then submitted to HN. This misunderstanding leads to a conclusion that it is impermissible to comment on the correctness of anything if you may be incorrect, which we can both recognize leads to absurdities that would lead to 0 communication ever.)

No, the reason why I accused you of AI generated comments and made the remark about glass houses is that claiming "pip" and "python" are "UNIX commands" is so absurdly wrong that it's on the level of the OP. I agree that you don't have to be 100% correct to accuse people of posting dumb stuff, but you shouldn't be posting dumb stuff either.

Re: Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI

#60
I think that this is interesting research. As LLMs are becoming an important part of building stuff, I suspect that we will find that embedding context close to where it’s needed will yield better results in longer or more complex workflows.

In my AI assisted coding I’ve started experimenting with embedding hyper-relevant context in comments; for example I embed test related context directly into test files, so it’s immediately available and fresh whenever the file is read.

Extrapolating, I’ve been thinking recently about whether it might be useful to design a programming language optimized for LLM use. Not a language to create LLMs, but a language optimized for LLMs to write in and to debug. The big obstacle would seem to be bootstrapping since LLMs are trained by analyzing large amounts of human created code.

Post reply on HN