Open chia7 opened 3 years ago
I think images have to be converted to a tensor before they can be evaluated against the model.
Got it! Would it be better to use jpeg over png for prediction? Or any other image format you may suggest?
The fastest way to do this conversion would be to use the TFJS node lib. I haven't updated the demo code bc of time restrictions, but I am releasing a book where I explain how to do this quite clearly:
I have the same question : I'd like to perform a prediction on serverside with nodejs (firebase cloud functions).
Is there anyway to do that with this package or is it not possible at all ?
It is completely possible.
I guess I could improve the docs here. But it would be awesome if someone contributed the change.
I explain NodeJS image to tensor directly in my book. But if no one can do it, I can see about setting aside some time at some point.
@kevinvangelder let me know if this is something you'd like to do. I will, of course, help.
hi, bumping this :) I recently discovered this module and I'm interested to use it server-side
Sorry Korobaka, I'll have to find some time and add to the docs. I'll try to find some time this weekend.
Sorry Korobaka, I'll have to find some time and add to the docs. I'll try to find some time this weekend.
np! take your time :)
Hey all, we're working on this!
Our proof of concept: https://github.com/ipfs-search/nsfw-server
Mad props for NSFW.js!
very cook @dokterbob - I'm planning on adding a voting classifier on top of NSFWJS that will make you able to reallllllly dial in the accuracy vs type 1 and type 2 errors. It should help increase accuracy!
Also, let me know when you're ready for me to promote NSFW-server on socails!
Hi, is there a way to perform prediction on server side with nodejs, without converting the local image as in the demo code? I would like to directly use
fs
to read my local file and pass it into the model, is it possible? I supposed that this would largely improve the performance and reduce the running time.