Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to cnn defaults for task image classification #1096

Merged
merged 7 commits into from
Nov 4, 2020
Merged

Conversation

shiffman
Copy link
Member

@shiffman shiffman commented Oct 30, 2020

Apologies for the brief note here I am in the middle of recording a video tutorial about working with CNN in ml5.js. I will circle back and provide more details later today as well as update the examples. But just wanted to note for @bomanimc that this change is incoming and should if possible be a part of 0.6.0.

At the moment, the changes here are to the default configuration for the CNN architecture following this MNIST example from tf.js. The examples were not working with the previous library defaults.

@shiffman shiffman marked this pull request as draft October 30, 2020 13:16
@bomanimc
Copy link
Member

bomanimc commented Oct 30, 2020

Looks solid! Ready to review once the PR is complete!

@shiffman shiffman marked this pull request as ready for review October 30, 2020 20:13
@shiffman
Copy link
Member Author

Ok, this is ready! I've cleaned up and adjusted the examples a bit! In addition to the updated examples pictured below, I'll be releasing a video tutorial demonstrating this example: https://editor.p5js.org/codingtrain/sketches/ogxO8har_

mask320

How the examples look now:

Screen Shot 2020-10-30 at 4 07 44 PM Screen Shot 2020-10-30 at 4 07 24 PM

@shiffman
Copy link
Member Author

Ack, apologies, I just realized my vscode settings made a lot of trivial formatting changes (like double -> single quotes). Hope that doesn't pollute this pull request to much, I am happy to clean up and re-submit if necessary.

I really need to learn how to have my code editor follow the linting rules of the project I'm working with! (TBH I thought I have it set up this way but I guess I do not!)

Copy link
Member

@bomanimc bomanimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

};

// construct the neural network
nn = ml5.neuralNetwork(options);
nn.loadData("daytime_nightime.json", train);
// nn.loadData('daytime_nightime.json', train);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep this comment in?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a comment that explains it further, this is useful in case you don't want to collect your own data and just want to quickly train a model with sample data and see the classification process.

@bomanimc bomanimc merged commit 3418909 into main Nov 4, 2020
@bomanimc bomanimc deleted the cnn-fixes branch November 4, 2020 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants