These scripts handle the data pre-processing, training, and execution of a Convolutional Neural Network based classifier for thermal vision.
The output is a TensorFlow model that can identify 48x48 video clips centered on the object of interest.
Processes tagged CPTV files extracting targets of interest into track files used for training.
Builds a data set from extracted track files.
Trains a neural net using a provided test / train / validation dataset.
Uses a pre-trained model to identifying and classifying any animals in a CPTV file.
Evaluates the performance of a classify.py run and generates reports.
None yet, but coming soon.
Create a virtual environment and install the necessary prerequisits
pip install -r requirements.txt
Optionally install GPU support for tensorflow (note this requires additional setup
pip install tensorflow-gpu
MPEG4 output requires FFMPEG to be installed which can be found here.
On windows the installation path will need to be added to the system path.
CPTV files can be downloaded using the cptv-downloader tool.
First download the CPTV files by running
python cptv-download.py --user x --password x
Next extract the track files. This can take some time
python extract.py all -v -p
Now we can build the data set
python build.py data
And finally train the model
python train.py -dataset=data -model-name=model --epochs=10
A pre-trained model can be used to classify objects within a CPTV video
python classify.py [cptv filename] -p
This will generate a text file listing the animals identified, and create an MPEG preview file. `