explosive growth of mobile devices usage and the quick
increase of the mobile applications are facing many challenges in
their resources as low computing power, battery life, limited
bandwidth, and storage. Mobile Cloud Computing (MCC) has
been introduced to be a potential technology for mobile services
and to solve the mobile resources problem by moving the
processing and the storage of data out from mobile devices to the
cloud. The cloud enables the integration with additional
development tool as graphical processing power (GPU) to
increase the computational power. This paper presents a novel
approach for real time face detection using GPU acceleration.
The results of developed Applications demonstrate that the
proposed Mobile GPU cloud computing increase both speed and accuracy of facial detection systems.
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
Mobile gpu cloud computing
1. Mobile GPU Cloud Computing
Marwa Ayad
Prof. Ashraf Salem
Dr. Mohamed Taher
GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
2. Agenda
• Introduction
• Motivation
• Objectives
• Cloud computing
• Mobile Cloud Computing
• Real Time face Recognition MCC
• Face Recognition MCC enhancement
• Conclusions
2 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
3. Introduction
• Mobile Cloud Computing (MCC) which combines mobile
computing and cloud computing. It refers to an infrastructure
where the data storage and data processing can happen
outside of the mobile device.
3 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
4. Motivation
• Mobile devices are becoming an essential part of human life. (e.g.,
Smartphone, tablet PCs, etc)
• Mobile devices still lack in resources.
• MCC overcome the mobile challenges (battery lifetime,
processing power, availability)
• Integrate mobile device with cloud computing
– Accessing to multimedia and sensors data.
• MCC provide Efficient and effective application
– Real-time response.
– Minimum communication cost with mobile platform
– Limited computation overhead
4 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
8. Objective
• The objective of this work is to:
– Build Mobile Cloud Computing environment with open
source cloud OS.
– Develop Mobile Cloud Computing Application.
– Enhance Mobile Cloud Computing Application.
8 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
9. Agenda
• Introduction
• Motivation
• Objectives
• Cloud computing
– CC service module
– CC deployment module
– Build private cloud (opensource Software)
• Mobile Cloud Computing
• Real Time face Recognition MCC
• Face Recognition MCC enhancement
• Conclusions
9 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
10. Cloud Computing
• Cloud Computing provider of pooled network resources such
as CPU, RAM, Storage and software over the web. These
services are easily provides and released on demand.
10 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
11. Cloud Computing service models
• Infrastructure as a Service (IaaS):
• Platform as a Service (PaaS).
• Software as a Service (SaaS).
11
13. OpenStack (IaaS)
• OpenStack: Open source cloud operating system that controls
large pools of compute, storage, and networking resources
throughout a datacenter.
14 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
14. OpenShift (PaaS)
• OpenShift:
o Open Source Software to PaaS that enables developers to
build and deploy web applications without constraints.
15
GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
15. Cloud Service models IaaS vs PaaS
• Experiment Goal:
– Evaluate application deployment in deferent cloud service models.
• Experiment Description:
– retrieve the data of ten persons from MySQL database.
• {"personData":[{"address":"nasrcity","age":"20","city":"Cairo","country":"Egypt","description":"Marwa has traditional and
practical personality. she is hardworking and has leadership. ","email":"EngMarwaAyad@gmail.com", "gender":"female",
"image":" ","job":"Senior Software Engineer ","name":"Marwa","telephonNumber":"0245358249329 "}]}
• Experiment Result:
Total request Timeservice
models
1.75 secIaas
2.83 secPaas
The platform as a service module
adds a little overhead
on response time.
The overhead is mainly caused
by managing and monitoring
development software.
16 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
16. Agenda
• Introduction
• Motivation
• Objectives
• Cloud computing
• Mobile Cloud Computing
– Mobile cloud computing architecture
– Mobile cloud computing Application
• Real Time face Recognition MCC
• Face Recognition Mcc enhancement
• Conclusions
17 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
17. Mobile cloud Computing Architecture
• Mobile Network
• Cloud Computing
• Mobile Device
(with developed Application )
18 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
18. Mobile cloud Computing Application
• Native Mobile applications
– Developed using mobile platform supported programming languages
• Embedded browser applications:
– developed using standard web development languages.
19 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
19. Mobile Android Vs. Blackberry
• Experiment goal:
– Measure the effect of mobile client resources with multiple requests to cloud
backend application.
• Experiment Description:
– The native mobile application for android and blackberry generates and sends
20 request in closed loop (sequentially) and record the time of whole process.
• Experiment Result:
Average time per
request
Total time for 20
sequential
request
1.40 s28.1746 sSONY
((Android
10.5 s210.6431msBlackberry
(blackberry API)
Android 10 times faster than blackberry.
Blackberry OS 5.0 has 6 network transport
types [Blackberry Internet Service,
mobile data service, Direct TCP, WIFI TCP
, WAP 1.0, and WAP 2.0].
Android makes http request faster by using
the apache HTTP client.
20 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
20. Mobile Android Vs. Blackberry in
Different Cloud structure
• Experiment goal:
– Measure the effect of mobile client resources with one request to different
cloud structure.
• Experiment Description:
– The native mobile application for two android devices and blackberry
generates one request to retrieve person data.
• Experiment Result:
21
GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
21. Agenda
• Introduction
• Motivation
• Objectives
• Cloud computing)
• Mobile Cloud Computing
• Real Time face Recognition MCC
– Face Detection
– Face recognition
• Face Recognition MCC enhancement
• Conclusions
22 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
22. Real Time face Recognition MCC
(SaaS)
• High computational power.
• Required large storage
• Using mobile resource.
• Real Time response.
• Multiple accessing.
• Useful application.
23 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
24. Face Detection
(Viola and Jones call Haar Classifier Detection Algorithm )
• Haar Classifier Detection:
o The Algorithm looks for specific features of a human face
o When one feature is found, the algorithm allows to pass to the next stage of detection.
o Uses a cascade of stages to eliminate non-face candidates quickly.
o Our implementation Consist of 24 stages and each stage contains number of features.
25 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
25. Face Recognition
(The Eigenface Algorithm )
Image database consist of 50 face image for 10 unique people with 5 photos / person
26
GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
26. Agenda
• Introduction
• Motivation
• Objectives
• Cloud computing
• Mobile Cloud Computing
• Real Time face Recognition MCC
• Face Recognition MCC enhancement
– Face Detection filter
– Multithread face Detection
– GPU accelerations
• Conclusions
27 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
28. Face Detection Filters
• Face Detection Filter (Skin Color Filter)
– Pixel in skin image is more or equal to estimated threshold value. Total
pixel skin more than 50%
– Increase the accuracy of the detection from 95% to 97%.
29
GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
29. Evaluate Face Recognition MCC Application in
Different Cloud Structures
• Experiment goal:
– Measure the performance of face recognition application with different image
size deployed in different cloud structure.
• Experiment Description:
– The images database consists of 50 photos for 10 persons.
• Experiment Result:
•The presented time includes the
communication time between
mobile and cloud instance and it is
similar in one and multiple servers
with quite increasing in VM cloud
instance.
• Increasing number of faces in
image not only increases the
recognition time but also increases
time of detection.
30
30. Multithread Face Detection
• Detection window parallelization:
– Detection window moving over input image can be parallelized.
31 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
31. Evaluate Effect of Multiple Thread Face
Detection Application
• Experiment goal:
– Prove that distribute face detection tasks on multiple threads improve algorithm
computation and provide better utilization to cloud resources.
• Experiment Description:
– Implement android face detection mobile application.
• Experiment Result:
The experiment proves
that four threads will
reduce execution time by
2.8 times as still
communication spent fixed
time and switch between
thread overhead.
32
32. GPU Acceleration
• Executing data parallel code fragments on the
GPU rather than being confined to the local
CPU
33 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
34. Simple Processing Flow
1. Copy input data from CPU memory to
GPU memory
PCI Bus
35 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
35. Simple Processing Flow
1. Copy input data from CPU memory to
GPU memory
2. Load GPU program and execute,
caching data on chip for performance
PCI Bus
36 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
36. Simple Processing Flow
1. Copy input data from CPU memory to
GPU memory
2. Load GPU program and execute,
caching data on chip for performance
3. Copy results from GPU memory to
CPU memory
PCI Bus
37 GPU_MCC Marwa Ayad, ICEAC 2015, Cairo
37. Face Recognition GPU Vs. CPU
• Experiment goal:
– Measure the effect of using GPU instead of using CPU Only.
• Experiment Description:
– CUDA face recognition implementations vs. CPU face recognition implantation.
• Experiment Result:
We can see that CUDA based
implementation on GEForce GT
525M(96 core) is 9 times faster
than the CPU version.
38
38. Face Detection mobile Vs. CPU Cloud Vs.GPU
Cloud
• Experiment Goal:
– measure the execution of face detection application on local on mobile device
and remotely on deferent cloud platform.
• Experiment Description:
– Mobile face detection implantation Vs. MCC face recognition
• Experiment Result:
– Cloud 40x Vs. mobile
– One server = multiple
Server with low processing
Power.
39
39. Conclusions
• A private Cloud system has been constructed
• Face recognition MCC Application has been
developed .
• Performance improved by using GPUs
– Speedup of 9x vs. CPU
• Results show 40x speedup on cloud compared
to mobile
GPU_MCC Marwa
Ayad, ICEAC 2015, Cairo
40
41. Experimental Setup
Cloud ServerMobile Device
GPU Acceleration :
Nvidia: GEForce GT 525M
CUDA Driver Version 6.5
Number of multiprocessor : 2
Number of CUDA Cores/Mp: 48
Total (96 CUDA Cores)
Development Tool
42
GPU_MCC Marwa
Ayad, ICEAC 2015, Cairo
Mobile cloud computing (MCC) has been introduced to be a potential technology for mobile services.
MCC integrates the cloud computing into the mobile environment
overcomes obstacles related to the performance (e.g., battery life,storage, and bandwidth),
environment (e.g., heterogeneity, scalability, and availability),
security (e.g., reliability and privacy).
Efficient and effective computation offloading:
Variable bandwidth
Mobile service availability
Difficulty of runtime conditions estimation
Security:
Multi-tenancy in cloud causes vulnerability
Offloaded code prone to tampering
End-to-end security of mobile code at risk
Cloud Computing is a combination of virtualization (one computer hosting several “virtual” servers),
automated provisioning (servers have software installed automatically)
distributed computing and Internet connectivity technologies to provide the service.
Iaas:Provides infrastructure such as computer instances, network connections, and storage so that user can run any software or operating system.
Paas:Provides the ability to deploy applications through a programming language or tools supported by the cloud platform provider.
Saas:Provides the ability to use the software in a cloud environment
Private Cloud which the services and infrastructure are maintained on a private network.
Public Cloud which the services and infrastructure are provided off-site over the Internet.
Hybrid Cloud which is composition of both public and private clouds.
Reasons for Building a Private Cloud
The better utilization of hardware
The ability to quickly provision capabilities
The ability to easily provide continuity of application.
B. Categories of Infrastructure for a Private Cloud
Before Selection the private cloud infrastructure software we need to understand the component of private cloud infrastructure
• Virtualization: technology provides the hypervisor software, which allows multiple instances of “guest”
operating systems to run concurrently on the same physical server.
• Storage technology: such as storage area networks (SANs), can provide the underlying persistent storage for the data center.
• Security such as identity management and virtual firewalls.
• Provisioning, management, and metering tools provide the ability to deploy virtual operating systems, services, and applications.
The reason of selection openStack:
a) Provide scalable, elastic cloud computing for private cloud.
b) Simple to implement and massively scalable Change.
c) Managed all resources through a dashboard that gives administrators control while empowering their users to
provision resources through a web interface.
d) Excellent for large deployments.
e) The user can have good knowledge to the used component only not all openstack components.
2) OpenStack Component And Architecture :
• Dashboard ("Horizon"): provides a modular web based user interface for all the OpenStack services.
• Identity ("Keystone"): provides authentication and authorization
• Image ("Glance") : provides a catalog and repository for virtual disk images.
• Compute ("Nova") : provides virtual servers upon demand.
• Networking ("Neutron"): Enables network connectivity as a service among interface devices managed by other OpenStack services, usually Compute Service.
• Block Storage ("Cinder "): A service that manages persistent block storage volumes for virtual machines.
• Object Storage ("Swift "): provides object storage. It allows you to store or retrieve files.
The reason of selection OpenShift.
Open Source Software and run on top of Openstack private cloud infrastructure
Openshift provide programming languages and frameworks Java, Ruby, and PHP.
It also provides integrated developer tools to support the application lifecycle,including Eclipse integration, JBoss Developer Studio.
Easy to deploy and provide great documentation for the services.
Provide standard languages , IDE Integration , Built-in Database Services and responsive Web Console and application portability.
This web application is RESTful webservice return result in JSON format.
VM
One Server
Multi Server
IaaS
3.60 sec
1.75 sec
1.02 sec
PaaS
5.95 sec
2.83 sec
1.98 sec
In this architecture
The cloud resource is placed in a remote centralized cloud infrastructure.
The mobile devices access the backbone network via WiFi access points (APs) or 3G/4G cellular networks.
The Requests and information of Mobile users are transmitted to the central processors that are connected to servers providing mobile network services.
After that, the requests are delivered to a cloud through the Internet.
In the cloud, cloud controllers process the requests to provide mobile users with the corresponding cloud services .
The mobile interact with cloud service by two ways:
Native Mobile applications(used in our application):
are developed using mobile platform supported programming languages and a set of APIs provided by the cloud service provider .
This type is used in the face recognition application as android application is installed in the mobile device to allow to send request to the face recognition cloud engine.
Embedded browser applications: are developed using standard web development languages (e.g. HTML and JavaScript).
Web service :
Send data as json object not xml
first part is Mobile application (Android platform) and second part is face recognition engine on the cloud.
The mobile communicate with the cloud by using the restful web service as the image and user data is send to the web server in JSON format.
The user data is used to authorize the application users. Also the image is encrypted in before send it.
And decrypted once arrive to the cloud engine.
The First part is face detection :is based on identifying and locating a human face in
images regardless of size, position, and condition
The Second part is face recognition: it is analysis part as it compare the detected
person face with the stored human faces in database.
The face recognition mobile cloud application is native application which has to deploy in mobile.
The face recognition cloud engine it apply the face detection algorithm Viola Jones Face Detector at the first
Then for the detected faces it converts them into a set of Eigenfaces and compare with stored faces
If the identification percentage 80% or more the response will back to client mobile application with the person information
else it will inform the client that face is unknown.
AdaBoost و Integral Image
فيولا -- ادابووست
The face detection algorithm looks for specific Haar features of a human face.
When one of these features is found the algorithm allows the face candidate to pass to the next stage of detection.
A face candidate is a rectangular section of the original image called a sub-window.
This sub-window is often scaled in order to obtain a variety of different size faces.
The Viola and Jones face detection algorithm uses a cascade of stages which is used to eliminate non-face
candidates quickly. The cascade eliminates candidates by making stricter requirements in each stage with later stages
being much more difficult for a candidate to pass.
Candidates exit the cascade if they pass all stages or fail any stage. A face is detected if a candidate passes all stages. Each stage consists
of many different Haar features.
The face recognition is done via a series of steps.
Eigenfaces Initialization
The set of faces are grouped together into a training set.
Image database consist of 50 face image for 10 unique people with 5 photos to each person in different lighting, expressions and backgrounds
The mean of the training set is found and subtracted from the training set.
The covariance matrix is calculated. From the covariance matrix eigenvectors and the eigenvalues for each vector are calculated.
Eigenfaces recognition
the best eigenfaces are selected, which are the ones whose eigenvalues are the highest.
Compare input image with our mean image and multiply their difference with each eigenvector of the L matrix.
Each value would represent a weight and would be saved on a vector Ω
Image processing:
Image database consist of 50 photo to 10 persons.
Internet Speed:
Average speed Wi-Fi network ().
Mobile 3G networking.
Application Assumptions:
Resend the request if mobile device doesn’t get the response within 2 min
CPU : powerful processor and big caches with few number of cores , small memory bandwidth (21 GB /sec)
GPU: small processors and small cash with large number of cores (up to 1000) , huge memory bandwidth 177 GB /sec
15 * 32 *48 =23040 Graphics have a lot of parallism pixels polygons
GPU Implementation
Here, we will briefly see CUDA implementation of Viola Jones from "Towards a Robust, Real-time Face Processing System using CUDA-enabled GPUs" by Sharma et al. They have mainly targeted nVIDIA GeForce GTX 285 GPU. This GPU features 30 multiprocessors, 16 KB shared memory per multiprocessor and 1 GB device memory. There can be a maximum of 512 threads per block and 1024 active threads per multiprocessor. As described previously, face detection mainly consists of, calculating the integral images for fast feature evaluation, and detecting faces using a cascade of classifiers. Each of these tasks are parallelized and run as kernels on the GPU.
Experiment Goal: measure the execution of face recognition application on local on mobile device and remotely on deferent cloud platform
Experiment description:
The images database consists of 50 photos to 10 persons.
The three test images will be tested the first image contains one face to detect and recognition the second image contains three faces and the third image with seven faces.
Each face will be execute on face recognition mobile application, face recognition with virtual machine cloud engine, face recognition with one server cloud engine and multiple server cloud engine
Registration: each mobile must register to the cloud with unique identifier and some other security parameters.
Generate encryption key: mobile and cloud generate the same encryption master key (EMK) depend in the mobile id and security parameters.
Cloud message: the cloud reply to user with authorization message which is consist of two parts first register request status (accept/reject) if request had been accepted the second part will be cloud decryption key (CDK).
Divided data and encryption process: the mobile will divide the transferred data to small parts according to part size in security parameter. Each part will be encrypted with (EMK + part number) and all encrypted parts with integrated again with the same order and reencrypt the package with (EMK).Mobile send encrypted data to cloud and
The cloud will decrypt the data and apply the required processing. The cloud will encrypt the result with (CDK).
Result decryption: mobile will decrypt the received result by using (CDK).
The registration will be one time only , and each time check authentication and authorization
Cloud store EMK /CDK for each mobile.
Mobile also store EMK /CDK