如何使用 KITTI 里程計數(shù)據(jù)集評估單眼視覺里程計結(jié)果
我正在嘗試使用 KITTI 開放數(shù)據(jù)集來進行深度單眼視覺測距 我嘗試使用此repo它使用此代碼將姿勢轉(zhuǎn)換為 6DoFdef get6DoFPose(self, p):? ? pos = np.array([p[3], p[7], p[11]])? ? R = np.array([[p[0], p[1], p[2]], [p[4], p[5], p[6]], [p[8], p[9], p[10]]])? ? angles = self.rotationMatrixToEulerAngles(R)? ? return np.concatenate((pos, angles))def isRotationMatrix(self, R):? ? Rt = np.transpose(R)? ? shouldBeIdentity = np.dot(Rt, R)? ? I = np.identity(3, dtype=R.dtype)? ? n = np.linalg.norm(I - shouldBeIdentity)? ? return n < 1e-6def rotationMatrixToEulerAngles(self, R):? ? assert (self.isRotationMatrix(R))? ? sy = math.sqrt(R[0, 0] * R[0, 0] + R[1, 0] * R[1, 0])? ? singular = sy < 1e-6? ? if not singular:? ? ? ? x = math.atan2(R[2, 1], R[2, 2])? ? ? ? y = math.atan2(-R[2, 0], sy)? ? ? ? z = math.atan2(R[1, 0], R[0, 0])? ? else:? ? ? ? x = math.atan2(-R[1, 2], R[1, 1])? ? ? ? y = math.atan2(-R[2, 0], sy)? ? ? ? z = 0? ? return np.array([x, y, z], dtype=np.float32)模型輸出也是相同的格式(6DoF)問題是如何評估 6DoF 結(jié)果,因為此評估工具 ( kitti-odom-eval ) 僅支持以下兩種格式# First format: skipping frames are allowed99 T00 T01 T02 T03 T10 T11 T12 T13 T20 T21 T22 T23?# Second format: all poses should be included in the fileT00 T01 T02 T03 T10 T11 T12 T13 T20 T21 T22 T23?
查看完整描述