princeton-vl / DROID-SLAM

BSD 3-Clause "New" or "Revised" License
1.82k stars 303 forks source link

What are iters1 and iters2 in droid_frontend.py #107

Open shomeAvataar opened 1 year ago

shomeAvataar commented 1 year ago

I am unable to understand the significance of iters1 and iters2 in droid_frontend.py even after going through the paper and code. I understand that the update operation does. However I am not clear why two such update sequences are needed. Specifically, what do the two update operations do in the following code in droid_frontend.py (lines 50 to 66):

 ` for itr in range(self.iters1):
        self.graph.**update**(None, None, use_inactive=True)

    # set initial pose for next frame
    poses = SE3(self.video.poses)
    d = self.video.distance([self.t1-3], [self.t1-2], beta=self.beta, bidirectional=True)

    if d.item() < self.keyframe_thresh:
        self.graph.rm_keyframe(self.t1 - 2)

        with self.video.get_lock():
            self.video.counter.value -= 1
            self.t1 -= 1

    else:
        for itr in range(self.iters2):
            self.graph.**update**(None, None, use_inactive=True)

    # set pose for next itration
    self.video.poses[self.t1] = self.video.poses[self.t1-1]
    self.video.disps[self.t1] = self.video.disps[self.t1-1].mean()`

Also what does it mean by set pose for next iteration?