You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bd729c1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: _simple/10_testing-the-application.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,5 +4,6 @@ date: 2018-01-10
4
4
---
5
5
Now we're ready to test! First we'll make sure the app builds on our computer, if all goes well, the simulator will open and the app will display. Since the simulator does not have access to a camera, and the app relies on the camera to test the classifier, we will also deploy the app to an iPhone (in the next step).
6
6
7
-
1. To run in the simulator, choose a phone option from the dropdown and click run
8
-

7
+
1. Select the **Core ML Vision Custom** scheme and choose a phone option from the dropdown.
8
+
9
+
1. Click on the **Build and run** icon at the top left to test the application in the simulator.
Copy file name to clipboardExpand all lines: _simple/12_bonus-improving-your-classifier.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: "Bonus: Improving your classifier"
3
3
date: 2018-01-12
4
4
---
5
5
6
-
1. If you finish everything and still have time, you can work on improving the classifier that you built. There are cables provided to test your application. To improve your classifier you can take images of the cables to be used as training data.
7
-
2. Take as many images as you want of each cable.
6
+
1. If you finish everything and still have time, you can work on improving the classifier that you built. Use the items provided to test your application. To improve your classifier you can take additional images of the items to be used as training data.
7
+
2. Take as many images as you want of each items. Focus on edge cases that are currently not handled well.
8
8
3. Upload the images to your computer.
9
9
4. Back in the Visual Recognition tooling, select your model and click ‘Edit and Retrain.’
10
10
5. Here you can upload your new training images and retrain the model.
11
-
6. You can click the refresh button in the app to pull down the new model after retraining.
11
+
6. You can click the refresh button in the app to pull down the new model after retraining.**This update happens on-the-fly without rebuilding the app!**
Copy file name to clipboardExpand all lines: _simple/2_requirements.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,11 @@ This Code Pattern was created for developers who want to create intelligent mobi
7
7
8
8
It requires some skills on Swift but if you have background on other programming languages, the code is still simple and fairly straightforward.
9
9
10
-
Before you begin, you need to make sure you have these softwares versions installed on your machine. **These versions are required to support Core ML**:
10
+
Before you begin, you need to make sure you have these softwares versions installed on your machine. **These versions are required to support Core ML and this lab**:
11
11
12
12
***MacOS 10.11 El Capitan** or later
13
13
* The **latest version of Xcode**
14
14
***iOS 11** or later (on your iPhone or iPad if you want the application to be on your device)
15
-
***[Carthage 0.29 or later](https://github.com/Carthage/Carthage#installing-carthage)**
{% include alert-warning.html title="Carthage installation" content="If you don't have Homebrew on your computer, it's easier to setup Carthage with the `.pkg` installer. You can download it [here](https://github.com/Carthage/Carthage/releases)." %}
Copy file name to clipboardExpand all lines: _simple/3_prepare-your-data.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,4 +7,22 @@ In order to create our model, we have to provide training images to the classifi
7
7
Each class we create should have *at least***10** images. However, for optimal training time and accuracy it's best to have around 200 images sized at 224 x 224 pixels. Also, it's good practice to have images from an environment comparable to what you expect to classify. For example, since this is an iOS app, photos from your smartphone camera are probably ideal, verses professional photos or image search results. Also, try and change the background, lighting, and any other variables that you can think of!
8
8
9
9
# Preparing our data
10
+
There are multiple flavors of this workshop with different associated image content. Please follow the appropriate instructions. **You only need to do one of the steps below.**
11
+
12
+
## 3A -- Connectors
10
13
Download the [training image dataset](https://github.com/watson-developer-cloud/watson-vision-coreml-code-pattern/releases/download/1.0/Training.Images.zip), and unzip the contents to your desktop
14
+
15
+
## 3B -- Arduino boards
16
+
Download the [training image dataset](https://github.com/watson-developer-cloud/watson-vision-coreml-code-pattern/releases/download/3.1/arduino_training_images_small.zip), and unzip the contents to your desktop.
17
+
18
+
**Note:** you have actually been provided with data for **two different models**, one for part identification (`part_*`) and one for fault detection (`fault_*`)
19
+
20
+
## 3C -- Collect your own images
21
+
Take a few minutes to take photos of the various items to prepare our data. Make sure to take *at least***10** images of each item or class. For best results, change the background, lighting, and any other variables that you can think of! (Once you're done taking photos, use airdrop to transfer the images to your computer)
22
+
23
+
Now we need to prepare our data by classifying each image.
24
+
1. Create an empty folder for each *type* of item
25
+

26
+
1. Sort through your images, putting each in the correct folder based on the type of item.
27
+
1. Once all of your images are in the correct folder, archive each folder to create individual *.zip* files ***Note: on OS X, "compress" is used to create a .zip***
Copy file name to clipboardExpand all lines: _simple/5_create-a-new-project.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create a new project
3
3
date: 2018-01-05
4
4
---
5
5
6
-
Once you've created an account, navigate to [Watson Studio](http://dataplatform.ibm.com/), you should be greeted with with a nice welcome screen, but if not, click on the **Get started ▾** dropdown and you should end up seeing something like this:
6
+
Once you've created an account, navigate to [Watson Studio](https://dataplatform.cloud.ibm.com), you should be greeted with with a nice welcome screen, but if not, click on the **Get started ▾** dropdown and you should end up seeing something like this:
Copy file name to clipboardExpand all lines: _simple/7_create-a-new-model.md
+56-2Lines changed: 56 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,17 @@
2
2
title: Creating a model
3
3
date: 2018-01-07
4
4
---
5
-
The next part of the process is creating your own custom visual recognition model.
5
+
6
+
The next part of the process is creating your own custom visual recognition model. Please follow **only one** of the below steps, depending on which flavor of the workshop you are doing.
7
+
8
+
1.[7A -- Creating a model for the Connectors data](#7a)
9
+
2.[7B -- Creating a model for the Arduino data](#7b)
10
+
3.[7C -- Creating a model for your own data](#7c)
11
+
12
+
---
13
+
14
+
<aname="7a"></a>
15
+
## 7A -- Creating a model for the Connectors data
6
16
7
17
You can create a model by either going to assets and pressing **New visual recognition model** under **Visual recognition models**.
8
18
@@ -28,6 +38,50 @@ After all your classes are complete, you are ready to train your model. Just pre
Training time can vary depending on the amount of training data. A good rule of thumb is a few seconds per image. Since we have around 200 images, we can expect the model to take about 5–10 minutes to train.
41
+
---
42
+
43
+
<aname="7b"></a>
44
+
## 7B -- Creating a model for the Arduino data
45
+
46
+
You can create a model by either going to assets and pressing **New visual recognition model** under **Visual recognition models**.
47
+
48
+
Or by pressing the **Add to project** dropdown from anywhere in your project and choosing **Visual recognition model**.
49
+
50
+

51
+
52
+
When you create a new model you should automatically be directed to the models training area. If you need to find your way back to this page you can do so by navigating to your project *(Projects > My First Project)* then under the **Assets** tab click on your model under the **Visual recognition models** section.
53
+
54
+

55
+
56
+
Create a new class for each *type* of Arduino part. Specifically, create a class for "Mega", then "Uno", and finally create a "Negative" class.
57
+
58
+

59
+
60
+
Then drag and drop the zip files from the side panel onto the corresponding class.
61
+
62
+

63
+
64
+

65
+
66
+
After all your classes are complete, you are ready to train your model. Just press the **Train Model** button.
67
+
68
+

69
+
70
+
Repeat the above steps for the second model of Arduino faults. Specifically, create a class for "Capacitor Failed", then "Normal", and finally create a "Negative" class.
71
+
72
+

73
+
74
+
---
75
+
76
+
<aname="7c"></a>
77
+
## 7C -- Creating a model for your own data
78
+
79
+
Follow the above steps, substituting your own classes and model(s) from the data you collected.
80
+
81
+
---
82
+
83
+
## After kicking off the training jobs (all workshop versions)
84
+
85
+
Training time can vary depending on the amount of training data. A good rule of thumb is a few seconds per image. Since we have a smaller number of images, we can expect the model to take about 5–10 minutes to train.
32
86
33
87
In the meantime we can start preparing the iOS app.
0 commit comments