Localization in Semantic Map

A project of the Robotics 2020 class of the School of Information Science and Technology (SIST) of ShanghaiTech University. Course Instructor: Prof. Sören Schwertfeger.

Li Cui, Chunyan Rong, Jingyi Huang

1 Introduction

In the field of autonomous driving, accurate localization is the most important prerequisite. Autonomous valet parking is a specific application for autonomous driving, where vehicles need to navigate into parking lots and park into the target spot automatically. Since parking lots are usually small, narrow, and crowded, precise localization is of crucial importance. However, this scenario puts great challenges to traditional visual localization methods. We propose an text-based semantic mapping and localization algorithm that can be applied to automated parking in underground parking lots or indoor localization. We will extract semantic features from the perceived environment and make a probability guess about ID of parking spots. A particle filter will be implemented to get more robust localization results.

2 System Description

The system consists of two parts, one is the OCR network, the other is the particle filter module. The input of the OCR network are photos taken during motion. It will recognize each character in the parking spot in the picture and output the confidence level.  The particle filter module needs a semantic map containing parking space information. The following is a brief description of these parts.

2.1 Semantic map generation

Figure 1 is the floor plan labeled with corresponding parking spot IDs. The parking spaces and their numbers are all painted in magenta. We use it to generate semantic map, which contains ID, position and orientation for each parking spot's center.

Figure 1 2D floor plan of our university’s underground parking lot. The magenta rectangles indicates parking lots.

2.2 OCR

OCR (Optical character recognition) is the electronic or mechanical conversion of images of typed, handwritten or printed text into machine-encoded text, which has a long research history and a wide range of application scenarios. In this project, we apply YOLOv4 to realize the detection of the parking ID. The results is shown in figure 2.

Figure 2 OCR result. The left figure is the raw photo, and the right figure shows the detection result using rectangle labels.

2.3 Particle filter with OCR

Particle filters are a set of Monte Carlo algorithms used to solve filtering problems arising in signal processing and Bayesian statistical inference. The filtering problem consists of estimating the internal states in dynamical systems when partial observations are made, and random perturbations are present in the sensors as well as in the dynamical system. The objective is to compute the posterior distributions of the states of some Markov process, given some noisy and partial observations. Figure 3 shows the pipeline of our work.

Figure 3 OCR-PF Pipeline

3 Evaluation

We evaluate the results of the algorithm from the estimated trajectory qualitatively. In the test, we visualize the position of the parking spots the camera passed by and the position of the particles at each moment. We use the open-sourced tool to align the trajectory collected by the LiDAR with the estimated trajectory. If the shapes can roughly match, this project can be regarded as successful. Figure 4 shows the estimated trajectory from our project and the
trajectory from LiDAR. It can be seen that our algorithm can achieve good performance. 

Figure 4 Aligned Result

4 Results

Figure 5 shows the whole trajectory of our OCR-PF. On the top are original images and real-time network detection results. Orange ones mark the parking spaces we passed during the test period. The red trajectory is the trajectory of the weighted average state of the particles at all times. The blue trajectory shows the state of all particles at the moment.

Figure 5 Final Result

5 Video