haofanwang / accurate-head-pose

Pytorch code for Hybrid Coarse-fine Classification for Head Pose Estimation
98 stars 22 forks source link

regress loss error ,is too large, torch is 1.0.1 python 2.7 #1

Closed shiyuanyin closed 5 years ago

shiyuanyin commented 5 years ago

hello , haofanwang , I use Pose_300W_LP_multi, 300W_LP_filename_filtered.txt ,to train, but the loss ,give the result as follows, I haven't changed it. Do you know why? torch is 1.0.1 python 2.7

Loading data. Ready to train network. Epoch [1/25], Iter [100/1912] Losses: Yaw 161.4367, Pitch 180.8725, Roll 41.3196 161.436706543 Epoch [1/25], Iter [200/1912] Losses: Yaw 124.8338, Pitch 489.4776, Roll 246.7312 124.83379364 Epoch [1/25], Iter [300/1912] Losses: Yaw 147.8351, Pitch 60.8210, Roll 62.3920 147.83505249 Epoch [1/25], Iter [400/1912] Losses: Yaw 158.3398, Pitch 139.8713, Roll 43.4810 158.339782715 Epoch [1/25], Iter [500/1912] Losses: Yaw 894.2488, Pitch 936.0706, Roll 331.0779 894.248779297 Epoch [1/25], Iter [600/1912] Losses: Yaw 157.3936, Pitch 44.9767, Roll 61.1448 157.393615723 Epoch [1/25], Iter [700/1912] Losses: Yaw 189.1127, Pitch 605.8845, Roll 48.3591 189.112686157 Epoch [1/25], Iter [800/1912] Losses: Yaw 188.4961, Pitch 258.0078, Roll 55.0151 188.49609375 Epoch [1/25], Iter [900/1912] Losses: Yaw 298.6048, Pitch 60.1183, Roll 77.0532 298.604797363 Epoch [1/25], Iter [1000/1912] Losses: Yaw 107.6561, Pitch 78.1015, Roll 55.0624 107.656112671 Epoch [1/25], Iter [1100/1912] Losses: Yaw 154.2444, Pitch 479.2390, Roll 328.9452 154.244354248 Epoch [1/25], Iter [1200/1912] Losses: Yaw 643.8879, Pitch 2594.8455, Roll 3647.3457 643.887878418 Epoch [1/25], Iter [1300/1912] Losses: Yaw 82.8954, Pitch 194.4952, Roll 152.2793 82.8953704834 Epoch [1/25], Iter [1400/1912] Losses: Yaw 81.9724, Pitch 168.7021, Roll 279.5479 81.9723968506 Epoch [1/25], Iter [1500/1912] Losses: Yaw 367.3708, Pitch 193.3879, Roll 79.1561 367.370758057 Epoch [1/25], Iter [1600/1912] Losses: Yaw 180.7048, Pitch 1052.1819, Roll 48.1278 180.704772949 Epoch [1/25], Iter [1700/1912] Losses: Yaw 139.1630, Pitch 122.4742, Roll 91.7871 139.163024902 Epoch [1/25], Iter [1800/1912] Losses: Yaw 159.9963, Pitch 180.5340, Roll 41.4436

haofanwang commented 5 years ago

Just wait for more epochs and check whether the loss decreases, usually, it can converge around 10-15 epoch.

shiyuanyin commented 5 years ago

@haofanwang Yes, it can converge, and I test 5epoch.pkl ,the AFLW2000 out as follows: Test error in degrees of the model on the 1969 test images. Yaw: 5.1895, Pitch: 6.5614, Roll: 5.6367, MAE: 5.7959
the 25 epoch.pkl MAE is 5.8 the out have higher losses than your paper. What should I pay attention to? the lr = 0.000001 is your paper sets batch =32 alpha = 2 dataset = Pose_300W_LP_multi

haofanwang commented 5 years ago

Thanks for following our method . I think initialization may play a role here, so your MAE should be fine. You can also test your saved models one by one to see which outcomes the best performance. Besides, reproduced model is provided, you can test by yourself.

shiyuanyin commented 5 years ago

@haofanwang ,OK,I will try it. Thanks

haofanwang commented 5 years ago

Closed.

iperov commented 5 years ago

I got same problem