AGPL stopped me from making an open source contribution

Posted by Programming Is Moe on Monday, March 22, 2021

TOC

AGPLv3 stopped me from making an open source contribution

Some Background

I’m currently extending my Image Translation Overlay GUI with a web Server and Chrome Browser Extension. The Idea is that I will offer a completely free service for translating images that also supports crowd sourced translations in addition to the machine translations that I will pay for. Users that submit translations or transcriptions will have to agree that these will be made under CC0 as I also plan to make the database I’m building (Sha256 and Perceptual Hash images with their OCR and TL) publicly available.

What I also wanted to combat in that Service is to not retranslate or OCR an Image I have already done so for, even if it is a rescale or jpg to png conversion and make the highest quality version of that image the single source of truth for serving machine OCR and machine TL.

Finding rescales etc. I think I accomplished by using a so called Perceptual Hash “Small changes in the source cause small changes in the hash”, which acts exactly the opposite of a conventional hash: “small changes cause huge changes in the hash”. With that hash it is possible to calculate the difference between 2 images without the need of storing the whole image. Also by now I’m pretty sure that calling “perceptual hash” a hash is scientifically wrong.

Calculating an Image Quality Score

For that I looked around for anything that could help with that task. There are a boatload of algorithms that can score the quality of an image if the original is known. There are also many for doing it just with the image itself but rely on heavy ML techniques and I didn’t feel like going down that rabbit hole again. But what I found during my search were research papers about detecting JPG artifacts implemented in just about ~150 line of C called “Local JPEG Grid Detector via Blocking Artifacts, a Forgery Detection Tool” by Tina Nikoukhah

I’m a web dev monkey not a CS graduate

My application is written in C#, so I need an implementation that integrates nicely with it. Also I’m not educated enough to just take the Paper and re-implement it by myself. But what I can do is to directly port the existing Proof of Concept Source Code to C# and use integration tests running against the original application to confirm if I did it right. I was already done with all of the core logic and now trying to decipher how the heck (and why) the image bytes get converted to a single dimension array of doubles or something when it got late and I went to bed.

Wait. It’s AGPLv3

Laying in bed I remembered: The license is GPLv3. Took out my smartphone and looked again: No wait, it’s actually AGPLv3.

I never properly read into GPL and only knew that it is a big no no at work because everything needs to be closed source there. At first I thought, well, my project is MIT so I should be fine but then I actually read into what GPL and AGPL is and requires me to do.

Disclaimer: I’m not a lawyer. I’m a monkey

  • if you modify an AGPLv3 licensed work, your modified work needs to also be AGPLv3
  • If you link or include an AGPLv3 licensed work, your work needs to also be AGPLv3
  • If you interact over the network with an AGPLv3 licensed work, your work needs to also be AGPLv3

The C# port would be AGPLv3, my Project using the port would need to become AGPLv3 from then on.

I kinda dreamt that my service could be used by other platforms/application or as a plugin etc but this god forsaken network clause would force them to also re-license their project under AGPLv3.

The paper is CC-BY-NC-SA (1.0?) and the proof of concept violates its own license

Again. Not a lawyer. 👉🐒

Great. Even if I try to rub my 2 brain-cells together I’d end up with an even more restrictive license than AGPLv3. because CC-BY-NC-SA 1.0 literally has no compatible licenses except CC-BY-NC-SA 1.0. Also the proof of concept violates the papers License because only CC-BY-SA is compatible with GPLv3 but none of the CC-BY-NC-SA versions are compatible with anything else

The only winning move is not to play

So I decided: fuck it, no port then. I don’t want to be forced to change my project or hamper the imagined ground breaking adoption of my service because of a single library.

What a loss. Some web dev didn’t decide to port a simple C application that anybody would be able to port into C# WOE IS ME. But on a serious note: if it wasn’t for AGPL being literal cancer we’d have one more c# library