3D Reconstruction and Visual Localization in the Campus

Introduction

Term project (independent work) for the course Introduction to Computer Vision (2023 Spring & Summer), Zhejiang University

Supervisor

Prof. Xiaowei Zhou

Project Description

In this project, the aim is to reconstruct a building in our campus using SfM and then complete the visual localization task based on query images (to get a 6 DOF camera pose with the 3D model reconstructed and the query image). I first took a large number of photos of a building on campus during the day and used these photos to reconstruct a 3D sparse model of the building using hloc (a hierarchical localization toolbox). During the reconstruction process, I used several different algorithms for the reconstruction and compared the results. Next, I took many photos of the building at night with low brightness and used these photos for visual localization. I did this first using the localization algorithms already implemented in hloc, and then I trained our own neural network based on pixloc for end-to-end visual localization testing. Ultimately, we compared these two visual localization schemes (mainly measured by the mean reprojection error).

Techique

I complete the whole job mainly with python. I used hloc to reconstruct the 3D model of the building, and implemented the visual localization function with pixloc by training our own model.

Duration

It takes about one month to complete the project (in Dec 2023).

Result

blue: visible in the 3D model     red: invisible in the 3D model


estimated depth of the keypoints
sparse 3D reconstruction model


3D reconstruction model and estimated camera poses visualization of the camera poses
green: keypoints in the reference image     red: keypoints in the query image  



Mapping and transformation of the keypoints


visualization of the camera poses
left: mean reprojection error     right: time cost