nsfwjs
nsfwjs copied to clipboard
Prettify library for gif filtering
Related #401
I just drop my thoughts and ideas so I wouldn't forget it
Recently we started to use https://github.com/nsfw-filter/gif-frames for gif filtering because of speed and fps flexibility. It's pretty fast, but not for NSFW-Filter :smile: So, I suggest:
- Unite 3 libs:
- https://github.com/nsfw-filter/gif-frames (3 y.o lib \ MIT License \ ~100 lines of code)
- https://github.com/nsfw-filter/get-pixels (7 y.o lib \ MIT License \ ~100 lines of code)
- https://github.com/nsfw-filter/save-pixels (8 y.o lib \ MIT License \ ~100 lines of code)
into one library specific for our case. Not sure about Licenses, but we use it as open source, I hope we are fine :D
- Remove redundant code of new library (jpg, png stuff)
- Re-write in JS ES6+(remove
var
and etc) - Add unit-tests and benchmarks
- Check for performance, event loop blocking and memory leaks
Estimates: ~21-34 hrs (fibonacci)
Probably I'll take it in the next couple months
One of the things worth noting, if you're decoding pixels/encoding pixels for node, I've been using the provided Node API - https://js.tensorflow.org/api_node/2.6.0/ which is built in.