Comments (19)
Alright let me see how this goes. It looks like validation accuracy isn't really moving anymore. Once I'm done everything (I have to attempt a second type of model still) I'll come back with the results. I'm skeptical until I test it outside of TF.
from nsfw_model.
IMO, I'd love for your code to be sent as a PR back to the repo. You could then host the models for a short amount of time in a dropbox link and I'll upload them to our S3 and host them for everyone for free.
I plan on learning fast.ai and seeing if I can beat TF 2.1 and TF-Hub - all the models and code are useful to the community!
from nsfw_model.
Very cool! Did you make one?
from nsfw_model.
@GantMan It's still going, on epoch 5/10 now and reporting ~96% train acc and ~92% validation still. I pulled your data set off mega for this FYI so thought I'd give back by sharing the above. :) Thanks for posting that.
from nsfw_model.
Awesome! I'd love to host the resulting file so others can use it, if that's good for you! Link to your socials etc. of course!
from nsfw_model.
lol after all that I can't get the damn model out of TF 2. I can't freeze it, only use it as a SaveModel which is useless. There is a way to freeze in 2.x but it looks like there's a regression where training parameters from hub get baked in as constants. Tomorrow's another day I guess to look at it.
from nsfw_model.
Gonna close this out because TF2 is a trainwreck. No way to properly freeze hub trained models and no tools to get them out of the SavedModel format support TF2.x properly. Sorry for the let down. I'm going to try to reproduce the same thing (xfer learning plus fine turning) in 1.15. If I'm successful I'll open a PR.
from nsfw_model.
@GantMan I've successfully re-written the repo to use TF 2.1 and TF-Hub so we get all models for TF 2 that are on tfhub.dev. Training is simple, you just give the URL of the model type you want and let it go.
Anyway I want to modify my fork to keep the trained models with LFS in the repo but it looks like I can't enable that on forks. What do you think? I guess the question is, what's more of a pain? To keep uploading models on the release page manually, or getting LFS enabled?
from nsfw_model.
Alright I broke my fork with LFS stuff so I'll redo it and send a PR excluding models. I'll then send models separately. I'm training inception v3, mobilenet v2 large, resnet 50 v2 and NasnetA. Exporting them to tflite, frozen pb, saved model, keras model and tfjs.
from nsfw_model.
AFAIK you can post the models as releases. Would you do that instead?
from nsfw_model.
I'm unfamiliar with exactly what posting models as releases means. Do you mean just include datestamp in the URI so people know when it was pushed?
from nsfw_model.
You just create a release like this:
And then you drop the zipped models here:
Then you let Github host your files :)
Anyway I really wanted to run training through on all models I configured but something has come up that has put me out of time. Sorry about that. I'll submit the PR as-is.
Also I don't think we're ever going to break out of the ~93% zone without modifying the source data set. There's too much ambiguity between "sexy" and "porn" so they're constantly confused. If you merge those categories you'll see that you can break that ceiling.
from nsfw_model.
from nsfw_model.
@GantMan Alright PR is open. Let me know.
from nsfw_model.
Fantastic work! I love the single file with everything.
I would love to throw in quantized models in that zip and call it a day if that works for you!
from nsfw_model.
I'll have to check the command line tool that comes with tfjs when you install with pip. It may have a quant option for fp16 option. I'm out for a while tho today.
from nsfw_model.
I believe it's a flag in the tfjs command. --quantization_bytes 1
I believe!
from nsfw_model.
Also, I have ~360K images with object bounding boxes defined for everything you'd want to detect in terms of nsfw (not hentai tho). If you know or figure out how to use the tf2 and tf hub api to fine tune an SSD or SSDLite model, please let me know.
from nsfw_model.
@GantMan I created a new PR and linked to the updated model package that now has a quant model inside as well
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.