This is a guide for using the Smart Pixels ML project to train and evaluate the models on the simulated data.
Refer to Readme for installation instructions.
Download the simulated data from zenodo and PixelAV Add other links here
Ensure the two directories Data and Labels are present.
- Define the paths to the data and labels directories (look at utils for more details)
- Configure datagenerator parameters (look at data_generator for more details)
- Create training and validation datagenerators
- Define the model architecture and compile.
- Also look at the summary of the model to ensure it is correct. Look at model for more details on how to do that. For loss function see loss.
If everything is set up correctly, the training should start and run seamlessly. For example:
model.fit(
x=training_generator,
validation_data=validation_generator,
epochs=200,
verbose=1)After training, check the loss and accuracy of the model. And save the model weights.
Initiate the model and Load the weights as
model=CreateModel((13,21,2),n_filters=5,pool_size=3)
model.load_weights("model_weights.h5")And then evaluate the model as done in evaluate.py or in evaluate.py
Look at predict
Here are some additional instructions