-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the fail_percentage? Why supervised's fail_percentage less than unsupervised? #7
Comments
Hi, As you can see in homography_model.py, a failure is considered when the h_loss of the estimated homography > h_loss of an identity matrix (meaning the estimate is too bad). The fail_percentage can be different but should not much. Can you show your values here? |
Thank you for your reply! I find the def of num_fail in homography_model.py line 278-279. You mention that the difference should not much. I think the difference between your results and mine could be the different synthetic dataset, since it is generated randomly. I'll generate new synthetic dataset to see if the fail_percentage shows the same difference. Here are my test results for supervised and unsupervised network on synthetic data: ===> There are totally 5000 test files /Users/Nora/Desktop/ImageProcessing/HomographyGAN/unsupervisedDeepHomographyRAL2018-master/syntheticdata/synthetic/45/test_gt.txt ('Wrote file %s', '../results/synthetic/report/128_h_loss_loss_11.815462.jpg')s241ms | Tot: 0ms | Test, h_loss 13.018, rec_loss 1.043, ssim_loss 0.406, l1_loss 0.678, fail_percent 0.0625 ('Wrote file %s', '../results/synthetic/report/1408_h_loss_loss_10.353984.jpg')s | Tot: 4m2s | Test, h_loss 12.364, rec_loss 1.043, ssim_loss 0.422, l1_loss 0.691, fail_percent 0.0597 ('Wrote file %s', '../results/synthetic/report/2688_h_loss_loss_12.811972.jpg')s | Tot: 8m5s | Test, h_loss 12.141, rec_loss 1.040, ssim_loss 0.424, l1_loss 0.688, fail_percent 0.0577 ('Wrote file %s', '../results/synthetic/report/3968_h_loss_loss_10.991777.jpg')3s | Tot: 11m58s | Test, h_loss 12.247, rec_loss 1.040, ssim_loss 0.424, l1_loss 0.688, fail_percent 0.0617 ('Wrote file %s', '../results/synthetic/report/5248_h_loss_loss_12.481041.jpg')9s | Tot: 15m57s | Test, h_loss 12.199, rec_loss 1.043, ssim_loss 0.424, l1_loss 0.690, fail_percent 0.0617 ('Wrote file %s', '../results/synthetic/report/6528_h_loss_loss_11.90332.jpg')56s | Tot: 19m54s | Test, h_loss 12.240, rec_loss 1.045, ssim_loss 0.424, l1_loss 0.692, fail_percent 0.0616 ('Wrote file %s', '../results/synthetic/report/7808_h_loss_loss_12.233584.jpg')54ms | Tot: 23m54s | Test, h_loss 12.195, rec_loss 1.045, ssim_loss 0.424, l1_loss 0.692, fail_percent 0.0619 ('Wrote file %s', '../results/synthetic/report/9088_h_loss_loss_11.753185.jpg')2s | Tot: 28m17s | Test, h_loss 12.169, rec_loss 1.041, ssim_loss 0.423, l1_loss 0.688, fail_percent 0.0619 ('Wrote file %s', '../results/synthetic/report/10368_h_loss_loss_11.462982.jpg')s | Tot: 33m2s | Test, h_loss 12.168, rec_loss 1.042, ssim_loss 0.424, l1_loss 0.689, fail_percent 0.0621 ('Wrote file %s', '../results/synthetic/report/11648_h_loss_loss_12.536741.jpg')s | Tot: 37m12s | Test, h_loss 12.199, rec_loss 1.044, ssim_loss 0.424, l1_loss 0.691, fail_percent 0.0607 ('Wrote file %s', '../results/synthetic/report/12928_h_loss_loss_12.287821.jpg') | Tot: 41m20s | Test, h_loss 12.170, rec_loss 1.042, ssim_loss 0.424, l1_loss 0.689, fail_percent 0.0599 ('Wrote file %s', '../results/synthetic/report/14208_h_loss_loss_11.624669.jpg')s | Tot: 45m37s | Test, h_loss 12.138, rec_loss 1.039, ssim_loss 0.424, l1_loss 0.687, fail_percent 0.0598
Unsupervised <==================== Loading data ===================> ===> There are totally 5000 test files /Users/Nora/Desktop/ImageProcessing/HomographyGAN/unsupervisedDeepHomographyRAL2018-master/syntheticdata/synthetic/45/test_gt.txt [>................................................................] Step: 56s553ms | Tot: 0ms | Test, h_loss 13.687, rec_loss 0.999, ssim_loss 0.394, l1_loss 0.615, fail_percent 0.2031 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 1/120 [=====>...........................................................] Step: 4m28s | Tot: 4m28s | Test, h_loss 14.114, rec_loss 0.989, ssim_loss 0.405, l1_loss 0.626, fail_percent 0.2010 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 11/120 [==========>......................................................] Step: 4m19s | Tot: 8m47s | Test, h_loss 14.144, rec_loss 0.987, ssim_loss 0.406, l1_loss 0.627, fail_percent 0.2046 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 21/120 [================>................................................] Step: 4m13s | Tot: 13m1s | Test, h_loss 14.034, rec_loss 0.982, ssim_loss 0.405, l1_loss 0.622, fail_percent 0.2014 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 31/120 [=====================>...........................................] Step: 3m52s | Tot: 16m53s | Test, h_loss 14.013, rec_loss 0.976, ssim_loss 0.403, l1_loss 0.617, fail_percent 0.2008 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 41/120 [===========================>.....................................] Step: 3m55s | Tot: 20m49s | Test, h_loss 14.007, rec_loss 0.976, ssim_loss 0.402, l1_loss 0.615, fail_percent 0.2005 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 51/120 [================================>................................] Step: 3m57s | Tot: 24m47s | Test, h_loss 13.990, rec_loss 0.975, ssim_loss 0.403, l1_loss 0.615, fail_percent 0.1989 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 61/120 [=====================================>...........................] Step: 3m57s | Tot: 28m44s | Test, h_loss 13.998, rec_loss 0.978, ssim_loss 0.403, l1_loss 0.616, fail_percent 0.1987 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 71/120 [===========================================>.....................] Step: 4m5s | Tot: 32m50s | Test, h_loss 13.987, rec_loss 0.976, ssim_loss 0.403, l1_loss 0.615, fail_percent 0.1992 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 81/120 [================================================>................] Step: 4m6s | Tot: 36m56s | Test, h_loss 14.004, rec_loss 0.978, ssim_loss 0.403, l1_loss 0.616, fail_percent 0.1994 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 91/120 [======================================================>..........] Step: 4m5s | Tot: 41m2s | Test, h_loss 13.971, rec_loss 0.974, ssim_loss 0.403, l1_loss 0.613, fail_percent 0.1968 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 101/120 [===========================================================>.....] Step: 3m55s | Tot: 44m58s | Test, h_loss 13.956, rec_loss 0.976, ssim_loss 0.403, l1_loss 0.614, fail_percent 0.1966 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 111/120
|
I also met this problem, and supervised method‘s performance is better than unsupervised method’s, did i miss something important? |
Hi,
Thank you so much for your code!
I successfully generate the synthetic datasets and test both supervised and unsupervised homography network by homography_CNN_synthetic.py. One of its outputs is fail_percentage. I checked where it is from. In the train(), it should be "apply_grad_opt". But I don't really understand what it is. Can you explain it to me?
Another related question is why supervised's fail_percentage less than unsupervised?
Both l1_loss and h_loss are very closed for two networks. But big difference shows in fail_percentage.
Thanks!
The text was updated successfully, but these errors were encountered: