Comments (7)
You don't want the outputs, you want the name of the final softmax later. That should be it. That layer's output is an array of length 5 representing the 5 classes
from nsfw_model.
Thanks @TechnikEmpire for your reply. I'm aware that I need the softmax layers name but unfortunately, I can't seem to find it. Usually it appears under output but for some reason output is completely empty. Should I be using a different value as its name?? Thanks
from nsfw_model.
should I be using dense_3 as it's name instead?
from nsfw_model.
This is the value I usually take.
from nsfw_model.
@Nicolas-Connor No, you use the "name" field here. What these frameworks are doing is parsing the graph and looking for nodes with the names you provide to "input" and "output" and then it knows what are the nodes to feed data into and pull data out of.
In your case, "dense_3/Softmax" is what you'd take.
In the case of the newest model(s) (on the releases page here), the output would be "sequential/prediction/Softmax".
from nsfw_model.
@Nicolas-Connor Btw you might want to edit the picture you posted, I can see the name and path of your repository. From one guy to another developing content filtering software, let me share this with you:
You can convert the latest model (on the releases page) to Intel DLDT (compile openCV with Inference Engine support) with this command:
python mo_tf.py --input_model frozen_graph.pb --model_name [NEW_MODEL_FILE_NAME] --data_type FP16 --mean_values=[0,0,0] --input_shape=[1,224,224,3] --scale_values=[255,255,255] --enable_concat_optimization --reverse_input_channels
And then you can run inference in milliseconds on average hardware. I scan every image that comes across the network wire, including GIFS and you can't even observe any delay.
from nsfw_model.
Wow, thanks a million @TechnikEmpire . Thanks for helping me out with trying to get my content filtering going, it looks like you've been down this road already with Technik Empire. And thanks for mentioning Intel DLDT, I'll be checking that out down the road.
I'm hitting another roadblock unfortunately but this seems to be an issue with the framework not supporting QuantizeV2 (whatever that is) rather than a issue with this model. I'll have to try and find more robust framework to integrate newer TF models in WPF C# applications.
Microsoft.ML.Transforms.TensorFlow.TFException: 'No OpKernel was registered to support Op 'QuantizeV2' used by {{node block_4_expand/convolution_eightbit/block_4_expand/kernel/read/quantize}}with these attrs: [T=DT_QUINT8, round_mode="HALF_AWAY_FROM_ZERO", mode="MIN_FIRST"]
from nsfw_model.
Related Issues (20)
- Trying to cache the loaded model in Django
- False Positives HOT 1
- Model Weight License HOT 2
- Not trained on Dildos
- Input img/list
- How to inference use the. pb file of the inceptionv3 model?
- How i load this on Celery worker?
- How to disable spam? HOT 7
- Colab Script For Training
- Cannot download HOT 1
- Nude HOT 1
- Tflite - android studio
- 244 - 299 problem HOT 1
- cant run detection with nsfwjs
- Getting TypeError: Descriptors cannot not be created directly HOT 3
- Incorrect NSFW Classification for Civilization VI Leaders' Images
- ModuleNotFoundError: No module named 'tensorflow.python.training.tracking' HOT 1
- exit with code 4
- i can not pip install on mac m1 chip, with Python 3.9.18
- AttributeError: module 'tensorflow._api.v2.compat.v1' has no attribute 'estimator' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsfw_model.