Image recognition
See original GitHub issueThanks a lot guys for creating such awesome tool for neural networks for javascript community. I have tried brain.js for creating NN for image recognition. Super-simple one - do the image contains samoyed or no.
And now I am a bit struggled. Cannot find anything about image recognition in the repo (only #176 but nothing was helpful from here)
- Does the brain.js good solution for image recognition?
- How to proceed?
- How to prepare image data?
- Why it takes so much time?
I am looking for answers and would be good if you will create some example 😃
I am now doing something like this but it doesn’t work anyway. 64x64 images processing deadly slow. For different image resolutions I am getting error: NaN
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top Results From Across the Web
What Is Image Recognition? Definition from SearchEnterpriseAI
Image recognition, in the context of machine vision, is the ability of software to identify objects, places, people, writing and actions in images....
Read more >What Is Image Recognition? | by Chris Kuo/Dr. Dataman
A common example of image recognition is optical character recognition (OCR). A scanner can identify the characters in the image to convert the...
Read more >Image Recognition: Definition, Algorithms & Uses - V7 Labs
Image recognition allows machines to identify objects, people, entities, and other variables in images. It is a sub-category of computer vision ...
Read more >What Is Image Recognition and How Does It Work? - VISUA
It is an incredible piece of visual artificial intelligence tech that works by analyzing an image in comparison to a learned data set...
Read more >What Is Image Recognition? - MATLAB & Simulink
Image recognition is the process of identifying an object or a feature in an image or video. It is used in many applications...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Guys, I’ve added a table of percentages to show where we are with v2: https://github.com/BrainJS/brain.js/wiki/Roadmap#v2-status
This may help at least clarify where things are. I found a bug two days ago with GPU.js that I’m addressing that has caused a few more days delay for v2 of GPU.js release. I’ll have it out soon though.
TL;DR Currently, in v1, it is not ideal. It uses CPU.
TS;DR This is the single most active part of what is going on in Brian.js. In fact the not yet working example for mnist ( https://github.com/BrainJS/mnist-demo/blob/gh-pages/index.js#L1 ) is sitting, waiting, and ready. I’ve been focused on bringing Node GPU into the mix, via the dependency GPU.js here: https://github.com/gpujs/gpu.js/tree/gl-headless-experimental Which adds to compliment brain.js:
Already supported are:
YES, direct Video into a neural network!
The main features that are needed are convolution layers, which consist of convolution, pool, fullyConnected, & softMax. After they are unit tested fully, there will be a bit of API work to be done, and the net will be in a spot to release for v2. So ultimately things are very close, but I needed to take some time to push the GPU.js side of things to get it to the point it could be an enterprise platform for GPU programming with simple javascript that is built inside brain.js.
You have a choice:
Currently you’d need to convert the values to arrays.
In v2, you’d just feed the image directly into the neural network.
If you are talking about the existing implementation in brain.js, it is because the CPU is, in short… Very slow (one at a time) when you compare its ability to process a lot of data. There are ways to get it faster, but even on modern hardware, even if we ported the whole things to something that could run on multi CPU’s, it’d be around 4ish times faster on a modern i7. If we converted it to WebAssembly, we could push that by maybe 1.5 times. But as soon as we go to the GPU, on a basic no frills GPU, we can easily get 5 to 10 times faster without using pipelines (textures that aren’t transfered back to the CPU, they stay on GPU). With textures, we can get 12 to 50 times faster,and with a decent video card, that number rises FAST, (NOTE: I’ve seen it go as high as 300 times faster on an IMAC, though this isn’t entirely accurate because in texture mode it processes somewhat async-ish, so we’re still working out how well to test it for speed, but it is CRAZY fast, is the point).
If you are referring to the speed at which I’ve been building these components, however (which I don’t think you are, but I’d like to take a moment to clarify) I didn’t think it’d take this long either.
I’ve mentioned (possibly ranted) about this , before, but right now, literally today or tomorrow GPU.js v2 will be released if I can find an hour or so.
It has been one of the hardest things I’ve ever worked on professionally to take the various complexities of all the required components and put them together, here is a small part:
Many other things happened, and many people have assisted along the way. The invitation is there for you to join as well. It could make all the difference.