Comments (3)
That error tends to happen when you try to load a graph model with a layers model call, or a layers model call with a graph model.
Maybe try { type: "graph" }
?
from nsfwjs.
That error tends to happen when you try to load a graph model with a layers model call, or a layers model call with a graph model.
Maybe try
{ type: "graph" }
?
This worked. Admittedly, this is something I should've tried but didn't because the docs were a bit unclear in this regard, making it seem as though MobileNetV2Mid didn't need to be loaded with the type specified and making it seem as though the type is saved when you save the model to IndexedDB. Below are the sections referenced here.
"Model MobileNetV2Mid - [299x299]
const model = nsfwjs.load("/path/to/different/model/", { size: 299 });"
"Model InceptionV3 - [Graph]
const model = nsfwjs.load("/path/to/different/model/", { type: "graph" });"
"Parameters:
optional URL to the model.json folder.
optional object with size property that your model expects."
from nsfwjs.
would LOVE a rewrite PR of the docs that's more clear!
Please feel free to be added as a contributor with a lil Readme magic!
from nsfwjs.
Related Issues (20)
- [False Positive]: a little bit funny HOT 2
- Which model is the best atm? Resources hardware is not a problem. inception_v4?
- I really need to run this locally for batch processing local images any guides tutorials? HOT 2
- How to use the Inception V3 model in the npm package?
- when adding a frame to an nsfw picture...
- Problem detecting adult content from camera images
- Cant import nsfw in react Project HOT 2
- Logs spammed by tfjs-node launched twice
- Not work local model load HOT 3
- The accuracy is much less than the site HOT 1
- Broken with the recent file on next.js HOT 4
- Error connecting to cloudfront.net since this morning HOT 12
- Publish to npm out of sync HOT 3
- `console.warn` when `BASE_PATH` is used on load
- Remove GIF Support HOT 1
- False Positive HOT 1
- type: "graph" vs size: 299 HOT 1
- Mismatch in the published package content. HOT 1
- NSFW through Docker reports an error - maybe provide Docker support? HOT 1
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 nsfwjs.