FLIRtoDash
Dash webapp to get some statistics from pixel values of an image (saved as CSV). The statistics are calculated over a selected region of interest (ROI). The app was intended to get some statistics from thermographic images from a FLIR camera, but can be used for other types of images as well.
Installation
The following instructions describe two installation options on a linux system and might deviate to the installation on Windows/macOS.
Option 1: Install the Docker image containing the webapp
Get the Docker image from Docker Hub:
sudo docker pull dockificial/ubuntu_flirtodash:latest
Create a local Docker network:
sudo docker network create --subnet 172.20.0.0/24 multi-host-network
Create and run a container. The container is attached to the network with the IP 172.20.0.2:
sudo docker run -itd --network=multi-host-network --ip 172.20.0.2 dockificial/ubuntu_flirtodash:latest
The webapp is now reachable with a browser through http://172.20.0.2:8050 .
Option 2: Webapp installation on an Ubuntu Server image to run as VM in VirtualBox
- Download Ubuntu Server iso image.
- Create a VirtualBox VM with the iso.
- Install the following packages:
sudo apt-get -y install virtualenv python3-pip unzip tmux
- Create a virtual environment and enter it:
virtualenv venv -p python3 source venv/bin/activate
- Set empty PYTHONPATH environment variable:
export PYTHONPATH=
- Install necessary Python3 packages:
pip3 install --upgrade pip --user pip3 install numpy pip3 install pandas pip3 install scipy pip3 install dash pip3 install dash_bootstrap_components
- Download and uncompress FLIRtoDash app:
cd mkdir flir cd flir wget https://github.com/gitificial/FLIRtoDash/archive/master.zip unzip master.zip
- Add a new cronjob to start the webapp at boot time. Open the cronjob file with the command “crontab -e” and add following line to the very end and save it (Ctrl-d Y):
@reboot tmux new-session -d -s "flirSession" $HOME/flir/FLIRtoDash-master/flir_start.sh
- Reboot the system. The webapp is now reachable on http://UBUNTU_SERVER_IP:8050
Files overview:
flirToDash.py - Dash webapp
Dockerfile - Dockerfile to create a Ubuntu Docker image with the webapp
flir_start.sh - Script to start webapp at boot time.
example.csv - Thermographic image as CSV. Each table cell contains the temperature of it’s corresponding pixel.