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

Brain JS handling images for training

Open sts-ryan-holton opened this issue 5 years ago • 5 comments

Summary

This is more of a question rather than a strict feature or bug. I'd like to build a machine learning model using Brain JS to recognise something in particular within an image and simply report back whether that item is there or not. I'm interested to find out how I would go about doing this...

  • How would I convert the image into a format that Brain JS can understand?
  • How would I set it up to learn from a bunch of images, for instance, where 100 images contain the item I'd like to notify me of, and 100 images don't contain it, so that I can build up a robust model.
  • I know it might take some time (hopefully it would get faster and faster at predicting) but my image resolutions will be around 1280x720

sts-ryan-holton avatar Oct 17 '20 17:10 sts-ryan-holton

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.61. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Oct 17 '20 17:10 issue-label-bot[bot]

@robertleeplummerjr any update on this?

sts-ryan-holton avatar Nov 09 '20 07:11 sts-ryan-holton

@sts-ryan-holton I think your answer is here #352

Nelias avatar Nov 11 '20 01:11 Nelias

@Nelias I did have a look at that issue and couldn't find any code examples.

sts-ryan-holton avatar Nov 11 '20 09:11 sts-ryan-holton

I haven't done much with NN and ML as don't have time with work, however, I believe the idea is that you convert the pictures into a fixed size e.g 64x64 pixels, convert them to greyscale (so that each pixel is a value of 0 (white) and 100 (black);

from there you can normalise to 0 -> 1 and then tag your data.

vorticalbox avatar Jun 01 '21 11:06 vorticalbox