brain.js icon indicating copy to clipboard operation
brain.js copied to clipboard

create a "game changer" of a project that uses brain.js

Open robertleeplummerjr opened this issue 8 years ago • 14 comments

I see a lot of usage of neural nets to do things like play games, or detect cats, or make crazy cool images. I think those are valuable, but what about something that could save someone's life?

I propose a project that we feed xray images, and it can detect cancer.

Feedback welcome.

robertleeplummerjr avatar Oct 26 '16 02:10 robertleeplummerjr

Is javascript fast enough to handle millions/billions of samples to be able to construct a model for this purpose?

lodenrogue avatar Oct 28 '16 08:10 lodenrogue

Absolutely: https://github.com/arrayfire/arrayfire-js In-fact, javascript, compared to other industry standard machine learning languages, such as python, are many times faster. Here is a top result from a Google Search of "javascript vs python speed" - https://www.quora.com/Is-JavaScript-v8-faster-than-Python

In short, it isn't that it may be faster, it is that there are many more tools available in node/js.

robertleeplummerjr avatar Oct 28 '16 18:10 robertleeplummerjr

Greetings. I'd like to help with this idea.

I believe there should be a cascade of networks - with first one to determine the type of the image (Ultrasound, X-Ray, MRI etc) and the following ones to group and classify diseases.

This will allow the decompose the task into smaller ones and develop (and possibly even run) parts of the system separately.

Also, as far as I know solely pictures won't give a precise diagnosis: we'll need to gather test results and symptoms.

By the way is there a database of this kind of thing? Or it's needed to make a tool to gather it?

P.S. Thank you for the awesome library

ValeriaVG avatar Jul 31 '17 09:07 ValeriaVG

Hey, I haven't seen a response or an update regarding this. Have any of you guys started working on something like this? I would be very interested to help!

giannosdev avatar Sep 10 '17 19:09 giannosdev

Awesome! Most of the work is actually being done so that the underlying architecture can handle large input sets and as well various layer types. More in a bit.

robertleeplummerjr avatar Sep 10 '17 20:09 robertleeplummerjr

Here is the roadmap, and I added a link to this issue under why: https://github.com/BrainJS/brain.js/wiki/Roadmap

We started by looking at convolutional layers, and I saw a desire to have a "layer playground" and at the same time I was looking into how to make things faster. I then found that gpu accelerating, we can have a substantial performance gain, so I found what I felt was the most mature platform for doing so: github.com/gpujs/gpu.js

Since finding, I was added to the team, and helped add node support and a great deal of other features, so I could greedily get brain.js to run on it. From there, along with the help of @abhisheksoni27 we achieved a GPU accelerated version of brain.js here: https://github.com/BrainJS/brain.js/blob/nn-gpu/src/neural-network-gpu.js in the https://github.com/BrainJS/brain.js/tree/nn-gpu branch.

From that point we are now MVP proven. But the remaining "layer playground" and flexibility to process images (ie convolutional layers as well as other related types like pool) needed to be added. Since the architectures for FeedForward and Recurrent are already there, I started adding the layers for them and will eventually connect them up. The layers have been added here: https://github.com/BrainJS/brain.js/tree/nn-gpu-layers/src/layer in the https://github.com/BrainJS/brain.js/tree/nn-gpu-layers branch. They are not all yet unit tested, and done, but that is where my active development is. If you want to help you could spend time ensuring layers act as supposed to by further developing them, or work on FeedForward or Recurrent runners for the layers.

robertleeplummerjr avatar Sep 10 '17 21:09 robertleeplummerjr

So to answer your question:

Have any of you guys started working on something like this?

I would say this is probably the most active issue currently.

robertleeplummerjr avatar Sep 10 '17 21:09 robertleeplummerjr

Just now seeing:

By the way is there a database of this kind of thing? Or it's needed to make a tool to gather it?

There would need to be some sort of linkage setup. Something that comes to mind, especially because now we have GPU acceleration... gpu databases.

robertleeplummerjr avatar Sep 10 '17 21:09 robertleeplummerjr

(This is NOT your game changer project, but I didn't want to open a new issue just to point it out.) I've been teaching intro-to-machine-learning on LearnCode using brain.

Here's a text editor theme generator and the video to go with it

And for what it's worth, props to you guys for running with this project... I love how brain is a library that allows people to use ML before they understand it. We don't make devs learn about JS engines before coding with JS, I think ML should strive to be the same way.

willrstern avatar Mar 29 '18 14:03 willrstern

Thanks willrstern, your tutorials brought me to brain.js =)

hellonearthis avatar Mar 29 '18 14:03 hellonearthis

@willrstern fantastic man. As well I saw your videos and love them. I would urge you to push the boundaries and offer any suggestions and be critical with feedback, we ~~want to~~ will change the industry.

I love how brain is a library that allows people to_use_ ML before they understand it. We don't make devs learn about JS engines before coding with JS, I think ML should strive to be the same way.

This is my one main driving force when it comes to my motivation for building a better neural network. It must be simple, it must be fast. Your words mean a lot.

robertleeplummerjr avatar Mar 29 '18 15:03 robertleeplummerjr

I actually submitted a proposal talk for https://ti.to/ml4all/ml4all-2018 it starts something like this (opening illustration that I will then go on to use to introduce brain.js and ideals therein):

You get into a car, you press the gas, you go. You don't have to think about...

We'll see what they say.

robertleeplummerjr avatar Mar 29 '18 15:03 robertleeplummerjr

So, we are about 8 years late... but how is this for a "game changer" of a project?

That is a tweet from the founder of GUN.js, gushing over a really cool project I'm developing in Brain. GUN is an amazing, decentralized and in-browser database, which I've used as the foundation of a distributed, hivemind-esque platform for AI training. At least, that is the vision! Preliminary results are promising, but we're going to need more users, more compute, and more importantly - input from the guy who made all of this possible. We could really use your expertise.

Currently, the architecture is something like a mesh of GRU networks, variable size, and layered upon each other. I would have preferred to use the Recurrent class, but I couldn't figure it out, and it doesn't work with train-stream, anyway. We are doing some interesting things with neuron sampling, and strategic integration. I'll spare you the details here, but I'd love to have a chat elsewhere. I'm actually the guy who runs the unofficial Brain.js Discord server, though most of this work is happening in GUN's Matrix room. You should join us.

Finally, thank you for all the hard work you've put into Brain.js, @robertleeplummerjr! I can't wait to turn this thing into the most awesome (and terrifying) neural network the world has ever seen.

Vectorrent avatar Jul 13 '23 20:07 Vectorrent

This has caught my eye, and I look forward to seeing more. I'm not sure I understand the full ramifications of it however.

robertleeplummerjr avatar Jul 19 '23 14:07 robertleeplummerjr