Skip to content

ML Classifier

Andrea Settimi edited this page Jan 23, 2024 · 10 revisions

Classifier

TTool has a embedded ML to classify the tool head which will automatically change the 3D model accordingly. The classifier is trained and exported in Torch script format. All the source code for training the classifier, as well as exporting it, is in the ai folder.

Import ML Model from TTool‐AI

You've now received the model and labels from the TTool-AI:

image

After downloading these files, place them into the following directory:ai/torchscripts

Your folder structure should look like this:

ai/
├── torchscripts
    ├── efficientnet.pt
    ├── labels.txt

Once you've done this, it's time to rebuild the system. The classifier.cmake will take the labels from labels.txt and place them into assets/config.yml. After rebuilding, make sure to check that the labels in labels.txt and config.yml are the same for consistency.

Done! Now, TTool will load this model when it is launched.

TTool‐AI dataset folders:

The data for TTool-AI, including uploaded videos, video datasets, as well as weights and labels, is stored in the following directory: DATA_DIR=/media/18TB_ibois_stock/data.

The Postgres database, which holds comprehensive details about the datasets, videos, and their associated weights and labels, is backed up at this location: POSTGRES_DIR=/media/18TB_ibois_stock/postgres/data.