Train and Compress AI Model for Road Damage Detection
This example shows how to train and compress a sequence classification network using pruning, projection, and quantization to meet a fixed memory requirement.
In the first example, you train a neural network to classify timeseries of accelerometer data according to whether a vehicle drove over cracked or uncracked sections of pavement.
Then, in the second example, you compress the network using Taylor pruning, projection, and quantization. Both Taylor pruning and projection reduce the network size by changing the number of learnable parameters. You can achieve the same compressed network size by using different ratios of pruning and projection. For example, you can only prune and not project, or remove equal numbers of parameters using either method. In the example, you use an arbitrary split between pruning and projection.
In the third example, you use Experiment Manager to find the ratio between pruning and projection that results in the optimal accuracy of the final compressed network.
Finally, in the fourth example, you export the compressed network to Simulink®.
The example shows how to perform these steps:
Train Sequence Classification Network for Road Damage Detection
Compress Sequence Classification Network for Road Damage Detection
Tune Compression Parameters for Sequence Classification Network for Road Damage Detection
Generate Simulink Model from Sequence Classification Network for Road Damage Detection