-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add support for Mobilenet v2 in Image Classification transfer learning #4351
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
Conversation
@@ -1249,7 +1249,7 @@ public void TensorFlowImageClassification() | |||
var pipeline = mlContext.Transforms.LoadImages("Image", fullImagesetFolderPath, false, "ImagePath") // false indicates we want the image as a VBuffer<byte> | |||
.Append(mlContext.Model.ImageClassification( | |||
"Image", "Label", | |||
// Just by changing/selecting InceptionV3 here instead of | |||
// Just by changing/selecting InceptionV3/MobilenetV2 here instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to add a test for the new functionality? The CI isn't executing any of your new code. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #4351 +/- ##
==========================================
+ Coverage 74.59% 74.6% +<.01%
==========================================
Files 881 882 +1
Lines 154815 154848 +33
Branches 16910 16913 +3
==========================================
+ Hits 115486 115524 +38
+ Misses 34578 34574 -4
+ Partials 4751 4750 -1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet#4351) * add Mobilenet_V2 architecture support and sample * Separated try catch fix in different issue, added model download location * removed redundant sample, changed comment message to add MobilenetV2 * added test for MobileNetV2, reusing test with Theory
The base MobileNetV2 model is from https://github.com/tensorflow/models/tree/master/research/slim/nets/mobilenet . Checkpoint file used: https://storage.googleapis.com/mobilenet_v2/checkpoints/mobilenet_v2_1.4_224.tgz
Benchmarked transfer learning on the Cats V/s Dogs dataset at:
https://www.microsoft.com/en-us/download/details.aspx?id=54765
Trained last layer for 10 epochs with 0.0001f learning rate with batch size 32.
Final accuracy on eval set:
Micro-accuracy: 0.980959936533122,macro-accuracy = 0.980874311779911
Comparable Tensorflow acuracy for same task:
https://www.tensorflow.org/tutorials/images/transfer_learning#train_the_model