Erinevus lehekülje "SummerAIhw1" redaktsioonide vahel

Allikas: Kursused
Mine navigeerimisribale Mine otsikasti
(Uus lehekülg: 'First steps in machine learning with [https://teachablemachine.withgoogle.com/ Teachable Machine]. '''Goal''': becoming familiar with the machine learning workflow. You will: *...')
 
12. rida: 12. rida:
  
 
== Task descriptions ==
 
== Task descriptions ==
 +
 +
[[File:tm4.jpg|416px|choice of projects]]
  
 
'''Image classification''' is where you have pictures belonging to different "classes". Examples: cats or dogs, people or scenery, different species of the iris flower, different traffic signs. Given a picture, the machine learning model must "predict" which class the picture belongs to. This also works with videos, which are basically sequences of images. If you choose this task, select "Standard image model".
 
'''Image classification''' is where you have pictures belonging to different "classes". Examples: cats or dogs, people or scenery, different species of the iris flower, different traffic signs. Given a picture, the machine learning model must "predict" which class the picture belongs to. This also works with videos, which are basically sequences of images. If you choose this task, select "Standard image model".
31. rida: 33. rida:
 
If you have images or sound clips as files, take about 10% of those files and set them aside for testing. They will not be used in training the model. The rest should be divided to classes and uploaded under the appropriate class. Note you can rename the classes on the training webpage.
 
If you have images or sound clips as files, take about 10% of those files and set them aside for testing. They will not be used in training the model. The rest should be divided to classes and uploaded under the appropriate class. Note you can rename the classes on the training webpage.
  
Press "" to start the training and wait until it finishes.
+
Press "Train Model" to start the training and wait until it finishes. [[File:tm5.jpg|train button]]
  
 
When your model is ready, a preview panel will appear on the right. You can now upload some of the test files to see if the model is doing what it is supposed to, or use the webcam to test.
 
When your model is ready, a preview panel will appear on the right. You can now upload some of the test files to see if the model is doing what it is supposed to, or use the webcam to test.
  
 
There is also a more technical way to check how the training went. Click "Advanced" under the model training button, then "Under the hood". You can then press the buttons to calculate accuracy per class and the confusion matrix - the latter is useful if you have more than two classes. Note this data may not be very reliable if you didn't have many training examples.
 
There is also a more technical way to check how the training went. Click "Advanced" under the model training button, then "Under the hood". You can then press the buttons to calculate accuracy per class and the confusion matrix - the latter is useful if you have more than two classes. Note this data may not be very reliable if you didn't have many training examples.
 +
 +
[[File:tm1.jpg|under the hood]]
 +
 +
[[File:tm6.jpg|269px|statistics]]
  
 
If the model seems to work reasonably, press the "Export model" button. The easiest way to save the model so that it can later be shown in the classroom is to use the "upload (shareable link)" option.
 
If the model seems to work reasonably, press the "Export model" button. The easiest way to save the model so that it can later be shown in the classroom is to use the "upload (shareable link)" option.
  
You can also choose "Save project to Drive" from the top left menu, if you want to keep working with it.
+
[[File:tm2.jpg|export model]]
 +
 
 +
You can also choose "Save project to Drive" from the top left menu, if you want to keep working with it. [[File:tm3.jpg|save to drive]]

Redaktsioon: 27. märts 2024, kell 14:58

First steps in machine learning with Teachable Machine.

Goal: becoming familiar with the machine learning workflow. You will:

  • Collect data.
  • Train the machine learning model.
  • Evaluate the model.

Choose one of three tasks: recognizing contents of images or videos, recognizing some sound, or recognizing poses of the human body. It is required that you collect your own data. Downloading existing data may be acceptable if you have a very good idea, but it needs to be agreed beforehand.

Go to https://teachablemachine.withgoogle.com/ and click "Get Started".

Task descriptions

choice of projects

Image classification is where you have pictures belonging to different "classes". Examples: cats or dogs, people or scenery, different species of the iris flower, different traffic signs. Given a picture, the machine learning model must "predict" which class the picture belongs to. This also works with videos, which are basically sequences of images. If you choose this task, select "Standard image model".

Sound classification is similar, except works with sound files. If you choose this task, note that the project page also expects you to upload background noise.

In pose detection, the model needs to first recognize where a person's body, hands, feet and head are. From this it can draw a kind of a stick figure. The poses of this stick figure is then what the model will classify.

Collecting data

Collect your data from the classroom, campus, town, wherever. To keep things simple, you should have two or three different things that the model should learn to recognize.

If you use the webcam feature, you need to have Teachable Machine's model training webpage open to record data. Note that you can save an incomplete project to Google Drive and reopen it later. Pictures and sound clips can be collected however you like, then uploaded. Please be mindful of people's privacy, when recording data that will be used to train a model.

Training and saving the model

If you used the webcam, you are ready to train the model.

If you have images or sound clips as files, take about 10% of those files and set them aside for testing. They will not be used in training the model. The rest should be divided to classes and uploaded under the appropriate class. Note you can rename the classes on the training webpage.

Press "Train Model" to start the training and wait until it finishes. train button

When your model is ready, a preview panel will appear on the right. You can now upload some of the test files to see if the model is doing what it is supposed to, or use the webcam to test.

There is also a more technical way to check how the training went. Click "Advanced" under the model training button, then "Under the hood". You can then press the buttons to calculate accuracy per class and the confusion matrix - the latter is useful if you have more than two classes. Note this data may not be very reliable if you didn't have many training examples.

under the hood

statistics

If the model seems to work reasonably, press the "Export model" button. The easiest way to save the model so that it can later be shown in the classroom is to use the "upload (shareable link)" option.

export model

You can also choose "Save project to Drive" from the top left menu, if you want to keep working with it. save to drive