Live data from Hacker News

Show HN: Invertornot.com – API to enhance your images in dark-mode

invertornot.com

31–39 of 39 posts

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#31
post #30

Is inverting the colors in a photo ever the right choice? People come out looking really strange.

That’s the point of using a NN. If it detects people, dim it (losing contrast). If it detect bright vector graphics, invert it (not losing contrast).

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#32
If you don't have a lot of images, you can go over them all manually and write the "please invert me" request directly into the filename.

CSS:

    img[src^="/images/invertable"] {
        filter: hue-rotate(180deg) invert(1);
    }
Now all image names starting with "invertable" will be inverted.

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#33
I'm confused... has the meaning of "invert" changed since I last looked? Because the bar chart given as an example on the page isn't actually inverted (the color of the bars and as far as I can see also the text stay the same, only the background changes from light to dark). So, additionally to this API, you need another model that does the actual "inversion"? Or just good old editing?

EDIT: from another comment - actually "inverting" seems to refer to doing

    hue-rotate(180deg) invert()
...which (if I read it correctly) inverts the hue of colored areas before applying the actual inversion in order to keep the colors the same (more or less - see also https://stackoverflow.com/questions/65344006/why-does-filter...) ? Not a frontend developer, so I wasn't familiar with this trick until now. TIL...

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#34
post #9

What's your accuracy?

Close to 100%, this problem seem to be easily solved by the model. I plan to do cross validation and also to explore the use of a smaller model.

Did you separate the test dataset from the training one?

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#35
post #34

Earlier quoted context omitted.

Close to 100%, this problem seem to be easily solved by the model. I plan to do cross validation and also to explore the use of a smaller model.

Did you separate the test dataset from the training one?

Does it matter? It's not a research project trying to rigorously evaluate novel architectural modifications or something, but just a project trying to be useful within the limited resources of a hobbyist. If someone labeled a bunch of the remaining errors, that data would then be better used as more training data than to benchmark.

In practice, the accuracy, whatever it is, appears to be very high and more than adequate to justify its use.

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#36

If you don't have a lot of images, you can go over them all manually and write the "please invert me" request directly into the filename. CSS: img[src^="/images/invertable"] { filter: hue-rotate(180deg) invert(1); } Now all image names starting with "invertable" will be inverted.

Yep, or you can just set a class on each image. It's easy even in Markdown: `![](image){.invertible}`.

It's just that often you do have a lot of images and, more importantly, they may not be known in advance. If images are dynamic, then you obviously can't go over them manually, no matter how few of them there are.

This was the principal motivation for me for InvertOrNot.com: I am willing to manually classify hundreds or thousands of images for inversion, and I did, but what I can't do is do that for all of the many Wikipedia popups on gwern.net - not just because there's 22k+ of them, but because they are constantly being added, WP articles are constantly changing, and they are fully recursive so a reader could pop up any WP article. A fully-automated API is the only possible solution. (Doesn't have to be neural nets, that's just the most obvious & easiest approach; I expect classical approaches would work too and would be easier to get running in-browser too.)

And then if you have a high-quality fully-automated API, then you might as well drop the manual classifying. It's tedious and adds friction to writing.

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#37
post #20
post #12

Earlier quoted context omitted.

Anyone who thought Retool should have a dark mode has come across this. Definitely a useful trick.

Hey This is cofounder of a retool alternative here. We did introduce dark mode in a manner where a creator can even make it dynamic for end user to choose a different theme. While I was loggerheads with my CTO cofounder on this - I am glad someone finds this useful in the community of users. I am curious what kind of use case you have for retool/ alternate tools where you see dark mode as a need

I find most tools easier to use when I'm not required to jam a live flashlight into my eye sockets.

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#38
post #35
post #34

Earlier quoted context omitted.

Did you separate the test dataset from the training one?

Does it matter? It's not a research project trying to rigorously evaluate novel architectural modifications or something, but just a project trying to be useful within the limited resources of a hobbyist. If someone labeled a bunch of the remaining errors, that data would then be better used as more training data than to benchmark. In practice, the accuracy, whatever it is, appears to be very high and more than adequ…

Yes it does. You will always get close to 100% accuracy on small datasets if you evaluate the model using the train dataset - due to overfit.

Re: Show HN: Invertornot.com – API to enhance your images in dark-mode

#39
post #16

What I am interested in is a plugin/extension for Firefox/Chrome that can invert a video running on a page (darkreader is not doing that).

Does that really make sense? Unlike a single static image, a video is not one thing. It might go rapidly between invertible and non-invertible. Would you expect it to switch strategies potentially every scene or second...?

Yes it indeed has very specific use case of tutorial videos with white background; those generally stay the same until the switch to dark mode for showing code. It would be impressive if the add-on is smart enough to do what you said to maintain dark background throughout (I don't have a lot of idea of how technically challenging this might be).
Post reply on HN