Skip to content

A WinForms example of ML.NET image classification through webcam.

License

Notifications You must be signed in to change notification settings

teonsen/WebcamImageClassification

Repository files navigation

WebcamImageClassification

A WinForms example of ML.NET image classification through webcam. You can experience preparing training data, generating models, and classifying images in real time with a webcam.

Requirements

  • Windows 10
  • VisualStudio 2019
  • .NET Core3.1
  • A webcam(usbcam)

Usage

Step1. Gathering data

  1. Select [1.Create data-set] tab.
  2. Select a folder to save images as a data-set.
  3. Enter a label in the "Label name" textbox for the image to be captured.
  4. Specify the number of images to be taken and the interval between shots.
  5. Press [Start] button to start capturing images for training using the Web camera.
  6. Repeat 3 to 5 for the number of labels you want to classify. Image

Step2. Generate model

  1. Select [2.Generate model] tab.
  2. Make sure that the data-set folder you selected in Step1 is displayed in the text box.
  3. Press [Genarate] button. After the training is finished, pipeline.zip and model.zip will be created in the data-set folder. Image

Also, the result will be displayed as an HTML file as shown below. Image

Step3. Consume model

  1. Select [3.Consume model] tab.
  2. Make sure that the paths to pipeline.zip and model.zip are filled in the text boxes respectively.
  3. Press [InitCam] button to initialize the webcam.
  4. Press [Start classify] button. You will see which label the object was classified and its score every 3-sec. Image

A model trained on a real egg-sushi was able to recognize a toy one.:smile:

About

A WinForms example of ML.NET image classification through webcam.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages