nsfwjs icon indicating copy to clipboard operation
nsfwjs copied to clipboard

Prettify library for gif filtering

Open yzevm opened this issue 4 years ago • 1 comments

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:

  1. 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

  1. Remove redundant code of new library (jpg, png stuff)
  2. Re-write in JS ES6+(remove var and etc)
  3. Add unit-tests and benchmarks
  4. Check for performance, event loop blocking and memory leaks

Estimates: ~21-34 hrs (fibonacci)

Probably I'll take it in the next couple months

yzevm avatar Oct 25 '20 20:10 yzevm

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.

GantMan avatar Oct 25 '20 21:10 GantMan