This directory contains source code enabling the reproduction of a neural network model for presence monitoring tasks in low-resolution thermal images. It is required to download Thermo Presence data (in h5 format) directly to data folder before starting the training process. In order to do so, run get_data.sh
script from the console.
bash get_data.sh
To train the density estimation model first check the parameters configuration in config.yaml file. Then call train.py script as shown below:
python train.py -p configs/config.yaml
The conducted experiments were tracked using Neptune platform. If one has an account and wants to use this experiment tracker should provide the below data within the configs/credentials.yaml
file and then run an experiment with the log_neptune
flag.
neptune:
project: <Project Name>
api_token: <Project API Token>
$ python train.py --help
Usage: train.py [OPTIONS]
Options:
-p, --config_path TEXT Path to file with config
--log_neptune Use Neptune experiment tracker
--help Show this message and exit.
The neural network is based on U-Net architecture with shallow structure, single-channel input, and output. The proposed model has only 46 577 parameters.
Neural network optimization, quantization, and conversion processes are described in the convert_optimize_quantize.ipynb Jupyter Notebook.
Metric Name | MAE | MSE | Counting MAE | Counting MSE | Counting MRAPE [%] | Accuracy | F1 Score | Model size [kB] |
---|---|---|---|---|---|---|---|---|
TF FP32 | 0.1057 | 0.0323 | 0.0226 | 0.0234 | 0.81 | 0.9778 | 0.9782 | 667 |