2. Geo-fence Introduction
• Geofence is a virtual boundary setup around a geographical
location
• Detects whether a mobile or a device entered a particular area
marked as geofence and take preprogrammed action
• It has wide range of applications from Road Safety to
marketing
3. 3 Main Methods of Calculating
Geofences
• Current Methods
• Ray casting
• Winding number method
• TWC(Triangle Weight Characterization)
• Complex shapes increases the time and space complexity of
these algorithms.
• These algorithms can pose a threat in time-critical applications
where geofencing is required
6. Setup
• Server application.
• Shape input with Latitude and Longitudes.
• Data point generation
• Model training(tensorflow) and exporting trained model parameters
• Android Application
• Download the model parameters for different geofences
• Overlap shape detection for finding out which model must be loaded
• Load the NN model with the downloaded parameters
• Detection using input Latitude and Longitude coordinates
7. Sample Mobile application and Web
application
• Here mobile application is the
client.
• Web application is the server
8. Algorithm for finding optimal neural
network
• Algorithm
• (i) Create directories for each combination of layers and neurons
• (ii) Create threads according to the number of CPUs for training the networks
• (iii) Stop training once cutoff accuracy is reached for each of the combinations
of layers and neurons
• (iv) Store the parameters in directories corresponding to each of the
combinations of layers and neurons
• Threshold chosen for selection of optimal neural network.
TE - Training Epoch
DT – Detection time in
microseconds
9. Results
• For three-sided geofence, neural network with number of neurons-
2,4,3,1 is sufficient, and time taken for detection is 294ns whereas
for ray-casting it will take 597ns
• But increase in number of sides for polygon of geofence requires
neural network with more neurons resulting in more execution time.
Thus, we must choose the optimal neural network according to the
geofence.
• From our observation, there is always a neural network which
outperforms ray-casting.