NudeNet - automatic censoring AI software
Moderator: 1885
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
NudeNet - automatic censoring AI software
Hey guys!
I was wondering if anyone had any experiences with NudeNet. I was hoping to use it to streamline the progress for a current project, but I'm not too skilled yet, currently wrapping up my first year studying computer science. If anyone could share they're knowledge/take a quick look at it to see if they can figure it out, I would love to chat
https://github.com/notAI-tech/NudeNet
Love, Leah
I was wondering if anyone had any experiences with NudeNet. I was hoping to use it to streamline the progress for a current project, but I'm not too skilled yet, currently wrapping up my first year studying computer science. If anyone could share they're knowledge/take a quick look at it to see if they can figure it out, I would love to chat
https://github.com/notAI-tech/NudeNet
Love, Leah
-
- Explorer At Heart
- Posts: 559
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: NudeNet - automatic censoring AI software
Hi Leah,
it quickly took a look at it as it seemed quite interesting.
I tried it on one random picture and it seems to work very well. I used the installation via pip which at least on Linux worked like a charm. What is the project you're working on? And how can I help you?
it quickly took a look at it as it seemed quite interesting.
I tried it on one random picture and it seems to work very well. I used the installation via pip which at least on Linux worked like a charm. What is the project you're working on? And how can I help you?
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
Re: NudeNet - automatic censoring AI software
Thanks for taking a look at it :)kerkersklave wrote: ↑Sat Mar 27, 2021 3:58 pm Hi Leah,
it quickly took a look at it as it seemed quite interesting.
I tried it on one random picture and it seems to work very well. I used the installation via pip which at least on Linux worked like a charm. What is the project you're working on? And how can I help you?
Do you mind sending the files from the folder you used to run it? I get the detector to work and analyze the photos, but when I run the censor method I get an error say the "modelproto does not have a graph" or something like that. Googling it presents me with all sorts of nonsense I don't understand, so I'm at a loss here.
Im currently fiddling with a tease ai personality, and was hoping to do a bit of censoring in there, not sure how its gonna work, but either way it seems like its a great tool, that can censor videos as well, as far as I understand
-
- Explorer At Heart
- Posts: 559
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: NudeNet - automatic censoring AI software
I've tested it on the following picture. It censors face, breasts, and pussy. I've tried other pictures but those are private
Which API are you using? The python one as well? I have not seen that error message.
Which API are you using? The python one as well? I have not seen that error message.
Re: NudeNet - automatic censoring AI software
I used this as well for a project, however I only used their detect method and did my own censoring in frontend javascript.
I had a quick look at the error and it comes from the detector model, so if detect is working fine but censor is giving that error, I suspect the args passed to censor had some mixup.
I had a quick look at the error and it comes from the detector model, so if detect is working fine but censor is giving that error, I suspect the args passed to censor had some mixup.
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
Re: NudeNet - automatic censoring AI software
I was actually mainly referring to the python file, I'm unsure if I'm writing the code right, I haven't really gotten the hang of interpreting other peoples code, and its been a short while since I dabbled with python last, do you mind sending it?kerkersklave wrote: ↑Sat Mar 27, 2021 6:48 pm I've tested it on the following picture. It censors face, breasts, and pussy. I've tried other pictures but those are private
Which API are you using? The python one as well? I have not seen that error message.
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
Re: NudeNet - automatic censoring AI software
I'm passing the same args as with the detect method, so it shouldn't be any issue, but maybe im wrong, literally copied the code from a guide, and changed the filenames to match. The guide in question is the followingbonsec wrote: ↑Sat Mar 27, 2021 6:58 pm I used this as well for a project, however I only used their detect method and did my own censoring in frontend javascript.
I had a quick look at the error and it comes from the detector model, so if detect is working fine but censor is giving that error, I suspect the args passed to censor had some mixup.
https://ourcodeworld.com/articles/read/ ... -in-python
-
- Explorer At Heart
- Posts: 559
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: NudeNet - automatic censoring AI software
The guide matches what I did. Can you maybe copy a minimal code example that causes the error? Best just copy it, sometimes one can read their own code over and over again without spotting a subtle problem or difference.
-
- Explorer At Heart
- Posts: 559
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: NudeNet - automatic censoring AI software
My code looks like this:Miss_Leah. wrote: ↑Sat Mar 27, 2021 7:40 pm I was actually mainly referring to the python file, I'm unsure if I'm writing the code right, I haven't really gotten the hang of interpreting other peoples code, and its been a short while since I dabbled with python last, do you mind sending it?
Code: Select all
from nudenet import NudeDetector
detector = NudeDetector()
detector.censor('test.jpeg', out_path = 'out.jpeg')
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
Re: NudeNet - automatic censoring AI software
My code looks like the followingkerkersklave wrote: ↑Sat Mar 27, 2021 8:49 pmMy code looks like this:Miss_Leah. wrote: ↑Sat Mar 27, 2021 7:40 pm I was actually mainly referring to the python file, I'm unsure if I'm writing the code right, I haven't really gotten the hang of interpreting other peoples code, and its been a short while since I dabbled with python last, do you mind sending it?
Code: Select all
from nudenet import NudeDetector detector = NudeDetector() detector.censor('test.jpeg', out_path = 'out.jpeg')
Code: Select all
from nudenet import NudeDetector
from nudenet import NudeClassifier
detector = NudeDetector()
detector.censor(
'./image1.jpeg',
out_path='./image1_censored.jpeg',
visualize=False
)
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
Re: NudeNet - automatic censoring AI software
Copying your code didn't seem to do anything for me either.. /:
-
- Explorer At Heart
- Posts: 559
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: NudeNet - automatic censoring AI software
Your code works fine for me, can't see any problem either.
This error comes somewhere from within the neural net engine from googling it. Sounds like the model has not been loaded properly. From looking at the code of censor() it just calls detect() and then manipulates the images.
Did you try calling detect() directly and does that work? (Not quite sure form your previous posts).
Can you copy the complete error message including the stack trace?
This error comes somewhere from within the neural net engine from googling it. Sounds like the model has not been loaded properly. From looking at the code of censor() it just calls detect() and then manipulates the images.
Did you try calling detect() directly and does that work? (Not quite sure form your previous posts).
Can you copy the complete error message including the stack trace?
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
Re: NudeNet - automatic censoring AI software
Aha, detect() throws the same error, here's the complete error messagekerkersklave wrote: ↑Sat Mar 27, 2021 9:20 pm Your code works fine for me, can't see any problem either.
This error comes somewhere from within the neural net engine from googling it. Sounds like the model has not been loaded properly. From looking at the code of censor() it just calls detect() and then manipulates the images.
Did you try calling detect() directly and does that work? (Not quite sure form your previous posts).
Can you copy the complete error message including the stack trace?
Code: Select all
Traceback (most recent call last):
File "test.py", line 3, in <module>
detector = NudeDetector()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/nudenet/detector.py", line 57, in __init__
self.detection_model = onnxruntime.InferenceSession(checkpoint_path)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 280, in __init__
self._create_inference_session(providers, provider_options)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 307, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from /Users/leah/.NudeNet/detector_v2_default_checkpoint.onnx failed:/Users/runner/work/1/s/onnxruntime/core/graph/model.cc:101 onnxruntime::Model::Model(onnx::ModelProto &&, const onnxruntime::PathString &, const onnxruntime::IOnnxRuntimeOpSchemaRegistryList *, const logging::Logger &) ModelProto does not have a graph.
- Miss_Leah.
- Explorer
- Posts: 39
- Joined: Sat Aug 22, 2020 2:23 pm
- Gender: Female
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
Re: NudeNet - automatic censoring AI software
Aha, even my noob ass can see that its the constructor that throws the error now, not that it explains much to me
-
- Explorer At Heart
- Posts: 559
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: NudeNet - automatic censoring AI software
When I first ran the detector, it did download the model file and put it in
in my home directory.
Does that file exist? Should be about 140MB.
Code: Select all
.NudeNet/detector_v2_default_checkpoint.onnx
Does that file exist? Should be about 140MB.
Who is online
Users browsing this forum: No registered users and 13 guests