Code to train an image classifier to recognize bottle caps
Go to file
2024-06-12 16:14:05 +02:00
Config Improve CLI 2023-10-24 11:31:08 +02:00
Sources Don't cache web requests 2024-06-12 16:14:05 +02:00
.gitignore Ignore more files 2023-10-23 12:29:55 +02:00
Package.swift Rename 2023-10-24 10:43:07 +02:00
Readme.md Create Readme.md 2024-03-01 17:19:09 +01:00

Caps-Train

A small executable to train an image classifier for Caps-Server.

Classifier training

The main server is running on Linux, which doesn't provide the CreateML framework required for classifier training.

Running this executable will:

  • Fetch the current image catalog by checking missing and changed images
  • Train a classifier on the image set
  • Increment the classifier version and upload the new model
  • Update the list of caps which can be recognized using the classifier
  • Create missing thumbnails for each cap for the cap grid

A configuration file is required to run the training, with a valid access token for the server:

{
    "folder": "../Public",
    "iterations": 20,
    "server": "https://mydomain.com/caps",
    "authentication": "mysecretkey",
}

The configuration file config.json must be located in the Config folder.

To start the training (on macOS), run from inside the package folder:

swift run -c release