Xinyu-Yi / TransPose

A real-time motion capture system that estimates poses and global translations using only 6 inertial measurement units
https://xinyu-yi.github.io/TransPose/
GNU General Public License v3.0
373 stars 72 forks source link

使用DIP-IMU训练 #38

Open Jaceyxy opened 1 year ago

Jaceyxy commented 1 year ago

您好,很抱歉打扰您,我使用prepross.py处理dip_imu数据集,生成train.pt,test.pt,以前八个受试者作为训练集,后两个作为测试集进行训练,代码如下 image 我想知道train.pt 与test.pt的传感器数据是否经过论文中Calibration 此外pose_t是否为全局坐标系下的数据 很感谢您的解答

Xinyu-Yi commented 1 year ago

不记得了。您可以直接和合成imu比较一下,如果差不多就是有calibration。您的问题都可以设计实验或者可视化验证

Jaceyxy commented 1 year ago

十分感谢,我会尝试一下

wwwpkol commented 1 year ago

我自己也写了一个训练的脚本,咱们能交流一下?或者我加您个微信或邮箱

Mumuwei commented 1 year ago

@wwwpkol 我能和你也交流一下吗?

YaoBeiji commented 1 year ago

十分感谢,我会尝试一下

你好,能否咨询下transpose 训练dip-imu的详细过程?

wwwpkol commented 1 year ago

否咨询下transpose 训练di

你邮箱多少,我发你邮箱吧

YaoBeiji commented 1 year ago

否咨询下transpose 训练di

你邮箱多少,我发你邮箱吧

yaobeiji123@163.com,非常感谢

wwwpkol commented 1 year ago

我并没有达到文章的效果,我把真值的计算和训练发你了。

train.py

for epoch in range(1000):

    totall_los = 0     for x, y, j, s in tqdm.tqdm(list(zip(xs, ys, joint, shape))):         leaf_joint_position, full_joint_position, global_reduced_pose, \                         contact_probability, velocity, rnn_state = net(x)

        # FK         # y_pose, y_tran = P.forward_kinematics(pose = y[0], shape = s[0],tran= y[1])  #y_pose roatation         # l1-los         y_1 = pose_s1_normalize(j, y[0]).reshape(-1, 15)         # l2-los         y_2 = pose_s2_normalize(j, y[0]).reshape(-1, 69)         # l3-los         y_pose_3 = pose_s3_normalize(y[0])         y_3 = y_pose_3.view(-1, 3, 3)[:, :, :2].transpose(1, 2).clone().reshape(-1, 90)         # B1-los         y_4 = AMASS_foot_GT(j)         # B2-los         y_5 = AMASS_root_GT(y[0], y[1])

        vel_3, y_5_3 = root_vel(velocity, y_5, 3)         vel_9, y_5_9 = root_vel(velocity, y_5, 9)         vel_27, y_5_27 = root_vel(velocity, y_5, 27)

        net.zero_grad()         loss_1 = criterion_mse(leaf_joint_position, y_1.to(device))         loss_2 = criterion_mse(full_joint_position, y_2.to(device))         loss_3 = criterion_mse(global_reduced_pose, y_3.to(device))         loss_4 = criterion_cro(contact_probability, y_4.to(device))         loss_5 = criterion_mse(velocity, y_5.to(device)) + criterion_mse(vel_3, y_5_3.to(device)) + criterion_mse(vel_9, y_5_9.to(device)) + \                  criterion_mse(vel_27, y_5_27.to(device))         loss = loss_1 + loss_2 + loss_3 + loss_4 + loss_5         # loss = loss_3         totall_los = totall_los + loss

        optimizer.zero_grad()         loss.backward()         optimizer.step()

        print("total_los",loss,"count:",count)

        # if iter%100 ==0:         #     print("loss".format(iter, loss.item))

    count = count + 1     if count%2 == 0:         torch.save(net, f"TransPose_tt/sa_1013_as_al/transpose{count}_{totall_los}.pth")

------------------ 原始邮件 ------------------ 发件人: "Xinyu-Yi/TransPose" @.>; 发送时间: 2022年12月20日(星期二) 下午4:16 @.>; 抄送: "SeaofBitternes @.**@.>; 主题: Re: [Xinyu-Yi/TransPose] 使用DIP-IMU训练 (Issue #38)

否咨询下transpose 训练di

你邮箱多少,我发你邮箱吧

@.***,非常感谢

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

YaoBeiji commented 1 year ago

我并没有达到文章的效果,我把真值的计算和训练发你了。 #train.py for epoch in range(1000):     totall_los = 0     for x, y, j, s in tqdm.tqdm(list(zip(xs, ys, joint, shape))):         leaf_joint_position, full_joint_position, global_reduced_pose, \                         contact_probability, velocity, rnn_state = net(x)         # FK         # y_pose, y_tran = P.forward_kinematics(pose = y[0], shape = s[0],tran= y[1])  #y_pose roatation         # l1-los         y_1 = pose_s1_normalize(j, y[0]).reshape(-1, 15)         # l2-los         y_2 = pose_s2_normalize(j, y[0]).reshape(-1, 69)         # l3-los         y_pose_3 = pose_s3_normalize(y[0])         y_3 = y_pose_3.view(-1, 3, 3)[:, :, :2].transpose(1, 2).clone().reshape(-1, 90)         # B1-los         y_4 = AMASS_foot_GT(j)         # B2-los         y_5 = AMASS_root_GT(y[0], y[1])         vel_3, y_5_3 = root_vel(velocity, y_5, 3)         vel_9, y_5_9 = root_vel(velocity, y_5, 9)         vel_27, y_5_27 = root_vel(velocity, y_5, 27)         net.zero_grad()         loss_1 = criterion_mse(leaf_joint_position, y_1.to(device))         loss_2 = criterion_mse(full_joint_position, y_2.to(device))         loss_3 = criterion_mse(global_reduced_pose, y_3.to(device))         loss_4 = criterion_cro(contact_probability, y_4.to(device))         loss_5 = criterion_mse(velocity, y_5.to(device)) + criterion_mse(vel_3, y_5_3.to(device)) + criterion_mse(vel_9, y_5_9.to(device)) + \                  criterion_mse(vel_27, y_5_27.to(device))         loss = loss_1 + loss_2 + loss_3 + loss_4 + loss_5         # loss = loss_3         totall_los = totall_los + loss         optimizer.zero_grad()         loss.backward()         optimizer.step()         print("total_los",loss,"count:",count)         # if iter%100 ==0:         #     print("loss".format(iter, loss.item))     count = count + 1     if count%2 == 0:         torch.save(net, f"TransPose_tt/sa_1013_as_al/transpose{count}_{totall_los}.pth") ------------------ 原始邮件 ------------------ 发件人: "Xinyu-Yi/TransPose" @.>; 发送时间: 2022年12月20日(星期二) 下午4:16 @.>; 抄送: "SeaofBitternes @.**@.>; 主题: Re: [Xinyu-Yi/TransPose] 使用DIP-IMU训练 (Issue #38) 否咨询下transpose 训练di 你邮箱多少,我发你邮箱吧 @.,非常感谢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> 可以提供dataset的细节嘛?我打算每个模块训练下。

wwwpkol commented 1 year ago

并没有什么细节,我只是把所有的点 转化为世界坐标系。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年12月20日(星期二) 下午5:24 收件人: @.>; 抄送: "SeaofBitternes @.>; @.>; 主题: Re: [Xinyu-Yi/TransPose] 使用DIP-IMU训练 (Issue #38)

我并没有达到文章的效果,我把真值的计算和训练发你了。 #train.py for epoch in range(1000):     totall_los = 0     for x, y, j, s in tqdm.tqdm(list(zip(xs, ys, joint, shape))):         leaf_joint_position, full_joint_position, global_reduced_pose, \                         contact_probability, velocity, rnn_state = net(x)         # FK         # y_pose, y_tran = P.forward_kinematics(pose = y[0], shape = s[0],tran= y[1])  #y_pose roatation         # l1-los         y_1 = pose_s1_normalize(j, y[0]).reshape(-1, 15)         # l2-los         y_2 = pose_s2_normalize(j, y[0]).reshape(-1, 69)         # l3-los         y_pose_3 = pose_s3_normalize(y[0])         y_3 = y_pose_3.view(-1, 3, 3)[:, :, :2].transpose(1, 2).clone().reshape(-1, 90)         # B1-los         y_4 = AMASS_foot_GT(j)         # B2-los         y_5 = AMASS_root_GT(y[0], y[1])         vel_3, y_5_3 = root_vel(velocity, y_5, 3)         vel_9, y_5_9 = root_vel(velocity, y_5, 9)         vel_27, y_5_27 = root_vel(velocity, y_5, 27)         net.zero_grad()         loss_1 = criterion_mse(leaf_joint_position, y_1.to(device))         loss_2 = criterion_mse(full_joint_position, y_2.to(device))         loss_3 = criterion_mse(global_reduced_pose, y_3.to(device))         loss_4 = criterion_cro(contact_probability, y_4.to(device))         loss_5 = criterion_mse(velocity, y_5.to(device)) + criterion_mse(vel_3, y_5_3.to(device)) + criterion_mse(vel_9, y_5_9.to(device)) + \                  criterion_mse(vel_27, y_5_27.to(device))         loss = loss_1 + loss_2 + loss_3 + loss_4 + loss_5         # loss = loss_3         totall_los = totall_los + loss         optimizer.zero_grad()         loss.backward()         optimizer.step()         print("total_los",loss,"count:",count)         # if iter%100 ==0:         #     print("loss".format(iter, loss.item))     count = count + 1     if count%2 == 0:         torch.save(net, f"TransPose_tt/sa_1013_as_al/transpose{count}_{totall_los}.pth") … ------------------ 原始邮件 ------------------ 发件人: "Xinyu-Yi/TransPose" @.>; 发送时间: 2022年12月20日(星期二) 下午4:16 @.>; 抄送: "SeaofBitternes @.@.>; 主题: Re: [Xinyu-Yi/TransPose] 使用DIP-IMU训练 (Issue #38) 否咨询下transpose 训练di 你邮箱多少,我发你邮箱吧 @.,非常感谢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> 可以提供dataset的细节嘛?我打算每个模块训练下。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

YaoBeiji commented 1 year ago

并没有什么细节,我只是把所有的点 转化为世界坐标系。 ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年12月20日(星期二) 下午5:24 收件人: @.>; 抄送: "SeaofBitternes @.>; @.>; 主题: Re: [Xinyu-Yi/TransPose] 使用DIP-IMU训练 (Issue #38) 我并没有达到文章的效果,我把真值的计算和训练发你了。 #train.py for epoch in range(1000):     totall_los = 0     for x, y, j, s in tqdm.tqdm(list(zip(xs, ys, joint, shape))):         leaf_joint_position, full_joint_position, global_reduced_pose, \                         contact_probability, velocity, rnn_state = net(x)         # FK         # y_pose, y_tran = P.forward_kinematics(pose = y[0], shape = s[0],tran= y[1])  #y_pose roatation         # l1-los         y_1 = pose_s1_normalize(j, y[0]).reshape(-1, 15)         # l2-los         y_2 = pose_s2_normalize(j, y[0]).reshape(-1, 69)         # l3-los         y_pose_3 = pose_s3_normalize(y[0])         y_3 = y_pose_3.view(-1, 3, 3)[:, :, :2].transpose(1, 2).clone().reshape(-1, 90)         # B1-los         y_4 = AMASS_foot_GT(j)         # B2-los         y_5 = AMASS_root_GT(y[0], y[1])         vel_3, y_5_3 = root_vel(velocity, y_5, 3)         vel_9, y_5_9 = root_vel(velocity, y_5, 9)         vel_27, y_5_27 = root_vel(velocity, y_5, 27)         net.zero_grad()         loss_1 = criterion_mse(leaf_joint_position, y_1.to(device))         loss_2 = criterion_mse(full_joint_position, y_2.to(device))         loss_3 = criterion_mse(global_reduced_pose, y_3.to(device))         loss_4 = criterion_cro(contact_probability, y_4.to(device))         loss_5 = criterion_mse(velocity, y_5.to(device)) + criterion_mse(vel_3, y_5_3.to(device)) + criterion_mse(vel_9, y_5_9.to(device)) + \                  criterion_mse(vel_27, y_5_27.to(device))         loss = loss_1 + loss_2 + loss_3 + loss_4 + loss_5         # loss = loss_3         totall_los = totall_los + loss         optimizer.zero_grad()         loss.backward()         optimizer.step()         print("total_los",loss,"count:",count)         # if iter%100 ==0:         #     print("loss".format(iter, loss.item))     count = count + 1     if count%2 == 0:         torch.save(net, f"TransPose_tt/sa_1013_as_al/transpose{count}_{totall_los}.pth") … ------------------ 原始邮件 ------------------ 发件人: "Xinyu-Yi/TransPose" @.>; 发送时间: 2022年12月20日(星期二) 下午4:16 @.>; 抄送: "SeaofBitternes @.@.>; 主题: Re: [Xinyu-Yi/TransPose] 使用DIP-IMU训练 (Issue #38) 否咨询下transpose 训练di 你邮箱多少,我发你邮箱吧 @.,非常感谢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> 可以提供dataset的细节嘛?我打算每个模块训练下。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

我知道,但是dip-imu里面没有joint和shape的信息,这些是从哪里得到的,直接从amass里面拿么

Jaceyxy commented 1 year ago

@YaoBeiji 您好,请问您能也给我发一份嘛,我的邮箱是2535287050@qq.com,十分感谢,我一直没有办法达到文章的效果,且相差很远

JaggerZr commented 1 year ago

十分感谢,我会尝试一下

我在用amss数据集生成,train.pt和val.pt,发现sequence挺长的,有的序列长度有1900多,您train的时候有切成块吗?比如将1900切片成3个500的,剩下的400丢掉。

JaggerZr commented 1 year ago

麻烦问下,您的train的代码有开源的计划吗,train的过程中,是分模块进行训练的,还是端到端训练的。训练过程中,有对比较长的序列进行切块吗,比如序列长度为1900,您有切成25xn的块吗,谢谢。

iamyouno commented 1 year ago

I also wrote a training script myself, can we share it? Or I will add your WeChat or email

@wwwpkol Can I also get training code? I tried it myself, and it looks like well.. But I could not complete calibration and normalize part. I saw your train.py but can't know info about pose_s1_normalize, pose_s2_normalize, AMASS_foot_GT ... because that functions are not in train.py.

My email is 117jyh@gmail.com, thank you very much.

YaoBeiji commented 1 year ago

I also wrote a training script myself, can we share it? Or I will add your WeChat or email

@wwwpkol Can I also get training code? I tried it myself, and it looks like well.. But I could not complete calibration and normalize part. I saw your train.py but can't know info about pose_s1_normalize, pose_s2_normalize, AMASS_foot_GT ... because that functions are not in train.py.

My email is 117jyh@gmail.com, thank you very much.

there is no more. That response was all.

MeiYouN commented 7 months ago

否咨询下transpose 训练di

你邮箱多少,我发你邮箱吧

你好,我的邮箱是2719141980@qq.com 可以发我一份吗。谢谢

Xinyu-Yi commented 3 months ago

序列长度是300,需要把AMSS数据集切成小片段 The sequence length is 300. You need to split AMASS into small sequences.