# Application of Deep Convolutional Neural Networks and Smartphone Sensors for Indoor Localization
## 1 Introduction
The introduction of large datasets like ImageNet and Places paved the way for many object and scene classification tasks [33]. Many works [34; 35] have been presenetd which are devoted to scene and place recognition using deep learning. Scene recognition using the smartphone camera can play an important role to refine the indoor localization accuracy. Indoor localization is an important problem today for a variety of applications including but not limited to geotagging, asset tracking, augmented reality, and emergency response activities. In addition, the emergence of location-based services (LBS) necessitated the robustness and preciseness of indoor location. Apart from this, accurate location information serves as the backbone for LBS. Unlike the global positioning system (GPS) which serves as the chief outdoor localization technology, there is no standard technology which does the same for indoor localization. A number of technologies have been proposed so far, including optical [36], radio, acoustics, and magnetic [37; 38] to perform indoor localization, yet, none of them serves without its demerits. A major limitation of using the magnetic field data is its device dependence. Smartphones of different brands are embedded with magnetometers designed from various companies. The magnetic data collected from these smartphones fluctuate significantly depending upon the sensitivity of the installed magnetometer. Another challenge is to increase the localization accuracy in large places, as the magnetic intensity can be very similar at multiple locations. Scene recognition can play an important role to increase the localization accuracy. We aim to use scene recognition for two purposes. First, it is utilized to identify a specific floor and then the identified scene is employed to narrow down the search space in the database. A scene is identified with the help of a deep CNN model. The training data for each scene is collected using the smartphone rea camera. The identified scene is then used to assist magnetic field based localization. In the end, the estimated location is refined with the help of pedestrian dead reckoning (PDR) data. An extended Kalman filter (EKF) is used to fuse the results from magnetic field localization and PDR data. The following contributions have been made in this research:  
1. A scene recognition model based on deep convolutional neural network is trained for indoor scene recognition in varying light conditions. The model is used to identify different floors and refines indoor localization accuracy. Tensorflow 1.12.0 is used to build and train the model. The accuracy of CNN is compared with support vector machines. 2. An indoor localization approach is presented which utilizes the magnetic data from smartphone magnetic sensor to localize a pedestrian. 3. Spatial proximity is considered to modify K nearest neighbor (KNN) which removes the distant neighbors and refines the current location of the pedestrian using the magnetic data. 4. The proposed approach is tested on different smartphones and results are compared against other localization techniques to evaluate the impact of device dependence. The rest of the paper is organized in the following manner. Section 2 describes the research works related to the current study. The proposed approach and its architecture are discussed in Section 3. Section 4 is about the experiment and performance evaluation. Discussions and conclusion are given in Sections 5 and 6, respectively.