Comments (5)
Presenting the gif classification can look like this: https://observablehq.com/d/c70415332a1f4cb9
Gif output can be converted to a readabe chart format with the following transform
let results = {name: "results", children: []}
data.map((frame, i) => {
const lastChild = results.children.slice(-1)[0]
const currentClass = frame[0].className
if (lastChild && currentClass == lastChild.name) {
// Add frame to entry
lastChild.children.push(
{"name": "frame " + (i+1), "value": 1}
)
} else {
// Create new
results.children.push({
name: currentClass,
children: [
{"name": "frame " + (i+1), "value": 1}
]
})
}
})
This comes out looking like so!
from nsfwjs.
So getting d3 working in React is a pain.
Even though I have all the code for d3, I apparently can't get my branch to render the SVG. I might abandon the demo of classifyGif
and just document it.
from nsfwjs.
The branch is gifGraph if someone wants to take a stab:
https://github.com/infinitered/nsfwjs/tree/gifGraph
from nsfwjs.
Thinking of switching to bar graph.
from nsfwjs.
GIF is in demo now. No graphs yet.
from nsfwjs.
Related Issues (20)
- The size of the library is oversized
- NSWF.js on React Native HOT 2
- Raising multiple "Breaking Change" errors when installing nsfwjs in React Js HOT 3
- Local model import not implemented HOT 2
- New false postivite HOT 3
- [Node.JS] Memory leak - Server reaches 100% memory after 5 or 6 days HOT 5
- type error for `type: 'graph'` for `.load()`
- Trying to fetch image from axios.
- Getting `Uncaught ReferenceError` when using `nsfwjs.load()` HOT 1
- Android Client HOT 2
- [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
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.