bytedance / particle-sfm

ParticleSfM: Exploiting Dense Point Trajectories for Localizing Moving Cameras in the Wild. ECCV 2022.
http://b1ueber2y.me/projects/ParticleSfM/
GNU General Public License v3.0
277 stars 23 forks source link

How to judge the motion state of a trajectory. #7

Closed fzhiheng closed 2 years ago

fzhiheng commented 2 years ago

https://github.com/bytedance/particle-sfm/blob/b079361510f5241477d11e11082140b45b5d1c27/scripts/prepare_flyingthings3d.py#L89

I am confused with the method to judge the motion state of a trajectory. Because the label of dynamic objects is 255 in the motion_label provided in your README. According to your method, as long as one frame of the trajectory is dynamic, then the label of the trajectory is dynamic. I'm not sure, maybe you originally meant that at least half of the points in the trajectory are dynamic before you can determine that the label of this trajectory is dynamic. Then the code should be:

if gts[j, round(y), round(x)]:
    label_num += 1
thuzhaowang commented 2 years ago

Thanks for your comment!

The way of voting for the motion label (at least half of total or just one point) doesn't matter a lot on the flyingthings3d dataset since we use groundtruth optical flows and motion masks, and the dynamic objects move consistently. But that's true we intended to use "at lease half of the points" to determine the label, which means the motion masks should be normalized. We will fix this and many thanks for pointing it out!