Skip to content
Nils edited this page Dec 3, 2021 · 2 revisions

This page addresses how to train a new model and use an existing model to predict new data. Learn more about the required data structure here.

Required Libraries

Learn more about required libraries to run this software here.

Training

To train a new model, use train_model.py.

  • Give a comma seperated path list for training data which needs to be completly annotated
  • Give a comma seperated path list for validation data which ALSO needs to be completly annotated
  • Define the CNN model as you wish
  • Set saving paths for the trained model, its weights and plots

Predicting

To predict data using a pre-trained model (see above), use predict_batch.py.

  • Give the location of a saved model which should be used to predict on new data
  • Give the directory which contains unannotated data that should be labeled

CLI Predicting

To make batch-prediction easy, you can use the built-in CLI. This function requires a pre-trained model and a batch of data, being located in a common root directory.

The CLI tool will prompt you to input all relevant variables and methods. Run the CLI interface using:

$ python predict_batch_custom.py

This is the recommended way of running predictions if you do not want to change the source-code.

Language grade: Python

Clone this wiki locally