Daniel Leightley

A blog by Daniel Leightley PhD, a researcher based in the United Kingdom with interests in computer vision, machine learning, big data security and deep learning.

Auto Deployment for Node.js and GitHub

Auto deployment of code would not only save me time, it would ensures that my repository is deployed in the same manner with every push; without the need of ssh'ing into the server. I recently spent some time exploring the best solution to auto deployment with GitHub using private token keys (I did not want to use SSH for this). For a project I am currently working on, I needed the ability to push (or commit) updates to my master Git repository and then forward to them to a server. There are many solutions out there, but they were over engineered and complex. I just wanted a simple solution that works with node.js. This would enable me to embed...

MEAN Stack User Authentication and SMS validation with Twilio/Authy: Part 2/2 - Creating the IONIC App

This is the final post of the two part series for creating a MEAN stack user authentication framework with SMS verification. You can read about setting up the back-end server here. This blog post will explore the development of the IONIC app for both Android and iOS; including the ability to call our API to validate an SMS number using Authy. Below is an example of the Login App we are going to create. All the code will be available on my GitHub page here. This repo contains the Login App and back-end server. Take note of the comments within the ReadMe file. I am using the MEAN stack, but you can use any type of environment as the principles...

MEAN Stack User Authentication and SMS validation with Twilio/Authy: Part 1/2 - Developing the API

In this mini two part series I am going to share some code and guidance on how to use Twilio/Authy for user SMS authentication using a MEAN stack enviorment to create a full authentication system for a mobile phone app (iOS/Android) or web app. This blog post will explore the development of the backend server; including API, MongoDB database and authenticating users. A follow-up post will explore the creation of the IONIC app (can be adapted to web app) and will be live in a couple of days. The series will cover: Registration, validation and storing of user credentials. Authy authentication and SMS messaging Log in a user using token based authentication. Protect routes and app states based...

Academics should care about data security on the web

It is important that we start to take security seriously. I will try to avoid making this blog post into a rant against academia. I would be the first to admit that I was not always so security aware, I would create code that would enable XSS, SQL injection or cookie hijacking. The reason? I always thought it could never happen to me, who would care about an academic research project website? Thankfully, to my knowledge, the projects were never the victim of any breach. I did always spend time reviewing the logs. However, over the last couple of years I have become very security aware and genuinely interested in the field, and not just because of recent hacks against...

European Psychiatric Association 18th meeting in Gothenburg

The European Psychiatric Association (EPA) Gothenburg 18th meeting of the Section of Epidemiology and Social Psychiatry aims to to provide a platform for psychiatric epidemiology and social psychiatry research from across the world. I submitted an abstract related to the use of Health Episode Statistics (HES) in epidemiology (more on this later). This year EPA was held in Gothenburg, Sweden between November 30-December 3, 2016 at the Scandic Hotel Opalen, near the centre of Gothenburg. We flew from London Gatwick on Tuesday 29th November in time for registration on Wednesday 30th. I was really excited to attend this conference, it is my first overseas conference with King's College London (KCL). Day 1 - Wed 30 Nov The conference started with...

Postural Stability During Standing Balance and Sit-to-Stand in Master Athlete Runners Compared With Non-Athletic Old and Young Adults

Great news, I have just had my second journal accepted to appear in the Journal of Aging and Physical Activity (JAPA). I am really pleased that the work will soon be published. It forms part of my PhD work, bringing together motion capture (depth sensor) and mobility analysis to evaluate masters athletes. Of particular note is the acceptability by the community to utilise depth sensor technology as the 'gold standard'. This will hopefully spur other researchers to utilise marker-less technology over marker-based solutions. You can find the article here. The aim of the paper study was to compare postural sway during a series of static balancing tasks and during five chair rises between healthy young (mean (SEM) age 26(1)...

Society for Social Medicine: Conference Review

The Society for Social Medicine (SSM) aims to promote the development of scientific knowledge in social medicine. It covers a wide range of topics from epidemiology to health services. I submitted work related to the methodology employed to link electronic healthcare records in England, Scotland and Wales; out of all the work I observed at the conference it was the most technical (more on this later). Each year the Society holds an Annual Scientific Meeting for members and non-members to attend, present work, network and collaborate. This year SSM 2016 was held in York, England, at York University, James College campus from 14th September 2016 to 16th September 2016. The campus is located about 45 minutes walk from York train...

IPDLN 2016: A conference review

IPDLN is an international conference on Population Data Linkage. It takes place every two years. This year IPDLN 2016 was hosted in Swansea, Wales, at the Swansea University Bay campus from 24th August 2016 to 26th August 2016. The campus is located on the sea front, approximately a one hour walk from Swansea train station (I decided to walk it). It has taken me a couple of weeks to post this - been very busy due to a new project starting up. I arrived in Swansea on the 24th August 2016 direct from London. I was really excited because I did not know what to expect from this type of conference. After all, it was my first data linkage conference...

Recording Kinect One Stream using C#

During my PhD I had to obtain three of the data streams (RGB, Depth and Skeleton) of the Kinect One sensor. Sadly, Microsoft, at the time, did not provide any example for recording the raw data itself. They do offer Kinect Studio, however it’s a closed ecosystem without the ability of accessing the raw data. In this blog post I wanted to share with you the C# code snippets for how I recorded the data streams and achieved near 30ftp while saving these streams. You can see an example of the code over on my GitHub page here - please note that the code it is not optimised in any way. The code is very basic and just an...

Face and Eye Detection with Python - Static Image

Detecting the face and eyes of a static image in the frontal plane is a straightforward Computer Vision task. We are able to use the pre-trained cascade models which come with OpenCV; these are based on trained Haar features. I wanted to provide a copy of the syntax I use. Whenever I approach a problem, I always use a basic syntax first, as a baseline comparison. In this post, I will detail how to identify any face and/or eyes using Python and OpenCV using static images. I will make a follow-up blog post for how to identify face and eyes using a web camera in real-time. It is very important that you have both setup on your system, otherwise...