Open hrichiksite opened 3 years ago
While the jpeg-js should work, there's a better way to read images in node now.
I haven't updated the docs here on NSFWJS but you could use things like https://js.tensorflow.org/api_node/3.7.0/#node.decodeJpeg
I cover this in my book. Please give tfjs-node a go, and let me know if that solves your issues.
Tfjs-node is too large to fit in lambda's size limit :(
Tagging the issue here: https://github.com/tensorflow/tfjs/issues/2817
@hrichiksite - have you seen this? https://stackoverflow.com/questions/59899650/running-tensorflow-js-tfjs-node-on-aws-lambda-node-js
@hrichiksite - have you seen this? https://stackoverflow.com/questions/59899650/running-tensorflow-js-tfjs-node-on-aws-lambda-node-js
Hi, I have seen this but I didn't get how to load NPM modules from a different DIR, I had tried to find but no success :(
Actually, The Issue here is not Size anymore but the fact that it is timing out even 60 secs.
I tried using nsfwjs to detect images upload to s3 as safe or not but it is not working in lambda, I tried increasing memory to 10GB. But it still timed out :(
Log:
Code (for local testing):
For testing: